Cygwin 設定:因為我先前是專門編 Seamonkey = Firefox 的,所以用到的是 msys,我就照這樣修改過來。
@echo off SET MOZ_MSVCVERSION=10 SET MOZBUILDDIR=%~dp0 SET MOZILLABUILD=%MOZBUILDDIR% echo "cygwin directory: %MOZBUILDDIR%" REM Get MSVC paths call "%MOZBUILDDIR%guess-msvc.bat" REM Use the "new" moztools-static 這邊這樣改是因為我的 mozilla build system 放在這 set MOZ_TOOLS=d:\moz-build\moztools rem append to PATH SET PATH=%PATH%;%MOZBUILDDIR%\bin;%MOZ_TOOLS%\bin if "%VC10DIR%"=="" ( if "%VC10EXPRESSDIR%"=="" ( ECHO "Microsoft Visual C++ version 10 (2010) was not found. Exiting." pause EXIT /B 1 ) if "%SDKDIR%"=="" ( ECHO "Microsoft Platform SDK was not found. Exiting." pause EXIT /B 1 ) rem Prepend MSVC paths call "%VC10EXPRESSDIR%\Bin\vcvars32.bat" rem Don't set SDK paths in this block, because blocks are early-evaluated. rem Fix problem with VC++Express Edition if "%SDKVER%" GEQ "6" ( rem SDK Ver.6.0 (Windows Vista SDK) and newer rem do not contain ATL header files. rem We need to use the Platform SDK's ATL header files. SET USEPSDKATL=1 ) rem SDK ver.6.0 does not contain OleAcc.idl rem We need to use the Platform SDK's OleAcc.idl if "%SDKVER%" == "6" ( if "%SDKMINORVER%" == "0" ( SET USEPSDKIDL=1 ) ) ) else ( rem Prepend MSVC paths rem The Win7 SDK (or newer) should automatically integrate itself into vcvars32.bat ECHO Using VC 2010 built-in SDK call "%VC10DIR%\Bin\vcvars32.bat" ) if "%VC10DIR%"=="" ( rem Prepend SDK paths - Don't use the SDK SetEnv.cmd because it pulls in rem random VC paths which we don't want. rem Add the atlthunk compat library to the end of our LIB set "PATH=%SDKDIR%\bin;%PATH%" set "LIB=%SDKDIR%\lib;%LIB%;%MOZBUILDDIR%atlthunk_compat" if "%USEPSDKATL%"=="1" ( if "%USEPSDKIDL%"=="1" ( set "INCLUDE=%SDKDIR%\include;%PSDKDIR%\include\atl;%PSDKDIR%\include;%INCLUDE%" ) else ( set "INCLUDE=%SDKDIR%\include;%PSDKDIR%\include\atl;%INCLUDE%" ) ) else ( if "%USEPSDKIDL%"=="1" ( set "INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%PSDKDIR%\include;%INCLUDE%" ) else ( set "INCLUDE=%SDKDIR%\include;%SDKDIR%\include\atl;%INCLUDE%" ) ) ) rem Apache ANT 放的地方 SET ANT_HOME=d:\cygwin\ant rem Ant 要帶 path SET PATH=%PATH%;%ANT_HOME%\bin rem 設定 jdk 位置 SET JAVA_HOME=c:\Program Files (x86)\java\jdk1.6.0_31 rem bash login d:\cygwin 是我的 cygwin 安裝位置 d: cd \cygwin\bin bash --login -i cd \cygwin |
取得 LibreOffice 源碼:兩種方式可以作到,但都很花時間,因為要下載近 1G 的東西。
diff -ruNa libo/oowintool libox/oowintool --- libo/oowintool 2012-01-12 01:14:36 +0800 +++ libox/oowintool 2012-01-18 13:03:07 +0800 @@ -280,6 +280,6 @@ my $msm_path = (cygpath $common_files_path . "\\Merge Modules", 'w', $output_format); foreach $fname ("Microsoft_VC90_CRT_x86$postfix.msm", "policy_9_0_Microsoft_VC90_CRT_x86$postfix.msm") { print STDERR "Copying $msm_path/$fname to $dest\n"; - copy ("$msm_path/$fname", $dest) || die "copy failed: $!"; +# copy ("$msm_path/$fname", $dest) || die "copy failed: $!"; } } |
autogen.sh \ --verbose \ --enable-verbose \ --disable-odk \ --disable-debug \ --disable-build-mozilla \ --without-junit \ --with-num-cpus=3 \ --with-max-jobs=4 \ --with-mozilla-build="/d/moz-build" \ --with-vendor="s793016" \ --with-build-version="Built by s793016" \ --with-directx-home="/d/VStudio/DirectXSDK" \ --with-cl-home="/d/VStudio/2010/VC" \ --with-mspdb-path="/d/VStudio/2010/Common7/IDE" \ --with-csc-path="/c/WINDOWS/Microsoft.NET/Framework/v3.5" \ --with-midl-path="/c/Program Files (x86)/Microsoft SDKs/Windows/v7.0A/Bin" \ --with-asm-home="/d/VStudio/2010/VC/Bin" \ --with-windows-sdk-home="/c/Program Files (x86)/Microsoft SDKs/Windows/v7.0A" \ --with-ant-home="/ant" \ --with-jdk-home="/c/Program Files (x86)/java/jdk1.6.0_31" \ --with-java-target-version=1.6 \ 2>&1 | tee /e/lo/log-autogen |
CFLAGS="-O2" \ CXXFLAGS="-O2" \ make \ 2>&1 | tee /e/lo/log-make |
已知問題:
ps:本文可能會再修改,如果心情好 或 有進展的話。