fix(cd): bundle all runtime dependencies for Windows, macOS and Linux
This commit is contained in:
@@ -39,6 +39,7 @@ jobs:
|
|||||||
mingw-w64-ucrt-x86_64-expat
|
mingw-w64-ucrt-x86_64-expat
|
||||||
mingw-w64-ucrt-x86_64-portaudio
|
mingw-w64-ucrt-x86_64-portaudio
|
||||||
mingw-w64-ucrt-x86_64-nsis
|
mingw-w64-ucrt-x86_64-nsis
|
||||||
|
mingw-w64-ucrt-x86_64-ntldd
|
||||||
|
|
||||||
- name: Configure
|
- name: Configure
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -51,12 +52,17 @@ jobs:
|
|||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
|
|
||||||
- name: Deploy Qt dependencies
|
- name: Deploy dependencies
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p app/packaging/windows/nsis/olive-editor
|
mkdir -p app/packaging/windows/nsis/olive-editor
|
||||||
cp build/app/olive-editor.exe app/packaging/windows/nsis/olive-editor/
|
cp build/app/olive-editor.exe app/packaging/windows/nsis/olive-editor/
|
||||||
windeployqt6 app/packaging/windows/nsis/olive-editor/olive-editor.exe
|
windeployqt6 app/packaging/windows/nsis/olive-editor/olive-editor.exe
|
||||||
|
# Copy all non-Qt MSYS2 DLLs recursively
|
||||||
|
cd app/packaging/windows/nsis/olive-editor
|
||||||
|
for l in $(ntldd -R olive-editor.exe | grep -E 'mingw64|ucrt64|clang64' | sed 's/^[ \t]*//' | cut -d' ' -f3); do
|
||||||
|
cp -v "$l" .
|
||||||
|
done
|
||||||
|
|
||||||
- name: Build installer
|
- name: Build installer
|
||||||
shell: msys2 {0}
|
shell: msys2 {0}
|
||||||
@@ -85,7 +91,7 @@ jobs:
|
|||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
brew update
|
brew update
|
||||||
brew install cmake ninja pkg-config qt@6 ffmpeg openimageio opencolorio openexr portaudio expat
|
brew install cmake ninja pkg-config qt@6 ffmpeg openimageio opencolorio openexr portaudio expat dylibbundler
|
||||||
|
|
||||||
- name: Build OpenTimelineIO
|
- name: Build OpenTimelineIO
|
||||||
run: |
|
run: |
|
||||||
@@ -116,6 +122,14 @@ jobs:
|
|||||||
export PATH="$(brew --prefix qt@6)/bin:$PATH"
|
export PATH="$(brew --prefix qt@6)/bin:$PATH"
|
||||||
macdeployqt build/app/Olive.app
|
macdeployqt build/app/Olive.app
|
||||||
|
|
||||||
|
- name: Bundle non-Qt libraries
|
||||||
|
run: |
|
||||||
|
mkdir -p build/app/Olive.app/Contents/Frameworks
|
||||||
|
dylibbundler -od -b \
|
||||||
|
-x build/app/Olive.app/Contents/MacOS/Olive \
|
||||||
|
-d build/app/Olive.app/Contents/Frameworks/ \
|
||||||
|
-p @executable_path/../Frameworks
|
||||||
|
|
||||||
- name: Create DMG
|
- name: Create DMG
|
||||||
run: |
|
run: |
|
||||||
hdiutil create \
|
hdiutil create \
|
||||||
@@ -182,14 +196,20 @@ jobs:
|
|||||||
--icon-file AppDir/usr/share/icons/hicolor/512x512/apps/org.oakvideoeditor.Oak.png \
|
--icon-file AppDir/usr/share/icons/hicolor/512x512/apps/org.oakvideoeditor.Oak.png \
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|
||||||
- name: Verify FFmpeg is dynamically bundled
|
- name: Verify bundled libraries
|
||||||
run: |
|
run: |
|
||||||
# Ensure FFmpeg shared libraries are present inside the AppDir
|
# Ensure FFmpeg shared libraries are present inside the AppDir
|
||||||
ls AppDir/usr/lib/libavcodec.so* || (echo "Missing libavcodec" && exit 1)
|
ls AppDir/usr/lib/libavcodec.so* || (echo "Missing libavcodec" && exit 1)
|
||||||
ls AppDir/usr/lib/libavformat.so* || (echo "Missing libavformat" && exit 1)
|
ls AppDir/usr/lib/libavformat.so* || (echo "Missing libavformat" && exit 1)
|
||||||
ls AppDir/usr/lib/libavutil.so* || (echo "Missing libavutil" && exit 1)
|
ls AppDir/usr/lib/libavutil.so* || (echo "Missing libavutil" && exit 1)
|
||||||
ls AppDir/usr/lib/libswscale.so* || (echo "Missing libswscale" && exit 1)
|
ls AppDir/usr/lib/libswscale.so* || (echo "Missing libswscale" && exit 1)
|
||||||
ls AppDir/usr/lib/libswresample.so* || (echo "Missing libswresample" && exit 1)
|
ls AppDir/usr/lib/libswresample.so* || (echo "Missing libswresample" && exit 1)
|
||||||
|
# Ensure other runtime dependencies are present
|
||||||
|
ls AppDir/usr/lib/libOpenImageIO.so* || (echo "Missing libOpenImageIO" && exit 1)
|
||||||
|
ls AppDir/usr/lib/libOpenColorIO.so* || (echo "Missing libOpenColorIO" && exit 1)
|
||||||
|
ls AppDir/usr/lib/libportaudio.so* || (echo "Missing libportaudio" && exit 1)
|
||||||
|
ls AppDir/usr/lib/libopenexr*.so* || (echo "Missing libopenexr" && exit 1)
|
||||||
|
ls AppDir/usr/lib/libopentimelineio.so* || (echo "Missing libopentimelineio" && exit 1)
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
Reference in New Issue
Block a user