Skip to content

Commit

Permalink
Release 1.12.1.15 !
Browse files Browse the repository at this point in the history
  • Loading branch information
tommyettinger committed Sep 13, 2024
1 parent a87fb7a commit 1d23e7a
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 17 deletions.
54 changes: 47 additions & 7 deletions Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This is organized as a list of possible messages or signs there is a problem,
followed by any ways that help resolve those problems.

This guide is brand new, and will be added to as new solutions are found for problems.
This guide is a little new, and will be added to as new solutions are found for problems.

### First things first, make sure you're using Java 17 or newer.

Expand Down Expand Up @@ -299,20 +299,60 @@ more modern than the rather old NFD version we were using.

### The native distributions for macOS won't run how they should!

First off, if you can run a .jar file normally, you should try that before any of the following steps. The runnable .jar
file is always provided with Liftoff releases. The native distribution is meant for cases when you don't have a JDK
installed at the system level (such as if your IDE has its own JDK, and you haven't added one).

This is a bit of a tricky issue, because the native distributions are built (currently) on Windows 11, which doesn't
have the same ways it can mark files as macOS. However, once you have downloaded the macOS M1 or macOS x64 distribution,
you can (on macOS) run these two commands from the same directory as `gdx-liftoff.app` :
have the same ways it can mark files as macOS. Liftoff version 1.12.1.15 and newer does mark the right file as
executable, but still has to deal with how macOS browsers like to put downloaded files in "quarantine."
Once you have downloaded the macOS M1 or macOS x64 distribution, you can (on macOS) run this command from the same
directory as `gdx-liftoff.app` :

```
xattr -cr gdx-liftoff.app
chmod +x gdx-liftoff.app/Contents/MacOS/gdx-liftoff
```

After running those two commands, the .app should be normally runnable via double-click.
This removes `gdx-liftoff.app` from quarantine. After running that command, the .app should be normally runnable via
double-click. If that doesn't work, you may have an older Liftoff distribution (1.12.1.14 or older), which if you need
to use that version for some reason, needs an extra step after the above one:

```
chmod +x gdx-liftoff.app/Contents/MacOS/gdx-liftoff
```

These were found by JojoIce in [this issue thread](https://github.com/libgdx/gdx-liftoff/issues/194#issuecomment-2299071552);
more future discoveries could be in that thread or in other issues. As far as I can tell, the first command clears any
attributes on the downloaded `.app`, which removes any quarantine settings, and the second command sets the entry point
inside the `.app` to be executable. Since the quarantine settings are applied to the .app when it is downloaded, there
inside the `.app` to be executable. The second command isn't needed anymore thanks to changes in Liftoff 1.12.1.15,
which uses construo 1.4.1 . Since the quarantine settings are applied to the .app when it is downloaded, there
isn't really any change that could be made to how Liftoff is built that would make it somehow avoid being quarantined.
If there is something out there, please post an issue and let us know about it!
The only ways I know of that handle quarantine settings are to a) download gdx-liftoff.app via a tool such as curl, or
b) download it however you want and use the above `xattr` command to remove the file from quarantine. Using curl will
simply not apply quarantine to any files it downloads, but I haven't used it in a while (and never on recent macOS), so
the exact command-line syntax is something you'd have to look up.

### Weird Gradle issues with "Cannot call Task.usesService(Provider)..."

These have been reported intermittently with Gradle 8.10.1, which Liftoff 1.12.1.15 (and possibly newer) uses, but that
version of Liftoff also includes one of the recommended workarounds for that Gradle version - disabling Gradle's daemon
service. It is entirely likely that the way the daemon is disabled might not work, because Gradle really likes to try to
use the daemon even when it is broken. Disabling the daemon doesn't appear to have much performance impact, especially
since Gradle 8.10.1 is mostly meant to fix a performance regression in Gradle 8.10, and so could be faster either with
or without the daemon. If you are encountering this, you should downgrade Gradle to 8.10:

