Recent

Author Topic: Automating Install  (Read 2773 times)

Grahame Grieve

  • Full Member
  • ***
  • Posts: 207
Automating Install
« on: October 02, 2021, 11:54:17 am »
Here's a fragment of my install instructions for linux development:

clone the following repos to ~\work:
 - https://github.com/dezlov/PascalTZ
 - https://github.com/grahamegrieve/delphi-markdown
 - https://github.com/mriscoc/extrasyn
 - https://github.com/grahamegrieve/HtmlViewer
 - https://github.com/grahamegrieve/lazarus-ide-tester
 - https://github.com/Xor-el/QRCodeGenLib4Pascal
 - https://github.com/grahamegrieve/fhirserver
 
Run Lazarus
 open the package work/PascalTZ/package/pascaltz.lpk. Compile and install it
 open the package work/extrasyn/extrahighlighters.lpk. Compile it
 open the package work/extrasyn/extrahighlighters_dsgn.lpk. Install it
 open the package work/lazarus-ide-tester/package/idetester.dpk. Compile it
 open the package work/lazarus-ide-tester/ide/idetester_dsgn.lpk. Install it
 open the package work/HtmlViwer/package/FrameViewer09.lpk. Compile and install it
 open the package work/delphi-markdown/packages/markdownengine.lpk. Compile it
 open the package ork/QRCodeGenLib4Pascal/QRCodeGenLib/src/Packages/FPC/QRCodeGenLib4PascalPackage.lpk - compile it
 
Obviously I can automate the git cloning part. But can I automate the whole loading and installing packages? Do I just lazbuild them? or is there more to it?

dbannon

  • Hero Member
  • *****
  • Posts: 1674
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Automating Install
« Reply #1 on: October 02, 2021, 12:49:01 pm »
Grahame, maybe it depends on what you want to do once its all built ?  If you then plan on opening the IDE and doing development work, yes, I suspect you may have to do it manually.

But if you are building this rig to just compile an existing package, that is, all  the development is already done, you don't need to install the various packages into the IDE just to use them when building.  For example, I build my app using LCL and an external package, KControls. I have a bash script that installs FPC and Lazarus and then it downloads KControls, compiles it and then, remembering where it compiled KControls, goes off and builds my app.

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

devEric69

  • Hero Member
  • *****
  • Posts: 644
Re: Automating Install
« Reply #2 on: October 02, 2021, 01:47:10 pm »
AFAIK, basically, with a script, the idea is to download (using wget, for example) and drop everything on your machine. Then:
• run `lazbuild --add-package ./.../xxx.lpk`, for each downloaded package, i.e. ask to only register the Lazarus package files (*.lpk). But, this cmd-line does not build.
• finish with a\several final cmd-line(s) in order to do build(s): `lazbuild --build-ide="-gl -godwarfsets ...\..." build-mode="my debugging IDE"`, or\and `lazbuild --build-ide="-O2 -g- -Xs ...\..." build-mode="my normal IDE". That\those final statement(s) are used in order to rebuild a\some profile(s) of the IDE-itself, including the static source packages *.lpk above inside each re-compilation of a named IDE profile with its good compiling switche(s).

(It may not be the best method.)

ps: like I did, you can learn a lot by reading @dbannon tomboy-ng's computerized build *.sh scripts.

« Last Edit: October 02, 2021, 02:05:41 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Grahame Grieve

  • Full Member
  • ***
  • Posts: 207
Re: Automating Install
« Reply #3 on: October 03, 2021, 01:47:08 am »
Thanks. That gets me going, though I don't know bash at all. It'd be lovely if there was a command line mode for fpcupdeluxe...

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 793
  • Professional amateur ;-P
Re: Automating Install
« Reply #4 on: October 03, 2021, 07:24:57 am »
Hey Grahame,

Thanks. That gets me going, though I don't know bash at all. It'd be lovely if there was a command line mode for fpcupdeluxe...

There is. It's called fpcup and it's what fpcupdeluxe uses in the background.

Mind you that using fpcup is not the same as using fpcupdeluxe.

In that same repository there is also fpclazup to deal with Lazarus things.

Again, please be advised that fpcupdeluxe uses both these command line utils, but then adds a ton of features on top of them.

Hope this can help you in any way!!

Cheers,
Gus
Lazarus 2.3.0(trunk) FPC 3.3.1(trunk) Ubuntu 21.10 64b Dark Theme
Lazarus 2.0.12(stable) FPC 3.2.2(stable) Ubuntu 21.10 64b Dark Theme
http://github.com/gcarreno

DonAlfredo

  • Hero Member
  • *****
  • Posts: 1505
Re: Automating Install
« Reply #5 on: October 03, 2021, 10:52:53 am »
As nearly all packages that are needed by fhirserver were already included into fpcupdeluxe, I have added the fhirserver itself into the modules.
Installation of fhirserver and all of its dependencies should now be as easy as two clicks:
1: select fhirserver in the modules.
2: install this module.

See latest release:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases/tag/v2.2.0c

The changes will also be included in command line fpc[laz]up (within the next couple of days).

Grahame Grieve

  • Full Member
  • ***
  • Posts: 207
Re: Automating Install
« Reply #6 on: October 05, 2021, 08:15:32 am »
Thanks, and wow. I really didn't expect that. And I hadn't paid attention to the modules functionality, but I will now ;-)

I'm super glad to know that fcpup is kept up to date. so if I use fpcup and fpclazup in a build script, I'll get a fully functional lazbuild.exe? awesome... thanks for your work.

Grahame Grieve

  • Full Member
  • ***
  • Posts: 207
Re: Automating Install
« Reply #7 on: October 08, 2021, 03:03:31 am »
well, we have some lovely build scripts here: https://github.com/grahamegrieve/fhirserver/tree/master/build

thanks all

Grahame Grieve

  • Full Member
  • ***
  • Posts: 207
Re: Automating Install
« Reply #8 on: October 10, 2021, 11:19:02 am »
@DonAlfredo, could you possible release a version of fpclazup for M1 Macs? - that'd be just lovely, thanks

Grahame Grieve

  • Full Member
  • ***
  • Posts: 207
Re: Automating Install
« Reply #9 on: October 13, 2021, 01:03:05 pm »
he did! - thanks

 

TinyPortal © 2005-2018