Added FTL launching on Linux
This commit is contained in:
parent
0bd9d9e9b9
commit
572d5610f2
1 changed files with 8 additions and 0 deletions
|
@ -110,6 +110,7 @@ public class FTLUtilities {
|
||||||
* Returns the executable that will launch FTL, or null.
|
* Returns the executable that will launch FTL, or null.
|
||||||
*
|
*
|
||||||
* On Windows, FTLGame.exe is one dir above "resources/".
|
* On Windows, FTLGame.exe is one dir above "resources/".
|
||||||
|
* On Linux, FTL is a script, one dir above "resources/".
|
||||||
* On OSX, FTL.app is the grandparent dir itself (a bundle).
|
* On OSX, FTL.app is the grandparent dir itself (a bundle).
|
||||||
*/
|
*/
|
||||||
public static File findGameExe( File datsDir ) {
|
public static File findGameExe( File datsDir ) {
|
||||||
|
@ -122,6 +123,13 @@ public class FTLUtilities {
|
||||||
if ( exeFile.exists() ) result = exeFile;
|
if ( exeFile.exists() ) result = exeFile;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ( System.getProperty("os.name").equals("Linux") ) {
|
||||||
|
File ftlDir = datsDir.getParentFile();
|
||||||
|
if ( ftlDir != null ) {
|
||||||
|
File exeFile = new File( ftlDir, "FTL" );
|
||||||
|
if ( exeFile.exists() ) result = exeFile;
|
||||||
|
}
|
||||||
|
}
|
||||||
else if ( System.getProperty("os.name").contains("OS X") ) {
|
else if ( System.getProperty("os.name").contains("OS X") ) {
|
||||||
// FTL.app/Contents/Resources/
|
// FTL.app/Contents/Resources/
|
||||||
File contentsDir = datsDir.getParentFile();
|
File contentsDir = datsDir.getParentFile();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue