SourceForge: portableapps/launcher: changeset 157:a1b15f532dfe
Added support in launcher.ini for aborting on paths with spaces.
authorChris Morgan <chriswombat@users.sourceforge.net>
Sat Mar 13 14:13:27 2010 +1100 (2010-03-13)
changeset 157a1b15f532dfe
parent 156 17b2ad1b588c
child 158 5aaf3099d645
Added support in launcher.ini for aborting on paths with spaces.
App/AppInfo/Launcher/PortableApps.comLauncher.ini
Other/Source/Segments/Core.nsh
help.html
     1.1 --- a/App/AppInfo/Launcher/PortableApps.comLauncher.ini	Sat Mar 13 12:58:38 2010 +1100
     1.2 +++ b/App/AppInfo/Launcher/PortableApps.comLauncher.ini	Sat Mar 13 14:13:27 2010 +1100
     1.3 @@ -17,6 +17,7 @@
     1.4  WaitForEXE1=another_optional_app.exe
     1.5  RefreshShellIcons=before
     1.6  HideCommandLineWindow=true
     1.7 +NoSpacesInPath=true
     1.8  
     1.9  [LiveMode]
    1.10  CopyApp=false
     2.1 --- a/Other/Source/Segments/Core.nsh	Sat Mar 13 12:58:38 2010 +1100
     2.2 +++ b/Other/Source/Segments/Core.nsh	Sat Mar 13 14:13:27 2010 +1100
     2.3 @@ -47,6 +47,14 @@
     2.4  		MessageBox MB_OK|MB_ICONSTOP `$(LauncherFileNotFound)`
     2.5  		Abort
     2.6  	${EndIf}
     2.7 +	${ReadLauncherConfig} $0 Launch NoSpacesInPath
     2.8 +	${If} $0 == true
     2.9 +		${WordFind} $EXEDIR ` ` E+1 $R9
    2.10 +		${IfNot} ${Errors} ; errors = space not found, no errors means space in path
    2.11 +			MessageBox MB_OK|MB_ICONSTOP `$(LauncherNoSpaces)`
    2.12 +			Abort
    2.13 +		${EndIf}
    2.14 +	${EndIf}
    2.15  !macroend
    2.16  
    2.17  ${SegmentUnload}
     3.1 --- a/help.html	Sat Mar 13 12:58:38 2010 +1100
     3.2 +++ b/help.html	Sat Mar 13 14:13:27 2010 +1100
     3.3 @@ -227,6 +227,7 @@
     3.4  <a href="#Launch:WaitForEXE" class="ini-key">WaitForEXE<em>N</em>=</a><span class="ini-value">another_optional_app.exe</span>
     3.5  <a href="#Launch:RefreshShellIcons" class="ini-key">RefreshShellIcons=</a><span class="ini-value">before</span> / <span class="ini-value">after</span> / <span class="ini-value">both</span> / <span class="ini-default">none</span>
     3.6  <a href="#Launch:HideCommandLineWindow" class="ini-key">HideCommandLineWindow=</a><span class="ini-value">true</span> / <span class="ini-value ini-default">false</span>
     3.7 +<a href="#Launch:NoSpacesInPath" class="ini-key">NoSpacesInPath=</a><span class="ini-value">true</span> / <span class="ini-value ini-default">false</span>
     3.8  
     3.9  <a href="#Activate" class="ini-head">[Activate]</a>
    3.10  <a href="#Activate:Registry" class="ini-key">Registry=</a><span class="ini-value">true</span> / <span class="ini-value ini-default">false</span>
    3.11 @@ -313,6 +314,7 @@
    3.12  		<li id="Launch:WaitForEXE"><span class="ini-key">WaitForEXE<em>N</em></span><br />If the program that you run is a launcher program which launches another executable, and you need to wait for that as well as (or instead of) the original program, specify its file name here, as <span class="ini-key">WaitForEXE1=</span><span class="ini-value">whatever.exe</span>. If you need more than one, use <span class="ini-key">WaitForEXE2</span>, <span class="ini-key">WaitForEXE3</span>, etc.</li>
    3.13  		<li id="Launch:RefreshShellIcons"><span class="ini-key">RefreshShellIcons</span> (values: <span class="ini-value">before</span>, <span class="ini-value">after</span>, <span class="ini-value">both</span> or <span class="ini-default">none</span>)<br />If the application does any registering of file type extensions which you handle or clean up, to make the new icon appear or to stop the portable one appearing, set this to one of the values. If it is just cleaning up at the end, <span class="ini-value">after</span> should be enough, but if you handle it with a <span class="ini-head">RegistryKeys</span> value, you will need <span class="ini-value">both</span>.</li>
    3.14  		<li id="Launch:HideCommandLineWindow"><span class="ini-key">HideCommandLineWindow</span> (values: <span class="ini-value">true</span> or <span class="ini-value ini-default">false</span>)<br />If the application produces a command line window which you wish to hide (common in some open source games), you can set this to true to hide it.</li>
    3.15 +		<li id="Launch:NoSpacesInPath"><span class="ini-key">NoSpacesInPath</span> (values: <span class="ini-value">true</span> or <span class="ini-value ini-default">false</span>)<br />If the application will not function if you try to run it in a directory with spaces in the path, you can set this to true to provide a useful error message to the user in this situation.</li>
    3.16  	</ul></li>
    3.17  	<li id="Activate"><span class="ini-head">[Activate]</span><br />This section is for telling the launcher whether or not it should load certain things, for example Java and registry support.<ul>
    3.18  		<li id="Activate:Registry"><span class="ini-key">Registry</span> (values: <span class="ini-value">true</span> or <span class="ini-value ini-default">false</span>)<br />If the base application uses the registry, set this to true.  <strong>You MUST set this to true if you wish the registry sections to be parsed.</strong> Otherwise they will not be read at all.</li>