* try publishing a seprate free app that contains only the subtitles module and see if that's acceptable in the mac appstore
This commit is contained in:
parent
60621f1267
commit
1289634318
|
@ -277,6 +277,7 @@
|
|||
<param name="application.name" value="FileBot" />
|
||||
<param name="application.executable" value="FileBot" />
|
||||
<param name="application.identifier" value="net.filebot.FileBot" />
|
||||
<param name="application.mode" value="Rename|Episodes|SFV|Analyze|List" />
|
||||
<param name="application.icon" value="${dir.installer}/appbundle/filebot.icns" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
@ -286,6 +287,7 @@
|
|||
<param name="application.name" value="Smart Subtitles" />
|
||||
<param name="application.executable" value="SmartSubtitles" />
|
||||
<param name="application.identifier" value="net.filebot.subtitles" />
|
||||
<param name="application.mode" value="Subtitles" />
|
||||
<param name="application.icon" value="${dir.installer}/appbundle/subtitles.icns" />
|
||||
</antcall>
|
||||
</target>
|
||||
|
@ -303,9 +305,11 @@
|
|||
<classpath file="${path.fatjar}" />
|
||||
<librarypath dir="${dir.lib}/native/mac-x86_64" />
|
||||
<arch name="x86_64" />
|
||||
|
||||
<runtime dir="${jre.path}" />
|
||||
|
||||
<argument value="--mode" />
|
||||
<argument value="${application.mode}" />
|
||||
|
||||
<!-- WORKING_DIR is sandbox data folder -->
|
||||
<option value="-Dapplication.dir=./Library/Application Support/User Data" />
|
||||
<option value="-Dapplication.cache=./Library/Caches/ehcache.disk.store" />
|
||||
|
|
|
@ -33,6 +33,7 @@ import java.util.Properties;
|
|||
import java.util.Scanner;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import javax.swing.AbstractAction;
|
||||
import javax.swing.JButton;
|
||||
|
@ -218,15 +219,15 @@ public class Main {
|
|||
|
||||
if (args.mode == null) {
|
||||
// default frame
|
||||
frame = new MainFrame();
|
||||
frame = new MainFrame(MainFrame.createPanelBuilders());
|
||||
} else {
|
||||
// single panel frame
|
||||
for (PanelBuilder it : MainFrame.createPanelBuilders()) {
|
||||
if (args.mode.equalsIgnoreCase(it.getName())) {
|
||||
frame = new SinglePanelFrame(it).publish(new FileTransferable(args.getFiles(false)));
|
||||
}
|
||||
}
|
||||
if (frame == null) {
|
||||
PanelBuilder[] selection = Stream.of(MainFrame.createPanelBuilders()).filter(p -> p.getName().matches(args.mode)).toArray(PanelBuilder[]::new);
|
||||
if (selection.length == 1) {
|
||||
frame = new MainFrame(selection);
|
||||
} else if (selection.length > 1) {
|
||||
frame = new SinglePanelFrame(selection[0]).publish(new FileTransferable(args.getFiles(false)));
|
||||
} else {
|
||||
throw new IllegalArgumentException("Illegal mode: " + args.mode);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,15 +56,17 @@ import net.sf.ehcache.CacheManager;
|
|||
|
||||
public class MainFrame extends JFrame {
|
||||
|
||||
private JList selectionList = new PanelSelectionList(createPanelBuilders());
|
||||
|
||||
private HeaderPanel headerPanel = new HeaderPanel();
|
||||
private JList selectionList;
|
||||
private HeaderPanel headerPanel;
|
||||
|
||||
private static final PreferencesEntry<String> persistentSelectedPanel = Settings.forPackage(MainFrame.class).entry("panel.selected").defaultValue("0");
|
||||
|
||||
public MainFrame() {
|
||||
public MainFrame(PanelBuilder[] panels) {
|
||||
super(isInstalled() ? getApplicationName() : String.format("%s %s", getApplicationName(), getApplicationVersion()));
|
||||
|
||||
selectionList = new PanelSelectionList(panels);
|
||||
headerPanel = new HeaderPanel();
|
||||
|
||||
try {
|
||||
// restore selected panel
|
||||
selectionList.setSelectedIndex(Integer.parseInt(persistentSelectedPanel.getValue()));
|
||||
|
|
Loading…
Reference in New Issue