mindustry: 154.3 → 155.4 (#492374)
This commit is contained in:
@@ -1,37 +0,0 @@
|
||||
diff --git a/arc-core/build.gradle b/arc-core/build.gradle
|
||||
index ca6244fa..8541bf3e 100644
|
||||
--- a/Arc/arc-core/build.gradle
|
||||
+++ b/Arc/arc-core/build.gradle
|
||||
@@ -2,23 +2,12 @@ sourceSets.main.java.srcDirs = ["src"]
|
||||
sourceSets.test.java.srcDirs = ["test"]
|
||||
sourceSets.test.resources.srcDirs = ["test/resources"]
|
||||
|
||||
-configurations{
|
||||
- extraLibs
|
||||
-}
|
||||
-
|
||||
dependencies{
|
||||
testImplementation libraries.junit
|
||||
testImplementation aproj(":natives:natives-desktop")
|
||||
testImplementation files("unsafe/unsafe.jar")
|
||||
//file generated from UnsafeBuffers.java
|
||||
compileOnly files("unsafe/unsafe.jar")
|
||||
- extraLibs files("unsafe/unsafe.jar")
|
||||
-}
|
||||
-
|
||||
-jar{
|
||||
- from{
|
||||
- configurations.extraLibs.collect{ it.isDirectory() ? it : zipTree(it) }
|
||||
- }
|
||||
}
|
||||
|
||||
//now, you may ask: why don't I make this a new module? why do I include JARs in the repository? why don't I make this a separate build step?
|
||||
@@ -120,6 +109,8 @@ tasks.register('copyUnsafeStuff'){
|
||||
}
|
||||
}
|
||||
|
||||
+jar.dependsOn copyUnsafeStuff
|
||||
+
|
||||
getTasksByName("jnigen", true).each{
|
||||
it.dependsOn copyUnsafeStuff
|
||||
}
|
||||
Generated
+5
-4
@@ -63,6 +63,11 @@
|
||||
}
|
||||
},
|
||||
"https://repo.maven.apache.org/maven2": {
|
||||
"at/yawk/lz4#lz4-java/1.10.2": {
|
||||
"jar": "sha256-JS2r1YbSIUmjFmGor8GlB0dxTrGimL1KbngMjJGhOGY=",
|
||||
"module": "sha256-LYLf2sMRuwSqec4UpQGJCvdAbJyj6CQHMidx1/QaXrQ=",
|
||||
"pom": "sha256-7o1bwxjqVI5VT8I/gm1Fooq5AEpGqZ4dkaZIQxuHcAc="
|
||||
},
|
||||
"com/github/javaparser#javaparser-core/3.14.14": {
|
||||
"jar": "sha256-Z4GYXisXFCvQfhp75Zt5NIXLAms3ZnN30WYQrpgUi24=",
|
||||
"pom": "sha256-70ERyN/Uh+Zp5w1Qzz2z8O3YuTLKvjXmYzuzzuuGpIo="
|
||||
@@ -306,10 +311,6 @@
|
||||
"module": "sha256-S2knc2Ouooq1DFpnYZ++q/jAgk5JOOYmC6wEjlvrga8=",
|
||||
"pom": "sha256-dmAvWZVKo9+mjjHIDKibb7ouoAG0+wbLUfoV6tfIWjA="
|
||||
},
|
||||
"org/lz4#lz4-java/1.8.0": {
|
||||
"jar": "sha256-10ozNPs1GVAJszipUfkYID1rvKPR01kDPcM+3Rytye8=",
|
||||
"pom": "sha256-DbittR4TJFSlxAbeuy8aDfgfk91Z++IMuUcQKZRokDQ="
|
||||
},
|
||||
"org/opentest4j#opentest4j/1.2.0": {
|
||||
"jar": "sha256-WIEt5giY2Xb7ge87YtoFxmBMGP1KJJ9QRCgkefwoavI=",
|
||||
"pom": "sha256-qW5nGBbB/4gDvex0ySQfAlvfsnfaXStO4CJmQFk2+ZQ="
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
let
|
||||
pname = "mindustry";
|
||||
version = "154.3";
|
||||
version = "155.4";
|
||||
buildVersion = makeBuildVersion version;
|
||||
|
||||
jdk = jdk17;
|
||||
@@ -48,14 +48,14 @@ let
|
||||
owner = "Anuken";
|
||||
repo = "Mindustry";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-PguKdpZ3yaV7eW1NKZpbsOEUiMxX6gdYZxJ4p7wkvi8=";
|
||||
hash = "sha256-NHI+YLh4ptuAEff6NM9ZgN2haB+iZ9np7nf6iRMzgHw=";
|
||||
};
|
||||
Arc = fetchFromGitHub {
|
||||
name = "Arc-source";
|
||||
owner = "Anuken";
|
||||
repo = "Arc";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-RMoXtyDh9DbEYxYLAopItp6Bf8kg92Av+g5lSqKFhdU=";
|
||||
hash = "sha256-9nUj9aP1yAvZEDBuJPfE4ZzGEbZOSuVK+KbD1kUG+dM=";
|
||||
};
|
||||
soloud = fetchFromGitHub {
|
||||
owner = "Anuken";
|
||||
@@ -92,12 +92,6 @@ stdenv.mkDerivation {
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Fixes a build system issue where the classes UnsafeBuffers and Java16Buffers get built
|
||||
# and copied multiple times, which causes conflicts when zipping up the final arc-core jar.
|
||||
./0001-fix-duplicate-classes.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Ensure the prebuilt shared objects don't accidentally get shipped
|
||||
rm -r Arc/natives/natives-*/libs/*
|
||||
@@ -106,6 +100,10 @@ stdenv.mkDerivation {
|
||||
|
||||
cd Mindustry
|
||||
|
||||
# Fix duplicate class entries in arc-core jar with newer Gradle
|
||||
substituteInPlace ../Arc/arc-core/build.gradle \
|
||||
--replace-fail 'jar{' 'jar{ duplicatesStrategy = DuplicatesStrategy.EXCLUDE'
|
||||
|
||||
# Remove unbuildable iOS stuff
|
||||
sed -i '/^project(":ios"){/,/^}/d' build.gradle
|
||||
sed -i '/robo(vm|VM)/d' build.gradle
|
||||
@@ -162,20 +160,20 @@ stdenv.mkDerivation {
|
||||
''
|
||||
+ lib.optionalString enableClient ''
|
||||
pushd ../Arc
|
||||
# unsupported platforms need to be excluded because their native build tools aren't available
|
||||
gradle jnigenBuild -x jnigenBuildAndroid -x jnigenBuildWindows -x jnigenBuildWindows64
|
||||
gradle jnigenJarNativesDesktop
|
||||
glewlib=${lib.getLib glew}/lib/libGLEW.so
|
||||
sdllib=${lib.getLib SDL2}/lib/libSDL2.so
|
||||
patchelf backends/backend-sdl/build/Arc/backends/backend-sdl/libs/linux64/libsdl-arc*.so \
|
||||
--add-needed "$glewlib" \
|
||||
--add-needed "$sdllib"
|
||||
# Put the freshly-built libraries where the pre-built libraries used to be:
|
||||
cp arc-core/libs/*/* natives/natives-desktop/libs/
|
||||
cp backends/backend-sdl/build/Arc/backends/backend-sdl/libs/*/* natives/natives-desktop/libs/
|
||||
# below target dirs are based on Arc upstream: Arc/extensions/../build.gradle
|
||||
gradle jnigenBuildLinux64
|
||||
# Copy freshly-built libraries to where Gradle resource dirs expect them.
|
||||
# Using jnigenBuildLinux64 skips the postJni tasks, so we copy manually.
|
||||
# arc-core uses relative libsDir, others use absolute which causes path doubling.
|
||||
cp arc-core/libs/linux64/* natives/natives-desktop/libs/
|
||||
cp -r backends/backend-sdl/build/Arc/backends/backend-sdl/libs/* backends/backend-sdl/libs/
|
||||
cp extensions/freetype/build/Arc/extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/
|
||||
cp extensions/filedialogs/build/Arc/extensions/filedialogs/libs/*/* natives/natives-filedialogs/libs/
|
||||
glewlib=${lib.getLib glew}/lib/libGLEW.so
|
||||
sdllib=${lib.getLib SDL2}/lib/libSDL2.so
|
||||
patchelf backends/backend-sdl/libs/linux64/libsdl-arc*.so \
|
||||
--add-needed "$glewlib" \
|
||||
--add-needed "$sdllib"
|
||||
gradle jnigenJarNativesDesktop
|
||||
popd
|
||||
|
||||
gradle desktop:dist
|
||||
|
||||
Reference in New Issue
Block a user