-- <<<- ------------------------------------------------------------------------ ------------------------------------------------------------------------ -- Load this build script "!mkimple.sx" into a fresh invocation of ScriptX, -- to compile the implementation modules and build the "dreamimp.sxl" library. -- The TrackingImplementation, AnimationImplementation, and DreamImplementation -- implementation modules are stored in this LibraryContainer. -- The Dream title "dream.sxt", as well as the build scripts "!mkstart.sx", -- "!mkrooms.sx", and "!mkprods.sx", all depend on "dreamimp.sxl". open LibraryContainer \ dir: (parentDir theScriptDir) \ path: "dream.sxl" ( local startTime := theCalendarClock.time -- Save the directory that this script was loaded from. local dir := theScriptDir -- Subdue the garbage collector. setGCIncrement 30 -- Compile the implementation modules. for fileName in #( "animimp.sx", -- AnimationImplementation module "trackimp.sx", -- TrackingImplementation module "dreamimp.sx" -- DreamImplementaion module ) do ( print #("Loading implementation module", fileName) fileIn dir \ name: fileName \ debugInfo: false garbageCollect() ) -- Create the "dreamimp.sxl" LibraryContainer. local theLib := new LibraryContainer \ dir: (parentDir dir) \ path: "dreamimp.sxl" \ targetCollection: #(:) -- Stuff the modules into it. for moduleName in #( @AnimationImplementation, @TrackingImplementation, @DreamImplementation ) do ( print moduleName theLib[moduleName] := (getModule moduleName) ) -- Give it a name. theLib.name := "Dream Implementation Modules" -- The startupAction will load all of the modules. theLib.startupAction := fileIn "(self -> for i in self do load i )" module: (getModule @DreamImplementation) -- Flush hard, it's a long way to the cafeteria. close theLib local endTime := theCalendarClock.time print #("Time for !mkimple", endTime - startTime) ok ) ------------------------------------------------------------------------ -- >>>