complete the rename of voxelengine to voxelcore

This commit is contained in:
MihailRis 2026-10-10 10:54:36 +03:00
parent a875630cd8
commit 8962042627
21 changed files with 52 additions and 54 deletions

View file

@ -50,13 +50,13 @@ jobs:
- name: Run engine tests - name: Run engine tests
timeout-minutes: 5 timeout-minutes: 5
run: | run: |
chmod +x build/VoxelEngine chmod +x build/VoxelCore
chmod +x AppDir/usr/bin/vctest chmod +x AppDir/usr/bin/vctest
AppDir/usr/bin/vctest -e build/VoxelEngine -d dev/tests -u build --memchecker valgrind AppDir/usr/bin/vctest -e build/VoxelCore -d dev/tests -u build --memchecker valgrind
- name: Build AppImage - name: Build AppImage
uses: AppImageCrafters/build-appimage-action@fe2205a4d6056be47051f7b1b3811106e9814910 uses: AppImageCrafters/build-appimage-action@fe2205a4d6056be47051f7b1b3811106e9814910
env: env:
UPDATE_INFO: gh-releases-zsync|MihailRis|VoxelEngine-Cpp|latest|*x86_64.AppImage.zsync UPDATE_INFO: gh-releases-zsync|MihailRis|voxelcore|latest|*x86_64.AppImage.zsync
with: with:
recipe: dev/AppImageBuilder.yml recipe: dev/AppImageBuilder.yml
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4

View file

