Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 93 additions & 0 deletions .github/workflows/MediaInfoLib_Checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ jobs:
with:
repository: MediaArea/ZenLib
path: ZenLib
- name: Checkout MediaArea-Utils-Binaries for 7-Zip and NSIS
uses: actions/checkout@v5
with:
repository: MediaArea/MediaArea-Utils-Binaries
path: MediaArea-Utils-Binaries
sparse-checkout: |
Windows/7-Zip
Windows/NSIS
- name: Checkout MediaInfoLib
uses: actions/checkout@v5
with:
Expand All @@ -141,3 +149,88 @@ jobs:
msbuild-architecture: x64
- name: Build
run: msbuild -p:Configuration=Release -p:Platform=${{ matrix.architecture }} ${{ github.workspace }}\MediaInfoLib\Project\MSVC2022\MediaInfoLib.sln -verbosity:quiet -warnaserror
- name: Prepare package script
run: (Get-Content ${{ github.workspace }}\MediaInfoLib\Release\Release_DLL_Windows_ARM64.bat) -replace 'ARM64EC', 'ARM64' | Set-Content ${{ github.workspace }}\MediaInfoLib\Release\Release_DLL_Windows_ARM64.bat
- name: Package
if: ${{ matrix.architecture != 'Win32' }}
run: |
cd ${{ github.workspace }}\MediaInfoLib\Release
.\Release_DLL_Windows_${{ matrix.architecture }}.bat
- name: Upload artifact
if: ${{ matrix.architecture != 'Win32' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.architecture }}
path: ${{ github.workspace }}\MediaInfoLib\Release\MediaInfo_DLL_Windows_${{ matrix.architecture }}_WithoutInstaller.7z

Rust:
needs: MSBuild
strategy:
matrix:
include:
- os: windows-latest
architecture: x64
- os: windows-11-arm
architecture: ARM64
- os: ubuntu-latest
architecture: AMD64
- os: ubuntu-24.04-arm
architecture: AArch64
- os: macos-latest
architecture: AArch64
fail-fast: false
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout MediaInfoLib
if: ${{ runner.os != 'Windows' }}
uses: actions/checkout@v5
- name: libmediainfo
if: ${{ runner.os != 'Windows' }}
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update -y
sudo apt-get install -y libmediainfo-dev
fi
if [ "$RUNNER_OS" == "macOS" ]; then
git -C .. clone --depth=1 https://github.com/MediaArea/ZenLib.git
mkdir Project/CMake/Build
cd Project/CMake/Build
cmake -DBUILD_ZENLIB=1 -DZLIB_BUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
cmake --build . -j4
sudo cmake --install .
fi
- name: Download artifact
if: ${{ runner.os == 'Windows' }}
uses: actions/download-artifact@v5
with:
name: ${{ matrix.architecture }}
- name: Delete artifact
if: ${{ runner.os == 'Windows' }}
uses: geekyeggo/delete-artifact@v5
with:
name: ${{ matrix.architecture }}
- name: Extract package
if: ${{ runner.os == 'Windows' }}
run: 7z x MediaInfo_DLL_Windows_${{ matrix.architecture }}_WithoutInstaller.7z
- name: Test wrapper
run: |
cd ${{ runner.os == 'Windows' && 'Developers\Source\MediaInfoDLL\MediaInfoDLL-rs' || 'Source/MediaInfoDLL/MediaInfoDLL-rs' }}
cargo test
- name: Check wrapper
run: |
cd ${{ runner.os == 'Windows' && 'Developers\Source\MediaInfoDLL\MediaInfoDLL-rs' || 'Source/MediaInfoDLL/MediaInfoDLL-rs' }}
cargo clippy -- -D warnings
- name: Build example
run: |
cd ${{ runner.os == 'Windows' && 'Developers\Source\Example\HowToUse_Dll-rs' || 'Source/Example/HowToUse_Dll-rs' }}
cargo build --release
- name: Check example
run: |
cd ${{ runner.os == 'Windows' && 'Developers\Source\Example\HowToUse_Dll-rs' || 'Source/Example/HowToUse_Dll-rs' }}
cargo clippy --release -- -D warnings
- name: Test run example
run: |
cd ${{ runner.os == 'Windows' && 'Developers\Source\Example\HowToUse_Dll-rs' || 'Source/Example/HowToUse_Dll-rs' }}
cargo run --release ${{ runner.os != 'Windows' && '-- ../../../Release/Example.ogg' || '' }}
2 changes: 2 additions & 0 deletions Release/Release_DLL_Windows_ARM64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ mkdir MediaInfoDLL_Windows_ARM64\Developers\List_Of_Parameters
copy ..\Source\Resource\Text\Stream\*.csv MediaInfoDLL_Windows_ARM64\Developers\List_Of_Parameters

