Created EXE w/Linux Laz IDE- now how do I install? (Ubuntu) lazarus / 32-Linux ---------------------------------------------------------------------- Sheepdog · 2024-06-10 10:09 I've created an .exe with Lazarus, on an Ubuntu box, using the amd64.deb. Now I'd like to "install" (wrong word?) that .exe on an Ubuntu machine, so I can run it just like I run programs installed using the Ubuntu... umm... "thing". (The newbie friendly... app store?... place where I fetched, say, Firefox from to set it up on my Ubuntu system.) Apologies for what is probably just a newbie-Linux-user question... but maybe a Lazarus-created .exe has quirks that must be provided for? (My program runs fine... when I run it from the IDE. It does nothing particularly clever.) If the answers for... a) Install on an Ubuntu box with the Lazarus IDE installed   ... and... b) Install on an Ubuntu box which does NOT have the IDE ... would be different, the answer to "a" will suffice for present wants. (Broad hints about the extra "features" required for the second want would be welcome.) With thanks, Tom.  Longtime Lazarus-on-Windows programmer. New to all aspects of Linux. ---------------------------------------------------------------------- Wallaby · 2024-06-10 11:14 Assuming by .EXE you mean a Linux ELF binary without additional dependencies, it would simply run on any Linux machine. If you want to create an installer, you would need to package that binary as a .DEB and/or .RPM file, or a SNAP, or AppImage. Otherwise you can simply compress it with into a TGZ file and will run anywhere you copy it. ---------------------------------------------------------------------- Sheepdog · 2024-06-10 11:49 Ah. Thank you. Apologies for flaws in my question! --- The ".exe" file seemingly had NO extension. (If I've got "Ubuntu doesn't hide extensions except .desktop" and "Extensions aren't really "a thing" in Linux" right! Other Linux newbies like me might find the following helpful... https://ubuntuforums.org/showthread.php?t=1460676 --- The file I was calling "the .exe" had the name I assigned to the .lpi file, i.e. the project name. --- Thank you, Wallaby, for the several useful things in your answer. I don't (yet!) aspire to an installer... unless it is needed for something I will come to in a moment. Is the TGZ compression a necessary thing, or an optional extra with some obvious pros and cons? --- I'm hoping that simply copying the file I was talking about to a folder of my choice on a different machine would make it usable there? I can open the "Files" app, drill down, and double-click, if that's the least painful option. I was hoping there is an uncomplicated way to create what Windows would call a shortcut that could appear on desktop (simple, crude answer), or someplace more sensible, so I can launch the program just by clicking on that? Is it complicated, once the file is on the system's storage, to get an entry in the "Apps" list, i.e. the window full of icons-to-click which comes up if I click on the "Show Apps" grid of dots in my "Dash" ("dashboard"). ---------------------------------------------------------------------- Dzandaa · 2024-06-10 12:00 Hi, Linux executable programs do not have an extension, as in Windows. They are Linux ELF binary. You can see the propriety of a program by running "file MyProgram" at a command prompt. You can run your program on another Linux computer of the same type (32 or 64 Bits). If you want to run it from everywhere on you Linux Machine, the best directory you can copy it in is /usr/local/bin, assuming that directory is in the PATH (in root mode). B-> ---------------------------------------------------------------------- MarkMLl · 2024-06-10 12:29 Quote from: Wallaby on June 10, 2024, 01:14:14 pmAssuming by .EXE you mean a Linux ELF binary without additional dependencies, it would simply run on any Linux machine. If you want to create an installer, you would need to package that binary as a .DEB and/or .RPM file, or a SNAP, or AppImage. Otherwise you can simply compress it with into a TGZ file and will run anywhere you copy it. I'd suggest that more to the point: * By convention, the executable doesn't have an "extension" which is a Windows (nee DOS, CP/M etc.) thing. * From the shell, you can run the binary by specifying its full path, or using e.g. ./MyProgram if it is in the current directory. * Remember that unix filesystems are case-preserving and case- sensitive. * You will find it more convenient to have a program on the path. By convention, locally-compiled programs go into /usr/local/bin * The normal user will probably not have permission to write to /usr/local/bin, so will need to use sudo (qv) providing his own password for authentication. * Files can be copied using the cp command. It might be necessary to use the -p option to preserve the executable mode (qqv). * Installing a file into the computer's menu system depends on the GUI (desktop environment etc.) in use. * There's a standard program "install" which can handle executable mode etc., but it won't solve the password issue or menu. * If copying to a different machine (e.g. using sftp (qv)), you will need to ensure that any prerequisite libraries are present. This is particularly the case if one system is 32- and the other 64-bit. * Stating the obvious, if you've used Lazarus to build a GUI-oriented program it won't run on a system which doesn't have a GUI. MarkMLl ---------------------------------------------------------------------- msintle · 2024-11-07 13:52 Especially if you're coming from the Windows world, you'll find this a breeze: https://www.installaware.com/installaware-multi-platform.htm Builds the classic installation wizards that you know from Windows - on Linux (and Mac). They even "downscale" to run in character mode, when their setup GUI fails to boot due to missing widgets. ---------------------------------------------------------------------- TRon · 2024-11-07 19:08 And because forcing some arbitrary windows method to other platforms (so that you can circumvent all security measures) please do not forget to especially implement an update function in your application that automatically checks if there is a new version of the application that which will automatically update itself when suited). Also always run you applications as a user with admin rights otherwise you would be prompted for passwords and that is very inconvenient (so better skip it all together). Better yet, give all your users admin rights from the get go. What could possibly go wrong... Some bold claims on that website (and I believe exactly none of them  ). ---------------------------------------------------------------------- msintle · 2024-11-07 19:36 Your belief is not required, as everything works exactly as advertised. Disclaimer: I am on that product team, and you may feel happy that the product was built using Lazarus. - While you haven't specified what arbitrary Windows method you're referring to, we don't force anything; nothing is hard coded in setups you create with IAMP. You can have a script that does absolutely anything you like - entirely unrelated to installations if that be your fancy. - We of course cannot circumvent any security measures, but we do our best to cooperate with them. Binaries are signed/notarized when the underlying platform offers a means to do so. Elevation is supported on each platform using native elevation routines. - We do ship a fully customizable update script and update dialogs, all built in IAMP itself so you may customize them to your heart's content. You are able to easily target updates for your released application versions and add additional targeting by language/OS/bitness/etc. - None of our toolchain requires admin rights, although you may, of course, perform admin actions as part of your installation should you choose to elevate. I would request that you don't judge us by the mistakes of other people who have absolutely nothing to do with us, and that you form your own opinion of us after an actual product evaluation (which is available for entirely free from our public website). ---------------------------------------------------------------------- TRon · 2024-11-07 20:16 Quote from: msintle on November 07, 2024, 08:36:07 pmYour belief is not required, as everything works exactly as advertised. First claim to dispute: "Support Linux, macOS, and Windows with zero dependencies (no Java) - zero failures." There simply can't be any zero dependencies. They are either present or they aren't. If they are they are either statically linked in or you can solve that by using some arbitrary method to access them. Quote- While you haven't specified what arbitrary Windows method you're referring to, we don't force anything; nothing is hard coded in setups you create with IAMP. You can have a script that does absolutely anything you like - entirely unrelated to installations if that be your fancy. The method of installing in general. Software on *nix system isn't deployed using an installer rather with something like a package manager or automation system (such as f.e. ansible). As a sysadmin I do not have the time to use yet another installation method, making all kind of choices, looking at pretty pictures  and/or press buttons. Quote- We of course cannot circumvent any security measures, but we do our best to cooperate with them. Binaries are signed/notarized when the underlying platform offers a means to do so. Elevation is supported on each platform using native elevation routines. afaik, we will never know since it is a closed source project. So, therefor the software can make all sort of claims that the software/ installation script can't do anything in particular. Quote- We do ship a fully customizable update script and update dialogs, all built in IAMP itself so you may customize them to your heart's content. You are able to easily target updates for your released application versions and add additional targeting by language/OS/bitness/etc. So can do any package manager. Quote- None of our toolchain requires admin rights, although you may, of course, perform admin actions as part of your installation should you choose to elevate. From that can only be concluded that the software and additional (data)files and/or dependencies are not installed at the locations that they are suppose to be located. QuoteI would request that you don't judge us by the mistakes of other people who have absolutely nothing to do with us, and that you form your own opinion of us after an actual product evaluation (which is available for entirely free from our public website). No, thank you. You are simply preaching to the wrong person here  Nothing personal other than that I find it rather distasteful to advertise such product in a generic discussion (edit: there is a specific sub-forum for that). ---------------------------------------------------------------------- MarkMLl · 2024-11-07 21:33 Quote from: msintle on November 07, 2024, 08:36:07 pm- None of our toolchain requires admin rights, although you may, of course, perform admin actions as part of your installation should you choose to elevate. So presumably you're installing into ~/bin or similar. What if there's multiple users on the system? Do they each have ~/lib, ~/etc and so on, and where do common files go (e.g. a "simultaneous users" counter)? MarkMLl ---------------------------------------------------------------------- msintle · 2024-11-07 22:40 Quote from: TRon on November 07, 2024, 09:16:32 pmQuote from: msintle on November 07, 2024, 08:36:07 pmYour belief is not required, as everything works exactly as advertised. First claim to dispute: "Support Linux, macOS, and Windows with zero dependencies (no Java) - zero failures." There simply can't be any zero dependencies. They are either present or they aren't. If they are they are either statically linked in or you can solve that by using some arbitrary method to access them. Unless someone deletes core system files (like what would be the equivalent of kernel32.dll on Windows), we don't have any extraenous dependencies. The widgets are the only exception to this. We currently support GTK2 and Qt5, as those are most mature kits Lazarus supports on Linux. If you don't have the libraries for your chosen kit, then we display your setup in pure character mode - showing you all your custom dialogs as pure text. So yes, our setups are 100% native code, and they really do work everywhere with a single binary (as long as the platform bitness matches [sadly, unlike Windows, Linux doesn't have a common denominator subsystem like x86 which is supported on amd64 and aarch64 OS flavors]). Quote from: TRon on November 07, 2024, 09:16:32 pmQuote- While you haven't specified what arbitrary Windows method you're referring to, we don't force anything; nothing is hard coded in setups you create with IAMP. You can have a script that does absolutely anything you like - entirely unrelated to installations if that be your fancy. The method of installing in general. Software on *nix system isn't deployed using an installer rather with something like a package manager or automation system (such as f.e. ansible). As a sysadmin I do not have the time to use yet another installation method, making all kind of choices, looking at pretty pictures  and/or press buttons. Fair enough, that's what silent installs are for. You can pass command line parameters to customize packages and run them entirely non- interactively. You can even force a GUI setup to run in character mode should you so fancy. Quote from: TRon on November 07, 2024, 09:16:32 pmQuote- We of course cannot circumvent any security measures, but we do our best to cooperate with them. Binaries are signed/notarized when the underlying platform offers a means to do so. Elevation is supported on each platform using native elevation routines. afaik, we will never know since it is a closed source project. So, therefor the software can make all sort of claims that the software/ installation script can't do anything in particular. You don't need open source for that. Looking at the command palette of the scripting language, you'll instantly get a sense of what the tool can or cannot do. Quote from: TRon on November 07, 2024, 09:16:32 pmQuote- We do ship a fully customizable update script and update dialogs, all built in IAMP itself so you may customize them to your heart's content. You are able to easily target updates for your released application versions and add additional targeting by language/OS/bitness/etc. So can do any package manager. Nice, can they also display custom dialogs that are designed in what looks exactly like Lazarus's dialog editor with the exact control properties afforded therein? Quote from: TRon on November 07, 2024, 09:16:32 pmQuote- None of our toolchain requires admin rights, although you may, of course, perform admin actions as part of your installation should you choose to elevate. From that can only be concluded that the software and additional (data)files and/or dependencies are not installed at the locations that they are suppose to be located. We don't have dependencies, since our toolchain is also native code, thanks to Lazarus of course. We treat Linux like any other first-class citizen in today's world of client operating systems. Meaning, the default installation folder for IAMP itself is somewhere in the user profile folder: /home/parallels/.local/share/InstallAware Multi Platform/ You can change that of course, and install it whereever you like. Quote from: TRon on November 07, 2024, 09:16:32 pmQuoteI would request that you don't judge us by the mistakes of other people who have absolutely nothing to do with us, and that you form your own opinion of us after an actual product evaluation (which is available for entirely free from our public website). No, thank you. Of course, and  thank you for the opportunity to clarify core misunderstandings. Fact is, there's been so many crap (as in hard to use and easy to make mistakes in) installers on Windows that all installers today get a bad rap and the industry at large has moved to straitjacket package managers which are very inflexible to use, hard to author for, and proliferating like mushrooms. We're not one of those. Quote from: TRon on November 07, 2024, 09:16:32 pmYou are simply preaching to the wrong person here  Nothing personal other than that I find it rather distasteful to advertise such product in a generic discussion (edit: there is a specific sub-forum for that). Touché. ---------------------------------------------------------------------- msintle · 2024-11-07 22:42 Quote from: MarkMLl on November 07, 2024, 10:33:57 pmQuote from: msintle on November 07, 2024, 08:36:07 pm- None of our toolchain requires admin rights, although you may, of course, perform admin actions as part of your installation should you choose to elevate. So presumably you're installing into ~/bin or similar. What if there's multiple users on the system? Do they each have ~/lib, ~/etc and so on, and where do common files go (e.g. a "simultaneous users" counter)? MarkMLl We don't really have common files, and we don't install into protected system folders. For our own kit, we've adopted the position that admin rights must not be required to install (or run) the product. That's just our setup, you could install your stuff anywhere you like - that's why we fully support OS native elevation scenarios. ---------------------------------------------------------------------- Diverod · 2024-11-13 22:23 Quote from: Sheepdog on June 10, 2024, 01:49:04 pmI was hoping there is an uncomplicated way to create what Windows would call a shortcut that could appear on desktop (simple, crude answer), or someplace more sensible, so I can launch the program just by clicking on that? I see this post is a little old but note you having the same struggle as I did. A simple way that I found was to make a desktop launcher file. I'll show an example of one I use to launch my basic deb package maker: the name of the file is 'com.DesktopDebPkg.desktop' and the content of the text file is listed below. (The DesktopDebPkg part of the file name can be anything you like). Use a plain text editor to make the file. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i [Desktop Entry]Type=ApplicationName=DesktopDebPkgPath=/home/rodg/Lazarus Projec ts/DesktopDebPkg/Exec=DesktopDebPkgIcon=/home/rodg/Documents/DesktopDe bPkg/Resources/DebPkg1.png [Desktop Entry]          // This needs to be the 1st line. Type=Application       // Leave this as is. Name=MyLabel         // This will be the text displayed under the icon on your desktop. Path=                         // This should be the path to the directory of where you placed your application. Exec=                        // This is the application name. Icon=                         // The full path and name of the image you want to display on the desktop for your launcher. When you first make the desktop launcher it will have a red X on it. Right-mouse-key the icon and select 'allow launching' and you should be all set. I use this on Ubuntu 24.04 and it does not show in the OS menu system but is handy for me. Hope this helps. ---------------------------------------------------------------------- msintle · 2024-11-14 10:35 Quote from: Diverod on November 13, 2024, 11:23:51 pmQuote from: Sheepdog on June 10, 2024, 01:49:04 pmI was hoping there is an uncomplicated way to create what Windows would call a shortcut that could appear on desktop (simple, crude answer), or someplace more sensible, so I can launch the program just by clicking on that? I see this post is a little old but note you having the same struggle as I did. A simple way that I found was to make a desktop launcher file. I'll show an example of one I use to launch my basic deb package maker: the name of the file is 'com.DesktopDebPkg.desktop' and the content of the text file is listed below. (The DesktopDebPkg part of the file name can be anything you like). Use a plain text editor to make the file. Code: Text  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i [Desktop Entry]Type=ApplicationName=DesktopDebPkgPath=/home/rodg/Lazarus Projec ts/DesktopDebPkg/Exec=DesktopDebPkgIcon=/home/rodg/Documents/DesktopDe bPkg/Resources/DebPkg1.png [Desktop Entry]          // This needs to be the 1st line. Type=Application       // Leave this as is. Name=MyLabel         // This will be the text displayed under the icon on your desktop. Path=                         // This should be the path to the directory of where you placed your application. Exec=                        // This is the application name. Icon=                         // The full path and name of the image you want to display on the desktop for your launcher. When you first make the desktop launcher it will have a red X on it. Right-mouse-key the icon and select 'allow launching' and you should be all set. I use this on Ubuntu 24.04 and it does not show in the OS menu system but is handy for me. Hope this helps. Not to beat a dead horse, but the Create Shortcut command in InstallAware Multi Platform already takes care of this for you. Based on which OS your are compiling it for - macOS/Linux/Windows - the same and single Create Shortcut command in your setup script creates shortcuts that work properly as intended - including executable parameters, icons, startup folders, etc. Believe it or not: This is quite a bit of a mess even just amongst Linux flavors themselves, so something seemingly as trivial as this ends up taking a ton of effort. Let's also not forget Create File Type, which associates file types (ex: .pdf) with handler applications (ex: Acrobat), again consistently and successfully on all platforms (again including custom file type icon support). Needless to say, that was much worse of a nightmare than the venerable Create Shortcut! Makes you think how much we often take for granted. ---------------------------------------------------------------------- Diverod · 2024-11-14 12:59 I only posted here because, to me, the OP was in search of knowledge and I only saw a solution provided. I tried to provide some knowledge.    Respectfully, I do not wish to participate in any discussion/debate about a solution.    Perhaps a moderator should just close this thread. ---------------------------------------------------------------------- TRon · 2024-11-14 13:10 Just for the record: I refrain from further commenting here because I do not wish to further indulge the advertisement. After having had a look, all that I wrote still holds but the discussion does not belong here not have I any interest in argumenting against any unfounded claims and/or convenient wrong interpretation(s) of my statements. If you are a user of this product and appreciate it then by all means keep appreciating it. Just don't bother clueless users (that is something I will keep ventilating). ---------------------------------------------------------------------- msintle · 2024-11-15 11:28 The intent is really not to bother anyone or to spam the forum with advertising, but to communicate that these are truly non-trivial problems based on the experience I acquired working on said product's team. The desktop files are very fickle and work differently on almost all Linux flavors, causing many endless pitfalls. This is the value in using a tool whose job it is precisely to address and isolate you from those differentials, so you can focus on what matters - your application itself. FWIW, you'd have better luck "reverse engineering" the tool by having it create those desktop files for you on different Linux instances and then comparing the differences, than to actually discover all those nuances by yourself. I respectfully submit the above to your consideration and thank you very much for your understanding if, due to my previously disclosed involvement with the product, I am not being an objective poster; unbeknownst to myself. ---------------------------------------------------------------------- MarkMLl · 2024-11-15 11:53 Quote from: msintle on November 15, 2024, 12:28:25 pmThe intent is really not to bother anyone or to spam the forum with advertising, but to communicate that these are truly non-trivial problems based on the experience I acquired working on said product's team. I for one agree that there are issues, but the solution needs to be thought out carefully while respecting unix tradition. QuoteThe desktop files are very fickle and work differently on almost all Linux flavors, causing many endless pitfalls. This is the value in using a tool whose job it is precisely to address and isolate you from those differentials, so you can focus on what matters - your application itself. No: they work differently with different Window Managers and in some cases different versions of window manager, and when that happens it should be reported as a bug and if necessary raised with freedesktop.org which is responsible for their format. I'd particularly highlight the OnlyShowIn= and NotShowIn= items, which are honoured more in the breach than the observance. Apart from that I agree that at the very least XDG-compatible desktop files could usefully be created by the Lazarus IDE, in the same way that Manifest and Application Bundle files are supported, and /possibly/, that a shell script could be created to link to xdg- desktop-menu. I'm sure that patches would be welcomed by some. MarkMLl