"Automating" FastReport Installations

PolomintPolomint Australia
edited January 2019 in FastReport VCL
With the arrival of RAD Studio 10.3 we now have another "target" for FastReport / FastCube installations.

Because we "customise" ## the installation, and correct a number of issues ** we have built a Utility (with an FR and an FC instance) to apply these changes after the Installer completes, and before the Recompile Utility is run.

All good up to a point.

But for each instance of RAD Studio we support %% (currently XE7, 10 Seattle and 10.2 Tokyo) there are four manual steps needed:
- change language for 32-bit
- change language for 64-bit
- compile all packages for 32-bit
- compile all packages for 64-bit

So that will now be 16 manual steps for each new version of FR or FC we install.

For some odd reason "compile all" doesn't apply the language changes - hence the doubling up.

We've looked at the logs produced by the Recompile Utility in the hope we could "reverse engineer" this to automate at least the four steps (and hopefully the 16) but so far without success.

Anyone have any ideas?

Cheers, Paul


Comments

  • PolomintPolomint Australia
    edited January 2019
    Polomint wrote: »
    For some odd reason "compile all" doesn't apply the language changes - hence the doubling up.
    OK! We've solved the need to "double up" by adding code to our "Fix Installation" tool to:
    - run .\Res\FRCC.exe for all of the modified resource files (.\Res\English\*.xml)
    - copy the generated resource source files (*.pas) to the ".\LibD*" sub-folders

    We then can fire off Recompile.exe for "All Packages" for each of the 32 and 64 bit IDE environments we support. There is no longer a need to do the "change Language" step for each of them.

    Now this is working, we are planning on an alternative to the Recompile.exe chore, by creating a *.groupproj file that we'll feed into MSbuild from the "Fix Installation" tool. The trick will be working out the parameters to pass... [img]style_emoticons/<#EMO_DIR#>/blink.gif" style="vertical-align:middle" emoid=":blink:" border="0" alt="blink.gif" /> I'll let you know how we get on. Cheers, Paul[/img]
  • PolomintPolomint Australia
    edited January 2019
    Polomint wrote: »
    [We are] planning on an alternative to the Recompile.exe chore, by creating a *.groupproj file that we'll feed into MSbuild from the "Fix Installation" tool.
    Congratulations to all who spotted the problems with "groupproj" and "MSbuild".

    After wasting a lot of time, it was obvious for two reasons why that was never going to fly:
    - GroupProj expects the *.dpk files to be upgraded to *.dproj (for compatibility with MSbuild) and that would have to be done each time (at least whenever the *.dpk files change)
    - the FastReport (and FastCube) source is in %ProgramFiles% path which is protected so creating new files there would be problematic

    And perhaps that is why the FR Team doesn't do the Recompile.exe builds that way!!

    Turned out to be much easier to fall back to just running Dccxx.exe under elevated privilege with the individual *.dpk files, using the parameters found in the Recompile.log file (generated by Recompile.exe).

    Our Utility Tool creates a Windows batch file in the user's work folder for each installed Edition and in x32 and x64 flavours. The batch file simply sets the directory to the appropriate Source Location, and then runs Dcc.

    We've created a reusable "script" the Tool reads, which separates the Runtime and Designtime Packages (only compiled for x32), and makes sure the compilations happen in dependency order.

    The batch files were tested by running them manually in a privileged Command Window. And we've now updated the Utility to run them (via Jedi Component Library's ShellExecAndWait) one after another.

    So we now have a relatively automated "post install" setup, that first makes our customisation changes, and does this hiding the number of environments we support. It is generalised enough to work on machines with different configurations.

    Utility Tool Todo List:
    - Add smarts to the Utility Tool to only create steps to compile the packages we need (not currently using QB, FIB for example).
    - Build a script for FastCube Recompilations
    - Register Components in the IDEs
    - Update the Library Path in the IDEs

    The Recompile.exe provided by the FR/FC Installation can now be shelved!

    Cheers, Paul

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.