From 6533b8af29d66b0211ea3c4bc672bb309de9bb11 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 23 Apr 2013 22:52:06 +0200 Subject: [PATCH] [DEV] add the windows correct compilation --- build | 2 +- external/etk | 2 +- external/glew/lutin_glew.py | 21 +++++++++++++++++++ external/z/lutin_z.py | 41 +++++++++++++++++++++++++++++++------ sources/lutin_ewol.py | 9 +++++++- 5 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 external/glew/lutin_glew.py diff --git a/build b/build index dff9cb13..78d74b12 160000 --- a/build +++ b/build @@ -1 +1 @@ -Subproject commit dff9cb1393453917c3c120fd246146cb6d881206 +Subproject commit 78d74b125f820fbeed698ddde87904fd99757c71 diff --git a/external/etk b/external/etk index 91b9d605..46b81ecb 160000 --- a/external/etk +++ b/external/etk @@ -1 +1 @@ -Subproject commit 91b9d605993c09836ba9acd26579fcd6b1029cbc +Subproject commit 46b81ecbbf1a907cfc1c629af848d1b0aeadd7dc diff --git a/external/glew/lutin_glew.py b/external/glew/lutin_glew.py new file mode 100644 index 00000000..2e57dfcf --- /dev/null +++ b/external/glew/lutin_glew.py @@ -0,0 +1,21 @@ +#!/usr/bin/python +import lutinModule +import lutinTools + +def Create(target): + if target.name=="Windows": + #http://glew.sourceforge.net/index.html + myModule = lutinModule.module(__file__, 'glew', 'PREBUILD') + + myModule.AddExportPath(lutinTools.GetCurrentPath(__file__) + "/glew/include/") + myModule.AddExportflag_LD([ + lutinTools.GetCurrentPath(__file__) + "/glew/lib/glew32s.lib", + "-lopengl32", + "-lgdi32"]) + + # add the currrent module at the + return myModule + else: + return None + + diff --git a/external/z/lutin_z.py b/external/z/lutin_z.py index c9613abc..9f40ec14 100644 --- a/external/z/lutin_z.py +++ b/external/z/lutin_z.py @@ -1,12 +1,41 @@ #!/usr/bin/python import lutinModule +import lutinTools def Create(target): - myModule = lutinModule.module(__file__, 'z', 'PREBUILD') - - myModule.AddExportflag_LD('-lz') - - # add the currrent module at the - return myModule + if target.name=="Windows": + myModule = lutinModule.module(__file__, 'z', 'LIBRARY') + myModule.AddSrcFile([ + "zlib/adler32.c", + "zlib/crc32.c", + "zlib/deflate.c", + "zlib/infback.c", + "zlib/inffast.c", + "zlib/inflate.c", + "zlib/inftrees.c", + "zlib/trees.c", + "zlib/zutil.c", + "zlib/compress.c", + "zlib/uncompr.c", + "zlib/gzclose.c", + "zlib/gzlib.c", + "zlib/gzread.c", + "zlib/gzwrite.c"]) + + myModule.AddExportPath(lutinTools.GetCurrentPath(__file__)) + myModule.AddExportPath(lutinTools.GetCurrentPath(__file__) + "/zlib") + + myModule.CompileFlags_CC([ + "-D_LARGEFILE64_SOURCE=1", + "-DHAVE_HIDDEN"]) + + # add the currrent module at the + return myModule + else: + myModule = lutinModule.module(__file__, 'z', 'PREBUILD') + + myModule.AddExportflag_LD('-lz') + # add the currrent module at the + return myModule diff --git a/sources/lutin_ewol.py b/sources/lutin_ewol.py index e281a850..3ca0b96d 100755 --- a/sources/lutin_ewol.py +++ b/sources/lutin_ewol.py @@ -4,6 +4,9 @@ import lutinTools import os def Create(target): + # set the ewol folder for Android basic sources ... + target.SetEwolFolder(lutinTools.GetCurrentPath(__file__) + "/../") + # module name is 'edn' and type binary. myModule = lutinModule.module(__file__, 'ewol', 'LIBRARY') # add the file to compile: @@ -182,7 +185,7 @@ def Create(target): tmp_dst=lutinTools.GetCurrentPath(__file__) + "/ewol/renderer/os/gui.Android.tmp.cpp" # TODO : A really work to do here ... - os.system("cp -v " + tmp_src + " " + tmp_dst) + lutinTools.CopyFile(tmp_src,tmp_dst) os.system("sed -i \"s|__PROJECT_ORG_TYPE__|org|\" " + tmp_dst) os.system("sed -i \"s|__PROJECT_VENDOR__|edouarddupin|\" " + tmp_dst) os.system("sed -i \"s|__PROJECT_NAME__|edn|\" "+ tmp_dst) @@ -190,6 +193,10 @@ def Create(target): myModule.AddSrcFile("ewol/renderer/os/gui.Android.cpp") + elif target.name=="Windows": + myModule.AddModuleDepend("glew") + myModule.AddSrcFile("ewol/renderer/os/gui.Windows.cpp") + myModule.CompileFlags_CC('-D__EWOL_INTEGRATED_FONT__') else: debug.error("unknow mode...")