mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-27 14:58:55 +01:00
Compare commits
36 Commits
build-scri
...
package-im
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8d9fdf717 | ||
|
|
caefca8885 | ||
|
|
1e0ee2ca1d | ||
|
|
1663cd713c | ||
|
|
814341a4d8 | ||
|
|
889a81c501 | ||
|
|
ccc56f0d3a | ||
|
|
a5492b16ac | ||
|
|
6686aa6c07 | ||
|
|
4390b730b4 | ||
|
|
ab8fd034e5 | ||
|
|
4fbf7de85a | ||
|
|
f0be1a8135 | ||
|
|
104d3db5ad | ||
|
|
f154efcecc | ||
|
|
00e9e3b2a7 | ||
|
|
92436d3ce9 | ||
|
|
b6cfe349c0 | ||
|
|
1e2daa56a4 | ||
|
|
2caaaeb474 | ||
|
|
0e8ed1a25d | ||
|
|
e2fdf08fec | ||
|
|
b5dceb9fd1 | ||
|
|
1555bd63db | ||
|
|
56fff8a730 | ||
|
|
dd7b3d5300 | ||
|
|
68affdde8c | ||
|
|
6cec8b835e | ||
|
|
aa43382296 | ||
|
|
ec346e9c98 | ||
|
|
61d5af822c | ||
|
|
c2d05b2bff | ||
|
|
6578236775 | ||
|
|
5550b257ca | ||
|
|
619aa1075f | ||
|
|
38a3ad85c8 |
57
.github/workflows/release.yml
vendored
Normal file
57
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: Release Build
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [created]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Get Version
|
||||||
|
id: get_version
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "Reading version from file:"
|
||||||
|
cat res/ATCS_latest
|
||||||
|
VERSION=$(cat res/ATCS_latest)
|
||||||
|
echo "Processed version: $VERSION"
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "Environment variable set to: $VERSION"
|
||||||
|
|
||||||
|
- name: Set up JDK
|
||||||
|
uses: actions/setup-java@v2
|
||||||
|
with:
|
||||||
|
java-version: '11'
|
||||||
|
distribution: 'temurin'
|
||||||
|
|
||||||
|
- name: Build JAR
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd packaging
|
||||||
|
chmod +x package.sh
|
||||||
|
echo "Building JAR and ZIP for version: ${{ env.VERSION }}"
|
||||||
|
./package.sh -windows
|
||||||
|
echo "Created artifacts:"
|
||||||
|
ls -la common/ATCS.jar
|
||||||
|
ls -la ATCS_${{ env.VERSION }}.zip
|
||||||
|
|
||||||
|
- name: Install NSIS
|
||||||
|
uses: joncloud/makensis-action@v4
|
||||||
|
env:
|
||||||
|
VERSION: ${{ env.VERSION }}
|
||||||
|
with:
|
||||||
|
script-file: packaging/Windows/ATCS_Installer.nsi
|
||||||
|
arguments: /DVERSION="${{ env.VERSION }}"
|
||||||
|
|
||||||
|
- name: Upload Release Assets
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
./packaging/ATCS_${{ env.VERSION }}.zip
|
||||||
|
./packaging/ATCS_${{ env.VERSION }}_Setup.exe
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -8,3 +8,6 @@ packaging/common/ATCS.jar
|
|||||||
packaging/ATCS_*.zip
|
packaging/ATCS_*.zip
|
||||||
ATCS_v*.tar.gz
|
ATCS_v*.tar.gz
|
||||||
ATCS.jar
|
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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<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>
|
</project>
|
||||||
@@ -1 +0,0 @@
|
|||||||
v0.6.19
|
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
!include MUI2.nsh
|
!include MUI2.nsh
|
||||||
|
|
||||||
!define VERSION "0.6.20"
|
; Version will be passed as /DVERSION=vx.x.x
|
||||||
!define TRAINER_VERSION "0.1.5"
|
!define TRAINER_VERSION "0.1.5"
|
||||||
!define JAVA_BIN "java"
|
!define JAVA_BIN "java"
|
||||||
|
!define ATCS_SOURCE_DIR "..\..\"
|
||||||
|
|
||||||
Name "Andor's Trail Content Studio v${VERSION}"
|
Name "Andor's Trail Content Studio ${VERSION}"
|
||||||
OutFile "ATCS_v${VERSION}_Setup.exe"
|
OutFile "..\ATCS_${VERSION}_Setup.exe"
|
||||||
InstallDir "$PROGRAMFILES\ATCS\"
|
InstallDir "$PROGRAMFILES\ATCS\"
|
||||||
|
|
||||||
;SetCompressor /SOLID /FINAL lzma
|
;SetCompressor /SOLID /FINAL lzma
|
||||||
@@ -13,10 +14,10 @@ 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 ${VERSION}"
|
||||||
!define MUI_FINISHPAGE_TEXT "Andor's Trail Content Studio v${VERSION} install completed !"
|
!define MUI_FINISHPAGE_TEXT "Andor's Trail Content Studio ${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 ${VERSION}"
|
||||||
|
|
||||||
|
|
||||||
;Start Menu Folder Page Configuration
|
;Start Menu Folder Page Configuration
|
||||||
@@ -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,96 +82,84 @@ 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"
|
||||||
|
|
||||||
!insertmacro MUI_STARTMENU_WRITE_END
|
!insertmacro MUI_STARTMENU_WRITE_END
|
||||||
|
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
|
|
||||||
|
;------------------------------------------------------------------------------------
|
||||||
Section uninstall
|
Section uninstall
|
||||||
|
|
||||||
Delete "$INSTDIR\lib\jide-oss.jar"
|
Delete "$INSTDIR\lib\jide-oss.jar"
|
||||||
Delete "$INSTDIR\lib\ui.jar"
|
Delete "$INSTDIR\lib\ui.jar"
|
||||||
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
|
||||||
|
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
||||||
Delete "$SMPROGRAMS\$StartMenuFolder\Andor's Trail Content Studio.lnk"
|
Delete "$SMPROGRAMS\$StartMenuFolder\Andor's Trail Content Studio.lnk"
|
||||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
||||||
|
|
||||||
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 ""
|
||||||
|
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ReadEnvStr $R0 "JAVA_HOME"
|
ReadEnvStr $R0 "JAVA_HOME"
|
||||||
StrCpy $R0 "$R0\bin\${JAVA_BIN}.exe"
|
StrCpy $R0 "$R0\bin\${JAVA_BIN}.exe"
|
||||||
IfErrors 0 JreFound
|
IfErrors 0 JreFound
|
||||||
|
|
||||||
ClearErrors
|
ClearErrors
|
||||||
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
|
ReadRegStr $R1 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" "CurrentVersion"
|
||||||
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
|
ReadRegStr $R0 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment\$R1" "JavaHome"
|
||||||
StrCpy $R0 "$R0\bin\${JAVA_BIN}.exe"
|
StrCpy $R0 "$R0\bin\${JAVA_BIN}.exe"
|
||||||
|
|
||||||
IfErrors 0 JreFound
|
IfErrors 0 JreFound
|
||||||
StrCpy $R0 "${JAVA_BIN}.exe"
|
StrCpy $R0 "${JAVA_BIN}.exe"
|
||||||
|
|
||||||
JreFound:
|
JreFound:
|
||||||
Pop $R1
|
Pop $R1
|
||||||
Exch $R0
|
Exch $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
|
|
||||||
|
|
||||||
@@ -18,10 +18,9 @@ ATCS_SOURCE_DIR=$(dirname "${PACKAGING_DIR}")
|
|||||||
TEMP_DIR="${PACKAGING_DIR}/tmp"
|
TEMP_DIR="${PACKAGING_DIR}/tmp"
|
||||||
JAR_LOCATION="${PACKAGING_DIR}/ATCS.jar" # Output JAR location as per script
|
JAR_LOCATION="${PACKAGING_DIR}/ATCS.jar" # Output JAR location as per script
|
||||||
MANIFEST_LOCATION="${PACKAGING_DIR}/Manifest.txt"
|
MANIFEST_LOCATION="${PACKAGING_DIR}/Manifest.txt"
|
||||||
VERSION_FILE="${PACKAGING_DIR}/ATCS_latest"
|
VERSION_FILE="${ATCS_SOURCE_DIR}/res/ATCS_latest"
|
||||||
SOURCE_BASE_DIR="${ATCS_SOURCE_DIR}/src" # Base directory for standard source code
|
SOURCE_BASE_DIR="${ATCS_SOURCE_DIR}/src" # Base directory for standard source code
|
||||||
LIB_BASE_DIR="${ATCS_SOURCE_DIR}/lib" # Base directory for libraries
|
LIB_BASE_DIR="${ATCS_SOURCE_DIR}/lib" # Base directory for libraries
|
||||||
OUTPUT_JAR_DIR="${PACKAGING_DIR}" # Directory where the final JAR will be placed - as per script
|
|
||||||
|
|
||||||
# --- **ADDITIONAL SOURCE CODE FOLDERS** ---
|
# --- **ADDITIONAL SOURCE CODE FOLDERS** ---
|
||||||
EXTRA_SOURCE_DIRS=(
|
EXTRA_SOURCE_DIRS=(
|
||||||
@@ -85,6 +84,7 @@ mkdir -p "${TEMP_DIR}/com/gpl/rpg/atcontentstudio/img"
|
|||||||
mkdir -p "${TEMP_DIR}/tiled/io/resources/"
|
mkdir -p "${TEMP_DIR}/tiled/io/resources/"
|
||||||
cp -r "${ATCS_SOURCE_DIR}"/src/com/gpl/rpg/atcontentstudio/img/* "${TEMP_DIR}/com/gpl/rpg/atcontentstudio/img/" # some icons
|
cp -r "${ATCS_SOURCE_DIR}"/src/com/gpl/rpg/atcontentstudio/img/* "${TEMP_DIR}/com/gpl/rpg/atcontentstudio/img/" # some icons
|
||||||
cp -r "${ATCS_SOURCE_DIR}"/hacked-libtiled/tiled/io/resources/* "${TEMP_DIR}/tiled/io/resources/" # dtd file for tmx maps
|
cp -r "${ATCS_SOURCE_DIR}"/hacked-libtiled/tiled/io/resources/* "${TEMP_DIR}/tiled/io/resources/" # dtd file for tmx maps
|
||||||
|
cp "${VERSION_FILE}" "${TEMP_DIR}/" # Copy version file
|
||||||
|
|
||||||
# --- Create JAR file ---
|
# --- Create JAR file ---
|
||||||
echo ""
|
echo ""
|
||||||
@@ -103,17 +103,19 @@ cd "${PACKAGING_DIR}" || exit # Go back to packaging dir
|
|||||||
|
|
||||||
echo ''
|
echo ''
|
||||||
echo "Done creating jar at ${JAR_LOCATION}"
|
echo "Done creating jar at ${JAR_LOCATION}"
|
||||||
cp -f "${JAR_LOCATION}" "${OUTPUT_JAR_DIR}/common/ATCS.jar" # Copy JAR to versioned name
|
cp -f "${JAR_LOCATION}" "${PACKAGING_DIR}/common/ATCS.jar" # Copy JAR to versioned name
|
||||||
|
|
||||||
# --- Create archive ---
|
# --- Create archive ---
|
||||||
if [ "$PLATFORM" = "LINUX" ]; then
|
cd "${PACKAGING_DIR}" || exit
|
||||||
cd "${OUTPUT_JAR_DIR}" || exit
|
echo "Creating archive"
|
||||||
echo "Creating archive"
|
if [ "$PLATFORM" = "WINDOWS" ]; then
|
||||||
tar caf "ATCS_${VERSION}.tar.gz" common/* # archive the 'common' folder which now contains the JAR and libs
|
# Use PowerShell's Compress-Archive which is available by default on Windows
|
||||||
echo "Created archive at ${OUTPUT_JAR_DIR}/ATCS_${VERSION}.tar.gz"
|
powershell.exe -Command "Compress-Archive -Path './common/*' -DestinationPath './ATCS_${VERSION}.zip' -Force"
|
||||||
cd "${PACKAGING_DIR}" || exit
|
|
||||||
else
|
else
|
||||||
echo "Can't create zip files on windows yet. Please pack the content of the '${OUTPUT_JAR_DIR}/common/' folder yourself"
|
# Use zip command on Linux
|
||||||
|
zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs
|
||||||
fi
|
fi
|
||||||
|
echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.zip"
|
||||||
|
cd "${PACKAGING_DIR}" || exit
|
||||||
|
|
||||||
echo "Script finished."
|
echo "Script finished."
|
||||||
|
|||||||
1
res/ATCS_latest
Normal file
1
res/ATCS_latest
Normal file
@@ -0,0 +1 @@
|
|||||||
|
v0.6.21
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -14,11 +14,7 @@ import java.io.InputStreamReader;
|
|||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Enumeration;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -42,8 +38,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 = readVersionFromFile();
|
||||||
|
|
||||||
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";
|
||||||
|
|
||||||
@@ -231,4 +226,13 @@ public class ATContentStudio {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private static String readVersionFromFile() {
|
||||||
|
try (BufferedReader reader = new BufferedReader(new InputStreamReader(
|
||||||
|
Objects.requireNonNull(ATContentStudio.class.getResourceAsStream("/ATCS_latest"))))) {
|
||||||
|
return reader.readLine();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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");
|
||||||
@@ -271,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;
|
||||||
@@ -299,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);
|
||||||
|
|||||||
@@ -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