This is a cross post from the Wish List forum... thought I'd try my luck over here.
I'm currently evaluating FB to replace an existing [extensive] process, and seem to be missing something, or something seems to be missing. After building all of my Visual Studio Solutions & Projects, I have a need to rebase the generated binaries [rebase -b address *.dll *.ocx] in a specific folder.
I haven't been able to find a simple way in FB the to Rebase, or the ability to run a VS Command Prompt / Batch file. I have found the default DOS action, and can submit the "vcvars" command myself through it, but this leads to other interesting parsing and/or bat file script persistence issues. Customization via Action Studio could also be an option, but at this point I'm trying to keep it simple.
Please let me know if I'm missing something, or if someone has addressed this already.
Thanks for posting, however I’ve taken the liberty of deleting your cross-post to make it easier to keep track of this issue.
If you just need to use the rebase.exe utility, then I would recommend using the Execute Program action with the full path of the rebase.exe utility as the executable. You can set the parameters to “-b *.dll *.ocx” and the starting directory to your specific build output folder.
If this path to rebase.exe changes from machine to machine, then it is possible to use some script to update the path from the FinalBuilder options (which autodetect the path to a Visual Studio installation.) Please let me know if you’d like to see a script snippet which demonstrates this.
I’ll also add a dedicated “Rebase DLL” action to our to-do list for a future version.
Since this is a test of FB, I’m going the easy route and I’m creating a simple temporary .bat script in the local folder via the “Write to Text File” Action with the following lines:
Call "%VS90COMNTOOLS%"vsvars32.bat rebase …
Before creating the file I verify write access, and delete the temporary file if for some reason it already exists. After running it, I delete it (I don’t like messy build locations).
Later, once we purchase FB, I’ll work on a more elegant solution.
Sorry, I didn't make myself really clear. I've attached a FinalBuilder project with an Execute Program action that runs "%VS90COMNTOOLS%\bin\rebase.exe" to show how this can be achieved without a custom batch file.
Hopefully that'll make for a smoother solution. :-).
(The action is configured to succeed only on exit code 99 from rebase.exe because that’s what rebase.exe seemed to return when I tested it. If this is wrong you’ll need to change it on the action settings - you can have it ignore the exit code, or require a different number. I couldn’t find a definitive guide to what the different return codes mean.)