From 440ef0516a0f99cf0dbd2a6897ab2bf73184e429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Fri, 8 Feb 2008 22:56:03 +0000 Subject: [PATCH] Win32: Add setlocal to batch scripts. This avoids cluttering the environment of the caller. BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16932 57a11ea4-9604-0410-9ed3-97b8803252fd --- packaging/win32/gnucash.iss.in | 3 ++- packaging/win32/install.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packaging/win32/gnucash.iss.in b/packaging/win32/gnucash.iss.in index 501afeeb5e..a8675788d0 100644 --- a/packaging/win32/gnucash.iss.in +++ b/packaging/win32/gnucash.iss.in @@ -184,7 +184,8 @@ begin { Create the gnucash.bat file; #10 is the linefeed character and #13 CR } FileName := appdir + '\bin\gnucash.bat' ; - FileString := 'chcp ' + ExpandConstant('{cm:LanguageCodePage}') + ''#13#10 ; + FileString := 'setlocal'#13#10 ; + FileString := FileString + 'chcp ' + ExpandConstant('{cm:LanguageCodePage}') + ''#13#10 ; FileString := FileString + 'set PATH=' + appdir + '\bin;' + libdir + ';' + libdir + '\gnucash;%PATH%'#13#10 ; FileString := FileString + 'set GUILE_WARN_DEPRECATED=no'#13#10 ; diff --git a/packaging/win32/install.sh b/packaging/win32/install.sh index 1e71b1e8d8..644bd165e9 100755 --- a/packaging/win32/install.sh +++ b/packaging/win32/install.sh @@ -1036,7 +1036,8 @@ function make_install() { # Create a startup script that works without the msys shell qpushd $_INSTALL_UDIR/bin - echo "set PATH=${INSTALL_DIR}\\bin;${INSTALL_DIR}\\lib;${INSTALL_DIR}\\lib\\gnucash;${GOFFICE_DIR}\\bin;${LIBGSF_DIR}\\bin;${PCRE_DIR}\\bin;${GNOME_DIR}\\bin;${LIBXML2_DIR}\\bin;${GUILE_DIR}\\bin;${REGEX_DIR}\\bin;${AUTOTOOLS_DIR}\\bin;${AQBANKING_PATH};${LIBOFX_DIR}\\bin;${OPENSP_DIR}\\bin;%PATH%" > gnucash.bat + echo "setlocal" > gnucash.bat + echo "set PATH=${INSTALL_DIR}\\bin;${INSTALL_DIR}\\lib;${INSTALL_DIR}\\lib\\gnucash;${GOFFICE_DIR}\\bin;${LIBGSF_DIR}\\bin;${PCRE_DIR}\\bin;${GNOME_DIR}\\bin;${LIBXML2_DIR}\\bin;${GUILE_DIR}\\bin;${REGEX_DIR}\\bin;${AUTOTOOLS_DIR}\\bin;${AQBANKING_PATH};${LIBOFX_DIR}\\bin;${OPENSP_DIR}\\bin;%PATH%" >> gnucash.bat echo "set GUILE_WARN_DEPRECATED=no" >> gnucash.bat echo "set GNC_MODULE_PATH=${INSTALL_DIR}\\lib\\gnucash" >> gnucash.bat echo "set GUILE_LOAD_PATH=${INSTALL_DIR}\\share\\gnucash\\guile-modules;${INSTALL_DIR}\\share\\gnucash\\scm;%GUILE_LOAD_PATH%" >> gnucash.bat