-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from jdpurcell/update1
Various updates / fixes
- Loading branch information
Showing
8 changed files
with
148 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-latest] | ||
os: [ubuntu-20.04, macos-12] | ||
vers: ['5.15.2'] | ||
include: | ||
- os: windows-2019 | ||
|
@@ -22,41 +22,51 @@ jobs: | |
vers: '6.2.2' | ||
forceWin32: 'false' | ||
arch: 'win64_msvc2019_64' | ||
- os: macos-latest | ||
- os: macos-12 | ||
vers: '6.2.2' | ||
forceWin32: 'false' | ||
universalBinary: 'true' | ||
- os: windows-2019 | ||
vers: '6.4.3' | ||
vers: '6.5.3' | ||
forceWin32: 'false' | ||
arch: 'win64_msvc2019_64' | ||
- os: macos-latest | ||
vers: '6.4.3' | ||
forceWin32: 'false' | ||
- os: macos-12 | ||
vers: '6.5.3' | ||
universalBinary: 'true' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
cache: true | ||
version: ${{ matrix.vers }} | ||
arch: ${{ matrix.arch }} | ||
|
||
- name: Build QtApng | ||
run: pwsh pwsh/buildapng.ps1 | ||
env: | ||
forceWin32: ${{ matrix.forceWin32 }} | ||
universalBinary: ${{ matrix.universalBinary }} | ||
|
||
- name: 'Upload Artifact' | ||
if: github.ref != 'refs/heads/master' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qtapng-${{ matrix.os }}-${{ matrix.vers }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }} | ||
path: QtApng/output | ||
|
||
- name: 'Zip Artifact' | ||
if: github.ref == 'refs/heads/master' | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
path: QtApng/plugins/ | ||
path: QtApng/output/ | ||
filename: "qtapng-${{ matrix.os }}-${{ matrix.vers }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}.zip" | ||
|
||
- name: 'Upload to continous release' | ||
if: github.event_name != 'pull_request' | ||
uses: softprops/action-gh-release@v1 | ||
if: github.ref == 'refs/heads/master' | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: 'cont' | ||
files: qtapng-*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
include: | ||
- os: ubuntu-20.04 | ||
vers: '5.15.2' | ||
- os: macos-latest | ||
- os: macos-12 | ||
vers: '5.15.2' | ||
- os: windows-2019 | ||
vers: '5.15.2' | ||
|
@@ -24,22 +24,22 @@ jobs: | |
vers: '6.2.2' | ||
forceWin32: 'false' | ||
arch: 'win64_msvc2019_64' | ||
- os: macos-latest | ||
- os: macos-12 | ||
vers: '6.2.2' | ||
universalBinary: 'true' | ||
- os: windows-2019 | ||
vers: '6.4.3' | ||
vers: '6.5.3' | ||
forceWin32: 'false' | ||
arch: 'win64_msvc2019_64' | ||
- os: macos-latest | ||
vers: '6.4.3' | ||
- os: macos-12 | ||
vers: '6.5.3' | ||
universalBinary: 'true' | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v3 | ||
uses: jurplel/install-qt-action@v4 | ||
with: | ||
cache: true | ||
version: ${{ matrix.vers }} | ||
|
@@ -49,24 +49,32 @@ jobs: | |
- name: Setup vcpkg | ||
uses: lukka/run-vcpkg@v11 | ||
with: | ||
vcpkgGitCommitId: '64d69a75df89c6b28a5d4d30fd7eaee138d35a4a' | ||
vcpkgGitCommitId: '7eb700c9688daed6d8bdcdc571ebe3eedea6a774' | ||
|
||
- name: Build KImageFormats (just one big step for now) | ||
run: pwsh pwsh/buildkimageformats.ps1 | ||
env: | ||
forceWin32: ${{ matrix.forceWin32 }} | ||
universalBinary: ${{ matrix.universalBinary }} | ||
|
||
- name: 'Upload Artifact' | ||
if: github.ref != 'refs/heads/master' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: kimageformats-${{ matrix.os }}-${{ matrix.vers }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }} | ||
path: kimageformats/output | ||
|
||
- name: 'Zip Artifact' | ||
if: github.ref == 'refs/heads/master' | ||
uses: thedoctor0/[email protected] | ||
with: | ||
type: 'zip' | ||
path: kimageformats/output/ | ||
filename: "kimageformats-${{ matrix.os }}-${{ matrix.vers }}${{ matrix.arch && format('-{0}', matrix.arch) || '' }}.zip" | ||
|
||
- name: 'Upload to continous release' | ||
if: github.event_name != 'pull_request' | ||
uses: softprops/action-gh-release@v1 | ||
if: github.ref == 'refs/heads/master' | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
tag_name: 'cont' | ||
files: kimageformats-*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,43 @@ | ||
#!/usr/bin/env pwsh | ||
|
||
$qtVersion = ((qmake --version -split '\n')[1] -split ' ')[3] | ||
|
||
# Clone | ||
git clone https://github.com/jurplel/QtApng.git | ||
cd QtApng | ||
git checkout 250f218ceeefdf2a6e66b596799abd279adea033 | ||
git checkout 6a83caf22111cb8054753b925c2dfbcd9b92e038 | ||
|
||
# Dependencies | ||
if ($IsWindows) { | ||
& "$env:GITHUB_WORKSPACE/pwsh/vcvars.ps1" | ||
choco install ninja pkgconfiglite | ||
} elseif ($IsMacOS) { | ||
brew update | ||
brew install ninja | ||
} else { | ||
sudo apt-get install ninja-build | ||
} | ||
|
||
# Build | ||
$argApngQt6 = $qtVersion -like '5.*' ? "-DAPNG_QT6=OFF" : $null | ||
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release $argApngQt6 | ||
ninja -C build | ||
|
||
# vcvars on windows | ||
if ($IsWindows) { | ||
& "$env:GITHUB_WORKSPACE/pwsh/vcvars.ps1" | ||
if ($env:universalBinary -eq 'true') { | ||
cmake -B build_arm64 -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 | ||
ninja -C build_arm64 | ||
} | ||
|
||
qmake "CONFIG += libpng_static" QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" | ||
if ($IsWindows) { | ||
nmake | ||
} else { | ||
make | ||
# Copy output | ||
$outputDir = "output" | ||
mkdir $outputDir | ||
$files = Get-ChildItem -Path "build/plugins/imageformats" | Where-Object { $_.Extension -in ".dylib", ".dll", ".so" } | ||
foreach ($file in $files) { | ||
if ($env:universalBinary -eq 'true') { | ||
$name = $file.Name | ||
lipo -create "$file" "build_arm64/plugins/imageformats/$name" -output "$outputDir/$name" | ||
lipo -info "$outputDir/$name" | ||
} else { | ||
Copy-Item -Path $file -Destination $outputDir | ||
} | ||
} | ||
cd .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
param( | ||
$dir | ||
) | ||
|
||
function GetDeps($dllPath) { | ||
# Run dumpbin with /DEPENDENTS option | ||
$output = & dumpbin.exe /NOLOGO /DEPENDENTS $dllPath | ||
|
||
# Directory of the input DLL | ||
$inputDir = Split-Path -Path $dllPath | ||
|
||
# Parse the output and filter existing DLLs in the same directory as the input DLL | ||
$dependencies = $output | | ||
Where-Object { $_ -match '^\s+.+\.dll$' } | | ||
ForEach-Object { | ||
$dllName = $_.Trim() | ||
$fullDllPath = Join-Path -Path $inputDir -ChildPath $dllName | ||
if (Test-Path $fullDllPath) { | ||
$dllName | ||
} | ||
} | ||
|
||
return $dependencies | ||
} | ||
|
||
function GetNestedDeps($dllPath) { | ||
$visited = [System.Collections.Generic.HashSet[string]]::new() | ||
$queue = [System.Collections.Generic.Queue[string]]::new() | ||
|
||
[void]$visited.Add($dllPath) | ||
$queue.Enqueue($dllPath) | ||
|
||
while ($queue.Count -gt 0) { | ||
$currentDll = $queue.Dequeue() | ||
$deps = GetDeps $currentDll | ||
|
||
foreach ($dep in $deps) { | ||
$fullDepPath = Join-Path (Split-Path $currentDll) $dep | ||
if (-not $visited.Contains($fullDepPath)) { | ||
[void]$visited.Add($fullDepPath) | ||
$queue.Enqueue($fullDepPath) | ||
} | ||
} | ||
} | ||
|
||
# Return all collected dependencies, excluding the initial input | ||
return $visited | Where-Object { $_ -ne $dllPath } | ForEach-Object { Split-Path $_ -Leaf } | Sort-Object | ||
} | ||
|
||
# Loop through DLL files starting with "kimg_" in the specified directory in alphabetical order | ||
Get-ChildItem -Path $dir -Filter "kimg_*.dll" | | ||
Sort-Object Name | | ||
ForEach-Object { | ||
$dllName = $_.Name | ||
$deps = GetNestedDeps $_.FullName | ||
|
||
# Check if any dependencies were found and output appropriately | ||
if ($deps.Count -gt 0) { | ||
# Joining dependency names to pass as an array | ||
$depList = $deps -join '", "' | ||
Write-Output "$dllName`: `"$depList`"" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters