discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Portable msys.bat for gnustep on window


From: jack zhu
Subject: Portable msys.bat for gnustep on window
Date: Sat, 12 Nov 2011 09:26:24 +0800

Hi:

This is a simple script piece to remove path dependency of gnustep on windows. After that, the gnustep path string can be removed from PATH variable in windows, which helps the system to maintain multiple clean mingw/msys package. It is based on portable Perl script
It assumes under gnustep, msys, core and dev tool are installed together in the default position.

Insert this piece of code in msys.bat and it should work:

rem set portable path
set drive=%~dp0
set drivep=%drive%

rem remove last "\" char in %drive%
If $#\#$==$#%drive:~-1%#$ set drivep=%drive:~0,-1%

rem set drivep to ../../.. folder name
set drivepp=%drivep%
set /a num=0

:pathstr_loop
If $#\#$==$#%drivepp:~-1%#$ set /a num+=1
set drivepp=%drivepp:~0,-1%
if not %num%==2 goto pathstr_loop

set PATH=%PATH%;%drivepp%\bin;%drivepp%\GNUstep\System\Tools

Hope it can help with multiple mingw/cygwin package on windows like for Perl and GNUStep

Regards,
Zhu

reply via email to

[Prev in Thread] Current Thread [Next in Thread]