nsis資料庫
『壹』 NSIS打包的程序中加入資料庫服務
你可以檢測用戶是否已經安裝 Oracle 和 .NET,如果沒有安裝,則安裝程序就不啟動。
集成 Oracle 和 .NET 是不現實的,除非你的軟體本身也非常巨大,或者提供了安裝光碟,將 Oracle 和 .NET 都放在裡面。Oracle 可能需要手動安裝。我沒用過,我猜測是使用 Install shield 打包。如果要集成,你需要知道靜默安裝參數。時間太久用戶可能不願意等待,所以還是建議啟動讓用戶手動安裝。可使用 NSIS 提供的插件 Service 檢測 Oracle 相關服務確實 Oracle 是否安裝。服務名稱你自己去搞定:
<a href=" http://nsis.sourceforge.net/Services_plug-in" target="_blank"> http://nsis.sourceforge.net/Services_plug-in</a>
services::IsServiceInstalled 'MyServiceName'
;Pop $0
$0 now contains either 'Yes', 'No' or an error description
官方關於檢測和安裝 .NET Frameword 的參考代碼:
<a href=" http://nsis.sourceforge.net/Detect_and_download_the_.NET_framework." target="_blank"> http://nsis.sourceforge.net/Detect_and_download_the_.NET_framework.</a>
<a href=" http://nsis.sourceforge.net/Simple_Way_To_Install_.NET_Framework" target="_blank"> http://nsis.sourceforge.net/Simple_Way_To_Install_.NET_Framework</a>
<a href=" http://nsis.sourceforge.net/Installing_the_Microsoft_.NET_Framework" target="_blank"> http://nsis.sourceforge.net/Installing_the_Microsoft_.NET_Framework</a>
<a href=" http://nsis.sourceforge.net/How_to_Automatically_download_and_install_a_particular_version_of_.NET_if_it_is_not_already_installed" target="_blank"> http://nsis.sourceforge.net/How_to_Automatically_download_and_install_a_particular_version_of_.NET_if_it_is_not_already_installed</a>