diff --git a/appveyor.yml b/appveyor.yml index 6830748f7..81804dcf8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -420,6 +420,7 @@ for: $env:CRASH_SHORT_SHA = git log --pretty=format:%h -n 1 } + - ps: scripts/install_dump_sysms.ps1 - if "%WITH_CRASH_REPORTING%" == "True" (python3 scripts/symupload.py %APPVEYOR_BUILD_FOLDER%\build\install-root\valentina $VALENTINA_VERSION $CRASH_SHORT_SHA $CRASH_QT_VERSION --clean) - if "%DEPLOY%" == "true" (qbs build -f valentina.qbs -d %APPVEYOR_BUILD_FOLDER%\build -p ValentinaSetup --jobs %NUMBER_OF_PROCESSORS% config:release qbs.installRoot:%APPVEYOR_BUILD_FOLDER%\build\install-root\valentina profile:qt6 project.enableConan:true project.conanWithCrashReporting:true project.conanWithXerces:true modules.buildconfig.enableCcache:false project.conanProfiles:valentina modules.buildconfig.enablePCH:%ENABLE_PCH% modules.windeployqt.windeployqtProgramBinPath:%WINDEPLOYQT_BIN_PATH% modules.windeployqt.compilerRuntime:%WINDEPLOYQT_COMPILER_RUNTIME% modules.windeployqt.noCompilerRuntime:%WINDEPLOYQT_NO_COMPILER_RUNTIME%) - ps: scripts/appveyor-deploy.ps1 diff --git a/scripts/install_dump_sysms.ps1 b/scripts/install_dump_sysms.ps1 new file mode 100644 index 000000000..c2c25a776 --- /dev/null +++ b/scripts/install_dump_sysms.ps1 @@ -0,0 +1,25 @@ +# Check if WITH_CRASH_REPORTING environment variable is set to True +if ($env:WITH_CRASH_REPORTING -eq "True") { + # Define URLs and file paths + $archiveUrl = "https://github.com/mozilla/dump_syms/releases/download/v2.3.1/dump_syms-x86_64-pc-windows-msvc.zip" + $downloadPath = "$env:TEMP\dump_syms.zip" + $extractPath = "$env:TEMP\dump_syms" + + # Download the archive + Invoke-WebRequest -Uri $archiveUrl -OutFile $downloadPath + + # Extract the archive + Expand-Archive -Path $downloadPath -DestinationPath $extractPath -Force + + # Add the directory containing dump_syms to the PATH environment variable + $env:Path += ";$extractPath" + + # Check if dump_syms is callable + if (Test-Path (Join-Path $extractedFolderPath "dump_syms.exe")) { + Write-Host "dump_syms utility installed successfully and added to PATH." + } else { + Write-Host "Failed to install dump_syms utility." + } +} else { + Write-Host "Skipping dump_syms installation." +}