quasarframework / icongenie

CLI tool to generate all the icons and splashscreens for your Quasar Apps
https://quasar.dev/icongenie/introduction
MIT License
182 stars 17 forks source link

Different Icon for Different Builds #59

Closed jpgilchrist closed 4 years ago

jpgilchrist commented 5 years ago

In my company's use case we have two apps:

In this manner, our employees/QA can install both apps at the same time as they have different app ids. I've rigged something together to make the app id dynamic with quasar.conf.js

cordova: {
      id: ctx.dev || ctx.debug ? [STAGE_APP_ID] : [PROD_APP_ID],
      ...
}

I then also use a similar check in the app tow change which set of APIs I'm hitting prod vs. stage.

Ideally the icon would be different too (although not necessary) as I can change the name of the application that's printed in ios/android.

nothingismagick commented 5 years ago

@rstoenescu - would love to have your feedback here. I know this isn't an issue per sé with the icon factory, but @jpgilchrist was previously using the dev and prod build pipelines to create two different issues.

I see two things that COULD be done:

  1. reenable different "dev & build" icon sources (although I think that this is a hack, not a solution)
  2. somehow create optional "profiles" so you could target a specific profile with an ENV variable that then uses e.g. a different background color or icon
m0jimo commented 5 years ago

For our SPA application I'd like to have different logo according to a target server. My icons for browser tab/shortcut (stored in src but would be better to leave them out of the src folder probably):

iconA - src/statics/app_icons/1240x1240_dev.png (red icon)
iconB - src/statics/app_icons/1240x1240_prod.png (blue icon)

We use different icons and toolbar colors not to mixup TEST and PROD data when testing.

I'd like to have icons on the following servers:

DEV - iconA (developers)
TEST - iconA (limited user group)
----
PROD - iconB (for end users)

Current solution: I use WebStorm (Win10) and today I found a way how to replace a picture before quasar build is called. I placed a copy 1240x1240_dev.png app-icon.png /Y to package.json and it is called before quasar build command. With every image replace are all icons marked as changed and ready for commit to git but it would be nicer to change them only in dist/spa/statics/icons and leave src folder untouched (this could be done probably if I used global icon-genie from package.json scripts after publishing a quasar app).

I can imagine to have profile for icon-genie (as mention above) where I could put all the command line values (input picture, parameters, output location e.g. spa/statics/icons/) - but it is nearly approaching the package.json/scripts way of doing it.

rstoenescu commented 4 years ago

This feature will be available with the complete rewrite of Icon Genie v2.