diff --git a/.github/workflows/appimage.yml b/.github/workflows/appimage.yml index 5bfebeb4d..7b53b3fbf 100644 --- a/.github/workflows/appimage.yml +++ b/.github/workflows/appimage.yml @@ -50,13 +50,13 @@ jobs: - name: Run engine tests timeout-minutes: 5 run: | - chmod +x build/VoxelEngine + chmod +x build/VoxelCore 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 uses: AppImageCrafters/build-appimage-action@fe2205a4d6056be47051f7b1b3811106e9814910 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: recipe: dev/AppImageBuilder.yml - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 52f7b7183..6956a1f3d 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -62,7 +62,7 @@ jobs: # Build your program with the given configuration run: | cmake --build ${{github.workspace}}/build --config ${{inputs.build_type}} - mv ${{github.workspace}}/build/VoxelEngine VoxelEngine + mv ${{github.workspace}}/build/VoxelCore VoxelCore - name: Run tests if: ${{ inputs.run_tests }} run: ctest --test-dir ${{github.workspace}}/build @@ -70,7 +70,7 @@ jobs: if: ${{ inputs.upload_artifacts }} uses: actions/upload-artifact@v4 with: - name: VoxelEngine + name: VoxelCore path: | - VoxelEngine + VoxelCore res/* diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index b4d9f6328..a446821d8 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -39,7 +39,7 @@ jobs: run: chmod +x dev/fix_dylibs.sh - name: Fix dylibs - run: ./dev/fix_dylibs.sh VoxelEngine Release build + run: ./dev/fix_dylibs.sh VoxelCore Release build - name: Run tests run: ctest --output-on-failure --test-dir build @@ -47,19 +47,19 @@ jobs: - name: Run engine tests timeout-minutes: 5 run: | - chmod +x build/VoxelEngine + chmod +x build/VoxelCore 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 run: | - mkdir VoxelEngineDmgContent - cp -r build/res VoxelEngineDmgContent/ - cp -r build/VoxelEngine VoxelEngineDmgContent/ - cp -r build/libs VoxelEngineDmgContent/libs - hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO + mkdir VoxelCoreDmgContent + cp -r build/res VoxelCoreDmgContent/ + cp -r build/VoxelCore VoxelCoreDmgContent/ + cp -r build/libs VoxelCoreDmgContent/libs + hdiutil create VoxelCoreMacApp.dmg -volname "VoxelCore" -srcfolder VoxelCoreDmgContent -ov -format UDZO - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: VoxelEngineMacOs - path: VoxelEngineMacApp.dmg + name: VoxelCoreMacOs + path: VoxelCoreMacApp.dmg diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8a1d17c64..f6b539ba1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,7 +48,7 @@ jobs: mkdir release mv ./artifacts/AppImage/VoxelCore-latest-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 (cd ./artifacts/Windows-Build && zip -r ../../release/voxelcore-${RELEASE_VERSION}_win64.zip .) ls -la ./release diff --git a/.github/workflows/windows-clang.yml b/.github/workflows/windows-clang.yml index 5dd91a576..1fe591ac8 100644 --- a/.github/workflows/windows-clang.yml +++ b/.github/workflows/windows-clang.yml @@ -59,11 +59,10 @@ jobs: run: | mkdir packaged mkdir packaged/res - cp build/VoxelEngine.exe packaged/ + cp build/VoxelCore.exe packaged/ cp build/vctest/vctest.exe packaged/ cp build/*.dll packaged/ cp -r build/res/* packaged/res/ - mv packaged/VoxelEngine.exe packaged/VoxelCore.exe - uses: actions/upload-artifact@v4 with: name: Windows-Build diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index ffcb0c318..ec5322bc0 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -37,7 +37,7 @@ jobs: run: ctest --preset default-vs-msvc-windows - name: Run engine tests 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 - name: Package for Windows run: | @@ -45,7 +45,6 @@ jobs: cp -r build/RelWithDebInfo/* packaged/ cp build/vctest/RelWithDebInfo/vctest.exe packaged/ cp C:/Windows/System32/msvcp140.dll packaged/msvcp140.dll - mv packaged/VoxelEngine.exe packaged/VoxelCore.exe working-directory: ${{ github.workspace }} - uses: actions/upload-artifact@v4 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 27a9d507b..a9ac24a1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(VoxelEngine) +project(VoxelCore) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -27,23 +27,23 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") endif() add_subdirectory(src) -add_executable(VoxelEngine src/main.cpp) +add_executable(VoxelCore src/main.cpp) if(VOXELENGINE_BUILD_APPDIR) include(${CMAKE_CURRENT_SOURCE_DIR}/dev/cmake/BuildAppdir.cmake) endif() -target_link_libraries(VoxelEngine PRIVATE VoxelEngineSrc +target_link_libraries(VoxelCore PRIVATE VoxelCoreSrc $<$:winmm>) -target_link_options(VoxelEngine PRIVATE $<$:-no-pie>) +target_link_options(VoxelCore PRIVATE $<$:-no-pie>) # Deploy res to build dir add_custom_command( - TARGET VoxelEngine + TARGET VoxelCore POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different - ${CMAKE_CURRENT_SOURCE_DIR}/res $/res) + ${CMAKE_CURRENT_SOURCE_DIR}/res $/res) if(VOXELENGINE_BUILD_TESTS) enable_testing() diff --git a/Dockerfile b/Dockerfile index 3a06d1afc..fb1a628c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # 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" -# 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 LABEL Description="Docker container for building VoxelCore for Linux" diff --git a/README.md b/README.md index 67788d9fd..d040e7707 100644 --- a/README.md +++ b/README.md @@ -188,7 +188,7 @@ docker run --rm -it \ -v "$XAUTHORITY:/home/user/.Xauthority:ro" \ -e DISPLAY="$DISPLAY" \ --network=host \ - voxel-engine ./build/VoxelEngine + voxel-engine ./build/VoxelCore ``` ### 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 ```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 ``` diff --git a/dev/AppImageBuilder.yml b/dev/AppImageBuilder.yml index b2c7f09ec..bed1dde47 100644 --- a/dev/AppImageBuilder.yml +++ b/dev/AppImageBuilder.yml @@ -6,7 +6,7 @@ AppDir: name: VoxelCore icon: VoxelCore version: latest - exec: usr/bin/VoxelEngine + exec: usr/bin/VoxelCore exec_args: --dir $HOME/.config/voxelcore --res $APPDIR/usr/share/VoxelCore/res $@ apt: arch: amd64 diff --git a/dev/VoxelCore.desktop b/dev/VoxelCore.desktop index 48809b392..eeaf4be30 100644 --- a/dev/VoxelCore.desktop +++ b/dev/VoxelCore.desktop @@ -3,8 +3,8 @@ Version=1.0 Type=Application Name=VoxelCore Comment=Minecraft-like game engine in C++ with OpenGL -TryExec=VoxelEngine -Exec=VoxelEngine +TryExec=VoxelCore +Exec=VoxelCore Icon=VoxelCore MimeType=image/x-foo; Categories=Game; diff --git a/dev/cmake/BuildAppdir.cmake b/dev/cmake/BuildAppdir.cmake index e3a017e94..7445d1016 100644 --- a/dev/cmake/BuildAppdir.cmake +++ b/dev/cmake/BuildAppdir.cmake @@ -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_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/AppDir/usr/lib) 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) diff --git a/dev/tests/network_http.lua b/dev/tests/network_http.lua index 12149de09..76fd7f54e 100644 --- a/dev/tests/network_http.lua +++ b/dev/tests/network_http.lua @@ -1,6 +1,6 @@ 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) response_received = true end, function (code) diff --git a/doc/en/scripting/builtins/libnetwork.md b/doc/en/scripting/builtins/libnetwork.md index 8893407d4..ecd76bbf3 100644 --- a/doc/en/scripting/builtins/libnetwork.md +++ b/doc/en/scripting/builtins/libnetwork.md @@ -50,7 +50,7 @@ network.get( ) -- 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 end) diff --git a/doc/ru/scripting/builtins/libnetwork.md b/doc/ru/scripting/builtins/libnetwork.md index c60f0f178..2c322405e 100644 --- a/doc/ru/scripting/builtins/libnetwork.md +++ b/doc/ru/scripting/builtins/libnetwork.md @@ -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) -- выведет имя последнего релиза движка end) diff --git a/doc/specs/binary_json_spec.md b/doc/specs/binary_json_spec.md index 46ed868d6..4bed562e4 100644 --- a/doc/specs/binary_json_spec.md +++ b/doc/specs/binary_json_spec.md @@ -2,7 +2,7 @@ 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 diff --git a/flake.nix b/flake.nix index 83b5cc955..cb6bfe6ca 100644 --- a/flake.nix +++ b/flake.nix @@ -56,7 +56,7 @@ installPhase = '' mkdir -p $out/bin - cp VoxelEngine $out/bin/ + cp VoxelCore $out/bin/ ''; }; in @@ -64,7 +64,7 @@ packages.default = voxel-core; apps.default = { type = "app"; - program = "${voxel-core}/bin/VoxelEngine"; + program = "${voxel-core}/bin/VoxelCore"; }; } ); diff --git a/run.sh b/run.sh index 612f06935..40532ad5c 100755 --- a/run.sh +++ b/run.sh @@ -62,5 +62,5 @@ done if [[ $run ]]; then echo "[RUN SCRIPT] Run project" - ./build/VoxelEngine -fi \ No newline at end of file + ./build/VoxelCore +fi diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 802c06e1a..8eae55c33 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,10 +1,10 @@ -project(VoxelEngineSrc) +project(VoxelCoreSrc) file(GLOB_RECURSE headers ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp) file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.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(GLEW REQUIRED) @@ -70,10 +70,10 @@ else() add_library(luajit::luajit ALIAS PkgConfig::luajit) endif() -target_include_directories(VoxelEngineSrc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(VoxelCoreSrc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( - VoxelEngineSrc + VoxelCoreSrc PRIVATE glfw OpenGL::GL GLEW::GLEW @@ -91,7 +91,7 @@ target_link_libraries( ) target_compile_options( - VoxelEngineSrc + VoxelCoreSrc PUBLIC $<$: /utf-8 /MP @@ -129,7 +129,7 @@ target_compile_options( >) target_link_options( - VoxelEngineSrc + VoxelCoreSrc PUBLIC $<$: -no-pie diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e2aae2a74..708fb8da1 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,22 +1,22 @@ -project(VoxelEngineTest) +project(VoxelCoreTest) file(GLOB_RECURSE sources ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp) 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 # and non MultiConfig builds. Delete in future and use only root res folder Also # this resolve problem with ctests, because it set cwd to # ${CMAKE_CURRENT_BINARY_DIR} add_custom_command( - TARGET VoxelEngineTest + TARGET VoxelCoreTest POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory_if_different ${CMAKE_SOURCE_DIR}/res ${CMAKE_CURRENT_BINARY_DIR}/res) include(GoogleTest) -gtest_discover_tests(VoxelEngineTest) +gtest_discover_tests(VoxelCoreTest) diff --git a/test/network/curltest.cpp b/test/network/curltest.cpp index e7fc4840d..44a5bb38e 100644 --- a/test/network/curltest.cpp +++ b/test/network/curltest.cpp @@ -8,7 +8,7 @@ TEST(curltest, curltest) { auto network = network::Network::create(settings); 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"; request.onResponse = [](network::HttpResponse response) { if (response.body.empty()) {