rem --- Copying : Include ---
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL-rs\ MediaInfoDLL_Windows_ARM64\Developers\Source\MediaInfoDLL\MediaInfoDLL-rs\ /E
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL.h MediaInfoDLL_Windows_ARM64\Developers\Source\MediaInfoDLL\
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL_Static.h MediaInfoDLL_Windows_ARM64\Developers\Source\MediaInfoDLL\
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL.def MediaInfoDLL_Windows_ARM64\Developers\Source\MediaInfoDLL\
Expand Down Expand Up @@ -134,6 +135,7 @@ xcopy ..\Project\MSVC2022\ARM64EC\Debug\MediaInfo.lib MediaInfoDLL_Windows_ARM64
xcopy ..\Project\MSVC2022\ARM64\Debug\MediaInfo.lib MediaInfoDLL_Windows_ARM64\Developers\Project\MSVC2022\ARM64\Debug\

rem --- Copying : Examples ---
xcopy ..\Source\Example\HowToUse_Dll-rs\ MediaInfoDLL_Windows_ARM64\Developers\Source\Example\HowToUse_Dll-rs\ /E
xcopy ..\Source\Example\HowToUse_Dll*.* MediaInfoDLL_Windows_ARM64\Developers\Source\Example\
xcopy Example.ogg MediaInfoDLL_Windows_ARM64\Developers\

Expand Down
2 changes: 2 additions & 0 deletions Release/Release_DLL_Windows_i386.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ mkdir MediaInfoDLL_Windows_i386\Developers\List_Of_Parameters
copy ..\Source\Resource\Text\Stream\*.csv MediaInfoDLL_Windows_i386\Developers\List_Of_Parameters

rem --- Copying : Include ---
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL-rs\ MediaInfoDLL_Windows_i386\Developers\Source\MediaInfoDLL\MediaInfoDLL-rs\ /E
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL.h MediaInfoDLL_Windows_i386\Developers\Source\MediaInfoDLL\
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL_Static.h MediaInfoDLL_Windows_i386\Developers\Source\MediaInfoDLL\
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL.def MediaInfoDLL_Windows_i386\Developers\Source\MediaInfoDLL\
Expand Down Expand Up @@ -133,6 +134,7 @@ xcopy ..\Project\MSVC2022\Win32\Release\MediaInfo.lib MediaInfoDLL_Windows_x64\D
xcopy ..\Project\MSVC2022\Win32\Debug\MediaInfo.lib MediaInfoDLL_Windows_x64\Developers\Project\MSVC2022\x64\Debug\

rem --- Copying : Examples ---
xcopy ..\Source\Example\HowToUse_Dll-rs\ MediaInfoDLL_Windows_i386\Developers\Source\Example\HowToUse_Dll-rs\ /E
xcopy ..\Source\Example\HowToUse_Dll*.* MediaInfoDLL_Windows_i386\Developers\Source\Example\
xcopy Example.ogg MediaInfoDLL_Windows_i386\Developers\

Expand Down
2 changes: 2 additions & 0 deletions Release/Release_DLL_Windows_x64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ mkdir MediaInfoDLL_Windows_x64\Developers\List_Of_Parameters
copy ..\Source\Resource\Text\Stream\*.csv MediaInfoDLL_Windows_x64\Developers\List_Of_Parameters

rem --- Copying : Include ---
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL-rs\ MediaInfoDLL_Windows_x64\Developers\Source\MediaInfoDLL\MediaInfoDLL-rs\ /E
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL.h MediaInfoDLL_Windows_x64\Developers\Source\MediaInfoDLL\
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL_Static.h MediaInfoDLL_Windows_x64\Developers\Source\MediaInfoDLL\
xcopy ..\Source\MediaInfoDLL\MediaInfoDLL.def MediaInfoDLL_Windows_x64\Developers\Source\MediaInfoDLL\
Expand Down Expand Up @@ -132,6 +133,7 @@ xcopy ..\Project\MSVC2022\x64\Release\MediaInfo.lib MediaInfoDLL_Windows_x64\Dev
xcopy ..\Project\MSVC2022\x64\Debug\MediaInfo.lib MediaInfoDLL_Windows_x64\Developers\Project\MSVC2022\x64\Debug\

rem --- Copying : Examples ---
xcopy ..\Source\Example\HowToUse_Dll-rs\ MediaInfoDLL_Windows_x64\Developers\Source\Example\HowToUse_Dll-rs\ /E
xcopy ..\Source\Example\HowToUse_Dll*.* MediaInfoDLL_Windows_x64\Developers\Source\Example\
xcopy Example.ogg MediaInfoDLL_Windows_x64\Developers\

Expand Down
24 changes: 24 additions & 0 deletions Source/Example/HowToUse_Dll-rs/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[build]

[target.x86_64-pc-windows-msvc]
rustflags = [
"-C",
"target-feature=+crt-static",
"-C",
"control-flow-guard",
"-C",
"link-args=/MANIFEST:EMBED /CETCOMPAT /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib",
]

[target.aarch64-pc-windows-msvc]
rustflags = [
"-C",
"target-feature=+crt-static",
"-C",
"control-flow-guard",
"-C",
"link-args=/MANIFEST:EMBED /NODEFAULTLIB:libucrt.lib /DEFAULTLIB:ucrt.lib",
]

[profile.release]
lto = true
1 change: 1 addition & 0 deletions Source/Example/HowToUse_Dll-rs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
Loading