Skip to content

Commit

Permalink
Fix package renderers bad paths and bad test
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorsandy committed Dec 1, 2024
1 parent 2b1b31a commit f2f5953
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
15 changes: 8 additions & 7 deletions builds/utilities/CreateRenderers.bat
Original file line number Diff line number Diff line change
Expand Up @@ -437,14 +437,15 @@ IF EXIST "%BUILD_OUTPUT_PATH%\%ARCHIVE_FILE_DIR%\%VALID_SDIR%" (
EXIT /b

:PACKAGE_RENDERERS
IF "%LP3D_CONDA_BUILD%"=="True" ( EXIT /b )
IF "%CAN_PACKAGE%" NEQ "True" (
ECHO.
ECHO -ERROR: Cannot package %LP3D_RENDERS%
GOTO :ERROR_END
ECHO -WARNING: Cannot package %LP3D_RENDERS%.
EXIT /b
)
IF %LP3D_VALID_7ZIP% NEQ 1 (
ECHO -ERROR: Cannot archive %LP3D_RENDERS%. 7zip not found.
GOTO :ERROR_END
ECHO -WARNING: Cannot archive %LP3D_RENDERS%. 7zip not found.
EXIT /b
)
SET LP3D_RENDERS=%PACKAGE%-renderers-win-%BUILD_ARCH%.zip
ECHO.
Expand All @@ -455,7 +456,7 @@ SETLOCAL DISABLEDELAYEDEXPANSION
"%LP3D_7ZIP_WIN64%" a -tzip "%LP3D_RENDERS%" "%VER_POVRAY%" "%VER_LDGLITE%" "%VER_LDVIEW%" ^
"-x!%VER_LDVIEW%\lib" "-xr!%VER_LDVIEW%\include" "-xr!%VER_LDVIEW%\bin\*.exp" ^
"-xr!%VER_LDVIEW%\bin\*.lib" "-x!%VER_LDVIEW%\resources\*Messages.ini" >NUL 2>&1
SET LP3D_RENDERS_OUT=%LP3D_CALL_DIR%\%LP3D_BUILDPKG_PATH%\Downloads\%LP3D_RENDERS%
SET LP3D_RENDERS_OUT=%LP3D_BUILDPKG_PATH%\Downloads\%LP3D_RENDERS%
IF EXIST "%LP3D_RENDERS%" (
ECHO -Move %LP3D_RENDERS% to %LP3D_RENDERS_OUT%...
IF NOT EXIST "%LP3D_CALL_DIR%\%LP3D_BUILDPKG_PATH%\Downloads\" (
Expand All @@ -465,10 +466,10 @@ IF EXIST "%LP3D_RENDERS%" (
IF EXIST "%LP3D_RENDERS_OUT%" (
ECHO -Finished
) ELSE (
ECHO -WARNING: Failed to move %LP3D_RENDERS%
ECHO -WARNING: Failed to move %LP3D_RENDERS%.
)
) ELSE (
ECHO -WARNING: Failed to create %LP3D_RENDERS%
ECHO -WARNING: Failed to create %LP3D_RENDERS%.
)
POPD
EXIT /b
Expand Down
15 changes: 9 additions & 6 deletions builds/utilities/CreateRenderers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -909,11 +909,12 @@ if [ "$OS_NAME" = "Darwin" ]; then
fi

# Package the renderers
canPackageRenderers=true
canPackageRenderers="true"
declare -r p=Package
function package_renderers()
{
if [[ -n "${OBS}" || -n "${SNAP}" ]]; then
if [[ "${OBS}" = "true" || "${SNAP}" = "true" ]]; then
Info "Cannot create renderer package under OBS or SNAP builds"
return
fi
if [ -d "/out" ]; then
Expand All @@ -926,7 +927,7 @@ function package_renderers()
LP3D_ARCH=${TARGET_CPU}
LP3D_BASE=${platform_id}
LP3D_RENDERERS=${LPUB3D}-renderers-${LP3D_BASE}-${LP3D_ARCH}.tar.gz
echo -n "-Create renderer package: ${LP3D_OUT_PATH}/${LP3D_RENDERERS}..."
echo -n "-Create renderer package ${LP3D_OUT_PATH}/${LP3D_RENDERERS}..."
( cd "${DIST_PKG_DIR}/" || return && \
tar -czf "${LP3D_RENDERERS}" \
"--exclude=${VER_LDVIEW}/lib" \
Expand All @@ -935,9 +936,9 @@ function package_renderers()
"--exclude=${VER_LDVIEW}/bin/*.lib" \
"--exclude=${VER_LDVIEW}/resources/*Messages.ini" \
"${VER_LDGLITE}/" "${VER_LDVIEW}/" "${VER_POVRAY}/" && \
sha512sum "${LP3D_RENDERERS}" > "${LP3D_RENDERERS}.sha512" && \
sha512sum "${LP3D_RENDERERS}" > "${LP3D_RENDERERS}.sha512" && \
mv -f "${LP3D_RENDERERS}" "${LP3D_RENDERERS}.sha512" \
"${LP3D_OUT_PATH}/" ) >$p.out 2>&1 && rm $p.out
"${LP3D_OUT_PATH}/" ) >$p.out 2>&1 && rm $p.out
[ -f $p.out ] && echo "ERROR" && tail -80 $p.out || echo "Ok"
}

Expand Down Expand Up @@ -1057,7 +1058,7 @@ for buildDir in ldglite ldview povray; do
Info "------------------Build Log-------------------------"
cat ${buildLog}
Info "----------------End-Build Log-----------------------"
canPackageRenderers=false
canPackageRenderers="false"
fi
fi
Msg="Build ${buildDir} finished."
Expand All @@ -1071,6 +1072,8 @@ done
# Package renderers as a deliverable
if [[ "${canPackageRenderers}" = "true" ]]; then
package_renderers
else
Info "Cannot package renderers."
fi
# Restore ld_library_path
export LD_LIBRARY_PATH=$LP3D_LD_LIBRARY_PATH_SAVED
Expand Down

0 comments on commit f2f5953

Please sign in to comment.