上一頁 | 目錄 | 下一頁

G.1 慣用構建

源代碼可以在 CVS 找到並且和 NSIS 發行版本分離

要構建 NSIS 首先要安裝 PythonSCons。目前,支援的 SCons 版本是 0.96.90。任何高於 1.5.2 的 Python 版本只可以支援。

要開始構建,首先開啟控制台,更改工作目錄到 NSIS 根目錄並輸入scons 然後Enter。像下面這樣:

C:\>cd dev\nsis
C:\dev\nsis>scons
scons: Reading SConscript files ...
Using Microsoft tools configuration
Checking for main() in C library gdi32... (cached) yes
Checking for main() in C library user32... (cached) yes
Checking for main() in C library version... (cached) yes
Checking for main() in C library pthread... (cached) no
Checking for main() in C library stdc++... (cached) no
Checking for main() in C library iconv... (cached) no
Checking for main() in C library libiconv... (cached) no
scons: done reading SConscript files.
scons: Building targets ...
...

要安裝構建檔案,輸入:

scons PREFIX="C:\Program Files\NSIS" install

要建立安裝程式 (僅在 Windows 上),輸入:

scons dist-installer

要建立發行的 ZIP 檔案,輸入:

scons dist-zip

都要建立,輸入:

scons dist

要取得系統提供的完整選項列表,輸入:

scons -h

要取得 SCons 提供的完整選項列表,輸入:

scons -H

上一頁 | 目錄 | 下一頁