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>