模塊化InnoSetup依賴項安裝

原文在這裏:http://www.codeproject.com/Articles/20868/NET-Framework-Installer-for-InnoSetupphp

源文件地址:http://www.codeproject.com/KB/install/dotnetfx_innosetup_instal/innodependencyinstaller.zipnode

源文件須要註冊登陸CodeProject才能下載redis

Screenshot - dotnetfx_installer1.jpg

Screenshot - dotnetfx_installer3.jpg

說明:
經過添加模塊化innosetup腳原本自動下載和安裝各類依賴項 如.NET Framework 、VC++運行環境等。
源代碼是模塊化的,結構以下:

Screenshot - dotnetfx_structure.jpg

  • setup.iss - 包含基本設置,其中包含所需的模塊(產品)。 

       你須要把所需的模塊在頂部使用#include命令包含在源代碼中,例如: sql

       #include "scripts\products\dotnetfx11.iss"express

       而後你只須要在[Code]段調用它們的main函數,如:模塊化

       dotnetfx11();函數

  • bin - 包含安裝程序的最終輸出
  • src - 包含您的程序的應用程序文件
  • scripts
    • products.iss - 包含產品腳本的共享代碼。 您只須要更改[CustomMessages]部分和[Files]部分(包括isxdl語言文件)
    • isxdl - 包含用於設置(若是有要下載的內容)及其語言文件(例如german.ini)的下載器DLL。 這是您能夠放置​​isxdldownloader的語言文件的地方。
    • products - 包含應用程序所需的產品的腳本(例如.NET Framework 2.0)
      • dotnetfx11.iss - .NET Framework 1.1
      • dotnetfx11lp.iss - .NET Framework 1.1 Language Pack
      • dotnetfx11sp1.iss - .NET Framework 1.1 + Service Pack 1
      • dotnetfx20.iss - .NET Framework 2.0
      • dotnetfx20lp.iss - .NET Framework 2.0 Language Pack
      • dotnetfx20sp1.iss - .NET Framework 2.0 + Service Pack 1
      • dotnetfx20sp1lp.iss - .NET Framework 2.0 Service Pack 1 Language Pack
      • dotnetfx20sp2.iss - .NET Framework 2.0 + Service Pack 2
      • dotnetfx20sp2lp.iss - .NET Framework 2.0 Service Pack 2 Language Pack
      • dotnetfx35.iss - .NET Framework 3.5
      • dotnetfx35lp.iss - .NET Framework 3.5 Language Pack
      • dotnetfx35sp1.iss - .NET Framework 3.5 + Service Pack 1
      • dotnetfx35sp1lp.iss - .NET Framework 3.5 Service Pack 1 Language Pack
      • dotnetfx40client.iss - .NET Framework 4.0 Client Profile
      • dotnetfx40full.iss - .NET Framework 4.0 Full
      • dotnetfx46.iss - .NET Framework 4.6
      • ie6.iss - Internet Explorer 6
      • iis.iss - Internet Information Services (just a check if it is installed)
      • jet4sp8.iss - Jet 4 + Service Pack 8
      • kb835732.iss - Security Update (KB835732) which is required by .NET Framework 2.0 Service Pack 1 on Windows 2000 Service Pack 4
      • mdac28.iss - Microsoft Data Access Components (MDAC) 2.8
      • msi20.iss - Windows Installer 2.0
      • msi31.iss - Windows Installer 3.1
      • msi45.iss - Windows Installer 4.5
      • sql2005express.iss - SQL Server 2005 Express + Service Pack 3
      • sql2008express.iss - SQL Server 2008 Express R2
      • sqlcompact35sp2.iss - SQL Server Compact 3.5 + Service Pack 2
      • vcredist2005.iss - Visual C++ 2005 Redistributable
      • vcredist2008.iss - Visual C++ 2008 Redistributable
      • vcredist2010.iss - Visual C++ 2010 Redistributable
      • vcredist2012.iss - Visual C++ 2012 Redistributable
      • vcredist2013.iss - Visual C++ 2013 Redistributable
      • vcredist2015.iss - Visual C++ 2015 Redistributable
      • wic.iss - Windows Imaging Component
      • winversion.iss - helper functions to determine the installed Windows version
      • fileversion.iss - helper functions to determine the version of a file
      • stringversion.iss - helper functions to correctly parse a version string
      • dotnetfxversion.iss - helper functions to determine the installed .NET Framework version including service packs
      • msiproduct.iss - helper functions to check for installed msi products

你極可能須要調整setup.iss,以適應不一樣Windows版本所需的依賴項。ui

若是依賴項沒有安裝,安裝過程會檢查相關依賴項的安裝文件是否存在於.\MyProgramDependencies.文件夾下。若是不存在那麼程序將會自動下載。3d

Screenshot - dotnetfx_installer2.jpg

Screenshot - dotnetfx_installer4.jpg

用於腳本的應用程序包括:code

  • Inno Setup - (版本5.5.5)
  • ISTool -  Inno Setup的擴展組件。可是我只須要 isxdl.dll downloader (版本5.3.0)
相關文章
相關標籤/搜索