mirror of
https://github.com/celisej567/mcpe.git
synced 2025-12-31 17:49:17 +03:00
Add GitHub Actions
This commit is contained in:
27
.github/workflows/build.yml
vendored
Normal file
27
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
name: 'Build'
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: true
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y build-essential cmake ninja-build libopenal-dev libsdl2-dev
|
||||
- name: Build Desktop
|
||||
run: |
|
||||
cd platforms/sdl
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -GNinja ..
|
||||
cmake --build .
|
||||
- name: Build WASM
|
||||
run: ./build-wasm.sh
|
||||
@@ -274,3 +274,11 @@ else()
|
||||
find_package(OpenGL REQUIRED)
|
||||
target_link_libraries(reminecraftpe-core PUBLIC OpenGL::OpenGL OpenGL::GLU)
|
||||
endif()
|
||||
|
||||
# Sound Data
|
||||
if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../sound_data/sounds.h")
|
||||
if(NOT DEFINED ENV{CI})
|
||||
message(WARNING "Missing sound data! Did you run tools/grabsounds.py?")
|
||||
endif()
|
||||
target_compile_definitions(reminecraftpe-core PRIVATE MISSING_SOUND_DATA)
|
||||
endif()
|
||||
|
||||
@@ -15,4 +15,6 @@
|
||||
// Check the readme for a guide on how to extract game sounds from the
|
||||
// mcpe01_canada.apk file.
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef MISSING_SOUND_DATA
|
||||
#include "../../sound_data/sounds.h"
|
||||
#endif
|
||||
|
||||
@@ -23,6 +23,7 @@ void SoundEngine::init(Options* options)
|
||||
// TODO: Who's the genius who decided it'd be better to check a name string rather than an enum?
|
||||
m_pOptions = options;
|
||||
|
||||
#ifndef MISSING_SOUND_DATA
|
||||
m_repository.add("step.cloth", SA_cloth1);
|
||||
m_repository.add("step.cloth", SA_cloth2);
|
||||
m_repository.add("step.cloth", SA_cloth3);
|
||||
@@ -56,6 +57,7 @@ void SoundEngine::init(Options* options)
|
||||
m_repository.add("random.splash", SA_splash);
|
||||
m_repository.add("random.explode", SA_explode);
|
||||
m_repository.add("random.click", SA_click);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SoundEngine::play(const std::string& name)
|
||||
|
||||
Reference in New Issue
Block a user