Skip to content

mindustry: new, 146#9156

Closed
BenderBlog wants to merge 5 commits into
AOSC-Dev:stablefrom
BenderBlog:mindustry-new
Closed

mindustry: new, 146#9156
BenderBlog wants to merge 5 commits into
AOSC-Dev:stablefrom
BenderBlog:mindustry-new

Conversation

@BenderBlog

@BenderBlog BenderBlog commented Jan 3, 2025

Copy link
Copy Markdown
Member

Topic Description

mindustry: new, 146

Package(s) Affected

None.

Security Update?

No.

Test Build(s) Done

Primary Architectures

  • Architecture-independent noarch

Secondary Architectures

Architectural progress for secondary ports does not impede on merging of this topic.

  • Loongson 3 loongson3
  • PowerPC 64-bit (Little Endian) ppc64el
  • RISC-V 64-bit riscv64

Note: Per Anuken/Arc#181, it may not that "noarch" since sdl2 compiled...

Comment thread app-games/mindustry/autobuild/build Outdated
Comment on lines +9 to +10
install -Dm755 "$SRCDIR/desktop/build/libs/Mindustry.jar" "$PKGDIR/usr/share/java/mindustry/mindustry.jar"
install -Dm755 "$SRCDIR/server/build/libs/server-release.jar" "$PKGDIR/usr/share/java/mindustry/mindustry_server.jar"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some verbosity.

Comment thread app-games/mindustry/autobuild/build Outdated
install -Dm755 "$SRCDIR/server/build/libs/server-release.jar" "$PKGDIR/usr/share/java/mindustry/mindustry_server.jar"
local icon_size
for icon_size in 256 512 1024; do
install -Dm644 "$SRCDIR/core/assets/icons/icon_${icon_size}x${icon_size}x32.png" \

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Comment thread app-games/mindustry/autobuild/defines Outdated
@@ -0,0 +1,5 @@
PKGNAME=mindustry
PKGSEC=games
PKGDEP="openjdk-17 alsa-lib libicns hicolor-icon-theme"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to depend on openjdk instead of depending on a specific version of openjdk, unless otherwise specified by the upstream.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream https://github.com/Anuken/Mindustry said:

If you'd rather compile on your own, follow these instructions. First, make sure you have JDK 17 installed. Other JDK versions will not work. Open a terminal in the Mindustry directory and run the following commands:

Well, I need to mark openjdk 17 as builddep?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream https://github.com/Anuken/Mindustry said:

If you'd rather compile on your own, follow these instructions. First, make sure you have JDK 17 installed. Other JDK versions will not work. Open a terminal in the Mindustry directory and run the following commands:

Well, I need to mark openjdk 17 as builddep?

I see. You might want to make sure other OpenJDK versions can run the game then, otherwise we can still make it a PKGDEP as requested by the upstream.

Comment thread app-games/mindustry/autobuild/overrides/usr/share/applications/mindustry.desktop Outdated
Comment thread app-games/mindustry/autobuild/patch Outdated
@@ -0,0 +1,2 @@
patch -Np1 -d ../Arc -i ../mindustry/autobuild/patches/fix-arc-build-in-gradle.patch
patch -Np1 -i autobuild/patches/always-use-local-arc.patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to write a patch file. Patches inside the patch/ directory will be applied automatically during the building process.

@BenderBlog BenderBlog Jan 3, 2025

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two patches are patched separately.
First file patches to the Arc folder.
Second file patches to the mindustry folder, which is the default...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: patches directory

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two patches are patched separately. First file patches to the Arc folder. Second file patches to the mindustry folder, which is the default...

One way to do that is set SUBDIR=., where the parent folder of both SRCS would be the SRCDIR. And then you can have patch files corresponding to two sources.

Comment thread app-games/mindustry/autobuild/patch Outdated
@@ -0,0 +1,2 @@
patch -Np1 -d ../Arc -i ../mindustry/autobuild/patches/fix-arc-build-in-gradle.patch
patch -Np1 -i autobuild/patches/always-use-local-arc.patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two patches are patched separately. First file patches to the Arc folder. Second file patches to the mindustry folder, which is the default...

One way to do that is set SUBDIR=., where the parent folder of both SRCS would be the SRCDIR. And then you can have patch files corresponding to two sources.

Comment thread app-games/mindustry/autobuild/build Outdated
Comment on lines +8 to +12
abinfo "Installing client jar file..."
install -Dm755 "$SRCDIR/desktop/build/libs/Mindustry.jar" "$PKGDIR/usr/share/java/mindustry/mindustry.jar"

abinfo "Installing server jar file..."
install -Dm755 "$SRCDIR/server/build/libs/server-release.jar" "$PKGDIR/usr/share/java/mindustry/mindustry_server.jar"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some verbosity here (i.e. Supply -v argument for install.)

Comment thread app-games/mindustry/autobuild/defines Outdated
@@ -0,0 +1,5 @@
PKGNAME=mindustry
PKGSEC=games
PKGDEP="openjdk-17 alsa-lib libicns hicolor-icon-theme"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream https://github.com/Anuken/Mindustry said:

If you'd rather compile on your own, follow these instructions. First, make sure you have JDK 17 installed. Other JDK versions will not work. Open a terminal in the Mindustry directory and run the following commands:

Well, I need to mark openjdk 17 as builddep?

I see. You might want to make sure other OpenJDK versions can run the game then, otherwise we can still make it a PKGDEP as requested by the upstream.

@@ -1,18 +1,8 @@
[Desktop Entry]
Categories=Game;
Comment[zh_CN]=A sandbox tower defense game

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't just remove it, try to leave a clear and correct zh_CN description :)

@@ -0,0 +1,2 @@
#!/usr/bin/env sh
exec /usr/bin/java -jar /usr/share/java/mindustry/mindustry.jar "\$@"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why "\$@"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk but seems useless

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use $@ to pass arguments.

Comment thread app-games/mindustry/autobuild/prepare
@@ -0,0 +1,24 @@
abinfo "Entering mindustry folder..."
cd ./mindustry

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use absolute path (i.e. "$SRCDIR"/mindustry).

Comment on lines +1 to +2
patch -Np1 -d ./Arc -i ../autobuild/patches/fix-arc-build-in-gradle.patch
patch -Np1 -d ./mindustry -i ../autobuild/patches/always-use-local-arc.patch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can prepend the directory names to your patches to avoid writing a patch file.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still cannot figure out what you're saying:P

@MingcongBai MingcongBai added the new-package New AOSC OS package label Jan 4, 2025
@stdmnpkg

stdmnpkg commented Jan 5, 2025

Copy link
Copy Markdown
Contributor

image

works on my x86-64 machine, although definitely not noarch, either port it (tedious) or mark it as amd64 only.

@aosc-buildit-bot

Copy link
Copy Markdown
Contributor

Dickens-topic report:

@BenderBlog

Copy link
Copy Markdown
Member Author

Will be continued in this repo, closed...

@BenderBlog BenderBlog closed this Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-package New AOSC OS package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants