Recent

Author Topic: How to build Lazarus from local source with fpupdeluxe?  (Read 316 times)

Cascade

  • New Member
  • *
  • Posts: 22
How to build Lazarus from local source with fpupdeluxe?
« on: November 26, 2024, 12:03:25 pm »
I have Lazarus Trunk in a local git repository, and I've made a couple of local changes.  How can I get fpupdeluxe to build it?

I thought perhaps I could change the urls at the top of the UI to file://... instead of the default http locations.  If I hover over the fields a hint appears: "double click to edit" - but they remain read only when I double click.  Maybe there's an option in Setup+ ?

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: How to build Lazarus from local source with fpupdeluxe?
« Reply #1 on: November 26, 2024, 12:36:25 pm »
@Cascade:
That is going to be very difficult to accomplish with fpcupdeluxe (not even sure if it is possible).

In theory FPCUpDeluxe allows for another source(location) to obtain the required files but it was not designed to cater your circumstances.

But, if you have a working commandline compiler (whether or not created by fpcUpDeluxe) then it is about a 3-liner to build Lazarus from source:
Code: Bash  [Select][+][-]
  1. cd root_director_of_your_lazarus_sources
  2. make
  3. make bigide
  4.  
And that should be able to build Lazarus. see also wiki (please ignore the path setting (*) )

Executables are located in the same directory. Just make sure to set the -pcp option when starting up startlazarus or Lazarus executable

(*) in the make command the option FPC="full_path_and_name_of_the _fpc_executable" can be provided to select the (correct) commandline compiler

In case you are looking for a more permanent solution then it would be easiest to create a patch that can be run over a pristine source-tag. FPCUpdeluxe does have proficiency for that but I do not know the details (it is but a additional one-liner to the build instructions in order to apply a patch manually so Inever used FPCUpdeluze for that myself).
« Last Edit: November 26, 2024, 12:55:39 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

Cascade

  • New Member
  • *
  • Posts: 22
Re: How to build Lazarus from local source with fpupdeluxe?
« Reply #2 on: November 26, 2024, 01:15:44 pm »
Thank you for the advice TRon.  I will have a go at building manually with those 3 lines of code.

I've basically created a patch, which seems fine, and want to test before I submit it.  So what I'm building will be a very temporary Lazarus install, and I'm anxious it doesn't interfere with other builds or anything else on the system (so completely self-contained).  That was my reason for thinking fpupdeluxe was the way to go initially.

I'm also anxious not to 'pollute' my local repository with any files created by the build process, so maybe I need to duplicate the source folder first before I begin.

Anyway I'll give it a shot - it's all a learning process.

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: How to build Lazarus from local source with fpupdeluxe?
« Reply #3 on: November 26, 2024, 01:25:29 pm »
In that case, and what I usually do, make the changes in a separate branch and in the end create a patch file (diff between branches).

Then use the instructions as provided to build. It is always possible to revert back to checking out your development branch as long as the changes that were introduced by the build are not commited.

If you want to make sure not to interfere with an existing installation then please play attention to the pcp option, see  also wiki.

The most important bit is to make absolutely sure your dev build does not use use your system wide Lazarus configuration (with testing your dev lazarus while using your system-wide configuration it is possible to seriously damage your original configuration)

As long as you have that under control, nothing should be able to go wrong (DISCLAIMER: I am not responsible for any damages that might occur so always make sure to make a backup)

In case of questions, feel free to ask.

FWIW: from experience I am almost able to guarantee a 100% that there comes a time you will forget to set the pcp option before starting a dev build of Lazarus. In case you do and are quick enough, close your dev build asap. But, also a good reason to make sure you have a backup of your original Lazarus (system wide) configuration directory  :)
« Last Edit: November 26, 2024, 01:44:59 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018