@ -62,7 +62,7 @@ jobs:
# Build your program with the given configuration # Build your program with the given configuration
run: | run: |
cmake --build ${{github.workspace}}/build --config ${{inputs.build_type}} cmake --build ${{github.workspace}}/build --config ${{inputs.build_type}}
mv ${{github.workspace}}/build/VoxelEngine VoxelEngine mv ${{github.workspace}}/build/VoxelCore VoxelCore
- name: Run tests - name: Run tests
if: ${{ inputs.run_tests }} if: ${{ inputs.run_tests }}
run: ctest --test-dir ${{github.workspace}}/build run: ctest --test-dir ${{github.workspace}}/build
@ -70,7 +70,7 @@ jobs:
if: ${{ inputs.upload_artifacts }} if: ${{ inputs.upload_artifacts }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: VoxelEngine name: VoxelCore
path: | path: |
VoxelEngine VoxelCore
res/* res/*

View file

@ -39,7 +39,7 @@ jobs:
run: chmod +x dev/fix_dylibs.sh run: chmod +x dev/fix_dylibs.sh
- name: Fix dylibs - name: Fix dylibs
run: ./dev/fix_dylibs.sh VoxelEngine Release build run: ./dev/fix_dylibs.sh VoxelCore Release build
- name: Run tests - name: Run tests
run: ctest --output-on-failure --test-dir build run: ctest --output-on-failure --test-dir build
@ -47,19 +47,19 @@ jobs:
- name: Run engine tests - name: Run engine tests
timeout-minutes: 5 timeout-minutes: 5
run: | run: |
chmod +x build/VoxelEngine chmod +x build/VoxelCore
chmod +x AppDir/usr/bin/vctest chmod +x AppDir/usr/bin/vctest
AppDir/usr/bin/vctest -e build/VoxelEngine -d dev/tests -u build --output-always --debugger "lldb -batch -o 'run' -o 'thread backtrace all' -o 'quit' -- " AppDir/usr/bin/vctest -e build/VoxelCore -d dev/tests -u build --output-always --debugger "lldb -batch -o 'run' -o 'thread backtrace all' -o 'quit' -- "
- name: Create DMG - name: Create DMG
run: | run: |
mkdir VoxelEngineDmgContent mkdir VoxelCoreDmgContent
cp -r build/res VoxelEngineDmgContent/ cp -r build/res VoxelCoreDmgContent/
cp -r build/VoxelEngine VoxelEngineDmgContent/ cp -r build/VoxelCore VoxelCoreDmgContent/
cp -r build/libs VoxelEngineDmgContent/libs cp -r build/libs VoxelCoreDmgContent/libs
hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO hdiutil create VoxelCoreMacApp.dmg -volname "VoxelCore" -srcfolder VoxelCoreDmgContent -ov -format UDZO
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: VoxelEngineMacOs name: VoxelCoreMacOs
path: VoxelEngineMacApp.dmg path: VoxelCoreMacApp.dmg

View file

@ -48,7 +48,7 @@ jobs:
mkdir release mkdir release
mv ./artifacts/AppImage/VoxelCore-latest-x86_64.AppImage \ mv ./artifacts/AppImage/VoxelCore-latest-x86_64.AppImage \
./release/voxelcore-${RELEASE_VERSION}_x86-64.AppImage ./release/voxelcore-${RELEASE_VERSION}_x86-64.AppImage
mv ./artifacts/VoxelEngineMacOs/VoxelEngineMacApp.dmg \ mv ./artifacts/VoxelCoreMacOs/VoxelCoreMacApp.dmg \
./release/voxelcore-${RELEASE_VERSION}_macos.dmg ./release/voxelcore-${RELEASE_VERSION}_macos.dmg
(cd ./artifacts/Windows-Build && zip -r ../../release/voxelcore-${RELEASE_VERSION}_win64.zip .) (cd ./artifacts/Windows-Build && zip -r ../../release/voxelcore-${RELEASE_VERSION}_win64.zip .)
ls -la ./release ls -la ./release

View file

@ -59,11 +59,10 @@ jobs:
run: | run: |
mkdir packaged mkdir packaged
mkdir packaged/res mkdir packaged/res
cp build/VoxelEngine.exe packaged/ cp build/VoxelCore.exe packaged/
cp build/vctest/vctest.exe packaged/ cp build/vctest/vctest.exe packaged/
cp build/*.dll packaged/ cp build/*.dll packaged/
cp -r build/res/* packaged/res/ cp -r build/res/* packaged/res/
mv packaged/VoxelEngine.exe packaged/VoxelCore.exe
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:
name: Windows-Build name: Windows-Build

View file

@ -37,7 +37,7 @@ jobs:
run: ctest --preset default-vs-msvc-windows run: ctest --preset default-vs-msvc-windows
- name: Run engine tests - name: Run engine tests
run: | run: |
build/vctest/RelWithDebInfo/vctest.exe -e build/RelWithDebInfo/VoxelEngine.exe -d dev/tests -u build build/vctest/RelWithDebInfo/vctest.exe -e build/RelWithDebInfo/VoxelCore.exe -d dev/tests -u build
timeout-minutes: 5 timeout-minutes: 5
- name: Package for Windows - name: Package for Windows
run: | run: |
@ -45,7 +45,6 @@ jobs:
cp -r build/RelWithDebInfo/* packaged/ cp -r build/RelWithDebInfo/* packaged/
cp build/vctest/RelWithDebInfo/vctest.exe packaged/ cp build/vctest/RelWithDebInfo/vctest.exe packaged/
cp C:/Windows/System32/msvcp140.dll packaged/msvcp140.dll cp C:/Windows/System32/msvcp140.dll packaged/msvcp140.dll
mv packaged/VoxelEngine.exe packaged/VoxelCore.exe
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with:

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5) cmake_minimum_required(VERSION 3.5)
project(VoxelEngine) project(VoxelCore)
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_STANDARD_REQUIRED ON)
@ -27,23 +27,23 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
endif() endif()
add_subdirectory(src) add_subdirectory(src)
add_executable(VoxelEngine src/main.cpp) add_executable(VoxelCore src/main.cpp)
if(VOXELENGINE_BUILD_APPDIR) if(VOXELENGINE_BUILD_APPDIR)
include(${CMAKE_CURRENT_SOURCE_DIR}/dev/cmake/BuildAppdir.cmake) include(${CMAKE_CURRENT_SOURCE_DIR}/dev/cmake/BuildAppdir.cmake)
endif() endif()
target_link_libraries(VoxelEngine PRIVATE VoxelEngineSrc target_link_libraries(VoxelCore PRIVATE VoxelCoreSrc
$<$<PLATFORM_ID:Windows>:winmm>) $<$<PLATFORM_ID:Windows>:winmm>)
target_link_options(VoxelEngine PRIVATE $<$<CXX_COMPILER_ID:GNU>:-no-pie>) target_link_options(VoxelCore PRIVATE $<$<CXX_COMPILER_ID:GNU>:-no-pie>)
# Deploy res to build dir # Deploy res to build dir
add_custom_command( add_custom_command(
TARGET VoxelEngine TARGET VoxelCore
POST_BUILD POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
${CMAKE_CURRENT_SOURCE_DIR}/res $<TARGET_FILE_DIR:VoxelEngine>/res) ${CMAKE_CURRENT_SOURCE_DIR}/res $<TARGET_FILE_DIR:VoxelCore>/res)
if(VOXELENGINE_BUILD_TESTS) if(VOXELENGINE_BUILD_TESTS)
enable_testing() enable_testing()

View file

@ -1,6 +1,6 @@
# Build docker container: docker build -t voxelcore . # Build docker container: docker build -t voxelcore .
# Build project: docker run --rm -it -v$(pwd):/project voxelcore bash -c "cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -Bbuild && cmake --build build" # Build project: docker run --rm -it -v$(pwd):/project voxelcore bash -c "cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE -Bbuild && cmake --build build"
# Run project in docker: docker run --rm -it -v$(pwd):/project -v/tmp/.X11-unix:/tmp/.X11-unix -v${XAUTHORITY}:/home/user/.Xauthority:ro -eDISPLAY --network=host voxelcore ./build/VoxelEngine # Run project in docker: docker run --rm -it -v$(pwd):/project -v/tmp/.X11-unix:/tmp/.X11-unix -v${XAUTHORITY}:/home/user/.Xauthority:ro -eDISPLAY --network=host voxelcore ./build/VoxelCore
FROM debian:bookworm-slim FROM debian:bookworm-slim
LABEL Description="Docker container for building VoxelCore for Linux" LABEL Description="Docker container for building VoxelCore for Linux"

View file

@ -188,7 +188,7 @@ docker run --rm -it \
-v "$XAUTHORITY:/home/user/.Xauthority:ro" \ -v "$XAUTHORITY:/home/user/.Xauthority:ro" \
-e DISPLAY="$DISPLAY" \ -e DISPLAY="$DISPLAY" \
--network=host \ --network=host \
voxel-engine ./build/VoxelEngine voxel-engine ./build/VoxelCore
``` ```
### On Windows ### On Windows
@ -218,5 +218,5 @@ docker run --rm -it -v "${PWD}:/project" voxel-engine bash -c "cmake -DCMAKE_BUI
#### Step 4. Run the application #### Step 4. Run the application
```powershell ```powershell
docker run --rm -it -v "${PWD}:/project" -e DISPLAY=host.docker.internal:0.0 --network=host voxel-engine ./build/VoxelEngine docker run --rm -it -v "${PWD}:/project" -e DISPLAY=host.docker.internal:0.0 --network=host voxel-engine ./build/VoxelCore
``` ```

View file

@ -6,7 +6,7 @@ AppDir:
name: VoxelCore name: VoxelCore
icon: VoxelCore icon: VoxelCore
version: latest version: latest
exec: usr/bin/VoxelEngine exec: usr/bin/VoxelCore
exec_args: --dir $HOME/.config/voxelcore --res $APPDIR/usr/share/VoxelCore/res $@ exec_args: --dir $HOME/.config/voxelcore --res $APPDIR/usr/share/VoxelCore/res $@
apt: apt:
arch: amd64 arch: amd64

View file

@ -3,8 +3,8 @@ Version=1.0
Type=Application Type=Application
Name=VoxelCore Name=VoxelCore
Comment=Minecraft-like game engine in C++ with OpenGL Comment=Minecraft-like game engine in C++ with OpenGL
TryExec=VoxelEngine TryExec=VoxelCore
Exec=VoxelEngine Exec=VoxelCore
Icon=VoxelCore Icon=VoxelCore
MimeType=image/x-foo; MimeType=image/x-foo;
Categories=Game; Categories=Game;

View file

@ -12,4 +12,4 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/dev/VoxelCore.desktop DESTINATION ${CMAKE_
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/lib) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/bin) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/bin)
install(TARGETS VoxelEngine DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/bin) install(TARGETS VoxelCore DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/bin)

View file

@ -1,6 +1,6 @@
local response_received = false local response_received = false
network.get("https://api.github.com/repos/MihailRis/VoxelEngine-Cpp/releases/latest", function (s) network.get("https://api.github.com/repos/MihailRis/voxelcore/releases/latest", function (s)
print(json.parse(s).name) print(json.parse(s).name)
response_received = true response_received = true
end, function (code) end, function (code)

View file

@ -50,7 +50,7 @@ network.get(
) )
-- Example: -- Example:
network.get("https://api.github.com/repos/MihailRis/VoxelEngine-Cpp/releases/latest", function (s) network.get("https://api.github.com/repos/MihailRis/voxelcore/releases/latest", function (s)
print(json.parse(s).name) -- will output the name of the latest engine release print(json.parse(s).name) -- will output the name of the latest engine release
end) end)

View file

@ -50,7 +50,7 @@ network.get(
) )
-- Пример: -- Пример:
network.get("https://api.github.com/repos/MihailRis/VoxelEngine-Cpp/releases/latest", function (s) network.get("https://api.github.com/repos/MihailRis/voxelcore/releases/latest", function (s)
print(json.parse(s).name) -- выведет имя последнего релиза движка print(json.parse(s).name) -- выведет имя последнего релиза движка
end) end)

View file

@ -2,7 +2,7 @@
Format version: 1.1 Format version: 1.1
This binary data format is developed for use as binary version of JSON in [VoxelEngine-Cpp](https://github.com/MihailRis/VoxelEngine-Cpp) and not compatible with [BSON](https://bsonspec.org/spec.html) due to elements/entries syntax and type codes differences This binary data format is developed for use as binary version of JSON in [voxelcore](https://github.com/MihailRis/voxelcore) and not compatible with [BSON](https://bsonspec.org/spec.html) due to elements/entries syntax and type codes differences
## Basic types ## Basic types

View file

@ -56,7 +56,7 @@
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
cp VoxelEngine $out/bin/ cp VoxelCore $out/bin/
''; '';
}; };
in in
@ -64,7 +64,7 @@
packages.default = voxel-core; packages.default = voxel-core;
apps.default = { apps.default = {
type = "app"; type = "app";
program = "${voxel-core}/bin/VoxelEngine"; program = "${voxel-core}/bin/VoxelCore";
}; };
} }
); );

4
run.sh
View file

@ -62,5 +62,5 @@ done
if [[ $run ]]; then if [[ $run ]]; then
echo "[RUN SCRIPT] Run project" echo "[RUN SCRIPT] Run project"
./build/VoxelEngine ./build/VoxelCore
fi fi

View file

@ -1,10 +1,10 @@
project(VoxelEngineSrc) project(VoxelCoreSrc)
file(GLOB_RECURSE headers ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) file(GLOB_RECURSE headers ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp)
file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp) list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/main.cpp)
add_library(VoxelEngineSrc STATIC ${sources} ${headers}) add_library(VoxelCoreSrc STATIC ${sources} ${headers})
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED) find_package(GLEW REQUIRED)
@ -70,10 +70,10 @@ else()
add_library(luajit::luajit ALIAS PkgConfig::luajit) add_library(luajit::luajit ALIAS PkgConfig::luajit)
endif() endif()
target_include_directories(VoxelEngineSrc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(VoxelCoreSrc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries( target_link_libraries(
VoxelEngineSrc VoxelCoreSrc
PRIVATE glfw PRIVATE glfw
OpenGL::GL OpenGL::GL
GLEW::GLEW GLEW::GLEW
@ -91,7 +91,7 @@ target_link_libraries(
) )
target_compile_options( target_compile_options(
VoxelEngineSrc VoxelCoreSrc
PUBLIC $<$<CXX_COMPILER_ID:MSVC>: PUBLIC $<$<CXX_COMPILER_ID:MSVC>:
/utf-8 /utf-8
/MP /MP
@ -129,7 +129,7 @@ target_compile_options(
>) >)
target_link_options( target_link_options(
VoxelEngineSrc VoxelCoreSrc
PUBLIC PUBLIC
$<$<CXX_COMPILER_ID:GNU>: $<$<CXX_COMPILER_ID:GNU>:
-no-pie -no-pie

View file

@ -1,22 +1,22 @@
project(VoxelEngineTest) project(VoxelCoreTest)
file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
find_package(GTest) find_package(GTest)
add_executable(VoxelEngineTest ${sources}) add_executable(VoxelCoreTest ${sources})
target_link_libraries(VoxelEngineTest PRIVATE VoxelEngineSrc GTest::gtest_main) target_link_libraries(VoxelCoreTest PRIVATE VoxelCoreSrc GTest::gtest_main)
# HACK: copy res to test/ folder for fixing problem compatibility MultiConfig # HACK: copy res to test/ folder for fixing problem compatibility MultiConfig
# and non MultiConfig builds. Delete in future and use only root res folder Also # and non MultiConfig builds. Delete in future and use only root res folder Also
# this resolve problem with ctests, because it set cwd to # this resolve problem with ctests, because it set cwd to
# ${CMAKE_CURRENT_BINARY_DIR} # ${CMAKE_CURRENT_BINARY_DIR}
add_custom_command( add_custom_command(
TARGET VoxelEngineTest TARGET VoxelCoreTest
POST_BUILD POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different
${CMAKE_SOURCE_DIR}/res ${CMAKE_CURRENT_BINARY_DIR}/res) ${CMAKE_SOURCE_DIR}/res ${CMAKE_CURRENT_BINARY_DIR}/res)
include(GoogleTest) include(GoogleTest)
gtest_discover_tests(VoxelEngineTest) gtest_discover_tests(VoxelCoreTest)

View file

@ -8,7 +8,7 @@ TEST(curltest, curltest) {
auto network = network::Network::create(settings); auto network = network::Network::create(settings);
network::HttpRequest request {}; network::HttpRequest request {};
request.url = "https://raw.githubusercontent.com/MihailRis/VoxelEngine-Cpp/refs/" request.url = "https://raw.githubusercontent.com/MihailRis/voxelcore/refs/"
"heads/curl/res/content/base/blocks/lamp.json"; "heads/curl/res/content/base/blocks/lamp.json";
request.onResponse = [](network::HttpResponse response) { request.onResponse = [](network::HttpResponse response) {
if (response.body.empty()) { if (response.body.empty()) {