Move AutoInstaller GUI build to early stage of ISO build process

- Build and copy AutoInstaller GUI binary before ISO build starts
- Ensures binary is included in the live system within the ISO
- Remove duplicate build section from end of script
- Add confirmation messages that binary is included in ISO
parent 033f74ba
......@@ -27,6 +27,26 @@ fi
echo "Root password is set. Proceeding with build..."
# Build AutoInstaller GUI binary (before ISO build so it gets included)
echo "Building AutoInstaller GUI binary..."
if [ -d "autoinstaller_gui" ] && [ -f "autoinstaller_gui/build_autoinstaller_gui.py" ]; then
cd autoinstaller_gui
python3 build_autoinstaller_gui.py
if [ -f "dist/AutoInstallerGUI" ]; then
echo "AutoInstaller GUI binary built successfully"
# Copy binary to live system
mkdir -p ../config/includes.chroot/usr/local/bin
cp dist/AutoInstallerGUI ../config/includes.chroot/usr/local/bin/autoinstallergui
chmod +x ../config/includes.chroot/usr/local/bin/autoinstallergui
echo "AutoInstaller GUI binary copied to live system"
else
echo "Warning: AutoInstaller GUI binary not found after build"
fi
cd ..
else
echo "Warning: AutoInstaller GUI build script not found"
fi
# Check if running as root (lb build needs sudo)
if [ "$EUID" -ne 0 ]; then
echo "ERROR: This script must be run with sudo privileges."
......@@ -127,26 +147,7 @@ BUILD_EXIT_CODE=$?
if [ $BUILD_EXIT_CODE -eq 0 ]; then
echo "Build completed successfully!"
echo "ISO file: $(ls live-image-amd64.iso 2>/dev/null || ls *.iso 2>/dev/null || echo 'Not found')"
# Build AutoInstaller GUI binary
echo "Building AutoInstaller GUI binary..."
if [ -d "autoinstaller_gui" ] && [ -f "autoinstaller_gui/build_autoinstaller_gui.py" ]; then
cd autoinstaller_gui
python3 build_autoinstaller_gui.py
if [ -f "dist/AutoInstallerGUI" ]; then
echo "AutoInstaller GUI binary built successfully"
# Copy binary to live system
mkdir -p ../config/includes.chroot/usr/local/bin
cp dist/AutoInstallerGUI ../config/includes.chroot/usr/local/bin/autoinstallergui
chmod +x ../config/includes.chroot/usr/local/bin/autoinstallergui
echo "AutoInstaller GUI binary copied to live system"
else
echo "Warning: AutoInstaller GUI binary not found after build"
fi
cd ..
else
echo "Warning: AutoInstaller GUI build script not found"
fi
echo "AutoInstaller GUI binary has been included in the ISO"
else
echo "Build failed. Check build.log for errors."
......@@ -162,6 +163,7 @@ else
if [ $BUILD_EXIT_CODE -eq 0 ]; then
echo "Build completed successfully after retry!"
echo "ISO file: $(ls live-image-amd64.iso 2>/dev/null || ls *.iso 2>/dev/null || echo 'Not found')"
echo "AutoInstaller GUI binary has been included in the ISO"
else
echo "Build failed again after retry. Check build.log and build_retry.log for errors."
cleanup_chroot
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment