diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ede807583e..5363d82bf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,7 +134,7 @@ jobs: wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list sudo apt-get update - sudo apt-get install -y libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ + sudo apt-get install -y libpulse-dev libglvnd-dev libx11-dev libopenal-dev libvulkan-dev \ libgl1-mesa-dev libgles2-mesa-dev libglu1-mesa-dev libgtk-3-dev ninja-build dotnet-sdk-3.1 \ xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev zenity diff --git a/.gitignore b/.gitignore index f411418317..6721e3cbde 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,9 @@ Dev/release/runtimes/ Dev/release/resources/fonts/ Dev/release/resources/icons/ Dev/release/tools/ +Dev/release/ref/ +Dev/release/createdump +Dev/release/Effekseer* Dev/Cpp/include/ Dev/Cpp/lib/ @@ -57,3 +60,5 @@ mono_crash.*.json mono_crash.*.blob Script/__pycache__/aceutils.cpython-37.pyc Tool/fbxsdk + +EffekseerTool/ \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index bbff29b4e5..aea6f04ddd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -238,9 +238,13 @@ if(BUILD_VIEWER) ) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/include) list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib) + if(EXISTS "${ExternalProject_libpng_INSTALL_DIR}/lib64") + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libpng/lib64) + endif() if(MSVC) set(LIBPNG_LIB_DEBUG "libpng16_staticd") + set(LIBPNG_LIB_RELEASE "libpng16_static") elseif(BUILD_WITH_POSTFIX) set(LIBPNG_LIB_DEBUG "png16d") @@ -282,6 +286,10 @@ if(BUILD_VIEWER) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/include) list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib) + if(EXISTS "${ExternalProject_libgd_INSTALL_DIR}/lib64") + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/libgd/lib64) + endif() + # OpenSoundMixer ExternalProject_Add( @@ -311,23 +319,28 @@ endif() if(BUILD_VIEWER OR BUILD_TEST) # glew if(NOT APPLE) - ExternalProject_Add( - ExternalProject_glew - SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Downloads/glew - PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Build/glew - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew - PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Dev/3rdPartyPatch/glew-CMakeLists.txt /CMakeLists.txt - CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew - -DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_CURRENT_SOURCE_DIR}/Dev/CFlagOverrides.cmake - -DEFK_USE_MSVC_RUNTIME_LIBRARY_DLL=${USE_MSVC_RUNTIME_LIBRARY_DLL} - -DSANITIZE_ENABLED=${SANITIZE_ENABLED} - -DBUILD_SHARED_LIBS=OFF - -DGLEW_BUILD_INFO=OFF - -DBUILD_UTILS=OFF - -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true - ) - list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/include) - list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) + ExternalProject_Add( + ExternalProject_glew + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/Downloads/glew + PREFIX ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Build/glew + INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew + PATCH_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/Dev/3rdPartyPatch/glew-CMakeLists.txt /CMakeLists.txt + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew + -DCMAKE_USER_MAKE_RULES_OVERRIDE=${CMAKE_CURRENT_SOURCE_DIR}/Dev/CFlagOverrides.cmake + -DEFK_USE_MSVC_RUNTIME_LIBRARY_DLL=${USE_MSVC_RUNTIME_LIBRARY_DLL} + -DSANITIZE_ENABLED=${SANITIZE_ENABLED} + -DBUILD_SHARED_LIBS=OFF + -DGLEW_BUILD_INFO=OFF + -DBUILD_UTILS=OFF + -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true + ) + + list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/include) + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib) + if(EXISTS "${ExternalProject_glew_INSTALL_DIR}/lib64") + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glew/lib64) + endif() + endif() endif() @@ -360,6 +373,9 @@ if(BUILD_VIEWER OR BUILD_EXAMPLES OR BUILD_TEST) list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/include) list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib) + if(EXISTS "${ExternalProject_glfw_INSTALL_DIR}/lib64") + list(APPEND EFK_THIRDPARTY_LIBRARY_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/ThirdParty/Install/glfw/lib64) + endif() endif() list(APPEND EFK_THIRDPARTY_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/Dev/Cpp/3rdParty/flatbuffers/include) diff --git a/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h b/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h index dc46456e4b..200d59ab07 100644 --- a/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h +++ b/Dev/Cpp/3rdParty/flatbuffers/include/flatbuffers/stl_emulation.h @@ -627,7 +627,7 @@ class span FLATBUFFERS_FINAL_CLASS { private: // This is a naive implementation with 'count_' member even if (Extent != dynamic_extent). pointer const data_; - const size_type count_; + size_type count_; // https://github.com/google/flatbuffers/pull/7227 }; #if !defined(FLATBUFFERS_SPAN_MINIMAL) diff --git a/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp b/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp index 8f6ad009a5..13ea3e20b7 100644 --- a/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp +++ b/Dev/Cpp/EditorCommon/GUI/MainWindow.cpp @@ -74,6 +74,12 @@ bool MainWindow::InitializeInternal(const char16_t* title, MainWindowState state float yscale = 1.0f; glfwGetMonitorContentScale(primary, &xscale, &yscale); dpiScale_ = xscale; +#elif defined(__linux__) + GLFWmonitor* primary = glfwGetPrimaryMonitor(); + float xscale = 1.0f; + float yscale = 1.0f; + glfwGetMonitorContentScale(primary, &xscale, &yscale); + dpiScale_ = xscale; #endif return true; diff --git a/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp b/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp index 0b43e16909..c86867d2d9 100644 --- a/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp +++ b/Dev/Cpp/EffekseerMaterialCompiler/GLSLGenerator/ShaderGenerator.cpp @@ -3,6 +3,7 @@ #include "../Common/ShaderGeneratorCommon.h" #include +#include #undef min #undef max diff --git a/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp b/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp index 80dc7f6b0c..aca4def111 100644 --- a/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp +++ b/Dev/Cpp/EffekseerMaterialCompiler/Metal/EffekseerMaterialCompilerMetal.cpp @@ -3,6 +3,7 @@ #include "../Common/ShaderGeneratorCommon.h" #include +#include namespace Effekseer { diff --git a/Dev/clean.sh b/Dev/clean.sh new file mode 100644 index 0000000000..3db10b9a80 --- /dev/null +++ b/Dev/clean.sh @@ -0,0 +1,2 @@ +rm --force release/*.pdb +rm --force release/Effekseer diff --git a/Tool/CMakeLists.txt b/Tool/CMakeLists.txt index 6b4fca33fb..d4e1493907 100644 --- a/Tool/CMakeLists.txt +++ b/Tool/CMakeLists.txt @@ -8,7 +8,7 @@ endif() project(Tools) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 14) if(MSVC) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") diff --git a/docs/Development/HowToBuild.md b/docs/Development/HowToBuild.md index e5fcb130e5..23da6be71d 100644 --- a/docs/Development/HowToBuild.md +++ b/docs/Development/HowToBuild.md @@ -31,7 +31,9 @@ Requirements - g++ - [.Net6.0 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu) -- libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity +- Required packages: + - Ubuntu: `libx11-dev libgl1-mesa-dev libxrandr-dev libxi-dev x11proto-xf86vidmode-dev libx11-xcb-dev xorg-dev libglu1-mesa-dev libpulse-dev libgtk-3-dev libopenal-dev python3-distutils zenity` + - Fedora 40: `gtk3-devel pulseaudio-libs-devel openal-soft-devel mesa-libGLU-devel libX11-devel libxcb-devel libXi-devel libXrandr-devel mesa-libGL-devel python3 dotnet zenity ninja-build` Get code and resources ---------- diff --git a/release_tool.sh b/release_tool.sh old mode 100644 new mode 100755