FBPROJECTDIR should not contain any "..\"

Hi

If a have a script which calls an other script and the included script uses the variable "FBPROJECTDIR", the
variable contains the path of the command line.  (See example below)

Project

\ - Project A
   --> Script1

\ - Include B
   --> Script2

Script1: Action "Include Project": %FBPROJECTDIR%\..\Include B\Script2.fbp6

Script2: Log Variable %FBPROJECTDIR% --> "D:\Project\Project A\..\Project B"

I would expect "D:\Project\Project B" since that's the absolute path.

Please fix that.

Thanks, best regards

Andrew

Hi Andrew,

We weren’t able to reproduce the issue you’re seeing, could you send in a project into support [at] finalbuilder.com that we can run which reproduces the problem.

Regards,
Paul.

Sure, please have a look at the attached sample.

Finalbuilder_Samples.zip (38.145 KB)

Hi Andrew,

Here’s the new test build of FinalBuilder which will expand relative paths for the FBProject & FBProjectDir variables for included projects.

URL: https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1954.exe

Regards,
Paul.

Hi

Thanks. Well done.

One more question, is it possible to get an additional "modifier" for the "set Variable"-Action to do this
expansion manually too.

Best regards,
Andrew

Hi Andrew,

We won't be able to add it as a modifier to the Set Variable action as expanding a relative path requires both the relative path and the base path to expand from, but I'll add it as a feature request for a future version.

You can currently expand a relative path in FinalBuilder using script:

var path = ExpandRelativePath("..\\Test", "C:\\Windows\\");

Regards,
Paul.

Hi Paul

Thx for your help.

Just for clarification, the modifier should do the following:
 

Action: "Set Variable" (or Path Manipulation)
Input: "D:\Project\Project A\..\Project B"
Modifier: "Reduce to absolute path"

Output: "D:\Project\Project B"
(Something like a path beautifier )

Regards
Andrew

Hi Paul,

I've tested the version you provided. It works, but something else seems to be broken.

Please, have a look at the attachment.
(With the fixed version the script 1 fails.)

 

Regards,

Andrew

 

 

FB_DEMO.zip (41.614 KB)

Hi Andrew,

Here is the latest test build of FinalBuilder which has the problem fixed.

URL: https://www.finalbuilder.com/downloads/finalbuilder/630/FB630_1973.exe

Regards,
Paul.