mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 23:07:41 +01:00
Compare commits
15 Commits
build-scri
...
version-ch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85e0a1fd28 | ||
|
|
e2fdf08fec | ||
|
|
1555bd63db | ||
|
|
56fff8a730 | ||
|
|
dd7b3d5300 | ||
|
|
68affdde8c | ||
|
|
6cec8b835e | ||
|
|
aa43382296 | ||
|
|
ec346e9c98 | ||
|
|
61d5af822c | ||
|
|
c2d05b2bff | ||
|
|
6578236775 | ||
|
|
5550b257ca | ||
|
|
619aa1075f | ||
|
|
38a3ad85c8 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,3 +8,6 @@ packaging/common/ATCS.jar
|
||||
packaging/ATCS_*.zip
|
||||
ATCS_v*.tar.gz
|
||||
ATCS.jar
|
||||
/packaging/common/ATCS.env.bat
|
||||
/packaging/common/ATCS.env
|
||||
/packaging/common/ATCS_v*.zip
|
||||
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" default="true" />
|
||||
</project>
|
||||
@@ -1 +1 @@
|
||||
v0.6.19
|
||||
v0.6.21
|
||||
@@ -1,8 +1,9 @@
|
||||
!include MUI2.nsh
|
||||
|
||||
!define VERSION "0.6.20"
|
||||
!define VERSION "0.6.21"
|
||||
!define TRAINER_VERSION "0.1.5"
|
||||
!define JAVA_BIN "java"
|
||||
!define ATCS_SOURCE_DIR "C:\ATCS"
|
||||
|
||||
Name "Andor's Trail Content Studio v${VERSION}"
|
||||
OutFile "ATCS_v${VERSION}_Setup.exe"
|
||||
@@ -13,8 +14,8 @@ InstallDir "$PROGRAMFILES\ATCS\"
|
||||
Var StartMenuFolder
|
||||
|
||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to Andor's Trail Content Studio installer"
|
||||
!define MUI_WELCOMEPAGE_TEXT "This will install Andor's Trail Content Studio v${VERSION} installer"
|
||||
!define MUI_FINISHPAGE_TEXT "Andor's Trail Content Studio v${VERSION} install completed !"
|
||||
!define MUI_WELCOMEPAGE_TEXT "This will install Andor's Trail Content Studio v${VERSION}"
|
||||
!define MUI_FINISHPAGE_TEXT "Andor's Trail Content Studio v${VERSION} - Install completed !"
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Andor's Trail Content Studio"
|
||||
!define MUI_PAGE_HEADER_TEXT "Installing Andor's Trail Content Studio v${VERSION}"
|
||||
|
||||
@@ -46,31 +47,33 @@ Var StartMenuFolder
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
!insertmacro MUI_UNPAGE_INSTFILES
|
||||
|
||||
|
||||
!insertmacro MUI_LANGUAGE "English"
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------------
|
||||
Section install
|
||||
|
||||
|
||||
;--- Create in ...\packaging\common\ ATCS.cmd ATCT.ico ATCS.jar
|
||||
SetOutPath $INSTDIR
|
||||
file "ATCS.ico"
|
||||
|
||||
Delete "$INSTDIR\lib\*"
|
||||
|
||||
file "${ATCS_SOURCE_DIR}\packaging\common\ATCS.jar"
|
||||
|
||||
Call GetJRE
|
||||
Pop $R0
|
||||
; file "${ATCS_SOURCE_DIR}\packaging\common\ATCS.cmd"
|
||||
; !insertmacro _ReplaceInFile "ATCS.cmd" "java.exe" "$R0" (It was too much work this way)
|
||||
FileOpen $9 "ATCS.cmd" w
|
||||
FileWrite $9 '@echo off$\r$\n'
|
||||
FileWrite $9 '$\r$\n'
|
||||
FileWrite $9 'set "ATCS_DIR=%~dp0"$\r$\n'
|
||||
FileWrite $9 'set "MAX_MEM=512M"$\r$\n'
|
||||
FileWrite $9 'set "MAX_MEM=1024M"$\r$\n'
|
||||
FileWrite $9 'set "CP=%ATCS_DIR%lib\*"$\r$\n'
|
||||
FileWrite $9 'set "JAVA=$R0"$\r$\n'
|
||||
FileWrite $9 'set "JAVA_OPTS="$\r$\n'
|
||||
FileWrite $9 'set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"$\r$\n'
|
||||
FileWrite $9 'set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"$\r$\n'
|
||||
FileWrite $9 '$\r$\n'
|
||||
FileWrite $9 'if exist "%ENV_FILE%" ($\r$\n'
|
||||
FileWrite $9 'if exist "%ENV_FILE%" ($\r$\n'
|
||||
FileWrite $9 ' call "%ENV_FILE%"$\r$\n'
|
||||
FileWrite $9 ') else ($\r$\n'
|
||||
FileWrite $9 ' echo REM set "MAX_MEM=%MAX_MEM%">"%ENV_FILE%"$\r$\n'
|
||||
@@ -79,29 +82,15 @@ Section install
|
||||
FileWrite $9 ' echo.>>"%ENV_FILE%"$\r$\n'
|
||||
FileWrite $9 ')$\r$\n'
|
||||
FileWrite $9 '$\r$\n'
|
||||
FileWrite $9 'start "" "%JAVA%" %JAVA_OPTS% -Xmx%MAX_MEM% -cp "%CP%" %MAIN_CLASS%$\r$\n'
|
||||
FileWrite $9 'start "" "%JAVA%" %JAVA_OPTS% -Xmx%MAX_MEM% -jar ATCS.jar$\r$\n'
|
||||
FileClose $9
|
||||
|
||||
SetOutPath "$INSTDIR\lib\"
|
||||
file "C:\AT\ATCS_source\lib\jide-oss.jar"
|
||||
file "C:\AT\ATCS_source\lib\ui.jar"
|
||||
file "C:\AT\ATCS_source\lib\AndorsTrainer_v${TRAINER_VERSION}.jar"
|
||||
file "C:\AT\ATCS_source\lib\junit-4.10.jar"
|
||||
file "C:\AT\ATCS_source\lib\json_simple-1.1.jar"
|
||||
file "C:\AT\temp\ATCS_v0.6.20\ATCS_v${VERSION}.jar"
|
||||
file "C:\AT\ATCS_source\lib\rsyntaxtextarea.jar"
|
||||
file "C:\AT\ATCS_source\lib\prefuse.jar"
|
||||
file "C:\AT\ATCS_source\lib\bsh-2.0b4.jar"
|
||||
file "C:\AT\ATCS_source\lib\jsoup-1.10.2.jar"
|
||||
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN "ATCS"
|
||||
|
||||
;Create shortcuts
|
||||
;--- Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Andor's Trail Content Studio.lnk" "$INSTDIR\ATCS.cmd" "" "$INSTDIR\ATCS.ico"
|
||||
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
@@ -110,6 +99,8 @@ Section install
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------------
|
||||
Section uninstall
|
||||
|
||||
Delete "$INSTDIR\lib\jide-oss.jar"
|
||||
@@ -117,18 +108,17 @@ Section uninstall
|
||||
Delete "$INSTDIR\lib\junit-4.10.jar"
|
||||
Delete "$INSTDIR\lib\json_simple-1.1.jar"
|
||||
Delete "$INSTDIR\lib\AndorsTrainer_v${TRAINER_VERSION}.jar"
|
||||
Delete "$INSTDIR\lib\ATCS_v${VERSION}.jar"
|
||||
Delete "$INSTDIR\lib\rsyntaxtextarea.jar"
|
||||
Delete "$INSTDIR\lib\prefuse.jar"
|
||||
Delete "$INSTDIR\lib\bsh-2.0b4.jar"
|
||||
Delete "$INSTDIR\lib\jsoup-1.10.2.jar"
|
||||
RMDir "$INSTDIR\lib\"
|
||||
|
||||
Delete "$INSTDIR\ATCS.ico"
|
||||
Delete "$INSTDIR\ATCS.cmd"
|
||||
Delete "$INSTDIR\ATCS.env.bat"
|
||||
|
||||
Delete "$INSTDIR\ATCS.jar"
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER "ATCS" $StartMenuFolder
|
||||
@@ -140,19 +130,20 @@ Section uninstall
|
||||
SectionEnd
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------------
|
||||
Function GetJRE
|
||||
;
|
||||
; Find JRE (javaw.exe)
|
||||
; Find JRE (java.exe)
|
||||
; DISABLED 1 - in .\jre directory (JRE Installed with application)
|
||||
; 2 - in JAVA_HOME environment variable
|
||||
; 3 - in the registry
|
||||
; 4 - assume javaw.exe in current dir or PATH
|
||||
; 4 - assume java.exe in current dir or PATH
|
||||
|
||||
Push $R0
|
||||
Push $R1
|
||||
|
||||
;ClearErrors
|
||||
;StrCpy $R0 "$EXEDIR\jre\bin\javaw.exe"
|
||||
;StrCpy $R0 "$EXEDIR\jre\bin\java.exe"
|
||||
;IfFileExists $R0 JreFound
|
||||
;StrCpy $R0 ""
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@echo off
|
||||
|
||||
set "ATCS_DIR=%~dp0"
|
||||
set "MAX_MEM=512M"
|
||||
set "JAVA=javaw.exe"
|
||||
set "MAX_MEM=1024M"
|
||||
set "JAVA=java.exe"
|
||||
set "JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true"
|
||||
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
||||
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#MAX_MEM=512M
|
||||
#JAVA=java
|
||||
#JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
atcs.spritesheet.actorconditions_1.category=actorcondition
|
||||
atcs.spritesheet.actorconditions_2.category=actorcondition
|
||||
atcs.spritesheet.actorconditions_japozero.category=actorcondition
|
||||
atcs.spritesheet.actorconditions_newb.category=actorcondition
|
||||
atcs.spritesheet.actorconditions_omi1.category=actorcondition
|
||||
atcs.spritesheet.actorconditions_omi2.category=actorcondition
|
||||
|
||||
@@ -60,6 +61,7 @@ atcs.spritesheet.monsters_gisons.category=monster
|
||||
atcs.spritesheet.monsters_guynmart.category=monster
|
||||
|
||||
atcs.spritesheet.monsters_insects.category=monster
|
||||
atcs.spritesheet.monsters_johny.category=monster
|
||||
atcs.spritesheet.monsters_karvis1.category=monster
|
||||
atcs.spritesheet.monsters_karvis2.category=monster
|
||||
atcs.spritesheet.monsters_ld1.category=monster
|
||||
|
||||
@@ -42,7 +42,7 @@ import com.gpl.rpg.atcontentstudio.ui.WorkspaceSelector;
|
||||
public class ATContentStudio {
|
||||
|
||||
public static final String APP_NAME = "Andor's Trail Content Studio";
|
||||
public static final String APP_VERSION = "v0.6.20";
|
||||
public static final String APP_VERSION = "v0.6.21";
|
||||
|
||||
public static final String CHECK_UPDATE_URL = "https://andorstrail.com/static/ATCS_latest";
|
||||
public static final String DOWNLOAD_URL = "https://andorstrail.com/viewtopic.php?f=6&t=4806";
|
||||
@@ -153,8 +153,7 @@ public class ATContentStudio {
|
||||
while ((inputLine = in.readLine()) != null) {
|
||||
lastLine = inputLine;
|
||||
}
|
||||
if (lastLine != null && !lastLine.equals(APP_VERSION)) {
|
||||
|
||||
if (lastLine != null && compareVersions(lastLine) < 0) {
|
||||
// for copying style
|
||||
JLabel label = new JLabel();
|
||||
Font font = label.getFont();
|
||||
@@ -231,4 +230,19 @@ public class ATContentStudio {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// returns The difference between the the latest version and the current one (CURRENT - LATEST)
|
||||
private static int compareVersions(String latest) {
|
||||
String[] levels1 = ATContentStudio.APP_VERSION.substring(1).split("\\.");
|
||||
String[] levels2 = latest.substring(1).split("\\.");
|
||||
int length = Math.max(levels1.length, levels2.length);
|
||||
for (int i = 0; i < length; i++) {
|
||||
int v1 = i < levels1.length ? Integer.parseInt(levels1[i]) : 0;
|
||||
int v2 = i < levels2.length ? Integer.parseInt(levels2[i]) : 0;
|
||||
if (v1 != v2) {
|
||||
return v1 - v2;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,8 @@ public class ActorCondition extends JSONElement {
|
||||
//public String id; inherited.
|
||||
public String icon_id;
|
||||
public String display_name;
|
||||
|
||||
public String description;
|
||||
|
||||
// Available from parsed state
|
||||
public ACCategory category = null;
|
||||
public Integer positive = null;
|
||||
@@ -157,6 +158,7 @@ public class ActorCondition extends JSONElement {
|
||||
@Override
|
||||
public void parse(Map aCondJson) {
|
||||
|
||||
if (aCondJson.get("description") != null) this.description = (String) aCondJson.get("description");
|
||||
if (aCondJson.get("category") != null) this.category = ACCategory.valueOf((String) aCondJson.get("category"));
|
||||
this.positive = JSONElement.getInteger((Number) aCondJson.get("isPositive"));
|
||||
Map abilityEffect = (Map) aCondJson.get("abilityEffect");
|
||||
@@ -271,6 +273,7 @@ public class ActorCondition extends JSONElement {
|
||||
clone.state = this.state;
|
||||
clone.id = this.id;
|
||||
clone.display_name = this.display_name;
|
||||
clone.description = this.description;
|
||||
clone.icon_id = this.icon_id;
|
||||
clone.category = this.category;
|
||||
clone.positive = this.positive;
|
||||
@@ -299,6 +302,7 @@ public class ActorCondition extends JSONElement {
|
||||
jsonAC.put("id", this.id);
|
||||
if (this.icon_id != null) jsonAC.put("iconID", this.icon_id);
|
||||
if (this.display_name != null) jsonAC.put("name", this.display_name);
|
||||
if (this.description != null) jsonAC.put("description", this.description);
|
||||
if (this.category != null) jsonAC.put("category", this.category.toString());
|
||||
if (this.positive != null && this.positive == 1) jsonAC.put("isPositive", this.positive);
|
||||
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
||||
|
||||
@@ -28,6 +28,7 @@ public class PotGenerator {
|
||||
|
||||
for (ActorCondition ac : gsrc.gameData.actorConditions) {
|
||||
pushString(stringsResources, resourcesStrings, ac.display_name, getPotContextComment(ac));
|
||||
pushString(stringsResources, resourcesStrings, ac.description, getPotContextComment(ac)+":description");
|
||||
}
|
||||
|
||||
for (Dialogue d : gsrc.gameData.dialogues ) {
|
||||
|
||||
@@ -30,6 +30,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
||||
private JButton acIcon;
|
||||
private JTextField idField;
|
||||
private JTextField nameField;
|
||||
private JTextField descriptionField;
|
||||
@SuppressWarnings("rawtypes")
|
||||
private JComboBox categoryBox;
|
||||
private IntegerBasedCheckBox positiveBox;
|
||||
@@ -81,6 +82,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
||||
|
||||
idField = addTextField(pane, "Internal ID: ", ac.id, ac.writable, listener);
|
||||
nameField = addTranslatableTextField(pane, "Display name: ", ac.display_name, ac.writable, listener);
|
||||
descriptionField = addTranslatableTextField(pane, "Description: ", ac.description, ac.writable, listener);
|
||||
categoryBox = addEnumValueBox(pane, "Category: ", ActorCondition.ACCategory.values(), ac.category, ac.writable, listener);
|
||||
positiveBox = addIntegerBasedCheckBox(pane, "Positive", ac.positive, ac.writable, listener);
|
||||
stackingBox = addIntegerBasedCheckBox(pane, "Stacking", ac.stacking, ac.writable, listener);
|
||||
@@ -172,6 +174,10 @@ public class ActorConditionEditor extends JSONElementEditor {
|
||||
ActorConditionEditor.this.name = aCond.getDesc();
|
||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
ATContentStudio.frame.editorChanged(ActorConditionEditor.this);
|
||||
}else if (source == descriptionField) {
|
||||
aCond.description = (String) value;
|
||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
ATContentStudio.frame.editorChanged(ActorConditionEditor.this);
|
||||
} else if (source == acIcon) {
|
||||
aCond.icon_id = (String) value;
|
||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||
|
||||
Reference in New Issue
Block a user