print build time

This commit is contained in:
SoftFever
2026-03-19 23:17:03 +08:00
parent acbe5c708e
commit a9c5748d30
5 changed files with 50 additions and 17 deletions

View File

@@ -1,6 +1,7 @@
@REM OrcaSlicer build script for Windows with VS auto-detect
@echo off
set WP=%CD%
set _START_TIME=%TIME%
@REM Check for Ninja Multi-Config option (-x)
set USE_NINJA=0
@@ -73,7 +74,7 @@ if "%1"=="pack" (
echo packing deps: OrcaSlicer_dep_win64_!build_date!_vs!VS_VERSION!.zip
%WP%/tools/7z.exe a OrcaSlicer_dep_win64_!build_date!_vs!VS_VERSION!.zip OrcaSlicer_dep
exit /b 0
goto :done
)
set debug=OFF
@@ -120,7 +121,7 @@ if "%USE_NINJA%"=="1" (
)
@echo off
if "%1"=="deps" exit /b 0
if "%1"=="deps" goto :done
:slicer
echo "building Orca Slicer..."
@@ -142,3 +143,16 @@ cd ..
call scripts/run_gettext.bat
cd %build_dir%
cmake --build . --target install --config %build_type%
:done
@echo off
for /f "tokens=1-3 delims=:.," %%a in ("%_START_TIME: =0%") do set /a "_start_s=%%a*3600+%%b*60+%%c"
for /f "tokens=1-3 delims=:.," %%a in ("%TIME: =0%") do set /a "_end_s=%%a*3600+%%b*60+%%c"
set /a "_elapsed=_end_s - _start_s"
if %_elapsed% lss 0 set /a "_elapsed+=86400"
set /a "_hours=_elapsed / 3600"
set /a "_remainder=_elapsed - _hours * 3600"
set /a "_mins=_remainder / 60"
set /a "_secs=_remainder - _mins * 60"
echo.
echo Build completed in %_hours%h %_mins%m %_secs%s