Recent

Author Topic: Build and release automation (like .bat files running Lazarus)  (Read 770 times)

MISV

  • Hero Member
  • *****
  • Posts: 633
Build and release automation (like .bat files running Lazarus)
« on: February 26, 2019, 04:10:41 am »
I need to automate the following:

- Delete "Lib" folders to enforce new build (somehow this has proven necessary in the past - maybe not any longer)
- Change project settings to "Release"
- Rename some .inc files (I have an .inc file for each of my tools which define lots of stuff)
- Build
- After this run "strip" (since Lazarus keeps quite a bit of debug? info in generated executables no matter what I do)
- Copy/move the generated executable into my own .app file
- Codesign it

On Windows I have some huge .bat file which include other .bat files depending on which program I am trying to build.
I need something similar on Mac I think since I often mess up my builds in various ways causing problems.

Has anyone done something similar to this on Mac for Lazarus? A script file to automate it building/releasing

dbannon

  • Hero Member
  • *****
  • Posts: 756
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Build and release automation (like .bat files running Lazarus)
« Reply #1 on: February 26, 2019, 05:27:04 am »
MISV, I have a script I use to build tomboy-ng, its based around lazbuild and assumes a lazarus install with necessary packages added.

I don't drop the lib directory, has not proven necessary.
I point lazbuild to the project and specify the build mode - so, assume the project already has the appropriate build mode. Does not do other things you want but its a start.

See it here : https://github.com/tomboy-notes/tomboy-ng/blob/master/package/mk_cocoa_dmg.bash

I have also, recently, been experimenting with a script that just calls fpc and all options are specified there. Interested in it because its not dependent on a particular lazarus build for packages, I can easily change the package when experimenting with different versions. And, its perhaps a lot more command line friendly in that you can download Lazarus source, make lazbuild, LCL and Components and away you go. No need to start the gui interactively, a lot quicker.

You do still need lazbuild to build any packages  you are downloading at the same time ...

Neither model answers any more than a very small part of your question ....

Davo
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng