[Setup]
AppName=FKtemps2.1(教学)
AppVerName=FKtemps Ver 2.1(教学)
AppPublisher=FKtemps(教学)
AppVersion=2.1
DefaultDirName=C:/Program Files/FKtemps
DefaultGroupName=FKtemps2.1(教学)
;安装输出目录(默认.iss文件的Output下)
;OutputDir=F:/
;安装程序名字
OutputBaseFilename=测试
SetupIconFile=/y/setup.ico
UninstallIconFile=/y/uninst.ico
LicenseFile=/y/软件使用许可协议.txt
InfoBeforeFile=/y/版本说明.txt
AllowNoIcons=true
Compression=lzma/ultra
SolidCompression=true
;-------------------------------
CreateUninstallRegKey=true
Uninstallable=true
;--------------------------------------
WizardImageFile=F:/y/WizModernImage.bmp
WizardSmallImageFile=F:/y/WizModernSmallImage.bmp
VersionInfoVersion=20
VersionInfoCompany=www.fk68.net
VersionInfoDescription=FKtemps2.1(教学)
InternalCompressLevel=ultra
EnableDirDoesntExistWarning=false
AllowRootDirectory=true
ShowLanguageDialog=yes
WindowVisible=false
WizardImageBackColor=clGreen
VersionInfoCopyright=FeikeWorld
AppPublisherURL=http://www.fk68.net
[Tasks]
Name: desktopicon; Description: 创建桌面快捷方式(&D); GroupDescription: 添加快捷方式
Name: quicklaunchicon; Description: 创建快速运行栏快捷方式(&L); GroupDescription: 添加快捷方式; Languages: ; Flags: unchecked
[Languages]
Name: chi; MessagesFile: compiler:Default.isl
[Files]
;以下二个文件为:不复制到用户系统
Source: "D:/安装测试/*"; DestDir: "{tmp}"; Flags: ignoreversion recursesubdirs createallsubdirs
;---------------[临时闪屏图和音乐文件]---------------
;以下二个文件为:不复制到用户系统
Source: "D:/安装测试/Splash.bmp"; DestDir: "{tmp}"; Flags: dontcopy
Source: "D:/安装测试/dream.mid"; DestDir: "{tmp}"; Flags: dontcopy
;---------------临时闪屏图和音乐文件]---------------
[INI]
Filename: {app}/访问我们.url; Section: InternetShortcut; Key: URL; String: http://www.fk68.net
[Icons]
Name: {group}/FKtemps2.1(教学); Filename: {app}/FKtemps2.1(教学).exe
Name: {group}/说明文档; Filename: {app}/说明文档.txt
Name: {group}/访问主页; Filename: {app}/访问我们.url
Name: {userdesktop}/FKtemps2.1(教学); Filename: {app}/FKtemps2.1(教学).exe; Tasks: desktopicon
Name: {group}//卸载FKtemps2.1(教学); Filename: {uninstallexe}; IconFilename: {app}/uninstSYSini.exe; IconIndex: 0
;[Icons]
;这个可选段定义所有创建在开始菜单和/或其它位置 (比如桌面) 的快捷方式。
;Name: "{group}/数据库服务管理器"; Filename: "{app}/bin/fbcontrol.exe"
;Name: "{group}/卸载数据库服务器"; Filename: "{app}/unins000.exe"
[UninstallDelete]
Type: files; Name: {app}/访问我们.url
Name: {app}/fkboot/*; Type: filesandordirs
[Run]
Filename: {app}/FKtemps2.1(教学).exe; Description: 运行 FKtemps2.1(教学); Flags: nowait postinstall skipifsilent
[Messages]
BeveledLabel=http://www.fk68.net
[Code]
procedure AboutButtonOnClick(Sender: TObject); //当关于键被按下时产生的行为
begin //弹出对话框 #13 为回车字符
MsgBox(#13 '废客联邦 FeikeWorld' #13 '废客泉 FeikeQ' #13#13 '版权所有(C) http://www.fk68.net', mbInformation, MB_OK);
end;
procedure URLLabelOnClick(Sender: TObject); 当URL键被按下时产生的行为
var
ErrorCode: Integer;
begin //呼叫运行程序
ShellExec('open', 'http://www.fk68.net', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode);
end;
//--------------[这里是音乐定义(.mid)-------------
function mciSendString(lpszCommand: String; lpszReturnString: Integer; cchReturnLength: Integer; hwndCallback: Integer): Integer;
external 'mciSendStringA@winmm.dll stdcall';
//--------------这里是音乐定义(.mid)]-------------
procedure InitializeWizard();
var
AboutButton, CancelButton: TButton;
URLLabel: TNewStaticText; //建立一个url的按钮
//-------------[这里是闪屏定义----------------
SplashImage: TBitmapImage;
SplashForm: TForm;
SplashFileName: String;
I : Integer;
URLLabel: TNewStaticText;
CancelButton: TButton;
//-------------这里是闪屏定义]----------------
begin
//窗体文本颜色------------------------------------------
WizardForm.PAGENAMELABEL.Font.Color:= clRed;
WizardForm.PAGEDESCRIPTIONLABEL.Font.Color:= clBlue;
WizardForm.WELCOMELABEL1.Font.Color:= clGreen;
WizardForm.WELCOMELABEL2.Font.Color:= clOlive;
//----------[这里是音乐加载----------
ExtractTemporaryFile(ExtractFileName(ExpandConstant('{tmp}/dream.mid')));
mciSendString(ExpandConstant('play {tmp}/dream.mid'),0,0,0);
//----------这里是音乐加载]----------
//------------------[这里是闪屏加载代码块(.bmp)-----------------------
SplashFileName := ExpandConstant('{tmp}/Splash.bmp');
ExtractTemporaryFile(ExtractFileName(SplashFileName));
SplashForm := TForm.create(nil);
with SplashForm do
begin
BorderStyle := bsNone;
Position := poScreenCenter;
//-------宽和高--------
ClientWidth := 309;
ClientHeight := 379;
//--------自定义------
end;
SplashImage := TBitmapImage.Create(SplashForm);
with SplashImage do
begin
Bitmap.LoadFromFile(SplashFileName);
Stretch := true;
Align := alClient;
Parent := SplashForm;
end;
with SplashForm do
begin
Show;
//--------停留时间从1到5每次停留1秒=停留5秒---------
for I := 1 to 3 do
begin
Repaint;
Sleep(1000);
end;
Close;
Free;
end;
//------------------这里是闪屏加载代码块(.bmp)]-----------------------
{ 其它自定义控制 }
//添加一个按扭-----------------------------------------------------------------------
CancelButton := WizardForm.CancelButton;
AboutButton := TButton.Create(WizardForm);
AboutButton.Left := WizardForm.ClientWidth - CancelButton.Left - CancelButton.Width;
AboutButton.Top := CancelButton.Top - 0; //按扭在窗体上的位置
//按扭宽/高
AboutButton.Width := ScaleX(60);
AboutButton.Height := ScaleY(22);
AboutButton.Caption := '作者(&A)'; //按扭标题
AboutButton.OnClick := @AboutButtonOnClick; //事件激活
AboutButton.Parent := WizardForm;
//添加一个Labe标签-----------------------------------------------------------------------
URLLabel := TNewStaticText.Create(WizardForm);
URLLabel.Caption := '访问我们的网站';
URLLabel.Cursor := crHand;
URLLabel.OnClick := @URLLabelOnClick;
URLLabel.Parent := WizardForm;
{ Alter Font *after* setting Parent so the correct defaults are inherited first }
URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline];
URLLabel.Font.Color := clBlue;
URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2;
URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20);
end;
[UninstallRun]
Filename: {app}/uninstSYSini.exe
;卸载前运行的程序用来清除INI文件。