#---------------------------------------------------------------------------- # Project: Horizon # File: packagedefs.om # # Copyright (C)2009-2011 Nintendo Co., Ltd. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # # $Rev: 34627 $ #---------------------------------------------------------------------------- #---------------------------------------------------------------------------- # Class definitions #---------------------------------------------------------------------------- PackageManager. = class PackageManager this.packages = $(EMPTY) new() = packages = $(Map) return $(this) add(name) = packages = $(packages.add $(name), true) return $(this) isAvailable(name) = return $(packages.mem $(name)) isPackaged() = return $(isAvailable internal) dump() = println(dump packages) packages.foreach(k, v) println($"Package: "$(k)) return global.RegisterPackage(name) = PACKAGE_MANAGER = $(PACKAGE_MANAGER.add $(name)) export #---------------------------------------------------------------------------- # Variable Definitions #---------------------------------------------------------------------------- global.PACKAGE_MANAGER = $(PackageManager.new) #---------------------------------------------------------------------------- # Load package definitions #---------------------------------------------------------------------------- private.root_packages = $(ROOT_OMAKE)/packages/$(TARGET_PLATFORM.Name) if $(test -d $(root_packages)) foreach(om,$(ls i,$(root_packages)/@*@.om)) include $(removesuffix $(om)) export foreach(om,$(ls i,$(root_packages)/_*.om)) include $(removesuffix $(om)) export export