Get build scripts working and generating images

This commit is contained in:
Eisen Montalvo 2021-06-04 19:02:26 -07:00 committed by remi durand
parent 304cfb8f72
commit bae1b4e7a7
4 changed files with 17 additions and 11 deletions

View File

@ -108,12 +108,15 @@ echo -n "[8/9] Building Slic3r..."
} &> $ROOT/build/Build.log # Capture all command output
echo "done"
# Give proper permissions to script
chmod 755 $ROOT/build/src/BuildLinuxImage.sh
echo -n "[9/9] Generating Linux app..."
{
if [[ -n "$BUILD_IMAGE" ]]
then
$ROOT/build/BuildLinuxImage.sh -i
$ROOT/build/src/BuildLinuxImage.sh -i
else
$ROOT/build/BuildLinuxImage.sh
$ROOT/build/src/BuildLinuxImage.sh
fi
} &> $ROOT/build/Build.log # Capture all command output

View File

@ -94,9 +94,12 @@ echo -n "[8/9] Building Slic3r..."
} &> $ROOT/build/Build.log # Capture all command output
echo "done"
# Give proper permissions to script
chmod 755 $ROOT/build/src/BuildMacOSImage.sh
if [[ -n "$BUILD_IMAGE" ]]
then
$ROOT/build/BuildMacOSImage.sh -i
$ROOT/build/src/BuildMacOSImage.sh -i
else
$ROOT/build/BuildMacOSImage.sh
$ROOT/build/src/BuildMacOSImage.sh
fi

View File

@ -45,7 +45,7 @@ echo -n "[9/9] Generating MacOS app..."
# copy bin and do not let it lower case
cp -f src/@SLIC3R_APP_CMD@ pack/@SLIC3R_APP_KEY@/@SLIC3R_APP_KEY@.app/Contents/MacOS/@SLIC3R_APP_KEY@
chmod u+x pack/@SLIC3R_APP_KEY@/@SLIC3R_APP_KEY@.app/Contents/MacOS/@SLIC3R_APP_KEY@
} &> $ROOT/build/MacOS_Build.log # Capture all command output
} &> $ROOT/Build.log # Capture all command output
echo "done"
if [[ -n "$BUILD_IMAGE" ]]
@ -58,6 +58,6 @@ echo -n "Creating DMG Image for distribution..."
hdiutil create -ov -fs HFS+ -volname "@SLIC3R_APP_KEY@" -srcfolder "pack/@SLIC3R_APP_KEY@" temp.dmg
hdiutil convert temp.dmg -format UDZO -o @SLIC3R_APP_KEY@.dmg
popd
} &> $ROOT/build/MacOS_Build.log # Capture all command output
} &> $ROOT/Build.log # Capture all command output
echo "done"
fi

View File

@ -9,13 +9,13 @@ while getopts ":ih" opt; do
export BUILD_IMAGE="1"
;;
h ) echo "Usage: ./BuildLinuxImage.sh [-i]"
echo " -i: Generate DMG image (optional)"
echo " -i: Generate Appimage (optional)"
exit 0
;;
esac
done
echo -n "[9/9] Generating MacOS app..."
echo -n "[9/9] Generating Linux app..."
{
# create directory and copy into it
@ -25,7 +25,7 @@ echo -n "[9/9] Generating MacOS app..."
fi
mkdir package
mkdir package/bin
# copy Resources
cp -Rf ../resources package/resources
cp -f src/@SLIC3R_APP_CMD@ package/bin/@SLIC3R_APP_CMD@
@ -34,7 +34,7 @@ echo -n "[9/9] Generating MacOS app..."
echo -e '#!/bin/bash\nDIR=$(readlink -f "$0" | xargs dirname)\nexport LD_LIBRARY_PATH="$DIR/bin"\nexec "$DIR/bin/@SLIC3R_APP_CMD@" "$@"' >@SLIC3R_APP_CMD@
chmod u+x @SLIC3R_APP_CMD@
tar -cvf ../@SLIC3R_APP_KEY@.tar .
} &> $ROOT/build/MacOS_Build.log # Capture all command output
} &> $ROOT/Build.log # Capture all command output
echo "done"
if [[ -n "$BUILD_IMAGE" ]]
@ -43,6 +43,6 @@ echo -n "Creating Appimage for distribution..."
{
chmod +x ../build_appimage.sh
../build_appimage.sh
} &> $ROOT/build/MacOS_Build.log # Capture all command output
} &> $ROOT/Build.log # Capture all command output
echo "done"
fi