Git Product home page Git Product logo

natweiss / rapidgame Goto Github PK

View Code? Open in Web Editor NEW
138.0 138.0 22.0 33.79 MB

A commandline tool for Windows, Mac and Linux that prebuilds cocos2d-x static libraries. Also a cross-platform game templating system.

Home Page: https://github.com/NatWeiss/RapidGame

License: MIT License

JavaScript 50.09% HTML 0.95% Shell 0.40% Makefile 7.52% C++ 12.00% Python 11.30% Java 0.29% Objective-C 1.81% Objective-C++ 7.30% C 0.75% Lua 3.08% CSS 4.04% PHP 0.47%

rapidgame's People

Contributors

fdb avatar nateetorn avatar natweiss avatar samoersnaes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rapidgame's Issues

Android make errors (was Updated NDK version and now get error prebuilding for Android)

I did just update to the latest NDK version, and made sure to update the NDK_ROOT to reflect the new path.

But now when I do rapidgame prebuild android --verbose I get

make: *** No rule to make target /Applications/android/android-ndk-r10d/sources/android/cpufeatures/cpu-features.c', needed byobj/local/armeabi/objs-debug/cpufeatur

It looks like it looks at the old path, for the old NDK. The current one is at /Applications/android/android-ndk-r10e. How do I fix this - reinstall RapidGame?

cocos2d-js ?

Might be something I overlooked but:

When I run rapidgame create cocos2dx "HeckYeah" org.myorg.heckyeah

it looks like it's downloading cocos2d-js-v3.6.zip ...
Does this mean I can only use JavaScript for developing?

My intention is to use C++, not JavaScript, so I was expecting it to download cocos2d-x for C++, not JS.

Rapidgame prebuild error: lib.exe

I'm having an error with the 'rapidgame prebuild' command. Here's the FULL LOG, my language is Portuguese-Brazil, but the error is:

'lib.exe' is not recognized as an internal or external command, an operable program or batch file.

I tried editing the lines in the rapidgame.js where this command is created, adding and removing the '"', but none of the combinations worked. And found nothing in the internet saying how to add lib.exe to the the Windows PATH variable.

problem linking android version of a game

I am trying to build an android version of my app on OSX. I have installed the android sdk and android ndk (9) from homebrew ( and updated ANDROID_SDK_ROOT and NDK_ROOT to point to these new SDK locations) and upgraded to 0.9.9 for rapidgame and did a prebuild. That built successfully. Also, did a remove lib and rapidgame init . in the main directory. My app compiles cleanly for iOS and OSX, and am on to android. Granted this is my first time compiling an android app, and searched the internet for most of the issues that I have come across so far. I saw the note in the issues log about including cocos_zlib_static so that problem is gone. I am down to the last one. The process is at the linking stage and it can't resolve getPositionPercent(). I went down the path of including cocos_ui_static which then wanted 10 more static libs before asking for cocos_ui_static again. So, I stopped there. My Android.mk linking flags and static lib definitions looks like:
LOCAL_LDFLAGS := -Wl,—allow-multiple-definition
LOCAL_WHOLE_STATIC_LIBRARIES := libcocos2dx-prebuilt
LOCAL_WHOLE_STATIC_LIBRARIES += cocospngstatic cocosjpegstatic cocostiffstatic cocoswebpstatic
cocoscurlstatic cocosfreetype2static spidermonkeystatic websocketsstatic cocoschipmunkstatic
cocoszlibstatic
and the linking output:

