libgdx / gdx-jnigen

jnigen is a small library that can be used with or without libGDX which allows C/C++ code to be written inline with Java source code.
Apache License 2.0
60 stars 25 forks source link

Desktop native outputs are relative to Gradle daemon working directory. #19

Open PokeMMO opened 3 years ago

PokeMMO commented 3 years ago

Verify and figure out why.

Anuken commented 3 years ago

Sample build output for Windows64 compilation on Linux, showing the output/temporary paths:

> Task :arc-core:jnigenBuildWindows64
Executing '[ant, -f, /home/anuke/Projects/Arc/arc-core/jni/build-windows64.xml, -Drelease=true, clean, postcompile, -v]'

    [apply] Applied x86_64-w64-mingw32-gcc to 2 files and 0 directories.

link:
[pathconvert] Set property objFiles = /home/anuke/.gradle/daemon/target/native/windows64/arc_graphics_Pixmap.o /home/anuke/.gradle/daemon/target/native/windows64/arc_util_Buffers.o /home/anuke/.gradle/daemon/target/native/windows64/memcpy_wrap.o /home/anuke/.gradle/daemon/target/native/windows64/pix.o
    [mkdir] Skipping /home/anuke/.gradle/daemon/6.4.1/libs/windows64 because it already exists.
     [exec] Current OS is Linux
     [exec] Executing 'x86_64-w64-mingw32-g++' with arguments:
     [exec] '-Wl,--kill-at'
     [exec] '-shared'
     [exec] '-static'
     [exec] '-static-libgcc'
     [exec] '-static-libstdc++'
     [exec] '-m64'
     [exec] '-o'
     [exec] '/home/anuke/.gradle/daemon/6.4.1/libs/windows64/arc64.dll'
     [exec] '/home/anuke/.gradle/daemon/target/native/windows64/arc_graphics_Pixmap.o'
     [exec] '/home/anuke/.gradle/daemon/target/native/windows64/arc_util_Buffers.o'
     [exec] '/home/anuke/.gradle/daemon/target/native/windows64/memcpy_wrap.o'
     [exec] '/home/anuke/.gradle/daemon/target/native/windows64/pix.o'
     [exec] 
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.

strip:
     [exec] Current OS is Linux
     [exec] Executing 'x86_64-w64-mingw32-strip' with arguments:
     [exec] '--strip-unneeded'
     [exec] '/home/anuke/.gradle/daemon/6.4.1/libs/windows64/arc64.dll'
     [exec] 
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.

postcompile:

(/home/anuke/.gradle/daemon/6.4.1/libs is the output directory in this case)

PokeMMO commented 3 years ago

That means the incorrect step is creating the jnigen ant scripts. We need to check if this broke in #15 or was this already broken.

MobiDevelop commented 3 years ago

I had seen this prior to the relative path work (and was one of the reasons I was working on that). I only have a Mac, so it's possible that other platforms need something different.

MobiDevelop commented 3 years ago

Or, it might have been after I did the core relative path stuff and had started working on the Gradle plugin

MobiDevelop commented 3 years ago

I think it is related. Probably best to revert the change for now until we can address the Gradle plugin still doing some path mangling on its own.