Sol cookie editor can be run standalone.

This commit is contained in:
Jindra Petřík
2024-11-09 18:40:24 +01:00
parent c5bc32ca62
commit a205e1af11
8 changed files with 25 additions and 1 deletions

Binary file not shown.

2
resources/soleditor.bat Normal file
View File

@@ -0,0 +1,2 @@
@echo off
start javaw -jar "%~dp0\ffdec.jar" -soleditor

BIN
resources/soleditor.lnk Normal file

Binary file not shown.

5
resources/soleditor.sh Normal file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
export FFDEC_JARFILENAME=ffdec.jar
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
exec $SCRIPT_DIR/ffdec.sh -soleditor

BIN
resources/translator.lnk Normal file

Binary file not shown.

View File

@@ -2,4 +2,4 @@
export FFDEC_JARFILENAME=ffdec.jar
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
exec $SCRIPT_DIR/ffdec.sh translator
exec $SCRIPT_DIR/ffdec.sh -translator

View File

@@ -295,6 +295,12 @@ alias /?
List all available configuration keys and current values.
These keys can be used in -config pre-option.
-translator
Runs the Translator app for FFDec localization
-soleditor
Runs the Sol cookie editor as standalone application
Pre-options:
-format <formats>
Applies to: -export

View File

@@ -145,7 +145,9 @@ import javax.swing.JOptionPane;
import javax.swing.SwingWorker;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.WindowConstants;
import javax.swing.filechooser.FileFilter;
import jsyntaxpane.DefaultSyntaxKit;
import org.pushingpixels.substance.api.SubstanceLookAndFeel;
/**
@@ -3054,6 +3056,15 @@ public class Main {
reloadLastSession();
}
});
} else if (args.length == 1 && "-soleditor".equals(args[0])) {
initGui();
checkLibraryVersion();
View.execInEventDispatch(() -> {
DefaultSyntaxKit.initKit();
SolEditorFrame solEditor = new SolEditorFrame();
solEditor.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
solEditor.setVisible(true);
});
} else {
checkLibraryVersion();
setSessionLoaded(true);