copy IA project using save as

Got a problem you cannot solve? Try here.
ndas
Posts: 1
Joined: Wed Jul 25, 2007 11:09 pm

copy IA project using save as

Postby ndas » Wed Jul 25, 2007 11:32 pm

I am requesting information on a simple method to "copy" or "save as" an
InstallAware project.

I tried copying and renaming the .mpr and creating a new GUI ID, but
apparently there is a file or ID that cannot be renamed without breaking the project. When trying to run a "copied" installation I get an error.

I have quarterly updates that install to slightly different application
directories ie ... \\CorrectCoder 2007 V13.1 and \\CorrectCoder 2007 V13.2.

All versions ( 4 quarters per year) are considered independent and need to be installed and stay on a customer's computer. I was able to do this with InstallShield but seem surprised that IA requires me to start from scratch every time I need to create a new project - a waste of time but perhaps the larger issue a chance making a mistake (ie missing a file).

For many reasons I don't want to open a project a change variables in one project:

Each quarter is a snapshot of current source file locations and help files located in different source locations with slightly different names. Sometimes there may me a bug fix or database change 2 quarters ago that requires me to repackage. Also the Project GUI ID would need to change for each quarter to prevent uninstalling.

With InstallShield I have 24 projects (unique GUI IDs) representing 6 years of my product. I can open any of these and tweak small changes with the confidence that I am not interfering with another version. I just (DOS) copy, rename the IS project file name and change the project GUI ID.

This request for a "save as" has been discussed on the forum but "how to" is vague.

Please help,
RW

alma88
Posts: 38
Joined: Wed Apr 18, 2007 5:38 am

Re: copy IA project using save as

Postby alma88 » Sat Aug 04, 2007 2:41 pm

ndas wrote:...seem surprised that IA requires me to start from scratch every time I need to create a new project - a waste of time but perhaps the larger issue a chance making a mistake (ie missing a file).


I second this request. Copying projects can lead to strange, untraceable, unresolvable problems. In such cases the only solution is to create the project from scratch. This is a major pain.

Please, do give us the ability to reliably copy projects.

MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Postby MichaelNesmith » Sat Aug 04, 2007 8:16 pm

First, most of the time where with other tools you would copy and clone, with InstallAware's Compiler Variables, you shouldn't even need to do that. This is one of the ways InstallAware prevents the copy-clone nightmare where your projects get out of hand - lots of duplicate work across all sorts of projects when you don't really need it.

Next, a little primer on how references to script files are stored (MIA files). They are stored relative to the file path of the MPR file, which is the main project file. So if they are in the same folder, they would be stored as-is, with just the file name: "script.mia". Otherwise, some examples might be "scripts\\script.mia" or "..\\..\\folder\\script.mia" or even "d:\\path\\script.mia".

Now, when you copy and clone a project using Explorer or another file manager, as long as you previously did not mangle file paths, when you open the new project, since all paths will be just the script file names, no path information - everything will work. [By default, scripts are created in your project folder (or copied there in the case of runtime includes).]

IF however there are relative paths, then based on the degree of the "relativity",

a) More than one project can share the same script file - leading to the strange behavior that changing one script also changes the same script in another project (which is in fact very reasonable and might even be intended, except its confusing when cloning is the intent),
b) Script files might go missing altogether, causing script not found errors,
c) Script files might point to the wrong locations.

When you use "Save As" in the IDE, it just moves the MPR file - the project file - and leaves all the script files alone - thus, the MIA files are now stored with path information, and this is typically where problems begin. You can re-set paths in the IDE using the Project Manager for all your includes and main script files, of course.

If you want to find out what is pointing where, just open the MPR file in Notepad and search for the ".mia" text. All script file references are visible in plain text and editable. Re-open your project in the IDE after saving changes and everything will work fine.

Finally, all other files are stored directly in the project folder - dialog files, dialog logic, support files, merge modules, and so on. The help file contains more details.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 100 guests