ARCH=armeabi
APP_CPPFLAGS=-frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -DCOCOS2D_JAVASCRIPT -DCOCOS2D_DEBUG=1
make[1]: Entering directory `/Users/...projectinfohere.../Projects/android'
[armeabi] Compile++ thumb: cocos2djs_shared <= main.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= AppDelegate.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= Game.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= GameScene.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= MenuScene.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= AdminLayer.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= BallsLayer.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= BorderLevelLayer.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= Level.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= OverlayLayer.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= RotatorItem.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= HighScoreLayer.cpp
[armeabi] Compile++ thumb: cocos2djs_shared <= RotatorLayer.cpp
[armeabi] SharedLibrary : libcocos2djs.so
jni/../../../lib/cocos2d/x/lib/Debug-Android/armeabi/libcocos2dx-prebuilt.a(CCNodeReader.o):CCNodeReader.cpp:function cocostudio::timeline::NodeReader::loadNode(rapidjson::GenericValuerapidjson::UTF8<char, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator > const&): error: undefined reference to 'cocos2d::ui::Widget::getPositionPercent() const'
jni/../../../lib/cocos2d/x/lib/Debug-Android/armeabi/libcocos2dx-prebuilt.a(CCNodeReader.o):CCNodeReader.cpp:function cocostudio::timeline::NodeReader::loadNode(rapidjson::GenericValuerapidjson::UTF8<char, rapidjson::MemoryPoolAllocatorrapidjson::CrtAllocator > const&): error: undefined reference to 'cocos2d::ui::Widget::getPositionPercent() const'
collect2: error: ld returned 1 exit status
Any thoughts?

ios didn`t prebuild

I have an error in xcode:
warning: directory not found for option '-L/Users/artem/Desktop/test/Projects/../lib/cocos2d/x/lib/Debug-iOS/iphonesimulator'

When I do 'rapidgame prebuild --verbose' I have got an error:

error: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't open file: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib/libsqlite3.dylib (No such file or directory)

=== BUILD TARGET libjscocos2d Mac OF PROJECT cocos2d_js_bindings WITH CONFIGURATION Debug ===

Check dependencies

** BUILD FAILED **

The following build commands failed:
Libtool /Users/artem/Library/Developer/Xcode/DerivedData/cocos2dx-prebuilt-advwimtjrpvobacnuatawumfzguv/Build/Products/Debug/libcocos2d\ Mac.a normal x86_64
(1 failure)

Can anybody help please. RapiGame -v 0.9.12

Prevent Rapidgame from downloading cocos2dx

Hello ,

i just wanted to make a project using rapidgame but i dont want it download the latest cocos2dx
because i already did ,
my question is how can i set cocos2dx path inside rapidgame ,

i have latest cocos2dx.

Missing Project/linux folder

I've created a cocos2d-x project and got a welcome message like below

  Congratulations on creating a cocos2d-x game!
  Run it by opening the Xcode project in Projects
  Or, on Windows, open the .sln file in Projects/windows
  Or, for Android, see the README in Projects/android
  Ready to code? Start with the Projects/GameScene.cpp file.

But there is no "Projects/linux" folder, so i can't compile my program for Linux.
Can you please add it to the "TwoScene" template ?

upgrading to 0.9.7 from 0.9.5 introduces build errors in AppDelegate.cpp

I have a project built using rapidgame 0.9.5 and upgraded to 0.9.7. I prebuilt and updated lib in my project and quit Xcode. Started Xcode (using 6.1.1) back up and tried to build and the resultant errors

iOS Group
.../Projects/AppDelegate.cpp
.../Projects/AppDelegate.cpp:35:2: Reference to 'Size' is ambiguous
.../Projects/AppDelegate.cpp:37:3: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:39:3: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:42:25: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:45:22: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:46:15: No member named 'origin' in 'Rect'
.../Projects/AppDelegate.cpp:46:27: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:46:57: No member named 'size' in 'Rect'
.../Projects/AppDelegate.cpp:48:3: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:49:15: No member named 'origin' in 'Rect'
.../Projects/AppDelegate.cpp:49:27: Use of undeclared identifier 'designRes'
.../Projects/AppDelegate.cpp:49:58: No member named 'size' in 'Rect'
.../Projects/AppDelegate.cpp:56:53: Use of undeclared identifier 'designRes'

Error running "rapidgame prebuild"

Hi, I'm trying to prebuild RapidGame Libraries, but I'm getting the following error:

Happily prebuilding
Writing build log to: /Users/miguelc/Library/Developer/RapidGame/build.log
Copying /usr/local/lib/node_modules/rapidgame/src to /Users/miguelc/Library/Developer/RapidGame/src

