MozTW 討論區 https://forum.moztw.org/ |
|
如何編譯firefox的source code? https://forum.moztw.org/viewtopic.php?f=18&t=31735 |
第 1 頁 (共 1 頁) |
發表人: | skyfreeding2 [ 2011-01-28, 01:25 ] |
文章主題 : | 如何編譯firefox的source code? |
各位先進,我下載了firefox的source code,但是一直沒辦法編譯成功...不曉得到底哪裡出了問題...我的英文很不好,但是官方網頁上的說明我都一個字一個字在看...但一直有問題.. 能不能請各位高手幫幫忙....幫我看一下是哪裡出了錯? 我的方法是: 1. https://developer.mozilla.org/en/downlo ... ource_code 照這網站說的,去ftp把firefox 3.6.13抓下來,並解壓縮。 2.然後我進到system requirements and build instructions:https://developer.mozilla.org/En/Developer_Guide/Build_Instructions 3.再進到build and installation instructions:https://developer.mozilla.org/en/Build_and_Install。他說要下『make -f client.mk build』的指令。 由於我在windows 7,沒有make指令。我找到了Make for Windows(http://gnuwin32.sourceforge.net/packages/make.htm)這個網站,下載了『Complete package, except sources』,並安裝了Make程式。 4.用cmd開啟命令提示字元,用set path的指令更改環境變數讓cmd看得到make.exe這支程式。 5.把工作目錄切換到firefox原始碼解壓縮後的目錄下。 6.下了指令,卻顯示fail... c:\Users\advanding100\myFirefox\mozilla-1.9.2>make -f client.mk build process_begin: CreateProcess((null), uname -s, ...) failed. make: *** expand_function: unable to launch process (e=2) . Stop. 把錯誤訊息拿去google搜尋,只找到: http://www.google.com.tw/search?hl=zh-TW&client=firefox-a&rls=org.mozilla:zh-TW:official&q=process_begin: CreateProcess((null), uname -s, ...) failed. make: *** expand_function: unable to launch process&aq=f&aqi=&aql=&oq= 請問是哪個環節我做錯了嗎?? ps.我有灌了visual studio 2010、codeBlocks、windows SDK。 |
發表人: | skyfreeding2 [ 2011-01-29, 16:22 ] |
文章主題 : | Re: 如何編譯firefox的source code? |
耶我編譯成功了~~~ 分享一下給大家看~~ 我的環境:windows7,32bit版本。 首先請看Build Instructions: https://developer.mozilla.org/En/Develo ... structions build firefox只要四步驟! 一、Build prerequisites(https://developer.mozilla.org/En/Developer_Guide/Build_Instructions/Windows_Prerequisites) 軟體需求:Microsoft Visual C++(這個我使用Visual Studio 2010) Microsoft Windows SDK(s)(自己找來下載) MozillaBuild(官方載點在:http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe),下載完會安裝在c:\mozilla-build下。 二、Get the Source(https://developer.mozilla.org/En/Developer_Guide/Source_Code/Downloading_Source_Archives) 進去網頁後,有個大標題:Download→Releases,那邊有說明ftp怎麼使用,進去裡面抓即可。 我抓的是firefox 4.0b6版本。(本來是抓現在正在使的3.6.13版,但是發現visual studio 2005或2008才能編譯;我的2010只能編譯firefox 4以後的版本) 下載完後用7-zip解壓縮(他說不要用winRAR,因為有些長度為0的檔案winRAR會解不出來...好爛科科),解壓完有個「mozilla-central」的目錄,便是這個編譯專案的home directory。 三、Configuring build options(https://developer.mozilla.org/en/Configuring_Build_Options) 必需在home directory裡,自己建立一個「.mozconfig」檔案,裡面依規定格式填寫要建置(build)的程式及選項。 詳請請看網頁。有很多種寫法啦XD 我的.mozconfig內容是: 代碼: . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/ff-opt ac_add_options --disable-tests 四、Build and install(https://developer.mozilla.org/en/Build_and_Install) 這裡我的方法跟網頁上說的不太一樣。 網頁上好像直接開cmd下make指令,但是我跑不起來QQ 有個神奇的網頁: https://developer.mozilla.org/En/Simple_Firefox_build 在Installing build tools下的windows下,有個 引言回覆: Open a shell window by running: c:\mozilla-build\start-msvcX.bat (where X is 8 for VS 2005, and 9 for VS 2008). 照做,開cmd,執行“c:\mozilla-build\start-msvc10.bat ”。 Visual Studio 2010的話,X=10,實驗證明。 然後他會再跑出一個cmd式的視窗,叫MinGW32的。 用cd 切換到home directory(mozilla-central)後,才下指令: make -f client.mk build 就開始編了,如果中途當掉,就看他的錯誤訊息是啥。 大概1.5hr編完。 編完後可以在mozilla-central\ff-opt\dist\bin找到firefox.exe。 這樣就完成了。 然後如果要做成安裝檔的話,在這個網頁的:「Installing Your Build」有寫: To build a Windows installer, simply use make installer in your object directory. |
發表人: | AlanLive [ 2011-01-29, 21:23 ] |
文章主題 : | Re: 如何編譯firefox的source code? |
用自己的機器編譯 Firefox 有什麼實質的好處嗎? 如果有的話那我也想編譯看看 |
發表人: | skyfreeding2 [ 2011-01-29, 23:31 ] |
文章主題 : | Re: 如何編譯firefox的source code? |
因為想要修改firefox的code來玩看看,所以就先抓Firefox的原始碼來編譯。 |
發表人: | s793016 [ 2011-01-30, 10:16 ] |
文章主題 : | Re: 如何編譯firefox的source code? |
建議您找一套 o&o clevercache 來裝,編譯時間會有明顯的縮短 |
發表人: | skyfreeding2 [ 2011-02-01, 01:17 ] |
文章主題 : | Re: 如何編譯firefox的source code? |
感謝樓上大大 我下載來用了,似乎是個有用的軟體呢 ![]() |
發表人: | protelpcb [ 2011-07-07, 10:55 ] |
文章主題 : | Re: 如何編譯firefox的source code? |
請問大大 1.是要下載 A: .bz2 <<解壓後, F:\data2010\FireFox\firefox-5.0b7.source.tar\firefox-5.0b7.source\mozilla-beta 未見到 mozilla-central 還是 B: .Bondle <<7zip 無法解壓 *************************************** 我用A:mozilla-beta 正在編輯中 11:25開始計時 13:05分 結束,Firefox.exe 可以用 問題來了: 1.firefox 會累積使用記憶體資源(使用工作管理員 觀看) IE 8,9 ,Chrome 都會自動"分裂".exe ,分散獨立 避免單一.exe使用記憶體過大 當關掉其中1個.exe,就可以減少記憶體使用 我用delphi 作一個瀏覽器 也無法分裂,一但用到 破百M 記憶體後,將面臨 "關閉程式" 2.改了Language 為chineseTW了,Menu 卻依舊是英文 |
第 1 頁 (共 1 頁) | 所有顯示的時間為 UTC + 8 小時 |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |