-
-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lazarus #1159
Comments
Hey, it's my man from goverlay 👀 Glad to see you are using AM. Note: If you need help with the goverlay appimage just let me know. Sorry for the off topic comments btw. |
hi @benjamimgois , sorry if I ask... I only see .deb packages, while the .zip in that page is for Mac OS x86_64 (darwin). Its there no portable version of Lazarus for Linux? Is the app inside the .deb package portable as well and without dependences if I extract it (I have just one like this in AM, |
Hi @Samueru-sama , yeah i'm making some tests with "am" on Kinoite and it's working pretty nice ! This project is really cool ! I still couldn't solve the issue with qt6pas on goverlay appimage, but will give it a new try soon. Thanks for the reception man ! |
Hi @ivan-hc , there's a .tar.gz package for it here. Sorry, my mistake. https://sourceforge.net/projects/lazarus/files/Lazarus%20Zip%20_%20GZip/Lazarus%203.6/ Lazarus is a aplication that really need some portable way of using it. Since the developpers have no interest in flatpak, i thought that maybe "am" could be as solution. I'm still very noob in making appimages if there's any other needed info. |
If it is an IDE that depends on GTK2 it should be easy to make an AppImage of. The only issue is that I normally set a ton of env variables when making appimages, which isn't ideal for an IDE because they would carry to the IDE as well and what gets run by it. If you want an AppImage just let me know, I maintain this repo of truly portable appimages or the tar.gz is good enough? |
After found the command to detect the URL...
...and after I tested the script... just realized that the tar.gz archive have no binary or script... and it is just an archive containing the sources to be compiled. Dammit. |
@Samueru-sama I have seen that Lazarus is in the "extra" repo on Arch Linux... are you able to test if it is possible to use it as a base for an AppImage? EDIT: maybe using the Conty method? |
sure thing, tomorrow I should have something ready. |
Hey guys, thanks for the help. I'm sure the lazarus community will love to have it in appimage format if possible. |
The lazarus package is 1.8 GiB? https://archlinux.org/packages/extra/x86_64/lazarus/ I also needed to install when I launch the app this is all I get: The gtk2 version ""works"" but wtf is going on haha: untitled.mp4 |
The 'lazarus-qt6' is a much better supported toolkit (that's one of the reasons i switched goverlay to qt). If possible, that would be a preferable version |
ok I think, once compressed into an AppImage it should be even smaller... much much smaller |
Okay will give another shot with the qt6 version, hopefully lazarus has means to relocate the |
Alright I have good and bad news. The good news is that an appimage is very likely possible. The bad news is that it seems lazarus only works with full paths to find stuff lie its own The appimage is a squashfs image that gets mounted with a random name on The other method is preloading some library that overwrites And this issue also happens to some other stuff, for example this: lazarus can find the fpc binary because I symlinked it to the same with WIth that said it seems lazarus tries to find its directory in the location where the binary is locared, because by default the search path is the WIll continue later, but if lazarus provides means to have portable installation that doesn't rely on full paths this should be easy, the thing is that I can't find such info. If all of this fails then the next step would be using something like conty and spin a container, the appimage when made with dwarfs goes down to just 218 MiB, which is a 10x reduction of the original size and launches very quickly as well. |
I ask for help in the lazarus gitlab and link this thread. Maybe some developer might be able to help. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41262 |
Maybe you should start the IDE with You can set that option inside a file called lazarus.cfg next to the lazarus executable. I am not sure / needs to be tested: If that can be given relative to the current dir, or the lazarus executable dir. The config can contain values for most of the directories. And they can be set using "ide macros" like You can also have templates for the config files (at least environmentoptions.xml, maybe others in the same directory as the lazarus executable. They will be used if no config exists yet. They will then be saved in the primary config path. A full list of IDE macros can be seen under menu: View > Ide internals > About IDE => then the tab IDE macros. |
Aren't those files user configurable and normally get written during the operation of the application? if that's the case then it would not work, the appimage is read only.
Looks like namespaces it is, but I will give it another shot and share the result tomorrow. |
I'm writing most of this from memory. And with a Windows background, but it should work the same on Linux (mostly).
In the "primary config path" (e.g. ~/.lazarus or in the %APPDATA% on windows) => yes, Lazarus will write to them. In the install folder (where the lazarus executable is) can be templates. They will be copied once, if there is no pre existing config yet. They are only used as template. About specifying a different config folder with --pcp= You don't need to do that, but if the user had an old install, the folder has the old paths. However, if indeed all pathes that are relative to the "install dir" are using $(LazarusDir) then they will all be correct. (There will still be a prompt that something changed if the install dir was changed. Then of course the FPC dir, if not a default install must be found too. That depends on how FPC was installed. If the install folder is write protected, the Lazarus must be started with The reason is, that when the user installs a package, the IDE needs to be recompiled. The new lazarus executable can not be written to the write protected folder, so it is written to the config directory (somewhere within, I don't recall). startlazarus will check for that and start the updated IDE. |
Alright this is what I got so far: https://mega.nz/file/ZRQnjDwA#k2s0tayRQYbrRGUH3n4RcONmJz80l4UlML-ibYybIfk You can pass the flag The appimage bundles everything and even starts on alpine linux (no glibc) but of couse I need to set the path to some files manually each time I start it. Here is the build script: There is no |
since they have a .deb package, I would try with https://github.com/ivan-hc/AppImaGen I'll publish what I'm able to do as a proof of concept into another repo. |
I did a script using https://github.com/ivan-hc/AppImaGen the AppImage is 274 MB and it seems to work quite well, it only includes the three .deb packages provided on sourceforge and being not based on an Arch Linux container, it should not have issues with hardware accelleration. Obvously, there are some things to be fixed, I redirected the custom AppRun to /usr/share/lazarus/$VERSION/startlazarus instead of the symlink /usr/bin/startlazarus (there are three symlinks I was unable to remove for some strange reason). I commented the steps of symlinking. How to usesimplescreenrecorder-2024-12-06_01.38.18.mkv.mp4Sorry if I won't take care of it myself. I don't know the program nor do I think I'll learn how to use it. So I don't know what any dependencies to add are. If you are familiar with configuring and installing via .deb packages, it will be easy to configure the recipe to create it. I had to add some extra steps because the main .deb package was not extracted directly from I hope it helps. |
PS: in the recipe.yml I use "Debian oldstable" as a branch, but as you can see, I specified only the three .deb packages that are listed. This is the content of the "recipe.yml" file
because I had to set the dynamic URLs in variables that the script expands
you can run the script several times, in the recipe I specified that if the three .deb packages if are not in place, you don't need to download them again. BTW, also if I specified "oldstable" as a Debian branch, no other .deb package has been downloaded from the Debian repos. Only the three listed. Maybe you need to add something to made "compilers" work... I see the red warning message, like @Samueru-sama in its screenshots. If you have other questions, I'm here |
PPS: my release of pkg2appimage does not contain |
Uhm... I suppose that by using only that three .deb packages, an AppRun with the right vairables that will point to a compatible compiler and something else... would easily convert Lazarus to an AppImage, without other stuff. |
Just noticed that simplescreenrecorder-2024-12-06_06.57.07.mkv.mp4
Just copied the errors. What now? EDIT: may it be that the AppRun is wrong? EDIT2: I romoved my previous message, since all stuff I asked for is already into the AppImage |
[Desktop Entry]
Name=Lazarus
Comment=Lazarus IDE
Exec=startlazarus %f
Terminal=false
Type=Application
Icon=lazarus
Categories=IDE;Development;GTK;GUIDesigner;
StartupWMClass=Lazarus
MimeType=text/x-pascal;text/lazarus-project-source;text/lazarus-project-information;text/lazarus-form;text/lazarus-resource;text/lazarus-package;text/lazarus-package-link;text/lazarus-code-inlay;
Keywords=editor;Pascal;IDE;FreePascal;fpc;Design;Designer;
The text was updated successfully, but these errors were encountered: