Skip to content

Commit cf40dd2

Browse files
authored
Merge pull request #485 from TcMenu/release_430
Release 430
2 parents 4836f09 + 63ef179 commit cf40dd2

File tree

13 files changed

+185
-11
lines changed

13 files changed

+185
-11
lines changed

.idea/misc.xml

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tcMenuGenerator/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,15 @@
244244
</includes>
245245
<filtering>false</filtering>
246246
</resource>
247+
<resource>
248+
<directory>${project.basedir}/../tcMenuNative/packaged</directory>
249+
<includes>
250+
<include>mac/*.dylib</include>
251+
<include>win/*.dll</include>
252+
<include>ubu/*.so</include>
253+
</includes>
254+
<filtering>false</filtering>
255+
</resource>
247256
</resources>
248257
</configuration>
249258
</execution>

tcMenuGenerator/scripts/designerscript.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "TcMenuDesigner"
5-
#define MyAppVersion "4.2.2"
5+
#define MyAppVersion "4.3.0"
66
#define MyAppPublisher "The coders corner"
77
#define MyAppURL "https://www.thecoderscorner.com"
88
#define MyAppExeName "tcMenuDesigner.exe"

tcMenuGenerator/scripts/packager-all-platforms.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ Ensure you are in the tcMenuGenerator/target directory.
3838

3939
cp classes/img/tcMenuDesigner.ico .
4040

41-
jpackage --type app-image -n tcmenu -p jfx/deps --input jfx/app --win-console --resource-dir .\classes\img\ --icon tcMenuDesigner.ico --app-version 4.2.2 --verbose --java-options "-Dprism.lcdtext=false" --add-modules "jdk.crypto.cryptoki" -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
41+
jpackage --type app-image -n tcmenu -p jfx/deps --input jfx/app --win-console --resource-dir .\classes\img\ --icon tcMenuDesigner.ico --app-version 4.3.0 --verbose --java-options "-Dprism.lcdtext=false --enable-preview -Djava.library.path=$APPDIR/win" --add-modules "jdk.crypto.cryptoki" -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
4242

43-
jpackage --type app-image -n tcMenuDesigner -p jfx/deps --input jfx/app --resource-dir .\classes\img\ --icon tcMenuDesigner.ico --app-version 4.2.2 --verbose --java-options "-Dprism.lcdtext=false" --add-modules "jdk.crypto.cryptoki" -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
43+
jpackage --type app-image -n tcMenuDesigner -p jfx/deps --input jfx/app --resource-dir .\classes\img\ --icon tcMenuDesigner.ico --app-version 4.3.0 --verbose --java-options "-Dprism.lcdtext=false --enable-preview -Djava.library.path=$APPDIR/win" --add-modules "jdk.crypto.cryptoki" -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
4444

4545
Copy the following files from tcMenuDesigner into tcmenu
4646

@@ -51,13 +51,13 @@ Copy the following files from tcMenuDesigner into tcmenu
5151

5252
Ensure you are in the tcMenuGenerator/target directory.
5353

54-
jpackage -n tcMenuDesigner -p jfx/deps --input jfx/app --icon ./classes/img/menu-icon.png --verbose --license-file ../../LICENSE --linux-app-category Development --linux-menu-group "Development;Utility;" --java-options "-Dprism.lcdtext=false" --app-version 4.1.2 --add-modules "jdk.crypto.cryptoki" -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
54+
jpackage -n tcMenuDesigner -p jfx/deps --input jfx/app --icon ./classes/img/menu-icon.png --verbose --license-file ../../LICENSE --linux-app-category Development --linux-menu-group "Development;Utility;" --java-options "-Dprism.lcdtext=false --enable-preview -Djava.library.path=$APPDIR/lin" --app-version 4.3.0 --add-modules "jdk.crypto.cryptoki" -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
5555

56-
## Packaging - macOS build all versions
56+
## Packaging - macOS build all versions (without notarization)
5757

5858
Ensure you are in the tcMenuGenerator/target directory.
5959

60-
jpackage -n tcMenuDesigner -p jfx/deps --input jfx/app --icon ./classes/img/AppIcon.icns --verbose --license-file ../../LICENSE --vendor TheCodersCorner --app-version 4.1.2 --add-modules "jdk.crypto.cryptoki" --java-options "-Dprism.lcdtext=false" --verbose -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
60+
jpackage -n tcMenuDesigner -p jfx/deps --input jfx/app --icon ./classes/img/AppIcon.icns --verbose --license-file ../../LICENSE --vendor TheCodersCorner --app-version 4.3.0 --add-modules "jdk.crypto.cryptoki" --java-options "-Dprism.lcdtext=false --enable-preview -Djava.library.path=$APPDIR/mac" --verbose -m com.thecoderscorner.tcmenu.menuEditorUI/com.thecoderscorner.menu.editorui.cli.TcMenuDesignerCmd
6161

6262
To allow for CLI on macOS: alias tcmenu=/Applications/tcMenuDesigner.app/Contents/MacOS/tcMenuDesigner
6363

tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/generator/plugin/DefaultXmlPluginLoader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import static java.lang.System.Logger.Level.*;
4242

4343
public class DefaultXmlPluginLoader implements CodePluginManager {
44-
private final System.Logger logger = System.getLogger(getClass().getSimpleName());
44+
private final static System.Logger logger = System.getLogger(DefaultXmlPluginLoader.class.getSimpleName());
4545
private final EmbeddedPlatforms embeddedPlatforms;
4646
private final List<CodePluginConfig> allPlugins = new ArrayList<>();
4747
private final ConfigurationStorage configStorage;
@@ -107,7 +107,7 @@ public void reload() {
107107
}
108108
}
109109

110-
private Path findPluginDir() {
110+
public static Path findPluginDir() {
111111
if(System.getProperty("override.core.plugin.dir") != null) {
112112
return Path.of(System.getProperty("override.core.plugin.dir"));
113113
} else if("Y".equals(System.getProperty("devlog"))) {

tcMenuGenerator/src/main/java/com/thecoderscorner/menu/editorui/util/TcNativeLibrary.java

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.thecoderscorner.menu.editorui.util;
22

3+
import com.thecoderscorner.menu.editorui.generator.plugin.DefaultXmlPluginLoader;
4+
35
import java.lang.foreign.FunctionDescriptor;
46
import java.lang.foreign.Linker;
57
import java.lang.foreign.SymbolLookup;
@@ -25,7 +27,7 @@ public class TcNativeLibrary {
2527

2628
private TcNativeLibrary() {
2729
logger.log(System.Logger.Level.INFO, "Loading TcNative Library");
28-
System.loadLibrary("tcMenuNative");
30+
loadLibrary();
2931
logger.log(System.Logger.Level.INFO, "Creating native linker");
3032
Linker linker = Linker.nativeLinker();
3133
SymbolLookup fontLib = SymbolLookup.loaderLookup();
@@ -66,6 +68,24 @@ private TcNativeLibrary() {
6668
);
6769
}
6870

71+
private static void loadLibrary() {
72+
String os = System.getProperty("os.name");
73+
if(System.getProperty("devlog") != null) {
74+
logger.log(System.Logger.Level.INFO, "Assuming native library on LD_LIBRARY_PATH already");
75+
System.loadLibrary("tcMenuNative");
76+
}else if (os != null && os.startsWith ("Mac")) {
77+
var path = DefaultXmlPluginLoader.findPluginDir().resolve("mac").resolve("libtcMenuNative.dylib");
78+
System.load(path.toString());
79+
} else if(os != null && os.startsWith("Win")) {
80+
var path = DefaultXmlPluginLoader.findPluginDir().resolve("win").resolve("tcMenuNative.dll");
81+
System.load(path.toString());
82+
} else if(os != null && os.startsWith("Linux")) {
83+
var path = DefaultXmlPluginLoader.findPluginDir().resolve("ubu").resolve("libtcMenuNative.so");
84+
System.load(path.toString());
85+
}
86+
87+
}
88+
6989
public static TcNativeLibrary getInstance() {
7090
var ret = theInstance.get();
7191
if(ret == null) {

0 commit comments

Comments
 (0)