* blenderlite works now on windows too.
authorNathan Letwory <nathan@letworyinteractive.com>
Sun, 7 Dec 2008 13:22:50 +0000 (13:22 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Sun, 7 Dec 2008 13:22:50 +0000 (13:22 +0000)
  - when WITH_BF_SDL=True entry-point is mainCTRStartup (due to SDL)
  - with WITH_BF_SDL=False this should be just main

SConstruct
config/win32-vc-config.py
tools/Blender.py

index 0bc05a59df22f0a8cf348450cc397ccc2e38977e..bf5356a4073fe753e2b1d9494302ed4eae328654 100644 (file)
@@ -284,6 +284,10 @@ if 'blenderlite' in B.targets:
        env['BF_NO_ELBEEM'] = True
        env['WITH_BF_PYTHON'] = False
 
+if env['WITH_BF_SDL'] == False and env['OURPLATFORM'] in ('win32-vc', 'win32-ming'):
+       env['PLATFORM_LINKFLAGS'].remove('/ENTRY:mainCRTStartup')
+       env['PLATFORM_LINKFLAGS'].append('/ENTRY:main')
+
 # lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
 #B.root_build_dir = B.arguments.get('BF_BUILDDIR', '..'+os.sep+'build'+os.sep+platform+os.sep)
 B.root_build_dir = env['BF_BUILDDIR']
index fe51abe0a89300bbf1c0ee342c41bb6ebc6c1f38..f6f97f5e98230bcc54ccf790a6cbc7c0c8a6fc1b 100644 (file)
@@ -183,19 +183,7 @@ CXX_WARN = []
 
 LLIBS = 'ws2_32 vfw32 winmm kernel32 user32 gdi32 comdlg32 advapi32 shfolder shell32 ole32 oleaut32 uuid'
 
-PLATFORM_LINKFLAGS = '''
-                       /SUBSYSTEM:CONSOLE
-                       /MACHINE:IX86
-                       /ENTRY:mainCRTStartup
-                       /INCREMENTAL:NO
-                       /NODEFAULTLIB:"msvcprt.lib"
-                       /NODEFAULTLIB:"glut32.lib"
-                       /NODEFAULTLIB:"libc.lib"
-                       /NODEFAULTLIB:"libcd.lib"
-                       /NODEFAULTLIB:"libcpd.lib"
-                       /NODEFAULTLIB:"libcp.lib"
-                       /LARGEADDRESSAWARE
-                   '''
+PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/ENTRY:mainCRTStartup','/INCREMENTAL:NO','/NODEFAULTLIB:"msvcprt.lib"','/NODEFAULTLIB:"glut32.lib"','/NODEFAULTLIB:"libc.lib"','/NODEFAULTLIB:"libcd.lib"','/NODEFAULTLIB:"libcpd.lib"','/NODEFAULTLIB:"libcp.lib"','/LARGEADDRESSAWARE']
 
 BF_BUILDDIR = '..\\build\\win32-vc'
 BF_INSTALLDIR='..\\install\\win32-vc'
index 3b5e33eda593854a9996c02e1c1070b783b292c3..240534d4437b8c02aabad7ff53f858ff56a4ded0 100644 (file)
@@ -457,7 +457,7 @@ class BlenderEnvironment(SConsEnvironment):
                print bc.HEADER+'Configuring program '+bc.ENDC+bc.OKGREEN+progname+bc.ENDC
                lenv = self.Clone()
                if lenv['OURPLATFORM'] in ['win32-vc', 'cygwin']:
-                       lenv.Append(LINKFLAGS = Split(lenv['PLATFORM_LINKFLAGS']))
+                       lenv.Append(LINKFLAGS = lenv['PLATFORM_LINKFLAGS'])
                        if lenv['BF_DEBUG']:
                                lenv.Prepend(LINKFLAGS = ['/DEBUG','/PDB:'+progname+'.pdb'])
                if  lenv['OURPLATFORM']=='linux2':