Recent

Author Topic: InstallAware Using Lazarus IDE  (Read 9651 times)

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11942
  • FPC developer.
Re: InstallAware Using Lazarus IDE
« Reply #15 on: April 19, 2024, 04:46:46 pm »
Quote
Right now it's plain impossible to install official Lazarus releases on most Linux environments, unless you're using FPCUPDLX. Again, it is exactly the same for Apple Silicon native macOS installations - for which there's no PKG installer available, period. FPCUPDLX is a heroic effort, but has a track record of backing itself into corners it cannot get itself out of (I've been seeing error 512 and/or outright hangs of the compilation process on virtually every Linux system I've tried it on, when using FPC 3.3.1 and Trunk/Stable Lazarus).

I replied about changing the working windows to something else. I don't see the point of that, since the shared aspect will be low as I said as every OS has its own files and directories.

But be my guest, start building and iterating installers, and we'll see how it goes.

Quote
Am I the only one in thinking this investment would pay off dividends over time? Instead of maintaining multiple - and disparate - PKG, DEB, RPM installation scripts

Since the distributions only integrate those(deb,pkg), and most users install via their distro tools this is a strange statement. I don't know much about OSX practicalities.

And I think the different iterations of the installer scripts for various OSes and distros should not be underestimated either.

Anyway, the only thing is just go out and try if you feel strong about it.
« Last Edit: April 19, 2024, 04:57:43 pm by marcov »

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: InstallAware Using Lazarus IDE
« Reply #16 on: April 20, 2024, 02:45:38 am »
....
Right now it's plain impossible to install official Lazarus releases on most Linux environments, unless you're using FPCUPDLX.
Sorry, thats plain silly.
I run a set of seven virtual and real machines to build and test my app before release. Yesterday, I decided I needed to use Lazarus 3.2 instead of 3.0 so, quick tweak of my bash script, installed Lazarus 3.2 on four quite different Linux systems in about 5 minutes each. They all had FPC323 snapshot and each worked as expected.

(My script grabs a local Lazarus source zip or, if necessary downloads one, puts it in an appropriate place, build lazarus, sets up a config dir, trivial !)

Quote
Again, it is exactly the same for Apple Silicon native macOS installations -
I don't have Apple Silicon hardware but have no problem building Lazarus on a intel based Mac and cross compiling.

Quote
I honestly can't see the harm in having a consistent installation process, with official support for AMD64 and aarch64 targets on both Linux and macOS. It'll only serve to make Lazarus more accessible for greater adoption. With Delphi just at #11 on this year's Tiobe index, the timing is really perfect for an upgrade of the installation (and by implication, the user experience).
...
Help me understand how this is a bad thing?

Even within Linux, different binary install models are more or less compulsory. End users who want a binary install expect the familiar install model for their platform. Deb users want a deb, rpm users want an rpm, packman....

One single look and feel installer would be unfamiliar to every possible user. Its like saying we can make a car that runs on water, or a boat that runs on land, possible and has been done. But in both cases, they do a terrible job at everything !
...
Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

TRon

  • Hero Member
  • *****
  • Posts: 3631
Re: InstallAware Using Lazarus IDE
« Reply #17 on: April 20, 2024, 02:55:41 am »
Even within Linux, different binary install models are more or less compulsory. End users who want a binary install expect the familiar install model for their platform. Deb users want a deb, rpm users want an rpm, packman....

One single look and feel installer would be unfamiliar to every possible user. Its like saying we can make a car that runs on water, or a boat that runs on land, possible and has been done. But in both cases, they do a terrible job at everything !
^^ Exactly that ^^ ergo +1

The idea to have a uniform installer for each and every platform might sound nice but in practice will not work for those reason(s). Ofc. everybody is more than welcome to implement their idea('s).
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

msintle

  • Full Member
  • ***
  • Posts: 247
Re: InstallAware Using Lazarus IDE
« Reply #18 on: April 20, 2024, 04:52:37 pm »
Quote
Right now it's plain impossible to install official Lazarus releases on most Linux environments, unless you're using FPCUPDLX. Again, it is exactly the same for Apple Silicon native macOS installations - for which there's no PKG installer available, period. FPCUPDLX is a heroic effort, but has a track record of backing itself into corners it cannot get itself out of (I've been seeing error 512 and/or outright hangs of the compilation process on virtually every Linux system I've tried it on, when using FPC 3.3.1 and Trunk/Stable Lazarus).

I replied about changing the working windows to something else. I don't see the point of that, since the shared aspect will be low as I said as every OS has its own files and directories.

But be my guest, start building and iterating installers, and we'll see how it goes.

I would love to try that, but I'm not sure how to do it properly. Who are some people that might be able to provide guidance?

InstallAware Multi Platform does have its own Setup Capture tool, but I'm wary of using this - as it will just dump a list of files (and folders) and not really contribute anything beyond that.

Quote
Am I the only one in thinking this investment would pay off dividends over time? Instead of maintaining multiple - and disparate - PKG, DEB, RPM installation scripts

Since the distributions only integrate those(deb,pkg), and most users install via their distro tools this is a strange statement. I don't know much about OSX practicalities.

Why do we have to care about the distribution-specific package formats when InstallAware builds native code, Windows-esque "setup" (without the .exe) binaries that run directly and install regardless of which package formats the distribution has built-in support for?

This is the native code power of Lazarus at work, people!

I would fathom the only matter at hand would be whether Lazarus has particular dependencies for each individual distribution, in which case, it could turn into a spaghetti mess of untangling those dependencies. For example, Qt5 editions of Lazarus on Linux require the installation of a Qt5Pas library - which seems distribution agnostic - and is therefore good news. But what of other potential GTK2/Qt5 libs that might be required on some distributions (and not others)?

I've tested InstallAware itself and seen that if it cannot boot its GUI setup for some reason, it'll still go ahead and display console renderings of whatever (custom) setup dialogs that are a part of your project. So this gives me confidence that the tool at hand, at least, can cope with missing mandatory GUI dependencies, and at least get to the point of installing them (without instantly breaking).

But this won't answer what the specific Linux dependencies are, and what the best practices would be to install them.

For example with the Setup Capture route, you could obtain a full list of binaries required for each particular scenario. But Setup Capture doesn't tell you which of those binaries are encapsulated in which Linux packages on which platforms...and distributing ready-compiled-binaries made for one distribution on other distributions seems like that could be a bit of a brute forcing.

Ideally, we'd only be including Lazarus (and Free Pascal) binaries (and sources) in our distribution...and use the underlying operating system package manager to install missing dependencies "natively", if that makes sense?

And I think the different iterations of the installer scripts for various OSes and distros should not be underestimated either.

Anyway, the only thing is just go out and try if you feel strong about it.

I would love to get started, but I can hardly see myself pulling this off alone.

Maybe macOS would be far easier to do, as InstallAware already includes sample projects to install Xcode Command Line Tools - as part of an InstallAware setup - which is the only dependency Lazarus has on macOS.

The irony there being FPCUPDLX already works fine on macOS, and the real problem I'd like to solve here is how to get the job done on Linux.
« Last Edit: April 20, 2024, 04:54:57 pm by msintle »

msintle

  • Full Member
  • ***
  • Posts: 247
Re: InstallAware Using Lazarus IDE
« Reply #19 on: April 20, 2024, 05:03:08 pm »
....
Right now it's plain impossible to install official Lazarus releases on most Linux environments, unless you're using FPCUPDLX.
Sorry, thats plain silly.
I run a set of seven virtual and real machines to build and test my app before release. Yesterday, I decided I needed to use Lazarus 3.2 instead of 3.0 so, quick tweak of my bash script, installed Lazarus 3.2 on four quite different Linux systems in about 5 minutes each. They all had FPC323 snapshot and each worked as expected.

(My script grabs a local Lazarus source zip or, if necessary downloads one, puts it in an appropriate place, build lazarus, sets up a config dir, trivial !)

That script sounds like gold. Would you mind sharing it? A starting point for a Lazarus Linux installer could actually be converting that script into an InstallAware setup itself.

I've been unable to install Lazarus via FPCUPDLX (so I have the latest version) on literally any Linux (aarch64 or AMD64) that I tried it on recently. Call me an idiot, but I either keep getting error 512, or the compiler hangs at some or the other part of the local compilation process.

To say nothing of the fact that installing pre-compiled binaries would speed things up for everyone, but then we'd be stuck with official releases again.

Quote
Again, it is exactly the same for Apple Silicon native macOS installations -
I don't have Apple Silicon hardware but have no problem building Lazarus on a intel based Mac and cross compiling.

Quote
I honestly can't see the harm in having a consistent installation process, with official support for AMD64 and aarch64 targets on both Linux and macOS. It'll only serve to make Lazarus more accessible for greater adoption. With Delphi just at #11 on this year's Tiobe index, the timing is really perfect for an upgrade of the installation (and by implication, the user experience).
...
Help me understand how this is a bad thing?

Even within Linux, different binary install models are more or less compulsory. End users who want a binary install expect the familiar install model for their platform. Deb users want a deb, rpm users want an rpm, packman....

Yes, and that is part of the problem here we'd be addressing.

One single look and feel installer would be unfamiliar to every possible user. Its like saying we can make a car that runs on water, or a boat that runs on land, possible and has been done. But in both cases, they do a terrible job at everything !
...
Davo

InstallAware have already achieved this objective with their own installer for themselves. Including selectable components, web downloads, and even web updates. So clearly it is possible, as I have seen it work consistently and predictably on every platform I've been able to try it on.

Even if it can't boot itself in GUI mode, their installer falls back to console rendering for setup dialogs. Even their web updates work this way (and are launched via Linux "shortcuts" accessed from the Activities menus) and are quite a thing to see, especially in view of the fact that nothing is hard-coded but simply being rendered from fully customizable dialog designs. Imagine having many Lazarus configuration steps moved to the installer, where they belong; instead of a confusing first launch experience, which is how it is today! (debugger, FPC locations, etc.)

It's crazy a product built using Lazarus can do this, while Lazarus itself cannot (granted, the product in question is an installer, so maybe not an entirely fair comparison).
« Last Edit: April 20, 2024, 05:06:54 pm by msintle »

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: InstallAware Using Lazarus IDE
« Reply #20 on: April 21, 2024, 03:19:19 am »
...
That script sounds like gold. Would you mind sharing it?

More like aluminum I think. Light, not very flexible and easily broken.

I will share it but its definitely not even a "poor mans fpcupdeluxe", its creates the type of install I want, and expects a system like I use. Suited only for someone who is happy to hack into a bash script ! And such a person might be better creating their own from scratch !

It origionally depended on FPC3.2.2 and if it did not find it, will try to install from your distro repo, that was pretty safe as almost all distro repos have FPC322. However, I now use FPC3.2.3, fixes, I keep an install kit handy of a  snapshot that seems to work for me. This is necessary now because FPC3.2.2 does not support openssl 3.0 and I need that for my app.

If you are happy with FPC3.2.2, then change the line, near the top of the script accordingly. Otherwise, get a fpc fixes working and tested before you use my script (I have a script that builds fpc323 assuming you already have a working fpc322 but its even dodgier !)

Being a script, its easily hacked, unlike fpcupdeluxe. But being a script, it does not have good error checking, is very inflexible, easily broken. If you still want it, here you go !

Quote
To say nothing of the fact that installing pre-compiled binaries would speed things up for everyone, but then we'd be stuck with official releases again.
Honestly, by the nature of Lazarus, I believe it should be installed from source. fpcupdeluxe does do that for you but does hide the details. It sure suits (and works fine) for a lot of users.

Quote
Yes, and that is part of the problem here we'd be addressing.

You build something, I am quite sure people will look at it !

But be aware that the old software rule about one third development, two thirds maintenance probably applies to installers as much as applications. And is proportional to complexity. And what you propose will be very complex.

Good luck !

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

TRon

  • Hero Member
  • *****
  • Posts: 3631
Re: InstallAware Using Lazarus IDE
« Reply #21 on: April 21, 2024, 03:35:58 am »
The irony there being FPCUPDLX already works fine on macOS, and the real problem I'd like to solve here is how to get the job done on Linux.
In a similar fashion ?

It is that I personally prefer to create all my builds manually from source but on occasion do use/test FPCUpDeluxe for testing purposes and I've never encountered any issues with it on Linux. For sure sometimes a build is broken but that is usually not FPCUpDeluxe's fault rather something amiss in/with trunk (not implying that FPCUpDeluxe is flawless but flaws seems to be rare and things do get complicated or fail when wanting to create cross-compilers for f.e. embedded).
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

dbannon

  • Hero Member
  • *****
  • Posts: 3156
    • tomboy-ng, a rewrite of the classic Tomboy
Re: InstallAware Using Lazarus IDE
« Reply #22 on: April 21, 2024, 05:38:37 am »
Yep, exactly right TRon. Using trunk FPC is, frankly, a very brave move. I would not recommend anyone other that real experts use any trunk compiler in their day to day stuff. Fixes is better but far from guaranteed to be good every time.

fpcupdeluxe just delivers what its told to get, it cannot be held responsible for the bugs anyone expects to find in a development stream.

Thats why my personal approach is to select a fixes snapshot that provides what I need but does not have any of the little traps.

A little while ago I suggested there should be an informal program to identify a know good fixes and have fpcupdeluxe offer that as the most recent "believed good snapshot". Much better than just grabbing whatever is on the top of the heap at the time.

Mind you, a fpc release would be better, most users of FPC Fixes and trunk do not need the bleeding edge, it is just we have to have something a newer than fpc322.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11942
  • FPC developer.
Re: InstallAware Using Lazarus IDE
« Reply #23 on: April 21, 2024, 04:50:06 pm »
The last month, trunk has been very unstable due to changes in the module system.

But I have used trunk for years, and usually if a version is stable you can use it for a while.

msintle

  • Full Member
  • ***
  • Posts: 247
Re: InstallAware Using Lazarus IDE
« Reply #24 on: April 23, 2024, 05:26:36 pm »
I've posted a conversion job for this at Upwork, to see if anyone better qualified than me might be up for a quick buck:

www.upwork.com/jobs/~01bba81ac1e6b6bca5

Happy to render the bounty as payment on other platforms of your choosing, too.

msintle

  • Full Member
  • ***
  • Posts: 247
Re: InstallAware Using Lazarus IDE
« Reply #25 on: June 08, 2024, 07:07:14 pm »

msintle

  • Full Member
  • ***
  • Posts: 247
Re: InstallAware Using Lazarus IDE
« Reply #26 on: June 24, 2024, 07:34:05 pm »
Here's a submission on a completed conversion.

Can anybody check if this is satisfactory to begin with at least?

msintle

  • Full Member
  • ***
  • Posts: 247
Re: InstallAware Using Lazarus IDE
« Reply #27 on: July 17, 2024, 06:07:58 pm »
Anybody had a chance to look at this yet?

 

TinyPortal © 2005-2018