2007年6月6日 星期三

[網頁開發] 使用eclipse來開發Drupal之環境建置 !

使用eclipse來開發Drupal之環境建置 !

1.至官方下載ecliplse SDK最新版
 網址 : http://www.eclipse.org/downloads/
2.安裝 eclipse
 (1) 解壓縮上面下載之eclipse, 解至 C:\eclipse
 (2) 將C:\eclipse\eclipse, 改名為C:\eclipse\eclipse-x.x.x -->x.x.x為
   eclipse版本
 (3) 將C:\eclipse\eclipse-x.x.x\eclipse.exe, 做一個捷徑到桌面或快速
   啟動列
3.安裝 PDT 前之必要需要安裝的套件
 GEF - Graphical Editing Framework
 EMF - Eclipse Modeling Framework
 JEM - Java EMF Modeling SDK
 WTP - Web Tools Platform
 採Remote Site(線上安裝)安裝方式如下 :
 (1) 啟動 Eclipse
 (2) Help --> Software Updates --> Find and Install -->
   Search for new features to install --> Next -->
   Callisto Discovery Site --> Finish -->
   選擇較近 (或較快) 的更新網站 --> OK
 (3) 勾選下面粗體項目
   Enabling Features
    Batik
   
Graphical Editor and Frameworks
    Visual Editor
    
Graphical Editing Framework
   
Models and Model Development
    Eclipse Modeling Frameworks (EMF) Runtime+End-User
          Tools
    
XML Schema Infoset Model (XSD) Runtime + End-User Tools
    
Graphical Modeling Framework
    
Java EMF Model
   
Web and J2EE Development
    Web Standard Tools (WST) Project
 (4) 選擇
I accept the terms in the license agreements
 (5) 按Next --> Finish --> Install All
 (6) 安裝完成後, Eclipse 會問要不要重新啟動,選 「 Yes 」
4.安裝 PDT (PHP Development Tools)
 (1) Help --> Software Updates --> Find and Install -->
   Search for new features to install --> Next
   New Remote Site --> 輸入
   Name : PDT
   URL : http://download.eclipse.org/tools/php/updates/
 (2)
接下來的步驟就和上面必要套件安裝步驟是一樣的,這裡略過
5.選項安裝 : Aptana (用於開發Ajax)
 (1) 跟上面Remote Site安裝一樣步驟
 (2) New Remote Site --> 輸入
   Name : Aptana
   URL : http://update.aptana.com/install/
6.選項安裝 : Subclipse (做 Subversion 管理)
 (1) 跟上面Remote Site安裝一樣步驟
 (2) New Remote Site --> 輸入
   Name : Subclipse
   URL : http://subclipse.tigris.org/update_1.2.x
7.至官方網站下載Drupal OR 使用CVS Checkout Drupal
 (1) 至官方網站下載 Drupal
  <1>官方網址 : http://drupal.org/
  <2> 解壓縮至桌面
  <3> eclipse : 建立PHP新專案-->File-->Import-->選擇桌面的Drupal..
 (2) 使用CVS Checkout Drupal
  <1> File-->Import-->CVS-->Projects from CVS-->Next
  <2> 填入下面資料, 按Next
    Host: cvs.drupal.org
    Repository Path: /cvs/drupal
    User: anonymous
    Password: anonymous
    Connection type: pserver
    Also make sure "Save Password" is checked.
  <3> 選擇 "Use an existing module-->drupla-->Finish
8.下載並安裝 Xampplite
 (1) 下載 Xampplite : xampplite-win32-1.6.2.zip

    網址 : http://sourceforge.net/projects/xampp/
 (2) 安裝
   解壓縮至 C:\
 (3) 將 C:\xampplite\xampp-control.exe 至桌面或快速啟動列
 (4) 修改 C:\xampplite\apache\conf\httpd.conf,
   指定DocumentRoot至您本地的Drupal路徑
9.啟動 Xampplite : "C:\xampplite\xampp-control.exe"
 將 apache & mysql start 即可
10.eclipse其他設定 (Windows --> Preferences)
 (1) Content types
   Content Types--> Text -->PHP Content Type
   增加 *.module,*.engine,*.theme,*.install
 (2) Tab formatting for PHP
   PHP-->Formatter
   選擇Indent using spaces, Indentation size : 2
 (3) Tab formatting for CSS
   Web and XML-->CSS Files-->CSS Source
   選擇Indent using spaces, Indentation size : 2
 (4) Tab formatting for Javascript
   Web and XML-->Javascript Files-->Javascript Source
   選擇Indent using spaces, Indentation size : 2
 (5) Tab formatting for HTML
   Web and XML-->HTML Files-->HTML Source
   選擇Indent using spaces, Indentation size : 2
 (6) Tab formatting for XML
   Web and XML-->XML Files-->XML Source
   選擇Indent using spaces, Indentation size : 2
 (7) Make it Unix-friendly
   General-->Workspace
   Text File encoding should be UTF-8,
    New text file line delimeter should be Unix
 (8) Set default text mode to -kkv
   Team-->CVS
   Files and Folders -->Default text mode :
    "ASCII with keyword expansion(-kkv)"
 (9) Tabulators
   PHP-->Editor-->Typing
   Tab key indents the current line 打勾
 (10) Set Active Validation
   Validation-->ModuleCore Validator &
         PHP Include Path Validator &
         XML Schema Validator &
         XML Validator 將Manual&Build打勾
         (其他取消打勾; 原因是會有誤判情況)
   

0 意見: