Skip to content

🐞 fix: Fix SystemRoot #21

🐞 fix: Fix SystemRoot

🐞 fix: Fix SystemRoot #21

Workflow file for this run

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.1.0
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 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: |
cd ..
Copy-Item "MediaInfoLib\Project\MSVC2022\x64\Release\MediaInfo.dll" -Destination "BetterMediaInfo\src-tauri\"
Copy-Item "C:\Windows\System32\msvp140.dll" -Destination "BetterMediaInfo\src-tauri\"
Copy-Item "C:\Windows\System32\vcruntime140.dll" -Destination "BetterMediaInfo\src-tauri\"
Copy-Item "C:\Windows\System32\vcruntime140_1.dll" -Destination "BetterMediaInfo\src-tauri\"
- name: Patch tauri.conf.json
run: |
git apply < src-tauri\patches\tauri.conf.json.patch
- name: Build Better Media Info
run: |
pnpm install
pnpm tauri build
- name: Upload the msi
uses: actions/upload-artifact@v4
with:
name: Better_Media_Info-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: Better_Media_Info-windows-x86_64-${{ env.BETTER_MEDIA_INFO_VERSION }}-nsis
path: |
src-tauri/target/release/bundle/nsis/*.exe