Skip to content

Commit

Permalink
It looks like Liftoff can update to 1.13.0 if...
Browse files Browse the repository at this point in the history
... We remove all Windows x86 .dll files from the JAR. VirusTotal results: no baddies! https://www.virustotal.com/gui/file/92a0c4f1f9d829ee759f7691601bd1840d1ca1092028307cdec4eb3e079691fa?nocache=1
I would need to apply similar changes to generated LWJGL3 projects, though, which would make them harder to read.
  • Loading branch information
tommyettinger committed Nov 20, 2024
1 parent b91e9a8 commit e88c927
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 68 deletions.
131 changes: 70 additions & 61 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ jar {
archiveFileName.set(jarName)
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
from { configurations.compileClasspath.collect { it.isDirectory() ? it : zipTree(it) } }
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA')
exclude('META-INF/INDEX.LIST', 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA',
'gdx.dll')
dependencies {
exclude('META-INF/INDEX.LIST', 'META-INF/maven/**')
}
Expand All @@ -69,11 +70,12 @@ dependencies {
implementation ("com.badlogicgames.gdx:gdx-backend-lwjgl3:$gdxVersion"){
exclude group: "org.jcraft", module: "jorbis"
exclude group: "org.lwjgl", module: "lwjgl-openal"
//
// exclude group: 'org.lwjgl', module: 'lwjgl-glfw'
// exclude group: 'org.lwjgl', module: 'lwjgl-opengl'
// exclude group: 'org.lwjgl', module: 'lwjgl-stb'
// exclude group: 'org.lwjgl', module: 'lwjgl'

exclude group: 'org.lwjgl', module: 'lwjgl-glfw'
exclude group: 'org.lwjgl', module: 'lwjgl-opengl'
exclude group: 'org.lwjgl', module: 'lwjgl-stb'
exclude group: 'org.lwjgl', module: 'lwjgl'
exclude group: 'org.lwjgl', module: 'lwjgl-jemalloc'
}
implementation "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
implementation "com.crashinvaders.lml:gdx-kiwi:$lmlVersion"
Expand All @@ -89,68 +91,75 @@ dependencies {



// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version"
//// Linux //
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-linux"
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-linux-arm32"
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-linux-arm64"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-linux"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-linux-arm32"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-linux-arm64"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-linux"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-linux-arm32"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-linux-arm64"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-linux"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-linux-arm32"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-linux-arm64"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-linux"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-linux-arm32"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-linux-arm64"
//
// // MacOS //
//
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-macos"
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-macos-arm64"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-macos"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-macos-arm64"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-macos"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-macos-arm64"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-macos"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-macos-arm64"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-macos"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-macos-arm64"
//
//
// // Windows //
//
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-windows"
implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version"
implementation "org.lwjgl:lwjgl:$lwjgl3Version"
// Linux //
implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version:natives-linux"
implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version:natives-linux-arm32"
implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version:natives-linux-arm64"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-linux"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-linux-arm32"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-linux-arm64"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-linux"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-linux-arm32"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-linux-arm64"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-linux"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-linux-arm32"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-linux-arm64"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-linux"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-linux-arm32"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-linux-arm64"
implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-linux"
implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-linux-arm32"
implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-linux-arm64"

// MacOS //

implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version:natives-macos"
implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version:natives-macos-arm64"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-macos"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-macos-arm64"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-macos"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-macos-arm64"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-macos"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-macos-arm64"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-macos"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-macos-arm64"
implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-macos"
implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-macos-arm64"


// Windows //

implementation "org.lwjgl:lwjgl-jemalloc:$lwjgl3Version:natives-windows"
implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-windows"
implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-windows"
implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-windows"
implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-windows"
implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-windows"
// implementation "org.lwjgl:lwjgl-glfw:$lwjgl3Version:natives-windows-x86"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-windows"
// implementation "org.lwjgl:lwjgl-openal:$lwjgl3Version:natives-windows-x86"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-windows"
// implementation "org.lwjgl:lwjgl-opengl:$lwjgl3Version:natives-windows-x86"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-windows"
// implementation "org.lwjgl:lwjgl-stb:$lwjgl3Version:natives-windows-x86"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-windows"
// implementation "org.lwjgl:lwjgl:$lwjgl3Version:natives-windows-x86"

// implementation "org.lwjgl:lwjgl-nfd:$nfdVersion"
// implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows"
implementation "org.lwjgl:lwjgl-nfd:$nfdVersion"
implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows"
// implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows-x86"
// implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-linux"
// implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos"
// implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos-arm64"

implementation("org.lwjgl:lwjgl-nfd:$nfdVersion"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows-x86"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-linux"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos-arm64"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-linux"
implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos"
implementation "org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos-arm64"

// implementation("org.lwjgl:lwjgl-nfd:$nfdVersion"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
// implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
// implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-windows-x86"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
// implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-linux"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
// implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos"){ exclude group: 'org.lwjgl', module: 'lwjgl' }
// implementation("org.lwjgl:lwjgl-nfd:$nfdVersion:natives-macos-arm64"){ exclude group: 'org.lwjgl', module: 'lwjgl' }


// necessary because the current gdx-autumn-desktop-fcs has an implementation dep on this, and we need it here.
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ org.gradle.daemon=false
org.gradle.jvmargs=-Xms512M -Xmx1G -Dfile.encoding=UTF-8 -Dconsole.encoding=UTF-8
liftoffVersion=1.13.0.2-SNAPSHOT
kotlinVersion=2.0.21
gdxVersion=1.12.1
gdxVersion=1.13.0
lmlVersion=1.10.1.12.1
#visUiVersion=1.5.3
visUiVersion=1aef382077
commonsExecVersion=1.3
lwjgl3Version=3.3.3
nfdVersion=3.3.1
lwjgl3Version=3.3.4
nfdVersion=3.3.4
iconizerVersion=0.1.0
6 changes: 4 additions & 2 deletions src/main/java/gdx/liftoff/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,11 @@ public static void pickDirectory(FileHandle initialFolder, FileChooserAdapter ca
initialPath = initialPath.replace("/", "\\");
}

NativeFileDialog.NFD_Init();
PointerBuffer pathPointer = memAllocPointer(1);

try {
int status = NativeFileDialog.NFD_PickFolder(initialPath, pathPointer);
int status = NativeFileDialog.NFD_PickFolder(pathPointer, initialPath);

if (status == NativeFileDialog.NFD_CANCEL) {
callback.canceled();
Expand All @@ -447,7 +448,7 @@ public static void pickDirectory(FileHandle initialFolder, FileChooserAdapter ca
}

String folder = pathPointer.getStringUTF8(0);
NativeFileDialog.nNFD_Free(pathPointer.get(0));
NativeFileDialog.nNFD_FreePath(pathPointer.get(0));

Array<FileHandle> array = new Array<>();
array.add(Gdx.files.absolute(folder));
Expand All @@ -468,6 +469,7 @@ public static void pickDirectory(FileHandle initialFolder, FileChooserAdapter ca

stage.addActor(fileChooser.fadeIn());
} finally {
NativeFileDialog.NFD_Quit();
memFree(pathPointer);
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/main/kotlin/gdx/liftoff/views/MainView.kt
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,11 @@ class MainView : ActionContainer {
initialPath = initialPath.replace("/", "\\")
}

NativeFileDialog.NFD_Init()
val pathPointer = memAllocPointer(1)

try {
val status = NativeFileDialog.NFD_PickFolder(initialPath, pathPointer)
val status = NativeFileDialog.NFD_PickFolder(pathPointer, initialPath)

if (status == NativeFileDialog.NFD_CANCEL) {
callback.canceled()
Expand All @@ -141,7 +142,7 @@ class MainView : ActionContainer {
}

val folder = pathPointer.getStringUTF8(0)
NativeFileDialog.nNFD_Free(pathPointer.get(0))
NativeFileDialog.nNFD_FreePath(pathPointer.get(0))

val array = GdxArray<FileHandle>()
array.add(Gdx.files.absolute(folder))
Expand All @@ -162,6 +163,7 @@ class MainView : ActionContainer {

form.stage.addActor(fileChooser.fadeIn())
} finally {
NativeFileDialog.NFD_Quit()
memFree(pathPointer)
}
}
Expand Down

0 comments on commit e88c927

Please sign in to comment.