versioning changes

This commit is contained in:
Jindra Petřík
2014-11-10 08:41:23 +01:00
parent 58805905f7
commit de4ed881b5
4 changed files with 24 additions and 7 deletions
+3 -3
View File
@@ -31,7 +31,7 @@
<target name="-loadversion"> <target name="-loadversion">
<loadproperties srcfile="version.properties" prefix="version"/> <loadproperties srcfile="version.properties" prefix="version"/>
<property name="VERSION" value="${version.major}.${version.minor}.${version.release}.${version.build}" /> <property name="VERSION" value="${version.major}.${version.minor}.${version.release}" />
<property name="VERSIONNUMBER" value="${VERSION}" /> <property name="VERSIONNUMBER" value="${VERSION}" />
<script language="javascript"> <script language="javascript">
if(project.getProperty("version.debug")=="true"){ if(project.getProperty("version.debug")=="true"){
@@ -362,7 +362,7 @@
</target> </target>
<target name="-nightly-suffix" if="NIGHTLY"> <target name="-nightly-suffix" if="NIGHTLY">
<property name="VERSIONSUFFIX" value="_nightly"/> <property name="VERSIONSUFFIX" value="_nightly${version.build}"/>
</target> </target>
<target name="-nonightly-suffix" unless="NIGHTLY"> <target name="-nonightly-suffix" unless="NIGHTLY">
@@ -534,7 +534,7 @@
<exec executable="git" failonerror="true"> <exec executable="git" failonerror="true">
<arg value="commit"/> <arg value="commit"/>
<arg value="-m"/> <arg value="-m"/>
<arg value="version changed to ${newversion.major}.${newversion.minor}.${newversion.release}.${newversion.build}"/> <arg value="version changed to ${newversion.major}.${newversion.minor}.${newversion.release} build ${newversion.build}"/>
</exec> </exec>
</target> </target>
@@ -12,7 +12,8 @@
* Lesser General Public License for more details. * Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public * You should have received a copy of the GNU Lesser General Public
* License along with this library.␍ */ * License along with this library.
*/
package com.jpexs.decompiler.flash; package com.jpexs.decompiler.flash;
import java.util.HashMap; import java.util.HashMap;
@@ -33,6 +34,10 @@ public class Version {
public String appName; public String appName;
public String appFullName; public String appFullName;
public String updateLink; public String updateLink;
public int major;
public int minor;
public int release;
public int build;
public boolean nightly; public boolean nightly;
public Map<String, List<String>> changes = new HashMap<>(); public Map<String, List<String>> changes = new HashMap<>();
} }
+13 -1
View File
@@ -115,7 +115,7 @@ public class Main {
private static MenuItem stopMenuItem; private static MenuItem stopMenuItem;
private static MainFrame mainFrame; private static MainFrame mainFrame;
public static final int UPDATE_SYSTEM_MAJOR = 1; public static final int UPDATE_SYSTEM_MAJOR = 1;
public static final int UPDATE_SYSTEM_MINOR = 1; public static final int UPDATE_SYSTEM_MINOR = 2;
public static LoadFromMemoryFrame loadFromMemoryFrame; public static LoadFromMemoryFrame loadFromMemoryFrame;
public static LoadFromCacheFrame loadFromCacheFrame; public static LoadFromCacheFrame loadFromCacheFrame;
private static final Logger logger = Logger.getLogger(Main.class.getName()); private static final Logger logger = Logger.getLogger(Main.class.getName());
@@ -1343,6 +1343,18 @@ public class Main {
if (key.equals("revision")) { if (key.equals("revision")) {
ver.revision = val; ver.revision = val;
} }
if (key.equals("build")) {
ver.build = Integer.parseInt(val);
}
if (key.equals("major")) {
ver.major = Integer.parseInt(val);
}
if (key.equals("minor")) {
ver.minor = Integer.parseInt(val);
}
if (key.equals("release")) {
ver.release = Integer.parseInt(val);
}
if (key.equals("longVersionName")) { if (key.equals("longVersionName")) {
ver.longVersionName = val; ver.longVersionName = val;
} }
@@ -73,7 +73,7 @@ public class NewVersionDialog extends AppDialog implements ActionListener {
changesStr += "<hr />"; changesStr += "<hr />";
} }
first = false; first = false;
changesStr += "<b>" + translate("version") + " " + v.versionName + (v.nightly ? " nightly" : "") + "</b><br />"; changesStr += "<b>" + translate("version") + " " + v.versionName + "</b><br />";
String releaseDate = v.releaseDate; String releaseDate = v.releaseDate;
try { try {
Date date = serverFormatter.parse(releaseDate); Date date = serverFormatter.parse(releaseDate);
@@ -100,7 +100,7 @@ public class NewVersionDialog extends AppDialog implements ActionListener {
} }
changesText.setContentType("text/html"); changesText.setContentType("text/html");
changesText.setText("<html>" + changesStr + "</html>"); changesText.setText("<html>" + changesStr + "</html>");
JLabel newAvailableLabel = new JLabel("<html><b><center>" + translate("newversionavailable") + " " + latestVersion.appName + " " + translate("version") + " " + latestVersion.versionName + (latestVersion.nightly ? " nightly" : "") + "</center></b></html>", SwingConstants.CENTER); JLabel newAvailableLabel = new JLabel("<html><b><center>" + translate("newversionavailable") + " " + latestVersion.appName + " " + translate("version") + " " + latestVersion.versionName + "</center></b></html>", SwingConstants.CENTER);
newAvailableLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT); newAvailableLabel.setAlignmentX(JLabel.CENTER_ALIGNMENT);
cnt.add(newAvailableLabel); cnt.add(newAvailableLabel);