Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ javafx {
}

run {
args = ['-v=' + appSemVer]
// Add -Dlog4j2.debug to see log4j2 details
// Add -Djavax.net.debug=all to debug networking issues

Expand Down
21 changes: 6 additions & 15 deletions src/main/java/net/rptools/maptool/client/MapTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -1545,9 +1545,6 @@ public static void main(String[] args) {
// Start the update check early. Will be handled after the splash screen goes away.
var updateFuture = AppUpdate.autoUpdateCheck();

String versionImplementation = version;
String versionOverride = version;

if (OsDetection.MAC_OS_X) {
// On OSX the menu bar at the top of the screen can be enabled at any time, but the
// title (ie. name of the application) has to be set before the GUI is initialized (by
Expand All @@ -1563,8 +1560,8 @@ public static void main(String[] args) {
}

if (MapTool.class.getPackage().getImplementationVersion() != null) {
versionImplementation = MapTool.class.getPackage().getImplementationVersion().trim();
log.info("getting MapTool version from manifest: " + versionImplementation);
version = MapTool.class.getPackage().getImplementationVersion().trim();
log.info("getting MapTool version from manifest: " + version);
}

if (MapTool.class.getPackage().getImplementationVendor() != null) {
Expand All @@ -1590,7 +1587,7 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
// -version
Options cmdOptions = new Options();
cmdOptions.addOption("d", "debug", false, "turn on System.out enhanced debug output");
cmdOptions.addOption("v", "version", true, "override MapTool version");
cmdOptions.addOption("v", "version", true, "override MapTool version (defunct)");
cmdOptions.addOption("m", "monitor", true, "sets which monitor to use");
cmdOptions.addOption("f", "fullscreen", false, "set to maximize window");
cmdOptions.addOption("w", "width", true, "override MapTool window width");
Expand All @@ -1609,7 +1606,6 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
cmd = cmdParser.parse(cmdOptions, args);

debug = getCommandLineOption(cmd, "debug");
versionOverride = getCommandLineOption(cmd, "version", version);
graphicsMonitor = getCommandLineOption(cmd, "monitor", graphicsMonitor);
useFullScreen = getCommandLineOption(cmd, "fullscreen");

Expand Down Expand Up @@ -1644,13 +1640,10 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {
}

if (cmd.hasOption("version")) {
log.info("overriding MapTool version from command line to: " + versionOverride);
version = versionOverride;
} else {
version = versionImplementation;
log.info("MapTool version: " + version);
log.warn("Found -v on command line, but the option is no longer used and will be ignored.");
}

log.info("MapTool version: " + version);
log.info("MapTool vendor: " + vendor);

if (cmd.getArgs().length != 0) {
Expand All @@ -1666,9 +1659,7 @@ public SentryEvent process(@Nonnull SentryEvent event, @Nullable Hint hint) {

// Set MapTool version
Sentry.setTag("os", System.getProperty("os.name"));
Sentry.setTag("version", MapTool.getVersion());
Sentry.setTag("versionImplementation", versionImplementation);
Sentry.setTag("versionOverride", versionOverride);
Sentry.setTag("version", version);

if (listMacros) {
StringBuilder logOutput = new StringBuilder();
Expand Down
Loading