Update ffmpeg to 8.1

This commit is contained in:
Adrian Eddy
2026-03-20 02:51:47 +01:00
parent dc3b589464
commit f2a62a7f53
9 changed files with 1136 additions and 1136 deletions
+62 -62
View File
@@ -1,62 +1,62 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Gyroflow",
"request": "launch",
"preLaunchTask" : "Build Gyroflow (Release)",
"program": "${workspaceFolder}/target/release/gyroflow",
"windows": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/msvc2019_64/bin;${workspaceFolder}/ext/ffmpeg-8.0-windows-desktop-clang-gpl-lite/bin;${workspaceFolder}/ext/vcpkg/installed/x64-windows/bin"
}
],
},
"osx": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/macos/bin;${workspaceFolder}/ext/vcpkg/installed/arm64-osx/bin"
}
],
},
"cwd": "${workspaceFolder}",
"type":"cppvsdbg",
"console": "integratedTerminal",
},
{
"name": "Debug Gyroflow",
"request": "launch",
"preLaunchTask" : "Build Gyroflow (Debug)",
"program": "${workspaceFolder}/target/debug/gyroflow",
"windows": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/msvc2019_64/bin;${workspaceFolder}/ext/ffmpeg-8.0-windows-desktop-clang-gpl-lite/bin/x64;${workspaceFolder}/ext/vcpkg/installed/x64-windows/bin"
}
],
},
"osx": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/macos/bin;${workspaceFolder}/ext/vcpkg/installed/arm64-osx/bin"
}
],
},
"cwd": "${workspaceFolder}",
"type":"cppvsdbg",
"console": "integratedTerminal",
},
{
"name": "Attach to Gyroflow",
"type": "cppvsdbg",
"request": "attach",
"processName": "gyroflow.exe",
"console": "integratedTerminal",
}
]
}
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Gyroflow",
"request": "launch",
"preLaunchTask" : "Build Gyroflow (Release)",
"program": "${workspaceFolder}/target/release/gyroflow",
"windows": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/msvc2019_64/bin;${workspaceFolder}/ext/ffmpeg-8.1-windows-desktop-clang-gpl-lite/bin;${workspaceFolder}/ext/vcpkg/installed/x64-windows/bin"
}
],
},
"osx": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/macos/bin;${workspaceFolder}/ext/vcpkg/installed/arm64-osx/bin"
}
],
},
"cwd": "${workspaceFolder}",
"type":"cppvsdbg",
"console": "integratedTerminal",
},
{
"name": "Debug Gyroflow",
"request": "launch",
"preLaunchTask" : "Build Gyroflow (Debug)",
"program": "${workspaceFolder}/target/debug/gyroflow",
"windows": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/msvc2019_64/bin;${workspaceFolder}/ext/ffmpeg-8.1-windows-desktop-clang-gpl-lite/bin/x64;${workspaceFolder}/ext/vcpkg/installed/x64-windows/bin"
}
],
},
"osx": {
"environment": [
{
"name": "PATH",
"value": "${env:Path};${workspaceFolder}/ext/6.7.3/macos/bin;${workspaceFolder}/ext/vcpkg/installed/arm64-osx/bin"
}
],
},
"cwd": "${workspaceFolder}",
"type":"cppvsdbg",
"console": "integratedTerminal",
},
{
"name": "Attach to Gyroflow",
"type": "cppvsdbg",
"request": "attach",
"processName": "gyroflow.exe",
"console": "integratedTerminal",
}
]
}
Generated
+13 -13
View File
@@ -143,9 +143,9 @@ dependencies = [
[[package]]
name = "argh"
version = "0.1.15"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d32c2462e89541e6687e684d97310015d64a0627b61106fc472156a38f61cd1e"
checksum = "211818e820cda9ca6f167a64a5c808837366a6dfd807157c64c1304c486cd033"
dependencies = [
"argh_derive",
"argh_shared",
@@ -153,9 +153,9 @@ dependencies = [
[[package]]
name = "argh_derive"
version = "0.1.15"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccc2a031b364bd099fed016feb1ccfca2c3549d63c16f330cfc40b27b7692231"
checksum = "c442a9d18cef5dde467405d27d461d080d68972d6d0dfd0408265b6749ec427d"
dependencies = [
"argh_shared",
"proc-macro2",
@@ -165,9 +165,9 @@ dependencies = [
[[package]]
name = "argh_shared"
version = "0.1.15"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b9abea17ef74821d1d3490aee9e0749d731445d965b7512308b2aa00c90079e"
checksum = "e5ade012bac4db278517a0132c8c10c6427025868dca16c801087c28d5a411f1"
dependencies = [
"serde",
]
@@ -1314,9 +1314,9 @@ dependencies = [
[[package]]
name = "ffmpeg-next"
version = "8.0.0"
version = "8.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d658424d233cbd993a972dd73a66ca733acd12a494c68995c9ac32ae1fe65b40"
checksum = "f7c4bd5ab1ac61f29c634df1175d350ded29cf74c3c6d4f7030431a5ae3c7d5d"
dependencies = [
"bitflags 2.11.0",
"ffmpeg-sys-next",
@@ -1325,9 +1325,9 @@ dependencies = [
[[package]]
name = "ffmpeg-sys-next"
version = "8.0.1"
version = "8.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9bca20aa4ee774fe384c2490096c122b0b23cf524a9910add0686691003d797b"
checksum = "a314bc0e022a33a99567ed4bd2576bd58ffd8fcff7891c29194cfecc26a62547"
dependencies = [
"bindgen",
"cc",
@@ -3472,7 +3472,7 @@ dependencies = [
[[package]]
name = "qml-video-rs"
version = "0.1.0"
source = "git+https://github.com/AdrianEddy/qml-video-rs.git?rev=b1c18c3#b1c18c340ed9afce3abc80eee7d71f5a5bb147ee"
source = "git+https://github.com/AdrianEddy/qml-video-rs.git?rev=00c26ef#00c26effd3dfd24c4a7ec3acb024ed5c3163ef63"
dependencies = [
"cpp",
"cpp_build",
@@ -4284,9 +4284,9 @@ dependencies = [
[[package]]
name = "tar"
version = "0.4.44"
version = "0.4.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a"
checksum = "22692a6476a21fa75fdfc11d452fda482af402c008cdbaf3476414e122040973"
dependencies = [
"filetime",
"libc",
+4 -4
View File
@@ -45,7 +45,7 @@ flate2 = "1.1"
walkdir = "2.5.0"
mp4-merge = "0.1.10"
human-sort = "0.2.2"
argh = "0.1.15"
argh = "0.1.19"
indicatif = "0.18"
rustfft = "6.4.1"
crc32fast = "1.5.0"
@@ -54,10 +54,10 @@ filetime_creation = "0.2"
qmetaobject = { version = "0.2.10", default-features = false, features = ["log"] }
qttypes = { version = "0.2.12", default-features = false, features = ["required", "qtquick", "qtquickcontrols2"]}
qml-video-rs = { git = "https://github.com/AdrianEddy/qml-video-rs.git", rev = "b1c18c3" }
qml-video-rs = { git = "https://github.com/AdrianEddy/qml-video-rs.git", rev = "00c26ef" }
#qml-video-rs = { path = "../qml-video-rs" }
ffmpeg-next = { version = "8.0.0", default-features = false, features = ["codec", "filter", "format", "software-resampling", "software-scaling"] }
ffmpeg-next = { version = "8.1.0", default-features = false, features = ["codec", "filter", "format", "software-resampling", "software-scaling"] }
lazy_static = "1.5.0"
parking_lot = "0.12.5"
@@ -67,7 +67,7 @@ log = "0.4"
ureq = "3.2"
url = "2.5.7"
whoami = "2.1"
tar = "0.4.44"
tar = "0.4.45"
lru = "0.16"
chrono = "0.4"
+302 -302
View File
@@ -1,302 +1,302 @@
import 'common.just'
KeyStore := env_var_or_default("KEY_STORE_PATH", "")
KeyStoreAlias := env_var_or_default("KEY_STORE_ALIAS", "")
KeyStorePassword := env_var_or_default("KEY_STORE_PASS", "")
export ANDROID_NDK_HOME := env_var_or_default("ANDROID_NDK_HOME", "D:\\Programy\\Android\\sdk\\ndk\\android-ndk-r27d")
export ANDROID_SDK_ROOT := env_var_or_default("ANDROID_SDK_ROOT", "D:\\Programy\\Android\\sdk\\")
export JAVA_HOME := env_var_or_default("JAVA_HOME", "D:\\Programy\\Java\\jdk-20.0.2")
export BUILD_PROFILE := env_var_or_default("BUILD_PROFILE", "release") # use "deploy" for final apk
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
install-deps:
#!powershell
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
mkdir "{{ExtDir}}" -ErrorAction SilentlyContinue
cd {{ExtDir}}
$Python = "python";
if (Get-Command "python.exe" -ErrorAction SilentlyContinue) {
$Python = "python";
} elseif (Get-Command "python3.exe" -ErrorAction SilentlyContinue) {
$Python = "python3";
} else {
if (-not (Test-Path -Path "{{ExtDir}}/WPy64-310100b3")) {
echo "Downloading WinPython"
wget https://github.com/winpython/winpython/releases/download/6.1.20230227/Winpython64-3.10.10.0dotb3.exe -outfile "winpython.exe"
7z x -y winpython.exe
del winpython.exe
}
$Python = resolve-path "{{ExtDir}}\WPy64-310100b3\python-3.10.10.amd64\python.exe"
}
cargo install --git https://github.com/rust-mobile/cargo-apk.git cargo-apk
rustup target add aarch64-linux-android
# ――――――――――――――――――――――――――――――――――――――――― Qt ――――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "{{QtVersion}}/android_arm64_v8a")) {
echo "Downloading Qt {{QtVersion}} for Android"
& $Python -m pip install -U pip aqtinstall===3.2.0
& $Python -m aqt install-qt windows desktop {{QtVersion}} win64_mingw
& $Python -m aqt install-qt windows android {{QtVersion}} android_arm64_v8a
}
# ――――――――――――――――――――――――――――――――――――――――― Qt ――――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
$FFmpeg = "ffmpeg-8.0-android-gpl-lite"
if (-not (Test-Path -Path "$FFmpeg")) {
echo "Downloading $FFmpeg"
wget "https://master.dl.sourceforge.net/project/avbuild/android/$FFmpeg.tar.xz?viasf=1" -outfile "ffmpeg.tar.xz"
7z x -aoa ffmpeg.tar.xz
del ffmpeg.tar.xz
7z x -aoa ffmpeg.tar
del ffmpeg.tar
}
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― OpenCV ――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "OpenCV-android-sdk/")) {
echo "Downloading OpenCV for Android"
wget "https://github.com/opencv/opencv/releases/download/4.11.0/opencv-4.11.0-android-sdk.zip" -outfile "opencv.zip"
7z x -aoa opencv.zip
del opencv.zip
}
# ――――――――――――――――――――――――――――――――――――――― OpenCV ――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― LLVM ――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "{{LLVMPath}}\libclang.dll")) {
echo "Downloading LLVM"
wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/LLVM-19.1.7-win64.exe" -outfile "llvm-win64.exe"
7z x -y llvm-win64.exe -ollvm
del "llvm-win64.exe"
}
# ――――――――――――――――――――――――――――――――――――――― LLVM ――――――――――――――――――――――――――――――――――――――――
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#[no-cd]
#run *param:
# cargo run --release -- {{param}}
#
#[no-cd]
#debug *param:
# cargo run -- {{param}}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deployment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
deploy *param:
#!powershell
$ErrorActionPreference = 'Stop'
$ProjectDir = (resolve-path "{{ProjectDir}}").ToString()
cd $ProjectDir
$Env:CARGO_TARGET_DIR = "$ProjectDir\target"
$QT_LIBS = "$ProjectDir\ext\{{QtVersion}}\android_arm64_v8a\lib"
$Env:Path = "$ProjectDir\ext\{{QtVersion}}\android_arm64_v8a\bin;$ProjectDir\ext\{{QtVersion}}\mingw_64\bin\;$Env:Path"
$Env:QMAKE = "$ProjectDir\ext\{{QtVersion}}\android_arm64_v8a\bin\qmake.bat"
$Env:FFMPEG_DIR = "$ProjectDir\ext\ffmpeg-8.0-android-gpl-lite"
$Env:OPENCV_LINK_LIBS = "opencv_stitching,opencv_calib3d,opencv_features2d,opencv_imgproc,opencv_video,opencv_flann,opencv_core,tegra_hal,tbb,ittnotify,z,kleidicv,kleidicv_hal,kleidicv_thread"
$Env:OPENCV_LINK_PATHS = "$ProjectDir\ext\OpenCV-android-sdk\sdk\native\staticlibs\arm64-v8a,$ProjectDir\ext\OpenCV-android-sdk\sdk\native\3rdparty\libs\arm64-v8a"
$Env:OPENCV_INCLUDE_PATHS = "$ProjectDir\ext\OpenCV-android-sdk\sdk\native\jni\include"
$CLANG_LIB = $Env:LIBCLANG_PATH.replace('\', '/').replace('/bin', '/lib');
$NDK_REPLACED = $Env:ANDROID_NDK_HOME.replace('\', '/');
$SDK_REPLACED = $Env:ANDROID_SDK_ROOT.replace('\', '/');
$PROJECT_DIR_UNIX = $ProjectDir.replace('\', '/');
$Env:BINDGEN_EXTRA_CLANG_ARGS = "-I$CLANG_LIB/clang/16.0.0/include --sysroot=$NDK_REPLACED/toolchains/llvm/prebuilt/windows-x86_64/sysroot"
echo $Env:BINDGEN_EXTRA_CLANG_ARGS
if ("$Env:GITHUB_RUN_NUMBER") {
$manifest = Join-Path $ProjectDir "_deployment\android\AndroidManifest.xml"
$runNumber = $Env:GITHUB_RUN_NUMBER
[System.IO.File]::WriteAllText($manifest, [regex]::Replace([System.IO.File]::ReadAllText($manifest), 'versionCode="\d+"', "versionCode=""$runNumber"""))
}
Copy-Item -Path "$QT_LIBS\libQt6Core_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Core.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Gui_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Gui.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Widgets_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Widgets.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Quick_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Quick.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Qml_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Qml.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6QuickControls2_arm64-v8a.so" -Destination "$QT_LIBS\libQt6QuickControls2.so" -ErrorAction SilentlyContinue
# Make sure qmlimportscanner finds QtQuick.Effects
[System.IO.File]::WriteAllText("$ProjectDir\src\ui\components\Modal.qml", [System.IO.File]::ReadAllText("$ProjectDir\src\ui\components\Modal.qml").Replace("`n// import QtQuick.Effects", "`nimport QtQuick.Effects"))
# Replace [[bin]] with [lib]
[System.IO.File]::WriteAllText("$ProjectDir\Cargo.toml", [System.IO.File]::ReadAllText("$ProjectDir\Cargo.toml").Replace("[[bin]]", "[lib]`ncrate-type = [""cdylib""]"))
# Replace gradle version
[System.IO.File]::WriteAllText("$QT_LIBS\..\src\3rdparty\gradle\gradle\wrapper\gradle-wrapper.properties", [System.IO.File]::ReadAllText("$QT_LIBS\..\src\3rdparty\gradle\gradle\wrapper\gradle-wrapper.properties").Replace("gradle-8.3-bin", "gradle-8.6-bin"))
[System.IO.File]::WriteAllText("$QT_LIBS\..\src\android\templates\build.gradle", [System.IO.File]::ReadAllText("$QT_LIBS\..\src\android\templates\build.gradle").Replace("7.4.1", "8.4.2"))
cargo apk build --profile $Env:BUILD_PROFILE
# Restore [[bin]]
[System.IO.File]::WriteAllText("$ProjectDir\Cargo.toml", [System.IO.File]::ReadAllText("$ProjectDir\Cargo.toml").Replace("[lib]`ncrate-type = [""cdylib""]", "[[bin]]"))
mkdir "$ProjectDir\target\android-build" -ErrorAction SilentlyContinue
mkdir "$ProjectDir\target\android-build\libs" -ErrorAction SilentlyContinue
Copy-Item -Path "$ProjectDir\target\$Env:BUILD_PROFILE\apk\lib\*" -Destination "$ProjectDir\target\android-build\libs\" -Recurse -Force
# Copy-Item -Path "$ProjectDir\_deployment\android\src" -Destination "$ProjectDir\target\android-build\" -Recurse -Force
Copy-Item -Path "$ProjectDir\target\aarch64-linux-android\$Env:BUILD_PROFILE\libffmpeg.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\" -Force
# Copy-Item -Path "$ProjectDir\target\aarch64-linux-android\$Env:BUILD_PROFILE\libqtav-mediacodec.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\" -Force
Move-Item -Path "$ProjectDir\target\android-build\libs\arm64-v8a\libgyroflow.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\libgyroflow_arm64-v8a.so" -Force
$qtlibs = @(
"libQt6Core_arm64-v8a.so",
"libQt6Gui_arm64-v8a.so",
"libQt6LabsFolderListModel_arm64-v8a.so",
"libQt6Network_arm64-v8a.so",
"libQt6OpenGL_arm64-v8a.so",
"libQt6Qml_arm64-v8a.so",
"libQt6QmlLocalStorage_arm64-v8a.so",
"libQt6QmlModels_arm64-v8a.so",
"libQt6QmlWorkerScript_arm64-v8a.so",
"libQt6QmlXmlListModel_arm64-v8a.so",
"libQt6Quick_arm64-v8a.so",
"libQt6QuickControls2_arm64-v8a.so",
"libQt6QuickControls2Impl_arm64-v8a.so",
"libQt6QuickControls2Material_arm64-v8a.so",
"libQt6QuickControls2MaterialStyleImpl_arm64-v8a.so",
"libQt6QuickControls2Basic_arm64-v8a.so",
"libQt6QuickControls2BasicStyleImpl_arm64-v8a.so",
"libQt6QuickDialogs2_arm64-v8a.so",
"libQt6QuickDialogs2QuickImpl_arm64-v8a.so",
"libQt6QuickDialogs2Utils_arm64-v8a.so",
"libQt6QuickLayouts_arm64-v8a.so",
"libQt6QuickParticles_arm64-v8a.so",
"libQt6QuickShapes_arm64-v8a.so",
"libQt6QuickTemplates2_arm64-v8a.so",
"libQt6QuickEffects_arm64-v8a.so",
"libQt6Sql_arm64-v8a.so",
"libQt6Svg_arm64-v8a.so",
"libQt6Widgets_arm64-v8a.so",
"..\plugins\iconengines\libplugins_iconengines_qsvgicon_arm64-v8a.so",
"..\plugins\imageformats\libplugins_imageformats_qsvg_arm64-v8a.so",
"..\plugins\sqldrivers\libplugins_sqldrivers_qsqlite_arm64-v8a.so",
"..\qml\Qt\labs\folderlistmodel\libqml_Qt_labs_folderlistmodel_qmlfolderlistmodelplugin_arm64-v8a.so",
"..\qml\QtCore\libqml_QtCore_qtqmlcoreplugin_arm64-v8a.so",
"..\qml\QtQml\Base\libqml_QtQml_Base_qmlplugin_arm64-v8a.so",
"..\qml\QtQml\libqml_QtQml_qmlmetaplugin_arm64-v8a.so",
"..\qml\QtQml\Models\libqml_QtQml_Models_modelsplugin_arm64-v8a.so",
"..\qml\QtQml\WorkerScript\libqml_QtQml_WorkerScript_workerscriptplugin_arm64-v8a.so",
"..\qml\QtQml\XmlListModel\libqml_QtQml_XmlListModel_qmlxmllistmodelplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Basic\impl\libqml_QtQuick_Controls_Basic_impl_qtquickcontrols2basicstyleimplplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Basic\libqml_QtQuick_Controls_Basic_qtquickcontrols2basicstyleplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\impl\libqml_QtQuick_Controls_impl_qtquickcontrols2implplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\libqml_QtQuick_Controls_qtquickcontrols2plugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Material\impl\libqml_QtQuick_Controls_Material_impl_qtquickcontrols2materialstyleimplplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Material\libqml_QtQuick_Controls_Material_qtquickcontrols2materialstyleplugin_arm64-v8a.so",
"..\qml\QtQuick\Dialogs\libqml_QtQuick_Dialogs_qtquickdialogsplugin_arm64-v8a.so",
"..\qml\QtQuick\Dialogs\quickimpl\libqml_QtQuick_Dialogs_quickimpl_qtquickdialogs2quickimplplugin_arm64-v8a.so",
"..\qml\QtQuick\Effects\libqml_QtQuick_Effects_effectsplugin_arm64-v8a.so",
"..\qml\QtQuick\Layouts\libqml_QtQuick_Layouts_qquicklayoutsplugin_arm64-v8a.so",
"..\qml\QtQuick\libqml_QtQuick_qtquick2plugin_arm64-v8a.so",
"..\qml\QtQuick\LocalStorage\libqml_QtQuick_LocalStorage_qmllocalstorageplugin_arm64-v8a.so",
"..\qml\QtQuick\NativeStyle\libqml_QtQuick_NativeStyle_qtquickcontrols2nativestyleplugin_arm64-v8a.so",
"..\qml\QtQuick\Particles\libqml_QtQuick_Particles_particlesplugin_arm64-v8a.so",
"..\qml\QtQuick\Shapes\libqml_QtQuick_Shapes_qmlshapesplugin_arm64-v8a.so",
"..\qml\QtQuick\Templates\libqml_QtQuick_Templates_qtquicktemplates2plugin_arm64-v8a.so",
"..\qml\QtQuick\tooling\libqml_QtQuick_tooling_quicktoolingplugin_arm64-v8a.so",
"..\qml\QtQuick\Window\libqml_QtQuick_Window_quickwindowplugin_arm64-v8a.so"
);
foreach ($x in $qtlibs) {
Copy-Item -Path "$QT_LIBS\$x" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\" -Force -ErrorAction SilentlyContinue
}
# Strip all libs
. "$Env:ANDROID_NDK_HOME\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe" "$ProjectDir\target\android-build\libs\arm64-v8a\*.so"
# Copy unstripped libgyroflow.so
Copy-Item -Path "$ProjectDir\target\$Env:BUILD_PROFILE\apk\lib\arm64-v8a\libgyroflow.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\libgyroflow_arm64-v8a.so" -Force
$androiddeploy = @"
{
"description": "",
"qt": "$PROJECT_DIR_UNIX/ext/{{QtVersion}}/android_arm64_v8a",
"qtDataDirectory": ".",
"qtLibExecsDirectory": "libexec",
"qtLibsDirectory": "lib",
"qtPluginsDirectory": "plugins",
"qtQmlDirectory": "qml",
"sdk": "$SDK_REPLACED",
"sdkBuildToolsRevision": "35.0.0",
"ndk": "$NDK_REPLACED",
"toolchain-prefix": "llvm",
"tool-prefix": "llvm",
"ndk-host": "windows-x86_64",
"architectures": {"arm64-v8a":"aarch64-linux-android"},
"android-min-sdk-version": "26",
"android-package-source-directory": "$PROJECT_DIR_UNIX/_deployment/android",
"android-target-sdk-version": "35",
"qml-importscanner-binary": "$PROJECT_DIR_UNIX/ext/{{QtVersion}}/mingw_64/bin/qmlimportscanner.exe",
"rcc-binary": "$PROJECT_DIR_UNIX/ext/{{QtVersion}}/mingw_64/bin/rcc.exe",
"qml-root-path": "$PROJECT_DIR_UNIX/src",
"stdcpp-path": "$NDK_REPLACED/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib",
"qrcFiles": "",
"application-binary": "gyroflow"
}
"@
$androiddeploy | Out-File -encoding utf8 -FilePath "$ProjectDir\target\android-build\android-deploy.json"
$job = Start-Job -Name "Cleanup" -ArgumentList "$ProjectDir\target\android-build\libs\arm64-v8a" -ScriptBlock {
for ($num = 1; $num -le 800 ; $num++) {
try {
$c = [System.IO.File]::ReadAllText("${args}\..\..\res\values\libs.xml") -replace "<item.+?(Fusion|Imagine|Universal).+?item>", ""
[System.IO.File]::WriteAllText("${args}\..\..\res\values\libs.xml", $c)
Remove-Item "${args}\*Universal*"
Remove-Item "${args}\*Imagine*"
Remove-Item "${args}\*Fusion*"
Remove-Item "${args}\*Particles*"
Remove-Item "${args}\*tooling*"
Remove-Item "${args}\*qgif*"
Remove-Item "${args}\*qico*"
} catch {
}
Start-Sleep -Milliseconds 150;
}
}
Get-job | Receive-Job
$Sign = ""
$ApkName = "apk\debug\android-build-debug.apk"
if ("{{KeyStore}}" -and "{{KeyStoreAlias}}" -and "{{KeyStorePassword}}") {
$Sign = "--release --sign {{KeyStore}} {{KeyStoreAlias}} --storepass {{KeyStorePassword}}"
$ApkName = "apk\release\android-build-release-signed.apk"
}
$cmd = "androiddeployqt --input `"$ProjectDir\target\android-build\android-deploy.json`" --output `"$ProjectDir\target\android-build`" --deployment bundled $Sign --android-platform android-35 --jdk ${Env:JAVA_HOME} --gradle"
iex "$cmd"
if ("$Env:BUILD_APP_STORE_BUNDLE" -eq "true") {
iex "$cmd --aab"
}
[System.IO.File]::WriteAllText("$ProjectDir\src\ui\components\Modal.qml", [System.IO.File]::ReadAllText("$ProjectDir\src\ui\components\Modal.qml").Replace("`nimport QtQuick.Effects", "`n// import QtQuick.Effects"))
Stop-Job $job
New-Item -Type dir "$ProjectDir\_deployment\_binaries\" -ErrorAction SilentlyContinue
Copy-Item -Path "$ProjectDir\target\android-build\build\outputs\$ApkName" -Destination "$ProjectDir\_deployment\_binaries\Gyroflow.apk" -Force -ErrorAction SilentlyContinue
Copy-Item -Path "$ProjectDir\target\android-build\build\outputs\bundle\release\android-build-release.aab" -Destination "$ProjectDir\_deployment\_binaries\Gyroflow.aab" -Force -ErrorAction SilentlyContinue
if ("{{param}}" -eq "install") {
adb install "$ProjectDir\_deployment\_binaries\Gyroflow.apk"
adb logcat -c
adb shell am start -n xyz.gyroflow/xyz.gyroflow.MainActivity
adb logcat -s Gyroflow
}
import 'common.just'
KeyStore := env_var_or_default("KEY_STORE_PATH", "")
KeyStoreAlias := env_var_or_default("KEY_STORE_ALIAS", "")
KeyStorePassword := env_var_or_default("KEY_STORE_PASS", "")
export ANDROID_NDK_HOME := env_var_or_default("ANDROID_NDK_HOME", "D:\\Programy\\Android\\sdk\\ndk\\android-ndk-r27d")
export ANDROID_SDK_ROOT := env_var_or_default("ANDROID_SDK_ROOT", "D:\\Programy\\Android\\sdk\\")
export JAVA_HOME := env_var_or_default("JAVA_HOME", "D:\\Programy\\Java\\jdk-20.0.2")
export BUILD_PROFILE := env_var_or_default("BUILD_PROFILE", "release") # use "deploy" for final apk
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
install-deps:
#!powershell
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
mkdir "{{ExtDir}}" -ErrorAction SilentlyContinue
cd {{ExtDir}}
$Python = "python";
if (Get-Command "python.exe" -ErrorAction SilentlyContinue) {
$Python = "python";
} elseif (Get-Command "python3.exe" -ErrorAction SilentlyContinue) {
$Python = "python3";
} else {
if (-not (Test-Path -Path "{{ExtDir}}/WPy64-310100b3")) {
echo "Downloading WinPython"
wget https://github.com/winpython/winpython/releases/download/6.1.20230227/Winpython64-3.10.10.0dotb3.exe -outfile "winpython.exe"
7z x -y winpython.exe
del winpython.exe
}
$Python = resolve-path "{{ExtDir}}\WPy64-310100b3\python-3.10.10.amd64\python.exe"
}
cargo install --git https://github.com/rust-mobile/cargo-apk.git cargo-apk
rustup target add aarch64-linux-android
# ――――――――――――――――――――――――――――――――――――――――― Qt ――――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "{{QtVersion}}/android_arm64_v8a")) {
echo "Downloading Qt {{QtVersion}} for Android"
& $Python -m pip install -U pip aqtinstall===3.2.0
& $Python -m aqt install-qt windows desktop {{QtVersion}} win64_mingw
& $Python -m aqt install-qt windows android {{QtVersion}} android_arm64_v8a
}
# ――――――――――――――――――――――――――――――――――――――――― Qt ――――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
$FFmpeg = "ffmpeg-8.1-android-gpl-lite"
if (-not (Test-Path -Path "$FFmpeg")) {
echo "Downloading $FFmpeg"
wget "https://master.dl.sourceforge.net/project/avbuild/android/$FFmpeg.tar.xz?viasf=1" -outfile "ffmpeg.tar.xz"
7z x -aoa ffmpeg.tar.xz
del ffmpeg.tar.xz
7z x -aoa ffmpeg.tar
del ffmpeg.tar
}
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― OpenCV ――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "OpenCV-android-sdk/")) {
echo "Downloading OpenCV for Android"
wget "https://github.com/opencv/opencv/releases/download/4.11.0/opencv-4.11.0-android-sdk.zip" -outfile "opencv.zip"
7z x -aoa opencv.zip
del opencv.zip
}
# ――――――――――――――――――――――――――――――――――――――― OpenCV ――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― LLVM ――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "{{LLVMPath}}\libclang.dll")) {
echo "Downloading LLVM"
wget "https://github.com/llvm/llvm-project/releases/download/llvmorg-19.1.7/LLVM-19.1.7-win64.exe" -outfile "llvm-win64.exe"
7z x -y llvm-win64.exe -ollvm
del "llvm-win64.exe"
}
# ――――――――――――――――――――――――――――――――――――――― LLVM ――――――――――――――――――――――――――――――――――――――――
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#[no-cd]
#run *param:
# cargo run --release -- {{param}}
#
#[no-cd]
#debug *param:
# cargo run -- {{param}}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deployment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
deploy *param:
#!powershell
$ErrorActionPreference = 'Stop'
$ProjectDir = (resolve-path "{{ProjectDir}}").ToString()
cd $ProjectDir
$Env:CARGO_TARGET_DIR = "$ProjectDir\target"
$QT_LIBS = "$ProjectDir\ext\{{QtVersion}}\android_arm64_v8a\lib"
$Env:Path = "$ProjectDir\ext\{{QtVersion}}\android_arm64_v8a\bin;$ProjectDir\ext\{{QtVersion}}\mingw_64\bin\;$Env:Path"
$Env:QMAKE = "$ProjectDir\ext\{{QtVersion}}\android_arm64_v8a\bin\qmake.bat"
$Env:FFMPEG_DIR = "$ProjectDir\ext\ffmpeg-8.1-android-gpl-lite"
$Env:OPENCV_LINK_LIBS = "opencv_stitching,opencv_calib3d,opencv_features2d,opencv_imgproc,opencv_video,opencv_flann,opencv_core,tegra_hal,tbb,ittnotify,z,kleidicv,kleidicv_hal,kleidicv_thread"
$Env:OPENCV_LINK_PATHS = "$ProjectDir\ext\OpenCV-android-sdk\sdk\native\staticlibs\arm64-v8a,$ProjectDir\ext\OpenCV-android-sdk\sdk\native\3rdparty\libs\arm64-v8a"
$Env:OPENCV_INCLUDE_PATHS = "$ProjectDir\ext\OpenCV-android-sdk\sdk\native\jni\include"
$CLANG_LIB = $Env:LIBCLANG_PATH.replace('\', '/').replace('/bin', '/lib');
$NDK_REPLACED = $Env:ANDROID_NDK_HOME.replace('\', '/');
$SDK_REPLACED = $Env:ANDROID_SDK_ROOT.replace('\', '/');
$PROJECT_DIR_UNIX = $ProjectDir.replace('\', '/');
$Env:BINDGEN_EXTRA_CLANG_ARGS = "-I$CLANG_LIB/clang/16.0.0/include --sysroot=$NDK_REPLACED/toolchains/llvm/prebuilt/windows-x86_64/sysroot"
echo $Env:BINDGEN_EXTRA_CLANG_ARGS
if ("$Env:GITHUB_RUN_NUMBER") {
$manifest = Join-Path $ProjectDir "_deployment\android\AndroidManifest.xml"
$runNumber = $Env:GITHUB_RUN_NUMBER
[System.IO.File]::WriteAllText($manifest, [regex]::Replace([System.IO.File]::ReadAllText($manifest), 'versionCode="\d+"', "versionCode=""$runNumber"""))
}
Copy-Item -Path "$QT_LIBS\libQt6Core_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Core.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Gui_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Gui.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Widgets_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Widgets.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Quick_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Quick.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6Qml_arm64-v8a.so" -Destination "$QT_LIBS\libQt6Qml.so" -ErrorAction SilentlyContinue
Copy-Item -Path "$QT_LIBS\libQt6QuickControls2_arm64-v8a.so" -Destination "$QT_LIBS\libQt6QuickControls2.so" -ErrorAction SilentlyContinue
# Make sure qmlimportscanner finds QtQuick.Effects
[System.IO.File]::WriteAllText("$ProjectDir\src\ui\components\Modal.qml", [System.IO.File]::ReadAllText("$ProjectDir\src\ui\components\Modal.qml").Replace("`n// import QtQuick.Effects", "`nimport QtQuick.Effects"))
# Replace [[bin]] with [lib]
[System.IO.File]::WriteAllText("$ProjectDir\Cargo.toml", [System.IO.File]::ReadAllText("$ProjectDir\Cargo.toml").Replace("[[bin]]", "[lib]`ncrate-type = [""cdylib""]"))
# Replace gradle version
[System.IO.File]::WriteAllText("$QT_LIBS\..\src\3rdparty\gradle\gradle\wrapper\gradle-wrapper.properties", [System.IO.File]::ReadAllText("$QT_LIBS\..\src\3rdparty\gradle\gradle\wrapper\gradle-wrapper.properties").Replace("gradle-8.3-bin", "gradle-8.6-bin"))
[System.IO.File]::WriteAllText("$QT_LIBS\..\src\android\templates\build.gradle", [System.IO.File]::ReadAllText("$QT_LIBS\..\src\android\templates\build.gradle").Replace("7.4.1", "8.4.2"))
cargo apk build --profile $Env:BUILD_PROFILE
# Restore [[bin]]
[System.IO.File]::WriteAllText("$ProjectDir\Cargo.toml", [System.IO.File]::ReadAllText("$ProjectDir\Cargo.toml").Replace("[lib]`ncrate-type = [""cdylib""]", "[[bin]]"))
mkdir "$ProjectDir\target\android-build" -ErrorAction SilentlyContinue
mkdir "$ProjectDir\target\android-build\libs" -ErrorAction SilentlyContinue
Copy-Item -Path "$ProjectDir\target\$Env:BUILD_PROFILE\apk\lib\*" -Destination "$ProjectDir\target\android-build\libs\" -Recurse -Force
# Copy-Item -Path "$ProjectDir\_deployment\android\src" -Destination "$ProjectDir\target\android-build\" -Recurse -Force
Copy-Item -Path "$ProjectDir\target\aarch64-linux-android\$Env:BUILD_PROFILE\libffmpeg.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\" -Force
# Copy-Item -Path "$ProjectDir\target\aarch64-linux-android\$Env:BUILD_PROFILE\libqtav-mediacodec.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\" -Force
Move-Item -Path "$ProjectDir\target\android-build\libs\arm64-v8a\libgyroflow.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\libgyroflow_arm64-v8a.so" -Force
$qtlibs = @(
"libQt6Core_arm64-v8a.so",
"libQt6Gui_arm64-v8a.so",
"libQt6LabsFolderListModel_arm64-v8a.so",
"libQt6Network_arm64-v8a.so",
"libQt6OpenGL_arm64-v8a.so",
"libQt6Qml_arm64-v8a.so",
"libQt6QmlLocalStorage_arm64-v8a.so",
"libQt6QmlModels_arm64-v8a.so",
"libQt6QmlWorkerScript_arm64-v8a.so",
"libQt6QmlXmlListModel_arm64-v8a.so",
"libQt6Quick_arm64-v8a.so",
"libQt6QuickControls2_arm64-v8a.so",
"libQt6QuickControls2Impl_arm64-v8a.so",
"libQt6QuickControls2Material_arm64-v8a.so",
"libQt6QuickControls2MaterialStyleImpl_arm64-v8a.so",
"libQt6QuickControls2Basic_arm64-v8a.so",
"libQt6QuickControls2BasicStyleImpl_arm64-v8a.so",
"libQt6QuickDialogs2_arm64-v8a.so",
"libQt6QuickDialogs2QuickImpl_arm64-v8a.so",
"libQt6QuickDialogs2Utils_arm64-v8a.so",
"libQt6QuickLayouts_arm64-v8a.so",
"libQt6QuickParticles_arm64-v8a.so",
"libQt6QuickShapes_arm64-v8a.so",
"libQt6QuickTemplates2_arm64-v8a.so",
"libQt6QuickEffects_arm64-v8a.so",
"libQt6Sql_arm64-v8a.so",
"libQt6Svg_arm64-v8a.so",
"libQt6Widgets_arm64-v8a.so",
"..\plugins\iconengines\libplugins_iconengines_qsvgicon_arm64-v8a.so",
"..\plugins\imageformats\libplugins_imageformats_qsvg_arm64-v8a.so",
"..\plugins\sqldrivers\libplugins_sqldrivers_qsqlite_arm64-v8a.so",
"..\qml\Qt\labs\folderlistmodel\libqml_Qt_labs_folderlistmodel_qmlfolderlistmodelplugin_arm64-v8a.so",
"..\qml\QtCore\libqml_QtCore_qtqmlcoreplugin_arm64-v8a.so",
"..\qml\QtQml\Base\libqml_QtQml_Base_qmlplugin_arm64-v8a.so",
"..\qml\QtQml\libqml_QtQml_qmlmetaplugin_arm64-v8a.so",
"..\qml\QtQml\Models\libqml_QtQml_Models_modelsplugin_arm64-v8a.so",
"..\qml\QtQml\WorkerScript\libqml_QtQml_WorkerScript_workerscriptplugin_arm64-v8a.so",
"..\qml\QtQml\XmlListModel\libqml_QtQml_XmlListModel_qmlxmllistmodelplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Basic\impl\libqml_QtQuick_Controls_Basic_impl_qtquickcontrols2basicstyleimplplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Basic\libqml_QtQuick_Controls_Basic_qtquickcontrols2basicstyleplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\impl\libqml_QtQuick_Controls_impl_qtquickcontrols2implplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\libqml_QtQuick_Controls_qtquickcontrols2plugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Material\impl\libqml_QtQuick_Controls_Material_impl_qtquickcontrols2materialstyleimplplugin_arm64-v8a.so",
"..\qml\QtQuick\Controls\Material\libqml_QtQuick_Controls_Material_qtquickcontrols2materialstyleplugin_arm64-v8a.so",
"..\qml\QtQuick\Dialogs\libqml_QtQuick_Dialogs_qtquickdialogsplugin_arm64-v8a.so",
"..\qml\QtQuick\Dialogs\quickimpl\libqml_QtQuick_Dialogs_quickimpl_qtquickdialogs2quickimplplugin_arm64-v8a.so",
"..\qml\QtQuick\Effects\libqml_QtQuick_Effects_effectsplugin_arm64-v8a.so",
"..\qml\QtQuick\Layouts\libqml_QtQuick_Layouts_qquicklayoutsplugin_arm64-v8a.so",
"..\qml\QtQuick\libqml_QtQuick_qtquick2plugin_arm64-v8a.so",
"..\qml\QtQuick\LocalStorage\libqml_QtQuick_LocalStorage_qmllocalstorageplugin_arm64-v8a.so",
"..\qml\QtQuick\NativeStyle\libqml_QtQuick_NativeStyle_qtquickcontrols2nativestyleplugin_arm64-v8a.so",
"..\qml\QtQuick\Particles\libqml_QtQuick_Particles_particlesplugin_arm64-v8a.so",
"..\qml\QtQuick\Shapes\libqml_QtQuick_Shapes_qmlshapesplugin_arm64-v8a.so",
"..\qml\QtQuick\Templates\libqml_QtQuick_Templates_qtquicktemplates2plugin_arm64-v8a.so",
"..\qml\QtQuick\tooling\libqml_QtQuick_tooling_quicktoolingplugin_arm64-v8a.so",
"..\qml\QtQuick\Window\libqml_QtQuick_Window_quickwindowplugin_arm64-v8a.so"
);
foreach ($x in $qtlibs) {
Copy-Item -Path "$QT_LIBS\$x" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\" -Force -ErrorAction SilentlyContinue
}
# Strip all libs
. "$Env:ANDROID_NDK_HOME\toolchains\llvm\prebuilt\windows-x86_64\bin\llvm-strip.exe" "$ProjectDir\target\android-build\libs\arm64-v8a\*.so"
# Copy unstripped libgyroflow.so
Copy-Item -Path "$ProjectDir\target\$Env:BUILD_PROFILE\apk\lib\arm64-v8a\libgyroflow.so" -Destination "$ProjectDir\target\android-build\libs\arm64-v8a\libgyroflow_arm64-v8a.so" -Force
$androiddeploy = @"
{
"description": "",
"qt": "$PROJECT_DIR_UNIX/ext/{{QtVersion}}/android_arm64_v8a",
"qtDataDirectory": ".",
"qtLibExecsDirectory": "libexec",
"qtLibsDirectory": "lib",
"qtPluginsDirectory": "plugins",
"qtQmlDirectory": "qml",
"sdk": "$SDK_REPLACED",
"sdkBuildToolsRevision": "36.0.0",
"ndk": "$NDK_REPLACED",
"toolchain-prefix": "llvm",
"tool-prefix": "llvm",
"ndk-host": "windows-x86_64",
"architectures": {"arm64-v8a":"aarch64-linux-android"},
"android-min-sdk-version": "26",
"android-package-source-directory": "$PROJECT_DIR_UNIX/_deployment/android",
"android-target-sdk-version": "36",
"qml-importscanner-binary": "$PROJECT_DIR_UNIX/ext/{{QtVersion}}/mingw_64/bin/qmlimportscanner.exe",
"rcc-binary": "$PROJECT_DIR_UNIX/ext/{{QtVersion}}/mingw_64/bin/rcc.exe",
"qml-root-path": "$PROJECT_DIR_UNIX/src",
"stdcpp-path": "$NDK_REPLACED/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/lib",
"qrcFiles": "",
"application-binary": "gyroflow"
}
"@
$androiddeploy | Out-File -encoding utf8 -FilePath "$ProjectDir\target\android-build\android-deploy.json"
$job = Start-Job -Name "Cleanup" -ArgumentList "$ProjectDir\target\android-build\libs\arm64-v8a" -ScriptBlock {
for ($num = 1; $num -le 800 ; $num++) {
try {
$c = [System.IO.File]::ReadAllText("${args}\..\..\res\values\libs.xml") -replace "<item.+?(Fusion|Imagine|Universal).+?item>", ""
[System.IO.File]::WriteAllText("${args}\..\..\res\values\libs.xml", $c)
Remove-Item "${args}\*Universal*"
Remove-Item "${args}\*Imagine*"
Remove-Item "${args}\*Fusion*"
Remove-Item "${args}\*Particles*"
Remove-Item "${args}\*tooling*"
Remove-Item "${args}\*qgif*"
Remove-Item "${args}\*qico*"
} catch {
}
Start-Sleep -Milliseconds 150;
}
}
Get-job | Receive-Job
$Sign = ""
$ApkName = "apk\debug\android-build-debug.apk"
if ("{{KeyStore}}" -and "{{KeyStoreAlias}}" -and "{{KeyStorePassword}}") {
$Sign = "--release --sign {{KeyStore}} {{KeyStoreAlias}} --storepass {{KeyStorePassword}}"
$ApkName = "apk\release\android-build-release-signed.apk"
}
$cmd = "androiddeployqt --input `"$ProjectDir\target\android-build\android-deploy.json`" --output `"$ProjectDir\target\android-build`" --deployment bundled $Sign --android-platform android-36 --jdk ${Env:JAVA_HOME} --gradle"
iex "$cmd"
if ("$Env:BUILD_APP_STORE_BUNDLE" -eq "true") {
iex "$cmd --aab"
}
[System.IO.File]::WriteAllText("$ProjectDir\src\ui\components\Modal.qml", [System.IO.File]::ReadAllText("$ProjectDir\src\ui\components\Modal.qml").Replace("`nimport QtQuick.Effects", "`n// import QtQuick.Effects"))
Stop-Job $job
New-Item -Type dir "$ProjectDir\_deployment\_binaries\" -ErrorAction SilentlyContinue
Copy-Item -Path "$ProjectDir\target\android-build\build\outputs\$ApkName" -Destination "$ProjectDir\_deployment\_binaries\Gyroflow.apk" -Force -ErrorAction SilentlyContinue
Copy-Item -Path "$ProjectDir\target\android-build\build\outputs\bundle\release\android-build-release.aab" -Destination "$ProjectDir\_deployment\_binaries\Gyroflow.aab" -Force -ErrorAction SilentlyContinue
if ("{{param}}" -eq "install") {
adb install "$ProjectDir\_deployment\_binaries\Gyroflow.apk"
adb logcat -c
adb shell am start -n xyz.gyroflow/xyz.gyroflow.MainActivity
adb logcat -s Gyroflow
}
+2 -2
View File
@@ -20,10 +20,10 @@ export QMAKE := env_var_or_default("QMAKE", if path_exists(QtPath / "qmake.bat")
# ――――――――――――――――――――――――――――――――――――――――― Qt ――――――――――――――――――――――――――――――――――――――――――
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
FFmpeg := if os() == "windows" { "ffmpeg-8.0-windows-desktop-clang-gpl-lite"
FFmpeg := if os() == "windows" { "ffmpeg-8.1-windows-desktop-vs2026-gpl-lite"
} else if os() + Arch == "macosaarch64" { "ffmpeg-arm64"
} else if os() + Arch == "macosx86_64" { "ffmpeg-x86_64"
} else { "ffmpeg-8.0-linux-clang-gpl-lite" }
} else { "ffmpeg-8.1-linux-clang-gpl-lite" }
export FFMPEG_DIR := ProjectDir / "ext" / FFmpeg
export FFMPEG_ARCH := if Arch == "aarch64" { "arm64" } else { if os() == "windows" { "x64" } else { "amd64" } }
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
+312 -312
View File
@@ -1,312 +1,312 @@
import 'common.just'
# Important! For development/debugging the provisioning profile needs to be "Development"
# For distribution - it needs to be a distribution provisioning profile.
# Make sure to unlock the keychain if using ssh: security -v unlock-keychain -p 1234 login.keychain
# To list available certificates: security find-identity -v -p codesigning
TeamID := "RR3ZC2L4DF"
BundleIdentifier := "xyz.gyroflow"
DevelopmentCertificateSHA := "612D010FA5522A25CE1F1D5A38B84DCD2798704B"
DevelopmentProvisioning := ProjectDir / "_deployment/ios/Gyroflow_dev.mobileprovision"
DevelopmentProvisioningName := "Gyroflow dev"
DistributionCertificateSHA := "05AC9B1B232615B6DBE1FECD5A02AC21BBE967A9"
DistributionProvisioning := ProjectDir / "_deployment/ios/Gyroflow_dist.mobileprovision"
DistributionProvisioningName := "Gyroflow dist"
AppBundle := ProjectDir / "_deployment/_binaries/ios/Payload/Gyroflow.app"
QtVersionIOS := "6.7.3"
IPHONESDK := `xcode-select -p` + "/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
export BINDGEN_EXTRA_CLANG_ARGS_aarch64_apple_ios := "--target=arm64-apple-ios -arch arm64 -miphoneos-version-min=14 -isysroot " + IPHONESDK
export CFLAGS_aarch64_apple_darwin := "-mmacosx-version-min=10.15"
export IPHONEOS_DEPLOYMENT_TARGET := "14.0"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
install-deps:
#!/bin/bash
set -e
brew install p7zip pkg-config ios-deploy
brew list python &>/dev/null || brew install python
rustup target add aarch64-apple-ios
xcode-select --install || true
xcodebuild -runFirstLaunch
xcodebuild -downloadPlatform iOS || true
export DYLD_FALLBACK_LIBRARY_PATH=""
#export MACOSX_DEPLOYMENT_TARGET=""
mkdir -p {{ExtDir}}
cd {{ExtDir}}
# Install vcpkg
git clone --depth 1 https://github.com/Microsoft/vcpkg.git || true
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
if [ ! -d "{{ExtDir}}/{{QtVersionIOS}}/ios" ] || [ ! -d "{{ExtDir}}/{{QtVersionIOS}}/macos" ]; then
echo "Setting up python venv in {{ExtDir}}/venv"
python3 -m venv "{{ExtDir}}/venv"
source "{{ExtDir}}/venv/bin/activate"
# Install Qt
python3 -m pip install -U pip aqtinstall
python3 -m aqt install-qt mac desktop {{QtVersionIOS}}
python3 -m aqt install-qt mac ios {{QtVersionIOS}}
# Replace the Qt Quick Dialogs file with a patch to fix the file selection bug
rm -f {{ExtDir}}/{{QtVersionIOS}}/ios/lib/libQt6QuickDialogs2.a
curl -L https://api.gyroflow.xyz/sdk/Qt-ios-{{QtVersionIOS}}-libQt6QuickDialogs2.a -o {{ExtDir}}/{{QtVersionIOS}}/ios/lib/libQt6QuickDialogs2.a
fi
if [ ! -f "{{ExtDir}}/vcpkg/installed/arm64-ios/lib/libopencv_core4.a" ]; then
echo "Installing OpenCV from vcpkg"
# Install OpenCV
./vcpkg/vcpkg install "flatbuffers:arm64-ios" --cmake-args=-DVCPKG_BUILD_TYPE=release
./vcpkg/vcpkg install "opencv4[core,calib3d,thread,intrinsics]:arm64-ios" --cmake-args=-DVCPKG_BUILD_TYPE=release
rm -rf ./vcpkg/buildtrees
rm -rf ./vcpkg/downloads
fi
if [ ! -d "ffmpeg-8.0-iOS-gpl-lite" ]; then
echo "Downloading ffmpeg for iOS"
# Download and extract ffmpeg
curl -L https://sourceforge.net/projects/avbuild/files/iOS/ffmpeg-8.0-iOS-gpl-lite.tar.xz/download -o ffmpeg.tar.xz
7z x -aoa ffmpeg.tar.xz
tar -xf ffmpeg.tar
rm ffmpeg.tar ffmpeg.tar.xz
fi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
run:
#!/bin/bash
just -f {{justfile()}} build-and-package release development
ios-deploy --bundle {{AppBundle}} -d -W
[no-cd]
debug:
#!/bin/bash
just -f {{justfile()}} build-and-package debug development
ios-deploy --bundle {{AppBundle}} --debug
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deployment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
build-and-package profile is_dist:
#!/bin/bash
set -e
rm -rf {{ProjectDir}}/_deployment/_binaries/ios/
rm -f {{ProjectDir}}/target/aarch64-apple-ios/{{profile}}/gyroflow
mkdir -p {{AppBundle}}
export FFMPEG_DIR="{{ProjectDir}}/ext/ffmpeg-8.0-iOS-gpl-lite"
export PATH="{{ProjectDir}}/ext/{{QtVersionIOS}}/ios/bin:/usr/libexec/:$PATH"
export QMAKE="{{ProjectDir}}/ext/{{QtVersionIOS}}/ios/bin/qmake"
export OPENCV_LINK_LIBS="opencv_core4,opencv_calib3d4,opencv_features2d4,opencv_imgproc4,opencv_video4,opencv_flann4,opencv_stitching4"
export OPENCV_LINK_PATHS={{ProjectDir}}/ext/vcpkg/installed/arm64-ios/lib
export OPENCV_INCLUDE_PATHS={{ProjectDir}}/ext/vcpkg/installed/arm64-ios/include/opencv4/
if [ "{{profile}}" == "debug" ]; then
cargo build --target aarch64-apple-ios
else
cargo build --target aarch64-apple-ios --profile {{profile}}
fi
if [ -z "$SIGN_KEY" ] && [ -z "$PROVISIONING_PROFILE" ]; then
if [ "{{is_dist}}" == "distribution" ]; then
SIGN_KEY="{{DistributionCertificateSHA}}"
PROVISIONING_PROFILE="{{DistributionProvisioning}}"
else
SIGN_KEY="{{DevelopmentCertificateSHA}}"
PROVISIONING_PROFILE="{{DevelopmentProvisioning}}"
fi
fi
if [ -f "{{ProjectDir}}/target/aarch64-apple-ios/{{profile}}/gyroflow" ]; then
cp -f {{ProjectDir}}/target/aarch64-apple-ios/{{profile}}/gyroflow {{AppBundle}}/gyroflow
cp -rf {{ProjectDir}}/target/aarch64-apple-ios/Frameworks {{AppBundle}}/Frameworks
cp -rf {{ProjectDir}}/_deployment/ios/Info.plist {{AppBundle}}/Info.plist
cp -rf {{ProjectDir}}/_deployment/ios/PrivacyInfo.xcprivacy {{AppBundle}}/PrivacyInfo.xcprivacy
cp -rf {{ProjectDir}}/_deployment/ios/PkgInfo {{AppBundle}}/PkgInfo
PlistBuddy -x -c "Set :CFBundleIdentifier {{BundleIdentifier}}" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Set :CFBundleShortVersionString {{ProjectVersion}}" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Set :CFBundleVersion {{ProjectVersion}}" {{AppBundle}}/Info.plist
if ! [ -z "$GITHUB_RUN_NUMBER" ]; then
PlistBuddy -x -c "Set :CFBundleVersion \"{{ProjectVersion}}.$GITHUB_RUN_NUMBER\"" {{AppBundle}}/Info.plist
fi
PATCH_NUM="0"
if [ "$IS_MANUAL_DISPATCH" == "true" ]; then
PATCH_NUM="1"
fi
PlistBuddy -x -c "Set :CFBundleShortVersionString \"`echo "{{ProjectVersion}}" | sed -E 's/[^0-9\.]//' | sed -E 's/\.([0-9]+)$/\1/'`.$PATCH_NUM\"" {{AppBundle}}/Info.plist
ICON={{ProjectDir}}/resources/icon_1080.png
ICON_OUT={{ProjectDir}}/_deployment/ios/Resources/Images.xcassets/AppIcon.appiconset
sips -z 40 40 $ICON --out $ICON_OUT/AppIcon-20@2x.png
sips -z 40 40 $ICON --out $ICON_OUT/AppIcon-20@2x~ipad.png
sips -z 60 60 $ICON --out $ICON_OUT/AppIcon-20@3x.png
sips -z 20 20 $ICON --out $ICON_OUT/AppIcon-20~ipad.png
sips -z 29 29 $ICON --out $ICON_OUT/AppIcon-29.png
sips -z 58 58 $ICON --out $ICON_OUT/AppIcon-29@2x.png
sips -z 58 58 $ICON --out $ICON_OUT/AppIcon-29@2x~ipad.png
sips -z 87 87 $ICON --out $ICON_OUT/AppIcon-29@3x.png
sips -z 29 29 $ICON --out $ICON_OUT/AppIcon-29~ipad.png
sips -z 80 80 $ICON --out $ICON_OUT/AppIcon-40@2x.png
sips -z 80 80 $ICON --out $ICON_OUT/AppIcon-40@2x~ipad.png
sips -z 120 120 $ICON --out $ICON_OUT/AppIcon-40@3x.png
sips -z 40 40 $ICON --out $ICON_OUT/AppIcon-40~ipad.png
sips -z 120 120 $ICON --out $ICON_OUT/AppIcon-60@2x~car.png
sips -z 180 180 $ICON --out $ICON_OUT/AppIcon-60@3x~car.png
sips -z 167 167 $ICON --out $ICON_OUT/AppIcon-83.5@2x~ipad.png
sips -z 120 120 $ICON --out $ICON_OUT/AppIcon@2x.png
sips -z 152 152 $ICON --out $ICON_OUT/AppIcon@2x~ipad.png
sips -z 180 180 $ICON --out $ICON_OUT/AppIcon@3x.png
sips -z 1024 1024 $ICON --out $ICON_OUT/AppIcon~ios-marketing.png
sips -z 76 76 $ICON --out $ICON_OUT/AppIcon~ipad.png
DEFAULT_iOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
PlistBuddy -x -c "Add :BuildMachineOSBuild string `sw_vers -buildVersion`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTCompiler string `defaults read $(xcode-select -p)/../info DTCompiler`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTPlatformBuild string `xcrun --sdk iphoneos --show-sdk-build-version`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTPlatformName string iphoneos" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTPlatformVersion string $DEFAULT_iOS_SDK_VERSION" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTSDKBuild string `xcrun --sdk iphoneos --show-sdk-build-version`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTSDKName string iphoneos$DEFAULT_iOS_SDK_VERSION" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTXcode string `defaults read $(xcode-select -p)/../info DTXcode`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTXcodeBuild string `xcodebuild -version | grep 'Build version' | sed 's/^Build version //'`" {{AppBundle}}/Info.plist
cat {{AppBundle}}/Info.plist
# Bundle BRAW SDK
FrameworksDir={{AppBundle}}/Frameworks
if [ ! -f "$FrameworksDir/BlackmagicRawAPI.framework/Versions/A/BlackmagicRawAPI" ]; then
curl -L https://api.gyroflow.xyz/sdk/Blackmagic_RAW_SDK_iOS_5.0.0.tar.gz -o tmp.tar.gz
7z x -aoa tmp.tar.gz
7z x -o"$FrameworksDir/" tmp.tar
rm tmp.tar tmp.tar.gz
fi
chmod -R 0755 $FrameworksDir/*
# Generate entitlements
PlistBuddy -x -c "Add :application-identifier string {{TeamID}}.{{BundleIdentifier}}" {{AppBundle}}/../../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.developer.team-identifier string {{TeamID}}" {{AppBundle}}/../../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.developer.kernel.increased-memory-limit bool true" {{AppBundle}}/../../entitlements.xcent
if [ "{{is_dist}}" == "distribution" ]; then
PlistBuddy -x -c "Add :get-task-allow bool false" {{AppBundle}}/../../entitlements.xcent
else
PlistBuddy -x -c "Add :get-task-allow bool true" {{AppBundle}}/../../entitlements.xcent
fi
PlistBuddy -x -c "Add :keychain-access-groups array" {{AppBundle}}/../../entitlements.xcent
PlistBuddy -x -c "Add :keychain-access-groups:0 string {{TeamID}}.{{BundleIdentifier}}" {{AppBundle}}/../../entitlements.xcent
actool {{ProjectDir}}/_deployment/ios/Resources/Images.xcassets --compile {{AppBundle}} --platform iphoneos --minimum-deployment-target 15 --app-icon AppIcon --output-partial-info-plist {{AppBundle}}/../../AppIcon.plist
ibtool --errors --warnings --notices --module gyroflow --target-device iphone --target-device ipad --minimum-deployment-target 14.0 --output-format human-readable-text --auto-activate-custom-fonts --compilation-directory {{AppBundle}}/../../ {{ProjectDir}}/_deployment/ios/LaunchScreen.storyboard
ibtool --errors --warnings --notices --module gyroflow --target-device iphone --target-device ipad --minimum-deployment-target 14.0 --output-format human-readable-text --link {{AppBundle}} {{AppBundle}}/../../LaunchScreen.storyboardc
cp -f "$PROVISIONING_PROFILE" {{AppBundle}}/embedded.mobileprovision
#derq query -f xml -i {{ProjectDir}}/_deployment/ios/Entitlements.plist -o {{AppBundle}}/../../Gyroflow.app.xcent.der --raw
dsymutil {{AppBundle}}/gyroflow -o {{AppBundle}}/../../../Gyroflow.app.dSYM
mkdir -p {{AppBundle}}/../../Symbols
xcrun symbols -noTextInSOD -noDaemon -arch all -symbolsPackageDir {{AppBundle}}/../../Symbols {{AppBundle}}/../../../Gyroflow.app.dSYM
rm -rf {{AppBundle}}/../../../Gyroflow.app.dSYM
codesign -vvvv --force --generate-entitlement-der --preserve-metadata=identifier,flags,runtime --sign $SIGN_KEY {{AppBundle}}/Frameworks/*.framework
codesign -vvvv --force --generate-entitlement-der --preserve-metadata=identifier,flags,runtime --sign $SIGN_KEY --entitlements {{AppBundle}}/../../entitlements.xcent {{AppBundle}}
codesign -vvvv --deep --strict --verify {{AppBundle}}
fi
[no-cd]
deploy *param:
#!/bin/bash
set -e
export PATH="/usr/libexec/:$PATH"
just -f {{justfile()}} build-and-package deploy distribution
pushd {{AppBundle}}/../../
zip -r ../Gyroflow.ipa Payload Symbols
popd
ios-deploy --bundle {{AppBundle}}
# ---------------------- XCode archive way ----------------------
# This shouldn't be normally needed, but if anything changes in the build process in the future, it's more "official" way
if false; then
if true; then
SIGN_KEY="{{DistributionCertificateSHA}}"
PROVISIONING_PROFILE="{{DistributionProvisioningName}}"
else
SIGN_KEY="{{DevelopmentCertificateSHA}}"
PROVISIONING_PROFILE="{{DevelopmentProvisioningName}}"
fi
# For app store
TYPE="app-store"
# For ad-hoc
TYPE="developer-id"
mkdir -p {{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive/Products/Applications
cp -rf {{AppBundle}} {{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive/Products/Applications/
# Build Archive.plist
ARCHIVE_PLIST={{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive/Info.plist
PlistBuddy -x -c "Add :ApplicationProperties dict" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:ApplicationPath string Applications/Gyroflow.app" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:Architectures array" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:Architectures:0 string arm64" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:CFBundleIdentifier string {{BundleIdentifier}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:CFBundleShortVersionString string {{ProjectVersion}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:CFBundleVersion string {{ProjectVersion}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:Team string {{TeamID}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ArchiveVersion integer 2" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :CreationDate date \"`date +'%c'`\"" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :Name string Gyroflow" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :SchemeName string Gyroflow" $ARCHIVE_PLIST
# Build Export.plist
PlistBuddy -x -c "Add :method string $TYPE" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :teamID string {{TeamID}}" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :signingCertificate string $SIGN_KEY" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :uploadSymbols bool true" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :provisioningProfiles dict" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :provisioningProfiles:{{BundleIdentifier}} string $PROVISIONING_PROFILE" {{AppBundle}}/../../Export.plist
xcodebuild -sdk iphoneos -exportArchive -archivePath {{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive -exportPath {{AppBundle}}/../out/Payload -exportOptionsPlist {{AppBundle}}/../../Export.plist
pushd {{AppBundle}}/../out/
rm -f ../Gyroflow.ipa
rm -f Payload/*.plist
rm -f Payload/*.log
zip -r ../Gyroflow.ipa Payload Symbols
popd
ios-deploy --bundle {{AppBundle}}/../out/Payload/Gyroflow.app
fi
# ---------------------- XCode archive way ----------------------
[no-cd]
build-ipa:
#!/bin/bash
set -e
export PATH="/usr/libexec/:$PATH"
just -f {{justfile()}} build-and-package deploy distribution
pushd {{AppBundle}}/../../
zip -r ../Gyroflow.ipa Payload Symbols
popd
import 'common.just'
# Important! For development/debugging the provisioning profile needs to be "Development"
# For distribution - it needs to be a distribution provisioning profile.
# Make sure to unlock the keychain if using ssh: security -v unlock-keychain -p 1234 login.keychain
# To list available certificates: security find-identity -v -p codesigning
TeamID := "RR3ZC2L4DF"
BundleIdentifier := "xyz.gyroflow"
DevelopmentCertificateSHA := "612D010FA5522A25CE1F1D5A38B84DCD2798704B"
DevelopmentProvisioning := ProjectDir / "_deployment/ios/Gyroflow_dev.mobileprovision"
DevelopmentProvisioningName := "Gyroflow dev"
DistributionCertificateSHA := "05AC9B1B232615B6DBE1FECD5A02AC21BBE967A9"
DistributionProvisioning := ProjectDir / "_deployment/ios/Gyroflow_dist.mobileprovision"
DistributionProvisioningName := "Gyroflow dist"
AppBundle := ProjectDir / "_deployment/_binaries/ios/Payload/Gyroflow.app"
QtVersionIOS := "6.7.3"
IPHONESDK := `xcode-select -p` + "/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk"
export BINDGEN_EXTRA_CLANG_ARGS_aarch64_apple_ios := "--target=arm64-apple-ios -arch arm64 -miphoneos-version-min=14 -isysroot " + IPHONESDK
export CFLAGS_aarch64_apple_darwin := "-mmacosx-version-min=10.15"
export IPHONEOS_DEPLOYMENT_TARGET := "14.0"
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
install-deps:
#!/bin/bash
set -e
brew install p7zip pkg-config ios-deploy
brew list python &>/dev/null || brew install python
rustup target add aarch64-apple-ios
xcode-select --install || true
xcodebuild -runFirstLaunch
xcodebuild -downloadPlatform iOS || true
export DYLD_FALLBACK_LIBRARY_PATH=""
#export MACOSX_DEPLOYMENT_TARGET=""
mkdir -p {{ExtDir}}
cd {{ExtDir}}
# Install vcpkg
git clone --depth 1 https://github.com/Microsoft/vcpkg.git || true
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
if [ ! -d "{{ExtDir}}/{{QtVersionIOS}}/ios" ] || [ ! -d "{{ExtDir}}/{{QtVersionIOS}}/macos" ]; then
echo "Setting up python venv in {{ExtDir}}/venv"
python3 -m venv "{{ExtDir}}/venv"
source "{{ExtDir}}/venv/bin/activate"
# Install Qt
python3 -m pip install -U pip aqtinstall
python3 -m aqt install-qt mac desktop {{QtVersionIOS}}
python3 -m aqt install-qt mac ios {{QtVersionIOS}}
# Replace the Qt Quick Dialogs file with a patch to fix the file selection bug
rm -f {{ExtDir}}/{{QtVersionIOS}}/ios/lib/libQt6QuickDialogs2.a
curl -L https://api.gyroflow.xyz/sdk/Qt-ios-{{QtVersionIOS}}-libQt6QuickDialogs2.a -o {{ExtDir}}/{{QtVersionIOS}}/ios/lib/libQt6QuickDialogs2.a
fi
if [ ! -f "{{ExtDir}}/vcpkg/installed/arm64-ios/lib/libopencv_core4.a" ]; then
echo "Installing OpenCV from vcpkg"
# Install OpenCV
./vcpkg/vcpkg install "flatbuffers:arm64-ios" --cmake-args=-DVCPKG_BUILD_TYPE=release
./vcpkg/vcpkg install "opencv4[core,calib3d,thread,intrinsics]:arm64-ios" --cmake-args=-DVCPKG_BUILD_TYPE=release
rm -rf ./vcpkg/buildtrees
rm -rf ./vcpkg/downloads
fi
if [ ! -d "ffmpeg-8.1-iOS-gpl-lite" ]; then
echo "Downloading ffmpeg for iOS"
# Download and extract ffmpeg
curl -L https://sourceforge.net/projects/avbuild/files/iOS/ffmpeg-8.1-iOS-gpl-lite.tar.xz/download -o ffmpeg.tar.xz
7z x -aoa ffmpeg.tar.xz
tar -xf ffmpeg.tar
rm ffmpeg.tar ffmpeg.tar.xz
fi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
run:
#!/bin/bash
just -f {{justfile()}} build-and-package release development
ios-deploy --bundle {{AppBundle}} -d -W
[no-cd]
debug:
#!/bin/bash
just -f {{justfile()}} build-and-package debug development
ios-deploy --bundle {{AppBundle}} --debug
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deployment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
build-and-package profile is_dist:
#!/bin/bash
set -e
rm -rf {{ProjectDir}}/_deployment/_binaries/ios/
rm -f {{ProjectDir}}/target/aarch64-apple-ios/{{profile}}/gyroflow
mkdir -p {{AppBundle}}
export FFMPEG_DIR="{{ProjectDir}}/ext/ffmpeg-8.1-iOS-gpl-lite"
export PATH="{{ProjectDir}}/ext/{{QtVersionIOS}}/ios/bin:/usr/libexec/:$PATH"
export QMAKE="{{ProjectDir}}/ext/{{QtVersionIOS}}/ios/bin/qmake"
export OPENCV_LINK_LIBS="opencv_core4,opencv_calib3d4,opencv_features2d4,opencv_imgproc4,opencv_video4,opencv_flann4,opencv_stitching4"
export OPENCV_LINK_PATHS={{ProjectDir}}/ext/vcpkg/installed/arm64-ios/lib
export OPENCV_INCLUDE_PATHS={{ProjectDir}}/ext/vcpkg/installed/arm64-ios/include/opencv4/
if [ "{{profile}}" == "debug" ]; then
cargo build --target aarch64-apple-ios
else
cargo build --target aarch64-apple-ios --profile {{profile}}
fi
if [ -z "$SIGN_KEY" ] && [ -z "$PROVISIONING_PROFILE" ]; then
if [ "{{is_dist}}" == "distribution" ]; then
SIGN_KEY="{{DistributionCertificateSHA}}"
PROVISIONING_PROFILE="{{DistributionProvisioning}}"
else
SIGN_KEY="{{DevelopmentCertificateSHA}}"
PROVISIONING_PROFILE="{{DevelopmentProvisioning}}"
fi
fi
if [ -f "{{ProjectDir}}/target/aarch64-apple-ios/{{profile}}/gyroflow" ]; then
cp -f {{ProjectDir}}/target/aarch64-apple-ios/{{profile}}/gyroflow {{AppBundle}}/gyroflow
cp -rf {{ProjectDir}}/target/aarch64-apple-ios/Frameworks {{AppBundle}}/Frameworks
cp -rf {{ProjectDir}}/_deployment/ios/Info.plist {{AppBundle}}/Info.plist
cp -rf {{ProjectDir}}/_deployment/ios/PrivacyInfo.xcprivacy {{AppBundle}}/PrivacyInfo.xcprivacy
cp -rf {{ProjectDir}}/_deployment/ios/PkgInfo {{AppBundle}}/PkgInfo
PlistBuddy -x -c "Set :CFBundleIdentifier {{BundleIdentifier}}" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Set :CFBundleShortVersionString {{ProjectVersion}}" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Set :CFBundleVersion {{ProjectVersion}}" {{AppBundle}}/Info.plist
if ! [ -z "$GITHUB_RUN_NUMBER" ]; then
PlistBuddy -x -c "Set :CFBundleVersion \"{{ProjectVersion}}.$GITHUB_RUN_NUMBER\"" {{AppBundle}}/Info.plist
fi
PATCH_NUM="0"
if [ "$IS_MANUAL_DISPATCH" == "true" ]; then
PATCH_NUM="1"
fi
PlistBuddy -x -c "Set :CFBundleShortVersionString \"`echo "{{ProjectVersion}}" | sed -E 's/[^0-9\.]//' | sed -E 's/\.([0-9]+)$/\1/'`.$PATCH_NUM\"" {{AppBundle}}/Info.plist
ICON={{ProjectDir}}/resources/icon_1080.png
ICON_OUT={{ProjectDir}}/_deployment/ios/Resources/Images.xcassets/AppIcon.appiconset
sips -z 40 40 $ICON --out $ICON_OUT/AppIcon-20@2x.png
sips -z 40 40 $ICON --out $ICON_OUT/AppIcon-20@2x~ipad.png
sips -z 60 60 $ICON --out $ICON_OUT/AppIcon-20@3x.png
sips -z 20 20 $ICON --out $ICON_OUT/AppIcon-20~ipad.png
sips -z 29 29 $ICON --out $ICON_OUT/AppIcon-29.png
sips -z 58 58 $ICON --out $ICON_OUT/AppIcon-29@2x.png
sips -z 58 58 $ICON --out $ICON_OUT/AppIcon-29@2x~ipad.png
sips -z 87 87 $ICON --out $ICON_OUT/AppIcon-29@3x.png
sips -z 29 29 $ICON --out $ICON_OUT/AppIcon-29~ipad.png
sips -z 80 80 $ICON --out $ICON_OUT/AppIcon-40@2x.png
sips -z 80 80 $ICON --out $ICON_OUT/AppIcon-40@2x~ipad.png
sips -z 120 120 $ICON --out $ICON_OUT/AppIcon-40@3x.png
sips -z 40 40 $ICON --out $ICON_OUT/AppIcon-40~ipad.png
sips -z 120 120 $ICON --out $ICON_OUT/AppIcon-60@2x~car.png
sips -z 180 180 $ICON --out $ICON_OUT/AppIcon-60@3x~car.png
sips -z 167 167 $ICON --out $ICON_OUT/AppIcon-83.5@2x~ipad.png
sips -z 120 120 $ICON --out $ICON_OUT/AppIcon@2x.png
sips -z 152 152 $ICON --out $ICON_OUT/AppIcon@2x~ipad.png
sips -z 180 180 $ICON --out $ICON_OUT/AppIcon@3x.png
sips -z 1024 1024 $ICON --out $ICON_OUT/AppIcon~ios-marketing.png
sips -z 76 76 $ICON --out $ICON_OUT/AppIcon~ipad.png
DEFAULT_iOS_SDK_VERSION=`xcrun --sdk iphoneos --show-sdk-version`
PlistBuddy -x -c "Add :BuildMachineOSBuild string `sw_vers -buildVersion`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTCompiler string `defaults read $(xcode-select -p)/../info DTCompiler`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTPlatformBuild string `xcrun --sdk iphoneos --show-sdk-build-version`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTPlatformName string iphoneos" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTPlatformVersion string $DEFAULT_iOS_SDK_VERSION" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTSDKBuild string `xcrun --sdk iphoneos --show-sdk-build-version`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTSDKName string iphoneos$DEFAULT_iOS_SDK_VERSION" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTXcode string `defaults read $(xcode-select -p)/../info DTXcode`" {{AppBundle}}/Info.plist
PlistBuddy -x -c "Add :DTXcodeBuild string `xcodebuild -version | grep 'Build version' | sed 's/^Build version //'`" {{AppBundle}}/Info.plist
cat {{AppBundle}}/Info.plist
# Bundle BRAW SDK
FrameworksDir={{AppBundle}}/Frameworks
if [ ! -f "$FrameworksDir/BlackmagicRawAPI.framework/Versions/A/BlackmagicRawAPI" ]; then
curl -L https://api.gyroflow.xyz/sdk/Blackmagic_RAW_SDK_iOS_5.0.0.tar.gz -o tmp.tar.gz
7z x -aoa tmp.tar.gz
7z x -o"$FrameworksDir/" tmp.tar
rm tmp.tar tmp.tar.gz
fi
chmod -R 0755 $FrameworksDir/*
# Generate entitlements
PlistBuddy -x -c "Add :application-identifier string {{TeamID}}.{{BundleIdentifier}}" {{AppBundle}}/../../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.developer.team-identifier string {{TeamID}}" {{AppBundle}}/../../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.developer.kernel.increased-memory-limit bool true" {{AppBundle}}/../../entitlements.xcent
if [ "{{is_dist}}" == "distribution" ]; then
PlistBuddy -x -c "Add :get-task-allow bool false" {{AppBundle}}/../../entitlements.xcent
else
PlistBuddy -x -c "Add :get-task-allow bool true" {{AppBundle}}/../../entitlements.xcent
fi
PlistBuddy -x -c "Add :keychain-access-groups array" {{AppBundle}}/../../entitlements.xcent
PlistBuddy -x -c "Add :keychain-access-groups:0 string {{TeamID}}.{{BundleIdentifier}}" {{AppBundle}}/../../entitlements.xcent
actool {{ProjectDir}}/_deployment/ios/Resources/Images.xcassets --compile {{AppBundle}} --platform iphoneos --minimum-deployment-target 15 --app-icon AppIcon --output-partial-info-plist {{AppBundle}}/../../AppIcon.plist
ibtool --errors --warnings --notices --module gyroflow --target-device iphone --target-device ipad --minimum-deployment-target 14.0 --output-format human-readable-text --auto-activate-custom-fonts --compilation-directory {{AppBundle}}/../../ {{ProjectDir}}/_deployment/ios/LaunchScreen.storyboard
ibtool --errors --warnings --notices --module gyroflow --target-device iphone --target-device ipad --minimum-deployment-target 14.0 --output-format human-readable-text --link {{AppBundle}} {{AppBundle}}/../../LaunchScreen.storyboardc
cp -f "$PROVISIONING_PROFILE" {{AppBundle}}/embedded.mobileprovision
#derq query -f xml -i {{ProjectDir}}/_deployment/ios/Entitlements.plist -o {{AppBundle}}/../../Gyroflow.app.xcent.der --raw
dsymutil {{AppBundle}}/gyroflow -o {{AppBundle}}/../../../Gyroflow.app.dSYM
mkdir -p {{AppBundle}}/../../Symbols
xcrun symbols -noTextInSOD -noDaemon -arch all -symbolsPackageDir {{AppBundle}}/../../Symbols {{AppBundle}}/../../../Gyroflow.app.dSYM
rm -rf {{AppBundle}}/../../../Gyroflow.app.dSYM
codesign -vvvv --force --generate-entitlement-der --preserve-metadata=identifier,flags,runtime --sign $SIGN_KEY {{AppBundle}}/Frameworks/*.framework
codesign -vvvv --force --generate-entitlement-der --preserve-metadata=identifier,flags,runtime --sign $SIGN_KEY --entitlements {{AppBundle}}/../../entitlements.xcent {{AppBundle}}
codesign -vvvv --deep --strict --verify {{AppBundle}}
fi
[no-cd]
deploy *param:
#!/bin/bash
set -e
export PATH="/usr/libexec/:$PATH"
just -f {{justfile()}} build-and-package deploy distribution
pushd {{AppBundle}}/../../
zip -r ../Gyroflow.ipa Payload Symbols
popd
ios-deploy --bundle {{AppBundle}}
# ---------------------- XCode archive way ----------------------
# This shouldn't be normally needed, but if anything changes in the build process in the future, it's more "official" way
if false; then
if true; then
SIGN_KEY="{{DistributionCertificateSHA}}"
PROVISIONING_PROFILE="{{DistributionProvisioningName}}"
else
SIGN_KEY="{{DevelopmentCertificateSHA}}"
PROVISIONING_PROFILE="{{DevelopmentProvisioningName}}"
fi
# For app store
TYPE="app-store"
# For ad-hoc
TYPE="developer-id"
mkdir -p {{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive/Products/Applications
cp -rf {{AppBundle}} {{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive/Products/Applications/
# Build Archive.plist
ARCHIVE_PLIST={{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive/Info.plist
PlistBuddy -x -c "Add :ApplicationProperties dict" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:ApplicationPath string Applications/Gyroflow.app" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:Architectures array" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:Architectures:0 string arm64" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:CFBundleIdentifier string {{BundleIdentifier}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:CFBundleShortVersionString string {{ProjectVersion}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:CFBundleVersion string {{ProjectVersion}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ApplicationProperties:Team string {{TeamID}}" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :ArchiveVersion integer 2" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :CreationDate date \"`date +'%c'`\"" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :Name string Gyroflow" $ARCHIVE_PLIST
PlistBuddy -x -c "Add :SchemeName string Gyroflow" $ARCHIVE_PLIST
# Build Export.plist
PlistBuddy -x -c "Add :method string $TYPE" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :teamID string {{TeamID}}" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :signingCertificate string $SIGN_KEY" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :uploadSymbols bool true" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :provisioningProfiles dict" {{AppBundle}}/../../Export.plist
PlistBuddy -x -c "Add :provisioningProfiles:{{BundleIdentifier}} string $PROVISIONING_PROFILE" {{AppBundle}}/../../Export.plist
xcodebuild -sdk iphoneos -exportArchive -archivePath {{ProjectDir}}/_deployment/_binaries/ios/Gyroflow.xcarchive -exportPath {{AppBundle}}/../out/Payload -exportOptionsPlist {{AppBundle}}/../../Export.plist
pushd {{AppBundle}}/../out/
rm -f ../Gyroflow.ipa
rm -f Payload/*.plist
rm -f Payload/*.log
zip -r ../Gyroflow.ipa Payload Symbols
popd
ios-deploy --bundle {{AppBundle}}/../out/Payload/Gyroflow.app
fi
# ---------------------- XCode archive way ----------------------
[no-cd]
build-ipa:
#!/bin/bash
set -e
export PATH="/usr/libexec/:$PATH"
just -f {{justfile()}} build-and-package deploy distribution
pushd {{AppBundle}}/../../
zip -r ../Gyroflow.ipa Payload Symbols
popd
+436 -436
View File
@@ -1,436 +1,436 @@
import 'common.just'
TeamID := "RR3ZC2L4DF"
BundleIdentifier := "xyz.gyroflow"
DistributionCertificateSHA := "05AC9B1B232615B6DBE1FECD5A02AC21BBE967A9"
DistributionMacInstallerSHA := "67FDE536BC3BEBDB68E1224CF5DB17B8EB936F49"
DistributionProvisioning := ProjectDir / "_deployment/mac/Gyroflow_mac_app_store.provisionprofile"
# For local sandbox testing:
# DistributionCertificateSHA := "D125BE70B690030172EB74A828C10C1AE77FDE9A"
# DistributionProvisioning := ProjectDir / "_deployment/mac/Gyroflow_mac_developer_id.provisionprofile"
AppBundle := ProjectDir / "_deployment/_binaries/mac/Gyroflow.app"
export CPATH := if os() == "macos" {
if path_exists(`xcode-select --print-path` + "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include") == "true" {
`xcode-select --print-path` + "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
} else {
env_var_or_default("CPATH", "")
}
} else {
env_var_or_default("CPATH", "")
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
install-deps:
#!/bin/bash
set -e
brew install p7zip pkg-config flatbuffers
brew list python &>/dev/null || brew install python
xcode-select --install || true
mkdir -p {{ExtDir}}
cd {{ExtDir}}
# Install vcpkg
git clone --depth 1 https://github.com/Microsoft/vcpkg.git || true
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
if [ ! -d "{{ExtDir}}/{{QtVersion}}" ]; then
echo "Setting up python venv in {{ExtDir}}/venv"
python3 -m venv "{{ExtDir}}/venv"
source "{{ExtDir}}/venv/bin/activate"
# Install Qt
echo "Installing Qt"
python3 -m pip install -U pip aqtinstall
python3 -m aqt install-qt mac desktop {{QtVersion}}
fi
if [ ! -f "{{OpenCVPath}}/lib/libopencv_core4.a" ]; then
echo "Installing OpenCV from vcpkg"
# Install OpenCV
./vcpkg/vcpkg install "opencv4[core,calib3d,thread,intrinsics]:x64-osx" --cmake-args=-DVCPKG_BUILD_TYPE=release
./vcpkg/vcpkg install "opencv4[core,calib3d,thread,intrinsics]:arm64-osx" --cmake-args=-DVCPKG_BUILD_TYPE=release
rm -rf ./vcpkg/buildtrees
rm -rf ./vcpkg/downloads
fi
if [ ! -d "{{FFmpeg}}" ]; then
echo "Downloading ffmpeg"
# Download and extract ffmpeg
curl -L https://sourceforge.net/projects/avbuild/files/macOS/ffmpeg-8.0-macOS-gpl-lite.tar.xz/download -o ffmpeg.tar.xz
7z x -aoa ffmpeg.tar.xz
tar -xf ffmpeg.tar
rm ffmpeg.tar ffmpeg.tar.xz
mkdir -p ffmpeg-x86_64/lib
mkdir -p ffmpeg-arm64/lib
cd ffmpeg-8.0-macOS-gpl-lite
lipo lib/libavcodec.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavcodec.a
lipo lib/libavformat.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavformat.a
lipo lib/libavdevice.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavdevice.a
lipo lib/libavfilter.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavfilter.a
lipo lib/libavutil.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavutil.a
lipo lib/libswresample.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libswresample.a
lipo lib/libswscale.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libswscale.a
lipo lib/libx264.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libx264.a
lipo lib/libx265.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libx265.a
lipo lib/libavcodec.a -thin arm64 -output ../ffmpeg-arm64/lib/libavcodec.a
lipo lib/libavformat.a -thin arm64 -output ../ffmpeg-arm64/lib/libavformat.a
lipo lib/libavdevice.a -thin arm64 -output ../ffmpeg-arm64/lib/libavdevice.a
lipo lib/libavfilter.a -thin arm64 -output ../ffmpeg-arm64/lib/libavfilter.a
lipo lib/libavutil.a -thin arm64 -output ../ffmpeg-arm64/lib/libavutil.a
lipo lib/libswresample.a -thin arm64 -output ../ffmpeg-arm64/lib/libswresample.a
lipo lib/libswscale.a -thin arm64 -output ../ffmpeg-arm64/lib/libswscale.a
lipo lib/libx264.a -thin arm64 -output ../ffmpeg-arm64/lib/libx264.a
lipo lib/libx265.a -thin arm64 -output ../ffmpeg-arm64/lib/libx265.a
cp -R include ../ffmpeg-x86_64/include
cp -R include ../ffmpeg-arm64/include
fi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
build *param:
cargo build --release -- {{param}}
[no-cd]
build-debug *param:
cargo build -- {{param}}
[no-cd]
run *param:
cargo run --release -- {{param}}
[no-cd]
test *param:
cargo test -- {{param}}
[no-cd]
debug *param:
cargo run -- {{param}}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deployment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
deploy *param:
#!/bin/bash
set -e
: "${PROJECT_DIR:=$(cd "{{ProjectDir}}"; pwd -P)}"
: "${CARGO_TARGET:=$PROJECT_DIR/target/release}"
: "${QT_DIR:=$PROJECT_DIR/ext/{{QtVersion}}/macos}"
: "${OPENCV_DIR:=$PROJECT_DIR/ext/vcpkg/installed}"
rm -rf "$PROJECT_DIR/_deployment/_binaries/mac"
if [ "{{param}}" == "local" ]; then
pushd $PROJECT_DIR
cargo build --profile deploy
popd
fi
if [ "{{param}}" == "universal" ]; then
pushd $PROJECT_DIR
export PATH="$PROJECT_DIR/ext/{{QtVersion}}/macos/bin:$PATH"
export OPENCV_LINK_LIBS="opencv_core4,opencv_calib3d4,opencv_features2d4,opencv_imgproc4,opencv_video4,opencv_flann4,opencv_stitching4"
#export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/usr/lib/"
export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/lib/"
#export LD_LIBRARY_PATH="$PROJECT_DIR/ext/{{QtVersion}}/macos/lib"
export MACOSX_DEPLOYMENT_TARGET="10.15"
export FFMPEG_DIR=$PROJECT_DIR/ext/ffmpeg-x86_64
export OPENCV_LINK_PATHS=$OPENCV_DIR/x64-osx/lib
export OPENCV_INCLUDE_PATHS=$OPENCV_DIR/x64-osx/include/opencv4/
rustup target add x86_64-apple-darwin
cargo build --target x86_64-apple-darwin --profile deploy
#strip $PROJECT_DIR/target/x86_64-apple-darwin/deploy/gyroflow
export FFMPEG_DIR=$PROJECT_DIR/ext/ffmpeg-arm64
export OPENCV_LINK_PATHS=$OPENCV_DIR/arm64-osx/lib
export OPENCV_INCLUDE_PATHS=$OPENCV_DIR/arm64-osx/include/opencv4/
export MACOSX_DEPLOYMENT_TARGET="11.0"
rustup target add aarch64-apple-darwin
cargo build --target aarch64-apple-darwin --profile deploy
#strip $PROJECT_DIR/target/aarch64-apple-darwin/deploy/gyroflow
lipo $PROJECT_DIR/target/{x86_64,aarch64}-apple-darwin/deploy/gyroflow -create -output $PROJECT_DIR/target/deploy/gyroflow
popd
fi
ICON=$PROJECT_DIR/resources/icon_1024_mac.png
ICON_OUT=$PROJECT_DIR/_deployment/mac/Gyroflow.app/Contents/Resources/Images.xcassets/AppIcon.appiconset
sips -z 16 16 $ICON --out $ICON_OUT/icon_16x16.png
sips -z 32 32 $ICON --out $ICON_OUT/icon_16x16@2x.png
sips -z 32 32 $ICON --out $ICON_OUT/icon_32x32.png
sips -z 64 64 $ICON --out $ICON_OUT/icon_32x32@2x.png
sips -z 128 128 $ICON --out $ICON_OUT/icon_128x128.png
sips -z 256 256 $ICON --out $ICON_OUT/icon_128x128@2x.png
sips -z 256 256 $ICON --out $ICON_OUT/icon_256x256.png
sips -z 512 512 $ICON --out $ICON_OUT/icon_256x256@2x.png
sips -z 512 512 $ICON --out $ICON_OUT/icon_512x512.png
sips -z 1024 1024 $ICON --out $ICON_OUT/icon_512x512@2x.png
mkdir -p $ICON_OUT/../AppIcon.iconset/
cp -f $ICON_OUT/*.png $ICON_OUT/../AppIcon.iconset/
iconutil -c icns $ICON_OUT/../AppIcon.iconset --output $PROJECT_DIR/_deployment/mac/Gyroflow.app/Contents/Resources/AppIcon.icns
rm -rf $ICON_OUT/../AppIcon.iconset
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
mkdir -p "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/camera_presets/"
CARGO_TARGET="$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS"
cp -Rf "$PROJECT_DIR/_deployment/mac/Gyroflow.app" "$PROJECT_DIR/_deployment/_binaries/mac/"
cp -f "$PROJECT_DIR/target/deploy/gyroflow" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/"
strip "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/gyroflow"
cp -Rf "$PROJECT_DIR/target/Frameworks/mdk.framework" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/" || true
cp -Rf "$PROJECT_DIR/target/x86_64-apple-darwin/Frameworks/mdk.framework" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/"
# cp -Rf "$PROJECT_DIR/resources/camera_presets" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/"
# rm -rf "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/camera_presets/.git"
cp -f "$PROJECT_DIR/resources/camera_presets/profiles.cbor.gz" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/camera_presets/profiles.cbor.gz"
fi
cp -af "$QT_DIR/lib/QtCore.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtDBus.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtGui.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtNetwork.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtOpenGL.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQml.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQmlCore.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQmlModels.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQmlWorkerScript.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuick.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickControls2.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickControls2Impl.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickControls2Basic.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickControls2BasicStyleImpl.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickControls2Material.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickControls2MaterialStyleImpl.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickDialogs2.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickDialogs2QuickImpl.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickDialogs2Utils.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickEffects.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickTemplates2.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickLayouts.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtSvg.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtWidgets.framework" "$CARGO_TARGET/../Frameworks/"
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
CARGO_TARGET="$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/qml"
fi
mkdir -p "$CARGO_TARGET/QtCore/"
mkdir -p "$CARGO_TARGET/QtQml/Base/"
mkdir -p "$CARGO_TARGET/QtQml/Models/"
mkdir -p "$CARGO_TARGET/QtQml/WorkerScript/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/impl/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/macOS/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/Basic/impl/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
mkdir -p "$CARGO_TARGET/QtQuick/Layouts/"
mkdir -p "$CARGO_TARGET/QtQuick/Effects/"
mkdir -p "$CARGO_TARGET/QtQuick/Window/"
mkdir -p "$CARGO_TARGET/QtQuick/Templates/"
mkdir -p "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/qml/+Material/"
cp -f $QT_DIR/qml/QtCore/qmldir "$CARGO_TARGET/QtCore/"
cp -f $QT_DIR/qml/QtCore/libqtqmlcoreplugin.dylib "$CARGO_TARGET/QtCore/"
cp -f $QT_DIR/qml/QtQml/qmldir "$CARGO_TARGET/QtQml/"
cp -f $QT_DIR/qml/QtQml/libqmlplugin.dylib "$CARGO_TARGET/QtQml/" || true
cp -f $QT_DIR/qml/QtQml/libqmlmetaplugin.dylib "$CARGO_TARGET/QtQml/" || true
cp -f $QT_DIR/qml/QtQml/Base/libqmlplugin.dylib "$CARGO_TARGET/QtQml/Base/" || true
cp -f $QT_DIR/qml/QtQml/Base/qmldir "$CARGO_TARGET/QtQml/Base/" || true
cp -f $QT_DIR/qml/QtQml/Models/libmodelsplugin.dylib "$CARGO_TARGET/QtQml/Models/"
cp -f $QT_DIR/qml/QtQml/Models/qmldir "$CARGO_TARGET/QtQml/Models/"
cp -f $QT_DIR/qml/QtQml/WorkerScript/libworkerscriptplugin.dylib "$CARGO_TARGET/QtQml/WorkerScript/"
cp -f $QT_DIR/qml/QtQml/WorkerScript/qmldir "$CARGO_TARGET/QtQml/WorkerScript/"
cp -f $QT_DIR/qml/QtQuick/qmldir "$CARGO_TARGET/QtQuick"
cp -f $QT_DIR/qml/QtQuick/Controls/impl/qmldir "$CARGO_TARGET/QtQuick/Controls/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/impl/libqtquickcontrols2implplugin.dylib "$CARGO_TARGET/QtQuick/Controls/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/qmldir "$CARGO_TARGET/QtQuick/Controls/"
cp -f $QT_DIR/qml/QtQuick/Controls/macOS/*.qml "$CARGO_TARGET/QtQuick/Controls/macOS/"
cp -f $QT_DIR/qml/QtQuick/Controls/macOS/qmldir "$CARGO_TARGET/QtQuick/Controls/macOS/"
cp -f $QT_DIR/qml/QtQuick/Controls/macOS/libqtquickcontrols2macosstyleplugin.dylib "$CARGO_TARGET/QtQuick/Controls/macOS/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/*.qml "$CARGO_TARGET/QtQuick/Controls/Basic/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/impl/qmldir "$CARGO_TARGET/QtQuick/Controls/Basic/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/impl/libqtquickcontrols2basicstyleimplplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Basic/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/qmldir "$CARGO_TARGET/QtQuick/Controls/Basic/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Basic/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/impl/*.qml "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/impl/qmldir "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/impl/libqtquickcontrols2materialstyleimplplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/*.qml "$CARGO_TARGET/QtQuick/Controls/Material/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/qmldir "$CARGO_TARGET/QtQuick/Controls/Material/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Material/"
cp -f $QT_DIR/qml/QtQuick/Controls/libqtquickcontrols2plugin.dylib "$CARGO_TARGET/QtQuick/Controls/"
cp -f $QT_DIR/qml/QtQuick/Layouts/qmldir "$CARGO_TARGET/QtQuick/Layouts/"
cp -f $QT_DIR/qml/QtQuick/Layouts/libqquicklayoutsplugin.dylib "$CARGO_TARGET/QtQuick/Layouts/"
cp -f $QT_DIR/qml/QtQuick/libqtquick2plugin.dylib "$CARGO_TARGET/QtQuick/"
cp -f $QT_DIR/qml/QtQuick/Window/qmldir "$CARGO_TARGET/QtQuick/Window/"
cp -f $QT_DIR/qml/QtQuick/Window/libquickwindowplugin.dylib "$CARGO_TARGET/QtQuick/Window/"
cp -f $QT_DIR/qml/QtQuick/Templates/qmldir "$CARGO_TARGET/QtQuick/Templates/"
cp -f $QT_DIR/qml/QtQuick/Templates/libqtquicktemplates2plugin.dylib "$CARGO_TARGET/QtQuick/Templates/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/qmldir "$CARGO_TARGET/QtQuick/Dialogs/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/libqtquickdialogsplugin.dylib "$CARGO_TARGET/QtQuick/Dialogs/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/qmldir "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/qml/*.qml "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/qml/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/qml/+Material/*.qml "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/qml/+Material/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/libqtquickdialogs2quickimplplugin.dylib "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/"
cp -f $QT_DIR/qml/QtQuick/Effects/libeffectsplugin.dylib "$CARGO_TARGET/QtQuick/Effects/" || true
cp -f $QT_DIR/qml/QtQuick/Effects/qmldir "$CARGO_TARGET/QtQuick/Effects/" || true
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
CARGO_TARGET="$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/PlugIns"
fi
mkdir -p "$CARGO_TARGET/iconengines/"
mkdir -p "$CARGO_TARGET/imageformats/"
mkdir -p "$CARGO_TARGET/platforms/"
cp -f $QT_DIR/plugins/iconengines/libqsvgicon.dylib "$CARGO_TARGET/iconengines/"
cp -f $QT_DIR/plugins/imageformats/libqsvg.dylib "$CARGO_TARGET/imageformats/"
cp -f $QT_DIR/plugins/imageformats/libqjpeg.dylib "$CARGO_TARGET/imageformats/"
cp -f $QT_DIR/plugins/platforms/libqcocoa.dylib "$CARGO_TARGET/platforms/"
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
xattr -c $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Info.plist
xattr -c $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/AppIcon.icns
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/.empty
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/PlugIns/.empty
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/.empty
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/mdk.framework/Versions/A/libass.dylib
if [ "$SIGNING_FINGERPRINT" != "" ]; then
# Certificate needs to be "Developer ID Application"
find $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents \( -name "*.dylib" -or -path "*/Versions/A/*" \) -and ! \( \
-path "*/Headers/*" -or -path "*/A/Resources/*" -or -name "CodeResources" -or -name "module.modulemap" \) -type f | sort | xargs -r \
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/gyroflow
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app
codesign -vvvv --deep --verify $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app
fi
if [ -z "$DONT_BUILD_DMG" ]; then
ln -sf /Applications "$PROJECT_DIR/_deployment/_binaries/mac/Applications"
for i in 1 2 3 4 5 6 7 8 9 10
do
sudo mdutil -a -i off
sudo pkill -9 XProtect >/dev/null || true
while pgrep XProtect; do sleep 3; done;
hdiutil create "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg" -volname "Gyroflow v{{ProjectVersion}}" -fs HFS+ -srcfolder "$PROJECT_DIR/_deployment/_binaries/mac/" -ov -format UDZO -imagekey zlib-level=9 || true
if [ -f "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg" ]; then
break
fi
done
if [ "$SIGNING_FINGERPRINT" != "" ]; then
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg"
codesign -vvvv --deep --verify "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg"
fi
fi
fi
[no-cd]
bundle *param:
#!/bin/bash
set -e
: "${PROJECT_DIR:=$(cd "{{ProjectDir}}"; pwd -P)}"
export PATH="/usr/libexec/:$PATH"
cp -f "$PROJECT_DIR/_deployment/mac/Gyroflow.app/Contents/Info.plist" {{AppBundle}}/Contents/Info.plist
cp -f "$PROJECT_DIR/target/deploy/gyroflow" "{{AppBundle}}/Contents/MacOS/"
if ! [ -z "$GITHUB_RUN_NUMBER" ]; then
PlistBuddy -x -c "Set :CFBundleVersion \"`echo "{{ProjectVersion}}" | sed -E 's/[^0-9\.]//' | sed -E 's/\.([0-9]+)$/\1/'`.$GITHUB_RUN_NUMBER\"" {{AppBundle}}/Contents/Info.plist
fi
PATCH_NUM="0"
if [ "$IS_MANUAL_DISPATCH" == "true" ]; then
PATCH_NUM="1"
fi
PlistBuddy -x -c "Set :CFBundleShortVersionString \"`echo "{{ProjectVersion}}" | sed -E 's/[^0-9\.]//' | sed -E 's/\.([0-9]+)$/\1/'`.$PATCH_NUM\"" {{AppBundle}}/Contents/Info.plist
DEFAULT_SDK_VERSION=`xcrun --sdk macosx --show-sdk-version`
PlistBuddy -x -c "Add :BuildMachineOSBuild string `sw_vers -buildVersion`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTCompiler string `defaults read $(xcode-select -p)/../info DTCompiler`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTPlatformBuild string `xcrun --sdk macosx --show-sdk-build-version`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTPlatformName string macosx" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTPlatformVersion string $DEFAULT_SDK_VERSION" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTSDKBuild string `xcrun --sdk macosx --show-sdk-build-version`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTSDKName string macosx$DEFAULT_SDK_VERSION" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTXcode string `defaults read $(xcode-select -p)/../info DTXcode`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTXcodeBuild string `xcodebuild -version | grep 'Build version' | sed 's/^Build version //'`" {{AppBundle}}/Contents/Info.plist
# Bundle BRAW and RED SDK
FrameworksDir={{AppBundle}}/Contents/Frameworks
if [ ! -f "$FrameworksDir/REDR3D.dylib" ]; then
curl -L https://api.gyroflow.xyz/sdk/RED_SDK_MacOS_9.1.2.tar.gz -o tmp.tar.gz
7z x -aoa tmp.tar.gz
7z x -o"$FrameworksDir/" tmp.tar
rm tmp.tar tmp.tar.gz
fi
if [ ! -f "$FrameworksDir/BlackmagicRawAPI.framework/Versions/A/BlackmagicRawAPI" ]; then
curl -L https://api.gyroflow.xyz/sdk/Blackmagic_RAW_SDK_MacOS_5.0.0.tar.gz -o tmp.tar.gz
7z x -aoa tmp.tar.gz
7z x -o"$FrameworksDir/" tmp.tar
rm tmp.tar tmp.tar.gz
fi
chmod -R 0755 $FrameworksDir/*
# Generate entitlements
rm -f {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.app-sandbox bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.network.client bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.files.user-selected.read-write bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.files.bookmarks.app-scope bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.files.bookmarks.document-scope bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.get-task-allow bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.temporary-exception.files.home-relative-path.read-write array" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.temporary-exception.files.home-relative-path.read-write:0 string /Library/Application Support/Gyroflow/" {{AppBundle}}/../entitlements.xcent
actool {{ProjectDir}}/_deployment/ios/Resources/Images.xcassets --compile {{AppBundle}}/Contents --platform macosx --minimum-deployment-target 10.15 --app-icon AppIcon --output-partial-info-plist {{AppBundle}}/../AppIcon.plist
dsymutil {{AppBundle}}/Contents/MacOS/gyroflow -o {{AppBundle}}/../Gyroflow.app.dSYM
mkdir -p {{AppBundle}}/../Symbols
xcrun symbols -noTextInSOD -noDaemon -arch all -symbolsPackageDir {{AppBundle}}/../Symbols {{AppBundle}}/../Gyroflow.app.dSYM
if [ -z "$SIGN_KEY" ] || [ -z "$PKG_SIGN_KEY" ] || [ -z "$PROVISIONING_PROFILE" ]; then
SIGN_KEY="{{DistributionCertificateSHA}}"
PKG_SIGN_KEY="{{DistributionMacInstallerSHA}}"
PROVISIONING_PROFILE="{{DistributionProvisioning}}"
fi
cp -f "$PROVISIONING_PROFILE" {{AppBundle}}/Contents/embedded.provisionprofile
find {{AppBundle}}/Contents \( -name "*.dylib" -or -path "*/Versions/A/*" \) -and ! \( \
-path "*/Headers/*" -or -path "*/A/Resources/*" -or -name "CodeResources" -or -name "module.modulemap" \) -type f | sort | xargs -r \
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent
codesign -vvvv --deep --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent {{AppBundle}}/Contents/MacOS/gyroflow
codesign -vvvv --deep --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent {{AppBundle}}
PlistBuddy -x -c "Add :com.apple.application-identifier string {{TeamID}}.{{BundleIdentifier}}" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.developer.team-identifier string {{TeamID}}" {{AppBundle}}/../entitlements.xcent
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent {{AppBundle}}
codesign -vvvv --deep --verify {{AppBundle}}
xcrun productbuild --symbolication {{AppBundle}}/../Symbols --component {{AppBundle}} "/Applications" --sign $PKG_SIGN_KEY "{{AppBundle}}/../../Gyroflow.pkg"
import 'common.just'
TeamID := "RR3ZC2L4DF"
BundleIdentifier := "xyz.gyroflow"
DistributionCertificateSHA := "05AC9B1B232615B6DBE1FECD5A02AC21BBE967A9"
DistributionMacInstallerSHA := "67FDE536BC3BEBDB68E1224CF5DB17B8EB936F49"
DistributionProvisioning := ProjectDir / "_deployment/mac/Gyroflow_mac_app_store.provisionprofile"
# For local sandbox testing:
# DistributionCertificateSHA := "D125BE70B690030172EB74A828C10C1AE77FDE9A"
# DistributionProvisioning := ProjectDir / "_deployment/mac/Gyroflow_mac_developer_id.provisionprofile"
AppBundle := ProjectDir / "_deployment/_binaries/mac/Gyroflow.app"
export CPATH := if os() == "macos" {
if path_exists(`xcode-select --print-path` + "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include") == "true" {
`xcode-select --print-path` + "/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
} else {
env_var_or_default("CPATH", "")
}
} else {
env_var_or_default("CPATH", "")
}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Dependencies ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
install-deps:
#!/bin/bash
set -e
brew install p7zip pkg-config flatbuffers
brew list python &>/dev/null || brew install python
xcode-select --install || true
mkdir -p {{ExtDir}}
cd {{ExtDir}}
# Install vcpkg
git clone --depth 1 https://github.com/Microsoft/vcpkg.git || true
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
if [ ! -d "{{ExtDir}}/{{QtVersion}}" ]; then
echo "Setting up python venv in {{ExtDir}}/venv"
python3 -m venv "{{ExtDir}}/venv"
source "{{ExtDir}}/venv/bin/activate"
# Install Qt
echo "Installing Qt"
python3 -m pip install -U pip aqtinstall
python3 -m aqt install-qt mac desktop {{QtVersion}}
fi
if [ ! -f "{{OpenCVPath}}/lib/libopencv_core4.a" ]; then
echo "Installing OpenCV from vcpkg"
# Install OpenCV
./vcpkg/vcpkg install "opencv4[core,calib3d,thread,intrinsics]:x64-osx" --cmake-args=-DVCPKG_BUILD_TYPE=release
./vcpkg/vcpkg install "opencv4[core,calib3d,thread,intrinsics]:arm64-osx" --cmake-args=-DVCPKG_BUILD_TYPE=release
rm -rf ./vcpkg/buildtrees
rm -rf ./vcpkg/downloads
fi
if [ ! -d "{{FFmpeg}}" ]; then
echo "Downloading ffmpeg"
# Download and extract ffmpeg
curl -L https://sourceforge.net/projects/avbuild/files/macOS/ffmpeg-8.1-macOS-gpl-lite.tar.xz/download -o ffmpeg.tar.xz
7z x -aoa ffmpeg.tar.xz
tar -xf ffmpeg.tar
rm ffmpeg.tar ffmpeg.tar.xz
mkdir -p ffmpeg-x86_64/lib
mkdir -p ffmpeg-arm64/lib
cd ffmpeg-8.1-macOS-gpl-lite
lipo lib/libavcodec.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavcodec.a
lipo lib/libavformat.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavformat.a
lipo lib/libavdevice.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavdevice.a
lipo lib/libavfilter.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavfilter.a
lipo lib/libavutil.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libavutil.a
lipo lib/libswresample.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libswresample.a
lipo lib/libswscale.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libswscale.a
lipo lib/libx264.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libx264.a
lipo lib/libx265.a -thin x86_64 -output ../ffmpeg-x86_64/lib/libx265.a
lipo lib/libavcodec.a -thin arm64 -output ../ffmpeg-arm64/lib/libavcodec.a
lipo lib/libavformat.a -thin arm64 -output ../ffmpeg-arm64/lib/libavformat.a
lipo lib/libavdevice.a -thin arm64 -output ../ffmpeg-arm64/lib/libavdevice.a
lipo lib/libavfilter.a -thin arm64 -output ../ffmpeg-arm64/lib/libavfilter.a
lipo lib/libavutil.a -thin arm64 -output ../ffmpeg-arm64/lib/libavutil.a
lipo lib/libswresample.a -thin arm64 -output ../ffmpeg-arm64/lib/libswresample.a
lipo lib/libswscale.a -thin arm64 -output ../ffmpeg-arm64/lib/libswscale.a
lipo lib/libx264.a -thin arm64 -output ../ffmpeg-arm64/lib/libx264.a
lipo lib/libx265.a -thin arm64 -output ../ffmpeg-arm64/lib/libx265.a
cp -R include ../ffmpeg-x86_64/include
cp -R include ../ffmpeg-arm64/include
fi
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Development ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
build *param:
cargo build --release -- {{param}}
[no-cd]
build-debug *param:
cargo build -- {{param}}
[no-cd]
run *param:
cargo run --release -- {{param}}
[no-cd]
test *param:
cargo test -- {{param}}
[no-cd]
debug *param:
cargo run -- {{param}}
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Deployment ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[no-cd]
deploy *param:
#!/bin/bash
set -e
: "${PROJECT_DIR:=$(cd "{{ProjectDir}}"; pwd -P)}"
: "${CARGO_TARGET:=$PROJECT_DIR/target/release}"
: "${QT_DIR:=$PROJECT_DIR/ext/{{QtVersion}}/macos}"
: "${OPENCV_DIR:=$PROJECT_DIR/ext/vcpkg/installed}"
rm -rf "$PROJECT_DIR/_deployment/_binaries/mac"
if [ "{{param}}" == "local" ]; then
pushd $PROJECT_DIR
cargo build --profile deploy
popd
fi
if [ "{{param}}" == "universal" ]; then
pushd $PROJECT_DIR
export PATH="$PROJECT_DIR/ext/{{QtVersion}}/macos/bin:$PATH"
export OPENCV_LINK_LIBS="opencv_core4,opencv_calib3d4,opencv_features2d4,opencv_imgproc4,opencv_video4,opencv_flann4,opencv_stitching4"
#export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/usr/lib/"
export DYLD_FALLBACK_LIBRARY_PATH="$(xcode-select --print-path)/Toolchains/XcodeDefault.xctoolchain/usr/lib/"
#export LD_LIBRARY_PATH="$PROJECT_DIR/ext/{{QtVersion}}/macos/lib"
export MACOSX_DEPLOYMENT_TARGET="10.15"
export FFMPEG_DIR=$PROJECT_DIR/ext/ffmpeg-x86_64
export OPENCV_LINK_PATHS=$OPENCV_DIR/x64-osx/lib
export OPENCV_INCLUDE_PATHS=$OPENCV_DIR/x64-osx/include/opencv4/
rustup target add x86_64-apple-darwin
cargo build --target x86_64-apple-darwin --profile deploy
#strip $PROJECT_DIR/target/x86_64-apple-darwin/deploy/gyroflow
export FFMPEG_DIR=$PROJECT_DIR/ext/ffmpeg-arm64
export OPENCV_LINK_PATHS=$OPENCV_DIR/arm64-osx/lib
export OPENCV_INCLUDE_PATHS=$OPENCV_DIR/arm64-osx/include/opencv4/
export MACOSX_DEPLOYMENT_TARGET="11.0"
rustup target add aarch64-apple-darwin
cargo build --target aarch64-apple-darwin --profile deploy
#strip $PROJECT_DIR/target/aarch64-apple-darwin/deploy/gyroflow
lipo $PROJECT_DIR/target/{x86_64,aarch64}-apple-darwin/deploy/gyroflow -create -output $PROJECT_DIR/target/deploy/gyroflow
popd
fi
ICON=$PROJECT_DIR/resources/icon_1024_mac.png
ICON_OUT=$PROJECT_DIR/_deployment/mac/Gyroflow.app/Contents/Resources/Images.xcassets/AppIcon.appiconset
sips -z 16 16 $ICON --out $ICON_OUT/icon_16x16.png
sips -z 32 32 $ICON --out $ICON_OUT/icon_16x16@2x.png
sips -z 32 32 $ICON --out $ICON_OUT/icon_32x32.png
sips -z 64 64 $ICON --out $ICON_OUT/icon_32x32@2x.png
sips -z 128 128 $ICON --out $ICON_OUT/icon_128x128.png
sips -z 256 256 $ICON --out $ICON_OUT/icon_128x128@2x.png
sips -z 256 256 $ICON --out $ICON_OUT/icon_256x256.png
sips -z 512 512 $ICON --out $ICON_OUT/icon_256x256@2x.png
sips -z 512 512 $ICON --out $ICON_OUT/icon_512x512.png
sips -z 1024 1024 $ICON --out $ICON_OUT/icon_512x512@2x.png
mkdir -p $ICON_OUT/../AppIcon.iconset/
cp -f $ICON_OUT/*.png $ICON_OUT/../AppIcon.iconset/
iconutil -c icns $ICON_OUT/../AppIcon.iconset --output $PROJECT_DIR/_deployment/mac/Gyroflow.app/Contents/Resources/AppIcon.icns
rm -rf $ICON_OUT/../AppIcon.iconset
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
mkdir -p "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/camera_presets/"
CARGO_TARGET="$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS"
cp -Rf "$PROJECT_DIR/_deployment/mac/Gyroflow.app" "$PROJECT_DIR/_deployment/_binaries/mac/"
cp -f "$PROJECT_DIR/target/deploy/gyroflow" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/"
strip "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/gyroflow"
cp -Rf "$PROJECT_DIR/target/Frameworks/mdk.framework" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/" || true
cp -Rf "$PROJECT_DIR/target/x86_64-apple-darwin/Frameworks/mdk.framework" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/"
# cp -Rf "$PROJECT_DIR/resources/camera_presets" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/"
# rm -rf "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/camera_presets/.git"
cp -f "$PROJECT_DIR/resources/camera_presets/profiles.cbor.gz" "$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/camera_presets/profiles.cbor.gz"
fi
cp -af "$QT_DIR/lib/QtCore.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtDBus.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtGui.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtNetwork.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtOpenGL.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQml.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQmlCore.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQmlModels.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQmlWorkerScript.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuick.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickControls2.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickControls2Impl.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickControls2Basic.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickControls2BasicStyleImpl.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickControls2Material.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickControls2MaterialStyleImpl.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickDialogs2.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickDialogs2QuickImpl.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickDialogs2Utils.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickEffects.framework" "$CARGO_TARGET/../Frameworks/" || true
cp -af "$QT_DIR/lib/QtQuickTemplates2.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtQuickLayouts.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtSvg.framework" "$CARGO_TARGET/../Frameworks/"
cp -af "$QT_DIR/lib/QtWidgets.framework" "$CARGO_TARGET/../Frameworks/"
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
CARGO_TARGET="$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/qml"
fi
mkdir -p "$CARGO_TARGET/QtCore/"
mkdir -p "$CARGO_TARGET/QtQml/Base/"
mkdir -p "$CARGO_TARGET/QtQml/Models/"
mkdir -p "$CARGO_TARGET/QtQml/WorkerScript/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/impl/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/macOS/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/Basic/impl/"
mkdir -p "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
mkdir -p "$CARGO_TARGET/QtQuick/Layouts/"
mkdir -p "$CARGO_TARGET/QtQuick/Effects/"
mkdir -p "$CARGO_TARGET/QtQuick/Window/"
mkdir -p "$CARGO_TARGET/QtQuick/Templates/"
mkdir -p "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/qml/+Material/"
cp -f $QT_DIR/qml/QtCore/qmldir "$CARGO_TARGET/QtCore/"
cp -f $QT_DIR/qml/QtCore/libqtqmlcoreplugin.dylib "$CARGO_TARGET/QtCore/"
cp -f $QT_DIR/qml/QtQml/qmldir "$CARGO_TARGET/QtQml/"
cp -f $QT_DIR/qml/QtQml/libqmlplugin.dylib "$CARGO_TARGET/QtQml/" || true
cp -f $QT_DIR/qml/QtQml/libqmlmetaplugin.dylib "$CARGO_TARGET/QtQml/" || true
cp -f $QT_DIR/qml/QtQml/Base/libqmlplugin.dylib "$CARGO_TARGET/QtQml/Base/" || true
cp -f $QT_DIR/qml/QtQml/Base/qmldir "$CARGO_TARGET/QtQml/Base/" || true
cp -f $QT_DIR/qml/QtQml/Models/libmodelsplugin.dylib "$CARGO_TARGET/QtQml/Models/"
cp -f $QT_DIR/qml/QtQml/Models/qmldir "$CARGO_TARGET/QtQml/Models/"
cp -f $QT_DIR/qml/QtQml/WorkerScript/libworkerscriptplugin.dylib "$CARGO_TARGET/QtQml/WorkerScript/"
cp -f $QT_DIR/qml/QtQml/WorkerScript/qmldir "$CARGO_TARGET/QtQml/WorkerScript/"
cp -f $QT_DIR/qml/QtQuick/qmldir "$CARGO_TARGET/QtQuick"
cp -f $QT_DIR/qml/QtQuick/Controls/impl/qmldir "$CARGO_TARGET/QtQuick/Controls/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/impl/libqtquickcontrols2implplugin.dylib "$CARGO_TARGET/QtQuick/Controls/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/qmldir "$CARGO_TARGET/QtQuick/Controls/"
cp -f $QT_DIR/qml/QtQuick/Controls/macOS/*.qml "$CARGO_TARGET/QtQuick/Controls/macOS/"
cp -f $QT_DIR/qml/QtQuick/Controls/macOS/qmldir "$CARGO_TARGET/QtQuick/Controls/macOS/"
cp -f $QT_DIR/qml/QtQuick/Controls/macOS/libqtquickcontrols2macosstyleplugin.dylib "$CARGO_TARGET/QtQuick/Controls/macOS/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/*.qml "$CARGO_TARGET/QtQuick/Controls/Basic/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/impl/qmldir "$CARGO_TARGET/QtQuick/Controls/Basic/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/impl/libqtquickcontrols2basicstyleimplplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Basic/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/qmldir "$CARGO_TARGET/QtQuick/Controls/Basic/"
cp -f $QT_DIR/qml/QtQuick/Controls/Basic/libqtquickcontrols2basicstyleplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Basic/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/impl/*.qml "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/impl/qmldir "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/impl/libqtquickcontrols2materialstyleimplplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Material/impl/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/*.qml "$CARGO_TARGET/QtQuick/Controls/Material/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/qmldir "$CARGO_TARGET/QtQuick/Controls/Material/"
cp -f $QT_DIR/qml/QtQuick/Controls/Material/libqtquickcontrols2materialstyleplugin.dylib "$CARGO_TARGET/QtQuick/Controls/Material/"
cp -f $QT_DIR/qml/QtQuick/Controls/libqtquickcontrols2plugin.dylib "$CARGO_TARGET/QtQuick/Controls/"
cp -f $QT_DIR/qml/QtQuick/Layouts/qmldir "$CARGO_TARGET/QtQuick/Layouts/"
cp -f $QT_DIR/qml/QtQuick/Layouts/libqquicklayoutsplugin.dylib "$CARGO_TARGET/QtQuick/Layouts/"
cp -f $QT_DIR/qml/QtQuick/libqtquick2plugin.dylib "$CARGO_TARGET/QtQuick/"
cp -f $QT_DIR/qml/QtQuick/Window/qmldir "$CARGO_TARGET/QtQuick/Window/"
cp -f $QT_DIR/qml/QtQuick/Window/libquickwindowplugin.dylib "$CARGO_TARGET/QtQuick/Window/"
cp -f $QT_DIR/qml/QtQuick/Templates/qmldir "$CARGO_TARGET/QtQuick/Templates/"
cp -f $QT_DIR/qml/QtQuick/Templates/libqtquicktemplates2plugin.dylib "$CARGO_TARGET/QtQuick/Templates/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/qmldir "$CARGO_TARGET/QtQuick/Dialogs/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/libqtquickdialogsplugin.dylib "$CARGO_TARGET/QtQuick/Dialogs/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/qmldir "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/qml/*.qml "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/qml/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/qml/+Material/*.qml "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/qml/+Material/"
cp -f $QT_DIR/qml/QtQuick/Dialogs/quickimpl/libqtquickdialogs2quickimplplugin.dylib "$CARGO_TARGET/QtQuick/Dialogs/quickimpl/"
cp -f $QT_DIR/qml/QtQuick/Effects/libeffectsplugin.dylib "$CARGO_TARGET/QtQuick/Effects/" || true
cp -f $QT_DIR/qml/QtQuick/Effects/qmldir "$CARGO_TARGET/QtQuick/Effects/" || true
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
CARGO_TARGET="$PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/PlugIns"
fi
mkdir -p "$CARGO_TARGET/iconengines/"
mkdir -p "$CARGO_TARGET/imageformats/"
mkdir -p "$CARGO_TARGET/platforms/"
cp -f $QT_DIR/plugins/iconengines/libqsvgicon.dylib "$CARGO_TARGET/iconengines/"
cp -f $QT_DIR/plugins/imageformats/libqsvg.dylib "$CARGO_TARGET/imageformats/"
cp -f $QT_DIR/plugins/imageformats/libqjpeg.dylib "$CARGO_TARGET/imageformats/"
cp -f $QT_DIR/plugins/platforms/libqcocoa.dylib "$CARGO_TARGET/platforms/"
if [ "{{param}}" == "local" ] || [ "{{param}}" == "universal" ]; then
xattr -c $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Info.plist
xattr -c $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Resources/AppIcon.icns
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/.empty
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/PlugIns/.empty
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/.empty
rm -f $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/Frameworks/mdk.framework/Versions/A/libass.dylib
if [ "$SIGNING_FINGERPRINT" != "" ]; then
# Certificate needs to be "Developer ID Application"
find $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents \( -name "*.dylib" -or -path "*/Versions/A/*" \) -and ! \( \
-path "*/Headers/*" -or -path "*/A/Resources/*" -or -name "CodeResources" -or -name "module.modulemap" \) -type f | sort | xargs -r \
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app/Contents/MacOS/gyroflow
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app
codesign -vvvv --deep --verify $PROJECT_DIR/_deployment/_binaries/mac/Gyroflow.app
fi
if [ -z "$DONT_BUILD_DMG" ]; then
ln -sf /Applications "$PROJECT_DIR/_deployment/_binaries/mac/Applications"
for i in 1 2 3 4 5 6 7 8 9 10
do
sudo mdutil -a -i off
sudo pkill -9 XProtect >/dev/null || true
while pgrep XProtect; do sleep 3; done;
hdiutil create "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg" -volname "Gyroflow v{{ProjectVersion}}" -fs HFS+ -srcfolder "$PROJECT_DIR/_deployment/_binaries/mac/" -ov -format UDZO -imagekey zlib-level=9 || true
if [ -f "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg" ]; then
break
fi
done
if [ "$SIGNING_FINGERPRINT" != "" ]; then
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGNING_FINGERPRINT "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg"
codesign -vvvv --deep --verify "$PROJECT_DIR/_deployment/_binaries/Gyroflow-mac-universal.dmg"
fi
fi
fi
[no-cd]
bundle *param:
#!/bin/bash
set -e
: "${PROJECT_DIR:=$(cd "{{ProjectDir}}"; pwd -P)}"
export PATH="/usr/libexec/:$PATH"
cp -f "$PROJECT_DIR/_deployment/mac/Gyroflow.app/Contents/Info.plist" {{AppBundle}}/Contents/Info.plist
cp -f "$PROJECT_DIR/target/deploy/gyroflow" "{{AppBundle}}/Contents/MacOS/"
if ! [ -z "$GITHUB_RUN_NUMBER" ]; then
PlistBuddy -x -c "Set :CFBundleVersion \"`echo "{{ProjectVersion}}" | sed -E 's/[^0-9\.]//' | sed -E 's/\.([0-9]+)$/\1/'`.$GITHUB_RUN_NUMBER\"" {{AppBundle}}/Contents/Info.plist
fi
PATCH_NUM="0"
if [ "$IS_MANUAL_DISPATCH" == "true" ]; then
PATCH_NUM="1"
fi
PlistBuddy -x -c "Set :CFBundleShortVersionString \"`echo "{{ProjectVersion}}" | sed -E 's/[^0-9\.]//' | sed -E 's/\.([0-9]+)$/\1/'`.$PATCH_NUM\"" {{AppBundle}}/Contents/Info.plist
DEFAULT_SDK_VERSION=`xcrun --sdk macosx --show-sdk-version`
PlistBuddy -x -c "Add :BuildMachineOSBuild string `sw_vers -buildVersion`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTCompiler string `defaults read $(xcode-select -p)/../info DTCompiler`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTPlatformBuild string `xcrun --sdk macosx --show-sdk-build-version`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTPlatformName string macosx" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTPlatformVersion string $DEFAULT_SDK_VERSION" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTSDKBuild string `xcrun --sdk macosx --show-sdk-build-version`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTSDKName string macosx$DEFAULT_SDK_VERSION" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTXcode string `defaults read $(xcode-select -p)/../info DTXcode`" {{AppBundle}}/Contents/Info.plist
PlistBuddy -x -c "Add :DTXcodeBuild string `xcodebuild -version | grep 'Build version' | sed 's/^Build version //'`" {{AppBundle}}/Contents/Info.plist
# Bundle BRAW and RED SDK
FrameworksDir={{AppBundle}}/Contents/Frameworks
if [ ! -f "$FrameworksDir/REDR3D.dylib" ]; then
curl -L https://api.gyroflow.xyz/sdk/RED_SDK_MacOS_9.1.2.tar.gz -o tmp.tar.gz
7z x -aoa tmp.tar.gz
7z x -o"$FrameworksDir/" tmp.tar
rm tmp.tar tmp.tar.gz
fi
if [ ! -f "$FrameworksDir/BlackmagicRawAPI.framework/Versions/A/BlackmagicRawAPI" ]; then
curl -L https://api.gyroflow.xyz/sdk/Blackmagic_RAW_SDK_MacOS_5.0.0.tar.gz -o tmp.tar.gz
7z x -aoa tmp.tar.gz
7z x -o"$FrameworksDir/" tmp.tar
rm tmp.tar tmp.tar.gz
fi
chmod -R 0755 $FrameworksDir/*
# Generate entitlements
rm -f {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.app-sandbox bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.network.client bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.files.user-selected.read-write bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.files.bookmarks.app-scope bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.files.bookmarks.document-scope bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.get-task-allow bool true" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.temporary-exception.files.home-relative-path.read-write array" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.security.temporary-exception.files.home-relative-path.read-write:0 string /Library/Application Support/Gyroflow/" {{AppBundle}}/../entitlements.xcent
actool {{ProjectDir}}/_deployment/ios/Resources/Images.xcassets --compile {{AppBundle}}/Contents --platform macosx --minimum-deployment-target 10.15 --app-icon AppIcon --output-partial-info-plist {{AppBundle}}/../AppIcon.plist
dsymutil {{AppBundle}}/Contents/MacOS/gyroflow -o {{AppBundle}}/../Gyroflow.app.dSYM
mkdir -p {{AppBundle}}/../Symbols
xcrun symbols -noTextInSOD -noDaemon -arch all -symbolsPackageDir {{AppBundle}}/../Symbols {{AppBundle}}/../Gyroflow.app.dSYM
if [ -z "$SIGN_KEY" ] || [ -z "$PKG_SIGN_KEY" ] || [ -z "$PROVISIONING_PROFILE" ]; then
SIGN_KEY="{{DistributionCertificateSHA}}"
PKG_SIGN_KEY="{{DistributionMacInstallerSHA}}"
PROVISIONING_PROFILE="{{DistributionProvisioning}}"
fi
cp -f "$PROVISIONING_PROFILE" {{AppBundle}}/Contents/embedded.provisionprofile
find {{AppBundle}}/Contents \( -name "*.dylib" -or -path "*/Versions/A/*" \) -and ! \( \
-path "*/Headers/*" -or -path "*/A/Resources/*" -or -name "CodeResources" -or -name "module.modulemap" \) -type f | sort | xargs -r \
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent
codesign -vvvv --deep --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent {{AppBundle}}/Contents/MacOS/gyroflow
codesign -vvvv --deep --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent {{AppBundle}}
PlistBuddy -x -c "Add :com.apple.application-identifier string {{TeamID}}.{{BundleIdentifier}}" {{AppBundle}}/../entitlements.xcent
PlistBuddy -x -c "Add :com.apple.developer.team-identifier string {{TeamID}}" {{AppBundle}}/../entitlements.xcent
codesign -vvvv --strict --options runtime --timestamp --force -s $SIGN_KEY --entitlements {{AppBundle}}/../entitlements.xcent {{AppBundle}}
codesign -vvvv --deep --verify {{AppBundle}}
xcrun productbuild --symbolication {{AppBundle}}/../Symbols --component {{AppBundle}} "/Applications" --sign $PKG_SIGN_KEY "{{AppBundle}}/../../Gyroflow.pkg"
+3 -5
View File
@@ -51,11 +51,9 @@ install-deps:
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
if (-not (Test-Path -Path "{{FFmpeg}}")) {
echo "Downloading {{FFmpeg}}"
wget "https://master.dl.sourceforge.net/project/avbuild/windows-desktop/{{FFmpeg}}.tar.xz?viasf=1" -outfile "{{FFmpeg}}.tar.xz"
7z x -y {{FFmpeg}}.tar.xz
7z x -y {{FFmpeg}}.tar
del {{FFmpeg}}.tar.xz
del {{FFmpeg}}.tar
wget "https://master.dl.sourceforge.net/project/avbuild/windows-desktop/{{FFmpeg}}.7z?viasf=1" -outfile "{{FFmpeg}}.7z"
7z x -y {{FFmpeg}}.7z
del {{FFmpeg}}.7z
}
# ――――――――――――――――――――――――――――――――――――――― FFmpeg ――――――――――――――――――――――――――――――――――――――――
+2
View File
@@ -146,6 +146,8 @@ pub fn get_possible_encoders(codec: &str, use_gpu: bool) -> Vec<(&'static str, b
"ProRes" => vec![
#[cfg(any(target_os = "macos", target_os = "ios"))]
("prores_videotoolbox", true),
//#[cfg(any(target_os = "windows", target_os = "linux", target_os = "android"))]
//("prores_ks_vulkan", true),
("prores_ks", false)
],
"DNxHD" => vec![("dnxhd", false)],