3 ## live-build(7) - System Build Scripts
4 ## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch>
6 ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7 ## This is free software, and you are welcome to redistribute it
8 ## under certain conditions; see COPYING for details.
13 # Including common functions
14 [ -e "${LIVE_BUILD}/scripts/build.sh" ] && .
"${LIVE_BUILD}/scripts/build.sh" || .
/usr
/lib
/live
/build.sh
16 # Setting static variables
17 DESCRIPTION
="$(Echo 'copy win32-loader into binary')"
19 USAGE
="${PROGRAM} [--force]"
23 # Reading configuration files
24 Read_conffiles config
/all config
/common config
/bootstrap config
/chroot config
/binary config
/source
27 if [ "${LB_WIN32_LOADER}" != "true" ]
32 Echo_message
"Begin copying win32-loader..."
34 # Requiring stage file
35 Require_stagefile .build
/config .build
/bootstrap
38 Check_stagefile .build
/binary_win32-loader
46 case "${LIVE_IMAGE_ARCHITECTURE}" in
48 if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
51 Check_package chroot
/usr
/share
/win32
/win32-loader.exe win32-loader
54 Restore_cache cache
/packages.binary
59 # Copying win32-loader
60 cp -r chroot
/usr
/share
/win32
/* binary
62 cp -r usr
/share
/win32
/* binary
65 mv binary
/win32-loader.exe binary
/setup.exe
66 mv binary
/win32-loader
/g2ldr
* binary
67 rmdir binary
/win32-loader
> /dev
/null
2>&1 || true
69 cat >> binary
/autorun.inf
<< EOF
74 if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
77 cat > binary
/win32-loader.ini
<< EOF
80 arch=${LIVE_IMAGE_ARCHITECTURE}
82 ${LIVE_IMAGE_ARCHITECTURE}/linux=install/vmlinuz
83 ${LIVE_IMAGE_ARCHITECTURE}/initrd=install/initrd.gz
86 if [ -e binary
/install
/gtk
]
89 cat >> binary
/win32-loader.ini
<< EOF
90 ${LIVE_IMAGE_ARCHITECTURE}/gtk/linux=install/vmlinuz
91 ${LIVE_IMAGE_ARCHITECTURE}/gtk/initrd=install/gtk/initrd.gz
96 cat >> binary
/win32-loader.ini
<< EOF
106 Save_cache cache
/packages.binary
113 Echo_warning
"win32-loader inclusion is set to true but not compatible with your architecture, ignoring."
117 # Creating stage file
118 Create_stagefile .build
/binary_win32-loader