LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Lavezza

Relative Path support for App Builder Destination Directory

Status: New
We have multiple developers working the same project. We all store our copy of the source code in different directories. When using Application Builder in the Project, you need to set an absolute path for the build destination. It would be great if this directory could be a relative path from the project file.
10 Comments
TCPlomp
Trusted Enthusiast

I belive this is a relative path.

 

Only the display is an absolute path.

You can verify this in the actual lvproj xml file:

 

<Property Name="Destination[0].path" Type="Path">../builds/NI_AB_PROJECTNAME/My Application/Application.exe</Property>

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
crelf
Trusted Enthusiast
It needs to be changed to *display* the relative path.




Copyright © 2004-2023 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 2.5 License.
Lavezza
Active Participant

In 8.6 LabVIEW showed an absolute path and used an absolute path. In 2009, it looks like it uses a relative path, but still displays an absolute path. I just assumed 2009 worked like 8.6. Glad to see this won't be a problem in the future.

 

Pat

mzaleski
Member
I agree with crelf; It should show it as a relative path.
Lavezza
Active Participant

OK. Working with 2010 now (always one behind Smiley Sad). Having this problem again. Following TCPlomp's advice, I looked in the xml file.

<Property Name="Destination[0].path" Type="Path">/C/TRUNK Software/Tester/Common Files/builds/NI_AB_PROJECTNAME/Tester GUI.exe</Property>.

 

NOT absolute path. Would be great if this was absolute (not all developers have the software in a folder called C:\TRUNK Software)

Lavezza
Active Participant
277725
LabVIEW 2010 Application Builder TARGETDIR not specified when building installer with absolute path

Actually, if the above fix in 2011 is refering to the Destination path all may be well.

PNR
Member
Member

I strongly recommend that NI checks the relative assignment again!

 

As in LabVIEW 2011 and AFAIK up to 2013 the build destination is stored as relative path to the project file's parent folder ("..\").

 

Imagine you organize your projects in SVN and your *.lvproj file is located at "..\trunk\project.lvproj" and you want your builds at "..\trunk\Builds\" it will store the location as "..\trunk\Builds\" rather than ".\Builds\"...

You might ask: "How is that a problem?"

 

Now then: Imagine further that you want to make a branch of your project, do some stuff and build the application again within the branch. The output file will be located at "..\trunk\Builds\", that is for example "C:\SVN\LabVIEWStuff\branches\trunk\Builds\" rather than "C:\SVN\LabVIEWStuff\branches\MySpecialBranch\Builds\"...

 

Since I want all the branch stuff within my actual branch that is a problem unless my project file is stored in a subfolder (I could do that, but don't want to Smiley Tongue)

 

I hope that explains my issue with the current situation. I'll have to save the *.lvproj file into a sub-directory for my SVN structure to work properly. I also think it makes much more sense with a path relative to the project file anyways.

tyk007
Active Participant

I have found under some scenarios that, if the path is outside the relative scope that LabVIEW resets the build spec path and it becomes absolute - choosing a new folder does not reset the path back to relative to the project but to an absolute.

 

Only choosing the project folder as the destination, clicking OK, and then re-selecting the destination path changes the destination to relative to teh project folder.

User002
Not applicable

In any case, the Local Destination Directory field always displays as an absolute path from the build specification properties, and when you pick a new destination, it shows it as an absolute path.

 

It would be better if there were options for what kind of path to use (relative or absolute) and for relative paths, what they are relative to (project file seems like it would make the most sense).

IlluminatedG
Active Participant

https://www.vipm.io/package/illuminatedg_lib_ig_relative_build_paths/

 

LabVIEW is specifically implemented to only support going relative one layer up. The above package changes that to relative anywhere on the same drive.

~ The wizard formerly known as DerrickB ~
Gradatim Ferociter