Skip to content

Commit

Permalink
Merge pull request #949 from Windchild292/dev_Windchild_Version
Browse files Browse the repository at this point in the history
Suite Version Tracking: MegaMekLab Changes
  • Loading branch information
Windchild292 committed Oct 1, 2021
2 parents 7f26422 + 01b73c7 commit b808257
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 5 deletions.
28 changes: 28 additions & 0 deletions src/megameklab/com/MMLConstants.java
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2021 - The MegaMek Team. All Rights Reserved.
*
* This file is part of MegaMekLab.
*
* MegaMekLab is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MegaMekLab is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MegaMekLab. If not, see <http://www.gnu.org/licenses/>.
*/
package megameklab.com;

import megamek.SuiteConstants;

/**
* These are constants that hold across MegaMekLab.
*/
public final class MMLConstants extends SuiteConstants {

}
4 changes: 1 addition & 3 deletions src/megameklab/com/MegaMekLab.java
Expand Up @@ -43,8 +43,6 @@
import java.util.Locale;

public class MegaMekLab {
public static final String VERSION = "0.49.4-SNAPSHOT";

private static MMLogger logger = null;

public static void main(String[] args) {
Expand Down Expand Up @@ -123,7 +121,7 @@ private static void showInfo() {
+ File.separator
+ "timestamp").lastModified();
// echo some useful stuff
String msg = "Starting MegaMekLab v" + VERSION + " ..."; //$NON-NLS-1$ //$NON-NLS-2$
String msg = "Starting MegaMekLab v" + MMLConstants.VERSION + " ..."; //$NON-NLS-1$ //$NON-NLS-2$
if (TIMESTAMP > 0) {
msg += "\n\tCompiled on " + new Date(TIMESTAMP).toString(); //$NON-NLS-1$
}
Expand Down
3 changes: 2 additions & 1 deletion src/megameklab/com/ui/StartupGUI.java
Expand Up @@ -55,6 +55,7 @@
import megamek.common.util.EncodeControl;
import megamek.common.util.ImageUtil;
import megamek.common.util.fileUtils.MegaMekFile;
import megameklab.com.MMLConstants;
import megameklab.com.MegaMekLab;
import megameklab.com.ui.dialog.LoadingDialog;
import megameklab.com.ui.dialog.MegaMekLabUnitSelectorDialog;
Expand Down Expand Up @@ -122,7 +123,7 @@ private void initComponents() {
backgroundIcon = null;
}

JLabel labVersion = new JLabel(resourceMap.getString("version.text") + MegaMekLab.VERSION, JLabel.CENTER); //$NON-NLS-1$
JLabel labVersion = new JLabel(resourceMap.getString("version.text") + MMLConstants.VERSION, JLabel.CENTER); //$NON-NLS-1$
labVersion.setPreferredSize(new Dimension(250,15));
if (skinSpec.fontColors.size() > 0) {
labVersion.setForeground(skinSpec.fontColors.get(0));
Expand Down
3 changes: 2 additions & 1 deletion src/megameklab/com/util/MenuBarCreator.java
Expand Up @@ -51,6 +51,7 @@
import megamek.common.loaders.BLKFile;
import megamek.common.templates.TROView;
import megamek.common.util.EncodeControl;
import megameklab.com.MMLConstants;
import megameklab.com.MegaMekLab;
import megameklab.com.ui.MegaMekLabMainUI;
import megameklab.com.ui.dialog.LoadingDialog;
Expand Down Expand Up @@ -751,7 +752,7 @@ private void jMenuHelpAbout_actionPerformed() {

// set the text up.
JLabel version = new JLabel(String.format(resourceMap.getString("menu.help.about.version.format"),
MegaMekLab.VERSION));
MMLConstants.VERSION));
JLabel license1 = new JLabel(resourceMap.getString("menu.help.about.license.1"));
JLabel license2 = new JLabel(resourceMap.getString("menu.help.about.license.2"));
JLabel license3 = new JLabel(resourceMap.getString("menu.help.about.info.1"));
Expand Down

0 comments on commit b808257

Please sign in to comment.