- Open the file `gradle/wrapper/gradle-wrapper.properties` in your project.
- Find where it has the version string `8.10.1` ; this is on a line that starts with `distributionUrl` .
- Change `8.10.1` to `8.10` .
- Save and reload your Gradle project.
- If you don't know how to reload your Gradle project, it is done automatically by Android Studio, so you don't need
to do anything but save there. Otherwise, in IDEA:
- Click the sideways `Gradle` tab on the right side of the window.
- Click the two circling arrows ("Reload All Gradle Projects") in the pane that appears.
- This clears out most IDE-specific configuration you may have done via "Project Structure"; that configuration is
meant to be controlled by Gradle, so Gradle changes will take priority. Usually Project Structure changes beyond the
JDK setting aren't needed, and the JDK settings won't be cleared out.

At some point in the near future, you could upgrade Gradle to 8.10.2 instead, but that hasn't been released yet. When it
does release, the steps will be the same as above, just that you would change to "8.10.2" instead of "8.10" . The
version might also be called "8.11" . Gradle 9.0 is expected to have at least some breaking changes, however.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,27 +109,27 @@ construo {
targets.configure {
create("linuxX64", Target.Linux) {
architecture.set(Target.Architecture.X86_64)
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_linux_hotspot_17.0.11_9.tar.gz")
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_linux_hotspot_17.0.12_7.tar.gz")
}
create("macM1", Target.MacOs) {
architecture.set(Target.Architecture.AARCH64)
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.11_9.tar.gz")
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_aarch64_mac_hotspot_17.0.12_7.tar.gz")
// macOS needs an identifier
identifier.set("com.libgdx.liftoff." + appName)
// Optional: icon for macOS
macIcon.set(project.file("icons/logo.icns"))
}
create("macX64", Target.MacOs) {
architecture.set(Target.Architecture.X86_64)
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_mac_hotspot_17.0.11_9.tar.gz")
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_mac_hotspot_17.0.12_7.tar.gz")
// macOS needs an identifier
identifier.set("com.libgdx.liftoff." + appName)
// Optional: icon for macOS
macIcon.set(project.file("icons/logo.icns"))
}
create("winX64", Target.Windows) {
architecture.set(Target.Architecture.X86_64)
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.11%2B9/OpenJDK17U-jdk_x64_windows_hotspot_17.0.11_9.zip")
jdkUrl.set("https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.12%2B7/OpenJDK17U-jdk_x64_windows_hotspot_17.0.12_7.zip")
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
liftoffVersion=1.12.1.14-SNAPSHOT
org.gradle.daemon=false
#org.gradle.jvmargs=-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8
org.gradle.jvmargs=-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8
liftoffVersion=1.12.1.15
#kotlinVersion=1.9.25
kotlinVersion=2.0.20
gdxVersion=1.12.1
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/gdx/liftoff/config/Configuration.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import gdx.liftoff.views.widgets.ScrollableTextArea
@Suppress("unused") // Fields accessed via reflection.
class Configuration {
companion object {
const val VERSION = "1.12.1.14-SNAPSHOT"
const val VERSION = "1.12.1.15"
const val WIDTH = 600
const val HEIGHT = 700
const val PREFERENCES_PATH = "gdx-liftoff-prefs"
Expand Down
2 changes: 1 addition & 1 deletion src/main/kotlin/gdx/liftoff/data/project/Project.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Project(
val rootGradle: RootGradleFile
val properties = mutableMapOf(
"org.gradle.daemon" to "false",
// "org.gradle.jvmargs" to "-Xms512M -Xmx1G",
"org.gradle.jvmargs" to "-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8",
"org.gradle.configureondemand" to "false"
)
val gwtInherits = mutableSetOf<String>()
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/ui-data/defaults.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
liftoffVersion=1.12.1.14-SNAPSHOT
liftoffVersion=1.12.1.15
projectNameDefault=YourProjectName
packageNameDefault=io.github.some_example_name
mainClassNameDefault=Main
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.12.1.14
1.12.1.15

0 comments on commit 1d23e7a

Please sign in to comment.