Release_Engineering/Release_ISOs
Mark Jansen 18bc5b2d3a
Some checks failed
Docker / docker (push) Failing after 20s
Add a workaround for git describe not supporting tag+count without hash
2024-09-09 14:27:44 +02:00

73 lines
2.0 KiB
Bash
Executable File

#!/bin/bash
# ReactOS Release Engineering Scripts
# Release_ISOs - Create the "-iso.zip" and "-live.zip" packages
# Sanity checks
if ! source ./Release_Config; then
echo "Please run Release_Configure first!"
exit 1
fi
if [ "$ROS_ARCH" = "" ]; then
echo "Please run this script inside RosBE!"
exit 1
fi
if [ "$ROS_ARCH" = "i386" ]; then
ROS_PRETTY_ARCH="x86"
else
ROS_PRETTY_ARCH="$ROS_ARCH"
fi
# Constants
ROOTDIR="$PWD"
OUTPUTDIR="output-MinGW-i386"
BOOTCDISO="ReactOS-${version}-${ROS_PRETTY_ARCH}.iso"
BOOTCDZIP="ReactOS-${version}-${ROS_PRETTY_ARCH}-iso.zip"
LIVECDISO="ReactOS-${version}-${ROS_PRETTY_ARCH}-live.iso"
LIVECDZIP="ReactOS-${version}-${ROS_PRETTY_ARCH}-live.zip"
# Start from a clean state
rm -f "${ROOTDIR}/${BOOTCDZIP}"
rm -f "${ROOTDIR}/${LIVECDZIP}"
# Download the "optional" folder from svn.reactos.org
mkdir "${REPODIR}/modules/optional" || exit 1
cd "${REPODIR}/modules/optional" || exit 1
wget --recursive --level=1 --no-directories --no-parent --execute robots=off "https://svn.reactos.org/optional" || exit 1
# Check that all mandatory files exist in the "optional" folder.
if ! [ -f "DroidSansFallback.ttf" ]; then
echo "DroidSansFallback CJK font missing!"
exit 1
fi
if ! compgen -G "wine_gecko*.msi" > /dev/null; then
echo "wine_gecko MSI package missing!"
exit 1
fi
# Build ReactOS
cd "${REPODIR}" || exit 1
./configure.sh -DENABLE_ROSAPPS=1 -DENABLE_WALLPAPERS=1 || exit 1
cd "${REPODIR}/${OUTPUTDIR}" || exit 1
ninja bootcd || exit 1
ninja livecd || exit 1
# Create the ZIP packages
mv "bootcd.iso" "${BOOTCDISO}" || exit 1
zip -9 "${ROOTDIR}/${BOOTCDZIP}" "${BOOTCDISO}" || exit 1
mv "livecd.iso" "${LIVECDISO}" || exit 1
zip -9 "${ROOTDIR}/${LIVECDZIP}" "${LIVECDISO}" || exit 1
# We're done!
echo
echo "*******************************************************************************"
echo "Successfully created the following packages:"
echo
echo " - ${BOOTCDZIP}"
echo " - ${LIVECDZIP}"
echo "*******************************************************************************"
echo