-
-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (93 loc) · 2.59 KB
/
windows_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Windows Build
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths-ignore:
- .github/**
- "!.github/workflows/windows_build.yml"
- "**.md"
- "docs/**"
push:
branches:
- main
paths-ignore:
- .github/**
- "!.github/workflows/windows_build.yml"
- "**.md"
- "docs/**"
env:
BETTER_MEDIA_INFO_VERSION: 0.4.0
MEDIA_INFO_LIB_VERSION: v24.12
jobs:
build_package:
name: Build for Windows x86_64
runs-on: windows-latest
steps:
- name: Checkout the code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.28.x'
- name: Build zlib
run: |
cd ..
curl -o zlib.zip https://www.zlib.net/zlib131.zip
7z x zlib.zip
move zlib-1.3.1 zlib
del zlib.zip
cd zlib
md build
cd build
cmake -A x64 ..\
cmake --build . --config Release
copy zconf.h ..\
- name: Download ZenLib
run: |
cd ..
git clone https://github.com/MediaArea/ZenLib.git
- name: Build MediaInfoLib
run: |
cd ..
git clone -b ${{ env.MEDIA_INFO_LIB_VERSION }} --depth 1 https://github.com/MediaArea/MediaInfoLib.git
cd MediaInfoLib\Project\MSVC2022
msbuild MediaInfoLib.sln -t:rebuild -verbosity:diag -property:Configuration=Release -property:Platform=x64
- name: Copy DLLs
run: |
node src-tauri\scripts\copy_dlls.cjs
- name: Patch tauri.conf.json
run: |
node src-tauri\scripts\patch_tauri_conf.cjs
- name: Build BetterMediaInfo
run: |
pnpm install
cd src-tauri
cargo test -r
cd ..
pnpm tauri build
- name: Upload the msi
uses: actions/upload-artifact@v4
with:
name: BetterMediaInfo-windows-x86_64-${{ env.BETTER_MEDIA_INFO_VERSION }}-msi
path: |
src-tauri/target/release/bundle/msi/*.msi
- name: Upload the nsis
uses: actions/upload-artifact@v4
with:
name: BetterMediaInfo-windows-x86_64-${{ env.BETTER_MEDIA_INFO_VERSION }}-nsis
path: |
src-tauri/target/release/bundle/nsis/*.exe