Browse Source

integrating changes from tests in flutter_app

nsis
Dan Ballard 3 months ago
parent
commit
bd29ad8d4c
  1. 50
      .drone.yml
  2. 6
      windows/nsis/create.sh
  3. 10
      windows/nsis/cwtch-installer.nsi

50
.drone.yml

@ -11,7 +11,7 @@ steps:
image: cirrusci/flutter:dev
environment:
buildbot_key_b64:
from_secret: buildbot_key_b64
from_secret: buildbot_key_b64
commands:
- mkdir ~/.ssh
- echo $buildbot_key_b64 > ~/.ssh/id_rsa.b64
@ -68,8 +68,8 @@ steps:
- name: test-build-android
image: cirrusci/flutter:dev
when:
event: pull_request
when:
event: pull_request
volumes:
- name: deps
path: /root/.pub-cache
@ -106,7 +106,7 @@ steps:
- name: deps
path: /root/.pub-cache
commands:
# - flutter config --enable-linux-desktop
# - flutter config --enable-linux-desktop
- flutter test --coverage
- genhtml coverage/lcov.info -o coverage/html
@ -209,21 +209,10 @@ steps:
- name: build-windows
image: openpriv/flutter-desktop:windows-sdk30-fdev2.3rc
environment:
pfx:
from_secret: pfx
pfx_pass:
from_secret: pfx_pass
commands:
- flutter pub get
- $Env:version += type .\VERSION
- $Env:builddate += type .\BUILDDATE
- $Env:buildname = 'flwtch-win-' + $Env:version + '-' + $Env:builddate
- $Env:builddir = $Env:buildname
- $Env:zip = 'cwtch-' + $Env:version + '.zip'
- $Env:zipsha = $Env:zip + '.sha512'
- $Env:msix = 'cwtch-install-' + $Env:version + '.msix'
- $Env:msixsha = $Env:msix + '.sha512'
- $Env:releasedir = "build\\windows\\runner\\Release\\"
- flutter build windows --dart-define BUILD_VER=$Env:version --dart-define BUILD_DATE=$Env:builddate
- copy windows\libCwtch.dll $Env:releasedir
@ -234,15 +223,32 @@ steps:
- copy C:\BuildTools\VC\Redist\MSVC\14.29.30036\x64\Microsoft.VC142.CRT\vcruntime140_1.dll $Env:releasedir
- copy C:\BuildTools\VC\Redist\MSVC\14.29.30036\x64\Microsoft.VC142.CRT\msvcp140.dll $Env:releasedir
- powershell -command "Expand-Archive -Path tor.zip -DestinationPath $Env:releasedir\Tor"
- name: package-windows
image: openpriv/nsis:latest
environment:
pfx:
from_secret: pfx
pfx_pass:
from_secret: pfx_pass
commands:
- $Env:version += type .\VERSION
- $Env:builddate += type .\BUILDDATE
- $Env:releasedir = "build\\windows\\runner\\Release\\"
- $Env:zip = 'cwtch-' + $Env:version + '.zip'
- $Env:zipsha = $Env:zip + '.sha512'
- $Env:msix = 'cwtch-install-' + $Env:version + '.msix'
- $Env:msixsha = $Env:msix + '.sha512'
- $Env:buildname = 'flwtch-win-' + $Env:version + '-' + $Env:builddate
- $Env:builddir = $Env:buildname
- echo $Env:pfx > codesign.pfx.b64
- certutil -decode codesign.pfx.b64 codesign.pfx
- C:\MSIX-Toolkit\MSIX-Toolkit.x64\signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com $Env:releasedir\cwtch.exe
- copy window\runner\resources\knot_128.ico $Env:releasedir\cwtch.ico
- signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com $Env:releasedir\cwtch.exe
- copy windows\runner\resources\knot_128.ico $Env:releasedir\cwtch.ico
- makensis windows\nsis\cwtch-installer.nsi
- C:\MSIX-Toolkit\MSIX-Toolkit.x64\signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com cwtch-installer.exe
- move windows\nsis\cwtch-installer.exe cwtch-installer.exe
- signtool sign /v /fd sha256 /a /f codesign.pfx /p $Env:pfx_pass /tr http://timestamp.digicert.com cwtch-installer.exe
- powershell -command "(Get-FileHash cwtch-installer.exe -Algorithm sha512).Hash" > cwtch-installer.sha512
- mkdir deploy
- mkdir deploy\$Env:builddir
- move $Env:releasedir $Env:builddir
@ -255,8 +261,8 @@ steps:
- name: deploy-windows
image: openpriv/flutter-desktop:windows-sdk30-fdev2.3rc
when:
event: push
status: [ success ]
event: push
status: [ success ]
environment:
BUILDFILES_KEY:
from_secret: buildfiles_key

6
windows/nsis/create.sh

@ -1,6 +0,0 @@
- cp nsis/cwtch-installer.nsi deploy/
- cd deploy
- makensis -V3 cwtch-installer.nsi
- export BUILDDATE=`date +%G-%m-%d-%H-%M`
- export FILENAME=cwtch-installer-$BUILDDATE.exe
- mv cwtch-installer.exe $FILENAME

10
windows/nsis/cwtch-installer.nsi

@ -27,14 +27,14 @@ InstallDirRegKey HKCU "Software\Cwtch" "installLocation"
!define MUI_INSTALLCOLORS "DFB9DE 281831"
; 128x128, 32bit
!define MUI_ICON "windows/runner/resources/knot_128.ico"
!define MUI_ICON "../runner/resources/knot_128.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_BITMAP "windows/nsis/cwtch_title.bmp"
!define MUI_HEADERIMAGE_BITMAP "cwtch_title.bmp"
!define MUI_TEXTCOLOR "350052"
!define MUI_WELCOMEFINISHPAGE_BITMAP "windows/nsis/brand_side.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP "brand_side.bmp"
!define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH NoStretchNoCrop
!define MUI_INSTFILESPAGE_COLORS "DFB9DE 281831"
@ -60,7 +60,7 @@ ShowInstDetails show
!define MUI_FINISHPAGE_LINK_COLOR "D01972"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE"
!insertmacro MUI_PAGE_LICENSE "../../LICENSE"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
@ -78,7 +78,7 @@ Section
# define what to install and place it in the output path
# Filler for .sh to populate with contents of deploy/windows
#FILESLISTSTART
FILE /r "build/windows/runner/Release/"
FILE /r "..\..\build\windows\runner\Release\"
#FILESLISTEND

Loading…
Cancel
Save