diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage index e56f64ff18..3d60a2c4ce 100644 --- a/build/jam/HaikuImage +++ b/build/jam/HaikuImage @@ -296,7 +296,7 @@ AddDirectoryToHaikuImage beos etc synth ; AddFilesToHaikuImage optional beos system add-ons input_server methods : canna ; -#pragma mark - +#pragma mark - Build The Image # Set image name and directory defaults and locate the image. HAIKU_IMAGE_NAME ?= haiku.image ; @@ -381,3 +381,15 @@ Depends haiku-image : $(HAIKU_IMAGE) ; # install Haiku into a directory NotFile install-haiku ; _BuildHaikuImage install-haiku : 0 ; + + +#pragma mark - Build The VMWare Image + +HAIKU_VMWARE_IMAGE_NAME ?= haiku.vmdk ; +HAIKU_VMWARE_IMAGE ?= $(HAIKU_VMWARE_IMAGE_NAME) ; +MakeLocate $(HAIKU_VMWARE_IMAGE) : $(HAIKU_IMAGE_DIR) ; + +BuildVMWareImage $(HAIKU_VMWARE_IMAGE) : $(HAIKU_IMAGE) + : $(HAIKU_IMAGE_SIZE) ; +NotFile haiku-vmware-image ; +Depends haiku-vmware-image : $(HAIKU_VMWARE_IMAGE) ; diff --git a/build/jam/ImageRules b/build/jam/ImageRules index e1e9ce2158..12a5c08af2 100644 --- a/build/jam/ImageRules +++ b/build/jam/ImageRules @@ -371,3 +371,20 @@ actions BuildHaikuImage1 export isImage="$(IS_IMAGE)" $(2[1]) $(2[2-]) } + +rule BuildVMWareImage vmwareImage : plainImage : imageSize +{ + # BuildVMWareImage : : + + IMAGE_SIZE on $(vmwareImage) = $(imageSize) ; + + Depends $(vmwareImage) : vmdkheader $(plainImage) ; + BuildVMWareImage1 $(vmwareImage) : vmdkheader $(plainImage) ; +} + +actions BuildVMWareImage1 +{ + rm -f $(1) + $(2[1]) -h 64k -i$(IMAGE_SIZE)M $(1) && + cat $(2[2]) >> $(1) +} diff --git a/build/jam/UserBuildConfig.sample b/build/jam/UserBuildConfig.sample index d895a27af0..9c99c2c5d8 100644 --- a/build/jam/UserBuildConfig.sample +++ b/build/jam/UserBuildConfig.sample @@ -29,6 +29,9 @@ HAIKU_IMAGE_NAME = walter.image ; HAIKU_IMAGE_DIR = /tmp ; HAIKU_IMAGE_SIZE = 100 ; +# Name the VMWare image walter.vmdk (in directory $(HAIKU_IMAGE_DIR)). +HAIKU_VMWARE_IMAGE_NAME = walter.vmdk ; + # Install Haiku in directory /Haiku. HAIKU_INSTALL_DIR = /Haiku ;