/usr/local/lib/node_modules/rapidgame/node_modules/download/index.js:70
if (opts.extract && decompress.canExtract(opts.url, mime)) {
^
TypeError: Object function Decompress() {
this.ware = new Ware();
} has no method 'canExtract'
at Request. (/usr/local/lib/node_modules/rapidgame/node_modules/download/index.js:70:44)
at Request.EventEmitter.emit (events.js:95:17)
at Request.onResponse (/usr/local/lib/node_modules/rapidgame/node_modules/download/node_modules/request/request.js:924:10)
at ClientRequest.g (events.js:175:14)
at ClientRequest.EventEmitter.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient as onIncoming
at HTTPParser.parserOnHeadersComplete as onHeadersComplete
at Socket.socketOnData as ondata
at TCP.onread (net.js:525:27)

can you help me with that? I'm using OSX 10.9.

Thank you.

Error prebuilding on windows with Cocos 2d-x 4.0, project file does not exist.

I'm trying to prebuild the libraries on windows with Cocos 2d-x 4.0, and when I run the command rapidgame prebuild windows --verbose -s ., I get an error saying that the project file cocos2d-win32.sln does not exist.

Happily prebuilding: windows
Writing build log to: C:\Users\NAME\.rapidgame\build-win32.log
MSBUILD: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe
LIB: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\lib.exe
VCTARGETS: C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\
Not building headers
Remaining builds:
  Config: Debug
  Dir: C:\Users\NAME
  Command: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe E:\Programs\cocos2d-x-4.0\build\cocos2d-win32.sln /nologo /maxcpucount:4 /t:libcocos2d /p:configuration=Debug;platform=Win32

  Config: Release
  Dir: C:\Users\NAME
  Command: C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe E:\Programs\cocos2d-x-4.0\build\cocos2d-win32.sln /nologo /maxcpucount:4 /t:libcocos2d /p:configuration=Release;platform=Win32

Building: Windows Debug C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe C:\Users\NAME
Current dir: C:\Users\NAME

C:\Program Files (x86)\MSBuild\14.0\bin\amd64\MSBuild.exe E:\Programs\cocos2d-x-4.0\build\cocos2d-win32.sln /nologo /maxcpucount:4 /t:libcocos2d /p:configuration=Debug;platform=Win32

MSBUILD : error MSB1009: Project file does not exist.
Switch: E:\Programs\cocos2d-x-4.0\build\cocos2d-win32.sln

The solution file that does exist is called Cocos2d-x.sln. Has Cocos changed it's file naming scheme or something? Can you please look into it?

Xcode project file can't be parsed.

I tried this today on Mac OS X with Xcode 6. I installed globally via npm, and then use the following command:

rapidgame create cocos2dx "Heck Yeah" org.myorg.heckyeah

After pre-building the binaries, found the Xcode project and double-clicked. The error Xcode gives me is:

Project /Volumes/XyDev/code/Heck Yeah/Projects/Heck Yeah.xcodeproj cannot be opened because the project file cannot be parsed.

Any ideas?

Initial project warning

I built the project and got following warning -


warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in _jinit_arith_decoder from /Users/Macbook/Library/Developer/RapidGame/0.9.9/cocos2d/x/lib/Debug-iOS/iphoneos/libcocos2dx-prebuilt.a(jdarith.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

how can I make this go away?

found this post but i don't know how this translates for rapidgame :/

unable to find lib.exe path in windows

I am also set the path in directory of roaming/npm/node_modules/rapidgame/libexepath.txt as

C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin

but it gives the following error.

builderror

Differences from games created with plain cocos2d-x

I'm still not very familiar with cocos2d-x itself, but it seems that the game template created by RapidGame differs from the template created by cocos2d-x, specifically the one I created with v3.5.
The project I work on now, is a template I created recently with RapidGame and it uses cocos2d-x v3.6 so the difference might stem from that version change, however:

The iOS AppController.mm is different in the app state change hooks like the one below. In cocos2d-x v3.5 it actually does nothing "anymore":

- (void)applicationWillResignActive:(UIApplication *)application {
    /*
     Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
     Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
     */
     //We don't need to call this method any more. It will interupt user defined game pause&resume logic
    /* cocos2d::Director::getInstance()->pause(); */
}

With rapidgame-cocos2d v3.6 it looks like it does that code "again":

-(void) applicationWillResignActive:(UIApplication*)application
{
    Director::getInstance()->pause();
}

Which is the correct one really?

On another note, I noticed that "the way" to create scenes with RapidGame-cocos2d3.6 is to just subclass cocos2d::Scene and then do replaceScene etc with that. With Cocos2dx3.5 I always subclassed Layer or similar, then had a createScene which made a Scene and then added the layer as a child etc. I think the RapidGame way is more sleak of course and I'm just changing my scenes around at the moment to work with that - because if I did not do that I encountered a serious error when transitioning between scenes - cocos2dx complained about nodes that were still active at the time they were deallocated, or something like that. That problem only went away when I changed the way scenes are subclassed as described above. Any light?

Configure cocos2d-x version number

Trying to migrate existing project on 3.7.1 to use prebuilts with this. Are there plans for setting a version manually, like with a flag? I see that it's hardcoded into urls and the makefile

Windows prerequisutes

You should add to the windows prerequisites that the build tools need to be installed as well. I know zero about Windows development so there might be a better way. What I did was.

Install VS Community 2015
rapidgame
create a new game

Error message saying something like "Write the path to the lib.exe into file..."

Couldn't find lib.exe. So I opened the solution rapidgame created and VS started downloading lots of stuff for WinXP targets, other things and the build tools. After that lib.exe was present in the bin folder of VS.

Now it is prebuilding, but prebuild fails. Need to invesitgate further. Will submit new issues for what I find

Android Crash on Startup

Hello,

I tried RapidGame for the first time today and I really love the idea behind it.

It's running fine for me on iOS and everything is cool, but on android I get an instant crash when starting the app.

I'm using the ndk-r9d and Java 8. Testing is done on a Nexus 7 Tablet, with Android 4.4.1.

This is what the Terminal says:
F/libc ( 5477): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=1)

While compiling with make, the following is printed to console:


APP_CPPFLAGS=-frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -DCOCOS2D_JAVASCRIPT -DCOCOS2D_DEBUG=1

Android NDK: WARNING:jni/Android.mk:cocos2dxgame_shared: non-system libraries in linker flags: jni/../../../lib/cocos2d/x/lib/Debug-Android/armeabi/libz.a -lpng -ljpeg -ltiff -lwebp -lcurl -lssl -lcrypto -lfreetype -ljs_static -lwebsockets -lchipmunk

Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module


Especially this sounds scary: This is likely to result in incorrect builds.

Do you have an idea what's causing the instant crash on android?

Prebuild cocos2dx fails

Once finished with mac and iOS it fails, dos it have to do anything with me not having android NDK? thx

Building iOS Release iphonesimulator cocos2dx-prebuilt...
Succeeded.
Building Android Debug armeabi...
Build failed. Please run with --verbose or check the build log: /Users/Macbook/Library/Developer/RapidGame/build.log

here's the verbose output -

Building Android Debug armeabi...
/Users/Macbook/Library/Developer/RapidGame/src/proj.android/build.sh armeabi Debug
Current dir: /Users/Macbook/Library/Developer/RapidGame/src/proj.android
util.print: Use console.log instead
PLATFORM=android-18
ARCH=armeabi
util.print: Use console.log instead
CONFIG=Debug
util.print: Use console.log instead
CORES=4
util.print: Use console.log instead
Please set the NDK_ROOT environment variable.

jsb_cocos2dx_pluginx_auto.hpp not found in AppDelegate

I'm trying to run a simple cocos2djs project but when I try to test on the simulator the build fails with this error:

screen shot 2016-03-20 at 22 38 16

I'm using the latest iOS SDK version (9.2) running in the MacOS 10.11.

I've already prebuilt the libraries, see below the result of rapidgame show command.

Rapidgame lives here: /Users/gzomer/.rapidgame
Latest static libs and headers: /Users/gzomer/.rapidgame/3.9
Static libs and headers have been built: YES

Have I missed any step?

prebuild linux error (solved)

I have this error when building to linux:

error: ‘isnan’ was not declared in this scope

Related to:
cocos2d/cocos2d-x#15111

It's already fixed on the most recent github version, so I cloned and specified a custom cocos2d-x source root pointing to the clone:

rapidgame prebuild --src path/to/github-cloned-cocos2d-x

Now the prebuild works.

Building on Mac fails for iOS

After building Mac platform successfully, rapidgame prebuild fails on iOS platform. running in verbose mode it outputs:

** BUILD FAILED **

The following build commands failed:
CompileC Debug-iphoneos/Build/Intermediates.noindex/cocos2d_libs.build/Debug-iphoneos/libcocos2d\ iOS.build/Objects-normal/armv7/CCFileUtils.o /Users/sabakhutsishvili/Applications/cocos2d-x-3.15.1/cocos/platform/CCFileUtils.cpp normal armv7 c++ com.apple.compilers.llvm.clang.1_0.compiler

Any ideas ?

Error prebuilding on windows

Hi i have this issue when i try to use: rapidgame prebuild

It says 4 errors. Checking the build.log it says
c:\users\maksim\appdata\roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\base\ccconsole.h(42): fatal error C1083: Cannot open include file: 'thread': No such file or directory [C:\Users\maksim\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\editor-support\spine\proj.win32\libSpine.vcxproj]

PRE-BUILDING ON WINDOWS

Command prompt -

Happily prebuilding windows
Writing build log to: C:\Users\Jesson\AppData\Roaming\npm\node_modules\rapidgame\build.log
key (inside func)=2.0
checking version = 2 against highest 0
key (inside func)=14.0
checking version = 14 against highest 2
key (inside func)=12.0
checking version = 12 against highest 14
key (inside func)=3.5
checking version = 3.5 against highest 14
key (inside func)=4.0
checking version = 4 against highest 14
Final MSBuildToolsPath: C:\Program Files (x86)\MSBuild\14.0\bin
Building Windows Debug cocos2d-win32.vc2012.sln...
Succeeded.
Building Windows Debug libJSBinding.vcxproj...
Build failed. Please run with --verbose or check the build log: C:\Users\Jesson\AppData\Roaming\npm\node_modules\rapidgame\build.log

Error from the build log -

C:\Users\Jesson\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\base/CCConsole.h(42): fatal error C1083: Cannot open include file: 'thread': No such file or directory [C:\Users\Jesson\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\2d\libcocos2d.vcxproj]

I can't pre build rapidgame after installing, any ideas?

Header directory references missing on VS and XCode projects

The projects miss references to the following header dirs in order to compile:

..\lib\cocos2d\x\include\cocos\scripting\js-bindings\auto
..\lib\cocos2d\x\include\cocos\scripting\js-bindings\manual

Also for XCode iOs targets there are missing all the header files for the Cocos2Dx plugin-system somwhere in the lib folder.

iOS Framework Linking

There is a potential issue reported by someone over email. After creating a RapidGame project, the following frameworks are possibly missing and need to be deleted then re-added to the iOS project.

MediaPlayer
GameController
Security
OpenGLES
UIKit
CoreMotion

To do: take a look at the raw project.pbxproj to see if these are pointing to the correct frameworks.

Invalid error message when missing lib.exe

On Windows, I have a custom install location for MSVC. This causes rapidgame to emit an error. However, the error message provides a wrong example.

This is the error message I get:

Unable to locate lib.exe. Please set the contents of the following file to the absolute path to lib.exe:

        C:\Users\fdb\.rapidgame\libexepath.txt

Example: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\

However, the example path should also include lib.exe, not just the directory.

So, the example should be:

Example: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\lib.exe

Relevant source line

Display Mode Error

Students are getting this error when they click on "Compile and Run" in Rapid Game Pro.

error

Cannot open input file "libbox2d.lib"

Please help me interpret this error.

     Debug.win32\SpritePolygon.obj
     Debug.win32\SpritePolygonCache.obj
     "C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\external\Box2D\proj.win32\Debug.win32\libbox2d.lib"
     "C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\editor-support\spine\proj.win32\Debug.win32\libSpine.lib"
 2>LINK : fatal error LNK1181: cannot open input file 'libbox2d.lib' [C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\2d\libcocos2d.vcxproj]
 2>Done Building Project "C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\2d\libcocos2d.vcxproj" (default targets) -- FAILED.
 1>Done Building Project "C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\bindings\proj.win32\libJSBinding.vcxproj" (default targets) -- FAILED.

Build FAILED.

   "C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\bindings\proj.win32\libJSBinding.vcxproj" (default target) (1) ->
   "C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\2d\libcocos2d.vcxproj" (default target) (2) ->
   (Link target) -> 
     LINK : fatal error LNK1181: cannot open input file 'libbox2d.lib' [C:\Users\Jamie and Susannah_2\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\cocos\2d\libcocos2d.vcxproj]

Android build error libz

After running make on android project, I get

Davids-MacBook-Pro:android david$ make
ANDROID_SDK_ROOT=/Users/david/Library/Android/sdk
PLUGIN_DIR=/Users/david/Desktop/Solitaire/lib/cocos2d/x/java
export CONFIG="debug" && ./build_native.py
The Selected NDK toolchain version was 4.8 !
Android NDK: WARNING: APP_PLATFORM android-18 is larger than android:minSdkVersion 10 in ./AndroidManifest.xml
APP_PLATFORM=android-18
APP_OPTIM=debug
CONFIG=Debug
ARCH=armeabi
APP_CPPFLAGS=-frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -DCOCOS2D_JAVASCRIPT -DCOCOS2D_DEBUG=1
make[1]: Entering directory /Users/david/Desktop/Solitaire/Projects/android' [armeabi] SharedLibrary : libcocos2djs.so /Users/david/Desktop/Solitaire/Projects/android/../../lib/cocos2d/x/java/mk/cocos2d-x/external/png/prebuilt/android/armeabi/libpng.a(pngrutil.o):pngrutil.c:function png_inflate_claim: error: undefined reference to 'inflateReset2' /Users/david/Desktop/Solitaire/Projects/android/../../lib/cocos2d/x/java/mk/cocos2d-x/external/png/prebuilt/android/armeabi/libpng.a(pngrutil.o):pngrutil.c:function png_decompress_chunk.constprop.5: error: undefined reference to 'inflateReset2' collect2: error: ld returned 1 exit status make[1]: *** [obj/local/armeabi/libcocos2djs.so] Error 1 make[1]: Leaving directory/Users/david/Desktop/Solitaire/Projects/android'
Traceback (most recent call last):
File "./build_native.py", line 179, in
build(opts.ndk_build_param,opts.android_platform,opts.build_mode)
File "./build_native.py", line 166, in build
do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode)
File "./build_native.py", line 90, in do_build
raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!")
Exception: Build dynamic library for project [ /Users/david/Desktop/Solitaire/Projects/android ] fails!
make: *** [all] Error 1

