feat(widnows-installer): Add compilation windows installer build step
Closes: #2223
This commit is contained in:
parent
a1a2f2f4e2
commit
f0b7eb6789
30
Makefile
30
Makefile
|
@ -369,12 +369,13 @@ $(NIM_WINDOWS_PREBUILT_DLLS):
|
||||||
nim_windows_launcher: | deps
|
nim_windows_launcher: | deps
|
||||||
$(ENV_SCRIPT) nim c -d:debug --outdir:./bin --passL:"-static-libgcc -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive" src/nim_windows_launcher.nim
|
$(ENV_SCRIPT) nim c -d:debug --outdir:./bin --passL:"-static-libgcc -Wl,-Bstatic,--whole-archive -lwinpthread -Wl,--no-whole-archive" src/nim_windows_launcher.nim
|
||||||
|
|
||||||
STATUS_CLIENT_ZIP ?= pkg/Status.zip
|
STATUS_CLIENT_EXE ?= pkg/Status.exe
|
||||||
|
|
||||||
$(STATUS_CLIENT_ZIP): override RESOURCES_LAYOUT := -d:production
|
$(STATUS_CLIENT_EXE): override RESOURCES_LAYOUT := -d:production
|
||||||
$(STATUS_CLIENT_ZIP): OUTPUT := tmp/windows/dist/Status
|
$(STATUS_CLIENT_EXE): OUTPUT := tmp/windows/dist/Status
|
||||||
$(STATUS_CLIENT_ZIP): nim_status_client nim_windows_launcher $(NIM_WINDOWS_PREBUILT_DLLS)
|
$(STATUS_CLIENT_EXE): INSTALLER_OUTPUT := pkg
|
||||||
rm -rf pkg/*.zip tmp/windows/dist
|
$(STATUS_CLIENT_EXE): nim_status_client nim_windows_launcher $(NIM_WINDOWS_PREBUILT_DLLS)
|
||||||
|
rm -rf pkg/*.exe tmp/windows/dist
|
||||||
mkdir -p $(OUTPUT)/bin $(OUTPUT)/resources $(OUTPUT)/vendor $(OUTPUT)/resources/i18n
|
mkdir -p $(OUTPUT)/bin $(OUTPUT)/resources $(OUTPUT)/vendor $(OUTPUT)/resources/i18n
|
||||||
cat windows-install.txt | unix2dos > $(OUTPUT)/INSTALL.txt
|
cat windows-install.txt | unix2dos > $(OUTPUT)/INSTALL.txt
|
||||||
cp status.ico status.svg resources.rcc $(FLEETS) $(OUTPUT)/resources/
|
cp status.ico status.svg resources.rcc $(FLEETS) $(OUTPUT)/resources/
|
||||||
|
@ -390,16 +391,21 @@ $(STATUS_CLIENT_ZIP): nim_status_client nim_windows_launcher $(NIM_WINDOWS_PREBU
|
||||||
windeployqt --compiler-runtime --qmldir ui --release \
|
windeployqt --compiler-runtime --qmldir ui --release \
|
||||||
tmp/windows/dist/Status/bin/DOtherSide.dll
|
tmp/windows/dist/Status/bin/DOtherSide.dll
|
||||||
mv tmp/windows/dist/Status/bin/vc_redist.x64.exe tmp/windows/dist/Status/vendor/
|
mv tmp/windows/dist/Status/bin/vc_redist.x64.exe tmp/windows/dist/Status/vendor/
|
||||||
|
cp status.iss $(OUTPUT)/status.iss
|
||||||
# if WINDOWS_CODESIGN_PFX_PATH is not set then DLLs, EXEs are not signed
|
# if WINDOWS_CODESIGN_PFX_PATH is not set then DLLs, EXEs are not signed
|
||||||
ifdef WINDOWS_CODESIGN_PFX_PATH
|
ifdef WINDOWS_CODESIGN_PFX_PATH
|
||||||
scripts/sign-windows-bin.sh ./tmp/windows/dist/Status
|
scripts/sign-windows-bin.sh ./tmp/windows/dist/Status
|
||||||
endif
|
endif
|
||||||
echo -e $(BUILD_MSG) "zip"
|
echo -e $(BUILD_MSG) "exe"
|
||||||
mkdir -p pkg
|
mkdir -p $(INSTALLER_OUTPUT)
|
||||||
cd $(OUTPUT) && \
|
ISCC \
|
||||||
#7z a ../../../../$(STATUS_CLIENT_ZIP) *
|
-O"$(INSTALLER_OUTPUT)" \
|
||||||
iscc status.iss
|
-D"BaseName=$(shell basename $(STATUS_CLIENT_EXE) .exe)" \
|
||||||
|
-D"Version=$(shell cat VERSION)" \
|
||||||
|
$(OUTPUT)/status.iss
|
||||||
|
ifdef WINDOWS_CODESIGN_PFX_PATH
|
||||||
|
scripts/sign-windows-bin.sh $(INSTALLER_OUTPUT)
|
||||||
|
endif
|
||||||
|
|
||||||
pkg: $(PKG_TARGET)
|
pkg: $(PKG_TARGET)
|
||||||
|
|
||||||
|
@ -409,7 +415,7 @@ tgz-linux: $(STATUS_CLIENT_TARBALL)
|
||||||
|
|
||||||
pkg-macos: check-pkg-target-macos $(STATUS_CLIENT_DMG)
|
pkg-macos: check-pkg-target-macos $(STATUS_CLIENT_DMG)
|
||||||
|
|
||||||
pkg-windows: check-pkg-target-windows $(STATUS_CLIENT_ZIP)
|
pkg-windows: check-pkg-target-windows $(STATUS_CLIENT_EXE)
|
||||||
|
|
||||||
clean: | clean-common
|
clean: | clean-common
|
||||||
rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSGO)
|
rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSGO)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
library 'status-jenkins-lib@v1.2.18'
|
library 'status-jenkins-lib@feat/windows-installer'
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent { label 'windows' }
|
agent { label 'windows' }
|
||||||
|
@ -30,7 +30,7 @@ pipeline {
|
||||||
/* Disable colors in Nim compiler logs */
|
/* Disable colors in Nim compiler logs */
|
||||||
NIMFLAGS = '--colors:off'
|
NIMFLAGS = '--colors:off'
|
||||||
/* Control output the filename */
|
/* Control output the filename */
|
||||||
STATUS_CLIENT_ZIP = "pkg/${utils.pkgFilename('zip')}"
|
STATUS_CLIENT_EXE = "pkg/${utils.pkgFilename('exe')}"
|
||||||
/* RFC 3161 timestamping URL for DigiCert */
|
/* RFC 3161 timestamping URL for DigiCert */
|
||||||
WINDOWS_CODESIGN_TIMESTAMP_URL = 'http://timestamp.digicert.com'
|
WINDOWS_CODESIGN_TIMESTAMP_URL = 'http://timestamp.digicert.com'
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ pipeline {
|
||||||
|
|
||||||
stage('Package') {
|
stage('Package') {
|
||||||
steps { script {
|
steps { script {
|
||||||
windows.bundle()
|
windows.bundle(env.STATUS_CLIENT_EXE)
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,13 +65,13 @@ pipeline {
|
||||||
parallel {
|
parallel {
|
||||||
stage('Upload') {
|
stage('Upload') {
|
||||||
steps { script {
|
steps { script {
|
||||||
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_ZIP)
|
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_EXE)
|
||||||
jenkins.setBuildDesc(Zip: env.PKG_URL)
|
jenkins.setBuildDesc(Exe: env.PKG_URL)
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
stage('Archive') {
|
stage('Archive') {
|
||||||
steps { script {
|
steps { script {
|
||||||
archiveArtifacts(env.STATUS_CLIENT_ZIP)
|
archiveArtifacts(env.STATUS_CLIENT_EXE)
|
||||||
} }
|
} }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,9 @@ export VCINSTALLDIR="/c/BuildTools/VC"
|
||||||
|
|
||||||
You might also have to include the following paths in your `$PATH:
|
You might also have to include the following paths in your `$PATH:
|
||||||
|
|
||||||
export PATH=`"/c/BuildTools/MSBuild/Current/Bin:/c/BuildTools/VC/Tools/MSVC/14.27.29110/bin:`$PATH`"
|
export PATH=`"/c/BuildTools/MSBuild/Current/Bin:`$PATH`"
|
||||||
|
export PATH=`"/c/BuildTools/VC/Tools/MSVC/14.27.29110/bin:`$PATH`"
|
||||||
|
export PATH=`"/c/ProgramData/scoop/apps/inno-setup/current:`$PATH`"
|
||||||
"@
|
"@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
32
status.iss
32
status.iss
|
@ -1,5 +1,4 @@
|
||||||
#define Name "Status"
|
#define Name "Status"
|
||||||
#define Version "0.0.1"
|
|
||||||
#define Publisher "Status.im"
|
#define Publisher "Status.im"
|
||||||
#define URL "https://status.im"
|
#define URL "https://status.im"
|
||||||
#define ExeName "Status.exe"
|
#define ExeName "Status.exe"
|
||||||
|
@ -16,14 +15,17 @@ AppPublisherURL={#URL}
|
||||||
AppSupportURL={#URL}
|
AppSupportURL={#URL}
|
||||||
AppUpdatesURL={#URL}
|
AppUpdatesURL={#URL}
|
||||||
|
|
||||||
|
WizardStyle=modern
|
||||||
|
|
||||||
|
UninstallDisplayIcon={app}\Status.exe
|
||||||
|
|
||||||
; Defalut install path
|
; Defalut install path
|
||||||
DefaultDirName={pf}\{#Name}
|
DefaultDirName={commonpf}\{#Name}
|
||||||
|
|
||||||
DefaultGroupName={#Name}
|
DefaultGroupName={#Name}
|
||||||
|
|
||||||
; output dir for installer
|
; output dir for installer
|
||||||
OutputDir=.
|
OutputBaseFileName={#BaseName}
|
||||||
OutputBaseFileName=status-setup
|
|
||||||
|
|
||||||
; Icon file
|
; Icon file
|
||||||
SetupIconFile=resources\status.ico
|
SetupIconFile=resources\status.ico
|
||||||
|
@ -32,25 +34,35 @@ SetupIconFile=resources\status.ico
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
|
|
||||||
;[Languages] - if needed
|
[Languages]
|
||||||
;Name: "english"; MessagesFile: "compiler:Default.isl"; LicenseFile: "License_ENG.txt"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
;Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"; LicenseFile: "License_RUS.txt"
|
Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
|
||||||
|
Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
|
||||||
|
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
|
||||||
|
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
|
||||||
|
Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
|
||||||
|
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
|
||||||
|
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
|
||||||
|
Name: "ua"; MessagesFile: "compiler:Languages\Ukrainian.isl"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
|
|
||||||
; Path to exe on
|
; Path to exe on
|
||||||
Source: "Status.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: {#ExeName}; DestDir: "{app}"; Flags: ignoreversion
|
||||||
|
|
||||||
; Resources
|
; Resources
|
||||||
Source: "bin\Status.exe"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "bin\*"; DestDir: "{app}\bin"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
|
||||||
Source: "resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "resources\*"; DestDir: "{app}\resources"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
|
||||||
Source: "vendor\*"; DestDir: "{app}\vendor"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "vendor\*"; DestDir: "{app}\vendor"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
|
||||||
|
[UninstallDelete]
|
||||||
|
Type: filesandordirs; Name: "{app}"
|
||||||
|
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
Root: HKCU; Subkey: "Software\Classes\status-im"; ValueType: "string"; ValueData: "URL:status-im protocol"; Flags: uninsdeletekey
|
Root: HKCU; Subkey: "Software\Classes\status-im"; ValueType: "string"; ValueData: "URL:status-im protocol"; Flags: uninsdeletekey
|
||||||
Root: HKCU; Subkey: "Software\Classes\status-im"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
|
Root: HKCU; Subkey: "Software\Classes\status-im"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
|
||||||
Root: HKCU; Subkey: "Software\Classes\status-im\DefaultIcon"; ValueType: "string"; ValueData: "{app}\Status.exe,1"
|
Root: HKCU; Subkey: "Software\Classes\status-im\DefaultIcon"; ValueType: "string"; ValueData: "{app}\Status.exe,1"
|
||||||
Root: HKCU; Subkey: "Software\Classes\status-im\shell\open\command"; ValueType: "string"; ValueData: """{app}\Status.exe"" "--url="%1"""
|
Root: HKCU; Subkey: "Software\Classes\status-im\shell\open\command"; ValueType: "string"; ValueData: """{app}\Status.exe"" ""--url=""%1"""
|
Loading…
Reference in New Issue