ผลต่างระหว่างรุ่นของ "01219245/cocos2d chrome setup"
Jittat (คุย | มีส่วนร่วม) (หน้าที่ถูกสร้างด้วย 'If you want to use Chrome to view local Cocos2d-html5 applications, follow these steps. : ''Many of these instructions are from Manat...') |
Jittat (คุย | มีส่วนร่วม) |
||
แถว 14: | แถว 14: | ||
The current directory will be available at <tt><nowiki>http://localhost:8000/</nowiki></tt>, so if you want to view the game try something like: <tt><nowiki>http://localhost:8000/mygames/tutorial1/</nowiki></tt> | The current directory will be available at <tt><nowiki>http://localhost:8000/</nowiki></tt>, so if you want to view the game try something like: <tt><nowiki>http://localhost:8000/mygames/tutorial1/</nowiki></tt> | ||
+ | |||
+ | == Option 2: Use Mongoose as a web server == | ||
+ | |||
+ | This option is fairly easy for Windows users. [http://code.google.com/p/mongoose/ Mongoose] is a light-weight web server. You can download the windows version from [http://cesanta.com/downloads.html this download page]. You'll have to provide your name and email. Pick the free version. | ||
+ | |||
+ | You can download it and save it in any directory. To run the web server, open the command line <tt>cmd.exe</tt>, change directory to where Cocos2d-html is, then call | ||
+ | |||
+ | PATHTOMONGOOSE\mongoose-free-5.2.exe | ||
+ | |||
+ | where <tt>PATHTOMONGOOSE</tt> is the path to where you have installed Mongoose. | ||
+ | |||
+ | The directory of Cocos2d-html will be available as <tt><nowiki>http://localhost:8080/</nowiki></tt> | ||
+ | |||
+ | You can also configure Mongoose by clicking at its icon in the taskbar. |
รุ่นแก้ไขเมื่อ 06:13, 5 กุมภาพันธ์ 2557
If you want to use Chrome to view local Cocos2d-html5 applications, follow these steps.
- Many of these instructions are from Manatsawin. Thanks again.
Option 1: User Python build-in server for Linux, Mac and (Windows user with Python)
Most Linux and Mac comes with Python so this might be the easiest way. If you use Windows and have Python installed, this might be a good way for you too.
For Linux & Mac: You just open a terminal, change directory to the Cocos2d-html5 directory, and call
python -m SimpleHTTPServer
For Windows with Python installation, change python to python.ext.
The current directory will be available at http://localhost:8000/, so if you want to view the game try something like: http://localhost:8000/mygames/tutorial1/
Option 2: Use Mongoose as a web server
This option is fairly easy for Windows users. Mongoose is a light-weight web server. You can download the windows version from this download page. You'll have to provide your name and email. Pick the free version.
You can download it and save it in any directory. To run the web server, open the command line cmd.exe, change directory to where Cocos2d-html is, then call
PATHTOMONGOOSE\mongoose-free-5.2.exe
where PATHTOMONGOOSE is the path to where you have installed Mongoose.
The directory of Cocos2d-html will be available as http://localhost:8080/
You can also configure Mongoose by clicking at its icon in the taskbar.