CompileTimeBuild questions

Interested in developing new plug-ins? Got one to share? Post here!
lewisv
Posts: 20
Joined: Wed Oct 29, 2008 9:31 am

CompileTimeBuild questions

Postby lewisv » Thu Dec 17, 2009 8:19 am

I am working on a plug-in and i noticed the CompileTimeBuild function.
Currently I am just copying the dll (just like i have seen done in several examples on this site )

I have a question.
The documentation says that this function should copy any files i need to the build directory. Is it possible to:
In the design time editor tell my plug-in a file, during the compile time build copy that file. ( i am guessing that copying the file will include it in the build )
Then during the runtime pick up that file parse it and do my stuff?
If so what directory should the file be in during the run time function?
If this will work - does this mean i will not have to specify the file in the support file area?

Also: just a request. Is SURE would be nice if there were a very simple application that we could specify our runtime and exe dlls to, and by a press of a button we could test each function.
It is a pain to copy the dlls and test them in the installaware application.

Thanks

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

Postby MichaelNesmith » Thu Dec 17, 2009 11:02 am

The File Bag plug-in does exactly that: it accepts files at design time, and copies them to its own folder at compile time. At runtime, it accesses these files from the same folder it finds itself (the plug-in DLL) inside. So you can follow that example, or just use File Bag if you're just trying to come up with a more flexible Support Files mechanism.
Michael Nesmith
InstallAware
Home of The Next Generation MSI Installer
Get your free copy today - http://www.installaware.com/

lewisv
Posts: 20
Joined: Wed Oct 29, 2008 9:31 am

Postby lewisv » Thu Dec 17, 2009 12:41 pm

I tried the file bag plug-in - but it only works with new installs. It does not work with patches.

Believe me i tried to use File Bags.
But when a patch is built (it does compile) it does not copy files, so when you run the patch it can not find the files you needed. If you look at previous posts i have had, i found out that the runtimes can not be installed in patches because they use file bags, i had to copy code and msi files to get them to work in a patch.
I would be GREAT if they did work in both patches and installs.
Maybe i am just doing something wrong.

I am guessing that if i did copy my own files, then they would be be under the support dir something like $SUPPORTDIR$mydir

But that brings up the thought, if file bags don't work in patches it may be because the compiletimebuild is not called. If that is the case my plug-in will not work either.

Thanks for the help.


MichaelNesmith wrote:The File Bag plug-in does exactly that: it accepts files at design time, and copies them to its own folder at compile time. At runtime, it accesses these files from the same folder it finds itself (the plug-in DLL) inside. So you can follow that example, or just use File Bag if you're just trying to come up with a more flexible Support Files mechanism.

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

Postby MichaelNesmith » Thu Dec 17, 2009 12:56 pm

File Bag, and all other plug-ins, work with patches. Patches aren't anything special as far as the MSIcode compiler is concerned! Double-check your compiler variables. Some blocks of code are omitted when building a patch, and it's all spelled out in your MSIcode. Just read and change the code as necessary.
Michael Nesmith

InstallAware

Home of The Next Generation MSI Installer

Get your free copy today - http://www.installaware.com/

lewisv
Posts: 20
Joined: Wed Oct 29, 2008 9:31 am

Postby lewisv » Thu Dec 17, 2009 1:17 pm

Maybe I am doing something wrong.
But every time i put a file bag in my code, during the patch i get a message telling me that some needed files do not exist!

Let me tell you the cases that i have tried.
My first issue deals with vc 9.0 on a patch. ( i have posted another question on this also - no replies yet )
My original app required vc8 it now requires 9, so i changed the checkbox in the app. I noticed the if compiler not equals patch around the runtimes so i removed them. I ran the install and i could not find the msi file. I did tell me i needed vc9 and tried to install it. I copied the two vc9 script files, removed the file bag, and put the msi and cab into the support dir, and it worked!

Another example: i inserted a few files into a file bag, and used them. Once again not inside the if compiler patch section. It ran fine during a regular install, but the same code failed because it could not find my files in a patch. It ran that section of code in the patch. I put the file bag command right before where i needed the file.

I maybe doing something wrong. But i have no idea what! As far as i can tell the file bag code is getting executed in a regular build and a patch. (it executes code directly below it)
I don't see anywhere in the plug-in itself that has to do with patches.

I am not the only person that has seen this issue. Look at
http://www.installaware.com/forums/viewtopic.php?t=4529&highlight=file+bag+patch

Thanks for the help!

lewisv
Posts: 20
Joined: Wed Oct 29, 2008 9:31 am

updates

Postby lewisv » Mon Dec 28, 2009 9:26 am

has there been any update on this issue?

Has anyone tried to replicate it? Am I doing something wrong?

Thanks.


Return to “Plug-In Development”

Who is online

Users browsing this forum: No registered users and 39 guests