innosetup腳本
Ⅰ 求助用inno setup腳本能判斷當前的系統並實現在XP和Win7下安裝不同的文件,請指教
查看幫助:
公共參數
有三個可選的被所有段條目支持的參數,它們是:
Languages
一個用空格分隔的語言名列表,告訴安裝程序條目屬於哪種語言。如果最終用戶從列表中選擇了一個語言,該條目就執行(例如: 安裝文件)。
不帶 Languages 參數的條目總是安裝,除非其它參數中有限制。
除用空格將它們隔開外,你也可以使用 boolean 表達式。查閱組件和任務參數獲取 boolean 表達式的示例。
示例:
Languages: en nl
MinVersion
指定條目要進行處理的最小 Windows 版本 Windows NT 版本。如果你在版本中的一個使用「0」,那麼條目將不在平台中進行處理。If the versions empty then the entry will use the default MinVersion for that platform.構建號和/或安全服務包級別可能包含在版本號中。這將忽略任何在腳本 [Setup] 段中的 MinVersion 指令。
不帶 MinVersion 參數的條目總是安裝,除非其它參數中有限制。
示例:
MinVersion: 4.0,4.0MinVersion: 4.1,
OnlyBelowVersion
基本上是和 MinVersion 相對。指定條目不進行處理的最小 Windows 和 Windows NT 版本。例如,如果你加入 4.1,5.0,用戶正在運行 Windows 95 或 NT 4.0,那麼條目將進行處理,但如果用戶正運行於 Windows 98 (報告它的版本是 4.1) 或 Windows 2000 (報告它的版本是 NT 5.0),它將不進行處理。版本中的一個放入「0」表示不受版本上限。 構建號和/或安全服務包級別可能包含在版本號中。這將忽略任何在腳本 [Setup] 段中的 MinVersion 指令。
不帶 OnlyBelowVersion 參數的條目總是安裝,除非其它參數中有限制。
示例:
OnlyBelowVersion: 4.1,5.0
Ⅱ Inno Setup只是生成腳本,怎樣生成setup.exe文件生成後在哪個位置
點擊菜單
構建
編譯生成setup.exe文件,setup.exe文件默認生成在我的文檔Output文件夾里,如果保存腳本的話則生成在和腳本同一目錄的Output文件夾里。
Ⅲ Inno Setup只是生成腳本,怎樣生成setup.exe文件生成後在哪個位置
點擊菜單 構建 編譯生成setup.exe文件,setup.exe文件默認生成在我的文檔Output文件夾里,如果保存腳本的話則生成在和腳本同一目錄的Output文件夾里。
Ⅳ 直接用bat命令對Inno Setup的腳本文件.iss進行編譯
Command Line Compiler Execution
Scripts can also be compiled by the Setup Compiler from the command line. Command line usage is as follows:
compil32 /cc <script name>
Example:
compil32 /cc "c:\isetup\samples\my script.iss"
As shown in the example above, filenames that include spaces must be enclosed in quotes.
Running the Setup Compiler from the command line does not suppress the normal progress display or any error messages. The Setup Compiler will return an exit code of 0 if the compile was successful, 1 if the command line parameters were invalid, or 2 if the compile failed.
Alternatively, you can compile scripts using the console-mode compiler, ISCC.exe. Command line usage is as follows:
iscc [options] <script name>
Or to read from standard input:
iscc [options] -
Example:
iscc "c:\isetup\samples\my script.iss"
As shown in the example above, filenames that include spaces must be enclosed in quotes.
Valid options are: "/O" to specify an output path (overriding any OutputDir setting in the script), "/F" to specify an output filename (overriding any OutputBaseFilename setting in the script), "/S" to specify a Sign Tool, "/Q" for quiet compile (print only error messages), and "/?" to show a help screen.
Example:
iscc /Q /O"My Output" /F"MyProgram-1.0" /Sbyparam=$p "c:\isetup\samples\my script.iss"
ISCC will return an exit code of 0 if the compile was successful, 1 if the command line parameters were invalid or an internal error occurred, or 2 if the compile failed.
The Setup Script Wizard can be started from the command line. Command line usage is as follows:
compil32 /wizard <wizard name> <script name>
Example:
compil32 /wizard "MyProg Script Wizard" "c:\temp.iss"
As shown in the example above, wizard names and filenames that include spaces must be enclosed in quotes.
Running the wizard from the command line does not suppress any error messages. The Setup Script Wizard will return an exit code of 0 if there was no error and additionally it will save the generated script file to the specified filename, 1 if the command line parameters were invalid, or 2 if the generated script file could not be saved. If the user cancelled the Setup Script Wizard, an exit code of 0 is returned and no script file is saved.
Ⅳ Inno Setup 編譯器」如何打包 javaWeb 應用程序,自動設置環境變數
在[Files]段下,添加下面代碼
Source: "執行文件.exe"; DestDir: "{app}"; Flags: igNoreversion
Source: "要打包的目錄\*"; DestDir: "{app}\安裝後釋放文件的目錄\"; Flags: igNoreversion recursesubdirs createallsubdirs
Ⅵ 如何使用ISSkin對Unicode版的Inno Setup製作的安裝程序添加皮膚
ISSkin是什麼?ISSkin怎麼使用?ISSkin是Code jock 公司出品的Inno Setup 皮膚插件,用於為Inno製作的安裝程序提供皮膚功能。ISSkin為您提供了靈活地創建自定義的視覺樣式,可以與創新安裝程序一起使用,將豐富的專業外觀添加到任何創新安裝程序安裝和最好的其免費。接下來我們小編就給大家詳細說說在Unicode版Inno Setup中使用ISSkin給安裝程序添加皮膚的具體方法步驟,希望對大家有所幫助!
自Delphi發布2009之後,Inno Setup 開始出現支持Unicode編碼的版本,即5.3.x系列,並且官方同時提供Ansi和Unicode版本。
如果了解Delphi 2009的朋友,應該就很了解這一版本對Unicode的支持,這里不多做介紹了。
Unicode版的Inno Setup腳本中會將所有字元串存儲為Unicode字元串,使用雙位元組編碼,包括ASCII碼,如果調用為早期Ansi版開發的插件的話,涉及到字元串String,應該顯式修改為AnsiString,這樣才能保證Unicode字元串正確轉換為Ansi字元串。
這里要解決由此而導致的問題。
現在的ISSkin最新版本是2.0.0,字元串使用Ansi編碼,所以需要將官方主頁上介紹的Code代碼段進行修改。
這里介紹使用ISSkin對Unicode版的Inno Setup製作的安裝程序添加皮膚。
第一步,在File段添加插件ISSkin的動態鏈接庫ISSkin.dll和皮膚文件
例如:
[Files]
Source: ISSkin.dll; DestDir: {app}; Flags: dont
Source: Office2007.cjstyles; DestDir: {tmp}; Flags: dont
第二步,在Code段聲明API,注意這里將原String修改為AnsiString
例如:
[Code]
procere LoadSkin(lpszPath: AnsiString; lpszIniFileName: AnsiString);external 'LoadSkin@files:isskin.dll stdcall';
procere UnloadSkin();external 'UnloadSkin@files:isskin.dll stdcall';
function ShowWindow(hWnd: Integer; uType: Integer): Integer;
external '[email protected] stdcall';
第三步,重載InitializeSetup和DeinitializeSetup兩個函數以調用ISSkin插件功能
例如:
procere DeinitializeSetup();
begin
ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
UnloadSkin();
end;
好了,現在截個圖吧,看看效果。
文章結束,以上就是關於如何使用ISSkin對Unicode版的Inno Setup製作的安裝程序添加皮膚的方法步驟,小編就給大家介紹到這里了,如果你覺得這篇文章還不錯,而且對你有幫助,那就趕快分享給更多的人看到吧!更多精彩,盡在我們網站!
Ⅶ inno setup 5 添加快捷方式總是默認選中,該怎麼修改
呵呵,找了很久,終於找到了。我試過了,按下面的處理。
[Tasks] //tasks 任務,desktopicon桌面,
Name: "desktopicon"; Description: ""; GroupDescription: ""; Flags: checkablealone
系統默認是沒有「Flags: checkablealone」命令的,checkablealone應該是「復選」的意思,「unchecked」應該為「不選」的意思吧。
經過調試,正確的應該是下面的。
[Tasks]
Name: "desktopicon"; Description: ""; GroupDescription: ""; Flags: checkablealone
這個問題的關鍵是:checkablealone "選中"意思
unchecked "非選中"意思
Ⅷ Inno setup腳本中怎麼設計安裝包腳本,用戶可以自行選擇軟體的安裝路徑.默認是裝C盤
安裝路徑好像是在打包腳本中指定的 如果默認的是C 而安裝到其他盤出錯 可能是腳本中已經寫死了
Ⅸ inno setup 5 添加快捷方式總是默認選中,該怎麼修改
inno setup 5 添加快捷方式總是默認選中,修改方法如下:
在[Tasks] //tasks 任務中找到desktopicon桌面,點擊「非選中」即可。
Ⅹ 怎麼用Inno Setup 編譯器製作安裝程序
啟動Inno Setup Compiler漢化版軟體。
選擇創建新的空白腳本文件,按確定。
然後按下一步。
在相應的項目里填上相應的內容,按下一步。
在圖中的1處以瀏覽的方式選擇主程序,然後一個個添加目錄,添加完後要記得編輯所添加的目錄,以免所有文件安裝在目標目錄下。在圖中的2處選添加目錄後按編輯。
在下圖中的1處填上子目錄的名稱,在2處下拉選擇其他設置。設置之後按確定繼續下一步。
按提示內容填寫後執行下一步。
最後生成的腳本格式的程序如下圖所示。編譯好後就完成製作了。