mirror of
https://github.com/OMGeeky/ATCS.git
synced 2025-12-26 23:57:25 +01:00
Compare commits
4 Commits
v0.6.21-pr
...
v0.6.21-pr
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ff45746d8 | ||
|
|
f14d21e322 | ||
|
|
c9cccf9eb2 | ||
|
|
5191f56a01 |
6
.gitattributes
vendored
6
.gitattributes
vendored
@@ -1,6 +0,0 @@
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
* text=auto
|
||||
|
||||
# Force bash scripts to always use LF line endings so that if a repo is accessed
|
||||
# in Unix via a file share from Windows, the scripts will work.
|
||||
*.sh text eol=lf
|
||||
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@@ -17,8 +17,7 @@ jobs:
|
||||
run: |
|
||||
echo "Reading version from file:"
|
||||
cat res/ATCS_latest
|
||||
echo ""
|
||||
VERSION=$(tr -d '[:space:]' < "res/ATCS_latest")
|
||||
VERSION=$(cat res/ATCS_latest)
|
||||
echo "Processed version: $VERSION"
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "Environment variable set to: $VERSION"
|
||||
@@ -27,7 +26,7 @@ jobs:
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'temurin'
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: Build JAR
|
||||
shell: bash
|
||||
@@ -42,6 +41,8 @@ jobs:
|
||||
|
||||
- name: Install NSIS
|
||||
uses: joncloud/makensis-action@v4
|
||||
env:
|
||||
VERSION: ${{ env.VERSION }}
|
||||
with:
|
||||
script-file: packaging/Windows/ATCS_Installer.nsi
|
||||
arguments: /DVERSION="${{ env.VERSION }}"
|
||||
|
||||
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_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
|
||||
<component name="ProjectRootManager" version="2" default="true" />
|
||||
</project>
|
||||
@@ -98,11 +98,7 @@ public class TileSet implements Iterable<Tile>
|
||||
|
||||
File f = new File(imgFilename);
|
||||
|
||||
BufferedImage image;
|
||||
try {
|
||||
image = ImageIO.read(f.getCanonicalFile());
|
||||
} catch (IOException e) { throw new IOException("Failed to load " + imgFilename);
|
||||
}
|
||||
BufferedImage image = ImageIO.read(f.getCanonicalFile());
|
||||
if (image == null) {
|
||||
throw new IOException("Failed to load " + imgFilename);
|
||||
}
|
||||
|
||||
2
packaging/Linux/.gitignore
vendored
Normal file
2
packaging/Linux/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/ATCS_v*.zip
|
||||
/ATCS_v*.zip.rename
|
||||
20
packaging/Linux/ATCS/ATCS.cmd
Normal file
20
packaging/Linux/ATCS/ATCS.cmd
Normal file
@@ -0,0 +1,20 @@
|
||||
@echo off
|
||||
|
||||
set "ATCS_DIR=%~dp0"
|
||||
set "MAX_MEM=512M"
|
||||
set "CP=%ATCS_DIR%lib\*"
|
||||
set "JAVA=javaw.exe"
|
||||
set "JAVA_OPTS=-DFONT_SCALE=1.0 -Dswing.aatext=true"
|
||||
set "ENV_FILE=%ATCS_DIR%ATCS.env.bat"
|
||||
set "MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio"
|
||||
|
||||
if exist "%ENV_FILE%" (
|
||||
call "%ENV_FILE%"
|
||||
) else (
|
||||
echo REM set "MAX_MEM=%MAX_MEM%">"%ENV_FILE%"
|
||||
echo REM set "JAVA=%JAVA%">>"%ENV_FILE%"
|
||||
echo REM set "JAVA_OPTS=%JAVA_OPTS%">>"%ENV_FILE%"
|
||||
echo.>>"%ENV_FILE%"
|
||||
)
|
||||
|
||||
start "" "%JAVA%" %JAVA_OPTS% -Xmx%MAX_MEM% -cp "%CP%" %MAIN_CLASS%
|
||||
BIN
packaging/Linux/ATCS/ATCS.ico
Normal file
BIN
packaging/Linux/ATCS/ATCS.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 24 KiB |
22
packaging/Linux/ATCS/ATCS.sh
Normal file
22
packaging/Linux/ATCS/ATCS.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
ATCS_DIR=$(dirname $(readlink -f "$0" || greadlink -f "$0" || stat -f "$0"))
|
||||
MAX_MEM=512M
|
||||
CP=$(find ${ATCS_DIR}/lib/ -name '*.jar' | paste -sd: -)
|
||||
JAVA=java
|
||||
JAVA_OPTS='-DFONT_SCALE=1.0 -Dswing.aatext=true'
|
||||
ENV_FILE=${ATCS_DIR}/ATCS.env
|
||||
MAIN_CLASS=com.gpl.rpg.atcontentstudio.ATContentStudio
|
||||
|
||||
if [ -f ${ENV_FILE} ]
|
||||
then
|
||||
source ${ENV_FILE}
|
||||
else
|
||||
echo "#MAX_MEM=${MAX_MEM}" > ${ENV_FILE}
|
||||
echo "#JAVA=${JAVA}" >> ${ENV_FILE}
|
||||
echo "#JAVA_OPTS=${JAVA_OPTS}" >> ${ENV_FILE}
|
||||
echo "" >> ${ENV_FILE}
|
||||
fi
|
||||
|
||||
export ENV_FILE
|
||||
|
||||
$JAVA ${JAVA_OPTS} -Xmx${MAX_MEM} -cp ${CP} ${MAIN_CLASS}
|
||||
1
packaging/Linux/ATCS/lib/.gitignore
vendored
Normal file
1
packaging/Linux/ATCS/lib/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/*.jar
|
||||
@@ -1,26 +1,21 @@
|
||||
#!/bin/bash
|
||||
ATCS_DIR="$(dirname "$(readlink -f "$0" || greadlink -f "$0" || stat -f "$0")")"
|
||||
echo "ATCS_DIR: '${ATCS_DIR}'"
|
||||
ATCS_DIR=$(dirname $(readlink -f "$0" || greadlink -f "$0" || stat -f "$0"))
|
||||
|
||||
MAX_MEM="512M"
|
||||
JAVA="java"
|
||||
MAX_MEM=512M
|
||||
|
||||
JAVA=java
|
||||
JAVA_OPTS='-DFONT_SCALE=1.0 -Dswing.aatext=true'
|
||||
ENV_FILE=${ATCS_DIR}/ATCS.env
|
||||
|
||||
ENV_FILE="${ATCS_DIR}/ATCS.env"
|
||||
|
||||
if [ -f "${ENV_FILE}" ]; then
|
||||
source "${ENV_FILE}"
|
||||
if [ -f ${ENV_FILE} ]; then
|
||||
source ${ENV_FILE}
|
||||
else
|
||||
{
|
||||
echo "#MAX_MEM=\"${MAX_MEM}\""
|
||||
echo "#JAVA=\"${JAVA}\""
|
||||
echo "#JAVA_OPTS=\"${JAVA_OPTS}\""
|
||||
echo ""
|
||||
}>"${ENV_FILE}"
|
||||
echo "#MAX_MEM=${MAX_MEM}" >${ENV_FILE}
|
||||
echo "#JAVA=${JAVA}" >>${ENV_FILE}
|
||||
echo "#JAVA_OPTS=${JAVA_OPTS}" >>${ENV_FILE}
|
||||
echo "" >>${ENV_FILE}
|
||||
fi
|
||||
|
||||
export ENV_FILE
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
# (spellchecker is disabled for this line, because we want it to be split into multiple arguments)
|
||||
$JAVA ${JAVA_OPTS} -Xmx${MAX_MEM} -jar "${ATCS_DIR}/ATCS.jar"
|
||||
$JAVA ${JAVA_OPTS} -Xmx${MAX_MEM} -jar ${ATCS_DIR}/ATCS.jar
|
||||
|
||||
@@ -29,7 +29,7 @@ EXTRA_SOURCE_DIRS=(
|
||||
"siphash-zackehh/src/main/java"
|
||||
)
|
||||
|
||||
# --- Libraries to include ---
|
||||
# --- Libraries to include (from IntelliJ artifact definition) ---
|
||||
LIBRARIES=(
|
||||
"AndorsTrainer_v0.1.5.jar"
|
||||
"bsh-2.0b4.jar"
|
||||
@@ -44,7 +44,7 @@ LIBRARIES=(
|
||||
|
||||
# --- Get version ---
|
||||
echo "Getting version"
|
||||
VERSION=$(tr -d '[:space:]' < "${VERSION_FILE}")
|
||||
VERSION=$(cat "${VERSION_FILE}")
|
||||
echo "Got version ${VERSION}"
|
||||
|
||||
# --- Prepare temporary directory ---
|
||||
@@ -62,7 +62,7 @@ done
|
||||
|
||||
# --- Set ClassPath ---
|
||||
echo "Getting source files"
|
||||
# Find all java files in source directories
|
||||
# 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 ""
|
||||
@@ -70,8 +70,6 @@ echo ""
|
||||
# --- Build Java classes ---
|
||||
echo 'Building java classes'
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
# (we need word splitting here to pass multiple files)
|
||||
javac -cp "${TEMP_DIR}" -d "${TEMP_DIR}" ${SOURCE_FILES}
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Compilation failed. Please check errors above."
|
||||
@@ -117,10 +115,7 @@ else
|
||||
# Use zip command on Linux
|
||||
zip -r "ATCS_${VERSION}.zip" common/* # archive the 'common' folder which now contains the JAR and libs
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Archive creation failed."
|
||||
exit 1
|
||||
fi
|
||||
echo "Created archive at ${PACKAGING_DIR}/ATCS_${VERSION}.zip"
|
||||
cd "${PACKAGING_DIR}" || exit
|
||||
|
||||
echo "Script finished."
|
||||
|
||||
@@ -333,10 +333,6 @@ public class NPC extends JSONElement {
|
||||
}
|
||||
if (this.icon_id != null) {
|
||||
String spritesheetId = this.icon_id.split(":")[0];
|
||||
if (proj.getSpritesheet(spritesheetId) == null) {
|
||||
Notification.addError("Error Spritesheet "+id+". has no backlink.");
|
||||
return;
|
||||
}
|
||||
proj.getSpritesheet(spritesheetId).addBacklink(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user