lazarus/tools/install/win/lazarus-cross.iss
2008-12-24 07:55:30 +00:00

117 lines
3.3 KiB
Plaintext

[_ISTool]
EnableISX=true
[Defines]
#define AppVersion GetEnv('LazVersion')
#define LazRevision GetEnv('LazRevision')
#define FPCVersion GetEnv('FPCVersion')
#define FPCFullVersion GetEnv('FPCFullVersion')
#define FPCSourceOS GetEnv('FPCSourceOS')
#define FPCFullSource GetEnv('FPCFullSource')
#define FPCFullTarget GetEnv('FPCFullTarget')
#define AppName "Lazarus"
#define SetupDate GetEnv('DateStamp')
#define BuildDir GetEnv('BuildDir')
[Setup]
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppPublisherURL=http://www.lazarus.freepascal.org/
AppSupportURL=http://www.lazarus.freepascal.org/
AppUpdatesURL=http://www.lazarus.freepascal.org/
ArchitecturesInstallIn64BitMode=x64
DefaultDirName={code:GetDefDir|c:\lazarus}
DefaultGroupName={#AppName}
InternalCompressLevel=ultra
OutputBaseFilename={#AppName}-{#AppVersion}-{#LazRevision}-fpc-{#FPCFullVersion}-{#SetupDate}-cross-{#FPCFullTarget}-{#FPCSourceOS}
SolidCompression=true
VersionInfoVersion={#AppVersion}
VersionInfoTextVersion={#AppVersion}-{#SetupDate}
ShowLanguageDialog=yes
WizardImageFile=lazarus_install_cheetah.bmp
WizardSmallImageFile=lazarus_install_cheetah_small.bmp
WizardImageStretch=false
ShowTasksTreeLines=true
WindowVisible=true
PrivilegesRequired=none
[Files]
Source: {#BuildDir}\image\*.*; DestDir: {app}; Flags: recursesubdirs
[INI]
Filename: {app}\Lazarus Home Page.url; Section: InternetShortcut; Key: URL; String: http://www.lazarus.freepascal.org/
Filename: {app}\Lazarus Forums.url; Section: InternetShortcut; Key: URL; String: http://www.lazarus.freepascal.org/modules.php?op=modload&name=PNphpBB2&file=index
Filename: {app}\Lazarus Wiki Help.url; Section: InternetShortcut; Key: URL; String: http://wiki.lazarus.freepascal.org/index.php/Main_Page
[Code]
function NextButtonClick(CurPage: Integer): Boolean;
var
folder: String;
begin
// by default go to next page
Result := true;
// if curpage is wpSelectDir check is filesystem
if CurPage = wpSelectDir then
begin
folder := WizardDirValue;
if Pos( ' ', folder ) > 0 then
begin
MsgBox( 'Selected folder contains spaces, please select a folder without spaces in it.', mbInformation, MB_OK );
Result := false;
end
end;
end;
function GetDefDir( def: String ) : String;
begin
if Pos( ' ', def ) > 0 then
begin
def := Copy( def, 1, Pos( ' ', def ) - 1 ) + '\NoFolderSpace';
end;
Result := def;
end;
var
PoFileStrings: TArrayOfString;
procedure LoadPoFile;
var
PoFilename: string;
begin
if (GetArrayLength(PoFileStrings)=0) then begin
PoFilename := ExpandConstant('{app}\languages\installerstrconsts.{language}.po');
if not FileExists(PoFileName) then
PoFilename := ExpandConstant('{app}\languages\installerstrconsts.po');
LoadStringsFromFile(PoFileName, PoFileStrings);
end;
end;
function GetPoString(const msgid: string): string;
var
Signature: string;
i: integer;
Count: integer;
begin
LoadPoFile;
//MsgBox(msgid, mbInformation, MB_OK);
Result := msgid;
Signature := '#: '+ msgid;
Count := GetArrayLength(PoFileStrings);
i := 0;
while (i<Count) and (PoFileStrings[i]<>Signature) do begin
i := i+1;
end;
if i+2<Count then begin
Result := copy(PoFileStrings[i+2],9, Length(PoFileStrings[i+2])-9);
//MsgBox(Result, mbInformation, MB_OK);
if Result='' then
Result := copy(PoFileStrings[i+1],8, Length(PoFileStrings[i+1])-8);
end;
end;