This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Shrinking the Installer


Shrinking the Installer

Postby Presto » Mar 18, 2003 @ 9:34pm

Here's the deal:
I've compiled my code for ARM, MIPS and SH3. Each executable is about 400KB.
I've got about 1MB of supporting files (sounds and graphics) which are common to all installations.
I want to make one installer that works for all 3 platforms. Even uncompressed, (which it wouldn't be), the setup.exe would be a maximum of 2.2MB.

But what I tried didn't quite work that way.
Using the standard installation instructions, my program's .inf file looked kinda like this:

[CEDevice]
ProcessorType = 0
[CEDevice.ARM] (repeat for MIPS and SH3)
ProcessorType = 2577

[SourceDiskNames]
1 = ,"Common files",,"C:\BLAH\COMMON"
[SourceDiskNames.ARM] (repeat for MIPS and SH3)
2 = ,"Exe files",,"C:\BLAH\ARM"

And then: cabwiz.exe blah.inf /cpu ARM MIPS SH3

I end up with three cab files:
program.ARM.cab
program.MIPS.cab
program.SH3.cab

And as you can guess, all of the common files are stored in each of the cab files. So each one is about 1.2MB, and when put into a single setup.exe using EZSetup, the installer is about 2.8MB. (due to compression)

Since that wasn't the result I wanted, I made two .inf files: one for the cpu types and one for the common files. This way I came up with four .cab files:
programCommon.cab
programCPU.ARM.cab
programCPU.MIPS.cab
programCPU.SH3.cab

When combined using EZSetup, the setup.exe file was about 1.5MB. Bingo! That's how big it should be.

However...

When I tried installing it, only the ARM files were copied. None of the common image/music files made it onto the device, even though they were set to install for a processortype of 0 (everything).

Anyone have experience with this? A 1.5MB download is more attractive than a 3MB download. And it seems a complete waste to have three copies of the common files stored in the installer. (I hate wasting space like that.) I'd rather make three installers (one for each CPU type) than do that, but that's not customer-friendly.

Is there a limitation in EZSetup that only lets it install one .cab file? Shouldn't it install all CABs which meet the processortype setting? Does the first part of the .cab file names all have to match?

Thanks,
-John
User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby fzammetti » Mar 18, 2003 @ 9:42pm

Please keep in mind that what I'm about to say might be COMPLETELY wrong, or invalid if using EZSetup, but here goes...

Any PPC installer to the best of my knowledge works by copying a CAB file to the device and executing it. This to me means that you probably can't transfer multiple CAB files at once, you would probably have to copy each one over, execute it, rinse and repeat.

If you are writing your own installer, or if you want to modify EZSetup, one approach is to NOT create the CAB files... instead, include in your distribution all the files that would go into your CAB files, including your common files. Then, behind the scenes of your installer, execute CABWIZ and create the CAB file on-the-fly that includes all your common files as well as the platform-specific files, then just do the normal copy and execute step with that. Obviously you need to include the INI and INF files as required, or you could write them out from your installer if you didn't want them separate.

I'm interested to know if anyone else has a solution because I could see this coming up for many people...
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Sm!rk » Mar 19, 2003 @ 8:58pm

User avatar
Sm!rk
pm Member
 
Posts: 172
Joined: Dec 16, 2002 @ 4:40pm


Postby fzammetti » Mar 19, 2003 @ 9:29pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Postby Presto » Mar 19, 2003 @ 9:38pm

User avatar
Presto
pm Insider
 
Posts: 763
Joined: Jan 20, 2003 @ 5:51am
Location: Kalesian Archipelago


Postby fzammetti » Mar 19, 2003 @ 9:51pm

...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"
User avatar
fzammetti
pm Insider
 
Posts: 1496
Joined: Jun 4, 2002 @ 6:21pm
Location: Omnytex Technologies


Return to Windows Mobile


Sort


Forum Description

A discussion forum for mobile device developers on the Windows Mobile platform. Any platform specific topics are welcome.

Moderators:

Dan East, sponge, Digby, David Horn, Kevin Gelso, RICoder

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum