Last active
August 29, 2015 14:01
-
-
Save armornick/9d9117d365c46d527e65 to your computer and use it in GitHub Desktop.
Batch script to make Lazarus (more) portable (for Lazarus version 1.2.2 but should be easy to modify)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem | |
rem from http://forum.lazarus.freepascal.org/index.php/topic,23343.msg139270.html | |
rem | |
rem Simple script to relocate lazarus to use the current driveletter as | |
rem path, and put basic portable app support in lazarus. | |
rem | |
rem Assumes lazarus is in drvletter:\lazarus and config in | |
rem $lazarusdir/config | |
rem | |
rem For this to work, everything should be relative wrt $(lazarusdir) | |
rem inside the IDE. If packages work is currently untested | |
set LAZARUSDIR=%~dp0 | |
set FPCROOTDIR=%LAZARUSDIR%\fpc\2.6.4 | |
set FPCBINDIR=%FPCROOTDIR%\bin\i386-win32 | |
set LAZARUSCONFIG=%LAZARUSDIR%\config | |
for %%i in (%LAZARUSDIR%\fpc\*) do set ALTFPCROOTDIR=%%i | |
echo %ALTFPCROOTDIR% | |
%FPCBINDIR%\fpcmkcfg -d basepath=%FPCROOTDIR% > %FPCBINDIR%\fpc.cfg | |
REM cd %LAZARUSDIR% | |
rem startlazarus? untested as yet | |
rem should later get --lazarusdir=%LAZARUSDIR% if mantis 15741 (0.9.30+) is committed | |
rem | |
Lazarus.exe --primary-config-path=%LAZARUSCONFIG% --lazarusdir=%LAZARUSDIR% | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment