6
我需要創建一個簡單的Inno安裝程序安裝程序,以將三組不同的文件複製到C:或D:等三個用戶可選文件夾。帶三個目標文件夾的Inno安裝程序
這只是文件只有沒有應用程序。
我確實找到了一個腳本「提示爲數據添加一個文件夾」,但在下一頁只有一個文件夾。
謝謝。
如:
http://badjohnny.com.au/temp/myinno.jpg
編輯:這是我的代碼:
[Setup]
AppName=MyProg
AppVerName=MyProg
DefaultDirName={pf}\MyProg
DisableProgramGroupPage=yes
UninstallDisplayIcon={app}\MyProg.exe
[Files]
;Main program that will be installed in {app} folder
Source: MyProg.exe; DestDir: {app}
;Database file that will installed where user choosed
Source: DataBase.mdb; DestDir: {code:GetDataDir}
[Code]
var
DataDirPage: TInputDirWizardPage;
procedure InitializeWizard;
begin
{ Create the page }
DataDirPage := CreateInputDirPage(wpSelectDir,
'Select Personal Data Directory', 'Where should personal data files be installed?',
'Select the folder in which Setup should install personal data files, ' +
'then click Next.',
False, '');
DataDirPage.Add('');
DataDirPage.Values[0] := GetPreviousData('DataDir', '');
end;
procedure RegisterPreviousData(PreviousDataKey: Integer);
begin
{ Store the selected folder for further reinstall/upgrade }
SetPreviousData(PreviousDataKey, 'DataDir', DataDirPage.Values[0]);
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
{ Set default folder if empty }
if DataDirPage.Values[0] = '' then
DataDirPage.Values[0] := ExpandConstant('{sd}\DataDir');
Result := True;
end;
function UpdateReadyMemo(Space, NewLine, MemoUserInfoInfo, MemoDirInfo, MemoTypeInfo,
MemoComponentsInfo, MemoGroupInfo, MemoTasksInfo: String): String;
var
S: String;
begin
{ Fill the 'Ready Memo' with the normal settings and the custom settings }
S := '';
S := S + MemoDirInfo + NewLine + NewLine;
S := S + 'Database path' + NewLine;
S := S + Space + DataDirPage.Values[0] + NewLine;
Result := S;
end;
function GetDataDir(Param: String): String;
begin
{ Return the selected DataDir }
Result := DataDirPage.Values[0];
end;
你發現的例子,你需要做什麼,但你需要創建三個控件並有三個功能來獲得路徑。 – Deanna 2014-09-04 08:20:40
我發佈了我上面的代碼。謝謝 – LuaStart 2014-09-04 09:11:28
我的答案仍然存在,您只需將添加到頁面的項目增加三倍,並且每次都提到。 – Deanna 2014-09-04 09:17:30