From 4387bed7c2838b752bcf8da079ea29548a4b9b83 Mon Sep 17 00:00:00 2001 From: Mike Popoloski Date: Sun, 24 May 2015 13:16:18 -0400 Subject: [PATCH] Enabling WinRT / Windows Store apps for bgfx. --- examples/runtime/images/SplashScreen.png | Bin 0 -> 4645 bytes scripts/bgfx.lua | 2 +- scripts/example-common.lua | 3 ++- scripts/genie.lua | 25 ++++++++++++++++------- 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 examples/runtime/images/SplashScreen.png diff --git a/examples/runtime/images/SplashScreen.png b/examples/runtime/images/SplashScreen.png new file mode 100644 index 0000000000000000000000000000000000000000..fc6a2468ebefd0dbc232424df7f7a9389b6e4c16 GIT binary patch literal 4645 zcmeHKc~Dd577s3{2wID528trePB1_aLZR#?$d2+@1ff6#62L%(3Wh2LBw>}s1tPLZ zL?Oknh%6D=2|EH}z{n;6Oag{2gykjGH=XJDX4-k}U$5WHojdoO-`Rfm-0wR#-qzYe zMCgbR000nyoiVis0Cpe&00Gs#J9!cqSN1*cCJ_Qk>836!g$@@1v zcLM-B0k&ry%``ML&N(?WJpgRX+6)Z$Fqt2C$bZ&94E&!kaQarGC$H3f!DpO90DuFH z{7axUh~Ui=N`{*KE7T##H#E!>?E?t*^a~7C5A+E=s->=>uI&>8_ThoCFjFJPaCZhi z{>o&Vh#9nQV;i)GVuCts10hkzWt)Q-Bfm}uz2dOAUW6Q@5FedGeF@k!hJF0fZ= zyJfa*n8AVtgX(CgOz{aU1D|rfri~Fw$W*KhGj?IfRSo32q4N>ywYq}Au6psdsz#@yriZWO_k{#oy6jv@h_&j|^sj`mS%({4qqhQI9 zZN3757fC)%e@amrzD)`vZ-`wj>l?9#7pI%J#QI-=>jCv|_AAAz7Jfi?EKh$J14YHS zBSS0GZYfWvWahfuzSS*wFfSB)%u=Z)`*YM>2_T+PPyp90@F5HpMqVpxmPyR#wlj2i z(lhr}bw=LkPOXDKVp|$Er+j`eM?g>H9>9xWcC?!yqGv?sdPm+Vr09o2!VP{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9WX60!C2;uybS~Ot@vb~xNFYzxqmqngv6S*imh&4h) zE9ASBeas^@q}i27@+L@dv6u>oH|t6Lro0Dr%_XCjh&)rZgCa2kr(5P#?n1Nt{WhQz zMcv|Yu`dDAX)(NML-xhIN-ob+yD@JrIrwflgVzb|-nqO9X3xSpoQ_=Ze%edt{ndYI z876I~LA2`Py8>L^N|ll%-W?5$P`gj7->okoF>TC0OAM?r19cZKpqlJ^swW5Qqh_jy z%F0NxG!%GGLVjdAch0ahK)|MHTODfh_!v#y2vg9ufn3ucMuoY-2i!PLIN+My1a2eU z1E@V{YTZ~>iO#p9M0T{+&u#jZ{P+PH;QkKy;RI$i8EAyOL?Dyq#%t;y+3L^$(p zk{u+d_awpv3t!5;T<7P{AgFQWWZ5narZg4?5<9E05B;!?qe$SzH>yGDJqb8qXucJ8 zcVh?~b0^2lb$*tH%4a~xF4R>=WQ7Oja%R4=(h9pq8bQ{B`QvSXS34*<)gwdNF(kCy z_4;dKSjJSg=}~e^7}2-{pFOZqF_R^+IQ&TaOE31%%fg|U&2>X5PLsGa+;#`w9%g23 KT55dp#=il4%62CJ literal 0 HcmV?d00001 diff --git a/scripts/bgfx.lua b/scripts/bgfx.lua index a3b1899f..693b7a3c 100644 --- a/scripts/bgfx.lua +++ b/scripts/bgfx.lua @@ -81,7 +81,7 @@ function bgfxProject(_name, _kind, _defines) "$(DXSDK_DIR)/include", } - configuration { "winphone8*"} + configuration { "winphone8* or winstore8*"} linkoptions { "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata } diff --git a/scripts/example-common.lua b/scripts/example-common.lua index 96040b6b..37e53afa 100644 --- a/scripts/example-common.lua +++ b/scripts/example-common.lua @@ -48,7 +48,8 @@ project ("example-common") } end - configuration { "winphone8*"} + configuration { "winphone8* or winstore8*"} linkoptions { "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata } + premake.vstudio.splashpath = "../../../examples/runtime/images/SplashScreen.png" diff --git a/scripts/genie.lua b/scripts/genie.lua index e77a40e2..87ef1392 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -88,10 +88,7 @@ function exampleProject(_name) configuration {} - -- don't output debugdir for winphone builds - if "winphone81" ~= _OPTIONS["vs"] then - debugdir (path.join(BGFX_DIR, "examples/runtime")) - end + debugdir (path.join(BGFX_DIR, "examples/runtime")) includedirs { path.join(BX_DIR, "include"), @@ -221,7 +218,7 @@ function exampleProject(_name) "psapi", } - configuration { "winphone8*"} + configuration { "winphone8* or winstore8*" } removelinks { "DelayImp", "gdi32", @@ -234,7 +231,17 @@ function exampleProject(_name) linkoptions { "/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata } - -- WinRT targets need their own output directories are build files stomp over each other + + -- WinRT targets need their own output directories or build files stomp over each other + configuration { "x32", "winphone8* or winstore8*" } + targetdir (path.join(BGFX_BUILD_DIR, "win32_" .. _ACTION, "bin", _name)) + objdir (path.join(BGFX_BUILD_DIR, "win32_" .. _ACTION, "obj", _name)) + + configuration { "x64", "winphone8* or winstore8*" } + targetdir (path.join(BGFX_BUILD_DIR, "win64_" .. _ACTION, "bin", _name)) + objdir (path.join(BGFX_BUILD_DIR, "win64_" .. _ACTION, "obj", _name)) + + configuration { "ARM", "winphone8* or winstore8*" } targetdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "bin", _name)) objdir (path.join(BGFX_BUILD_DIR, "arm_" .. _ACTION, "obj", _name)) @@ -366,7 +373,11 @@ exampleProject("21-deferred") exampleProject("22-windows") exampleProject("23-vectordisplay") exampleProject("24-nbody") -exampleProject("25-c99") + +-- C99 source doesn't compile under WinRT settings +if not premake.vstudio.iswinrt() then + exampleProject("25-c99") +end if _OPTIONS["with-shared-lib"] then group "libs"