master #2
8
.gitmodules
vendored
Normal file
8
.gitmodules
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
[submodule "dependencies/libpng/src"]
|
||||||
|
path = dependencies/libpng/src
|
||||||
|
url = https://github.com/glennrp/libpng.git
|
||||||
|
shallow = true
|
||||||
|
[submodule "dependencies/zlib/src"]
|
||||||
|
path = dependencies/zlib/src
|
||||||
|
url = https://github.com/madler/zlib.git
|
||||||
|
shallow = true
|
@ -1,7 +0,0 @@
|
|||||||
# Compile For i386
|
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
|
|
||||||
# Use i386 Cross-Compiler
|
|
||||||
setup_toolchain("i386-linux-gnu")
|
|
||||||
# Details
|
|
||||||
set(CMAKE_SYSTEM_NAME "Linux")
|
|
||||||
set(CMAKE_SYSTEM_PROCESSOR "i386")
|
|
9
cmake/i686-toolchain.cmake
Normal file
9
cmake/i686-toolchain.cmake
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Warning
|
||||||
|
message(WARNING "i686 Builds Are Unsupported, Proceed At Your Own Risk")
|
||||||
|
# Compile For i686
|
||||||
|
include("${CMAKE_CURRENT_LIST_DIR}/base-toolchain.cmake")
|
||||||
|
# Use i686 Cross-Compiler
|
||||||
|
setup_toolchain("i686-linux-gnu")
|
||||||
|
# Details
|
||||||
|
set(CMAKE_SYSTEM_NAME "Linux")
|
||||||
|
set(CMAKE_SYSTEM_PROCESSOR "i686")
|
6
debian/.gitignore
vendored
6
debian/.gitignore
vendored
@ -1,6 +0,0 @@
|
|||||||
*
|
|
||||||
!control
|
|
||||||
!copyright
|
|
||||||
!rules
|
|
||||||
!source
|
|
||||||
!.gitignore
|
|
7
debian/client-amd64
vendored
Normal file
7
debian/client-amd64
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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-static
|
7
debian/client-arm64
vendored
Normal file
7
debian/client-arm64
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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
|
7
debian/client-armhf
vendored
Normal file
7
debian/client-armhf
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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
|
21
debian/control
vendored
21
debian/control
vendored
@ -1,21 +0,0 @@
|
|||||||
Source: minecraft-pi-reborn
|
|
||||||
Section: games
|
|
||||||
Priority: optional
|
|
||||||
Maintainer: TheBrokenRail <connor24nolan@live.com>
|
|
||||||
Build-Depends: debhelper-compat (= 12), clang:native, lld:native, cmake, git, make:native, libglfw3, libglfw3-dev, libfreeimage3, libfreeimage-dev:native, libopenal1, libopenal-dev, crossbuild-essential-armhf
|
|
||||||
Standards-Version: 4.4.1
|
|
||||||
Homepage: https://www.minecraft.net/en-us/edition/pi
|
|
||||||
Vcs-Browser: https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn
|
|
||||||
Vcs-Git: https://gitea.thebrokenrail.com/TheBrokenRail/minecraft-pi-reborn.git
|
|
||||||
|
|
||||||
Package: minecraft-pi-reborn-client
|
|
||||||
Architecture: amd64 i386 arm64 armhf
|
|
||||||
Multi-Arch: foreign
|
|
||||||
Depends: libc6, libstdc++6, libc6-armhf-cross [!arm64 !armhf], libstdc++6-armhf-cross [!arm64 !armhf], zenity, libgles1, libegl1, libglfw3 | libglfw3-wayland, libfreeimage3, libopenal1, qemu-user-static [!arm64 !armhf]
|
|
||||||
Description: Fun with Blocks
|
|
||||||
|
|
||||||
Package: minecraft-pi-reborn-server
|
|
||||||
Architecture: amd64 i386 arm64 armhf
|
|
||||||
Multi-Arch: foreign
|
|
||||||
Depends: libc6, libstdc++6, libc6-armhf-cross [!arm64 !armhf], libstdc++6-armhf-cross [!arm64 !armhf], qemu-user-static [!arm64 !armhf]
|
|
||||||
Description: Fun with Blocks (Dedicated Server)
|
|
21
debian/copyright
vendored
21
debian/copyright
vendored
@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2021 TheBrokenRail
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
24
debian/rules
vendored
24
debian/rules
vendored
@ -1,24 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
|
|
||||||
DEB_CUSTOM_OUTPUT_DIR ?= ..
|
|
||||||
include /usr/share/dpkg/architecture.mk
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@
|
|
||||||
|
|
||||||
override_dh_auto_configure:
|
|
||||||
override_dh_strip:
|
|
||||||
override_dh_dwz:
|
|
||||||
override_dh_makeshlibs:
|
|
||||||
override_dh_shlibdeps:
|
|
||||||
|
|
||||||
override_dh_auto_build:
|
|
||||||
./scripts/build.sh client $(DEB_HOST_ARCH)
|
|
||||||
./scripts/build.sh server $(DEB_HOST_ARCH)
|
|
||||||
|
|
||||||
override_dh_auto_install:
|
|
||||||
cp -ar out/client-$(DEB_HOST_ARCH)/. debian/minecraft-pi-reborn-client
|
|
||||||
cp -ar out/server-$(DEB_HOST_ARCH)/. debian/minecraft-pi-reborn-server
|
|
||||||
|
|
||||||
override_dh_builddeb:
|
|
||||||
dh_builddeb --destdir=${DEB_CUSTOM_OUTPUT_DIR}
|
|
7
debian/server-amd64
vendored
Normal file
7
debian/server-amd64
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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-static
|
7
debian/server-arm64
vendored
Normal file
7
debian/server-arm64
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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
|
7
debian/server-armhf
vendored
Normal file
7
debian/server-armhf
vendored
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
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
|
17
dependencies/libpng/CMakeLists.txt
vendored
17
dependencies/libpng/CMakeLists.txt
vendored
@ -1,29 +1,20 @@
|
|||||||
project(libpng)
|
project(libpng)
|
||||||
|
|
||||||
include(FetchContent)
|
|
||||||
|
|
||||||
# Silence Warnings
|
# Silence Warnings
|
||||||
add_compile_options(-w)
|
add_compile_options(-w)
|
||||||
|
|
||||||
## LibPNG
|
## LibPNG
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
FetchContent_Declare(
|
set(ZLIB_LIBRARY zlibstatic)
|
||||||
libpng
|
set(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../zlib" "${CMAKE_CURRENT_BINARY_DIR}/../zlib")
|
||||||
GIT_REPOSITORY "https://github.com/glennrp/libpng.git"
|
|
||||||
GIT_TAG "v1.2.59"
|
|
||||||
)
|
|
||||||
FetchContent_Populate(libpng)
|
|
||||||
set(ZLIB_LIBRARY zlib)
|
|
||||||
set(ZLIB_INCLUDE_DIR "${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}")
|
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0054 OLD) # Silence Warning
|
set(CMAKE_POLICY_DEFAULT_CMP0054 OLD) # Silence Warning
|
||||||
add_subdirectory("${libpng_SOURCE_DIR}" "${libpng_BINARY_DIR}" EXCLUDE_FROM_ALL)
|
add_subdirectory(src EXCLUDE_FROM_ALL)
|
||||||
set(CMAKE_POLICY_DEFAULT_CMP0054 NEW) # Re-Enable New Behavior
|
set(CMAKE_POLICY_DEFAULT_CMP0054 NEW) # Re-Enable New Behavior
|
||||||
set_target_properties(png12 PROPERTIES LINK_FLAGS "-Wl,--version-script='${CMAKE_CURRENT_SOURCE_DIR}/libpng.vers'") # Use Symbol Versioning
|
set_target_properties(png12 PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libpng.vers") # Use Symbol Versioning
|
||||||
set_target_properties(png12 PROPERTIES DEBUG_POSTFIX "") # Fix LibPNG Suffix In Debug Mode
|
set_target_properties(png12 PROPERTIES DEBUG_POSTFIX "") # Fix LibPNG Suffix In Debug Mode
|
||||||
|
|
||||||
# Ensure Build
|
# Ensure Build
|
||||||
add_custom_target(png12-build ALL DEPENDS png12)
|
add_custom_target(png12-build ALL DEPENDS png12)
|
||||||
# Install
|
# Install
|
||||||
install(TARGETS png12 DESTINATION "${MCPI_LIB_DIR}")
|
install(TARGETS png12 DESTINATION "${MCPI_LIB_DIR}")
|
||||||
|
|
||||||
|
1
dependencies/libpng/src
vendored
Submodule
1
dependencies/libpng/src
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 5bb5bf345aef1e62adcfe30791f4364730a2aede
|
1
dependencies/minecraft-pi/CMakeLists.txt
vendored
1
dependencies/minecraft-pi/CMakeLists.txt
vendored
@ -13,4 +13,3 @@ FetchContent_Populate(minecraft-pi)
|
|||||||
|
|
||||||
# Install
|
# Install
|
||||||
install(DIRECTORY "${minecraft-pi_SOURCE_DIR}/" DESTINATION "${MCPI_INSTALL_DIR}" USE_SOURCE_PERMISSIONS)
|
install(DIRECTORY "${minecraft-pi_SOURCE_DIR}/" DESTINATION "${MCPI_INSTALL_DIR}" USE_SOURCE_PERMISSIONS)
|
||||||
|
|
||||||
|
16
dependencies/zlib/CMakeLists.txt
vendored
16
dependencies/zlib/CMakeLists.txt
vendored
@ -1,24 +1,12 @@
|
|||||||
project(zlib)
|
project(zlib)
|
||||||
|
|
||||||
include(FetchContent)
|
|
||||||
|
|
||||||
# Silence Warnings
|
# Silence Warnings
|
||||||
add_compile_options(-w)
|
add_compile_options(-w)
|
||||||
|
|
||||||
## zlib
|
## zlib
|
||||||
|
|
||||||
# Download
|
# Download
|
||||||
FetchContent_Declare(
|
add_subdirectory(src EXCLUDE_FROM_ALL)
|
||||||
zlib
|
|
||||||
GIT_REPOSITORY "https://github.com/madler/zlib.git"
|
|
||||||
GIT_TAG "v1.2.11"
|
|
||||||
)
|
|
||||||
FetchContent_Populate(zlib)
|
|
||||||
include_directories("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}") # Fix ZLib Build
|
|
||||||
add_subdirectory("${zlib_SOURCE_DIR}" "${zlib_BINARY_DIR}" EXCLUDE_FROM_ALL)
|
|
||||||
|
|
||||||
# Ensure Build
|
# Ensure Build
|
||||||
add_custom_target(zlib-build ALL DEPENDS zlib)
|
add_custom_target(zlib-build ALL DEPENDS zlibstatic)
|
||||||
# Install
|
|
||||||
install(TARGETS zlib DESTINATION "${MCPI_LIB_DIR}")
|
|
||||||
|
|
||||||
|
1
dependencies/zlib/src
vendored
Submodule
1
dependencies/zlib/src
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit cacf7f1d4e3d44d871b605da3b647f07d718623f
|
14
scripts/build-all.sh
Executable file
14
scripts/build-all.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/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
|
@ -14,12 +14,13 @@ echo '==== Installing Dependencies ===='
|
|||||||
./scripts/install-dependencies.sh
|
./scripts/install-dependencies.sh
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
echo '==== Building & Packaging ===='
|
echo '==== Building ===='
|
||||||
rm -rf out build
|
./scripts/build-all.sh
|
||||||
./scripts/package.sh amd64
|
|
||||||
./scripts/package.sh arm64
|
|
||||||
./scripts/package.sh armhf
|
|
||||||
|
|
||||||
# Test
|
# Test
|
||||||
echo '==== Testing ===='
|
echo '==== Testing ===='
|
||||||
./scripts/test.sh
|
./scripts/test.sh
|
||||||
|
|
||||||
|
# Package
|
||||||
|
echo '==== Packaging ===='
|
||||||
|
./scripts/package.sh
|
||||||
|
@ -20,7 +20,6 @@ sudo apt-get dist-upgrade -y
|
|||||||
|
|
||||||
# Install
|
# Install
|
||||||
sudo apt-get install --no-install-recommends -y \
|
sudo apt-get install --no-install-recommends -y \
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
git \
|
git \
|
||||||
@ -28,10 +27,6 @@ sudo apt-get install --no-install-recommends -y \
|
|||||||
lld \
|
lld \
|
||||||
cmake \
|
cmake \
|
||||||
make \
|
make \
|
||||||
dpkg-dev \
|
|
||||||
debhelper \
|
|
||||||
devscripts \
|
|
||||||
libdistro-info-perl \
|
|
||||||
libglfw3 libglfw3-dev \
|
libglfw3 libglfw3-dev \
|
||||||
libfreeimage3 libfreeimage-dev \
|
libfreeimage3 libfreeimage-dev \
|
||||||
crossbuild-essential-armhf \
|
crossbuild-essential-armhf \
|
||||||
|
@ -3,18 +3,35 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Prepare
|
# Prepare
|
||||||
rm -f debian/changelog
|
|
||||||
PACKAGE='minecraft-pi-reborn'
|
|
||||||
VERSION="$(cat VERSION)"
|
VERSION="$(cat VERSION)"
|
||||||
DISTRO="$(lsb_release -cs)"
|
|
||||||
EDITOR='true' NAME='TheBrokenRail' EMAIL='connor24nolan@live.com' dch -u low -v "${VERSION}" --create --distribution "${DISTRO}" --package "${PACKAGE}" "Release ${VERSION}"
|
|
||||||
|
|
||||||
# Custom Architecture
|
# Common
|
||||||
ARCH="$(dpkg-architecture -qDEB_BUILD_ARCH)"
|
package() {
|
||||||
if [ -z "$1" ]; then
|
local dir="out/$1"
|
||||||
ARCH="$1"
|
|
||||||
fi
|
# Create DEBIAN Dir
|
||||||
|
rm -rf "${dir}/DEBIAN"
|
||||||
|
mkdir -p "${dir}/DEBIAN"
|
||||||
|
cp "debian/$1" "${dir}/DEBIAN/control"
|
||||||
|
|
||||||
|
# Format DEBIAN/control
|
||||||
|
sed -i "s/\${VERSION}/${VERSION}/g" "${dir}/DEBIAN/control"
|
||||||
|
|
||||||
|
# Fix Permissions On Jenkins
|
||||||
|
chmod -R g-s "${dir}"
|
||||||
|
|
||||||
|
# Package
|
||||||
|
dpkg-deb --root-owner-group --build "${dir}" out
|
||||||
|
}
|
||||||
|
|
||||||
# Build
|
# Find And Package
|
||||||
export DEB_CUSTOM_OUTPUT_DIR='out'
|
for dir in out/*; do
|
||||||
debuild --no-lintian -a"${ARCH}" -us -uc --buildinfo-option=-u"${DEB_CUSTOM_OUTPUT_DIR}" --changes-option=-u"${DEB_CUSTOM_OUTPUT_DIR}" -b
|
# Check If Directory Exists
|
||||||
|
if [ -d "${dir}" ]; then
|
||||||
|
# Check If Debian Package Exists
|
||||||
|
pkg="$(basename ${dir})"
|
||||||
|
if [ -f "debian/${pkg}" ]; then
|
||||||
|
package "${pkg}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Add minecraft-pi-reborn-server To PATH
|
# Add minecraft-pi-reborn-server To PATH
|
||||||
export PATH="$(pwd)/out/server-$(dpkg-architecture -qDEB_HOST_ARCH)/usr/bin:${PATH}"
|
export PATH="$(pwd)/out/server-x86_64/usr/bin:${PATH}"
|
||||||
|
|
||||||
# Create Test Directory
|
# Create Test Directory
|
||||||
rm -rf build/test
|
rm -rf build/test
|
||||||
|
Loading…
Reference in New Issue
Block a user