From 1b3af4be19e62905da936be4e2510f5f5d36416d Mon Sep 17 00:00:00 2001 From: chuanweizhang2013 Date: Thu, 22 May 2014 22:07:11 +0800 Subject: [PATCH] move runtime res path --- .../frameworks/runtime-src/Classes/Runtime.cpp | 8 ++++---- .../runtime-src/proj.android/build-cfg.json | 4 ++++ .../runtime-src/proj.win32/HelloLua.vcxproj | 4 ++++ .../{res/debug => runtime/rtres}/Play0.png | Bin .../{res/debug => runtime/rtres}/Play1.png | Bin .../{res/debug => runtime/rtres}/landscape.png | Bin .../{res/debug => runtime/rtres}/portrait.png | Bin .../{res/debug => runtime/rtres}/shine.png | Bin 8 files changed, 12 insertions(+), 4 deletions(-) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/Play0.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/Play1.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/landscape.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/portrait.png (100%) rename templates/lua-template-runtime/{res/debug => runtime/rtres}/shine.png (100%) diff --git a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp index 845dc87798..1c518a5e4a 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp +++ b/templates/lua-template-runtime/frameworks/runtime-src/Classes/Runtime.cpp @@ -106,12 +106,12 @@ public: int designWidth = 1280; int designHeight = 800; Director::getInstance()->getOpenGLView()->setDesignResolutionSize(designWidth,designHeight,ResolutionPolicy::EXACT_FIT); - string playEnbleFile = "res/debug/Play1.png"; - string shineFile = "res/debug/shine.png"; - string backgroundFile = "res/debug/landscape.png"; + string playEnbleFile = "rtres/Play1.png"; + string shineFile = "rtres/shine.png"; + string backgroundFile = "rtres/landscape.png"; if (!ConfigParser::getInstance()->isLanscape()) { - backgroundFile = "res/debug/portrait.png"; + backgroundFile = "rtres/portrait.png"; Director::getInstance()->getOpenGLView()->setDesignResolutionSize(designHeight,designWidth,ResolutionPolicy::EXACT_FIT); } diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json index ad111cc1f2..864fbb9975 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.android/build-cfg.json @@ -30,6 +30,10 @@ "from": "../../../config.json", "to": "" }, + { + "from": "../../../runtime/rtres", + "to": "rtres" + }, { "from": "../../cocos2d-x/external/lua/luasocket", "to": "", diff --git a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj index dc70165991..7b1faa92eb 100644 --- a/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj +++ b/templates/lua-template-runtime/frameworks/runtime-src/proj.win32/HelloLua.vcxproj @@ -109,9 +109,11 @@ if exist "$(OutDir)\Resource" rd /s /q "$(OutDir)\Resource" mkdir "$(OutDir)\Resource" mkdir "$(OutDir)\Resource\src" mkdir "$(OutDir)\Resource\res" +mkdir "$(OutDir)\Resource\rtres" xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\lua-bindings\script" "$(OutDir)\Resource" /e /Y xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\Resource\src" /e /Y xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\..\runtime\rtres" "$(OutDir)\Resource\rtres" /e /Y copy "$(ProjectDir)..\..\..\config.json" "$(OutDir)\Resource\config.json" /Y xcopy "$(ProjectDir)..\..\cocos2d-x\external\lua\luasocket\*.lua" "$(OutDir)\Resource" /e /Y copy files @@ -165,9 +167,11 @@ if exist "$(OutDir)\Resource" rd /s /q "$(OutDir)\Resource" mkdir "$(OutDir)\Resource" mkdir "$(OutDir)\Resource\src" mkdir "$(OutDir)\Resource\res" +mkdir "$(OutDir)\Resource\rtres" xcopy "$(ProjectDir)..\..\cocos2d-x\cocos\scripting\lua-bindings\script" "$(OutDir)\Resource" /e /Y xcopy "$(ProjectDir)..\..\..\src" "$(OutDir)\Resource\src" /e /Y xcopy "$(ProjectDir)..\..\..\res" "$(OutDir)\Resource\res" /e /Y +xcopy "$(ProjectDir)..\..\..\runtime\rtres" "$(OutDir)\Resource\rtres" /e /Y copy "$(ProjectDir)..\..\..\config.json" "$(OutDir)\Resource\config.json" /Y xcopy "$(ProjectDir)..\..\cocos2d-x\external\lua\luasocket\*.lua" "$(OutDir)\Resource" /e /Y copy files diff --git a/templates/lua-template-runtime/res/debug/Play0.png b/templates/lua-template-runtime/runtime/rtres/Play0.png similarity index 100% rename from templates/lua-template-runtime/res/debug/Play0.png rename to templates/lua-template-runtime/runtime/rtres/Play0.png diff --git a/templates/lua-template-runtime/res/debug/Play1.png b/templates/lua-template-runtime/runtime/rtres/Play1.png similarity index 100% rename from templates/lua-template-runtime/res/debug/Play1.png rename to templates/lua-template-runtime/runtime/rtres/Play1.png diff --git a/templates/lua-template-runtime/res/debug/landscape.png b/templates/lua-template-runtime/runtime/rtres/landscape.png similarity index 100% rename from templates/lua-template-runtime/res/debug/landscape.png rename to templates/lua-template-runtime/runtime/rtres/landscape.png diff --git a/templates/lua-template-runtime/res/debug/portrait.png b/templates/lua-template-runtime/runtime/rtres/portrait.png similarity index 100% rename from templates/lua-template-runtime/res/debug/portrait.png rename to templates/lua-template-runtime/runtime/rtres/portrait.png diff --git a/templates/lua-template-runtime/res/debug/shine.png b/templates/lua-template-runtime/runtime/rtres/shine.png similarity index 100% rename from templates/lua-template-runtime/res/debug/shine.png rename to templates/lua-template-runtime/runtime/rtres/shine.png