YehudaKremer / msix

Create Msix installer for flutter windows-build files.
https://pub.dev/packages/msix
MIT License
278 stars 69 forks source link

[BUG] cetificate installer not working #106

Closed abdelaziz-mahdy closed 2 years ago

abdelaziz-mahdy commented 2 years ago

:information_source: Info

Version: 3.1.4

:speech_balloon: Description

i did try the cetificate installer but it doesnt work on the other pcs

i did also try windows sandbox to ensure if it works or not still it doesnt

image

**Enter a description of your problem here.

  +71 ms] executing: [G:\My Work HDD2\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[ +461 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] db747aa1331bd95bc9b3874c842261ca2d302cd5
[   +2 ms] executing: [G:\My Work HDD2\flutter/] git tag --points-at db747aa1331bd95bc9b3874c842261ca2d302cd5
[  +74 ms] Exit code 0 from: git tag --points-at db747aa1331bd95bc9b3874c842261ca2d302cd5
[   +3 ms] 2.10.1
[   +8 ms] executing: [G:\My Work HDD2\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +44 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +2 ms] origin/stable
[   +1 ms] executing: [G:\My Work HDD2\flutter/] git ls-remote --get-url origin
[  +43 ms] Exit code 0 from: git ls-remote --get-url origin
[   +2 ms] https://github.com/flutter/flutter.git
[ +118 ms] executing: [G:\My Work HDD2\flutter/] git rev-parse --abbrev-ref HEAD
[  +46 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +2 ms] stable
[  +71 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +53 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[   +1 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[   +4 ms] Artifact Instance of 'PubDependencies' is not required, skipping update.
[ +116 ms] executing: G:\My Work HDD2\flutter\bin\cache\dart-sdk\bin\dart __deprecated_pub run msix:create --build-windows false --with-test-certificate-installer -v
[     0.008s] parsing cli arguments
[     0.118s] validating config values
[     0.121s] creating msix installer...
[     0.122s] validating build files
[     0.134s] cleaning temporary files
[     0.153s] create app icons
[     0.160s] generating icons
[     2.720s] copying VC libraries
[     2.751s] getting certificate publisher
[     3.626s] generate appx manifest
[     3.632s] generate package resource indexing files
[     3.774s] packing
[    11.694s] cleaning temporary files
[    11.992s] signing
msix created: [    20.566s] build\windows\runner\Release\anime_here.msix
[+22420 ms] "flutter run" took 22,660ms.
[ +261 ms] ensureAnalyticsSent: 256ms
[   +6 ms] Running shutdown hooks
[   +2 ms] Shutdown hooks complete
[   +2 ms] exiting with code 0

:scroll: Pubspec.yaml

msix_config:
  display_name: AnimeHere
  publisher_display_name: abdelaziz
  identity_name: com.zcreations.AnimeHere
  msix_version: 3.0.185.0
  logo_path:  G:\My Work HDD2\AndroidStudioProjects\anime_here\windows\runner\resources\app_icon.ico
  start_menu_icon_path: G:\My Work HDD2\AndroidStudioProjects\anime_here\windows\runner\resources\app_icon.ico
  tile_icon_path: G:\My Work HDD2\AndroidStudioProjects\anime_here\windows\runner\resources\app_icon.ico
  icons_background_color: "#00244a"
abdelaziz-mahdy commented 2 years ago

dont know if that related or not

image

abdelaziz-mahdy commented 2 years ago

this error appeared when testing the exe on sandbox image so i installed the certificate from the pfx file with password 1234

YehudaKremer commented 2 years ago

Hello @zezo357

the .exe is the problem, it can't run on "clean windows", I can make self-dependence one, but his size will be 16MB which is too much for this package.

I had to remove the flag --with-test-certificate-installer in the current version (3.1.5).

instead, please use those steps to install the msix on clean windows server:

  1. copy the msix to the machine,
  2. right-click on the msix file and open the Properties window
  3. install the certificate by going throw those steps: image
  4. then install the msix with the command Add-AppPackage: image
abdelaziz-mahdy commented 2 years ago

Hello @zezo357

the .exe is the problem, it can't run on "clean windows", I can make self-dependence one, but his size will be 16MB which is too much for this package.

I had to remove the flag --with-test-certificate-installer in the current version (3.1.5).

instead, please use those steps to install the msix on clean windows server:

  1. copy the msix to the machine,
  2. right-click on the msix file and open the Properties window
  3. install the certificate by going throw those steps: image
  4. then install the msix with the command Add-AppPackage: image

I wanted to distribute the app using msix

And I couldn't use the windows store since it had copyright problem

This process of installing the certificate is hard on users sadly

Do you think there is any other solution?

YehudaKremer commented 2 years ago

Are your app users in the organization (company, office..) ?

abdelaziz-mahdy commented 2 years ago

no

YehudaKremer commented 2 years ago

Microfost store has option to publish to specific users only, its called "package flights": image

More details: https://docs.microsoft.com/he-il/windows/uwp/publish/package-flights

Is this can help in your situation?

abdelaziz-mahdy commented 2 years ago

i guess not

so i guess too that msix is not good for me

abdelaziz-mahdy commented 2 years ago

do you know any good other options ?

YehudaKremer commented 2 years ago

You're right, msix can used only if signed with a certificate.

there are alternatives, one of them is the Inno Seput installer. here is a clip on how to use it with flutter: https://www.youtube.com/watch?v=XvwX-hmYv0E

abdelaziz-mahdy commented 2 years ago

thank you very much ♥