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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user