YehudaKremer / msix

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

App does not launches after installing from .msix file #189

Open aditya113141 opened 1 year ago

aditya113141 commented 1 year ago

Hey, I cannot launch the app after installing from the .msix file.

This is my pubspec.yaml file ` name: mydemo description: A new Flutter project.

version: 1.0.0+1

environment: sdk: '>=2.18.6 <3.0.0'

dependencies: flutter: sdk: flutter cupertino_icons: ^1.0.2 sqflite: ^2.2.6 sqflite_common_ffi: ^2.2.2

dev_dependencies: flutter_test: sdk: flutter

flutter_lints: ^2.0.0 msix: ^3.8.2

flutter: uses-material-design: true

msix_config: display_name: testfluent1 app publisher_display_name: Aditya Sinha msix_version: 1.0.1.0 icons_background_color: "#ffffff" architecture: x64 capablitites: "internetClient" certificate_path: C:\Users\Aditya Kumar Sinha\Documents\clones\New folder\certcheck\CERTIFICATE.pfx certificate_password: *** `

I run the command flutter pub run msix:create to create the .msix file and .exe file inside the directory C:\Users\Aditya Kumar Sinha\Documents\mydemo\build\windows\runner\Release. The mydemo.exe file runs perfectly but on installing the app from mydemo.msix, the installed application won't launch

YehudaKremer commented 1 year ago

Hey

Try opening it as Admin, does it open?

aditya113141 commented 1 year ago

Hey

Try opening it as Admin, does it open?

No, Same issue when I try to run it as administrator

YehudaKremer commented 1 year ago

Can you please find log error so we have a clue what the problem is? Maybe see event viewer

aditya113141 commented 1 year ago

Can you please find log error so we have a clue what the problem is? Maybe see event viewer

How to do that ? Do I need to create a logger for it. My app is fairly simple. It is the default counter app which I wanted to test if it works on windows PC. I am actually making another windows app but wanted to figure out the final deployment and packaging part beforehand so I decided to test it on a simple app first.

aditya113141 commented 1 year ago

From task manager, I realized that the app runs in background but nothing shows up on the screen

YehudaKremer commented 1 year ago

in file: windows\runner\win32_window.cpp change line 138 from:

      window_class, title.c_str(), WS_OVERLAPPEDWINDOW,

to:

      window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE,

dose it solve the problem ?

aditya113141 commented 1 year ago

Yeah, it worked. Thank You.

YehudaKremer commented 1 year ago

Great!

The problem is not in MSIX, there is open issue in flutter-windows (v3.7) template: https://github.com/flutter/flutter/issues/119415#issuecomment-1528845858