appveyor.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. image: Visual Studio 2015
  2. version: 0.6.{build}.0
  3. # Major_Version_Number.Minor_Version_Number.Build_Number.Revision_Number
  4. branches:
  5. only:
  6. - master
  7. environment:
  8. COMPILER: msvc
  9. VSVER: 14
  10. matrix:
  11. - QT: C:\Qt\5.9\msvc2015_64
  12. PLATFORM: amd64
  13. - QT: C:\Qt\5.9\msvc2015
  14. PLATFORM: x86
  15. init:
  16. - ps: |
  17. $version = new-object System.Version $env:APPVEYOR_BUILD_VERSION
  18. $packageVersion = "{0}.{1}.{2}" -f $version.Major, $version.Minor, $version.Revision
  19. $env:build_number = $version.Build
  20. $env:flameshot_version = $packageVersion
  21. # scripts that run after cloning repository
  22. install:
  23. - set PATH=%QT%\bin\;C:\Qt\Tools\QtCreator\bin\;C:\Qt\QtIFW3.0.1\bin\;%PATH%
  24. # scripts that run before build
  25. before_build:
  26. - call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
  27. # After calling vcvarsall.bat, %PLATFORM% will be X64 or x86
  28. - qmake --version
  29. - mkdir build
  30. - cd build
  31. - if "%PLATFORM%" EQU "X64" (qmake -r -spec win32-msvc CONFIG+=x86_64 CONFIG-=debug CONFIG+=release ../flameshot.pro)
  32. - if "%PLATFORM%" EQU "x86" (qmake -r -spec win32-msvc CONFIG+=Win32 CONFIG-=debug CONFIG+=release ../flameshot.pro)
  33. # custom build scripts
  34. build_script:
  35. - nmake
  36. # scripts that run after build
  37. after_build:
  38. # Clone OpenSSL DLLs
  39. - git clone https://github.com/tamlok/openssl-utils.git openssl-utils.git
  40. - mkdir distrib\flameshot
  41. - windeployqt.exe --dir .\distrib\flameshot %APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe
  42. - copy "%APPVEYOR_BUILD_FOLDER%\build\release\flameshot.exe" "distrib\flameshot\flameshot.exe"
  43. - copy "%APPVEYOR_BUILD_FOLDER%\README.md" "distrib\flameshot\README.md"
  44. - copy "%APPVEYOR_BUILD_FOLDER%\LICENSE" "distrib\flameshot\LICENSE.txt"
  45. - echo %flameshot_version% > "distrib\flameshot\version.txt"
  46. - echo Build:%build_number% >> "distrib\flameshot\version.txt"
  47. - echo %APPVEYOR_REPO_COMMIT% >> "distrib\flameshot\version.txt"
  48. - copy "distrib\flameshot\flameshot.exe" "distrib\flameshot_win_%PLATFORM%.exe"
  49. - copy "%APPVEYOR_BUILD_FOLDER%\build\translations\Internationalization_*.qm" "distrib\flameshot\translations"
  50. # Delete translations\qt_*.qm
  51. - del /F /Q "distrib\flameshot\translations\qt_*.qm"
  52. # Copy OpenSSL DLLs
  53. - if "%PLATFORM%" EQU "X64" (xcopy "openssl-utils.git\win64\*.dll" "distrib\flameshot")
  54. - if "%PLATFORM%" EQU "x86" (xcopy "openssl-utils.git\win32\*.dll" "distrib\flameshot")
  55. - cd distrib
  56. - 7z a flameshot_%flameshot_version%_win_%PLATFORM%.zip flameshot
  57. - curl --upload-file ./flameshot_%flameshot_version%_win_%PLATFORM%.zip https://transfer.sh/flameshot_%flameshot_version%_win_%PLATFORM%.zip
  58. # artifacts:
  59. # - path: build\distrib\flameshot_win_%PLATFORM%_portable_%flameshot_version%.zip
  60. # name: portable
  61. # - path: build\distrib\flameshot_win_%PLATFORM%.exe
  62. # name: exe_only