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 |
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -16,8 +16,8 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Reading version from file:"
|
||||
cat packaging/ATCS_latest
|
||||
VERSION=$(cat packaging/ATCS_latest)
|
||||
cat res/ATCS_latest
|
||||
VERSION=$(cat res/ATCS_latest)
|
||||
echo "Processed version: $VERSION"
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
echo "Environment variable set to: $VERSION"
|
||||
|
||||
@@ -18,7 +18,7 @@ ATCS_SOURCE_DIR=$(dirname "${PACKAGING_DIR}")
|
||||
TEMP_DIR="${PACKAGING_DIR}/tmp"
|
||||
JAR_LOCATION="${PACKAGING_DIR}/ATCS.jar" # Output JAR location as per script
|
||||
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
|
||||
LIB_BASE_DIR="${ATCS_SOURCE_DIR}/lib" # Base directory for libraries
|
||||
|
||||
@@ -84,6 +84,7 @@ mkdir -p "${TEMP_DIR}/com/gpl/rpg/atcontentstudio/img"
|
||||
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}"/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 ---
|
||||
echo ""
|
||||
|
||||
@@ -14,11 +14,7 @@ import java.io.InputStreamReader;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -42,8 +38,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.21";
|
||||
|
||||
public static final String APP_VERSION = readVersionFromFile();
|
||||
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";
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user