How to build win32 exe in cocos2d

Hi,

     I'm new to cocs2d-x. I compiled and that build is working fine. I got the output.But I don't know how to get the .exe build separately to run in other system. 

Initially creating new project in cocs2d-x of file size of 470MB. But After compiling proj.win32 in visual Studio 2013. Its file size is increased to above 2.5GB.

I want to send that .exe file. Can anyone help me to solve this issue???

Open a command prompt and navigate to your project directory.

Then run:

cocos deploy -p win32 -m release

When its done running you should have a ‘bin’ folder in the root of your project directory. Inside there is a release/win32 folder that contains your .exe, required .dll’s, and a copy of your resources from your Resources folder.

You must send all files in the bin/release/win32 folder for someone to be able to property run your game.

2 Likes

Can you help me out?
After running cocos deploy -p win32 -m release this cmd, i am getting below error

‘“C:\Program Files\Microsoft Visual Studio 12.0\Common7\IDE\devenv”’ is not reco
gnized as an internal or external command,
operable program or batch file.
Error running command, return code: 1

Using 3.2 and all var set in setup.py

did you find a solution for this?

In 3.4 working fine…

1 Like

The great answer! It solved the problem!

Anyone tell me what can I do for build .exe file for windows…
I had tried this source but it didnt works… so help me plz…

I have cocos2d-x 3.17 im getting this error

Building mode: release
Building…
Required VS version : [2013, 2015, 2017]
running: ‘“C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.com” “C:\Work\explottens\Explottens\proj.win32\Explottens.sln” /Build “Release” /Project “Explottens”’

‘C:\Program’ is not recognized as an internal or external command,
operable program or batch file.
Error running command, return code: 1.

Anyone got a solution?