]> git.lyx.org Git - features.git/commitdiff
installer:
authorUwe Stöhr <uwestoehr@web.de>
Mon, 21 May 2007 23:01:30 +0000 (23:01 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Mon, 21 May 2007 23:01:30 +0000 (23:01 +0000)
- 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

development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dof
development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.dpr
development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe

index 11ae3297753e2bdc101bbfbacf25acb2ffffac80..c59ac4ca8fa8709ad5200f1b38a04158ba1c99fb 100644 (file)
@@ -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
index 4a5bef85350a1e09abba19b5dc83a45f8ba53448..d38706cfd1544394a219dc3944aa80ccfbc31d93 100644 (file)
@@ -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
index fe30a6fb9be346727953565ed33c0e1dd795427d..46791d0c5ff16c3d59a9abe8b915bf860debced7 100644 (file)
Binary files a/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe and b/development/Win32/packaging/AltInstaller/specials/Launcher/lyxLauncher.exe differ