Per-Build Splash Image - Advanced Installer Community
rossj
Posts: 16
Joined: Sun Jul 03, 2011 10:07 am

Per-Build Splash Image

Hello,

I have created an AI project with several builds representing different branding of our product. I need to define a different splash image (native Java 6) for each build. I can't figure out how to implement this.

My latest attempt is to apply the HowTo: 'How do I install two files with the same name in the same folder?'. When specifying the splash image, I can only refer to one of the build specific files, not the location it will be installed to (the parent directory). So the splash only works for the one build (even though the correct splash image is available in all builds).

I also tried using a command file (from an ANT build) to remove the default splash image and replace it with a different one. The problem is that it's not possible to remove the file as it's tied to the Java component. Simply adding a new file without removing the existing one has no effect.

Any help would be appreciated.

/Ross.
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Per-Build Splash Image

Hi Ross,
When specifying the splash image, I can only refer to one of the build specific files, not the location it will be installed to (the parent directory).
I'm afraid I don't understand, why can't you specify the parent folder? Can you please attach your project, or a sample, on the next post, so we can analyze your settings?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rossj
Posts: 16
Joined: Sun Jul 03, 2011 10:07 am

Re: Per-Build Splash Image

Hello Bogdan,

I have attached a cut down version of the project file which should demonstrate the problem.

In essence...

APPDATA\temptrack and APPDATA\temptracker are two directories set to place their content in the parent folder. Each directory contains a file Splash.png. I have two features associating these two directories to the two builds. I can confirm that upon installation, the correct Splash.png file appears at APPDATA\Splash.png as expected for each build.

The problem is that the dialog used to set the splash image under Java GUI app > Display, only shows the directory structure and files as it appears in AI, not as it will appear in the target machine. So I must choose APPDATA\temptrack\Splash.png or APPDATA\temptracker\Splash.png (not APPDATA\Splash.png). Upon installation, although the Splash.png file is correct, the splash configuration in the ini file is only set for the build I explicitly pointed to. The other build has the splash entry blank.

What seems odd to me about this file chooser dialog is that although the directory hierarchy is rooted at Target Computer, it contains temptrack and temptracker which will never actually exist on the target computer since their content go directly into the parent. This doesn't seem logical to me.

Thanks, Ross.
Attachments
Splash1.zip
(9.17 KiB) Downloaded 415 times
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Per-Build Splash Image

Hi,
The problem is that the dialog used to set the splash image under Java GUI app > Display, only shows the directory structure and files as it appears in AI, not as it will appear in the target machine. So I must choose APPDATA\temptrack\Splash.png or APPDATA\temptracker\Splash.png (not APPDATA\Splash.png). Upon installation, although the Splash.png file is correct, the splash configuration in the ini file is only set for the build I explicitly pointed to. The other build has the splash entry blank.
Now I understand what you were trying to say in the first post. I'm afraid this is a limitation of our files picker. The option to install the content of the folder
in the parent folder is not currently reflected in our file pickers.

A workaround to avoid this would be the following:

-- add in the parent folder a file with the name "Splash.png"
-- after adding the file select it and press F8, this will take you to its component from Organization page
-- here set a condition on the component that will never be true, for example "1=2", so the file is never installed
-- now go to Java Products page and select this file as target for the splash image

At install time the java product will look for the file in the correct directory, and since you already managed to install the files correctly everything should work as expected.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Per-Build Splash Image

Hi Ross,

I've made some testing and the solution I recommended above is incomplete. The problem appears because the reference of the splash image is stored in the
INI file of the launcher using the identifier of the file. Since two files can never have the same identifier the reference will resolve to an incorrect path.

The solution is the following, after adding the dummy file and executing all of the above settings you need to go to Table Editor page and locate
"IniFile" table. There you will find the row "Splash_Screen", edit its "Value" column and set it to this: "APPDATA\Splash.png", thus replacing the unique identifier with a valid path.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rossj
Posts: 16
Joined: Sun Jul 03, 2011 10:07 am

Re: Per-Build Splash Image

Thanks Bogdan,

I tried your initial proposal. I had a problem with the dummy Splash.png file being put into a component with other important files (i.e. the jar!). So I had to create a dummy registry key so as to have a component I could sacrifice with a condition in the manner you described. I'm not sure if this is the best way to do it, since it doesn't seem possible to simply create a new component. With this solution, the correct Splash.png file is installed for each build, but the ini file just has 'Splash Screen=' for both builds. I assume this is what you found which lead to your second post?

This is where I ran out of luck... I only have the Java edition and the Table Editor seems to be an enterprise edition feature. I don't think we can justify upgrading at the moment just to work around this problem. I can always manually modify the project prior to building. It's just annoying. That is unless you have any other ideas? Can a custom action be used to blindly copy one installed file over another?

Cheers, Ross.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Per-Build Splash Image

Hi Ross,

The easiest solution in this case would be to add a duplicate to your java product and set each with its own splash image. In the end you can condition each java product to be installed per build.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”