diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index c5aee78b..9aa25725 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -37,7 +37,30 @@ jobs: qtdeclarative5-dev \ qtquickcontrols2-5-dev\ python3 \ - uuid-dev + uuid-dev \ + build-essential ninja-build rsync pkg-config curl \ + libgl1-mesa-dev libglu1-mesa-dev xorg-dev + + + - name: Build OCCT SDK (Linux) + run: | + set -e + + # 防止 Windows 提交的 CRLF 让 Ubuntu 解释器看到 "sh\r" / "bash\r" + # (当前 CI 报错就是这个原因:/usr/bin/env: 'sh\r': No such file or directory) + if [ -d "AliceThirdParty/scripts" ]; then + find AliceThirdParty/scripts -maxdepth 1 -name "*.sh" -print0 | xargs -0 sed -i 's/\r$//' + chmod +x AliceThirdParty/scripts/*.sh + fi + + # If OCCT SDK is not present in the repo snapshot, build it in CI and export into Externals/3rdParty. + if [ ! -f "Externals/3rdParty/sdk/linux-x64/Release/occt/lib/cmake/opencascade/OpenCASCADEConfig.cmake" ] && \ + [ ! -f "Externals/3rdParty/sdk/linux-x64/Release/occt/cmake/OpenCASCADEConfig.cmake" ]; then + bash AliceThirdParty/scripts/build-occt.sh Release x64-linux + bash AliceThirdParty/scripts/export-occt-sdk.sh Release "$GITHUB_WORKSPACE" + else + echo "OCCT SDK already exists in Externals/3rdParty/sdk/linux-x64/Release/occt" + fi diff --git a/.gitignore b/.gitignore index c9b61522..46ebfb3a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ # ThirdParty SDK output (do NOT commit) -Externals/3rdParty/sdk/** -Externals/3rdParty/runtime/** +Externals/3rdParty/sdk/msvc2022-x64-md/Debug/occt/data/*.* +Externals/3rdParty/sdk/msvc2022-x64-md/Debug/occt/win64/vc14/bind/*.pdb Externals/3rdParty/install/** \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 2f7a9d2e..e798a11e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,7 @@ path = AliceThirdParty url = git@github.com:Ludwigstrasse/AliceThirdParty.git branch = main +[submodule "Externals/3rdParty/sdk"] + path = Externals/3rdParty/sdk + url = git@github.com:Ludwigstrasse/AliceSdk.git + branch = main diff --git a/Alice b/Alice index a94b899f..fd7b1c13 160000 --- a/Alice +++ b/Alice @@ -1 +1 @@ -Subproject commit a94b899fd3389e15f22bfcd8dea88a3d9e980b49 +Subproject commit fd7b1c13f4db370410712db52c5c8205fdc67ca2 diff --git a/AliceThirdParty b/AliceThirdParty index 6a62797a..2b2eb95b 160000 --- a/AliceThirdParty +++ b/AliceThirdParty @@ -1 +1 @@ -Subproject commit 6a62797a4f273ab6f0f8f7dba9b01aa167f1a924 +Subproject commit 2b2eb95b97e214e815a944c3a7aa3e3a5e58267f diff --git a/AutoGenerateVsProject.bat b/AutoGenerateVsProject.bat index e96aa4bd..f5943fe4 100644 --- a/AutoGenerateVsProject.bat +++ b/AutoGenerateVsProject.bat @@ -64,7 +64,7 @@ echo %cd% echo "Start to cmake... ..." :: -B 鎸囧畾宸ョ▼鐨勮緭鍑鸿矾寰 -H 鎸囧畾CMAKELIST.TXT鐨勮矾寰 -..\SolidDesigner\ToolChain\cmake\bin\cmake.exe -B ..\SolidDesigner_Build -H..\SolidDesigner -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 16 2019" +..\SolidDesigner\ToolChain\cmake\bin\cmake.exe -B ..\SolidDesigner_Build -H..\SolidDesigner -DCMAKE_GENERATOR_PLATFORM=x64 -G "Visual Studio 17 2022" if errorlevel 1 ( echo "CMake failed." @@ -80,7 +80,7 @@ if %errorlevel% neq 0 ( echo "devenv.exe is not running. Starting a new instance..." echo "Opening Visual Studio..." ::start "" "%VS140COMNTOOLS%\..\IDE\devenv.exe" "%cd%\SolidDesigner.sln" - start "" "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\Common7\\IDE\\devenv.exe" "%cd%\SolidDesigner.sln" + start "" "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\IDE\\devenv.exe" "%cd%\SolidDesigner.sln" ) else ( echo "devenv.exe is already running with PID %vs_pid%. Proceeding to open project..." ) diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlicommon.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlicommon.dll new file mode 100644 index 00000000..bc3c14d7 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlicommon.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlidec.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlidec.dll new file mode 100644 index 00000000..27e27186 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlidec.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlienc.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlienc.dll new file mode 100644 index 00000000..13036b48 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/brotlienc.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/bz2d.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/bz2d.dll new file mode 100644 index 00000000..eff8745d Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/bz2d.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/freetyped.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/freetyped.dll new file mode 100644 index 00000000..24236ac4 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/freetyped.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/hwloc-15.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/hwloc-15.dll new file mode 100644 index 00000000..f7ac6c6e Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/hwloc-15.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/libpng16d.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/libpng16d.dll new file mode 100644 index 00000000..185d1ddd Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/libpng16d.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbb12_debug.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbb12_debug.dll new file mode 100644 index 00000000..9d4331f2 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbb12_debug.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbbmalloc_debug.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbbmalloc_debug.dll new file mode 100644 index 00000000..4e3ded47 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbbmalloc_debug.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbbmalloc_proxy_debug.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbbmalloc_proxy_debug.dll new file mode 100644 index 00000000..5e930a42 Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/tbbmalloc_proxy_debug.dll differ diff --git a/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/zlibd1.dll b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/zlibd1.dll new file mode 100644 index 00000000..5604c05e Binary files /dev/null and b/Externals/3rdParty/runtime/msvc2022-x64-md/Debug/occt/zlibd1.dll differ diff --git a/Externals/3rdParty/sdk b/Externals/3rdParty/sdk new file mode 160000 index 00000000..27aa89bc --- /dev/null +++ b/Externals/3rdParty/sdk @@ -0,0 +1 @@ +Subproject commit 27aa89bc9e03e768f817d19c8584a2d35120cfa5 diff --git a/copyDllToBuildDir.bat b/copyDllToBuildDir.bat index 048ab588..33f3ac44 100644 --- a/copyDllToBuildDir.bat +++ b/copyDllToBuildDir.bat @@ -59,8 +59,19 @@ xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Widgets.dll %CURRENT_NEW_DIR%\x xcopy C:\Qt\Qt5.15.14\5.15.14\msvc2019_64\bin\Qt5Network.dll %CURRENT_NEW_DIR%\x64\Debug /s /e /c /y /h /r ::鎷疯礉source/resource鐩綍涓嬫墍鏈夌殑璧勬簮鍒癰in鐩綍 -xcopy .\Designer\Data\*.* %CURRENT_NEW_DIR%\x64\Release\Data /s /h -xcopy .\Designer\Data\*.* %CURRENT_NEW_DIR%\x64\Debug\Data /s /h +xcopy .\Designer\Data\*.* %CURRENT_NEW_DIR%\x64\Release\Data /E /I /H /Y +xcopy .\Designer\Data\*.* %CURRENT_NEW_DIR%\x64\Debug\Data /E /I /H /Y +::鎷疯礉Externals/3rdParty/runtime(sdk) +:: /I锛氶伩鍏嶆彁绀 鈥淒oes ... specify a file name or directory name on the target鈥︹ +:: /E锛氭嫹璐濆瓙鐩綍锛堝寘鍚┖鐩綍锛 +:: /Y锛氳鐩栦笉鎻愮ず +:: /S锛氭嫹璐濆瓙鐩綍锛堜笉鍚┖鐩綍锛 +:: /H锛氬寘鍚殣钘/绯荤粺鏂囦欢 +xcopy .\Externals\3rdParty\runtime\*.* %CURRENT_NEW_DIR%\x64\Release\runtime /E /I /H /Y +xcopy .\Externals\3rdParty\runtime\*.* %CURRENT_NEW_DIR%\x64\Debug\runtime /E /I /H /Y + +xcopy .\Externals\3rdParty\sdk\*.* %CURRENT_NEW_DIR%\x64\Release\sdk /E /I /H /Y +xcopy .\Externals\3rdParty\sdk\*.* %CURRENT_NEW_DIR%\x64\Debug\sdk /E /I /H /Y pause exit \ No newline at end of file