Unverified Commit 44a8a9ae authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

mindustry: 153 -> 154.3 (#488275)

parents 69b8e65a 058e24c9
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
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
 }
+0 −33
Original line number Diff line number Diff line
From 9dbfa680db6bfd1033772dda753120fe4452e0d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=C3=A4ssler?= <milan@petabyte.dev>
Date: Fri, 8 Jan 2021 04:49:14 +0100
Subject: [PATCH] fix include path for SDL2 on linux

---
 .../src/arc/backend/sdl/jni/SDL.java            | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/backends/backend-sdl/src/arc/backend/sdl/jni/SDL.java b/backends/backend-sdl/src/arc/backend/sdl/jni/SDL.java
index 62d9286a..2853119d 100644
--- a/Arc/backends/backend-sdl/src/arc/backend/sdl/jni/SDL.java
+++ b/Arc/backends/backend-sdl/src/arc/backend/sdl/jni/SDL.java
@@ -8,16 +8,8 @@ import java.nio.*;
 public class SDL{
     /*JNI
 
-    #ifdef __APPLE__
-
     #include "SDL2/SDL.h"
 
-    #else
-
-    #include "SDL.h"
-
-    #endif
-
     */
 
     static{
-- 
2.29.2
+6 −6
Original line number Diff line number Diff line
@@ -17,10 +17,10 @@
   "module": "sha256-r0Hiyh4MXzQkBudNhixHcXf1QOr4GWU841ypzRa0w/g=",
   "pom": "sha256-2Zp//AsIqW7/+5ybmtConz5ykh3ZYrFBi6SzLuKTz8A="
  },
  "Anuken#rhino/73a812444ac388ac2d94013b5cadc8f70b7ea027": {
   "jar": "sha256-g2+szbtgsHvalu5F4kygVDN89kk0zvzVSw3EOcAL11I=",
   "module": "sha256-BbXoWzXoJGKhH6kA6EiluDHhfs3th9X+ojLLZuGISOg=",
   "pom": "sha256-ngLvPqdMq7ayWlDHf7qr8MGYsDh+uMK6OYcDX9y5bXk="
  "Anuken#rhino/54b75cbd1207ef1fd5cff517cbd188e763c85baa": {
   "jar": "sha256-sZ5zFOXvyOLYEbb/LAQLU2u2S4FZ41T+rFHBfrG5O/Y=",
   "module": "sha256-QqoHjAbLp9eza+7r921k2L6bbV8zqjhdkqHhCy1qIkA=",
   "pom": "sha256-5xheV+aFDLRgYUS6b7GoGW0b2KSYsA8jY7NPy+Gb+H8="
  },
  "Anuken#steamworks4j/0b86023401880bb5e586bc404bedbaae9b1f1c94": {
   "jar": "sha256-YbaPhCjWtlExwQ1dFNA6JrkiAfQYWxJ0VRV9rLnoYhY=",
@@ -58,8 +58,8 @@
  }
 },
 "https://raw.githubusercontent.com": {
  "nothings/stb/e140649ccf40818781b7e408f6228a486f6d254b/stb_image": {
   "h": "sha256-jlsNcX38ioNMl+8gLSDnjQg9AJWG4XMcmFgX0BVdVow="
  "nothings/stb/013ac3beddff3dbffafd5177e7972067cd2b5083/stb_image": {
   "h": "sha256-WUwv411JSItDgtv67I+YNm3vyoGdkWrJW+zz519CALM="
  }
 },
 "https://repo.maven.apache.org/maven2": {
+14 −7
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@

let
  pname = "mindustry";
  version = "153";
  version = "154.3";
  buildVersion = makeBuildVersion version;

  jdk = jdk17;
@@ -48,21 +48,21 @@ let
    owner = "Anuken";
    repo = "Mindustry";
    tag = "v${version}";
    hash = "sha256-yVrOHZOCZrI5SsmMdo7Eh+zS0PXv2X67zLCdLOWcPVc=";
    hash = "sha256-PguKdpZ3yaV7eW1NKZpbsOEUiMxX6gdYZxJ4p7wkvi8=";
  };
  Arc = fetchFromGitHub {
    name = "Arc-source";
    owner = "Anuken";
    repo = "Arc";
    tag = "v${version}";
    hash = "sha256-JyiFxzdZtU0ILytTCfZrhBU2oZ3gF1kzMbSdjxqvTYs=";
    hash = "sha256-RMoXtyDh9DbEYxYLAopItp6Bf8kg92Av+g5lSqKFhdU=";
  };
  soloud = fetchFromGitHub {
    owner = "Anuken";
    repo = "soloud";
    # This is pinned in Arc's arc-core/build.gradle
    tag = "v0.11";
    hash = "sha256-jybIILdK3cqyZ2LIuoWDfZWocVTbKszekKCLil0WXRY=";
    tag = "2025.12.01";
    hash = "sha256-I+VZW34eRGn1RJmK8e9nVSXIFSOK/pER+xEhmXeUB4Y=";
  };

  desktopItem = makeDesktopItem {
@@ -93,13 +93,16 @@ stdenv.mkDerivation {
  '';

  patches = [
    ./0001-fix-include-path-for-SDL2-on-linux.patch
    # 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/*
    rm -r Arc/backends/backend-*/libs/*
    rm -f Arc/arc-core/unsafe/unsafe.jar

    cd Mindustry

@@ -149,6 +152,10 @@ stdenv.mkDerivation {

  buildPhase = ''
    runHook preBuild

    pushd ../Arc
    gradle :arc-core:recompileUnsafe
    popd
  ''
  + lib.optionalString enableServer ''
    gradle server:dist
@@ -164,7 +171,7 @@ stdenv.mkDerivation {
      --add-needed "$glewlib" \
      --add-needed "$sdllib"
    # Put the freshly-built libraries where the pre-built libraries used to be:
    cp arc-core/build/Arc/arc-core/libs/*/* natives/natives-desktop/libs/
    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
    cp extensions/freetype/build/Arc/extensions/freetype/libs/*/* natives/natives-freetype-desktop/libs/