Contents
English (United Kingdom)French (Fr)Deutsch (DE-CH-AT)
Search
Login
Who Is Online?
We have 62 guests online
Navigation
Home Source Code Inno Setup How to split up large files with Inno Setup
Most Recent
Featured Articles
Joomla 1.5 Featured Articles
Navigation
Home Source Code Inno Setup How to split up large files with Inno Setup
English (United Kingdom)French (Fr)Deutsch (DE-CH-AT)
How to split up large files with Inno Setup E-mail
User Rating: / 9
PoorBest 
Source Code - Inno Setup
Written by Markus   
Friday, 20 February 2009 16:53
Article Index
How to split up large files with Inno Setup
Starting the script wizard
Target location
Start menu entriy
Output file name
ISTool
Compression
All Pages

 

Computer technology has it that file sizes are getting bigger and bigger. This is usually not a big deal with today's available storage space on hard drives, DVDs, and memory sticks.

Squeezing large files on smaller medias is however still a challenging task.

Imagine you want to send a 700 MB file by email. Impossible? No, not really. Files can always be split up in several smaller bits.

There are may utilities around that can chop large files into convenient pieces. Most of these programs are easy to handle and the majority is even free. One disadvantage of many tools is that the sender as well as the receiver needs the software.

In this article I'm going to show you a way that doesn't require the recipient to install anything on his computer. We will be using Inno Setup, a free installation creator. Admittedly, the sender has to put a little bit more effort in the job, but the result for the receivers can proudly show off.

You will need the Inno Setup package installed on your computer.

Follow the instructions in this article to install Inno Setup's Quickstart Pack.

Install the software, then run ISTool.

ISTool's main window

Its main window looks a bit complicated on first sight but it's actually quite structured. We will only go through the things we really need, and of course, we want to have as little work as possible.

 


 

In ISTool's main menu select 'File', then 'New'. A wizard comes up where we can enter some information.

Inno Setup's first wizard page

Make sure that 'Create a new empty script file' is unchecked. Our project will contain one single file which we split up in several chunks.

On the next page we're asked to enter quite a lot of information:

Inno Setup's second wizard page

We don't want a publisher, and we haven't got a website for it either. For fun, we can put http://www.dateiliste.com in the field for 'Application website'. You may want to use your own homepage for this.

Both fields 'Application name' and 'Application name including version' are required. The video from last New Year's Eve doesn't need a version number, hence we enter the same information twice.

Inno Setup's wizard page 3

 


 

On the next page we have to select where the file is going to be stored later on the receiver's computer. The default folder for program files is not where we want it to be.

Change the default folder location to '(Custom)' and enter the text {userdesktop} in the field below it. Make sure you type it in exactly as shown, all characters in lowercase and including the curly braces. It's probably best if you copy and paste the text from here: {userdesktop}

Select destination folder

This will later suggest to install the file on the user's desktop where he can easily find it (hopefully). He can then move it into a better location. He will also be able to select a different location during the installation already if 'Allow user to change the application folder' if you leave it checked.

On the next page, we need to tell the script wizard that we don't have a main application. The file to deploy is a simple data file, a film.

Wizard page to add files

You can now add the file(s) to deploy. In my case it is just the film from New Year's Eve.

Select files

 


 

Inno Setup installers can create start menu groups and entries. For the film this is not necessary, but since it's provided we can as well use this option:

Start menu group

No license file or any other information to read is required for a private film.

Application documentation

In our example we'll only be using the English language. Inno Setup supports quite a lot of different languages.

Language selection

 


 

On the next page we can finally choose the name for our installer. Most fields are self-explanatory, but only one of them is really necessary. The default output name is 'setup'. In my opinion, this is not what the film should be wrapped in.

Compiler options

For our private film setup it doesn't really matter whether the script is created with preprocessor definitions or not. Since it's the default, there's no reason to change it.

Choose preprocessor directives

That was it for the wizard. Click 'Finish' to enter ISTool's script mode.

The wizard's last page

 


 

The window should now look similar to this one:

A script in ISTool

In the 'Project' menu select 'Setup Options' and then 'Uninstall'. It's the last item in the menu. Because I don't want the software to create an entry in the 'Add/Remove Software' panel I have to make sure that no uninstall information will be stored later when the receiver runs the program.

Uncheck 'Uninstallable' to not have Inno Setup create uninstall information.

Uninstallable

Now we're almost done. Go to the page 'Disk Spanning' and check this option ('Enable disk spanning').

The field 'Disk slice size' is what we're interested in. This is the size of a file chunk. In this example I've set it to 5 000 000 bytes (a bit less than 5 MB) so that a slice still fits in an email.

Disk spanning

Click 'Ok' and save your script somewhere ('File', 'Save As').

Now go to the menu 'Project' again and select 'Compile Setup' or press the toolbar button to compile the setup. The compiler generates files of the specified size which can be sent via email etc.

 


 

The recipient stores all files in a single directory and starts the executable file generated by Inno Setup. This will then load all the files subsequently and extract them to the preferred location.

Inno Setup can also compress the files. Before compiling, open the page 'Compiler' in the 'Setup Options' again and turn Ultra 64 lzma compression on as shown here:

Compiler preferences

This generates a fairly small output. No need to bother with additional file compressors.

 

Last Updated on Thursday, 03 September 2009 00:00
 
You need to login or register to post comments.
Discuss this item on the forums. (0 posts)
Discuss (0 posts)