mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 14:58:55 +01:00
Compare commits
35 Commits
sample-bui
...
version-ch
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85e0a1fd28 | ||
|
|
e2fdf08fec | ||
|
|
1555bd63db | ||
|
|
56fff8a730 | ||
|
|
dd7b3d5300 | ||
|
|
68affdde8c | ||
|
|
6cec8b835e | ||
|
|
aa43382296 | ||
|
|
ec346e9c98 | ||
|
|
61d5af822c | ||
|
|
c2d05b2bff | ||
|
|
e60378ab64 | ||
|
|
6578236775 | ||
|
|
4fa2409c24 | ||
|
|
b5aa453fd6 | ||
|
|
42f1c87278 | ||
|
|
9097b97316 | ||
|
|
7965ecb4f1 | ||
|
|
01963517ba | ||
|
|
30bef443d5 | ||
|
|
8d01716d93 | ||
|
|
fce5cd71ff | ||
|
|
0cddbb04e9 | ||
|
|
00ec5fe49f | ||
|
|
5cdb42ae07 | ||
|
|
c98f51744b | ||
|
|
5550b257ca | ||
|
|
619aa1075f | ||
|
|
38a3ad85c8 | ||
|
|
89f764b62b | ||
|
|
d81233d470 | ||
|
|
e1685aa625 | ||
|
|
ae3ca5d50a | ||
|
|
a00b8fbc66 | ||
|
|
4d03c15e08 |
6
.gitignore
vendored
6
.gitignore
vendored
@@ -2,6 +2,12 @@
|
|||||||
/Project
|
/Project
|
||||||
/bin
|
/bin
|
||||||
/packaging/tmp/
|
/packaging/tmp/
|
||||||
|
/out
|
||||||
packaging/common/lib
|
packaging/common/lib
|
||||||
packaging/common/ATCS.jar
|
packaging/common/ATCS.jar
|
||||||
packaging/ATCS_*.zip
|
packaging/ATCS_*.zip
|
||||||
|
ATCS_v*.tar.gz
|
||||||
|
ATCS.jar
|
||||||
|
/packaging/common/ATCS.env.bat
|
||||||
|
/packaging/common/ATCS.env
|
||||||
|
/packaging/common/ATCS_v*.zip
|
||||||
|
|||||||
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
||||||
18
.idea/artifacts/ATContentStudio_jar.xml
generated
Normal file
18
.idea/artifacts/ATContentStudio_jar.xml
generated
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<component name="ArtifactManager">
|
||||||
|
<artifact name="ATContentStudio:jar">
|
||||||
|
<output-path>$PROJECT_DIR$/out/artifacts/ATContentStudio_jar</output-path>
|
||||||
|
<root id="root">
|
||||||
|
<element id="archive" name="ATContentStudio.jar">
|
||||||
|
<element id="module-output" name="ATContentStudio" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/bsh-2.0b4.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/rsyntaxtextarea.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/prefuse.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jsoup-1.10.2.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/json_simple-1.1.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/ui.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/AndorsTrainer_v0.1.5.jar" path-in-jar="/" />
|
||||||
|
<element id="extracted-dir" path="$PROJECT_DIR$/lib/jide-oss.jar" path-in-jar="/" />
|
||||||
|
</element>
|
||||||
|
</root>
|
||||||
|
</artifact>
|
||||||
|
</component>
|
||||||
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" default="true" />
|
||||||
|
</project>
|
||||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/ATContentStudio.iml" filepath="$PROJECT_DIR$/ATContentStudio.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
117
ATContentStudio.iml
Normal file
117
ATContentStudio.iml
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="EclipseModuleManager">
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/jide-oss.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/json_simple-1.1.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/junit-4.10.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/prefuse.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/rsyntaxtextarea.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/ui.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/bsh-2.0b4.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/jsoup-1.10.2.jar!/" />
|
||||||
|
<libelement value="jar://$MODULE_DIR$/lib/AndorsTrainer_v0.1.5.jar!/" />
|
||||||
|
<src_description expected_position="0">
|
||||||
|
<src_folder value="file://$MODULE_DIR$/src" expected_position="0" />
|
||||||
|
<src_folder value="file://$MODULE_DIR$/res" expected_position="1" />
|
||||||
|
<src_folder value="file://$MODULE_DIR$/hacked-libtiled" expected_position="2" />
|
||||||
|
<src_folder value="file://$MODULE_DIR$/siphash-zackehh/src/main/java" expected_position="3" />
|
||||||
|
<src_folder value="file://$MODULE_DIR$/minify" expected_position="4" />
|
||||||
|
</src_description>
|
||||||
|
</component>
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<output url="file://$MODULE_DIR$/bin" />
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$">
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/hacked-libtiled" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/minify" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/res" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/siphash-zackehh/src/main/java" isTestSource="false" />
|
||||||
|
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||||
|
</content>
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="jide-oss.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/jide-oss.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="json_simple-1.1.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/json_simple-1.1.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="junit-4.10.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/junit-4.10.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="prefuse.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/prefuse.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="rsyntaxtextarea.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/rsyntaxtextarea.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="ui.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/ui.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="bsh-2.0b4.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/bsh-2.0b4.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="jsoup-1.10.2.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/jsoup-1.10.2.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/jsoup-1.10.2-sources.jar!/" />
|
||||||
|
</SOURCES>
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
<orderEntry type="module-library">
|
||||||
|
<library name="AndorsTrainer_v0.1.5.jar">
|
||||||
|
<CLASSES>
|
||||||
|
<root url="jar://$MODULE_DIR$/lib/AndorsTrainer_v0.1.5.jar!/" />
|
||||||
|
</CLASSES>
|
||||||
|
<JAVADOC />
|
||||||
|
<SOURCES />
|
||||||
|
</library>
|
||||||
|
</orderEntry>
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
127
createProject.bat
Normal file
127
createProject.bat
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
@echo off
|
||||||
|
echo.
|
||||||
|
echo ***
|
||||||
|
echo *** createProject v1.0 (2024-08-24)
|
||||||
|
echo ***
|
||||||
|
echo *** This script will help to setup an ATCS project
|
||||||
|
echo *** and connect it to a repo on Github
|
||||||
|
echo ***
|
||||||
|
echo.
|
||||||
|
rem Save this script anywhere on your PC (e.g. C:\AT\createProject.bat)
|
||||||
|
rem Then open a command shell: CMD
|
||||||
|
rem and call the script in the shell.
|
||||||
|
|
||||||
|
if "%1"=="" goto :noParamError
|
||||||
|
|
||||||
|
echo You have entered:
|
||||||
|
echo.
|
||||||
|
echo ATCS-project: %1
|
||||||
|
echo in Directory: %2
|
||||||
|
echo Github user: %3
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
if "%3"=="" goto :help
|
||||||
|
if not "%4"=="" goto :help
|
||||||
|
|
||||||
|
if not exist %2 md %2
|
||||||
|
|
||||||
|
rem --- Create ATCS project (if not already done)
|
||||||
|
:atcs
|
||||||
|
if not exist %2\%1\created\drawable\char_hero.png (
|
||||||
|
echo.
|
||||||
|
echo Do the following steps:
|
||||||
|
echo.
|
||||||
|
echo 1. Start ATCS
|
||||||
|
echo 2. Create your ATCS workspace in %2
|
||||||
|
echo 3. Add the new project %1
|
||||||
|
echo 4. Exit ATCS
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
goto :atcs
|
||||||
|
) else (
|
||||||
|
echo ATCS Project exists
|
||||||
|
)
|
||||||
|
|
||||||
|
rem --- Create git repository
|
||||||
|
rem This is the really important part :)
|
||||||
|
rem -- go into project dir (even if we do not need to create the git repo)
|
||||||
|
echo cd %2\%1
|
||||||
|
cd %2\%1
|
||||||
|
|
||||||
|
if not exist %2\%1\readme.md (
|
||||||
|
echo creating readme
|
||||||
|
|
||||||
|
echo # %1 > readme.md
|
||||||
|
) else (
|
||||||
|
echo readme already exists
|
||||||
|
)
|
||||||
|
|
||||||
|
if not exist %2\%1\.gitignore (
|
||||||
|
echo creating gitignore
|
||||||
|
|
||||||
|
echo .workspace > .gitignore
|
||||||
|
echo .project >> .gitignore
|
||||||
|
echo altered/drawable >> .gitignore
|
||||||
|
echo altered/drawable/* >> .gitignore
|
||||||
|
echo created/drawable >> .gitignore
|
||||||
|
echo created/drawable/* >> .gitignore
|
||||||
|
echo tmp/res/values/loadresources.xml >> .gitignore
|
||||||
|
) else (
|
||||||
|
echo gitignore already existed
|
||||||
|
)
|
||||||
|
|
||||||
|
:git
|
||||||
|
if not exist %2\%1\.git (
|
||||||
|
echo Initializing git
|
||||||
|
git init -b main || (
|
||||||
|
echo "failed to init git. Please make sure it is installed"
|
||||||
|
pause
|
||||||
|
goto :git
|
||||||
|
)
|
||||||
|
:git_commit
|
||||||
|
git add readme.md
|
||||||
|
git add .gitignore
|
||||||
|
git commit -m "Init project" || (
|
||||||
|
echo "failed to create the initial commit."
|
||||||
|
pause
|
||||||
|
goto :git_commit
|
||||||
|
)
|
||||||
|
echo Done initializing git
|
||||||
|
) else (
|
||||||
|
echo git was already initialized
|
||||||
|
)
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo Now create your repo %1 on https://github.com/%3 (if not already done)
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
|
echo pushing to git repo https://github.com/%3/%1.git
|
||||||
|
git remote add origin https://github.com/%3/%1.git
|
||||||
|
git push -u origin main
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo At last you have to find the repo in your git client:
|
||||||
|
echo - In Smartgit: Menu option: Repository / Search for repository
|
||||||
|
echo.
|
||||||
|
goto :end
|
||||||
|
|
||||||
|
:noParamError
|
||||||
|
echo.
|
||||||
|
echo You have given no parameter.
|
||||||
|
echo Maybe you have just double clicked it? That won't work.
|
||||||
|
echo I have opened a CMD shell for you. Enter the command in that shell.
|
||||||
|
start cmd
|
||||||
|
echo Please switch to the CMD shell
|
||||||
|
|
||||||
|
:help
|
||||||
|
echo.
|
||||||
|
echo Enter the command with 3 parameters:
|
||||||
|
echo %0 project path git-user
|
||||||
|
echo.
|
||||||
|
echo Example: %0 feygard_1 c:\AT\ATCS NutAndor
|
||||||
|
echo.
|
||||||
|
|
||||||
|
:end
|
||||||
|
echo.
|
||||||
|
echo *** End ***
|
||||||
|
pause
|
||||||
@@ -1 +1 @@
|
|||||||
v0.6.19
|
v0.6.21
|
||||||
@@ -1,8 +1,9 @@
|
|||||||
!include MUI2.nsh
|
!include MUI2.nsh
|
||||||
|
|
||||||
!define VERSION "0.6.20"
|
!define VERSION "0.6.21"
|
||||||
!define TRAINER_VERSION "0.1.5"
|
!define TRAINER_VERSION "0.1.5"
|
||||||
!define JAVA_BIN "java"
|
!define JAVA_BIN "java"
|
||||||
|
!define ATCS_SOURCE_DIR "C:\ATCS"
|
||||||
|
|
||||||
Name "Andor's Trail Content Studio v${VERSION}"
|
Name "Andor's Trail Content Studio v${VERSION}"
|
||||||
OutFile "ATCS_v${VERSION}_Setup.exe"
|
OutFile "ATCS_v${VERSION}_Setup.exe"
|
||||||
@@ -13,8 +14,8 @@ InstallDir "$PROGRAMFILES\ATCS\"
|
|||||||
Var StartMenuFolder
|
Var StartMenuFolder
|
||||||
|
|
||||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to Andor's Trail Content Studio installer"
|
!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_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_FINISHPAGE_TEXT "Andor's Trail Content Studio v${VERSION} - Install completed !"
|
||||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Andor's Trail Content Studio"
|
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Andor's Trail Content Studio"
|
||||||
!define MUI_PAGE_HEADER_TEXT "Installing Andor's Trail Content Studio v${VERSION}"
|
!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_CONFIRM
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
!insertmacro MUI_UNPAGE_INSTFILES
|
||||||
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
!insertmacro MUI_LANGUAGE "English"
|
||||||
|
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------------
|
||||||
Section install
|
Section install
|
||||||
|
|
||||||
|
;--- Create in ...\packaging\common\ ATCS.cmd ATCT.ico ATCS.jar
|
||||||
SetOutPath $INSTDIR
|
SetOutPath $INSTDIR
|
||||||
file "ATCS.ico"
|
file "ATCS.ico"
|
||||||
|
file "${ATCS_SOURCE_DIR}\packaging\common\ATCS.jar"
|
||||||
Delete "$INSTDIR\lib\*"
|
|
||||||
|
|
||||||
Call GetJRE
|
Call GetJRE
|
||||||
Pop $R0
|
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
|
FileOpen $9 "ATCS.cmd" w
|
||||||
FileWrite $9 '@echo off$\r$\n'
|
FileWrite $9 '@echo off$\r$\n'
|
||||||
FileWrite $9 '$\r$\n'
|
FileWrite $9 '$\r$\n'
|
||||||
FileWrite $9 'set "ATCS_DIR=%~dp0"$\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 "CP=%ATCS_DIR%lib\*"$\r$\n'
|
||||||
FileWrite $9 'set "JAVA=$R0"$\r$\n'
|
FileWrite $9 'set "JAVA=$R0"$\r$\n'
|
||||||
FileWrite $9 'set "JAVA_OPTS="$\r$\n'
|
FileWrite $9 'set "JAVA_OPTS="$\r$\n'
|
||||||
FileWrite $9 'set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"$\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 'set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"$\r$\n'
|
||||||
FileWrite $9 '$\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 ' call "%ENV_FILE%"$\r$\n'
|
||||||
FileWrite $9 ') else ($\r$\n'
|
FileWrite $9 ') else ($\r$\n'
|
||||||
FileWrite $9 ' echo REM set "MAX_MEM=%MAX_MEM%">"%ENV_FILE%"$\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 ' echo.>>"%ENV_FILE%"$\r$\n'
|
||||||
FileWrite $9 ')$\r$\n'
|
FileWrite $9 ')$\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
|
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"
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN "ATCS"
|
!insertmacro MUI_STARTMENU_WRITE_BEGIN "ATCS"
|
||||||
|
|
||||||
;Create shortcuts
|
;--- Create shortcuts
|
||||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||||
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Andor's Trail Content Studio.lnk" "$INSTDIR\ATCS.cmd" "" "$INSTDIR\ATCS.ico"
|
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Andor's Trail Content Studio.lnk" "$INSTDIR\ATCS.cmd" "" "$INSTDIR\ATCS.ico"
|
||||||
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
CreateShortcut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||||
@@ -110,6 +99,8 @@ Section install
|
|||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------------
|
||||||
Section uninstall
|
Section uninstall
|
||||||
|
|
||||||
Delete "$INSTDIR\lib\jide-oss.jar"
|
Delete "$INSTDIR\lib\jide-oss.jar"
|
||||||
@@ -117,18 +108,17 @@ Section uninstall
|
|||||||
Delete "$INSTDIR\lib\junit-4.10.jar"
|
Delete "$INSTDIR\lib\junit-4.10.jar"
|
||||||
Delete "$INSTDIR\lib\json_simple-1.1.jar"
|
Delete "$INSTDIR\lib\json_simple-1.1.jar"
|
||||||
Delete "$INSTDIR\lib\AndorsTrainer_v${TRAINER_VERSION}.jar"
|
Delete "$INSTDIR\lib\AndorsTrainer_v${TRAINER_VERSION}.jar"
|
||||||
Delete "$INSTDIR\lib\ATCS_v${VERSION}.jar"
|
|
||||||
Delete "$INSTDIR\lib\rsyntaxtextarea.jar"
|
Delete "$INSTDIR\lib\rsyntaxtextarea.jar"
|
||||||
Delete "$INSTDIR\lib\prefuse.jar"
|
Delete "$INSTDIR\lib\prefuse.jar"
|
||||||
Delete "$INSTDIR\lib\bsh-2.0b4.jar"
|
Delete "$INSTDIR\lib\bsh-2.0b4.jar"
|
||||||
Delete "$INSTDIR\lib\jsoup-1.10.2.jar"
|
Delete "$INSTDIR\lib\jsoup-1.10.2.jar"
|
||||||
RMDir "$INSTDIR\lib\"
|
RMDir "$INSTDIR\lib\"
|
||||||
|
|
||||||
Delete "$INSTDIR\ATCS.ico"
|
Delete "$INSTDIR\ATCS.ico"
|
||||||
Delete "$INSTDIR\ATCS.cmd"
|
Delete "$INSTDIR\ATCS.cmd"
|
||||||
Delete "$INSTDIR\ATCS.env.bat"
|
Delete "$INSTDIR\ATCS.env.bat"
|
||||||
|
Delete "$INSTDIR\ATCS.jar"
|
||||||
Delete "$INSTDIR\Uninstall.exe"
|
Delete "$INSTDIR\Uninstall.exe"
|
||||||
|
|
||||||
RMDir "$INSTDIR"
|
RMDir "$INSTDIR"
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_GETFOLDER "ATCS" $StartMenuFolder
|
!insertmacro MUI_STARTMENU_GETFOLDER "ATCS" $StartMenuFolder
|
||||||
@@ -140,19 +130,20 @@ Section uninstall
|
|||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------------
|
||||||
Function GetJRE
|
Function GetJRE
|
||||||
;
|
;
|
||||||
; Find JRE (javaw.exe)
|
; Find JRE (java.exe)
|
||||||
; DISABLED 1 - in .\jre directory (JRE Installed with application)
|
; DISABLED 1 - in .\jre directory (JRE Installed with application)
|
||||||
; 2 - in JAVA_HOME environment variable
|
; 2 - in JAVA_HOME environment variable
|
||||||
; 3 - in the registry
|
; 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 $R0
|
||||||
Push $R1
|
Push $R1
|
||||||
|
|
||||||
;ClearErrors
|
;ClearErrors
|
||||||
;StrCpy $R0 "$EXEDIR\jre\bin\javaw.exe"
|
;StrCpy $R0 "$EXEDIR\jre\bin\java.exe"
|
||||||
;IfFileExists $R0 JreFound
|
;IfFileExists $R0 JreFound
|
||||||
;StrCpy $R0 ""
|
;StrCpy $R0 ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
@echo off
|
@echo off
|
||||||
|
|
||||||
set "ATCS_DIR=%~dp0"
|
set "ATCS_DIR=%~dp0"
|
||||||
set "MAX_MEM=512M"
|
set "MAX_MEM=1024M"
|
||||||
set "JAVA=javaw.exe"
|
set "JAVA=java.exe"
|
||||||
set "JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true"
|
set "JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true"
|
||||||
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
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,84 +1,119 @@
|
|||||||
#windows or linux
|
#!/bin/bash
|
||||||
if [ "$1" = "-windows" ] ; then
|
|
||||||
|
# Script to build ATCS.jar, replicating IntelliJ artifact definition
|
||||||
|
# Linux and Windows compatible
|
||||||
|
|
||||||
|
# --- Platform Detection ---
|
||||||
|
if [ "$1" = "-windows" ]; then
|
||||||
echo "Got '-windows' flag. Running Windows version"
|
echo "Got '-windows' flag. Running Windows version"
|
||||||
LINUX=false
|
PLATFORM="WINDOWS"
|
||||||
else
|
else
|
||||||
echo "No '-windows' flag. Running linux version"
|
echo "No '-windows' flag. Running Linux version"
|
||||||
LINUX=true
|
PLATFORM="LINUX"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#read the folder this script should be in (should be the packaging folder inside the ATCS source)
|
# --- Configuration ---
|
||||||
PACKAGING_DIR=$(dirname $(readlink -f "$0" || greadlink -f "$0" || stat -f "$0"))
|
PACKAGING_DIR=$(dirname "$(readlink -f "$0" || greadlink -f "$0" || stat -f "$0")")
|
||||||
ATCS_SOURCE_DIR=$(dirname "${PACKAGING_DIR}")
|
ATCS_SOURCE_DIR=$(dirname "${PACKAGING_DIR}")
|
||||||
TEMP_DIR=${PACKAGING_DIR}/tmp
|
TEMP_DIR="${PACKAGING_DIR}/tmp"
|
||||||
echo "Packaging dir: ${PACKAGING_DIR}"
|
JAR_LOCATION="${PACKAGING_DIR}/ATCS.jar" # Output JAR location as per script
|
||||||
echo "ATCS_SOURCE_DIR: ${ATCS_SOURCE_DIR}"
|
MANIFEST_LOCATION="${PACKAGING_DIR}/Manifest.txt"
|
||||||
#ATContentStudio
|
VERSION_FILE="${PACKAGING_DIR}/ATCS_latest"
|
||||||
JAR_LOCATION="${PACKAGING_DIR}/common/ATCS.jar"
|
SOURCE_BASE_DIR="${ATCS_SOURCE_DIR}/src" # Base directory for standard source code
|
||||||
MANIFEST_LOCATION=${PACKAGING_DIR}/Manifest.txt
|
LIB_BASE_DIR="${ATCS_SOURCE_DIR}/lib" # Base directory for libraries
|
||||||
echo ""
|
OUTPUT_JAR_DIR="${PACKAGING_DIR}" # Directory where the final JAR will be placed - as per script
|
||||||
|
|
||||||
|
# --- **ADDITIONAL SOURCE CODE FOLDERS** ---
|
||||||
|
EXTRA_SOURCE_DIRS=(
|
||||||
|
"hacked-libtiled"
|
||||||
|
"minify"
|
||||||
|
"siphash-zackehh/src/main/java"
|
||||||
|
)
|
||||||
|
|
||||||
|
# --- Libraries to include (from IntelliJ artifact definition) ---
|
||||||
|
LIBRARIES=(
|
||||||
|
"AndorsTrainer_v0.1.5.jar"
|
||||||
|
"bsh-2.0b4.jar"
|
||||||
|
"jide-oss.jar"
|
||||||
|
"json_simple-1.1.jar"
|
||||||
|
"jsoup-1.10.2.jar"
|
||||||
|
"junit-4.10.jar"
|
||||||
|
"prefuse.jar"
|
||||||
|
"rsyntaxtextarea.jar"
|
||||||
|
"ui.jar"
|
||||||
|
)
|
||||||
|
|
||||||
|
# --- Get version ---
|
||||||
echo "Getting version"
|
echo "Getting version"
|
||||||
VERSION=$(cat ${PACKAGING_DIR}/ATCS_latest)
|
VERSION=$(cat "${VERSION_FILE}")
|
||||||
echo "Got version ${VERSION}"
|
echo "Got version ${VERSION}"
|
||||||
|
|
||||||
|
# --- Prepare temporary directory ---
|
||||||
echo "Removing tmp folder"
|
echo "Removing tmp folder"
|
||||||
rm -rf ${PACKAGING_DIR}/tmp/
|
rm -rf "${TEMP_DIR}"
|
||||||
echo "recreating tmp folder"
|
echo "Recreating tmp folder"
|
||||||
mkdir ${PACKAGING_DIR}/tmp/
|
mkdir -p "${TEMP_DIR}"
|
||||||
#ATCS_SOURCE_DIR="${PACKAGING_DIR}/.."
|
|
||||||
|
# --- **EXTRACT lib files directly to TEMP_DIR** ---
|
||||||
|
echo 'Extracting lib files to TEMP_DIR'
|
||||||
|
for LIB in "${LIBRARIES[@]}"; do
|
||||||
|
echo "Extracting library: ${LIB}"
|
||||||
|
unzip -qo "${LIB_BASE_DIR}/${LIB}" -d "${TEMP_DIR}" # Extract JAR contents to TEMP_DIR root
|
||||||
|
done
|
||||||
|
|
||||||
|
# --- Set ClassPath ---
|
||||||
|
echo "Getting source files"
|
||||||
|
# Find all java files in source directories and compile them
|
||||||
|
SOURCE_FILES=$(find "${SOURCE_BASE_DIR}" "${EXTRA_SOURCE_DIRS[@]/#/${ATCS_SOURCE_DIR}/}" -name "*.java" -print)
|
||||||
|
#echo "SourceFiles: ${SOURCE_FILES}"
|
||||||
echo ""
|
echo ""
|
||||||
#copy manifest to temp folder for editing
|
|
||||||
cp ${MANIFEST_LOCATION} ${TEMP_DIR}
|
|
||||||
MANIFEST_LOCATION=${TEMP_DIR}/Manifest.txt
|
|
||||||
|
|
||||||
#copy lib files to packaged folder?
|
# --- Build Java classes ---
|
||||||
echo 'copying lib files'
|
echo 'Building java classes'
|
||||||
mkdir -p ${PACKAGING_DIR}/common/lib/
|
|
||||||
cp ${ATCS_SOURCE_DIR}/lib/* ${PACKAGING_DIR}/common/lib/
|
|
||||||
|
|
||||||
cd $ATCS_SOURCE_DIR
|
javac -cp "${TEMP_DIR}" -d "${TEMP_DIR}" ${SOURCE_FILES}
|
||||||
#set ClassPath variable to use in the building etc.
|
if [ $? -ne 0 ]; then
|
||||||
echo 'setting class path'
|
echo "Compilation failed. Please check errors above."
|
||||||
#linux needs a : as seperator while windows needs ;
|
exit 1
|
||||||
if [ "$LINUX" = true ] ; then
|
|
||||||
CP="lib/*:src:hacked-libtiled:siphash-zackehh/src/main/java"
|
|
||||||
else
|
|
||||||
CP="lib/*;src;hacked-libtiled;siphash-zackehh/src/main/java"
|
|
||||||
fi
|
fi
|
||||||
echo "ClassPath: "
|
echo "Compilation successful"
|
||||||
echo ${CP}
|
|
||||||
echo ""
|
|
||||||
|
|
||||||
#set build the classes
|
# --- Copy res stuff to temp folder ---
|
||||||
echo 'building java classes'
|
echo "Copying some stuff to temp folder"
|
||||||
#javac -cp $CP *.java
|
cp -r "${ATCS_SOURCE_DIR}"/res/* "${TEMP_DIR}/"
|
||||||
javac -cp $CP ${ATCS_SOURCE_DIR}/src/com/gpl/rpg/atcontentstudio/*.java -d ${TEMP_DIR}
|
mkdir -p "${TEMP_DIR}/com/gpl/rpg/atcontentstudio/img"
|
||||||
echo javac -cp $CP ${ATCS_SOURCE_DIR}/src/com/gpl/rpg/atcontentstudio/*.java -d ${TEMP_DIR}
|
mkdir -p "${TEMP_DIR}/tiled/io/resources/"
|
||||||
echo ""
|
cp -r "${ATCS_SOURCE_DIR}"/src/com/gpl/rpg/atcontentstudio/img/* "${TEMP_DIR}/com/gpl/rpg/atcontentstudio/img/" # some icons
|
||||||
LIB_PATHS=$(find lib -name '*.jar' | paste -sd' ')
|
cp -r "${ATCS_SOURCE_DIR}"/hacked-libtiled/tiled/io/resources/* "${TEMP_DIR}/tiled/io/resources/" # dtd file for tmx maps
|
||||||
echo "LIB_PATHS: ${LIB_PATHS}"
|
|
||||||
# add all lib files to the class path in the temp Manifest
|
|
||||||
echo "Class-Path: . lib/* ${LIB_PATHS}" >>${MANIFEST_LOCATION}
|
|
||||||
|
|
||||||
|
# --- Create JAR file ---
|
||||||
echo ""
|
echo ""
|
||||||
echo "creating jar at location: ${JAR_LOCATION}"
|
echo "Creating jar at location: ${JAR_LOCATION}"
|
||||||
|
|
||||||
# create the jar file
|
cd "${TEMP_DIR}" || exit # Change to temp dir for JAR command
|
||||||
# the command with those parameters requires this format:
|
|
||||||
# jar vmfc <Manifest file> <Jar file (target location)> <all things to add to the jar file>
|
# JAR command WITHOUT lib directory
|
||||||
# the things to add always use the whole relative path from the current dir,
|
jar cfm "${JAR_LOCATION}" "${MANIFEST_LOCATION}" -C . .
|
||||||
# so when that is not wanted, the -C <location> thing will change to that dir
|
if [ $? -ne 0 ]; then
|
||||||
jar mfc ${MANIFEST_LOCATION} ${JAR_LOCATION} -C ${PACKAGING_DIR}/tmp/ com/gpl/rpg/atcontentstudio/ -C res . -C ${ATCS_SOURCE_DIR}/src .
|
echo "JAR creation failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "${PACKAGING_DIR}" || exit # Go back to packaging dir
|
||||||
|
|
||||||
echo ''
|
echo ''
|
||||||
echo "Done creating jar"
|
echo "Done creating jar at ${JAR_LOCATION}"
|
||||||
|
cp -f "${JAR_LOCATION}" "${OUTPUT_JAR_DIR}/common/ATCS.jar" # Copy JAR to versioned name
|
||||||
|
|
||||||
if [ "$LINUX" = true ] ; then
|
# --- Create archive ---
|
||||||
cd ${PACKAGING_DIR}
|
if [ "$PLATFORM" = "LINUX" ]; then
|
||||||
|
cd "${OUTPUT_JAR_DIR}" || exit
|
||||||
echo "Creating archive"
|
echo "Creating archive"
|
||||||
tar caf "ATCS_${VERSION}.tar.gz" "common"
|
tar caf "ATCS_${VERSION}.tar.gz" common/* # archive the 'common' folder which now contains the JAR and libs
|
||||||
echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.tar.gz"
|
echo "Created archive at ${OUTPUT_JAR_DIR}/ATCS_${VERSION}.tar.gz"
|
||||||
|
cd "${PACKAGING_DIR}" || exit
|
||||||
else
|
else
|
||||||
echo "Can't create zip files on windows yet. Please pack the content of the '${PACKAGING_DIR}/common/' folder yourself"
|
echo "Can't create zip files on windows yet. Please pack the content of the '${OUTPUT_JAR_DIR}/common/' folder yourself"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Script finished."
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
atcs.spritesheet.actorconditions_1.category=actorcondition
|
atcs.spritesheet.actorconditions_1.category=actorcondition
|
||||||
atcs.spritesheet.actorconditions_2.category=actorcondition
|
atcs.spritesheet.actorconditions_2.category=actorcondition
|
||||||
atcs.spritesheet.actorconditions_japozero.category=actorcondition
|
atcs.spritesheet.actorconditions_japozero.category=actorcondition
|
||||||
|
atcs.spritesheet.actorconditions_newb.category=actorcondition
|
||||||
atcs.spritesheet.actorconditions_omi1.category=actorcondition
|
atcs.spritesheet.actorconditions_omi1.category=actorcondition
|
||||||
atcs.spritesheet.actorconditions_omi2.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_guynmart.category=monster
|
||||||
|
|
||||||
atcs.spritesheet.monsters_insects.category=monster
|
atcs.spritesheet.monsters_insects.category=monster
|
||||||
|
atcs.spritesheet.monsters_johny.category=monster
|
||||||
atcs.spritesheet.monsters_karvis1.category=monster
|
atcs.spritesheet.monsters_karvis1.category=monster
|
||||||
atcs.spritesheet.monsters_karvis2.category=monster
|
atcs.spritesheet.monsters_karvis2.category=monster
|
||||||
atcs.spritesheet.monsters_ld1.category=monster
|
atcs.spritesheet.monsters_ld1.category=monster
|
||||||
|
|||||||
6
src/META-INF/MANIFEST.MF
Normal file
6
src/META-INF/MANIFEST.MF
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Manifest-Version: 1.0
|
||||||
|
Main-Class: com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||||
|
Class-Path: jide-oss.jar jsoup-1.10.2.jar ui.jar junit-4.10.jar AndorsTr
|
||||||
|
ainer_v0.1.5.jar prefuse.jar rsyntaxtextarea.jar bsh-2.0b4.jar json_sim
|
||||||
|
ple-1.1.jar
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ import com.gpl.rpg.atcontentstudio.ui.WorkspaceSelector;
|
|||||||
public class ATContentStudio {
|
public class ATContentStudio {
|
||||||
|
|
||||||
public static final String APP_NAME = "Andor's Trail Content Studio";
|
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 CHECK_UPDATE_URL = "https://andorstrail.com/static/ATCS_latest";
|
||||||
public static final String DOWNLOAD_URL = "https://andorstrail.com/viewtopic.php?f=6&t=4806";
|
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) {
|
while ((inputLine = in.readLine()) != null) {
|
||||||
lastLine = inputLine;
|
lastLine = inputLine;
|
||||||
}
|
}
|
||||||
if (lastLine != null && !lastLine.equals(APP_VERSION)) {
|
if (lastLine != null && compareVersions(lastLine) < 0) {
|
||||||
|
|
||||||
// for copying style
|
// for copying style
|
||||||
JLabel label = new JLabel();
|
JLabel label = new JLabel();
|
||||||
Font font = label.getFont();
|
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 id; inherited.
|
||||||
public String icon_id;
|
public String icon_id;
|
||||||
public String display_name;
|
public String display_name;
|
||||||
|
public String description;
|
||||||
|
|
||||||
// Available from parsed state
|
// Available from parsed state
|
||||||
public ACCategory category = null;
|
public ACCategory category = null;
|
||||||
public Integer positive = null;
|
public Integer positive = null;
|
||||||
@@ -157,6 +158,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
@Override
|
@Override
|
||||||
public void parse(Map aCondJson) {
|
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"));
|
if (aCondJson.get("category") != null) this.category = ACCategory.valueOf((String) aCondJson.get("category"));
|
||||||
this.positive = JSONElement.getInteger((Number) aCondJson.get("isPositive"));
|
this.positive = JSONElement.getInteger((Number) aCondJson.get("isPositive"));
|
||||||
Map abilityEffect = (Map) aCondJson.get("abilityEffect");
|
Map abilityEffect = (Map) aCondJson.get("abilityEffect");
|
||||||
@@ -236,7 +238,12 @@ public class ActorCondition extends JSONElement {
|
|||||||
if (this.icon_id != null) {
|
if (this.icon_id != null) {
|
||||||
String spritesheetId = this.icon_id.split(":")[0];
|
String spritesheetId = this.icon_id.split(":")[0];
|
||||||
if (getProject().getSpritesheet(spritesheetId) == null) {
|
if (getProject().getSpritesheet(spritesheetId) == null) {
|
||||||
|
System.out.println("Actor Condition");
|
||||||
System.out.println(this.id);
|
System.out.println(this.id);
|
||||||
|
System.out.println("failed to load spritesheet:");
|
||||||
|
System.out.println(spritesheetId);
|
||||||
|
System.out.println("while creating backlink for icon_id:");
|
||||||
|
System.out.println(this.icon_id);
|
||||||
}
|
}
|
||||||
getProject().getSpritesheet(spritesheetId).addBacklink(this);
|
getProject().getSpritesheet(spritesheetId).addBacklink(this);
|
||||||
}
|
}
|
||||||
@@ -266,6 +273,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
clone.state = this.state;
|
clone.state = this.state;
|
||||||
clone.id = this.id;
|
clone.id = this.id;
|
||||||
clone.display_name = this.display_name;
|
clone.display_name = this.display_name;
|
||||||
|
clone.description = this.description;
|
||||||
clone.icon_id = this.icon_id;
|
clone.icon_id = this.icon_id;
|
||||||
clone.category = this.category;
|
clone.category = this.category;
|
||||||
clone.positive = this.positive;
|
clone.positive = this.positive;
|
||||||
@@ -294,6 +302,7 @@ public class ActorCondition extends JSONElement {
|
|||||||
jsonAC.put("id", this.id);
|
jsonAC.put("id", this.id);
|
||||||
if (this.icon_id != null) jsonAC.put("iconID", this.icon_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.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.category != null) jsonAC.put("category", this.category.toString());
|
||||||
if (this.positive != null && this.positive == 1) jsonAC.put("isPositive", this.positive);
|
if (this.positive != null && this.positive == 1) jsonAC.put("isPositive", this.positive);
|
||||||
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
if (this.stacking != null && this.stacking == 1) jsonAC.put("isStacking", this.stacking);
|
||||||
|
|||||||
@@ -39,14 +39,15 @@ public abstract class JSONElement extends GameDataElement {
|
|||||||
Map jsonObj = (Map)obj;
|
Map jsonObj = (Map)obj;
|
||||||
String id = (String) jsonObj.get("id");
|
String id = (String) jsonObj.get("id");
|
||||||
try {
|
try {
|
||||||
if (id != null && id.equals(this.id )) {
|
if (id != null && id.equals(this.id )) {
|
||||||
this.parse(jsonObj);
|
this.parse(jsonObj);
|
||||||
this.state = State.parsed;
|
this.state = State.parsed;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception e){
|
catch(Exception e){
|
||||||
System.out.println("Error in ID: " + id);
|
System.out.println("Error in ID: " + id);
|
||||||
|
System.out.println(e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (FileNotFoundException e) {
|
} catch (FileNotFoundException e) {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ public class PotGenerator {
|
|||||||
|
|
||||||
for (ActorCondition ac : gsrc.gameData.actorConditions) {
|
for (ActorCondition ac : gsrc.gameData.actorConditions) {
|
||||||
pushString(stringsResources, resourcesStrings, ac.display_name, getPotContextComment(ac));
|
pushString(stringsResources, resourcesStrings, ac.display_name, getPotContextComment(ac));
|
||||||
|
pushString(stringsResources, resourcesStrings, ac.description, getPotContextComment(ac)+":description");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Dialogue d : gsrc.gameData.dialogues ) {
|
for (Dialogue d : gsrc.gameData.dialogues ) {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
private JButton acIcon;
|
private JButton acIcon;
|
||||||
private JTextField idField;
|
private JTextField idField;
|
||||||
private JTextField nameField;
|
private JTextField nameField;
|
||||||
|
private JTextField descriptionField;
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
private JComboBox categoryBox;
|
private JComboBox categoryBox;
|
||||||
private IntegerBasedCheckBox positiveBox;
|
private IntegerBasedCheckBox positiveBox;
|
||||||
@@ -81,6 +82,7 @@ public class ActorConditionEditor extends JSONElementEditor {
|
|||||||
|
|
||||||
idField = addTextField(pane, "Internal ID: ", ac.id, ac.writable, listener);
|
idField = addTextField(pane, "Internal ID: ", ac.id, ac.writable, listener);
|
||||||
nameField = addTranslatableTextField(pane, "Display name: ", ac.display_name, 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);
|
categoryBox = addEnumValueBox(pane, "Category: ", ActorCondition.ACCategory.values(), ac.category, ac.writable, listener);
|
||||||
positiveBox = addIntegerBasedCheckBox(pane, "Positive", ac.positive, ac.writable, listener);
|
positiveBox = addIntegerBasedCheckBox(pane, "Positive", ac.positive, ac.writable, listener);
|
||||||
stackingBox = addIntegerBasedCheckBox(pane, "Stacking", ac.stacking, 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();
|
ActorConditionEditor.this.name = aCond.getDesc();
|
||||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||||
ATContentStudio.frame.editorChanged(ActorConditionEditor.this);
|
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) {
|
} else if (source == acIcon) {
|
||||||
aCond.icon_id = (String) value;
|
aCond.icon_id = (String) value;
|
||||||
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
aCond.childrenChanged(new ArrayList<ProjectTreeNode>());
|
||||||
|
|||||||
Reference in New Issue
Block a user