[vbox-dev] how to write an installer (Makefile) for Vbox-unattended ?

Alexey Eromenko al4321 at gmail.com
Sat Apr 11 21:02:11 UTC 2015


Goal:
copy vbox-unattended scripts as-is into user's machine target folder:
/opt/VirtualBox/vbox-unattended/...

I have moved scripts to:
src/VBox/Installer/vbox_unattended/

then created a makefile in same folder: Makefile.kmk
==========================================================
# $Id: Makefile.kmk $
## @file
# Common unattended installer stuff.
#

SUB_DEPTH = ../../../..
include $(KBUILD_PATH)/subheader.kmk

# Include Sub-Makefiles.
ifndef VBOX_OSE
 include $(PATH_SUB_CURRENT)/keygen/Makefile.kmk
endif

# unattended installer

INSTALLS += VBox_unattended_installer

VBox_unattended_installer_INST = vbox-unattended/
VBox_unattended_installer_MODE = a+r,u+w

VBox_unattended_installer_SOURCES := \
linux_debian_template_isolinux.cfg \
linux_debian_template_preseed.cfg \
...
win_nt6_template_autounattend.xml

include $(FILE_KBUILD_SUB_FOOTER)
==========================================================
modified file: src/VBox/Installer/Makefile.kmk


include $(PATH_SUB_CURRENT)/common/Makefile.kmk
+include $(PATH_SUB_CURRENT)/vbox_unattended/Makefile.kmk
==========================================================
modified file: src/VBox/Installer/Config.kmk

VBOXINST_UNATTENDED = vbox-unattended/linux_debian_template_isolinux.cfg \
    vbox-unattended/linux_debian_template_preseed.cfg \
...
    vbox-unattended/win_nt6_template_autounattend.xml

==========================================================
Compiler error:

alexey at deb6-xrig:~/VirtualBox-5.0.0_BETA1$ source
/home/alexey/VirtualBox-5.0.0_BETA1/env.sh && kmk && kmk packing
kBuild: Pass - Build Programs
kBuild: Pass - Libraries
kBuild: Pass - DLLs
kBuild: Pass - Programs
kBuild: Pass - Other Stuff
kBuild: Pass - Staging
kmk: *** No rule to make target
`/home/alexey/VirtualBox-5.0.0_BETA1/out/linux.amd64/release/obj/Installer/linux/archive/vbox-unattended/',
needed by `/home/alexey/VirtualBox-5.0.0_BETA1/out/linux.amd64/release/obj/Installer/linux/archive/vbox-unattended/linux_debian_template_isolinux.cfg'.
Stop.

==========================================================

Now -- those errors are really hard to debug, because I don't modify
./out/linux.amd64/ files.
Basically hunting for bugs there looks like a black magic. I have no
clue what I did wrong.

Maybe
"VBox_unattended_installer_INST = vbox-unattended/"
is wrong, but I have no clue what it should be ...

-- 
-Alexey Eromenko "Technologov"



More information about the vbox-dev mailing list