Skip to content

qaac-portable

qaac-portable #20

Workflow file for this run

name: qaac_portable
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- name: Install tools
run: choco install -y 7zip
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Download latest qaac release
run: |
QAAC_URL=$(curl -s https://api.github.com/repos/nu774/qaac/releases/latest \
| grep "browser_download_url" \
| grep "qaac_.*\.zip" \
| cut -d '"' -f 4)
QAAC_VERSION=$(basename "$QAAC_URL" | sed 's/qaac_\(.*\)\.zip/\1/')
echo "QAAC_VERSION=$QAAC_VERSION" >> $GITHUB_ENV
curl -L -o qaac.zip "$QAAC_URL"
- name: Extract qaac and prepare folders
run: |
7z x qaac.zip
mkdir -p qaac-${QAAC_VERSION}-win32_portable
mkdir -p qaac-${QAAC_VERSION}-win64_portable
cp qaac_*/x86/* qaac-${QAAC_VERSION}-win32_portable/
cp qaac_*/x64/* qaac-${QAAC_VERSION}-win64_portable/
- name: Download iTunes installers
run: |
curl -L -o iTunes32.exe "https://www.apple.com/itunes/download/win32"
curl -L -o iTunes64.exe "https://www.apple.com/itunes/download/win64"
- name: Extract iTunes MSI files
run: |
mkdir -p itunes32_exe itunes64_exe
7z x iTunes32.exe -oitunes32_exe
7z x iTunes64.exe -oitunes64_exe
- name: Extract DLLs from MSI using cmd
shell: cmd
run: |
mkdir itunes32_dll
mkdir itunes64_dll
for /f %%i in ('dir /b /s itunes32_exe\iTunes*.msi') do set MSI32=%%i
for /f %%i in ('dir /b /s itunes64_exe\iTunes*.msi') do set MSI64=%%i
msiexec /a "%MSI32%" /qn TARGETDIR="%CD%\itunes32_dll"
msiexec /a "%MSI64%" /qn TARGETDIR="%CD%\itunes64_dll"
- name: Copy DLLs to win32 and win64 folders
run: |
DLLS=("ASL.dll" "CoreAudioToolbox.dll" "CoreFoundation.dll" "libdispatch.dll" "libicuin.dll" "libicuuc.dll" "objc.dll")
for dll in "${DLLS[@]}"; do
find itunes32_dll -iname "$dll" -exec cp {} qaac-${QAAC_VERSION}-win32_portable/ \;
find itunes64_dll -iname "$dll" -exec cp {} qaac-${QAAC_VERSION}-win64_portable/ \;
done
find itunes32_dll -iname "icudt*.dll" -exec cp {} qaac-${QAAC_VERSION}-win32_portable/ \;
find itunes64_dll -iname "icudt*.dll" -exec cp {} qaac-${QAAC_VERSION}-win64_portable/ \;
- name: Upload win32 portable bundle
uses: actions/upload-artifact@v4
with:
name: qaac-${{ env.QAAC_VERSION }}-win32_portable
path: qaac-${{ env.QAAC_VERSION }}-win32_portable
- name: Upload win64 portable bundle
uses: actions/upload-artifact@v4
with:
name: qaac-${{ env.QAAC_VERSION }}-win64_portable
path: qaac-${{ env.QAAC_VERSION }}-win64_portable