Added support for "optional packages". Those can be defined in

HaikuImage and enabled individually using the
AddOptionalHaikuImagePackages rule or all at once by setting
HAIKU_ADD_ALL_OPTIONAL_PACKAGES. In principle an optional package can
be any kind of addition to the Haiku image, but usually a zip file will
be downloaded from somewhere and unzipped onto the image. I've added a
WonderBrush package as an example.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22184 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2007-09-05 18:36:17 +00:00
parent 540d4f7b6e
commit 96b421b83d
4 changed files with 48 additions and 0 deletions

View File

@ -7,6 +7,7 @@ HAIKU_BUILD_DIR = [ FDirName $(HAIKU_TOP) build ] ;
HAIKU_BUILD_RULES_DIR = [ FDirName $(HAIKU_BUILD_DIR) jam ] ;
HAIKU_OBJECT_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) objects ] ;
HAIKU_COMMON_PLATFORM_OBJECT_DIR = [ FDirName $(HAIKU_OBJECT_DIR) common ] ;
HAIKU_DOWNLOAD_DIR = [ FDirName $(HAIKU_OUTPUT_DIR) download ] ;
# Cache files for header scanning and jamfile caching
HCACHEFILE = header_cache ;

View File

@ -412,9 +412,23 @@ AddDirectoryToHaikuImage home config settings printers "Save as PDF"
: home-config-settings-printers-save-as-pdf.rdef ;
#pragma mark - Optional Packages
# WonderBrush
if [ IsOptionalHaikuImagePackageAdded WonderBrush ] {
InstallOptionalHaikuImagePackage WonderBrush
: http://www.yellowbites.com/downloads/WonderBrush-2.0.2-demo-x86-R5.zip
: apps
;
AddSymlinkToHaikuImage home config be Applications
: /boot/apps/WonderBrush/WonderBrush ;
}
#pragma mark - Build The Image
# Set image name and directory defaults and locate the image.
HAIKU_IMAGE_NAME ?= haiku.image ;
HAIKU_IMAGE_DIR ?= $(HAIKU_OUTPUT_DIR) ;

View File

@ -582,6 +582,32 @@ rule AddBootModuleSymlinksToHaikuImage targets
: $(targets) ;
}
rule AddOptionalHaikuImagePackages packages
{
HAIKU_OPTIONAL_PACKAGE_ADDED on $(packages) = 1 ;
}
rule IsOptionalHaikuImagePackageAdded package
{
if [ on $(package) return $(HAIKU_OPTIONAL_PACKAGE_ADDED) ] {
return 1 ;
}
return $(HAIKU_ADD_ALL_OPTIONAL_PACKAGES) ;
}
rule InstallOptionalHaikuImagePackage package : url : dirTokens
{
# download zip file
local zipFile = $(package:S=.zip:G=download) ;
MakeLocate $(zipFile) : $(HAIKU_DOWNLOAD_DIR) ;
DownloadFile $(zipFile) : $(url) ;
# unzip onto image
UnzipArchiveToHaikuImage $(dirTokens) : $(zipFile) ;
}
rule CreateHaikuImageMakeDirectoriesScript script
{
CreateContainerMakeDirectoriesScript $(HAIKU_IMAGE_CONTAINER_NAME)

View File

@ -67,6 +67,13 @@ AddSourceDirectoryToHaikuImage src/tests/servers/debug : 1 ;
UnzipArchiveToHaikuImage develop tools
: /home/bonefish/develop/haiku/misc/gcc-2.95.3-beos-070218/gcc-2.95.3_binutils-2.17_rel-070218.zip ;
# Adds the optional package WonderBrush to the image. The package is downloaded
# via wget (i.e. wget must be installed).
AddOptionalHaikuImagePackages WonderBrush ;
# Add all available optional packages.
HAIKU_ADD_ALL_OPTIONAL_PACKAGES = 1 ;
# Specify scripts that shall be run when populating the image/installation
# directory. The "early" script is run before anything has been copied onto
# the image/into the installation directory. The "late" script is run after