Newbie questions about project variables

I just started to use Finalbuilder (7.0.0.1065) and it worked great.

But I have some questions.

I have a main FB project that include other project. I probably started the wrong way. so I have a lot of project variables declared in my main project that I like to have in my subprojects. I can copy them but only 1 or 2 at a time. If I select variables in the variables editor and select copy and then paste it in the sub project variables editor it only copies one or two. What am I doing wrong?

I like to use some of the delphi project versioninfo like filedescription, internalName from the delphi project it self. Is that possible?

I got a lot of smal programs and I want FB to read the name of the delphi project (like myApp) and use that to fill in some version info so that I don't have to do that for all of my projects by hand. Is that possible?

Is it possible to set delphi project var for a group of delphi projects. Can I set the output directory ect. for a group?

I know I can set then when I use te wizard, but the problems is not all of our application are finished yet. So overtime I get more and more applications and I like to have the project options set automaticly when I add a new delphi project. Is that possible?

An other problem I got is when I use my own library path instead of "Use global Delphi Library Path"  it get the error that BDSLIB-does not exist.

I have use radstudio XE Enviroment Variables at Startup checked and I have set the default compiler to Delphi XE. What else should I do.

For now I have no problems with using the global library path but maybe in the futher is might change

 

 

 

 

 

 

Hi

Sorry for the delay in reply, this post seems to have been overlooked. Glad to hear you have been enjoying FinalBuilder so far!

We have only recently implemented copying of multiple variables, you can download the latest build which includes this feature from here:
https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_1134.exe

As far as managing you version info goes, I would not recommend using the data within the Delphi project files to set version info for your projects. The best way to manage your version info is to use FinalBuilder Property Sets. The advantage of doing this is that you can build multiple configurations of a single project with different version data.

I have attached a very simple example that should point you in the right direction.

The Delphi action does not allow you to pass a group project (.groupproj) file. You will need to build each package indiviually. A simple way to manage this is create an xml document that defines all the packages to be build (will need to include the path to the project file) and then use a XML iterator to loop through the projects and build these (let me know if you need help with this).

This way you can specify output paths, conditional defines, etc within your xml document and just load all these values to variables at runtime and pass them to the Delphi compiler action. This allows you to create a data driven build process, so when it comes time to add additional packages you only need to update you XML file.

As for your library path issues, what value have you set for the library path when you get the error, also could you post the exact error text?

Regards,
Steve

VersionInfoExample.zip (8.866 KB)

Thank you for your answer. It makes thing clearer. I going to look at the XML solution.

When I use the library path from my ini file I get the message

--> Error expanding variables in Library Path : Variable : BDSLIB - does not exist!
this is the library path I use

$(BDSLIB)\$(Platform)\release;$(BDS)\Imports;$(BDSCOMMONDIR)\Dcp;$(BDS)\include;$(BDS)\RaveReports\Lib;

I did set the compilers option to delhp XE with use XE enviroment variables at Start up

Hi

I would check that this definition is correct by opening the Delphi action and typing $( in any of the text fields. This will display a list of Delphi environment variables that are available.

Regards,
Steve

None of the DElphi XE variables that Delphi uses are available it seems.

Can you explain to me how the variables work. In my main project I made a lot of persistent project variables. Those aren’t available in the other projects I have (I use those other projects as sub projects in the main project). When I try to copy the varaibles I can chose more than one to copy but only one or two got copied. When I click on the refresh button in the projects tab I see alll my variables but they aren’t avaialable in my sub projects. What should I do to share all the variables in all my projects?

Are you using the build that I posted the link to above (build 1134)? This build allows you to copy and paste multiple variables between projects by opening the Variable Editor dialog and then selecting all the variables you want to copy (you cannot select multiple variables from the project tree, although you can right click on a variable group and copy the group from the project tree).

If you have the same variables defined in your main project as your sub project then you can enable the ‘Share Variable Namespace’ option. This allows you to set common variables in your master project and access them in your sub projects. For instance if you had a variable called CurrentTime defined in all your projects and you set this at the start of your master project, sharing the variable namespace across included projects allows you access the value that was set in the master project from all your sub projects.

When you type a single % sign in one of the text fields on the Delphi action are you seeing the variable auto-completion control displayed?

Regards,
Steve

Something to bear in mind with delphi variables in FinalBuilder, they are not normal FinalBuilder variables, they are only available in the Delphi Action. This is because they are virtual variables provided by the action, and matched to the compiler version you selected. It was done this way in FB7 to avoid conflicts from various delphi versions all defining the same environment variables. Some of our customers are component vendors who have a bunch of different delphi versions installed, they all use the same variables (like BDS) whihc have different values… virtualsing them in the action was the best way to resolve conflicts. We do register some FinalBuilder variables for each delphi version, for example you should see DELPHIXEDIR if FinalBuilder has detected DelphiXE on the machine.

If you are getting errors about BDSLIB not being defined, then that suggests that FinalBuilder is not finding your Delphi XE installation. FinalBuilder looks in HKEY_LOCAL_MACHINE\Software\Embarcadero\BDS\8.0 at the RootDir value to determine where delphi lives. I just made a small change which should improve detection of the delphi location in some cases :

https://www.finalbuilder.com/downloads/finalbuilder/aex6/FB700_1166.exe


Thank you both for your replies. I never before worked with FinalBuilder, so it all very new to me. So far I am happy with it.