1. 更新系統
$ sudo apt-get update $ sudo apt-get install git-core curl build-essential openssl libssl-dev
2. 安裝Node.js
首先我們先從github上將Node.js庫克隆到本地:
$ git clone https://github.com/nodejs/node.git $ cd node
3. 編譯和安裝Node:
$ ./configure $ make $ sudo make install
安裝完畢,可以在命令行里面輸入以下命令以便確認Node是否安裝完畢:
$ node -v v0.10.33
這個命令會輸出你安裝Node版本信息,如果你電腦上面輸出和下面的類似,那恭喜你了,安裝Node成功。
4. 安裝npm
這個很簡單,NPM官方提供了安裝NPM的腳本,所以我們把這個腳本下載下來執行一下就可以:
$ wget https://npmjs.org/install.sh --no-check-certificate $ chmod 777 install.sh $ ./install.sh $ npm -v 2.7.6
如果輸入npm -v
,返回的是一個類似上面的版本信息,那么NPM也就安裝成功了!
5. 安裝wechat
# Clone this repository git clone https://github.com/geeeeeeeeek/electronic-wechat.git # Go into the repository cd electronic-wechat # Install dependencies and run the app npm install && npm start
如果要打包成一個應用程序,按照自己的平台執行以下之一:
npm run build:osx npm run build:linux npm run build:win32 npm run build:win64