From: Uwe Stöhr Date: Mon, 21 May 2007 23:01:30 +0000 (+0000) Subject: installer: X-Git-Tag: 1.6.10~9677 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=e2231d1ff235a4d8528fd753ddb8744b0e777f1a;p=features.git installer: - Launcher: set default working directory when starting LyX (thanks again to Martin Rauscher for testing) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18447 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dof b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dof index 11ae329775..c59ac4ca8f 100644 --- a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dof +++ b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dof @@ -95,7 +95,7 @@ UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= SearchPath= -Packages=vcl;rtl;vclx;dbrtl;vcldb;bdertl;vclshlctrls;vclactnband;adortl;vcldbx;VclSmp;visualclx;visualdbclx;dbexpress;vclie;xmlrtl;inetdbbde;inet;inetdbxpress;teeui;teedb;tee;Rave50CLX;Rave50VCL;IntrawebDB_50_70;Intraweb_50_70;indy;ibxpress;dsnap;soaprtl;dbxcds;inetdb +Packages=vcl;rtl;vclx;vclshlctrls;vclactnband;dbrtl;adortl;vcldb;bdertl;vcldbx;VclSmp;visualclx;visualdbclx;dsnap;inet;inetdb;ibxpress;indy;vclie;IntrawebDB_50_70;Intraweb_50_70;Rave50CLX;Rave50VCL;teeui;teedb;tee;xmlrtl;soaprtl;dbexpress;dbxcds Conditionals= DebugSourceDirs= UsePackages=0 diff --git a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dpr b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dpr index 4a5bef8535..d38706cfd1 100644 --- a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dpr +++ b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dpr @@ -23,17 +23,23 @@ procedure StartLyX(hConsole: THandle; FileName,Path: string); var Params : PChar; hLyX : THandle; + Folder : string; begin - // if a filename is given, convert it to a PChar; needed for the ShellExecute + // if a filename is given, quote it to avoid the path with spaces problem if FileName <> '' then Params:= PChar('"' + FileName + '"') else Params:= nil; + // get folder of the lyx.exe + Folder:= StringReplace(Path,'\lyx.exe','',[rfIgnoreCase]); + // quote path to avoid the path with spaces problem + Folder:= '"' + Folder + '"'; + // start LyX - hLyX:= ShellExecute(hConsole,PChar('open'), - PChar(Path),Params,nil,SW_SHOWNORMAL); + hLyX:= ShellExecute(hConsole,PChar('open'),PChar(Path), + Params,PChar(Folder),SW_SHOWNORMAL); if hLyX = ERROR_FILE_NOT_FOUND then begin MessageDLG('The file'#13#10 + Path + #13#10 diff --git a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe index fe30a6fb9b..46791d0c5f 100644 Binary files a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe and b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe differ