Seems libz and libpng are not compatible.

How to run?

Sorry for the extreme beginner question, but as I am a beginner of cocos2d-x, and have just used "rapidgame create blabla.." to create a game, how do I subsequently run+launch the android target (or any of the other targets)?

Some quick advice on this in the readme would be very helpful to get going. Seeing as the cocos2dx docs leave a lot out...

Build mac target does not work. Cocos misses files

fter doing just

rapidgame create cocos2djs "Nme" id

and building (after adding header search paths, se issue #34). The build succeeds but when running I get the following error message:

cocos2d: fullPathForFilename: No file found at script/jsb_boot.jsc. Possible missing file.
jsb: ERROR: File /Users/stephan/Library/Developer/RapidGame/src/cocos2d-x/cocos/scripting/js-bindings/manual/localstorage/js_bindings_system_functions.cpp: Line: 65, Function: JSB_localStorageSetItem
Error processing arguments
JS: /Users/stephan/Library/Developer/Xcode/DerivedData/Test-grcaubmdrulrctcibswjgppgawkw/Build/Products/Debug/Test.app/Contents/Resources/Assets/lib/Game.js:336:Error: Error processing arguments

(evaluatedOK == JS_FALSE)

Maintaining source files

The docs (at https://htmlpreview.github.io/?https://github.com/NatWeiss/RapidGame/blob/master/templates/cocos2dx/TwoScene/Projects/android/README.html#useful-tools ) state:

You can create, delete, and edit source files under [APPNAME]/Projects and assets under [APPNAME]/Assets as you wish. Changes in these folders will be included in the Android build automatically.

However, when I delete GameScene.h/cpp, MenuScene.h/cpp, Game.h/cpp from Projects and add my own scenes (I have some from vanilla cocos2d-x), it still wants to use those classes (gamescene.cpp) from the template. I looked around and it seems like GameScene, MenuScene and Game are hardcoded into Android.mk, and it does not look like it adds files from Projects/ dynamically, or I missed something.

Also, the makeignore file seems to do nothing...

Device orientation

Have you looked into how code could be added to each of the device specific files that would generate a device orientation event (even a EventCustom event). This could then be listened by the shared c++ code in the projects directory. That way the shared code ciuld handle device orientation changes in a single place. And to be clear this is more then just the initial device orientation but any rotation of the device would trigger an event.

Missing README in cocos2d-x android template

I've created cocos2d-x project via rapidgame and got a welcome message like below

Congratulations on creating a cocos2d-x game!
Run it by opening the Xcode project in `Projects`
Or, on Windows, open the `.sln` file in `Projects/windows`
Or, for Android, see the README in `Projects/android`
Ready to code? Start with the `Projects/GameScene.cpp` file.

But there is no readme under android folder and It's been gone since 1.0.0 version.
Can you update readme for android?

`rapidgame prebuild [platform]` doesn't actually limit prebuilding to the platform

~ rapidgame prebuild android
Happily prebuilding android
Writing build log to: /Users/chadm/Library/Developer/RapidGame/build.log
Copying /usr/local/lib/node_modules/rapidgame/src to /Users/chadm/Library/Developer/RapidGame/src
Building iOS Debug iphoneos cocos2dx-prebuilt...
Succeeded.
Building iOS Debug iphonesimulator cocos2dx-prebuilt... <cont..>

Windows Prebuild Failure

Hey there.

So i just installed rapidgame and tried to setup the prebuild through visual studio 2013.

Everything goes fine with the build steps until a point when I get this error from the build log:

   "C:\Users\dilen_000\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-x\build\cocos2d-js-win32.sln" (libcocos2d;libjscocos2d target) (1) ->
   "C:\Users\dilen_000\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-x\cocos\2d\libcocos2d.vcxproj" (default target) (2) ->
     C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.Redirect.props(44,3): error MSB4019: The imported project "C:\Microsoft.Cpp.Platform.Redirect.10.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk. [C:\Users\dilen_000\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-x\cocos\2d\libcocos2d.vcxproj]

I'm running rapidgame from an administrator console and everything but it appears I'm just missing that file or the path is incorrect.

windows project create failed

C:\Users\Jacob\Desktop>npm install rapidgame -g
C:\Users\Jacob\AppData\Roaming\npm\rapidgame -> C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\bin\rapidgame
[email protected] C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
├── [email protected] ([email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

C:\Users\Jacob\Desktop>rapidgame create cocos2dx "HeckYeah" org.myorg.heckyeah
Rapidly creating a game
Engine: Cocos2dx
Template: TwoScene
Copying project files
C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\node_modules\wrench\lib\wrench.js:249
if (e.code !== 'EEXIST') throw e;
^

Error: ENOENT: no such file or directory, mkdir 'C:\Users\Jacob.rapidgame\3.9\HeckYeah'
at Error (native)
at Object.fs.mkdirSync (fs.js:794:18)
at Object.exports.copyDirSyncRecursive (C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\node_modules\wrench\lib\wrench.js:246:12)
at copyRecursive (C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\rapidgame.js:1447:9)
at Command.createProject (C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\rapidgame.js:332:14)
at Command. (C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\node_modules\commander\index.js:249:8)
at emitTwo (events.js:87:13)
at Command.emit (events.js:172:7)
at Command.parseArgs (C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\node_modules\commander\index.js:478:12)
at Command.parse (C:\Users\Jacob\AppData\Roaming\npm\node_modules\rapidgame\node_modules\commander\index.js:370:21)

C:\Users\Jacob\Desktop>

Android windows build process

I have followed the android setup tutorial but when trying to build android on windows using Cygwin i was getting lots of errors with the ${sdk.dir} route. I included it in a local.properties file as well but no luck. I have to replace all references to the route with the hard coded path to to get to the ant -check-env part but im now getting the following error which suggests my path isn't getting escaped correctly. Have some how missed a vital step? Does anyone have any suggestions of what i can try or any more information i can provide?

C:\Users\dev\AppData\Local\Android\sdk\tools\ant\build.xml:397: SDK Location 'C:UsersdevAppDataLocalAndroidsdk' is not valid.

Link error running the Windows project solution on VS12.0 (2013)

I successfully prebuilt the Windows Debug and Release versions with rapidgame, created a project using rapidgame and opened the solution on Visual Studio 12.0 (2013), but when I try to build it (Debug or Release), I get the following errors:

  • Error 1 error LNK2001: unresolved external symbol __imp____acrt_iob_func C:\Users\rmall\Desktop\teste\Projects\windows\libcocos2dx-prebuilt.lib(chipmunk.obj) teste
  • Error 2 error LNK2001: unresolved external symbol __imp____stdio_common_vfprintf C:\Users\rmall\Desktop\teste\Projects\windows\libcocos2dx-prebuilt.lib(chipmunk.obj) teste

I was just so close, and then this happens to me (cries a lot T-T), can anyone help me with this?

pre-building on windows targeting wrong MSBuild version

I ran into an issue with the pre-build not targeting my most recent version of .net's MSBuild.

it was picking the lowest version available always. here is the verbose log, (with a couple extra console outputs)

Recursively copying src\cocos2d-js\frameworks\js-bindings\**\*.mk to 0.9.4\cocos2d\x\java\mk
Recursively copying src\cocos2d-js\frameworks\js-bindings\**\*.a to 0.9.4\cocos2d\x\java\mk
key (inside func)=4.0
Potential MSBuildToolsPath: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\
checking version = 4 against highest 0
key (inside func)=4.0
Potential MSBuildToolsPath: C:\Windows\Microsoft.NET\Framework64\v3.5\
checking version = 4 against highest 4
key (inside func)=4.0
Potential MSBuildToolsPath: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
checking version = 4 against highest 4
Final MSBuildToolsPath: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\
Building Windows Debug cocos2d-win32.vc2012.sln...
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\MSBuild.exe C:\Users\xps420\AppData\Roaming\npm\node_modules\rapidgame\src\cocos2d-js\frameworks\js-bindings\cocos2d-x\build\cocos2d-win32.vc2012.sln /nologo /maxcpucount:4 /p:configuration=Debug
Current dir: C:\Users\xps420\AppData\Roaming\npm\node_modules\rapidgame
util.print: Use console.log instead
MSBUILD : error MSB1001: Unknown switch.
Switch: /maxcpucount:4

For switch syntax, type "MSBuild /help"

As you can see in my checking version = n against highest n the function was receiving the highest version number in each iteration. I fixed it by wrapping in an anonymous function and passing the 'key' variable in. I'd do a pull request, but don't have that all set up. here's the relevant function with the fix.. from line 826 in rapidgame.js...

// find path to MSBuildToolsPath
        for (i = 0; i < items.length; i += 1) {
            // try to get the value of MSBuildToolsPath
            key = path.basename(items[i].key);
            regKey = new Winreg({key: root + '\\' + key});  
            (function(key){
                regKey.get("MSBuildToolsPath", function(err, item) {
                    console.log("key (inside func)="+key);
                    count += 1;
                    if (err) {
                        console.log(err);
                    } else if (typeof item === "object" && typeof item.value === "string" && item.value.length) {
                        if (cmd.verbose) {
                            console.log("Potential MSBuildToolsPath: " + item.value);
                        }
                        console.log("checking version = "+ parseFloat(key) +" against highest " +highest);
                        if (parseFloat(key) > highest) {
                            buildPath = item.value;
                            highest = parseFloat(key);
                        }
                    }
                    if (count === items.length) {
                        if (buildPath.length) {
                            console.log("Final MSBuildToolsPath: " + buildPath);
                            callback(buildPath);
                        } else {
                            console.log("Unable to find MSBuild path");
                        }
                    }
                });
            })(key);
        }

npm version fails to prebuild in linux

In Debian 8 the npm version fails with a Node.js related crash during
rapidgame prebuild linux

The HEAD version doesn't crash.

The error message is: Spawn error TypeError: Incorrect value of args option

Prebuild for Cocos2d fails when working on a clean Windows install

Installed rapidgame and VS Commuity 2015.

Prebuild fails.

Error deleting symlink: Error: ENOENT, no such file or directory 'C:\Program Files\nodejs\node_modules\rapidgame\latest'

And
Building Windows Debug cocos2d-js-win32.sln...
Build failed. Please run with --verbose or check the build log: C:\Program Files\nodejs\node_modules\rapidgame\build.log

build.log says

C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(55,5): error MSB8020: The build tools for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, please install Visual Studio 2010 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Retarget solution". [C:\Program Files\nodejs\node_modules\rapidgame\src\cocos2d-x\external\Box2D\proj.win32\libbox2d.vcxproj]

So I opened the solution cocos2d-js-win32.sln in VS and built it from within the IDE. No problems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.