(英文原文:http://www.eclipse.org/swt/faq.php)
翻譯:Frank(frank@zijinshi.cn)
版本:Version 0.9
The SWT FAQ
-
7.問: 怎樣為我的平台編譯Eclipse執行檔案?
-
答:Eclipse是被二進位可執行檔載入。執行二進位檔案後,它彈出進度畫面,載入虛擬機器。對於不同的視窗系統、作業系統和硬體構架,我們必須為之編譯不同的二進位檔案。要麼從CVS程式碼程式庫編譯,要麼從下載的eclipse SDK編譯。
通過eclipse SDK編譯可執行檔。
- 為了編譯、運行eclipse,你需要JDK,版本要求1.4.2或更高,你可以從這個網頁下載eclipse:http://www.eclipse.org/downloads/index.php.
- 下載後,解壓縮。這樣或自動建立一個目錄:eclipse。這個目錄我們稱之為<eclipseRoot>。
- 在目錄<eclipseRoot>/plugins/org.eclipse.platform.source_X.X.X中,找到under org.eclipse.platform_X.X.X目錄下的檔案launchersrc.zip。
- 解壓縮檔案launchersrc.zip,它會自動建立一個目錄:library。
- 進入目錄library/WS,這兒WS 是視窗系統的名稱,例如win32、motif、gtk、photon或者carbon。在合適的.mak檔案中找到每個_HOME 變數,修改它的值使路徑正確。
- 運行build 命令(在Unix和Linux下面是sh build.sh,在Windows下是build.bat)。這樣就會建立一個叫做eclipse的二進位負載檔案。把eclipse二進位執行檔案移動到目錄 <eclipseRoot>下。
以上描述的原始內容由Colin R Devilbiss提供。
-
-
8.問: 怎樣編譯64位的 SWT GTK?
-
Follow these steps to extract the 64 bit SWT GTK source code and produce your own build. 按照以下的步驟提取64位的SWT GTK原始碼進行編譯。
- 開啟Eclipse,從dev.eclipse.org下載如下的項目:: org.eclipse.swt、org.eclipse.swt.gtk.linux.x86_64、 org.eclipse.swt.tools。
- 開啟org.eclipse.swt.gtk.linux.x86_64檔案夾中的檔案build.xml,運行Ant,執行build.xml 檔案中定義的uild.nativeLibraries任務。
- 更新項目 org.eclipse.swt.gtk.linux.x86_64。
項目org.eclipse.swt.gtk.linux.x86_64 現在包括64位的本地庫。64位的java和C代碼已經被複製到目錄org.eclipse.swt.gtk.linux.x86_64/src下。
(待續…)