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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/desktop-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,19 @@ jobs:
- name: Get WiX
run: dotnet tool install --global wix --version 4.0.5

# The released program stands in for a fresh build.
- name: Get the released program
env:
GH_TOKEN: ${{ github.token }}
# Build the current PR so installer testing does not depend on a published release asset.
- name: Build the current program
working-directory: desktop
run: cargo build --release --locked -p castbay-desktop-gpui

- name: Prepare installer inputs
run: |
gh release download desktop-v0.1.0 --repo $env:GITHUB_REPOSITORY --pattern '*windows-x64.zip' --dir "$env:RUNNER_TEMP\release"
Expand-Archive "$env:RUNNER_TEMP\release\*.zip" -DestinationPath "$env:RUNNER_TEMP\release\unzipped"
$dir = Get-ChildItem "$env:RUNNER_TEMP\release\unzipped" -Directory | Select-Object -First 1
Copy-Item "$($dir.FullName)\CastBay Desktop.exe" "$env:RUNNER_TEMP\app.exe"
Copy-Item "$($dir.FullName)\LICENSE" "$env:RUNNER_TEMP\LICENSE"
Copy-Item "desktop\target\release\castbay-desktop.exe" "$env:RUNNER_TEMP\app.exe"
Copy-Item "LICENSE" "$env:RUNNER_TEMP\LICENSE"
./desktop/installer/collect-vc-runtime.ps1 -OutDir "$env:RUNNER_TEMP\windows-runtime"

- name: Build the installers
run: ./desktop/installer/build-msi.ps1 -Version 0.1.0 -AppExe "$env:RUNNER_TEMP\app.exe" -LicenseTxt "$env:RUNNER_TEMP\LICENSE" -OutDir "$env:RUNNER_TEMP\msi" -NameStem CastBay-Desktop-0.1.0-windows-x64
run: ./desktop/installer/build-msi.ps1 -Version 0.1.0 -AppExe "$env:RUNNER_TEMP\app.exe" -VCRuntimeDll "$env:RUNNER_TEMP\windows-runtime\vcruntime140.dll" -LicenseTxt "$env:RUNNER_TEMP\LICENSE" -OutDir "$env:RUNNER_TEMP\msi" -NameStem CastBay-Desktop-0.1.0-windows-x64

- name: Install, install over, start, uninstall (each language)
run: |
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/desktop-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:

- name: Build CastBay Desktop
working-directory: desktop
run: cargo build --release --locked -p castbay-desktop --features ffmpeg-lib
run: cargo build --release --locked -p castbay-desktop-gpui --features ffmpeg-lib

- name: Keep the Rust build for the other runs
if: github.ref == 'refs/heads/main'
Expand All @@ -108,6 +108,12 @@ jobs:
desktop/target
key: ${{ steps.rust.outputs.cache-primary-key }}

# The MSVC Rust executable imports vcruntime140.dll. Ship the licensed, x64 app-local
# redistributable so the portable build also starts on clean Windows installations.
- name: Stage the app-local Visual C++ runtime
shell: pwsh
run: ./desktop/installer/collect-vc-runtime.ps1 -OutDir "$PWD\desktop\build\windows-runtime"

- name: Package
run: |
case "$GITHUB_REF" in
Expand All @@ -118,15 +124,16 @@ jobs:
dir="CastBay-Desktop-$VERSION-windows-x64"
mkdir -p "dist/$dir"
cp desktop/target/release/castbay-desktop.exe "dist/$dir/CastBay Desktop.exe"
cp desktop/build/windows-runtime/vcruntime140.dll "dist/$dir/"
cp LICENSE* "dist/$dir/" 2>/dev/null || true
{
echo "CastBay Desktop $VERSION"
echo
echo "This is the portable version: run \"CastBay Desktop.exe\" (the .msi files next to this zip on the"
echo "release page install it instead, with a Start menu entry and uninstaller). It needs the Microsoft Edge WebView2 runtime (part of"
echo "Windows 11 and recent Windows 10). Windows may ask to let it use the network: allow it"
echo "release page install it instead, with a Start menu entry and uninstaller). Windows may ask to let it use the network: allow it"
echo "on private networks so receivers can be found. It is not code-signed yet, so SmartScreen"
echo "may warn: choose More info, then Run anyway."
echo "The required Microsoft Visual C++ runtime is included beside the executable."
echo
echo "Guide: https://github.com/${GITHUB_REPOSITORY}/blob/main/desktop/docs/user-guide.md"
echo
Expand Down Expand Up @@ -154,7 +161,7 @@ jobs:
run: |
$appVersion = (Select-String -Path desktop\app\Cargo.toml -Pattern '^version = "(.*)"' | Select-Object -First 1).Matches[0].Groups[1].Value
"APP_VERSION=$appVersion" | Out-File -Append -Encoding utf8 $env:GITHUB_ENV
./desktop/installer/build-msi.ps1 -Version $appVersion -AppExe "$PWD\desktop\target\release\castbay-desktop.exe" -LicenseTxt "$PWD\LICENSE" -OutDir "$PWD\dist" -NameStem "CastBay-Desktop-$env:VERSION-windows-x64"
./desktop/installer/build-msi.ps1 -Version $appVersion -AppExe "$PWD\desktop\target\release\castbay-desktop.exe" -VCRuntimeDll "$PWD\desktop\build\windows-runtime\vcruntime140.dll" -LicenseTxt "$PWD\LICENSE" -OutDir "$PWD\dist" -NameStem "CastBay-Desktop-$env:VERSION-windows-x64"

# Install, install over, start, uninstall on the runner, before anything is published.
- name: Try the installers
Expand All @@ -164,6 +171,7 @@ jobs:
"== $($m.Name)"
./desktop/installer/test-install.ps1 -Msi $m.FullName -Version $env:APP_VERSION
}
./desktop/installer/test-portable.ps1 -Zip (Get-ChildItem dist\CastBay-Desktop-*-windows-x64.zip | Select-Object -First 1).FullName

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down Expand Up @@ -195,7 +203,7 @@ jobs:
- name: Install the system libraries
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev \
sudo apt-get install -y --no-install-recommends libgtk-3-dev libxdo-dev libxkbcommon-x11-dev libayatana-appindicator3-dev \
librsvg2-dev libssl-dev libdbus-1-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev clang nasm

- name: Note the submodule commits
Expand Down Expand Up @@ -236,7 +244,7 @@ jobs:

- name: Build CastBay Desktop
working-directory: desktop
run: cargo build --release --locked -p castbay-desktop --features ffmpeg-lib
run: cargo build --release --locked -p castbay-desktop-gpui --features ffmpeg-lib

- name: Keep the Rust build for the other runs
if: github.ref == 'refs/heads/main'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
working-directory: .
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev \
sudo apt-get install -y --no-install-recommends libgtk-3-dev libxdo-dev libxkbcommon-x11-dev libayatana-appindicator3-dev \
librsvg2-dev libssl-dev libdbus-1-dev libpipewire-0.3-dev libspa-0.2-dev libclang-dev clang

- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
Expand Down
Loading
Loading