Merge branch 'main' of https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1
This commit is contained in:
81
.github/workflows/build.yml
vendored
81
.github/workflows/build.yml
vendored
@@ -18,7 +18,7 @@ permissions:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
name: Windows Build
|
name: Build Windows
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -68,13 +68,12 @@ jobs:
|
|||||||
name: mcpe-windows
|
name: mcpe-windows
|
||||||
path: |
|
path: |
|
||||||
${{github.workspace}}/build/MinecraftPE.exe
|
${{github.workspace}}/build/MinecraftPE.exe
|
||||||
${{github.workspace}}/build/glfw3.dll
|
|
||||||
${{github.workspace}}/build/libpng16.dll
|
${{github.workspace}}/build/libpng16.dll
|
||||||
${{github.workspace}}/build/OpenAL32.dll
|
${{github.workspace}}/build/OpenAL32.dll
|
||||||
${{github.workspace}}/build/z.dll
|
${{github.workspace}}/build/libz.dll
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
name: Linux Build
|
name: Build Linux
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -120,7 +119,7 @@ jobs:
|
|||||||
${{github.workspace}}/build/MinecraftPE-server
|
${{github.workspace}}/build/MinecraftPE-server
|
||||||
|
|
||||||
build-android: # pray to god
|
build-android: # pray to god
|
||||||
name: Build Android APK (${{ matrix.abi }})
|
name: Build Android (${{ matrix.abi }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
@@ -215,10 +214,59 @@ jobs:
|
|||||||
name: minecraftpe-apk-${{ matrix.abi }}
|
name: minecraftpe-apk-${{ matrix.abi }}
|
||||||
path: ${{ github.workspace }}/build-apk/minecraftpe-*-debug.apk
|
path: ${{ github.workspace }}/build-apk/minecraftpe-*-debug.apk
|
||||||
|
|
||||||
|
build-web:
|
||||||
|
name: Build Web
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup caches
|
||||||
|
uses: ./.github/actions/setup-cache
|
||||||
|
with:
|
||||||
|
host: linux
|
||||||
|
target: linux
|
||||||
|
|
||||||
|
- name: Setup Ninja
|
||||||
|
uses: ./.github/actions/setup-ninja
|
||||||
|
with:
|
||||||
|
host: linux
|
||||||
|
|
||||||
|
- name: Setup emsdk
|
||||||
|
uses: mymindstorm/setup-emsdk@v14
|
||||||
|
with:
|
||||||
|
version: 5.0.3
|
||||||
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
|
||||||
|
- name: Create Build Environment
|
||||||
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
|
# We'll use this as our working directory for all subsequent commands
|
||||||
|
run: cmake -E make_directory ${{github.workspace}}/build
|
||||||
|
|
||||||
|
- name: Configure CMake
|
||||||
|
# Use a bash shell so we can use the same syntax for environment variable
|
||||||
|
# access regardless of the host operating system
|
||||||
|
shell: bash
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -G Ninja -DCMAKE_TOOLCHAIN_FILE="$GITHUB_WORKSPACE/emsdk-cache/emsdk-main/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake"
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
run: cmake --build . --config $BUILD_TYPE --target MinecraftPE --parallel
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: mcpe-web
|
||||||
|
path: |
|
||||||
|
${{github.workspace}}/build/MinecraftPE.js
|
||||||
|
${{github.workspace}}/build/MinecraftPE.wasm
|
||||||
|
${{github.workspace}}/build/MinecraftPE.data
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish
|
name: Publish
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [ build-windows, build-linux, build-android ]
|
needs: [ build-windows, build-linux, build-android, build-web ]
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -236,13 +284,13 @@ jobs:
|
|||||||
- name: Zip Windows Artifacts
|
- name: Zip Windows Artifacts
|
||||||
uses: vimtor/action-zip@v1.2
|
uses: vimtor/action-zip@v1.2
|
||||||
with:
|
with:
|
||||||
files: data mcpe-windows/MinecraftPE.exe mcpe-windows/glfw3.dll mcpe-windows/libpng16.dll mcpe-windows/OpenAL32.dll mcpe-windows/z.dll
|
files: mcpe-windows/MinecraftPE.exe mcpe-windows/libpng16.dll mcpe-windows/OpenAL32.dll mcpe-windows/libz.dll
|
||||||
dest: minecraftpe-${{ steps.ref.outputs.hash }}-windows.zip
|
dest: minecraftpe-${{ steps.ref.outputs.hash }}-windows.zip
|
||||||
|
|
||||||
- name: Zip Linux Artifacts
|
- name: Zip Linux Artifacts
|
||||||
uses: vimtor/action-zip@v1.2
|
uses: vimtor/action-zip@v1.2
|
||||||
with:
|
with:
|
||||||
files: data mcpe-linux/MinecraftPE
|
files: mcpe-linux/MinecraftPE
|
||||||
dest: minecraftpe-${{ steps.ref.outputs.hash }}-linux.zip
|
dest: minecraftpe-${{ steps.ref.outputs.hash }}-linux.zip
|
||||||
|
|
||||||
- name: Zip Linux Server Artifacts
|
- name: Zip Linux Server Artifacts
|
||||||
@@ -263,6 +311,19 @@ jobs:
|
|||||||
files: minecraftpe-apk-armeabi-v7a/minecraftpe-v7a-debug.apk
|
files: minecraftpe-apk-armeabi-v7a/minecraftpe-v7a-debug.apk
|
||||||
dest: minecraftpe-${{ steps.ref.outputs.hash }}-android-armeabi-v7a.zip
|
dest: minecraftpe-${{ steps.ref.outputs.hash }}-android-armeabi-v7a.zip
|
||||||
|
|
||||||
|
- name: Zip Web Artifact
|
||||||
|
uses: vimtor/action-zip@v1.2
|
||||||
|
with:
|
||||||
|
files: mcpe-web/MinecraftPE.js mcpe-web/MinecraftPE.wasm mcpe-web/MinecraftPE.data misc/web/index.html
|
||||||
|
dest: minecraftpe-${{ steps.ref.outputs.hash }}-web.zip
|
||||||
|
|
||||||
|
- name: Zip Data
|
||||||
|
uses: vimtor/action-zip@v1.2
|
||||||
|
with:
|
||||||
|
files: data
|
||||||
|
recursive: false
|
||||||
|
dest: data.zip
|
||||||
|
|
||||||
- name: Update Development Release
|
- name: Update Development Release
|
||||||
uses: andelf/nightly-release@main
|
uses: andelf/nightly-release@main
|
||||||
env:
|
env:
|
||||||
@@ -273,8 +334,10 @@ jobs:
|
|||||||
body: |
|
body: |
|
||||||
MinecraftPE development release for commit ${{ github.sha }}.
|
MinecraftPE development release for commit ${{ github.sha }}.
|
||||||
files: |
|
files: |
|
||||||
|
./data.zip
|
||||||
./minecraftpe-${{ steps.ref.outputs.hash }}-windows.zip
|
./minecraftpe-${{ steps.ref.outputs.hash }}-windows.zip
|
||||||
./minecraftpe-${{ steps.ref.outputs.hash }}-linux.zip
|
./minecraftpe-${{ steps.ref.outputs.hash }}-linux.zip
|
||||||
./minecraftpe-server-${{ steps.ref.outputs.hash }}.zip
|
./minecraftpe-server-${{ steps.ref.outputs.hash }}.zip
|
||||||
./minecraftpe-${{ steps.ref.outputs.hash }}-android-arm64-v8a.zip
|
./minecraftpe-${{ steps.ref.outputs.hash }}-android-arm64-v8a.zip
|
||||||
./minecraftpe-${{ steps.ref.outputs.hash }}-android-armeabi-v7a.zip
|
./minecraftpe-${{ steps.ref.outputs.hash }}-android-armeabi-v7a.zip
|
||||||
|
./minecraftpe-${{ steps.ref.outputs.hash }}-web.zip
|
||||||
@@ -7,10 +7,6 @@ set(CMAKE_CXX_STANDARD 14)
|
|||||||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
|
||||||
set(CMAKE_POLICY_VERSION_MINIMUM 3.10)
|
set(CMAKE_POLICY_VERSION_MINIMUM 3.10)
|
||||||
|
|
||||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
||||||
set(CMAKE_CXX_FLAGS "-Wno-c++11-narrowing -Wno-narrowing -Wno-invalid-source-encoding -Wno-reserved-user-defined-literal")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
include(cmake/EnumOption.cmake)
|
include(cmake/EnumOption.cmake)
|
||||||
|
|
||||||
if(EMSCRIPTEN)
|
if(EMSCRIPTEN)
|
||||||
@@ -26,6 +22,14 @@ find_package(OpenSSL)
|
|||||||
if (${PLATFORM} STREQUAL "Desktop")
|
if (${PLATFORM} STREQUAL "Desktop")
|
||||||
set(PLATFORM_CPP "PLATFORM_DESKTOP")
|
set(PLATFORM_CPP "PLATFORM_DESKTOP")
|
||||||
|
|
||||||
|
if (MINGW)
|
||||||
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||||
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-c++11-narrowing -Wno-narrowing -Wno-invalid-source-encoding -Wno-reserved-user-defined-literal")
|
||||||
|
endif()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
include_directories(misc/windows)
|
include_directories(misc/windows)
|
||||||
@@ -102,6 +106,8 @@ CPMAddPackage(
|
|||||||
"ALSOFT_UTILS OFF"
|
"ALSOFT_UTILS OFF"
|
||||||
"LIBTYPE ${AL_LIBTYPE}"
|
"LIBTYPE ${AL_LIBTYPE}"
|
||||||
"ALSOFT_ENABLE_MODULES OFF"
|
"ALSOFT_ENABLE_MODULES OFF"
|
||||||
|
"ALSOFT_STATIC_STDCXX ON"
|
||||||
|
"ALSOFT_STATIC_LIBGCC ON"
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Clear this paths with *
|
# TODO: Clear this paths with *
|
||||||
@@ -321,7 +327,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
|
|||||||
if(${PLATFORM} MATCHES "Web")
|
if(${PLATFORM} MATCHES "Web")
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
# uuuh i hate it
|
# uuuh i hate it
|
||||||
set(EM_FLAGS "-pthread -sUSE_PTHREADS=1 -sSHARED_MEMORY=1")
|
set(EM_FLAGS "-pthread -sUSE_PTHREADS=1 -sUSE_LIBPNG=1 -sSHARED_MEMORY=1")
|
||||||
|
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EM_FLAGS}")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EM_FLAGS}")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EM_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EM_FLAGS}")
|
||||||
|
|||||||
Reference in New Issue
Block a user