Skip to content
Snippets Groups Projects
Commit 7921b0a7 authored by aburn's avatar aburn
Browse files

Fixed buggy paths on mac

parent 4568a1e9
Branches
No related merge requests found
......@@ -51,27 +51,27 @@ public class ReaderElectronApp extends DocExploreTool
if (mode == null)
return;
File readerDir = new File(DocExploreTool.getHomeDir(), "reader");
File appDir = null;
if (SystemUtils.IS_OS_WINDOWS)
{
appDir = new File(DocExploreTool.getExecutableDir(), "readerapp");
if (!appDir.exists())
appDir = new File(DocExplore.readerApp());
}
else if (SystemUtils.IS_OS_MAC_OSX)
appDir = new File(DocExploreTool.getExecutableDir().getAbsoluteFile().getParentFile(), "MacOS");
else appDir = new File(DocExploreTool.getExecutableDir(), "readerapp");
String app = SystemUtils.IS_OS_WINDOWS ? appDir.getAbsolutePath()+"/electron.exe" :
SystemUtils.IS_OS_MAC_OSX ? appDir.getAbsolutePath()+"/Electron" :
appDir.getAbsolutePath()+"/electron";
try
try
{
File readerDir = new File(DocExploreTool.getHomeDir(), "reader");
File appDir = null;
if (SystemUtils.IS_OS_WINDOWS)
{
appDir = new File(DocExploreTool.getExecutableDir(), "readerapp");
if (!appDir.exists())
appDir = new File(DocExplore.readerApp());
}
else if (SystemUtils.IS_OS_MAC_OSX)
appDir = new File(DocExploreTool.getExecutableDir().getCanonicalFile().getParentFile(), "MacOS");
else appDir = new File(DocExploreTool.getExecutableDir(), "readerapp");
String app = SystemUtils.IS_OS_WINDOWS ? appDir.getCanonicalPath()+"/electron.exe" :
SystemUtils.IS_OS_MAC_OSX ? appDir.getCanonicalPath()+"/Electron" :
appDir.getCanonicalPath()+"/electron";
List<String> eargs = new ArrayList<String>();
eargs.add(app);
eargs.add(readerDir.getAbsolutePath());
eargs.add(readerDir.getCanonicalPath());
if (mode.length == 0)
eargs.add("fullscreen");
else
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment