Define File Bag fails

Got a problem you cannot solve? Try here.
InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

Define File Bag fails

Postby InstallAware@Jelich.info » Fri Jul 01, 2016 3:54 am

Hi Support Team,

I have a setup with the following script lines:

Set Variable EMBEDDED_FB to
Write into Text File $DEBUG_LOG$ from Value Old EMBEDDED_FB = $EMBEDDED_FB$ (at end of file)
Define File Bag : C:\Program Files\MyProject\Resources\*.*, include files recursively, get runtime location of files into variable EMBEDDED_FB
Write into Text File $DEBUG_LOG$ from Value New EMBEDDED_FB = $EMBEDDED_FB$ (at end of file)

This worked fine for the last releases ($EMBEDDED_FB$ pointed to the correct runtime location with the file from Resources-folder).

Now I have added .Net 4.6 Runtime by clicking the respective checkbox. The log contains now the following output from these lines:

Old EMBEDDED_FB =
New EMBEDDED_FB = C:\ProgramData\{E05D9D2C-F4E6-48C6-9FE9-A25D16D5DA1C}\Microsoft .NET Framework 4.6 with Service Pack 1 (x86 and x64)\mFileBagIDE.dll\25FFA439
The files from the original Resources folder are located in the setup here: .\OFFLINE\mFileBagIDE.dll\25FFA439
Thus the uniaque subfolder name "25FFA439" is correct, but "Microsoft .NET Framework 4.6 with Service Pack 1 (x86 and x64)" is not. Why the get runtime location adds "Microsoft .NET Framework 4.6 with Service Pack 1 (x86 and x64)" to the path?

The setup is now broken. Any help is appreciated.

Best regards
Michael

InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

Re: Define File Bag fails

Postby InstallAware@Jelich.info » Fri Jul 01, 2016 3:56 am

Forgot to mention: we use XE 3 - 1.11.2016

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Define File Bag fails

Postby FrancescoT » Fri Jul 01, 2016 2:09 pm

Dear Michael,

maybe I am missing something, but it's not clear to me which is your problem.

The File Bag Always generates a directory structure as you described when including an Application Runtime package.
This is not a recently introduced implementation with the File Bag plugin and all the recent IA version works in this way.
By the way, this approach is used to avoid possible folder collisions with the different "Application RTM" packages included with a project.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

Re: Define File Bag fails

Postby InstallAware@Jelich.info » Fri Jul 01, 2016 3:03 pm

Dear Francesco,

thank you for your answer.

"C:\Program Files\MyProject\Resources\" contains besides others during setup creation with the IDE (even if the folder name suggests that this folder is the runtime TARGETDIR) an exe file named dbUpdate.exe. This file I need to execute during setup, but it should not be installed. Therefore I use the Define FileBag action. All past setups this worked well: $EMBEDDED_FB$dbUpdate.exe pointed to the desired file during runtime execution of the setup.

After adding the .NET Runtime to be installed with the setup the runtime execution of $EMBEDDED_FB$dbUpdate.exe fails with the error code 'file not found'. Therefore I added the logs, which revealed that the file to be executed during runtime was "C:\ProgramData\{E05D9D2C-F4E6-48C6-9FE9-A25D16D5DA1C}\Microsoft .NET Framework 4.6 with Service Pack 1 (x86 and x64)\mFileBagIDE.dll\25FFA439\dbUpdate.exe".

This file does not exist during runtime! The file is located here: "C:\ProgramData\{E05D9D2C-F4E6-48C6-9FE9-A25D16D5DA1C}\mFileBagIDE.dll\25FFA439\dbUpdate.exe".

After adding the .NET Runtime to the setup the path suddenly contains an additional (not existing) sub folder with the name "Microsoft .NET Framework 4.6 with Service Pack 1 (x86 and x64)". Adding the runtime was the only modification, therefore I assumed that the fault was caused by the modification.

Best regards
Michael

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Define File Bag fails

Postby FrancescoT » Mon Jul 04, 2016 11:40 am

Dear Micheal,

if your file doesn't have to be installed and if you only need to execute it during the setup process, why don't you add it to SUPPORTDIR in your project instead?

http://www.installaware.com/forums/viewtopic.php?f=2&t=10676&hilit=SUPPORTDIR

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

Re: Define File Bag fails

Postby InstallAware@Jelich.info » Mon Jul 04, 2016 4:57 pm

Hi Francesco,

I informed you that there is an error with the File Bag Action and you suggest to avoid the use of that action ?

Is the FileBag Action deprecated because the SUPPORTDIR does the same?

Nevertheless - thank you for this tip - I'll try this approach tomorrow.

Best regards
Michael

FrancescoT
Site Admin
Posts: 5360
Joined: Sun Aug 22, 2010 4:28 am

Re: Define File Bag fails

Postby FrancescoT » Tue Jul 05, 2016 11:42 am

Dear Michael,

honestly I don't believe that exists a bug with the file bag command ... I personally use the same command quite extensively and never had a similar issue.

If you have a chance to send a minimal project that replicates the issue, I'll have a look.

For what concerns the SUPPORTDIR option, this is the best choice when dealing with single files. It's most appropriate to use the File Bag when you need to handle with folders at setup runtime.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

InstallAware@Jelich.info
Posts: 41
Joined: Mon Apr 13, 2009 8:58 am

Re: Define File Bag fails

Postby InstallAware@Jelich.info » Tue Jul 05, 2016 12:39 pm

Hi Francesco,

It is not a single file; the file needs further files to be located in the same folder (firebird embedded files).

Today I found the reason: I use 'precompiled runtime libraries' in order to speedup the build time (from 55 minutes to 20 minutes). In case I remove the checkbox in the project settings the file bag works well.

Therefore I added a compiler variable providing to choose either to check for .NET runtime only (fast frequent test builds) or install it if required (seldom 'true' release builds). With this approach this bug is less urgent to me;-)

I'll try to provide you a sample project the next days.

Best regards
Michael


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 52 guests