From 24f3f43457ac6bdeed95c1ed0a882387a509078a Mon Sep 17 00:00:00 2001 From: masoud bh Date: Mon, 9 Nov 2015 02:23:58 +0330 Subject: Add icon to exe file in windows export add version_info and icon sections in "export to windows platform". add version_info and icon to godot exe file (editor & template exe). fix an problem in image class. change all default icons to android export icon (a little more rounded). create an python script for convert file to cpp byte array for use in 'splash.h'. --- platform/windows/detect.py | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) (limited to 'platform/windows/detect.py') diff --git a/platform/windows/detect.py b/platform/windows/detect.py index f0d2a7cc40..b2451a3076 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -88,7 +88,7 @@ import os -import sys +import sys def is_active(): @@ -173,13 +173,30 @@ def get_flags(): ('theora','no'), ] +def build_res_file( target, source, env ): + cmdbase = "" + if (env["bits"] == "32"): + cmdbase = env['mingw_prefix'] + else: + cmdbase = env['mingw_prefix_64'] + CPPPATH = env['CPPPATH'] + cmdbase = cmdbase + 'windres --include-dir . ' + import subprocess + for x in range(len(source)): + cmd = cmdbase + '-i ' + str(source[x]) + ' -o ' + str(target[x]) + try: + out = subprocess.Popen(cmd,shell = True,stderr = subprocess.PIPE).communicate() + if len(out[1]): + return 1 + except: + return 1 + return 0 def configure(env): env.Append(CPPPATH=['#platform/windows']) - - + env['is_mingw']=False if (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): #build using visual studio env['ENV']['TMP'] = os.environ['TMP'] @@ -354,7 +371,7 @@ def configure(env): env.Append(LIBS=['mingw32','opengl32', 'dsound', 'ole32', 'd3d9','winmm','gdi32','iphlpapi','shlwapi','wsock32','kernel32']) # if (env["bits"]=="32"): -# # env.Append(LIBS=['gcc_s']) + # env.Append(LIBS=['gcc_s']) # #--with-arch=i686 # env.Append(CPPFLAGS=['-march=i686']) # env.Append(LINKFLAGS=['-march=i686']) @@ -366,6 +383,10 @@ def configure(env): env.Append(CPPFLAGS=['-DMINGW_ENABLED']) env.Append(LINKFLAGS=['-g']) + # resrc + env['is_mingw']=True + env.Append( BUILDERS = { 'RES' : env.Builder(action = build_res_file, suffix = '.o',src_suffix = '.rc') } ) + import methods env.Append( BUILDERS = { 'GLSL120' : env.Builder(action = methods.build_legacygl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) env.Append( BUILDERS = { 'GLSL' : env.Builder(action = methods.build_glsl_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) @@ -373,4 +394,3 @@ def configure(env): env.Append( BUILDERS = { 'GLSL120GLES' : env.Builder(action = methods.build_gles2_headers, suffix = 'glsl.h',src_suffix = '.glsl') } ) - -- cgit v1.2.3