01-18-2018 05:04 AM
I've tested my application in development and everything works fine, but on deployment nothing works because paths have changed. I'm using a specific file structure which I can't seem to keep intact during deployment.
A few examples are:
Original File Structure: <Application Directory>\Resources\Images\Logo.ico
Post Deployment Structure: <Application Directory>\Data\Logo.ico
Original File Structure: <Application Directory>\Benches\A380\Calibration Data\A1.txt
Post Deployment Structure: <Application Directory>\Data\A1.txt
I need to keep the Original File Structure intact because I dynamically change paths based on calculated data, if everything gets dumped in to "/data'', nothing is going to work.
Am i missing something obvious? This is the first time I've done a deployment to windows (perhaps it shows!)
Solved! Go to Solution.
01-18-2018 05:12 AM - edited 01-18-2018 05:13 AM
Hi LBee,
- all "additional" files will be put into the \data-subfolder of your AppDir by default. You may try to change the AppBuilder settings to put files in other folders… (You can easily find this folder by using the AppDir file constant in your executable!)
- you may create the needed file structure on the first run of your executable by programming a "cleanup" routine in LabVIEW…
- you may put the needed files in a ZIP files (using the file/folder structure as is needed) and unzip this file on the first run off your executable…
I need to keep the Original File Structure intact because I dynamically change paths based on calculated data,
You can create some error handling in your VI to recreate the needed folders in case they aren't exisiting…
01-18-2018 05:52 AM
>> I need to keep the Original File Structure intact because I dynamically change paths based on calculated data,
>>> You can create some error handling in your VI to recreate the needed folders in case they aren't exisiting…
The folders will already contain files, these files are being addressed dynamically, the content of the files isn't changing, but referencing by name alone is not good enough as many folders contain the same files, by the same name (so all that's changed is the folder name to address a new file)
>> all "additional" files will be put into the \data-subfolder of your AppDir by default. You may try to change the AppBuilder settings to put files in other folders… (You can easily find this folder by using the AppDir file constant in your executable!)
I find that all folders are stripped and only the files appear in \data. A file at the path <App Dir>\Benches\A380\AI\Sig1\Configuration.txt will end up as data/Configuration.txt
>> you may create the needed file structure on the first run of your executable by programming a "cleanup" routine in LabVIEW…
I'm really trying to avoid this :(, there is potential when this is scaled for a rather huge number of files involved
>> you may put the needed files in a ZIP files (using the file/folder structure as is needed) and unzip this file on the first run off your executable…
I'll try this approach first I think
I can't help but think that the "Preserve Disk Hierarchy" option should just keep my file structure intact?
01-18-2018 06:13 AM
I believe the application builder only adds the folders you tell it to put something into. So you may need to add dummy files into your installer to keep your folders active.
01-18-2018 06:32 AM
After a few hours of messing about now, I've finally got it working.
For anyone who runs in to the issue in the future, I had to do the following when creating the application exe build:
As @crossrulz mentioned above, any folders that have no files inside (only subdirectories) are stripped and the files inside are placed instead of the folder. Luckily for me, this didn't matter with that particular folder
01-13-2020 05:45 PM
I cannot give this enough Kudos, as I had thought that I