Add windows Inno Setup to Appveyor

This commit is contained in:
Yuriy Puchkov
2020-06-26 15:56:21 +03:00
parent 2c46e1eb1f
commit 099b9efa72
3 changed files with 117 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
image: Visual Studio 2017
image: Visual Studio 2015
version: 0.6.{build}.0
# Major_Version_Number.Minor_Version_Number.Build_Number.Revision_Number
@@ -9,12 +9,12 @@ branches:
environment:
COMPILER: msvc
VSVER: 14.16
VSVER: 14
matrix:
- QT: C:\Qt\5.12\msvc2017_64
- QT: C:\Qt\5.9\msvc2015_64
PLATFORM: amd64
- QT: C:\Qt\5.12\msvc2017
- QT: C:\Qt\5.9\msvc2015
PLATFORM: x86
init:
- ps: |
@@ -30,6 +30,8 @@ install:
# scripts that run before build
before_build:
- call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %PLATFORM%
- appveyor DownloadFile http://mlaan2.home.xs4all.nl/ispack/innosetup-6.0.5.exe
- innosetup-6.0.5.exe /VERYSILENT /ALLUSERS /DIR=C:\InnoSetup
# After calling vcvarsall.bat, %PLATFORM% will be X64 or x86
- qmake --version
- mkdir build
@@ -63,6 +65,9 @@ after_build:
- cd distrib
- 7z a flameshot_%flameshot_version%_win_%PLATFORM%.zip flameshot
- appveyor-retry curl --upload-file ./flameshot_%flameshot_version%_win_%PLATFORM%.zip https://transfer.sh/flameshot_%flameshot_version%_win_%PLATFORM%.zip
- cp ..\..\win_setup\flameshot.iss flameshot.iss
- C:\InnoSetup\Compil32.exe /cc flameshot.iss
- appveyor-retry curl --upload-file ./Output/FlameShot-Setup-is.exe https://transfer.sh/flameshot_%flameshot_version%_win_%PLATFORM%_setup.exe
# artifacts:

54
win-setup/flameshot.iss Normal file
View File

@@ -0,0 +1,54 @@
; -- Example3.iss --
; Same as Example1.iss, but creates some registry entries too and allows the end
; use to choose the install mode (administrative or non administrative).
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=FlameShot
AppVersion=1.0.0.1
AppCopyright=NameCheap inc.
VersionInfoVersion=1.0.0.1
WizardStyle=modern
DefaultDirName={autopf}\FlameShot
DefaultGroupName=FlameShot
UninstallDisplayIcon={app}\flameshot.exe
Compression=lzma2
SolidCompression=yes
;OutputDir=userdocs:Inno Setup Examples Output
OutputBaseFilename=FlameShot-Setup-is
ChangesAssociations=yes
UserInfoPage=yes
PrivilegesRequiredOverridesAllowed=dialog
AppPublisher=Namecheap, Inc.
AppPublisherURL=https://www.namecheap.com/
; "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f "C:\MY_CODE_SIGNING.PFX" /t http://timestamp.comodoca.com/authenticode /p MY_PASSWORD $f
[Files]
Source: "flameshot\*"; DestDir: "{app}"
Source: "flameshot\bearer\*"; DestDir: "{app}\bearer"
Source: "flameshot\iconengines\*"; DestDir: "{app}\iconengines"
Source: "flameshot\imageformats\*"; DestDir: "{app}\imageformats"
Source: "flameshot\platforms\*"; DestDir: "{app}\platforms"
Source: "flameshot\translations\*"; DestDir: "{app}\translations"
[Icons]
Name: "{group}\FlameShot"; Filename: "{app}\flameshot.exe"
; NOTE: Most apps do not need registry entries to be pre-created. If you
; don't know what the registry is or if you need to use it, then chances are
; you don't need a [Registry] section.
[UninstallRun]
Filename: "taskkill"; Parameters: "/im ""flameshot.exe"" /f"; Flags: runhidden
[Code]
function ShouldSkipPage(PageID: Integer): Boolean;
begin
// User specific pages should be skipped in administrative install mode
Result := IsAdminInstallMode and (PageID = wpUserInfo);
end;

54
win_setup/flameshot.iss Normal file
View File

@@ -0,0 +1,54 @@
; -- Example3.iss --
; Same as Example1.iss, but creates some registry entries too and allows the end
; use to choose the install mode (administrative or non administrative).
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!
[Setup]
AppName=FlameShot
AppVersion=1.0.0.1
AppCopyright=NameCheap inc.
VersionInfoVersion=1.0.0.1
WizardStyle=modern
DefaultDirName={autopf}\FlameShot
DefaultGroupName=FlameShot
UninstallDisplayIcon={app}\flameshot.exe
Compression=lzma2
SolidCompression=yes
;OutputDir=userdocs:Inno Setup Examples Output
OutputBaseFilename=FlameShot-Setup-is
ChangesAssociations=yes
UserInfoPage=yes
PrivilegesRequiredOverridesAllowed=dialog
AppPublisher=Namecheap, Inc.
AppPublisherURL=https://www.namecheap.com/
; "C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Bin\signtool.exe" sign /f "C:\MY_CODE_SIGNING.PFX" /t http://timestamp.comodoca.com/authenticode /p MY_PASSWORD $f
[Files]
Source: "flameshot\*"; DestDir: "{app}"
Source: "flameshot\bearer\*"; DestDir: "{app}\bearer"
Source: "flameshot\iconengines\*"; DestDir: "{app}\iconengines"
Source: "flameshot\imageformats\*"; DestDir: "{app}\imageformats"
Source: "flameshot\platforms\*"; DestDir: "{app}\platforms"
Source: "flameshot\translations\*"; DestDir: "{app}\translations"
[Icons]
Name: "{group}\FlameShot"; Filename: "{app}\flameshot.exe"
; NOTE: Most apps do not need registry entries to be pre-created. If you
; don't know what the registry is or if you need to use it, then chances are
; you don't need a [Registry] section.
[UninstallRun]
Filename: "taskkill"; Parameters: "/im ""flameshot.exe"" /f"; Flags: runhidden
[Code]
function ShouldSkipPage(PageID: Integer): Boolean;
begin
// User specific pages should be skipped in administrative install mode
Result := IsAdminInstallMode and (PageID = wpUserInfo);
end;