mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
update version code, remove redundant CURRENT_VERSION
This commit is contained in:
2
.github/workflows/snapshots-android.yml
vendored
2
.github/workflows/snapshots-android.yml
vendored
@@ -89,7 +89,7 @@ jobs:
|
||||
- name: Build/Install/Publish to GitHub Packages Apache Maven
|
||||
run: |
|
||||
export _JAVA_OPTIONS="-Xmx2g"
|
||||
d=$(date +%m-%d)
|
||||
d=$(date +%m.%d)
|
||||
# Replace date in forge-gui-mobile/src/forge/Forge.java
|
||||
# sed -i -e "s/-SNAPSHOT/-SNAPSHOT-${d}/g" forge-gui-mobile/src/forge/Forge.java
|
||||
mvn -U -B -P android-release-build install -e -Dcardforge-repo.username=${{ secrets.FTP_USERNAME }} -Dcardforge-repo.password=${{ secrets.FTP_PASSWORD }} -Dandroid.sdk.path=/usr/local/lib/android/sdk -Dandroid.buildToolsVersion=35.0.0 -Dmaven.test.skip=true
|
||||
|
||||
@@ -288,7 +288,7 @@ public class Main extends ForgeAndroidApplication {
|
||||
private void loadGame(final String title, final String steps, boolean isLandscape, AndroidAdapter adapter, boolean permissiongranted, int totalRAM, boolean isTabletDevice, AndroidApplicationConfiguration config, boolean exception, String msg) {
|
||||
try {
|
||||
forgeLogo = findViewById(getResources().getIdentifier("logo_id", "id", getPackageName()));
|
||||
forgeView = initializeForView(Forge.getApp(getAndroidClipboard(), adapter, ASSETS_DIR, false, !isLandscape, totalRAM, isTabletDevice, Build.VERSION.SDK_INT, Build.VERSION.RELEASE, getDeviceName(), versionString), config);
|
||||
forgeView = initializeForView(Forge.getApp(getAndroidClipboard(), adapter, ASSETS_DIR, false, !isLandscape, totalRAM, isTabletDevice, Build.VERSION.SDK_INT, Build.VERSION.RELEASE, getDeviceName()), config);
|
||||
getAnimator(ObjectAnimator.ofFloat(forgeLogo, "alpha", 0f, 1f).setDuration(1800), null, new AnimatorListenerAdapter() {
|
||||
@Override
|
||||
public void onAnimationEnd(Animator animation) {
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Main extends IOSApplication.Delegate {
|
||||
final IOSApplicationConfiguration config = new IOSApplicationConfiguration();
|
||||
config.useAccelerometer = false;
|
||||
config.useCompass = false;
|
||||
final ApplicationListener app = Forge.getApp(new IOSClipboard(), new IOSAdapter(), assetsDir, false, false, 0, false, 0, "", "", "0.0");
|
||||
final ApplicationListener app = Forge.getApp(new IOSClipboard(), new IOSAdapter(), assetsDir, false, false, 0, false, 0, "", "");
|
||||
final IOSApplication iosApp = new IOSApplication(app, config);
|
||||
return iosApp;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public class GameLauncher {
|
||||
Lwjgl3ApplicationConfiguration config = new Lwjgl3ApplicationConfiguration();
|
||||
config.setResizable(false);
|
||||
ApplicationListener start = Forge.getApp(new Lwjgl3Clipboard(), new Main.DesktopAdapter(switchOrientationFile),//todo get totalRAM && isTabletDevice
|
||||
desktopMode ? desktopModeAssetsDir : assetsDir, false, false, 0, false, 0, "", "", versionString);
|
||||
desktopMode ? desktopModeAssetsDir : assetsDir, false, false, 0, false, 0, "", "");
|
||||
if (Config.instance().getSettingData().fullScreen) {
|
||||
config.setFullscreenMode(Lwjgl3ApplicationConfiguration.getDisplayMode());
|
||||
config.setAutoIconify(true);
|
||||
|
||||
@@ -54,8 +54,6 @@ import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
|
||||
public class Forge implements ApplicationListener {
|
||||
public static String CURRENT_VERSION = "0.0";
|
||||
|
||||
private static ApplicationListener app = null;
|
||||
static Scene currentScene = null;
|
||||
static Array<Scene> lastScene = new Array<>();
|
||||
@@ -127,11 +125,10 @@ public class Forge implements ApplicationListener {
|
||||
public static boolean createNewAdventureMap = false;
|
||||
private static Localizer localizer;
|
||||
|
||||
public static ApplicationListener getApp(Clipboard clipboard0, IDeviceAdapter deviceAdapter0, String assetDir0, boolean propertyConfig, boolean androidOrientation, int totalRAM, boolean isTablet, int AndroidAPI, String AndroidRelease, String deviceName, String versionString) {
|
||||
public static ApplicationListener getApp(Clipboard clipboard0, IDeviceAdapter deviceAdapter0, String assetDir0, boolean propertyConfig, boolean androidOrientation, int totalRAM, boolean isTablet, int AndroidAPI, String AndroidRelease, String deviceName) {
|
||||
if (app == null) {
|
||||
app = new Forge();
|
||||
if (GuiBase.getInterface() == null) {
|
||||
CURRENT_VERSION = versionString;
|
||||
clipboard = clipboard0;
|
||||
deviceAdapter = deviceAdapter0;
|
||||
GuiBase.setUsingAppDirectory(assetDir0.contains("forge.app")); //obb directory on android uses the package name as entrypoint
|
||||
|
||||
@@ -54,7 +54,7 @@ public class GuiMobile implements IGuiBase {
|
||||
|
||||
@Override
|
||||
public String getCurrentVersion() {
|
||||
return Forge.CURRENT_VERSION;
|
||||
return Forge.getDeviceAdapter().getVersionString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,7 @@ public class StartScene extends UIScene {
|
||||
private static StartScene object;
|
||||
Dialog exitDialog, backupDialog, zipDialog, unzipDialog;
|
||||
TextraButton saveButton, resumeButton, continueButton;
|
||||
TypingLabel version = Controls.newTypingLabel("{GRADIENT}[%80]" + Forge.CURRENT_VERSION + "{ENDGRADIENT}");
|
||||
TypingLabel version = Controls.newTypingLabel("{GRADIENT}[%80]v." + Forge.getDeviceAdapter().getVersionString() + "{ENDGRADIENT}");
|
||||
|
||||
|
||||
public StartScene() {
|
||||
|
||||
@@ -157,7 +157,7 @@ public class SplashScreen extends FContainer {
|
||||
float w2 = Forge.isLandscapeMode() ? Forge.getScreenWidth() / 2f : Forge.getScreenHeight() / 2f;
|
||||
float h2 = 57f / 450f * (w2/2);
|
||||
|
||||
String version = "v. " + Forge.CURRENT_VERSION;
|
||||
String version = "v." + Forge.getDeviceAdapter().getVersionString();
|
||||
g.drawText(version, disclaimerFont, FProgressBar.SEL_FORE_COLOR, x, getHeight() - disclaimerHeight, w, disclaimerHeight, false, Align.center, true);
|
||||
progressBar.setBounds((Forge.getScreenWidth() - w2)/2, Forge.getScreenHeight() - h2 * 2f, w2, h2);
|
||||
g.draw(progressBar);
|
||||
@@ -381,7 +381,7 @@ public class SplashScreen extends FContainer {
|
||||
progressBar.setBounds(x + padding, y, w - 2 * padding, pbHeight);
|
||||
g.draw(progressBar);
|
||||
|
||||
String version = "v. " + Forge.CURRENT_VERSION;
|
||||
String version = "v." + Forge.getDeviceAdapter().getVersionString();
|
||||
g.drawText(version, disclaimerFont, FProgressBar.SEL_FORE_COLOR, x, getHeight() - disclaimerHeight, w, disclaimerHeight, false, Align.center, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user