source: live-build/trunk/fuentes/scripts/build/lb_binary_win32-loader @ 900

Last change on this file since 900 was 900, checked in by kbut, 3 years ago

add original source

  • Property svn:executable set to *
File size: 2.2 KB
Line 
1#!/bin/sh
2
3## live-build(7) - System Build Scripts
4## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
5##
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.
9
10
11set -e
12
13# Including common functions
14( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh
15
16# Setting static variables
17DESCRIPTION="$(Echo 'copy win32-loader into binary')"
18HELP=""
19USAGE="${PROGRAM} [--force]"
20
21Arguments "${@}"
22
23# Reading configuration files
24Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
25Set_defaults
26
27if [ "${LB_WIN32_LOADER}" != "true" ] || [ "${LB_BINARY_IMAGES}" = "virtual-hdd" ]
28then
29        exit 0
30fi
31
32Echo_message "Begin copying win32-loader..."
33
34# Requiring stage file
35Require_stagefile .build/config .build/bootstrap
36
37# Checking stage file
38Check_stagefile .build/binary_win32-loader
39
40# Checking lock file
41Check_lockfile .lock
42
43# Creating lock file
44Create_lockfile .lock
45
46case "${LB_ARCHITECTURES}" in
47        amd64|i386)
48                if [ "${LB_BUILD_WITH_CHROOT}" = "true" ]
49                then
50                        # Checking depends
51                        Check_package chroot/usr/share/win32/win32-loader.exe win32-loader
52
53                        # Restoring cache
54                        Restore_cache cache/packages.binary
55
56                        # Installing depends
57                        Install_package
58
59                        # Copying win32-loader
60                        cp -r chroot/usr/share/win32/* binary
61                else
62                        cp -r usr/share/win32/* binary
63                fi
64
65                mv binary/win32-loader.exe binary/setup.exe
66
67                if [ -e binary/win32-loader-standalone.exe ]
68                then
69                        mv binary/win32-loader-standalone.exe binary/setup-standalone.exe
70                fi
71
72                if [ "${LB_DEBIAN_INSTALLER}" != "false" ]
73                then
74
75cat > binary/win32-loader.ini << EOF
76[installer]
77arch=${LB_ARCHITECTURES}
78i386/linux=install/vmlinuz
79i386/initrd=install/initrd.gz
80i386/gtk/linux=install/vmlinuz
81i386/gtk/initrd=install/gtk/initrd.gz
82
83[grub]
84g2ldr=g2ldr
85g2ldr.mbr=g2ldr.mbr
86EOF
87
88                fi
89
90                # Saving cache
91                Save_cache cache/packages.binary
92
93                # Removing depends
94                Remove_package
95                ;;
96
97        *)
98                Echo_warning "win32-loader inclusion is set to true but not compatible with your architecture, ignoring."
99                ;;
100esac
101
102# Creating stage file
103Create_stagefile .build/binary_win32-loader
Note: See TracBrowser for help on using the repository browser.