From 67f433b3f1cced70056543f54a2dc9997cda7eea Mon Sep 17 00:00:00 2001 From: Kp Date: Sat, 2 Mar 2013 23:58:29 +0000 Subject: [PATCH] Move register_program into subclass --- SConstruct | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/SConstruct b/SConstruct index 08a54a609..1d8b52e94 100644 --- a/SConstruct +++ b/SConstruct @@ -253,22 +253,6 @@ class DXXProgram: print '\n' env.Append(CPPDEFINES = [('SHAREPATH', '\\"' + str(self.user_settings.sharepath) + '\\"')]) - def register_program(self): - env = self.env - # finally building program... - env.Program(target=str(self.target), source = self.common_sources, LIBS = self.platform_settings.libs, LINKFLAGS = str(self.platform_settings.lflags)) - if (sys.platform != 'darwin'): - env.Install(self.user_settings.BIN_DIR, str(self.target)) - env.Alias('install', self.user_settings.BIN_DIR) - else: - tool_bundle.TOOL_BUNDLE(env) - env.MakeBundle(self.PROGRAM_NAME + '.app', self.target, - 'free.d2x-rebirth', 'd2xgl-Info.plist', - typecode='APPL', creator='DCNT', - icon_file='arch/cocoa/d2x-rebirth.icns', - subst_dict={'d2xgl' : self.target}, # This is required; manually update version for Xcode compatibility - resources=[['English.lproj/InfoPlist.strings', 'English.lproj/InfoPlist.strings']]) - class D2XProgram(DXXProgram): PROGRAM_NAME = 'D2X-Rebirth' target = 'd2x-rebirth' @@ -503,6 +487,23 @@ class D2XProgram(DXXProgram): 'texmap/tmap_per.asm' ] + def register_program(self): + env = self.env + exe_target = self.target + # finally building program... + env.Program(target=str(exe_target), source = self.common_sources, LIBS = self.platform_settings.libs, LINKFLAGS = str(self.platform_settings.lflags)) + if (sys.platform != 'darwin'): + env.Install(self.user_settings.BIN_DIR, str(exe_target)) + env.Alias('install', self.user_settings.BIN_DIR) + else: + tool_bundle.TOOL_BUNDLE(env) + env.MakeBundle(self.PROGRAM_NAME + '.app', exe_target, + 'free.d2x-rebirth', 'd2xgl-Info.plist', + typecode='APPL', creator='DCNT', + icon_file='arch/cocoa/d2x-rebirth.icns', + subst_dict={'d2xgl' : exe_target}, # This is required; manually update version for Xcode compatibility + resources=[['English.lproj/InfoPlist.strings', 'English.lproj/InfoPlist.strings']]) + program = D2XProgram() # show some help when running scons -h