diff --git a/.drone.yml b/.drone.yml index 4105fd6..f6c3a52 100644 --- a/.drone.yml +++ b/.drone.yml @@ -218,40 +218,50 @@ steps: - git describe --tags > VERSION - powershell -command "Get-Date -Format 'yyyy-MM-dd-HH-mm'" > BUILDDATE - .\fetch-libcwtch-go.ps1 - - + - name: build-windows image: openpriv/flutter-desktop:windows-sdk30-fdev2.3rc + environment: + pfx: + from_secret: pfx + pfx_pass: + from_secret: pfx_pass commands: + - move pubspec.yaml pubspec.yaml.orig + - (Get-Content -path pubspec.yaml.orig -Raw) -Replace 'pfx_pass',"$Env:pfx_pass" | Set-Content -path pubspec.yaml - flutter pub get - # flwtch-`cat VERSION`-`cat BUILDDATE` - - $Env:buildname = 'flwtch-win-' - $Env:version += type .\VERSION - - $Env:buildname += $Env:version - - $Env:buildname += '-' - $Env:builddate += type .\BUILDDATE - - $Env:buildname += $Env:builddate - - $Env:builddir += $Env:buildname - - $Env:zip = 'cwtch-' - - $Env:zip += $Env:version - - $Env:zip += '.zip' - - $Env:sha = $Env:zip - - $Env:sha += '.sha512' + - $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\\" + - echo $Env:releasedir + - echo $Env:builddir - flutter build windows --dart-define BUILD_VER=$Env:version --dart-define BUILD_DATE=$Env:builddate - - mkdir deploy - - move build\\windows\\runner\\Release $Env:builddir - - copy windows\libCwtch.dll $Env:builddir + - copy windows\libCwtch.dll $Env:releasedir # flutter hasn't worked out it's packaging of required dll's so we have to resort to this manual nonsense # https://github.com/google/flutter-desktop-embedding/issues/587 # https://github.com/flutter/flutter/issues/53167 - - copy C:\BuildTools\VC\Redist\MSVC\14.29.30036\x64\Microsoft.VC142.CRT\vcruntime140.dll $Env:builddir - - copy C:\BuildTools\VC\Redist\MSVC\14.29.30036\x64\Microsoft.VC142.CRT\vcruntime140_1.dll $Env:builddir - - copy C:\BuildTools\VC\Redist\MSVC\14.29.30036\x64\Microsoft.VC142.CRT\msvcp140.dll $Env:builddir - - powershell -command "Expand-Archive -Path tor.zip -DestinationPath $Env:builddir\Tor" - - powershell -command "Compress-Archive -Path $Env:builddir -DestinationPath $Env:zip" - - powershell -command "(Get-FileHash *.zip -Algorithm sha512).Hash" > $Env:sha + - copy C:\BuildTools\VC\Redist\MSVC\14.29.30036\x64\Microsoft.VC142.CRT\vcruntime140.dll $Env:releasedir + - 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" + - dir $Env:releasedir + - echo $Env:pfx > codesign.pfx.b64 + - certutil -decode codesign.pfx.b64 codesign.pfx + - flutter pub run msix:create + - mkdir deploy - mkdir deploy\$Env:builddir - - move $Env:zip deploy\$Env:builddir - - move $Env:sha deploy\$Env:builddir + - dir deploy + - powershell -command "move $Env:releasedir\cwtch.msix deploy\$Env:builddir\$Env:msix" + - move $Env:releasedir $Env:builddir + - powershell -command "Compress-Archive -Path $Env:builddir -DestinationPath $Env:zip" + - powershell -command "move $Env:zip deploy\$Env:builddir\" + - powershell -command "(Get-FileHash deploy\$Env:builddir\$Env:zip -Algorithm sha512).Hash" > deploy\$Env:builddir\$Env:sha - name: deploy-windows image: openpriv/flutter-desktop:windows-sdk30-fdev2.3rc diff --git a/pubspec.lock b/pubspec.lock index 3db29ce..c59f48b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -428,15 +428,6 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.1" - window_size: - dependency: "direct main" - description: - path: "plugins/window_size" - ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81 - resolved-ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81 - url: "git://github.com/google/flutter-desktop-embedding.git" - source: git - version: "0.1.0" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 31814d3..7e0eca9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -45,12 +45,8 @@ dependencies: flutter_driver: sdk: flutter - window_size: - git: - url: git://github.com/google/flutter-desktop-embedding.git - path: plugins/window_size - ref: e48abe7c3e9ebfe0b81622167c5201d4e783bb81 - +dev_dependencies: + msix: ^2.1.3 # Uncomment to update lokalise translations (see README for list of deps to comment out bc incompatibilities) #dev_dependencies: # flutter_lokalise: any @@ -116,3 +112,19 @@ flutter: # # For details regarding fonts from package dependencies, # see https://flutter.dev/custom-fonts/#from-packages + + +msix_config: + display_name: Cwtch + publisher_display_name: Open Privacy Research Society + identity_name: im.cwtch.flwtch + msix_version: 1.0.0.0 + certificate_path: codesign.pfx + certificate_password: pfx_pass + publisher: CN=Open Privacy Research Society, O=Open Privacy Research Society, L=Vancouver, S=British Columbia, C=CA + logo_path: cwtch.png + start_menu_icon_path: cwtch.png + tile_icon_path: assets\cwtch_title.png + icons_background_color: transparent + architecture: x64 + capabilities: 'internetClient'