Windows 安裝 python2.7

Windows 安裝 python2.7

 

python2.7下載地址: https://www.python.org/downloads/release/python-2714/python

安裝過程:git

 

設置系統環境變量github

PYTHON_HOME = C:\Python27redis

PYTHONPATH = %PYTHON_HOME%\Lib;%PYTHON_HOME%\DLLs;%PYTHON_HOME%\Lib\lib-tkbootstrap

 

在PATHEXT變量中追加 .PY;.PYMapp

在PATH變量中追加 %PYTHON_HOME%;%PYTHON_HOME%\Scripts;%PYTHON_HOME%\Docpython2.7

 

解壓調試符號文件 python-2.7.14-pdb.zip 到指定目錄工具

 

 

pywin32-221.win32-py2.7.exelua

文件下載地址 https://sourceforge.net/projects/pywin32/files/pywin32/spa

 

 

VCForPython27.msi

文件下載地址 http://www.microsoft.com/en-us/download/details.aspx?id=44266

 

 

PTVS 2.1.1 VS 2012.msi

文件下載地址:https://github.com/Microsoft/PTVS/releases

 

VS2012 中自動識別到的配置

設置參考連接 https://docs.microsoft.com/en-us/visualstudio/python/python-environments#creating-an-environment-for-an-existing-interpreter

 

 

python2.7安裝 pip,setuptools

1.下載https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py #安裝 setuptools

2.下載 https://raw.github.com/pypa/pip/master/contrib/get-pip.py
python get-pip.py install ##安裝 pip

3. 安裝完畢以後會在系統目錄下生成Scripts目錄,裏面有 :
easy_install.exe 和 pip.exe 等可執行文件。

最好,把python和python2.7.5/Scripts添加到系統配置文件path屬性值裏。這樣就能夠直接執行了,安裝完pip和easy_installer工具後,之後再安裝python其餘庫就方便了

例:easy_install redis 或 pip install redis (推薦使用pip)

 

更新setuptools和pip

python -m pip install -U pip setuptools

 

使用Python2.7的安裝工具pip,安裝一些基礎包。

 

cocos2d-x-2.2.6.zip
http://cocostudio.download.appget.cn/Cocos2D-X/cocos2d-x-2.2.6.zip

 

$ cocos luacompile -s src_dir -d dst_dir -e True -k string_of_key -b encrypt_sign
default key: 2dxLua        default sign: XXTEA

https://github.com/cocos2d/cocos2d-x/blob/v2/samples/Lua/TestLua/Classes/AppDelegate.cpp#L41
pStack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA"));

 

https://github.com/cocos2d/cocos2d-x/pull/9531/files
cocos/scripting/lua-bindings/script/cocos2d/Cocos2dConstants.lua
-----------------------------------------------------------
@@ -327,8 +327,11 @@ cc.KeyCodeKey =
     "KEY_RETURN",
     "KEY_CAPS_LOCK",
     "KEY_SHIFT",
+    "KEY_RIGHT_SHIFT",
     "KEY_CTRL",
+    "KEY_RIGHT_CTRL",
     "KEY_ALT",
+    "KEY_RIGHT_ALT",
     "KEY_MENU",
     "KEY_HYPER",
     "KEY_INSERT",
 @@ -488,6 +491,9 @@ for k,v in ipairs(cc.KeyCodeKey) do
 end
 
 cc.KeyCode.KEY_BACK = cc.KeyCode.KEY_ESCAPE
+cc.KeyCode.KEY_LEFT_SHIFT = cc.KeyCode.KEY_SHIFT
+cc.KeyCode.KEY_LEFT_CTRL  = cc.KeyCode.KEY_CTRL
+cc.KeyCode.KEY_LEFT_ALT   = cc.KeyCode.KEY_ALT
-----------------------------------------------------------

 

 

設置 TestCpp 爲啓動項目

 

點擊F7開始生成解決方案:(在Release和Debug狀態,都生成一次。)

 

 

使用create_project.py建立項目:

 

> .\create_project.py -project MyGame01 -package com.lsgx.mygame01 -language cpp

相關文章
相關標籤/搜索