electron-userland / electron-windows-store

:package: Turn Electron Apps into Windows AppX Packages
MIT License
677 stars 86 forks source link

Add support for dynamic scaling of application images #55

Open jimpdx opened 7 years ago

jimpdx commented 7 years ago

We are still unable to get "dynamic scaling" working on app icons (defined within the AppManifest.xml within ). I believe this is somehow related to the appx build process but I could also be doing something wrong.

As I understand it we would declare something like this: Square150x150Logo="assets\Square150x150Logo.png"

And then provide the following image sizes:

assets\Square150x150Logo.scale-100.png (150x150)
assets\Square150x150Logo.scale-125.png (188x188)
assets\Square150x150Logo.scale-150.png (255x255)
assets\Square150x150Logo.scale-200.png (300x300)
assets\Square150x150Logo.scale-400.png (600x600)

The app or installer would then select the appropriate images based on the device form factor and pixel density. However we are unable to build the Appx installer when we do not also include a file without the scaling factors. I have read lots of blogs on this subject and I am still not clear what we might be doing wrong?

felixrieseberg commented 7 years ago

Hm, interesting. What is the actual error you're getting? In theory, you just need to supply /l to makeappx, but we do that automatically for you if your assets folder contains files with a .scale- in them.

dsanvita commented 7 years ago

We don't get an error creating the appx, only when installing it. We get a splash screen cannot be found error. If I add back in the unscaled splash screen, there is no error, but the icon in the programs list is blank. If I add back all the unscaled assets, those are used and shown in the appropriate places. The scaled assets don't seem to be used.

jimpdx commented 7 years ago

AppxManifest.xml(40,27): error 0x80070002: Cannot install or update package GreatVines.GreatVinesMobile_b88nf15yp6dx2 because the splash screen image [SplashScreen.png] cannot be located. Verify that the package contains an image that can be used as a splash screen for the application, and that the package manifest points to the correct location in the package where this splash screen image can be found.

image

jimpdx commented 7 years ago

@felixrieseberg I know you said earlier that splash screen images are not supported in Electron. I restored the non-scaled image referenced in the Manifest.xml. The installer worked fine and I get icons in the taskbar (both big and small) but the start menu icons are blank. We will try another build with your latest release and let you know what happens.

tcoulter commented 6 years ago

@jimpdx Did you ever fine a resolution to the blank images in the start menu? Getting the same thing.

tcoulter commented 6 years ago

I believe this is solved by setting makePri to true. Worked well for me. See more here: https://github.com/felixrieseberg/electron-windows-store/issues/93

mahnunchik commented 4 years ago

Any news?

jimpdx commented 4 years ago

Nothing on my end, although we are due to push a big update to both our electron apps on the Windows store so I might give the idea @tcoulter posted a try!