Skip to content

Commit

Permalink
Appveyor: Fix stuck waiting on installer
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Sep 20, 2023
1 parent d2e3591 commit bb00c57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
4 changes: 0 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ build_script:
after_build:
- bash utils/appveyor/after_build.sh

artifacts:
- path: 'copyq-*-setup.exe'
name: CopyQ Setup

# Upload test log files.
on_finish:
- ps: >-
Expand Down
16 changes: 11 additions & 5 deletions utils/appveyor/after_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ export COPYQ_TESTS_RERUN_FAILED=1

# Take screenshots of the app.
"$Executable" &
copyq_pid=$!
"$Executable" showAt 0 0 9999 9999

"$Executable" add "Plain text item"
Expand Down Expand Up @@ -124,22 +125,27 @@ screenshot "Screenshot - Tab Menu"
"$Executable" keys "ESCAPE" "focus:ClipboardBrowser"

"$Executable" exit
wait
wait "$copyq_pid"

export PATH=$OldPath

choco install -y InnoSetup
cmd " /c C:/ProgramData/chocolatey/bin/ISCC.exe /O$APPVEYOR_BUILD_FOLDER /DAppVersion=$APP_VERSION /DRoot=$Destination /DSource=$Source $Source/Shared/copyq.iss"

installer="$APPVEYOR_BUILD_FOLDER/copyq-$APP_VERSION-setup.exe"
appveyor PushArtifact "$installer" -DeploymentName "CopyQ Setup"

# Test installer
cmd " /c $APPVEYOR_BUILD_FOLDER/copyq-$APP_VERSION-setup.exe /VERYSILENT /suppressmsgboxes"
cmd " /c $installer /VERYSILENT /SUPPRESSMSGBOXES"
"C:/Program Files (x86)/CopyQ/copyq.exe" --version

# Test installer can close the app safely
(
sleep 5
cmd " /c $APPVEYOR_BUILD_FOLDER/copyq-$APP_VERSION-setup.exe /VERYSILENT"
# Wait for CopyQ to start
"C:/Program Files (x86)/CopyQ/copyq.exe" ""
cmd " /c $installer /VERYSILENT /SUPPRESSMSGBOXES"
) &
installer_pid=$!
export COPYQ_LOG_LEVEL=DEBUG
"C:/Program Files (x86)/CopyQ/copyq.exe"
wait
wait "$installer_pid"

0 comments on commit bb00c57

Please sign in to comment.