asticode / go-astilectron-demo

Discover the power of Astilectron through a demo app
MIT License
404 stars 83 forks source link

i can't excute exe file #52

Closed megimegikimmegi closed 4 years ago

megimegikimmegi commented 4 years ago

my main.go detail source is

AstilectronOptions: astilectron.Options{ AppName: AppName, AppIconDarwinPath: "resources/icon.icns", AppIconDefaultPath: "resources/icon.png", DataDirectoryPath: "./", },

and

Windows: []*bootstrap.Window{{

        Homepage:       "/html/login.html",

but , can't excute exe file

i think they have no resource file ...

please help me

asticode commented 4 years ago

First off, you shouldn't set the DataDirectoryPath option. Then the Homepage value should be html/login.html (no leading slash). Bare in mind that in that case your resources folder should contain at least this structure :

resources
|
+--- app
        |
       +--- html
               |
              +--- login.html

Try copying the demo first and adding your custom pages bit by bit.

Does that answer your question?