Skip to content

Commit

Permalink
[desktop] Adjust frostwire osx player path detection on new monorepo …
Browse files Browse the repository at this point in the history
…structure.
  • Loading branch information
gubatron committed Nov 11, 2015
1 parent fee299a commit d9609fe
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions desktop/src/com/frostwire/gui/player/MediaPlayerOSX.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ public class MediaPlayerOSX extends MediaPlayer {

@Override
protected String getPlayerPath() {
boolean isRelease = !FrostWireUtils.getFrostWireJarPath().contains("frostwire-desktop");
//System.out.println("MediaPlayerOSX: getFrostWireJarPath() -> " + FrostWireUtils.getFrostWireJarPath());
// Path running from command line: .../frostwire/build/libs
// Path running from IntelliJ: .../frostwire/build/classes
boolean isRelease = !FrostWireUtils.getFrostWireJarPath().contains("frostwire/build");
return (isRelease) ? getReleasePlayerPath() : getNonReleasePlayerPath();
}

Expand All @@ -48,8 +51,11 @@ private String getReleasePlayerPath() {
}

private String getNonReleasePlayerPath() {
String frostWireJarPath = FrostWireUtils.getFrostWireJarPath();
String pathPreffix = frostWireJarPath.substring(0, frostWireJarPath.indexOf("frostwire-desktop"));
return pathPreffix + "frostwire-desktop/lib/native/fwplayer_osx";
//FrostWireUtils.getFrostWireJarPath();
// Path running from command line: .../frostwire/build/libs
// Path running from IntelliJ: .../frostwire/build/classes
// we want pathPrefix to be .../frostwire/
String pathPrefix = new File(FrostWireUtils.getFrostWireJarPath()).getParentFile().getParentFile().getAbsolutePath() + "/";
return pathPrefix + "desktop/lib/native/fwplayer_osx";
}
}

0 comments on commit d9609fe

Please sign in to comment.