Posts

Showing posts from September, 2010

Inno Setup and recursive installers

We've got a recursive installer in our Inno Setup script. What I mean is that our main setup program installs another setup program (for a viewer), so that the user can copy/install that viewer program at a later date.

Here's how to do that in an Inno Setup script:
[Files]
Source: {src}\viewer_cd\*; DestDir: {app}\viewer_cd\; Flags: external recursesubdirs replacesameversionall on one line, of course. I discovered today that Flags: replacesameversion is critical, because it causes the 'setup.exe' file inside that folder to be replaced during debugging. Before I put that flag in, I tested my main installer, then ran the viewer setup.exe, and it ran an old version, with bugs I thought I'd fixed! How annoying. Now setup.exe will get replaced, even if it has the same embedded 'version' info.

A switch, taking my own advice

I've taken my own pointer and run with it. Let's go see what
http://www.aronhelser.com/
looks like :)

Mashable: Run Your Business Online with $10 and a Google Account

HOW TO: Run Your Business Online with $10 and a Google Account:
Seems like a cool way establish an online identity more concretely. I didn't know $10 was all a domain costs for a blogger blog. (blog blog blog ....)
Matt Cutts posts some useful stuff.

Review: The Angel's Game, by Carlos Ruiz Zafon

I almost labeled it fantasy. If you start this book, please put aside the time so you can finish it rapidly! I took a week break, and felt lost coming back because of the threads of the plot I hadn't held on to.

It is a fascinating book, worth the time, and it doesn't quite fit where you expect it. The mystical aspects are stronger here than in his first book (The Shadow of the Wind), and that's a negative in my opinion. My wife and I were both somewhat puzzled and dissatisfied with the epilogue/resolution. I enjoyed the characters, the intrigue, and the twisting plot. Overall, recommended.

The Angel's Game at PBSwap.

Building libpano13-2.9.17_rc1 for Hugin

Hugin is great panorama software, but they need people to build it for Windows. I've been occasionally working on it, and I've succeeded in doing complete 32 and 64 bit builds in MSVC 2010. I've almost documented how on the MSVC 2010 wiki page, but it's not quite complete. Thought I'd make note, and invite others to attempt it as well!

Today I compiled the libpano RC, and I'll try the hugin RC soon.

Inno Setup MSVC vcredist without bothering your users

If your C++ program is compiled with MS Visual Studio 2005 Express, and you link with the DLL versions of the C run-time libraries, you probably already know that you have to run vcredist_x86.exe to install those dependencies on a new computer before your program will run.

Here's how to do that in an Inno Setup script.
First, download vcredist_x86.exe from MSDN, Microsoft Visual C++ 2005 SP1 Redistributable Package (x86)
Notice that's for SP1, the instructions are different for non-SP1, and for the vcredist_x86.exe that comes with Visual Studio Standard or Professional. See the credit link below.

Include this in your script:

[Files]
Source: {src}\bin\vcredist_x86.exe; DestDir: {app}\bin\;

[Run]
Filename: {app}\bin\vcredist_x86.exe; Parameters: "/q:a /c:""VCREDI~3.EXE /q:a /c:""""msiexec /i vcredist.msi /qn"""" """; WorkingDir: {app}\bin; StatusMsg: Installing CRT...


Alternative for x64 ( I haven't teste…

Inno Setup custom data directory location

In my last post, I forgot to point you to Inno Setup; go get the Inno Setup QuickStart Pack to get going.
I showed how to copy a directory full of data, like tutorials or sample data, that might change depending on the customer. That means the files are not known when the installer is compiled.

Here's what it looked like:
Source: {src}\data\*; DestDir: C:\MyCompany\data;
   Flags: external recursesubdirs skipifsourcedoesntexist onlyifdoesntexist uninsneveruninstall;
   Permissions: users-modify

This time, I 'm going to show how to let the user choose where this directory is located, and whether to install the contents of the directory at all.

First, let's show an obvious choice:

Source: {src}\data\*; DestDir: {userdocs}\MyCompany\data; Flags: [as above....]

That new constant will put the data in a subdirectory of My Documents, for the user that installs the program. This might be fine for you, if each user of your program is going to install it themselves, and generate thei…

Inno Setup user data directory

One of the requirements we have for an installer is to create a user data directory. We'd like the installer to create C:\MyCompany\data\, and copy any data we decide to give this customer on their install DVD into that new folder. VS 2005 Install projects couldn't do it without a custom action. Here's how in Inno Setup:

Source: {src}\data\*; DestDir: C:\MyCompany\data;
   Flags: external recursesubdirs skipifsourcedoesntexist onlyifdoesntexist uninsneveruninstall;
   Permissions: users-modify

I've put that on multiple lines so it's easier to read, but it's all one line in the .iss file. Let's take a look at what each of those pieces mean.
First, that '*' in the Source: field is magic. It means it will go and find whatever is there in the data\ directory next to your setup.exe. It must be combined with the Flags: external, so that Inno Setup knows not to look for it when your script is compiled. DestDir will be created by the installer, and files cop…