-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5abadb5
commit 81f5790
Showing
20 changed files
with
253 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
package app.logorrr; | ||
|
||
/** | ||
* Provides interface methods for native code | ||
*/ | ||
public class OsxBridge { | ||
|
||
public static native void printHelloWorldImpl(); | ||
public static native void registerPath(String path); | ||
|
||
public static void main(final String[] args) { | ||
printHelloWorldImpl(); | ||
} | ||
public static native void releasePath(String path); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
package app.logorrr | ||
|
||
import app.logorrr.util.OsUtil | ||
|
||
object LogoRRRAppLauncher { | ||
|
||
/** launcher for macos installer to circumvent module loading mechanism by javafx (dirty hack) */ | ||
def main(args: Array[String]): Unit = { | ||
|
||
test() | ||
if (OsUtil.isMac) { | ||
System.loadLibrary("LogoRRRSwift") | ||
System.loadLibrary("LogoRRR") | ||
} | ||
|
||
LogoRRRApp.main(args) | ||
} | ||
|
||
private def test(): Unit = { | ||
System.loadLibrary("LogoRRRSwift") | ||
System.loadLibrary("LogoRRR") | ||
OsxBridge.printHelloWorldImpl() | ||
} | ||
// private def test(): Unit = { | ||
// OsxBridge.printHelloWorldImpl() | ||
// OsxBridge.registerPath(Paths.get("/Users/lad/gh/LogoRRR/app/target/app-23.2.0-SNAPSHOT.jar").toAbsolutePath.toString) | ||
// OsxBridge.releasePath(Paths.get("/Users/lad/gh/LogoRRR/app/target/app-23.2.0-SNAPSHOT.jar").toAbsolutePath.toString) | ||
//} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package app.logorrr.util | ||
|
||
import javafx.stage.FileChooser | ||
import javafx.stage.{FileChooser, Window} | ||
|
||
import java.nio.file.Path | ||
|
||
class LogoRRRFileChooser(title: String) { | ||
|
||
def showAndWait(): Option[Path] = { | ||
def showAndWait(window: Window): Option[Path] = { | ||
val fc = new FileChooser | ||
fc.setTitle(title) | ||
Option(fc.showOpenDialog(null)).map(_.toPath) | ||
Option(fc.showOpenDialog(window)).map(_.toPath) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.