Page 1 of 1

MIA file not copied to new folder with \"Save Project As...\"

Posted: Fri Oct 06, 2006 11:19 am
by jon.m
I have two distinct variants of the same basic installer.

I'm chasing my tail trying to figure out why when I make changes to one project, it is appearing in the second project!

Today, I believe I see what's happening. I used "File -> Save Project As" to create the second project in a new folder.

But I see only one MIA script file between the two folders, a fact I caught when I got one of those "do you want to save files..." dialogs when closing InstallAware. I'd been working on Project 2 but the path in the "do you want to save files" dialog was to Project 1.

Seems odd I'd be the only one with this problem, can anyone tell me if it's a bug?

Thanks, Jon

Posted: Fri Oct 06, 2006 5:14 pm
by MichaelNesmith
This is by design - saving your project in a different folder does not update script references. You can update your main script reference (and save it "as") by right clicking it in the Project Manager window.

You can also copy an entire project folder to a different folder (without doing a save-as), this way all files will be moved and references do not need to be updated.

The main MIA script starts off with an implicit reference to be in the same folder as the MPR file, doing save-as on either will lock-down the reference to that item in its current folder.

Posted: Fri Oct 06, 2006 5:22 pm
by jon.m
That's quite subtle. I would have suspected that a Project Save As would save all the project files to the new destination...

There's also a rather tricky behavior in the save portion of the "included scripts" section. I had changed some contents of the check/setup scripts for this installation and it's not so clear exactly which file InstallAware is prompting to Save when you remove a script file from the project.

Thanks for the reply. I'll know better next time. Jon

Posted: Fri Oct 06, 2006 6:20 pm
by MichaelNesmith
When you remove, the MPR file gets updated - it contains the references to all your include scripts, dialogs, support files, localization resources, and so on.

Posted: Thu Feb 12, 2009 5:41 am
by semike
MichaelNesmith wrote:This is by design - saving your project in a different folder does not update script references. You can update your main script reference (and save it "as") by right clicking it in the Project Manager window.
I think this behaviour is a little strange. When I save a project to another location (my definition of a project is the *whole* project), then I expect all files to be copied.

>> I just destroyed a welltested installer by this *designed* function!

I suggest to show a warning. Or provide two SaveAs methods in the application menu. One creating a linked copy and one creating a full copy.
So users are not lulled into a false sense of security.

Regards,
Michael

Posted: Thu Feb 12, 2009 10:01 am
by MichaelNesmith
Let me explain how this works:

When you create a new project, all script references are relative. Meaning, there is no path information.

When you copy your project folder in Explorer, therefore, a full copy occurs, as expected. UNLESS:

You do a Save As and add some relative or absolute path information by changing the location where one of your project files is stored. Depending on where the save is done, project references are now updated to refer to a file outside of the project folder, using a relative or absolute path.

Posted: Thu Feb 12, 2009 3:48 pm
by semike
Hello,

thank you for your reply! In my opinion this doesn't make sense. As a user I expect a special behaviour from the tool I'm using. So for example when I save a Word document using SaveAs, I expect that Word is creating a copy and this is a *full* copy of the document and I trust in the situation this *is* a full copy. Not first three pages copied and forth page is staying in the original document.
I agree to your argumentation that when I *manually* change pathes they should be handled correctly and point to the original destination afterwards. But not when I handle the project with InstallAware without exception.
BTW why is only the .mia file affected by relative path handling? The other files have been copied correctly.

We develop a tool handling projects and lots of files stored in different relative and absolute folders, too, and have rather similar challenges to meet. But I can never leave some project files behind when I create a copy with the SaveAs command!

Please see this discussion as a chance to make your product even better!

Regards,
Michael

Posted: Thu Feb 12, 2009 4:31 pm
by MichaelNesmith
Word is a single document. InstallAware projects can contain multiple documents in them, these documents, i.e. MSIcode scripts, can even be shared across different projects.

Therefore this is why the IDE has semantics that force this fact.

Posted: Tue Aug 04, 2009 11:59 am
by Tiago
Stupid semantics, that is.
This should always be optional, not forced.

Posted: Tue Aug 04, 2009 2:26 pm
by MichaelNesmith
Don't say stupid again or you get banned.

Posted: Tue Aug 04, 2009 3:13 pm
by Tiago
Sorry. My apologies.