INNO Setup 使用筆記

2021-06-27 17:09:53 字數 3756 閱讀 3824

[setup]

defaultdirname=\my programee

infobeforefile=d:\inno setup 5\examples\readme.txt        安裝前的檢視資訊

infoafterfile=d:\inno setup 5\examples\readme-german.txt  安裝後的檢視資訊

outputbasefilename=setup

compression=lzma

solidcompression=yes

[run]

安裝結束後要執行的選項

(直接執行不提示,沒有可選)

[icons](快捷方式)

(在程式的快捷方式)

(在桌面快捷方式)

(\my program 快捷方式名 後面是對應的程式 )

commonprograms 程式選單

userdesktop 桌面

group程式選單的資料夾裡

[files]

( flags: isreadme 安裝結束後要讀的選項)

[registry]登錄檔內容

root: hkcu; subkey: "software\my company"; flags: uninsdeletekeyifempty

root: hkcu; subkey: "software\my company\my program"; flags: uninsdeletekey

root: hkcu; subkey: "software\my company\my program\settings"; valuetype: string; valuename: "name"; valuedata: ""

root: hkcu; subkey: "software\my company\my program\settings"; valuetype: string; valuename: "company"; valuedata: ""

root: hkcu; subkey: "software\my company\my program\settings"; valuetype: string; valuename: "datadir"; valuedata: ""

[code] 自定義安裝介面 不區分大小寫

[setup]

disableprogramgrouppage=yes

defaultgroupname=my program

[code]

procedure wordbuttononclick(sender: tobject);

var

word: variant;

begin

msgbox('word', mbinformation, mb_ok);

end;

procedure createbutton(aleft, atop: integer; acaption: string; anotifyevent: tnotifyevent);

begin

with tbutton.create(wizardform) do begin

left := aleft;

top := atop;

width := wizardform.cancelbutton.width;

height := wizardform.cancelbutton.height;

caption := acaption;

onclick := anotifyevent;

parent := wizardform.welcomepage;

end;

end;

procedure initializewizard();

var

left, top, topinc: integer;

begin

left := wizardform.welcomelabel2.left;

topinc := wizardform.cancelbutton.height + 8;

top := wizardform.welcomelabel2.top + wizardform.welcomelabel2.height - 4*topinc;

createbutton(left, top, '&word...', @wordbuttononclick); ;要先定義後使用

頁面變數

tinputfilewizardpage

tinputquerywizardpage

tinputoptionwizardpage

//下一步按鈕的函式

function nextbuttonclick(curpageid: integer): boolean;

begin

result := true;

endfunction backbuttonclick(curpageid: integer): boolean;

begin

result := true;

end;

檔案操作:

function renamefile(const oldname, newname: string): boolean; 

function deletefile(const filename: string): boolean; 

function deltree(const path: string; const isdir, deletefiles, deletesubdirsalso: boolean): boolean

建立頁面

Vim 使用筆記

set hlsearch set nohlsearch 搜尋後清除上次的加亮 nohl nohlsearch 拷貝 很有用的一句話,規定了格式選項,讓它換行不自動空格 set formatoptions tcrqn set fo r set noautoindent 再 shift insert 正...

xemacs使用筆記

xemacs使用筆記 xemacs emacs的下一代,由lucid原創 from debian參考手冊.由於不知道什麼時候刪掉了emacs的乙個重要檔案.每次都沒法安裝好.突然發現了xemacs,於是決定使用看看.本人還是菜鳥,僅供交流 我使用的ubuntu系統,所以就直接apt get inst...

TreeView使用筆記

treeview由節點構成,建樹通過對treeview.items屬性進行操作。items是乙個ttreenodes物件,這是乙個ttreenode集。一 針對ttreenodes,也就是 treeview.items,有這些屬性 1 count,節點個數。2 item index 通過index得...