modify eclipse project config
delete libs and use the folder eclipse generated instead.
This commit is contained in:
laschweinski 2011-09-23 09:56:30 +08:00
parent 1cac9520cc
commit 0f7a15b1b3
10 changed files with 308 additions and 1075 deletions

16
CocosDenshion/proj.linux/.cproject Normal file → Executable file
View File

@ -22,7 +22,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="move output libs to a specific libs" postbuildStep="sh ../../../post.sh ${ProjName} cocosdenshion ${ConfigName}">
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1982681102." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1290289406" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.1343594495" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@ -70,7 +70,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.509246766">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.509246766" moduleId="org.eclipse.cdt.core.settings" name="Release">
@ -91,7 +90,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.509246766" name="Release" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="move output libs to a specific libs" postbuildStep="sh ../../../post.sh ${ProjName} cocosdenshion ${ConfigName}">
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.509246766" name="Release" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="" postbuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.509246766." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.305868874" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.506287391" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
@ -139,7 +138,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1621062209">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1621062209" moduleId="org.eclipse.cdt.core.settings" name="AndroidDebug">
@ -147,7 +145,7 @@
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/CocosDenshion"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/CocosDenshion/AndroidDebug"/>
<entry flags="RESOLVED" kind="libraryFile" name="CocosDenshion"/>
<entry flags="RESOLVED" kind="libraryFile" name="cocosdenshion"/>
</externalSetting>
</externalSettings>
<extensions>
@ -160,7 +158,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1621062209" name="AndroidDebug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="move output libs to a specific libs" postbuildStep="sh ../../../post.sh ${ProjName} cocosdenshion ${ConfigName}">
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1621062209" name="AndroidDebug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1982681102.1621062209." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1558765061" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.debug.620879821" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@ -206,7 +204,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.509246766.1769340575">
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="cdt.managedbuild.config.gnu.exe.release.509246766.1769340575" moduleId="org.eclipse.cdt.core.settings" name="AndroidRelease">
@ -214,7 +211,7 @@
<externalSetting>
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/CocosDenshion"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/CocosDenshion/AndroidRelease"/>
<entry flags="RESOLVED" kind="libraryFile" name="CocosDenshion"/>
<entry flags="RESOLVED" kind="libraryFile" name="cocosdenshion"/>
</externalSetting>
</externalSettings>
<extensions>
@ -227,7 +224,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.509246766.1769340575" name="AndroidRelease" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="move output libs to a specific libs" postbuildStep="sh ../../../post.sh ${ProjName} cocosdenshion ${ConfigName}">
<configuration artifactExtension="so" artifactName="cocosdenshion" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.509246766.1769340575" name="AndroidRelease" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="" postbuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.509246766.1769340575." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.885182269" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform id="cdt.managedbuild.target.gnu.platform.exe.release.1280043208" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
@ -273,7 +270,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">

2
CocosDenshion/proj.linux/.project Normal file → Executable file
View File

@ -31,7 +31,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/CocosDenshion/Release}</value>
<value>${workspace_loc:/CocosDenshion/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>

View File

@ -0,0 +1,47 @@
#!/bin/bash
#arguments
#1 is the config name
#2 is the project name
#3 is the cocos2d sdk base folder
#4 is the resource folder name if it has
originRes="Resource"
echo $#
if [ $# > 2 ]; then
echo "ok"
else
echo "configname or proj name do not assign"
exit
fi
if [ -d "../../android/libs" ];then
echo "create libs"
else
mkdir ../../android/libs
fi
if [ -d "../../android/libs/armeabi" ];then
echo "create libs"
else
mkdir ../../android/libs/armeabi
fi
#move game lib into android/libs/armeabi
cp -f lib$2.so ../../android/libs/armeabi/
#move cocos2d lib into android/libs/armeabi
cp -f $3/cocos2dx/proj.linux/$1/lib*.so ../../android/libs/armeabi/
cp -f $3/CocosDenshion/proj.linux/$1/lib*.so ../../android/libs/armeabi/
#link the resource folder
if [ -L ../../android/assets ];then
exit
fi
if [ $# == '4' ];then
originRes=$4
fi
echo `pwd`/../../$originRes
ln -s `pwd`/../../$originRes ../../android/assets

1088
HelloWorld/Linux/.cproject Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,6 @@
<name>HelloWorld</name>
<comment></comment>
<projects>
<project>cocos2dx-base</project>
<project>CocosDenshion</project>
</projects>
<buildSpec>
<buildCommand>
@ -33,7 +31,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value>${workspace_loc:/HelloCocos2dx/Release}</value>
<value>${workspace_loc:/HelloCocos2dx/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>

View File

@ -0,0 +1,47 @@
#!/bin/bash
#arguments
#1 is the config name
#2 is the project name
#3 is the cocos2d sdk base folder
#4 is the resource folder name if it has
originRes="Resource"
echo $#
if [ $# > 2 ]; then
echo "ok"
else
echo "configname or proj name do not assign"
exit
fi
if [ -d "../../android/libs" ];then
echo "create libs"
else
mkdir ../../android/libs
fi
if [ -d "../../android/libs/armeabi" ];then
echo "create libs"
else
mkdir ../../android/libs/armeabi
fi
#move game lib into android/libs/armeabi
cp -f lib$2.so ../../android/libs/armeabi/
#move cocos2d lib into android/libs/armeabi
cp -f $3/cocos2dx/proj.linux/$1/lib*.so ../../android/libs/armeabi/
cp -f $3/CocosDenshion/proj.linux/$1/lib*.so ../../android/libs/armeabi/
#link the resource folder
if [ -L ../../android/assets ];then
exit
fi
if [ $# == '4' ];then
originRes=$4
fi
echo `pwd`/../../$originRes
ln -s `pwd`/../../$originRes ../../android/assets

30
cocos2dx/proj.linux/.cproject Normal file → Executable file
View File

@ -22,7 +22,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="cocos2d" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.502995704" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="move all libs into the specific folder" postbuildStep="sh ../../../post.sh ${ProjName} cocos2d ${ConfigName}" preannouncebuildStep="" prebuildStep="">
<configuration artifactExtension="so" artifactName="cocos2d" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.502995704" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.502995704." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.debug.1381795813" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.debug.493450185" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@ -58,9 +58,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1531770269" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1531770269" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"/>
<option id="gnu.c.compiler.option.warnings.allwarn.1446204747" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.697502414" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
@ -97,7 +95,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1270689208">
@ -119,7 +116,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="cocos2d" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1270689208" name="Release" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="move all libs into the specific folder" postbuildStep="sh ../../../post.sh ${ProjName} cocos2d ${ConfigName}" preannouncebuildStep="" prebuildStep="">
<configuration artifactExtension="so" artifactName="cocos2d" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1270689208" name="Release" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1270689208." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.release.1907181202" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.release.294936983" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
@ -140,10 +137,11 @@
<option id="gnu.cpp.compiler.option.preprocessor.def.1432872181" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/>
</option>
<option id="gnu.cpp.compiler.option.warnings.allwarn.1658108227" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1506297979" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.984270671" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1465078999" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1465078999" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.519142307" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.1095324729" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/>
@ -154,9 +152,7 @@
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libfreetype2}&quot;"/>
<listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/platform/third_party/linux/libxml2}&quot;"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1479035749" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols">
<listOptionValue builtIn="false" value="LINUX"/>
</option>
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1479035749" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" valueType="definedSymbols"/>
<option id="gnu.c.compiler.option.warnings.allwarn.2077117046" name="All warnings (-Wall)" superClass="gnu.c.compiler.option.warnings.allwarn" value="false" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.c.compiler.input.191330176" superClass="cdt.managedbuild.tool.gnu.c.compiler.input"/>
</tool>
@ -193,7 +189,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.debug.502995704.1534655526">
@ -203,7 +198,7 @@
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/cocos2dx-base"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx-base/androidDebug"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx-base/AndroidDebug"/>
<entry flags="RESOLVED" kind="libraryFile" name="cocos2dx-base"/>
<entry flags="RESOLVED" kind="libraryFile" name="cocos2d"/>
</externalSetting>
</externalSettings>
<extensions>
@ -216,7 +211,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.502995704.1534655526" name="AndroidDebug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="move all libs into the specific folder" postbuildStep="sh ../../../post.sh ${ProjName} cocos2d ${ConfigName}" preannouncebuildStep="" prebuildStep="arm-linux-androideabi-g++">
<configuration artifactExtension="so" artifactName="cocos2d" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.502995704.1534655526" name="AndroidDebug" parent="cdt.managedbuild.config.gnu.exe.debug" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.502995704.1534655526." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.debug.55615126" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.debug.289263445" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@ -291,7 +286,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
<cconfiguration id="cdt.managedbuild.config.gnu.exe.release.1270689208.232480047">
@ -301,7 +295,7 @@
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/cocos2dx-base"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx-base/Release"/>
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx-base/AndroidRelease"/>
<entry flags="RESOLVED" kind="libraryFile" name="cocos2dx-base"/>
<entry flags="RESOLVED" kind="libraryFile" name="cocos2d"/>
</externalSetting>
</externalSettings>
<extensions>
@ -314,7 +308,7 @@
</extensions>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<configuration artifactExtension="so" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1270689208.232480047" name="AndroidRelease" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="move all libs into the specific folder" postbuildStep="sh ../../../post.sh ${ProjName} cocos2d ${ConfigName}" preannouncebuildStep="" prebuildStep="">
<configuration artifactExtension="so" artifactName="cocos2d" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.sharedLib" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.sharedLib" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.GmakeErrorParser;org.eclipse.cdt.core.CWDLocator;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GASErrorParser;org.eclipse.cdt.core.GLDErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1270689208.232480047" name="AndroidRelease" parent="cdt.managedbuild.config.gnu.exe.release" postannouncebuildStep="" postbuildStep="" preannouncebuildStep="" prebuildStep="">
<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1270689208.232480047." name="/" resourcePath="">
<toolChain errorParsers="" id="cdt.managedbuild.toolchain.gnu.exe.release.1122072085" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
<targetPlatform binaryParser="org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.release.890244578" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
@ -335,10 +329,11 @@
<listOptionValue builtIn="false" value="ANDROID"/>
<listOptionValue builtIn="false" value="USE_FILE32API"/>
</option>
<option id="gnu.cpp.compiler.option.warnings.allwarn.702186181" name="All warnings (-Wall)" superClass="gnu.cpp.compiler.option.warnings.allwarn" value="true" valueType="boolean"/>
<inputType id="cdt.managedbuild.tool.gnu.cpp.compiler.input.1036435822" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.input"/>
</tool>
<tool command="arm-linux-androideabi-gcc" commandLinePattern="${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS}" errorParsers="org.eclipse.cdt.core.GCCErrorParser" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.518312421" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release">
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1174848276" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" valueType="enumerated"/>
<option defaultValue="gnu.c.optimization.level.most" id="gnu.c.compiler.exe.release.option.optimization.level.1174848276" name="Optimization Level" superClass="gnu.c.compiler.exe.release.option.optimization.level" value="gnu.c.optimization.level.most" valueType="enumerated"/>
<option id="gnu.c.compiler.exe.release.option.debugging.level.1788869001" name="Debug Level" superClass="gnu.c.compiler.exe.release.option.debugging.level" value="gnu.c.debugging.level.none" valueType="enumerated"/>
<option id="gnu.c.compiler.option.include.paths.917488555" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" valueType="includePath">
<listOptionValue builtIn="false" value="../../"/>
@ -389,7 +384,6 @@
</configuration>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
<storageModule moduleId="scannerConfiguration"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
</cconfiguration>
</storageModule>

2
cocos2dx/proj.linux/.project Normal file → Executable file
View File

@ -31,7 +31,7 @@
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.buildLocation</key>
<value></value>
<value>${workspace_loc:/cocos2dx-base/Debug}</value>
</dictionary>
<dictionary>
<key>org.eclipse.cdt.make.core.cleanBuildTarget</key>

0
template/android/mycopy_files.sh Normal file → Executable file
View File

147
template/linux/mycopy_files.sh Executable file
View File

@ -0,0 +1,147 @@
# check the args
# $1: root of cocos2dx $2: app name $3: ndk root $4:pakcage path
APP_NAME=$2
COCOS2DX_ROOT=$1
COCOS2DX_ROOT_TEMP=$1
APP_DIR=`pwd`/$5
HELLOWORLD_ROOT=$COCOS2DX_ROOT/HelloWorld
NDK_ROOT=$3
PACKAGE_PATH=$4
projName=$5
echo $APP_DIR $5
# xxx.yyy.zzz -> xxx/yyy/zzz
convert_package_path_to_dir(){
PACKAGE_PATH_DIR=`echo $1 | sed -e "s/\./\//g"`
}
# make director andorid and copy all files and directories into it
move_files_into_android(){
mkdir $APP_DIR/android
for file in $APP_DIR/*
do
if [ -d $file ]; then
if [ $file != $APP_DIR/android ]; then
mv -f $file $APP_DIR/android
fi
fi
if [ -f $file ]; then
mv $file $APP_DIR/android
fi
done
rm -r $APP_DIR/android/asset
}
#copy linux's
move_files_into_linux(){
mkdir $APP_DIR/Linux
for file in `ls $HELLOWORLD_ROOT/Linux/* | grep -E '.*\.[cpp|h]' `
do
if [ -f $file ];then
cp $file $APP_DIR/Linux
fi
done
cp $HELLOWORLD_ROOT/Linux/postCompiled.sh $APP_DIR/Linux
}
#copy eclipse configures
move_eclipse_configures_into(){
for file in `ls -a $HELLOWORLD_ROOT/Linux/ | grep -E '\..*project' `
do
cp $HELLOWORLD_ROOT/Linux/$file $APP_DIR/Linux/
done
mv $APP_DIR/Linux/.project $APP_DIR/Linux/.project1
sed "s/HelloWorld/$projName/" $APP_DIR/Linux/.project1 > $APP_DIR/Linux/.project
rm $APP_DIR/Linux/.project1
mv $APP_DIR/Linux/.cproject $APP_DIR/Linux/.cproject1
COCOS2DX_ROOT_TEMP=`echo ${COCOS2DX_ROOT//\//\\\/}`
echo $COCOS2DX_ROOT_TEMP
sed "s/stringMacro name=\"cocos2dx_loc\" type=\"VALUE_TEXT\" value=\"..\/..\/..\/\"/stringMacro name=\"cocos2dx_loc\" type=\"VALUE_TEXT\" value=\"$COCOS2DX_ROOT_TEMP\"/" $APP_DIR/Linux/.cproject1 > $APP_DIR/Linux/.cproject
rm $APP_DIR/Linux/.cproject1
}
#copy main sources
copy_cpp_h_from_helloworld(){
mkdir $APP_DIR/Classes
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.*\.[cpp|h]' `
do
if [ -f $file ];then
cp $file $APP_DIR/Classes
fi
done
}
# copy resources
copy_resouces(){
mkdir $APP_DIR/Resource
for file in $HELLOWORLD_ROOT/Resource/*
do
cp $file $APP_DIR/Resource
done
}
# from HelloWorld copy src and jni to APP_DIR
copy_src_and_jni(){
cp -rf $HELLOWORLD_ROOT/android/jni $APP_DIR/android
cp -rf $HELLOWORLD_ROOT/android/src $APP_DIR/android
# repalce Android.mk and Application.mk
cat $COCOS2DX_ROOT/template/android/AndroidTemplate1.mk > $APP_DIR/android/jni/helloworld/Android.mk
cat $COCOS2DX_ROOT/template/android/Application.mk > $APP_DIR/android/jni/Application.mk
}
# copy build_native.sh and replace something
copy_build_native(){
# here should use # instead of /, why??
sed "s#__cocos2dxroot__#$COCOS2DX_ROOT#;s#__ndkroot__#$NDK_ROOT#;s#__projectname__#$APP_NAME#" $COCOS2DX_ROOT/template/android/build_native.sh > $APP_DIR/android/build_native.sh
chmod u+x $APP_DIR/android/build_native.sh
}
# replace AndroidManifext.xml and change the activity name
# use sed to replace the specified line
modify_androidmanifest(){
sed "s/ApplicationDemo/$APP_NAME/;s/org\.cocos2dx\.application/$PACKAGE_PATH/" $HELLOWORLD_ROOT/android/AndroidManifest.xml > $APP_DIR/android/AndroidManifest.xml
}
# modify ApplicationDemo.java
modify_applicationdemo(){
convert_package_path_to_dir $PACKAGE_PATH
# rename APP_DIR/android/src/org/cocos2dx/application/ApplicationDemo.java to
# APP_DIR/android/src/org/cocos2dx/application/$APP_NAME.java, change helloworld to game
sed "s/ApplicationDemo/$APP_NAME/;s/helloworld/game/;s/org\.cocos2dx\.application/$PACKAGE_PATH/" $APP_DIR/android/src/org/cocos2dx/application/ApplicationDemo.java > $APP_DIR/android/src/$PACKAGE_PATH_DIR/tempfile.java
rm -fr $APP_DIR/android/src/org/cocos2dx/application
mv $APP_DIR/android/src/$PACKAGE_PATH_DIR/tempfile.java $APP_DIR/android/src/$PACKAGE_PATH_DIR/$APP_NAME.java
}
modify_layout(){
cp $HELLOWORLD_ROOT/android/res/layout/helloworld_demo.xml $APP_DIR/android/res/layout
sed "s/helloworld_gl_surfaceview/game_gl_surfaceview/" $APP_DIR/android/res/layout/helloworld_demo.xml > $APP_DIR/android/res/layout/game_demo.xml
rm -f $APP_DIR/android/res/layout/main.xml
rm -f $APP_DIR/android/res/layout/helloworld_demo.xml
}
move_files_into_android
move_files_into_linux
move_eclipse_configures_into
copy_cpp_h_from_helloworld
copy_resouces
copy_src_and_jni
copy_build_native
modify_androidmanifest
modify_applicationdemo
modify_layout