diff --git a/build/data/NiraiStart.py b/build/data/NiraiStart.py index 15bd7159..905cf26a 100644 --- a/build/data/NiraiStart.py +++ b/build/data/NiraiStart.py @@ -30,19 +30,28 @@ del dc del iv del key -# The VirtualFileSystem, which has already initialized, doesn't see the mount -# directives in the config(s) yet. We have to force it to load those manually: -#from panda3d.core import VirtualFileSystem, ConfigVariableList, Filename -vfs = VirtualFileSystem.getGlobalPtr() -mounts = ConfigVariableList('vfs-mount') -for mount in mounts: - mountfile, mountpoint = (mount.split(' ', 2) + [None, None, None])[:2] - vfs.mount(Filename(mountfile), Filename(mountpoint), 0) - # Resources -# TO DO: Sign and verify the phases to prevent edition +# TO DO: Sign and verify the phases to prevent editing. + +vfs = VirtualFileSystem.getGlobalPtr() +mfs = [3, 3.5, 4, 5, 5.5, 6, 7, 8, 9, 10, 11, 12, 13] abort = False +for mf in mfs: + filename = 'resources/default/phase_%s.mf' % mf + if not os.path.isfile(filename): + print 'Phase %s not found' % filename + abort = True + break + + mf = Multifile() + mf.openRead(filename) + + if not vfs.mount(mf, '/', 0): + print 'Unable to mount %s' % filename + abort = True + break + # Packs pack = os.environ.get('TT_STRIDE_CONTENT_PACK') import glob diff --git a/build/make.py b/build/make.py index 49ec7293..1806355c 100644 --- a/build/make.py +++ b/build/make.py @@ -71,7 +71,8 @@ class StridePackager(NiraiPackager): def generate_niraidata(self): print 'Generating niraidata' # Config - config = self.get_file_contents('../deployment/public_client.prc') + config = self.get_file_contents('../dependencies/config/general.prc') + config += '\n\n' + self.get_file_contents('../dependencies/config/release/dev.prc') config_iv = self.generate_key(16) config_key = self.generate_key(16) @@ -104,7 +105,7 @@ class StridePackager(NiraiPackager): # Compile the engine if args.compile_cxx: - compiler = NiraiCompiler('stride.exe', libs=set(glob.glob('c:/repos/libpandadna/libpandadna.dir/Release/*.obj'))) + compiler = NiraiCompiler('stride.exe', libs=set(glob.glob('libpandadna/libpandadna.dir/Release/*.obj'))) compiler.add_nirai_files() compiler.add_source('src/stride.cxx') diff --git a/build/src/stride.cxx b/build/src/stride.cxx index 07e1aafb..45a600b5 100644 --- a/build/src/stride.cxx +++ b/build/src/stride.cxx @@ -136,8 +136,6 @@ int niraicall_onLoadGameData() memset(&fzns[num_modules], 0, sizeof(_frozen)); PyImport_FrozenModules = fzns; - delete[] &fzns; - // libpandadna init_libpandadna(); initlibpandadna();