VirtualBox

Changeset 12856 in vbox for trunk


Ignore:
Timestamp:
Oct 1, 2008 10:18:07 AM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: Use the INSTALLS target for the creation of *.lproj directories.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/Makefile.kmk

    r12839 r12856  
    505505#
    506506# For the application menu it is necessary to have all supported language at
    507 # least as a project directory in the bundle. Create them all based on the nls
    508 # files we have.
    509 #
    510 ## @todo r=bird: Convert this to an INSTALLS target. Please, do avoid using the OTHERS targets if possible.
    511 ## @todo r=bird: This doesn't actually work on the build boxes. there is no nls/VirtualBox_*.ts there since
    512 ##               the makefile is loaded from the root of the trunk... Please fix.
    513 VBOX_SUPPORTED_LANG = $(patsubst nls/VirtualBox_%.ts,%.lproj,$(wildcard nls/VirtualBox_*.ts))
    514 VBOX_LANG_INSTALL = \
    515                 $(patsubst %,$(PATH_BIN)/../Resources/%,$(VBOX_SUPPORTED_LANG)) \
    516                 $(patsubst %,$(PATH_BIN)/../Resources/VirtualBoxVM.app/Contents/Resources/%,$(VBOX_SUPPORTED_LANG))
    517 OTHERS += $(VBOX_LANG_INSTALL)
     507# least as a project directory in the bundle. Create them all based on the
     508# nls/ApprovedLanguages.txt file.
     509# @todo: It seems it isn't possible to let kBuild generate a directory in the
     510# install target without installing something. So we install an empty file for
     511# that.
     512#
     513# Figure out which languages we support
     514VBOX_SUPPORTED_LANG = $(shell $(CAT_EXT) $(PATH_ROOT)/src/VBox/Frontends/VirtualBox4/nls/ApprovedLanguages.txt)
     515# For the .lproj directories
     516VBOX_INSTALL_LANG_LPROJ = $(addsuffix .lproj,$(VBOX_SUPPORTED_LANG))
     517
     518define def_gen_lproj_dir
     519INSTALLS += $(lang_name)
     520$(lang_name)_INST = dist/VirtualBox.app/Contents/Resources/$(lang_name)
     521# The install TEMPLATE needs something to install; use a emtpy file for that.
     522# @todo: How could this be prevented?
     523$(lang_name)_SOURCES = \
     524        $(VBOX_VIRTUALBOX4_OUT_DIR)/lproj/.empty
     525# Symlink for the VirtualBoxVM.app
     526$(lang_name)_SYMLINKS = \
     527        ../VirtualBoxVM.app/Contents/Resources/$(lang_name)=>../../../$(lang_name)
     528endef
     529$(foreach lang_name,$(VBOX_INSTALL_LANG_LPROJ),$(eval $(def_gen_lproj_dir)))
     530
     531# Rule for generating an empty file
     532BLDDIRS += $(VBOX_VIRTUALBOX4_OUT_DIR)/lproj/
     533CLEAN += $(VBOX_VIRTUALBOX4_OUT_DIR)/lproj/.empty
     534$(VBOX_VIRTUALBOX4_OUT_DIR)/lproj/.empty:: | $$(dir $$@)
     535        $(QUIET)$(APPEND) $@ ''
    518536
    519537#
     
    619637                nls/VirtualBox_xx_YY.ts
    620638
    621 define def_create_lang_dir
    622 $(language):
    623         $(RM) -Rf $(language)
    624         $(MKDIR) -p \
    625                 $(language)
    626 endef
    627 $(foreach language,$(VBOX_LANG_INSTALL),$(eval $(def_create_lang_dir)))
    628 
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette