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

Got a problem you cannot solve? Try here.
Post Reply
jon.m
Posts: 11
Joined: Wed Aug 09, 2006 6:29 pm

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

Post 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
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
jon.m
Posts: 11
Joined: Wed Aug 09, 2006 6:29 pm

Post 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
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
semike
Posts: 17
Joined: Wed Jan 09, 2008 3:16 am

Post 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
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
semike
Posts: 17
Joined: Wed Jan 09, 2008 3:16 am

Post 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
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post 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.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Tiago
Posts: 129
Joined: Thu Jun 18, 2009 9:08 am

Post by Tiago »

Stupid semantics, that is.
This should always be optional, not forced.
MichaelNesmith
Posts: 3452
Joined: Thu Dec 22, 2005 7:17 pm
Contact:

Post by MichaelNesmith »

Don't say stupid again or you get banned.
Michael Nesmith
Install[b]Aware[/b]
[i]Home of The Next Generation MSI Installer[/i]
Get your free copy today - http://www.installaware.com/
Tiago
Posts: 129
Joined: Thu Jun 18, 2009 9:08 am

Post by Tiago »

Sorry. My apologies.
Post Reply