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
|
||||
$(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_ZIP): OUTPUT := tmp/windows/dist/Status
|
||||
$(STATUS_CLIENT_ZIP): nim_status_client nim_windows_launcher $(NIM_WINDOWS_PREBUILT_DLLS)
|
||||
rm -rf pkg/*.zip tmp/windows/dist
|
||||
$(STATUS_CLIENT_EXE): override RESOURCES_LAYOUT := -d:production
|
||||
$(STATUS_CLIENT_EXE): OUTPUT := tmp/windows/dist/Status
|
||||
$(STATUS_CLIENT_EXE): INSTALLER_OUTPUT := pkg
|
||||
$(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
|
||||
cat windows-install.txt | unix2dos > $(OUTPUT)/INSTALL.txt
|
||||
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 \
|
||||
tmp/windows/dist/Status/bin/DOtherSide.dll
|
||||
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
|
||||
ifdef WINDOWS_CODESIGN_PFX_PATH
|
||||
scripts/sign-windows-bin.sh ./tmp/windows/dist/Status
|
||||
endif
|
||||
echo -e $(BUILD_MSG) "zip"
|
||||
mkdir -p pkg
|
||||
cd $(OUTPUT) && \
|
||||
#7z a ../../../../$(STATUS_CLIENT_ZIP) *
|
||||
iscc status.iss
|
||||
|
||||
echo -e $(BUILD_MSG) "exe"
|
||||
mkdir -p $(INSTALLER_OUTPUT)
|
||||
ISCC \
|
||||
-O"$(INSTALLER_OUTPUT)" \
|
||||
-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)
|
||||
|
||||
|
@ -409,7 +415,7 @@ tgz-linux: $(STATUS_CLIENT_TARBALL)
|
|||
|
||||
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
|
||||
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 {
|
||||
agent { label 'windows' }
|
||||
|
@ -30,7 +30,7 @@ pipeline {
|
|||
/* Disable colors in Nim compiler logs */
|
||||
NIMFLAGS = '--colors:off'
|
||||
/* Control output the filename */
|
||||
STATUS_CLIENT_ZIP = "pkg/${utils.pkgFilename('zip')}"
|
||||
STATUS_CLIENT_EXE = "pkg/${utils.pkgFilename('exe')}"
|
||||
/* RFC 3161 timestamping URL for DigiCert */
|
||||
WINDOWS_CODESIGN_TIMESTAMP_URL = 'http://timestamp.digicert.com'
|
||||
}
|
||||
|
@ -57,7 +57,7 @@ pipeline {
|
|||
|
||||
stage('Package') {
|
||||
steps { script {
|
||||
windows.bundle()
|
||||
windows.bundle(env.STATUS_CLIENT_EXE)
|
||||
} }
|
||||
}
|
||||
|
||||
|
@ -65,13 +65,13 @@ pipeline {
|
|||
parallel {
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_ZIP)
|
||||
jenkins.setBuildDesc(Zip: env.PKG_URL)
|
||||
env.PKG_URL = s3.uploadArtifact(env.STATUS_CLIENT_EXE)
|
||||
jenkins.setBuildDesc(Exe: env.PKG_URL)
|
||||
} }
|
||||
}
|
||||
stage('Archive') {
|
||||
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:
|
||||
|
||||
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 Version "0.0.1"
|
||||
#define Publisher "Status.im"
|
||||
#define URL "https://status.im"
|
||||
#define ExeName "Status.exe"
|
||||
|
@ -16,14 +15,17 @@ AppPublisherURL={#URL}
|
|||
AppSupportURL={#URL}
|
||||
AppUpdatesURL={#URL}
|
||||
|
||||
WizardStyle=modern
|
||||
|
||||
UninstallDisplayIcon={app}\Status.exe
|
||||
|
||||
; Defalut install path
|
||||
DefaultDirName={pf}\{#Name}
|
||||
DefaultDirName={commonpf}\{#Name}
|
||||
|
||||
DefaultGroupName={#Name}
|
||||
|
||||
; output dir for installer
|
||||
OutputDir=.
|
||||
OutputBaseFileName=status-setup
|
||||
OutputBaseFileName={#BaseName}
|
||||
|
||||
; Icon file
|
||||
SetupIconFile=resources\status.ico
|
||||
|
@ -32,25 +34,35 @@ SetupIconFile=resources\status.ico
|
|||
Compression=lzma
|
||||
SolidCompression=yes
|
||||
|
||||
;[Languages] - if needed
|
||||
;Name: "english"; MessagesFile: "compiler:Default.isl"; LicenseFile: "License_ENG.txt"
|
||||
;Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"; LicenseFile: "License_RUS.txt"
|
||||
[Languages]
|
||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||
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]
|
||||
|
||||
; Path to exe on
|
||||
Source: "Status.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||
Source: {#ExeName}; DestDir: "{app}"; Flags: ignoreversion
|
||||
|
||||
; 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: "vendor\*"; DestDir: "{app}\vendor"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||
|
||||
[UninstallDelete]
|
||||
Type: filesandordirs; Name: "{app}"
|
||||
|
||||
|
||||
[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"; 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\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