parent
c1377d4f2a
commit
c33a27b2ea
@ -1,21 +1,32 @@
|
||||
FROM debian:bullseye-slim
|
||||
|
||||
# Copy DEB
|
||||
ADD ./out/minecraft-pi-reborn-server_*_amd64.deb /root
|
||||
|
||||
# Install
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y tini && \
|
||||
(dpkg -i /root/*.deb || :) && \
|
||||
apt-get install -y tini sed && \
|
||||
apt-get --fix-broken install -y && \
|
||||
rm -f /root/*.deb && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy AppImage
|
||||
RUN mkdir /app
|
||||
ADD ./out/minecraft-pi-reborn-server-*-amd64.AppImage /app
|
||||
|
||||
# Extract AppImage
|
||||
WORKDIR /app
|
||||
RUN \
|
||||
sed -i '0,/AI\x02/{s|AI\x02|\x00\x00\x00|}' ./*.AppImage && \
|
||||
./*.AppImage --appimage-extract && \
|
||||
rm -f ./*.AppImage
|
||||
|
||||
# Setup AppImage
|
||||
ENV OWD=/data
|
||||
ENV APPDIR=/app/squashfs-root
|
||||
|
||||
# Setup Working Directory
|
||||
RUN mkdir /data
|
||||
WORKDIR /data
|
||||
|
||||
# Setup Entrypoint
|
||||
ENTRYPOINT ["/usr/bin/tini", "--"]
|
||||
CMD ["minecraft-pi-reborn-server"]
|
||||
CMD ["/app/squashfs-root/AppRun"]
|
||||
|
@ -1,7 +0,0 @@
|
||||
Package: minecraft-pi-reborn-client
|
||||
Version: ${VERSION}
|
||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
||||
Description: Fun with Blocks
|
||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
||||
Architecture: amd64
|
||||
Depends: libc6, libstdc++6, libc6-armhf-cross, libstdc++6-armhf-cross, zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1, qemu-user
|
@ -1,7 +0,0 @@
|
||||
Package: minecraft-pi-reborn-client
|
||||
Version: ${VERSION}
|
||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
||||
Description: Fun with Blocks
|
||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
||||
Architecture: arm64
|
||||
Depends: libc6, libstdc++6, libc6:armhf, libstdc++6:armhf, zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1
|
@ -1,7 +0,0 @@
|
||||
Package: minecraft-pi-reborn-client
|
||||
Version: ${VERSION}
|
||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
||||
Description: Fun with Blocks
|
||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
||||
Architecture: armhf
|
||||
Depends: libc6, libstdc++6, zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1
|
@ -1,7 +0,0 @@
|
||||
Package: minecraft-pi-reborn-server
|
||||
Version: ${VERSION}
|
||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
||||
Description: Fun with Blocks
|
||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
||||
Architecture: amd64
|
||||
Depends: libc6, libstdc++6, libc6-armhf-cross, libstdc++6-armhf-cross, qemu-user
|
@ -1,7 +0,0 @@
|
||||
Package: minecraft-pi-reborn-server
|
||||
Version: ${VERSION}
|
||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
||||
Description: Fun with Blocks
|
||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
||||
Architecture: arm64
|
||||
Depends: libc6, libstdc++6, libc6:armhf, libstdc++6:armhf
|
@ -1,7 +0,0 @@
|
||||
Package: minecraft-pi-reborn-server
|
||||
Version: ${VERSION}
|
||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
||||
Description: Fun with Blocks
|
||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
||||
Architecture: armhf
|
||||
Depends: libc6, libstdc++6
|
@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=Minecraft: Pi Edition: Reborn
|
||||
Comment=Fun with Blocks
|
||||
Icon=minecraft-pi-reborn-client
|
||||
Icon=com.thebrokenrail.MCPIReborn
|
||||
StartupNotify=false
|
||||
StartupWMClass=Minecraft: Pi Edition: Reborn
|
||||
Exec=minecraft-pi-reborn-client
|
Before Width: | Height: | Size: 100 KiB After Width: | Height: | Size: 100 KiB |
@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Clean Prefix
|
||||
rm -rf out
|
||||
|
||||
# Build
|
||||
./scripts/build.sh client amd64
|
||||
./scripts/build.sh server amd64
|
||||
./scripts/build.sh client arm64
|
||||
./scripts/build.sh server arm64
|
||||
./scripts/build.sh client armhf
|
||||
./scripts/build.sh server armhf
|
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// Arguments
|
||||
if (process.argv.length < 4) {
|
||||
throw new Error('Invalid Arguments');
|
||||
}
|
||||
const mode = process.argv[2];
|
||||
const arch = process.argv[3];
|
||||
|
||||
// Data
|
||||
const id = `com.thebrokenrail.MCPIReborn${mode === 'server' ? 'Server' : ''}`;
|
||||
const name = `minecraft-pi-reborn-${mode}`;
|
||||
|
||||
// APT Data
|
||||
const apt_distribution = 'bullseye';
|
||||
const apt_key_url = 'https://ftp-master.debian.org/keys/archive-key-11.asc';
|
||||
|
||||
// Version
|
||||
const fs = require('fs');
|
||||
const version = fs.readFileSync('VERSION', 'utf8').trim();
|
||||
|
||||
// Packages/Dependencies
|
||||
const packages = [
|
||||
'libc6',
|
||||
'libc-bin',
|
||||
'libstdc++6'
|
||||
];
|
||||
if (mode === 'client') {
|
||||
packages.push(
|
||||
'zenity',
|
||||
'libcanberra-gtk3-module',
|
||||
'libglfw3',
|
||||
'libfreeimage3',
|
||||
'libopenal1'
|
||||
);
|
||||
}
|
||||
if (arch !== 'armhf') {
|
||||
packages.push(
|
||||
'libc6-armhf-cross',
|
||||
'libstdc++6-armhf-cross'
|
||||
);
|
||||
if (arch !== 'arm64') {
|
||||
packages.push('qemu-user');
|
||||
}
|
||||
}
|
||||
|
||||
// Package Exclusions
|
||||
const packageExclusions = [
|
||||
// Exclude Unneeded Packages
|
||||
'humanity-icon-theme',
|
||||
'adwaita-icon-theme',
|
||||
'libwebkit2gtk-*',
|
||||
'libnotify4',
|
||||
'*systemd*',
|
||||
'dconf-service',
|
||||
'dconf-gsettings-backend',
|
||||
'libgnutls*',
|
||||
'librest-*',
|
||||
'libcups2',
|
||||
'libcolord2',
|
||||
'libmount1'
|
||||
];
|
||||
|
||||
// APT
|
||||
const apt = {
|
||||
arch: arch,
|
||||
sources: [
|
||||
{
|
||||
sourceline: `deb [arch=${arch}] http://deb.debian.org/debian/ ${apt_distribution} main`,
|
||||
key_url: apt_key_url
|
||||
},
|
||||
{
|
||||
sourceline: `deb [arch=${arch}] http://deb.debian.org/debian/ ${apt_distribution}-updates main`,
|
||||
key_url: apt_key_url
|
||||
}
|
||||
],
|
||||
include: packages,
|
||||
exclude: packageExclusions
|
||||
};
|
||||
|
||||
// Get Architecture Triplet
|
||||
const triplet = {
|
||||
'amd64': 'x86_64-linux-gnu',
|
||||
'i386': 'i386-linux-gnu',
|
||||
'arm64': 'aarch64-linux-gnu',
|
||||
'armhf': 'arm-linux-gnueabihf'
|
||||
}[arch];
|
||||
if (!triplet) {
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
// Files
|
||||
const files = {
|
||||
exclude: [
|
||||
// Exclude Unused Files
|
||||
`usr/lib/${triplet}/gconv`,
|
||||
'usr/share/man',
|
||||
'usr/share/doc/*/README.*',
|
||||
'usr/share/doc/*/changelog.*',
|
||||
'usr/share/doc/*/NEWS.*',
|
||||
'usr/share/doc/*/TODO.*',
|
||||
'usr/include',
|
||||
'usr/share/locale',
|
||||
'usr/share/help'
|
||||
]
|
||||
};
|
||||
|
||||
// Script After Bundling Dependencies
|
||||
const afterBundle = [
|
||||
// Remove Unused QEMU Binaries
|
||||
'find ./AppDir/usr/bin -maxdepth 1 -name \'qemu-*\' -a ! -name \'qemu-arm\' -delete'
|
||||
];
|
||||
|
||||
// Runtime
|
||||
const runtime = {
|
||||
env: mode === 'client' ? {
|
||||
// Make GTK Work (Zenity Uses GTK)
|
||||
GTK_EXE_PREFIX: '${APPDIR}/usr',
|
||||
GTK_PATH: `\${APPDIR}/usr/lib/${triplet}/gtk-3.0`,
|
||||
GTK_DATA_PREFIX: '${APPDIR}',
|
||||
GTK_THEME: 'Default',
|
||||
APPDIR_LIBRARY_PATH: `\${APPDIR}/usr/lib/${triplet}:\${APPDIR}/lib/${triplet}:\${APPDIR}/usr/lib:\${APPDIR}/usr/lib/${triplet}/gdk-pixbuf-2.0/2.10.0/loaders`
|
||||
} : undefined,
|
||||
preserve: arch !== 'armhf' ? [
|
||||
// On non-ARM32 systems, an ARM32 linker is embedded, this
|
||||
// prevents AppImage-Builder from modifying ARM32 binaries
|
||||
// to use a (usually non-existent) system linker.
|
||||
`usr/lib/${name}/minecraft-pi`,
|
||||
`usr/lib/${name}/**/*.so`,
|
||||
'usr/arm-linux-gnueabihf/lib'
|
||||
] : undefined
|
||||
};
|
||||
|
||||
// AppDir
|
||||
const appDir = {
|
||||
path: `./AppDir`,
|
||||
app_info: {
|
||||
id: id,
|
||||
name: `${name}`,
|
||||
icon: mode === 'client' ? id : 'utilities-terminal',
|
||||
version: version,
|
||||
exec: `usr/bin/${name}`,
|
||||
exec_args: '$@'
|
||||
},
|
||||
apt: apt,
|
||||
files: files,
|
||||
after_bundle: afterBundle,
|
||||
runtime: runtime
|
||||
};
|
||||
|
||||
// Build Script
|
||||
const script = [
|
||||
`rm -rf ./build/${mode}-${arch}`,
|
||||
`./scripts/setup.sh ${mode} ${arch} -DMCPI_IS_APPIMAGE_BUILD=ON`,
|
||||
`rm -rf ./out/${mode}-${arch}`,
|
||||
`./scripts/build.sh ${mode} ${arch}`,
|
||||
'rm -rf ./AppDir',
|
||||
`cp -ar ./out/${mode}-${arch} ./AppDir`
|
||||
];
|
||||
|
||||
// AppImage
|
||||
const appImageArch = {
|
||||
'amd64': 'x86_64',
|
||||
'i386': 'i686',
|
||||
'arm64': 'aarch64',
|
||||
'armhf': 'armhf'
|
||||
}[arch];
|
||||
if (!appImageArch) {
|
||||
throw new Error();
|
||||
}
|
||||
const appImage = {
|
||||
arch: appImageArch,
|
||||
file_name: `./out/${name}-${version}-${arch}.AppImage`
|
||||
};
|
||||
|
||||
// Root
|
||||
const root = {
|
||||
version: 1,
|
||||
AppDir: appDir,
|
||||
script: script,
|
||||
AppImage: appImage
|
||||
};
|
||||
|
||||
// Write
|
||||
fs.writeFileSync(`AppImageBuilder.yml`, JSON.stringify(root, null, 4));
|
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Clean Prefix
|
||||
rm -rf out
|
||||
|
||||
# Build
|
||||
./scripts/package.sh client amd64
|
||||
./scripts/package.sh server amd64
|
||||
./scripts/package.sh client arm64
|
||||
./scripts/package.sh server arm64
|
||||
./scripts/package.sh client armhf
|
||||
./scripts/package.sh server armhf
|
Loading…
Reference in new issue