Code Monkey home page Code Monkey logo

Comments (4)

gcarreno avatar gcarreno commented on May 23, 2024

Hey Marek(@galfar),
CC: Benito (@benibela)

First of all, please let me apologise for taking so long to answer this.

Hummm, interesting 🤔, I was under the impression that the installer would add an entry for both the IDE(lazbuild.exe, lazarus.exe) and the compiler(fpc.exe) to the system PATH variable.

To be honest I'm not a Windows person any more. I've been Linux only for many years now and I don't have a Windows machine to test this on. But since the Debian packages add the binaries to /usr/bin, this is not an issue under Linux.

From the way we invoke lazbuild in the build scripts, at least the path for lazbuild and lazarus are rightly setup under Windows. I'm quite baffled that the installer itself does NOT add the path to where the fpc.exe is.

Since I only use Lazarus when doing all my code: CLI and GUI, I'm always relying on an available lazbuild to compile my code. And I relegate all the immense command line params to be sorted out by lazbuild specified by progname.lpi.

If any of you can give me a compelling reason to support using:

> fpc source1.pas source2.pas -o progname.exe

Instead of:

> lazbuild progname.lpi

Then I'll try and find out how to add the correct path to the system PATH variable.

But in the end, what we need is to make sure that the lazarus-<version>-fpc-<version>-win64.exe installer really sets the PATH for both the compiler and the IDE.
I could implement it as a quick fix, but ultimately, this is the responsibility of the installer. At least in my opinion.

And please allow me one very dumb question: Are you sure that the installer does not add an entry to where fpc.exe is installed?

Cheers,
Gus

P.S.: When you run lazbuild it does not hide or obfuscate the compiler output that states the version of it. Just have a good look at the output of any lazbuild run and you'll see this in there somewhere:

> lazbuild progname.lpi
....
Free Pascal Compiler version 3.2.2-r49371 [2021/05/21] for x86_64
Copyright (c) 1993-2021 by Florian Klaempfl and others
(1002) Target OS: Linux for x86-64
....

from setup-lazarus.

gcarreno avatar gcarreno commented on May 23, 2024

Hey Marek(@galfar),
CC: Benito (@benibela)

In the mean time I've asked the question about setting the PATH to fpc.exe on the forum:

So, please feel free to also monitor that.

Cheers,
Gus

from setup-lazarus.

gcarreno avatar gcarreno commented on May 23, 2024

Hey Marek(@galfar),
CC: Benito (@benibela)

I HATE BEING OLD!!!

After a bit of back and forth on the forum thread, we have come to the conclusion that I'm the one adding the location of lazbuild to the system 😞

So this means I now have to do it for the location of FPC, of course 😄

This will come when I release 3.1.0 with cache support. I've made the mistake to NOT start the cache upgrade on it's own branch to then merge it to main, and now I've made several commits that I think will break the whole thing if I release it before I finish the cache upgrade. Yes, silly me for being a solo on this repo and breaking the golden rules of git workflows 😮‍💨

EDIT
In the meantime, I've floated the question if this doesn't have to be something the installer itself should be setting.
Let's see where that goes...

Cheers,
Gus

from setup-lazarus.

galfar avatar galfar commented on May 23, 2024

Thanks for implementing this in setup-lazarus, it works well now.

My use case is for a library that needs to work without Lazarus as well so I have
some build scripts for demos etc. also for FPC directly. And since
setup-lazarus is a convenient way to install both Lazarus and FPC
I wanted to also run FPC-only build scripts for testing with GH Actions.

Another time I needed to use FPC directly was because there's no way to pass
custom compiler flags to lazbuild. Yes, you can tell it which build mode to use
but Lazarus build modes in lpi files cannot inherit from "base" mode (like in Delphi).
And keeping say 10 build modes in sync (search paths, ...) just to have one compiler option or flag different is not very appealing.

from setup-lazarus.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.