Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-11

FPC install on windows with limited rights

10 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I have a severely locked down laptop (work one) so I can't install anything that creates menu shortcuts, desktop icons or goes into "Program Files". So I can't run the official Windows FPC installer. I don't actually know what is the requirement in Windows to trigger the "admin rights" dialog - but the official FPC installer does trigger it, so I can't use it.

Is there a way to unpack the installer so I can manually install FPC in my home folder? Or is there some other lesser known official Windows installer I could use. eg: the FPC Linux installer doesn't require root access. Is there a Windows FPC installer that uses the same installer as Linux or FreeBSD? A console installer?

I managed to track down a very old FPC 2.6.0 bundled with Lazarus v1 in a "portable application" installer. This worked, but it's very old. I guess I would go through the tedious process of compiling each FPC release myself starting with the 2.6.0 fpc.exe I have - but if there is a faster way, I would obviously prefer that.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 20 lines
Hi, I have a severely locked down laptop (work one) so I can't install anything that creates menu shortcuts, desktop icons or goes into "Program Files". So I can't run the official Windows FPC installer. I don't actually know what is the requirement in Windows to trigger the "admin rights" dialog - but the official FPC installer does trigger it, so I can't use it. Is there a way to unpack the installer so I can manually install FPC in my home folder? Or is there some other lesser known official Windows installer I could use. eg: the FPC Linux installer doesn't require root access. Is there a Windows FPC installer that uses the same installer as Linux or FreeBSD? A console installer? I managed to track down a very old FPC 2.6.0 bundled with Lazarus v1 in a "portable application" installer. This worked, but it's very old. I guess I would go through the tedious process of compiling each FPC release myself starting with the 2.6.0 fpc.exe I have - but if there is a faster way, I would obviously prefer that.

The installer is made with inno setup. There are several inno extract tools available, e.g.:
http://constexpr.org/innoextract/

You can use that to extract the files to any location you want. A fast USB3 for a portable installation seems like a good idea.

Michael.

Reply by email

James Richters
to Graeme Geldenhuys: I have a severely locked down laptop (work one) so I can't install anything that creates…

I'm curious if it really needs to be installed? I installed it on my desktop computer then just copied the entire FPC directory to my NAS, then went to my laptop where FPC was never installed, mapped a drive to access the FPC copy on the NAS and ran it, and everything seems fine to me. I have even put the entire thing on a USB hard drive and plugged it into customers computers and made source adjustments then recompiled the program and had no problems at all.... I certainly would never have my source code on their hard drive... and I never install anything on their computer.

Maybe this is just something I get away with because my source code and FPC are on the same drive or NAS share and I use relative paths in fp.ini for FU like -Fu..\..\FPC\3.0.4rc1\units\$fpctarget\* and I also usually have a batch file in with my source code that just calls FPC with a relative path like ..\..\FPC\3.0.4rc1\bin\FPC %1 %2 %3 %4 It's just something I always have done since turbo pascal, which I also never installed, just copied the TP directory wherever I wanted to run it.

Anyway.. I run FPC all over the place and never "install" it.

James

Earlier message 21 lines
-----Original Message----- From: fpc-pascal On Behalf Of Graeme Geldenhuys Sent: Thursday, November 02, 2017 2:48 AM To: FPC-Pascal users discussions Subject: [fpc-pascal] FPC install on windows with limited rights Hi, I have a severely locked down laptop (work one) so I can't install anything that creates menu shortcuts, desktop icons or goes into "Program Files". So I can't run the official Windows FPC installer. I don't actually know what is the requirement in Windows to trigger the "admin rights" dialog - but the official FPC installer does trigger it, so I can't use it. Is there a way to unpack the installer so I can manually install FPC in my home folder? Or is there some other lesser known official Windows installer I could use. eg: the FPC Linux installer doesn't require root access. Is there a Windows FPC installer that uses the same installer as Linux or FreeBSD? A console installer? I managed to track down a very old FPC 2.6.0 bundled with Lazarus v1 in a "portable application" installer. This worked, but it's very old. I guess I would go through the tedious process of compiling each FPC release myself starting with the 2.6.0 fpc.exe I have - but if there is a faster way, I would obviously prefer that. Regards, Graeme -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp _______________________________________________

Reply by email

Bart
to James Richters
James Richters wrote
I'm curious if it really needs to be installed?

For commandline compilen (and building Lazarus from console) it's preferrable to have fpc's bin directory in the path (and you need admin privileges for that).
Otherwise just copying the entire fpc folder (and adjusting fpc.cfg) should be enough for running and building from Lazarus. (Did that on Win98, because the fpc installer needs XP or higher)

Bart

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: The installer is made with inno setup. There are several inno extract tools available,…
Michael Van Canneyt wrote
The installer is made with inno setup. There are several inno extract tools available, e.g.: http://constexpr.org/innoextract/

Thank you Michael, that worked perfectly. Strange that the inno setup executable (the FPC installer) doesn't have a parameter to do that itself. I have seen installers in the past that allows for that, but I don't know what program they used to generate that installer.

You can use that to extract the files to any location you want. A fast USB3 for a portable installation seems like a good idea.

Yes, that was my plan as well. With FPC and Lazarus it is pretty easy to run everything stand-alone from a USB stick.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to James Richters: I'm curious if it really needs to be installed? I installed it on my desktop computer…
James Richters wrote
I'm curious if it really needs to be installed?

FPC and Lazarus can run just fine without an installer. In fact, that is how I've been running FPC and Lazarus under Linux and FreeBSD for the last 10 years. The problem under Windows was that I couldn't get hold of a v3.0.2 FPC binary. The only Windows installer for FPC requires admin rights to run, which I couldn't do on my work laptop.

But now that Michael mentioned the Inno Setup Unpacking tool, I managed to unpack the setup. Now I can copy that to my home folder setup the fpc.cfg and then go from there (compile fpGUI, compile Lazarus etc.).

The FPC team really should consider releasing a Windows binary zip release too. It really wouldn't be any extra effort as they already prep everything for Inno Setup, so a simply ZIP command is all that would be needed.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Bart: On Thu, Nov 2, 2017 at 11:31 AM, James Richters For commandline compilen (and building…
Bart wrote
For commandline compilen (and building Lazarus from console) it's preferrable to have fpc's bin directory in the path (and you need admin privileges for that).

If you use ConEmu [https://conemu.github.io/] - an alternative console for Windows, it allows you to set up environment variables for each session without requiring admin access. ConEmu is a 100x better than the default Windows Command Prompt, and it has tons of other features too. I run Git Bash, Default Console, PowerShell and more all via ConEmu.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Martok
to Graeme Geldenhuys: FPC and Lazarus can run just fine without an installer. In fact, that is how I've been…
Graeme Geldenhuys wrote
The FPC team really should consider releasing a Windows binary zip release too. It really wouldn't be any extra effort as they already prep everything for Inno Setup, so a simply ZIP command is all that would be needed.

In case you don't need a release version (or the other way around, want a trunk version), you may also want to have a look at my ~weekly snapshots at <http://projects.martoks-place.de/lazarus/>. They're all just plain 7zip archives, and a .cmd to create the fpc.cfg. The directory structure is the same as from the installer, so you can mix & match.

Regards, Martok Ceterum censeo b32079 esse sanandam.

Reply by email

Flávio Etrusco
to Graeme Geldenhuys: Thank you Michael, that worked perfectly. Strange that the inno setup executable (the FPC…

Hi,

2017-11-02 17:54 GMT-02:00 Graeme Geldenhuys :

Show quoted text 12 lines
On 2017-11-02 07:17, Michael Van Canneyt wrote: > > The installer is made with inno setup. There are several inno extract > tools > available, e.g.: > http://constexpr.org/innoextract/ Thank you Michael, that worked perfectly. Strange that the inno setup executable (the FPC installer) doesn't have a parameter to do that itself. I have seen installers in the past that allows for that, but I don't know what program they used to generate that installer.

Microsoft Installer (oops, now Windows Installer) implement this "natively", and I assume most MSI-based generators/packagers support it.

AFAICS it would require quite a few enhancements (and modifications to the user scripts) to abstract away per-machine vs per-user declarations in InnoSetup.
FWIW since InnoSetup is scriptable it seems one can implement this manually using a few hacks:
https://stackoverflow.com/questions/21556853/make-inno-setup-installer-request-privileges-elevation-only-when-needed

Best regards,
Flávio

Reply by email

Graeme Geldenhuys
to Flávio Etrusco
Flávio Etrusco wrote
AFAICS it would require quite a few enhancements (and modifications to the user scripts) to abstract away per-machine vs per-user declarations in InnoSetup.

I can't see why you think that. I used the unpack tool Michael suggested, and unpacked the official Windows FPC installer. The unpacked layout was as if they zipped the FPC distribution after it was built (compiled). All I had to do was generate a fpc.cfg file and modify the paths inside to match my Windows laptop. FPC 3.0.2 now runs perfectly from my severely limited user account's home directory.

Such flexibility really should come as standard with every installer - always give the user the option to install system wide, or per user or "portable". The EditPad Pro (commercial text editor) has been doing it for years. So much so, everybody found their installer so useful it became a spin-off commercial product on its own. Editpad Pro's single install executable allows installing 32-bit or 64-bit versions of the editor; if it should be installed system wide, per user or "usb portable". Oh, and there installer runs on Win98 all the way to Win10 - no artificial limitations like InnoSetup (can't install on XP or older).

https://www.editpadpro.com/
https://www.deploymaster.com/

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email