diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..742d97ffb --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +c.bat +compilesettings.bat diff --git a/Components/.gitignore b/Components/.gitignore new file mode 100644 index 000000000..cb04305b1 --- /dev/null +++ b/Components/.gitignore @@ -0,0 +1 @@ +*.dcu diff --git a/Components/BidiCtrls.pas b/Components/BidiCtrls.pas new file mode 100644 index 000000000..cd671578b --- /dev/null +++ b/Components/BidiCtrls.pas @@ -0,0 +1,126 @@ +unit BidiCtrls; + +{ + Inno Setup + Copyright (C) 1997-2007 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + RTL-capable versions of standard controls + + $jrsoftware: issrc/Components/BidiCtrls.pas,v 1.2 2007/11/27 04:52:53 jr Exp $ +} + +interface + +uses + Windows, SysUtils, Messages, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TNewEdit = class(TEdit) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + + TNewMemo = class(TMemo) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + + TNewComboBox = class(TComboBox) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + + TNewListBox = class(TListBox) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + + TNewButton = class(TButton) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + + TNewCheckBox = class(TCheckBox) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + + TNewRadioButton = class(TRadioButton) + protected + procedure CreateParams(var Params: TCreateParams); override; + end; + +procedure Register; + +implementation + +uses + BidiUtils; + +procedure Register; +begin + RegisterComponents('JR', [TNewEdit, TNewMemo, TNewComboBox, TNewListBox, + TNewButton, TNewCheckBox, TNewRadioButton]); +end; + +{ TNewEdit } + +procedure TNewEdit.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); +end; + +{ TNewMemo } + +procedure TNewMemo.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); +end; + +{ TNewComboBox } + +procedure TNewComboBox.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); +end; + +{ TNewListBox } + +procedure TNewListBox.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); +end; + +{ TNewButton } + +procedure TNewButton.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); + Params.ExStyle := Params.ExStyle and not WS_EX_RIGHT; +end; + +{ TNewCheckBox } + +procedure TNewCheckBox.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); +end; + +{ TNewRadioButton } + +procedure TNewRadioButton.CreateParams(var Params: TCreateParams); +begin + inherited; + SetBiDiStyles(Self, Params); +end; + +end. diff --git a/Components/BidiUtils.pas b/Components/BidiUtils.pas new file mode 100644 index 000000000..71d5540d7 --- /dev/null +++ b/Components/BidiUtils.pas @@ -0,0 +1,88 @@ +unit BidiUtils; + +{ + Inno Setup + Copyright (C) 1997-2007 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Bidi utility functions + + $jrsoftware: issrc/Components/BidiUtils.pas,v 1.2 2007/11/27 04:52:53 jr Exp $ +} + +interface + +uses + Windows, SysUtils, Messages, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; + +procedure FlipControls(const AParentCtl: TWinControl); +procedure FlipRect(var Rect: TRect; const ParentRect: TRect; const UseRightToLeft: Boolean); +function IsParentFlipped(const AControl: TControl): Boolean; +function IsParentRightToLeft(const AControl: TControl): Boolean; +function SetBiDiStyles(const AControl: TControl; var AParams: TCreateParams): Boolean; + +var + { These are set by the SetupForm unit: } + IsParentFlippedFunc: function(AControl: TControl): Boolean; + IsParentRightToLeftFunc: function(AControl: TControl): Boolean; + +implementation + +procedure FlipRect(var Rect: TRect; const ParentRect: TRect; const UseRightToLeft: Boolean); +var + W: Integer; +begin + if UseRightToLeft then begin + W := Rect.Right - Rect.Left; + Rect.Left := ParentRect.Right - (Rect.Left - ParentRect.Left) - W; + Rect.Right := Rect.Left + W; + end; +end; + +function IsParentFlipped(const AControl: TControl): Boolean; +begin + if Assigned(IsParentFlippedFunc) then + Result := IsParentFlippedFunc(AControl) + else + Result := False; +end; + +function IsParentRightToLeft(const AControl: TControl): Boolean; +begin + if Assigned(IsParentRightToLeftFunc) then + Result := IsParentRightToLeftFunc(AControl) + else + Result := False; +end; + +function SetBiDiStyles(const AControl: TControl; var AParams: TCreateParams): Boolean; +begin + Result := IsParentRightToLeft(AControl); + if Result then + AParams.ExStyle := AParams.ExStyle or (WS_EX_RTLREADING or WS_EX_LEFTSCROLLBAR or WS_EX_RIGHT); +end; + +procedure FlipControls(const AParentCtl: TWinControl); +var + ParentWidth, I: Integer; + Ctl: TControl; +begin + if AParentCtl.ControlCount = 0 then + Exit; + AParentCtl.DisableAlign; + try + ParentWidth := AParentCtl.ClientWidth; + for I := 0 to AParentCtl.ControlCount-1 do begin + Ctl := AParentCtl.Controls[I]; + Ctl.Left := ParentWidth - Ctl.Width - Ctl.Left; + end; + finally + AParentCtl.EnableAlign; + end; + for I := 0 to AParentCtl.ControlCount-1 do + if AParentCtl.Controls[I] is TWinControl then + FlipControls(TWinControl(AParentCtl.Controls[I])); +end; + +end. diff --git a/Components/BitmapImage.pas b/Components/BitmapImage.pas new file mode 100644 index 000000000..d749af597 --- /dev/null +++ b/Components/BitmapImage.pas @@ -0,0 +1,231 @@ +unit BitmapImage; + +{ + Inno Setup + Copyright (C) 1997-2004 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + A TImage-like component for bitmaps without the TPicture bloat + + $jrsoftware: issrc/Components/BitmapImage.pas,v 1.6 2009/03/23 14:57:40 mlaan Exp $ +} + +interface + +uses + Windows, Controls, Graphics, Classes; + +type + TBitmapImage = class(TGraphicControl) + private + FAutoSize: Boolean; + FBackColor: TColor; + FBitmap: TBitmap; + FCenter: Boolean; + FReplaceColor: TColor; + FReplaceWithColor: TColor; + FStretch: Boolean; + FStretchedBitmap: TBitmap; + FStretchedBitmapValid: Boolean; + procedure BitmapChanged(Sender: TObject); + procedure SetBackColor(Value: TColor); + procedure SetBitmap(Value: TBitmap); + procedure SetCenter(Value: Boolean); + procedure SetReplaceColor(Value: TColor); + procedure SetReplaceWithColor(Value: TColor); + procedure SetStretch(Value: Boolean); + protected + function GetPalette: HPALETTE; override; + procedure Paint; override; + procedure SetAutoSize(Value: Boolean); {$IFDEF UNICODE}override;{$ENDIF} + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Align; + property AutoSize: Boolean read FAutoSize write SetAutoSize default False; + property BackColor: TColor read FBackColor write SetBackColor default clBtnFace; + property Center: Boolean read FCenter write SetCenter default False; + property DragCursor; + property DragMode; + property Enabled; + property ParentShowHint; + property Bitmap: TBitmap read FBitmap write SetBitmap; + property PopupMenu; + property ShowHint; + property Stretch: Boolean read FStretch write SetStretch default False; + property ReplaceColor: TColor read FReplaceColor write SetReplaceColor default clNone; + property ReplaceWithColor: TColor read FReplaceWithColor write SetReplaceWithColor default clNone; + property Visible; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('JR', [TBitmapImage]); +end; + +constructor TBitmapImage.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + ControlStyle := ControlStyle + [csReplicatable]; + FBackColor := clBtnFace; + FBitmap := TBitmap.Create; + FBitmap.OnChange := BitmapChanged; + FReplaceColor := clNone; + FReplaceWithColor := clNone; + FStretchedBitmap := TBitmap.Create; + Height := 105; + Width := 105; +end; + +destructor TBitmapImage.Destroy; +begin + FStretchedBitmap.Free; + FBitmap.Free; + inherited Destroy; +end; + +procedure TBitmapImage.BitmapChanged(Sender: TObject); +begin + FStretchedBitmapValid := False; + if FAutoSize and (FBitmap.Width > 0) and (FBitmap.Height > 0) then + SetBounds(Left, Top, FBitmap.Width, FBitmap.Height); + if (FBitmap.Width >= Width) and (FBitmap.Height >= Height) then + ControlStyle := ControlStyle + [csOpaque] + else + ControlStyle := ControlStyle - [csOpaque]; + Invalidate; +end; + +procedure TBitmapImage.SetAutoSize(Value: Boolean); +begin + FAutoSize := Value; + BitmapChanged(Self); +end; + +procedure TBitmapImage.SetBackColor(Value: TColor); +begin + if FBackColor <> Value then begin + FBackColor := Value; + BitmapChanged(Self); + end; +end; + +procedure TBitmapImage.SetBitmap(Value: TBitmap); +begin + FBitmap.Assign(Value); +end; + +procedure TBitmapImage.SetCenter(Value: Boolean); +begin + if FCenter <> Value then begin + FCenter := Value; + BitmapChanged(Self); + end; +end; + +procedure TBitmapImage.SetReplaceColor(Value: TColor); +begin + if FReplaceColor <> Value then begin + FReplaceColor := Value; + BitmapChanged(Self); + end; +end; + +procedure TBitmapImage.SetReplaceWithColor(Value: TColor); +begin + if FReplaceWithColor <> Value then begin + FReplaceWithColor := Value; + BitmapChanged(Self); + end; +end; + +procedure TBitmapImage.SetStretch(Value: Boolean); +begin + if FStretch <> Value then begin + FStretch := Value; + FStretchedBitmap.Assign(nil); + BitmapChanged(Self); + end; +end; + +function TBitmapImage.GetPalette: HPALETTE; +begin + Result := FBitmap.Palette; +end; + +procedure TBitmapImage.Paint; +var + R: TRect; + Bmp: TBitmap; + X, Y: Integer; +begin + with Canvas do begin + R := ClientRect; + + if Stretch then begin + if not FStretchedBitmapValid or (FStretchedBitmap.Width <> R.Right) or + (FStretchedBitmap.Height <> R.Bottom) then begin + FStretchedBitmapValid := True; + if (FBitmap.Width = R.Right) and (FBitmap.Height = R.Bottom) then + FStretchedBitmap.Assign(FBitmap) + else begin + FStretchedBitmap.Assign(nil); + FStretchedBitmap.Palette := CopyPalette(FBitmap.Palette); + FStretchedBitmap.Width := R.Right; + FStretchedBitmap.Height := R.Bottom; + FStretchedBitmap.Canvas.StretchDraw(R, FBitmap); + end; + end; + Bmp := FStretchedBitmap; + end + else + Bmp := FBitmap; + + if (FBackColor <> clNone) and (Bmp.Width < Width) or (Bmp.Height < Height) then begin + Brush.Style := bsSolid; + Brush.Color := FBackColor; + FillRect(R); + end; + + if csDesigning in ComponentState then begin + Pen.Style := psDash; + Brush.Style := bsClear; + Rectangle(0, 0, Width, Height); + end; + + if Center then begin + X := R.Left + ((R.Right - R.Left) - Bmp.Width) div 2; + if X < 0 then + X := 0; + Y := R.Top + ((R.Bottom - R.Top) - Bmp.Height) div 2; + if Y < 0 then + Y := 0; + end else begin + X := 0; + Y := 0; + end; + + if (FReplaceColor <> clNone) and (FReplaceWithColor <> clNone) then begin + Brush.Color := FReplaceWithColor; + BrushCopy(Rect(X, Y, X + Bmp.Width, Y + Bmp.Height), Bmp, Rect(0, 0, Bmp.Width, Bmp.Height), FReplaceColor); + end else + Draw(X, Y, Bmp); + end; +end; + +end. diff --git a/Components/DropListBox.pas b/Components/DropListBox.pas new file mode 100644 index 000000000..0933bcab5 --- /dev/null +++ b/Components/DropListBox.pas @@ -0,0 +1,119 @@ +unit DropListBox; + +{ + Inno Setup + Copyright (C) 1997-2004 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + This unit provides a listbox with drop files support. + + $jrsoftware: issrc/Components/DropListBox.pas,v 1.1 2004/06/05 16:07:10 mlaan Exp $ +} + +interface + +uses + StdCtrls, + Messages; + +type + TDropListBox = class; + + TDropFileEvent = procedure(Sender: TDropListBox; const FileName: String) of object; + + TDropListBox = class(TCustomListBox) + private + FOnDropFile: TDropFileEvent; + protected + procedure CreateWnd; override; + procedure WMDropFiles(var Msg: TWMDropFiles); message WM_DROPFILES; + published + property Align; + property BorderStyle; + property Color; + property Columns; + property Ctl3D; + property DragCursor; + property DragMode; + property Enabled; + property ExtendedSelect; + property Font; + property ImeMode; + property ImeName; + property IntegralHeight; + property ItemHeight; + property Items; + property MultiSelect; + property ParentColor; + property ParentCtl3D; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Sorted; + property Style; + property TabOrder; + property TabStop; + property TabWidth; + property Visible; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnDrawItem; + property OnDropFile: TDropFileEvent read FOnDropFile write FOnDropFile; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnKeyDown; + property OnKeyPress; + property OnKeyUp; + property OnMeasureItem; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + end; + +procedure Register; + +implementation + +uses + Classes, + Windows, ShellAPI; + +procedure TDropListBox.CreateWnd; +begin + inherited; + if csDesigning in ComponentState then + Exit; + + DragAcceptFiles(Handle, True); +end; + +procedure TDropListBox.WMDropFiles(var Msg: TWMDropFiles); +var + FileName: array[0..MAX_PATH] of Char; + I, FileCount: Integer; +begin + try + if Assigned(FOnDropFile) then begin + FileCount := DragQueryFile(Msg.Drop, $FFFFFFFF, nil, 0); + for I := 0 to FileCount-1 do + if DragQueryFile(Msg.Drop, I, FileName, SizeOf(FileName)) > 0 then + FOnDropFile(Self, FileName); + end; + Msg.Result := 0; + finally + DragFinish(Msg.Drop); + end; +end; + +procedure Register; +begin + RegisterComponents('JR', [TDropListBox]); +end; + +end. \ No newline at end of file diff --git a/Components/FolderTreeView.pas b/Components/FolderTreeView.pas new file mode 100644 index 000000000..7ce7c5fed --- /dev/null +++ b/Components/FolderTreeView.pas @@ -0,0 +1,1205 @@ +unit FolderTreeView; + +{ + Inno Setup + Copyright (C) 1997-2008 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TFolderTreeView component + + $jrsoftware: issrc/Components/FolderTreeView.pas,v 1.42 2009/03/25 11:47:32 mlaan Exp $ +} + +interface + +{$IFDEF VER200} + {$DEFINE DELPHI2009} +{$ENDIF} + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, CommCtrl; + +type + TCustomFolderTreeView = class; + + TFolderRenameEvent = procedure(Sender: TCustomFolderTreeView; + var NewName: String; var Accept: Boolean) of object; + + TCustomFolderTreeView = class(TWinControl) + private + FDestroyingHandle: Boolean; + FDirectory: String; + FFriendlyTree: Boolean; + FItemExpanding: Boolean; + FOnChange: TNotifyEvent; + FOnRename: TFolderRenameEvent; + procedure Change; + procedure DeleteObsoleteNewItems(const ParentItem, ItemToKeep: HTREEITEM); + function FindItem(const ParentItem: HTREEITEM; const AName: String): HTREEITEM; + function FindOrCreateItem(const ParentItem: HTREEITEM; const AName: String): HTREEITEM; + function GetItemFullPath(Item: HTREEITEM): String; virtual; + function InsertItem(const ParentItem: HTREEITEM; const AName, ACustomDisplayName: String; + const ANewItem: Boolean): HTREEITEM; + procedure SelectItem(const Item: HTREEITEM); + procedure SetItemHasChildren(const Item: HTREEITEM; const AHasChildren: Boolean); + procedure SetDirectory(const Value: String); + function TryExpandItem(const Item: HTREEITEM): Boolean; + procedure CNKeyDown(var Message: TWMKeyDown); message CN_KEYDOWN; + procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; + procedure WMCtlColorEdit(var Message: TMessage); message WM_CTLCOLOREDIT; + procedure WMDestroy(var Message: TWMDestroy); message WM_DESTROY; + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + protected + function ItemChildrenNeeded(const Item: HTREEITEM): Boolean; virtual; abstract; + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + function GetItemImageIndex(const Item: HTREEITEM; + const NewItem, SelectedImage: Boolean): Integer; virtual; abstract; + function GetRootItem: HTREEITEM; virtual; + function ItemHasChildren(const Item: HTREEITEM): Boolean; virtual; abstract; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + property OnChange: TNotifyEvent read FOnChange write FOnChange; + property OnRename: TFolderRenameEvent read FOnRename write FOnRename; + public + constructor Create(AOwner: TComponent); override; + procedure ChangeDirectory(const Value: String; const CreateNewItems: Boolean); + procedure CreateNewDirectory(const ADefaultName: String); + property Directory: String read FDirectory write SetDirectory; + end; + + TFolderTreeView = class(TCustomFolderTreeView) + private + procedure RefreshDriveItem(const Item: HTREEITEM; const ANewDisplayName: String); + protected + function ItemChildrenNeeded(const Item: HTREEITEM): Boolean; override; + function ItemHasChildren(const Item: HTREEITEM): Boolean; override; + function GetItemFullPath(Item: HTREEITEM): String; override; + function GetItemImageIndex(const Item: HTREEITEM; + const NewItem, SelectedImage: Boolean): Integer; override; + published + property TabOrder; + property TabStop default True; + property Visible; + property OnChange; + property OnRename; + end; + + TStartMenuFolderTreeView = class(TCustomFolderTreeView) + private + FUserPrograms, FCommonPrograms: String; + FUserStartup, FCommonStartup: String; + FImageIndexes: array[Boolean] of Integer; + protected + procedure CreateParams(var Params: TCreateParams); override; + function GetRootItem: HTREEITEM; override; + function ItemChildrenNeeded(const Item: HTREEITEM): Boolean; override; + function ItemHasChildren(const Item: HTREEITEM): Boolean; override; + function GetItemImageIndex(const Item: HTREEITEM; + const NewItem, SelectedImage: Boolean): Integer; override; + public + procedure SetPaths(const AUserPrograms, ACommonPrograms, + AUserStartup, ACommonStartup: String); + published + property TabOrder; + property TabStop default True; + property Visible; + property OnChange; + property OnRename; + end; + +procedure Register; + +implementation + +{ + Notes: + 1. Don't call TreeView_SelectItem without calling TreeView_Expand on the + item's parents first. Otherwise infinite recursion can occur: + a. TreeView_SelectItem will first set the selected item. It will then try + to expand the parent node, causing a TVN_ITEMEXPANDING message to be + sent. + b. If the TVN_ITEMEXPANDING handler calls TreeView_SortChildren, TV_SortCB + will call TV_EnsureVisible if the selected item was one of the items + affected by the sorting (which will always be the case). + c. TV_EnsureVisible will expand parent nodes if necessary. However, since + we haven't yet returned from the original TVN_ITEMEXPANDING message + handler, the parent node doesn't yet have the TVIS_EXPANDED state, + thus it thinks the node still needs expanding. + d. Another, nested TVN_ITEMEXPANDING message is sent, bringing us back to + step b. + (Reproducible on Windows 95 and 2000.) + The recursion can be seen if you comment out the ExpandParents call in + the SelectItem method, then click "New Folder" on a folder with no + children. + (Note, however, that because of the ChildrenAdded check in our + TVN_ITEMEXPANDING handler, it can only recurse once. That won't cause a + fatal stack overflow (like it did before the ChildrenAdded check was + added), but it's still wrong to allow that to happen.) +} + +uses + PathFunc, ShellApi, UxThemeISX{$IFDEF DELPHI2009}, Types{$ENDIF}; + +const + SHPPFW_NONE = $00000000; +var + SHPathPrepareForWriteFunc: function(hwnd: HWND; punkEnableModless: Pointer; + pszPath: PChar; dwFlags: DWORD): HRESULT; stdcall; + +const + TVM_SETEXTENDEDSTYLE = TV_FIRST + 44; + TVS_EX_DOUBLEBUFFER = $0004; + +procedure Register; +begin + RegisterComponents('JR', [TFolderTreeView, TStartMenuFolderTreeView]); +end; + +function IsListableDirectory(const FindData: TWin32FindData): Boolean; +begin + Result := (FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY <> 0) and + (FindData.dwFileAttributes and (FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_SYSTEM) <> + (FILE_ATTRIBUTE_HIDDEN or FILE_ATTRIBUTE_SYSTEM)) and + (StrComp(FindData.cFileName, '.') <> 0) and + (StrComp(FindData.cFileName, '..') <> 0); +end; + +function HasSubfolders(const Path: String): Boolean; +var + H: THandle; + FindData: TWin32FindData; +begin + Result := False; + H := FindFirstFile(PChar(AddBackslash(Path) + '*'), FindData); + if H <> INVALID_HANDLE_VALUE then begin + try + repeat + if IsListableDirectory(FindData) then begin + Result := True; + Break; + end; + until not FindNextFile(H, FindData); + finally + Windows.FindClose(H); + end; + end; +end; + +function GetFileDisplayName(const Filename: String): String; +var + FileInfo: TSHFileInfo; +begin + if SHGetFileInfo(PChar(Filename), 0, FileInfo, SizeOf(FileInfo), + SHGFI_DISPLAYNAME) <> 0 then + Result := FileInfo.szDisplayName + else + Result := ''; +end; + +function GetFileImageIndex(const Filename: String; const OpenIcon: Boolean): Integer; +const + OpenFlags: array[Boolean] of UINT = (0, SHGFI_OPENICON); +var + FileInfo: TSHFileInfo; +begin + if SHGetFileInfo(PChar(Filename), 0, FileInfo, SizeOf(FileInfo), + SHGFI_SYSICONINDEX or SHGFI_SMALLICON or OpenFlags[OpenIcon]) <> 0 then + Result := FileInfo.iIcon + else + Result := 0; +end; + +function GetDefFolderImageIndex(const OpenIcon: Boolean): Integer; +const + OpenFlags: array[Boolean] of UINT = (0, SHGFI_OPENICON); +var + FileInfo: TSHFileInfo; +begin + if SHGetFileInfo('c:\directory', FILE_ATTRIBUTE_DIRECTORY, FileInfo, SizeOf(FileInfo), + SHGFI_USEFILEATTRIBUTES or SHGFI_SYSICONINDEX or SHGFI_SMALLICON or OpenFlags[OpenIcon]) <> 0 then + Result := FileInfo.iIcon + else + Result := 0; +end; + +function IsNetworkDrive(const Drive: Char): Boolean; +{ Returns True if Drive is a network drive. Unlike GetLogicalDrives and + GetDriveType, this will find the drive even if it's currently in an + unavailable/disconnected state (i.e. showing a red "X" on the drive icon + in Windows Explorer). } +var + LocalName: String; + RemoteName: array[0..MAX_PATH-1] of Char; + RemoteNameLen, ErrorCode: DWORD; +begin + LocalName := Drive + ':'; + RemoteNameLen := SizeOf(RemoteName) div SizeOf(RemoteName[0]); + ErrorCode := WNetGetConnection(PChar(LocalName), RemoteName, RemoteNameLen); + Result := (ErrorCode = NO_ERROR) or (ErrorCode = ERROR_CONNECTION_UNAVAIL); +end; + +function MoveAppWindowToActiveWindowMonitor(var OldRect: TRect): Boolean; +{ This moves the application window (Application.Handle) to the same monitor + as the active window, so that a subsequent Windows dialog will display on + the same monitor. Based on code from D4+'s TApplication.MessageBox. + NOTE: This function was copied from CmnFunc.pas. } +type + HMONITOR = type THandle; + TMonitorInfo = record + cbSize: DWORD; + rcMonitor: TRect; + rcWork: TRect; + dwFlags: DWORD; + end; +const + MONITOR_DEFAULTTONEAREST = $00000002; +var + ActiveWindow: HWND; + Module: HMODULE; + MonitorFromWindow: function(hwnd: HWND; dwFlags: DWORD): HMONITOR; stdcall; + GetMonitorInfo: function(hMonitor: HMONITOR; var lpmi: TMonitorInfo): BOOL; stdcall; + MBMonitor, AppMonitor: HMONITOR; + Info: TMonitorInfo; +begin + Result := False; + ActiveWindow := GetActiveWindow; + if ActiveWindow = 0 then Exit; + Module := GetModuleHandle(user32); + MonitorFromWindow := GetProcAddress(Module, 'MonitorFromWindow'); + GetMonitorInfo := GetProcAddress(Module, 'GetMonitorInfoA'); + if Assigned(MonitorFromWindow) and Assigned(GetMonitorInfo) then begin + MBMonitor := MonitorFromWindow(ActiveWindow, MONITOR_DEFAULTTONEAREST); + AppMonitor := MonitorFromWindow(Application.Handle, MONITOR_DEFAULTTONEAREST); + if MBMonitor <> AppMonitor then begin + Info.cbSize := SizeOf(Info); + if GetMonitorInfo(MBMonitor, Info) then begin + GetWindowRect(Application.Handle, OldRect); + SetWindowPos(Application.Handle, 0, + Info.rcMonitor.Left + ((Info.rcMonitor.Right - Info.rcMonitor.Left) div 2), + Info.rcMonitor.Top + ((Info.rcMonitor.Bottom - Info.rcMonitor.Top) div 2), + 0, 0, SWP_NOACTIVATE or SWP_NOREDRAW or SWP_NOSIZE or SWP_NOZORDER); + Result := True; + end; + end; + end; +end; + +procedure MoveAppWindowBack(const OldRect: TRect); +{ Moves the application window back to its previous position after a + successful call to MoveAppWindowToActiveWindowMonitor } +begin + SetWindowPos(Application.Handle, 0, + OldRect.Left + ((OldRect.Right - OldRect.Left) div 2), + OldRect.Top + ((OldRect.Bottom - OldRect.Top) div 2), + 0, 0, SWP_NOACTIVATE or SWP_NOREDRAW or SWP_NOSIZE or SWP_NOZORDER); +end; + +function EnsurePathIsAccessible(const Path: String): Boolean; +{ Calls SHPathPrepareForWrite which ensures the specified path is accessible by + reconnecting network drives (important) and prompting for media on removable + drives (not so important for our purposes). (Note that despite its name, + the function does not test for write access.) } +var + ActiveWindow: HWND; + DidMove: Boolean; + OldRect: TRect; + WindowList: Pointer; +begin + { SHPathPrepareForWrite only exists on Windows 2000, Me, and later. + Do nothing on older versions of Windows. } + if @SHPathPrepareForWriteFunc = nil then begin + Result := True; + Exit; + end; + + { Note: The SHPathPrepareForWrite documentation claims that "user interface + windows will not be created" when hwnd is NULL, however I found that on + Windows 2000, it would still display message boxes for network errors. + (To reproduce: Disable your Local Area Connection and try expanding a + network drive.) So to avoid bugs from having unowned message boxes floating + around, go ahead and pass a proper owner window. } + ActiveWindow := GetActiveWindow; + DidMove := MoveAppWindowToActiveWindowMonitor(OldRect); + WindowList := DisableTaskWindows(0); + try + Result := SUCCEEDED(SHPathPrepareForWriteFunc(Application.Handle, nil, + PChar(Path), SHPPFW_NONE)); + finally + if DidMove then + MoveAppWindowBack(OldRect); + EnableTaskWindows(WindowList); + SetActiveWindow(ActiveWindow); + end; +end; + +function UseFriendlyTree: Boolean; +{ Returns True if running Windows XP or 2003 and the "Display simple folder + view" option in Explorer is enabled (by default, it is). + Note: Windows Vista also has this option, but regardless of how it is set, + folders never expand with a single click in Explorer. So on Vista and later, + False is always returned. } +var + Ver: Word; + K: HKEY; + Typ, Value, Size: DWORD; +begin + Ver := Word(GetVersion); + if (Lo(Ver) = 5) and (Hi(Ver) >= 1) then begin + Result := True; + if RegOpenKeyEx(HKEY_CURRENT_USER, + 'Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced', + 0, KEY_QUERY_VALUE, K) = ERROR_SUCCESS then begin + Size := SizeOf(Value); + if (RegQueryValueEx(K, 'FriendlyTree', nil, @Typ, @Value, @Size) = ERROR_SUCCESS) and + (Typ = REG_DWORD) and (Size = SizeOf(Value)) then + Result := (Value <> 0); + RegCloseKey(K); + end; + end + else + Result := False; +end; + +{ TCustomFolderTreeView } + +type + PItemData = ^TItemData; + TItemData = record + Name: String; + NewItem: Boolean; + ChildrenAdded: Boolean; + end; + +constructor TCustomFolderTreeView.Create(AOwner: TComponent); +var + LogFont: TLogFont; +begin + inherited; + ControlStyle := ControlStyle - [csCaptureMouse]; + Width := 121; + Height := 97; + ParentColor := False; + TabStop := True; + if Lo(GetVersion) < 6 then + Cursor := crArrow; { prevent hand cursor from appearing in TVS_TRACKSELECT mode } + if SystemParametersInfo(SPI_GETICONTITLELOGFONT, SizeOf(LogFont), @LogFont, 0) then + Font.Handle := CreateFontIndirect(LogFont); +end; + +procedure TCustomFolderTreeView.CreateParams(var Params: TCreateParams); +const + TVS_TRACKSELECT = $0200; + TVS_SINGLEEXPAND = $0400; +begin + InitCommonControls; + inherited; + CreateSubClass(Params, WC_TREEVIEW); + with Params do begin + Style := Style or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or TVS_LINESATROOT or + TVS_HASBUTTONS or TVS_SHOWSELALWAYS or TVS_EDITLABELS; + FFriendlyTree := UseFriendlyTree; + if FFriendlyTree then + Style := Style or TVS_TRACKSELECT or TVS_SINGLEEXPAND + else begin + if Lo(GetVersion) >= 6 then + Style := Style or TVS_TRACKSELECT + else + Style := Style or TVS_HASLINES; + end; + ExStyle := ExStyle or WS_EX_CLIENTEDGE; + WindowClass.style := WindowClass.style and not (CS_HREDRAW or CS_VREDRAW); + end; +end; + +procedure TCustomFolderTreeView.CreateWnd; +var + ImageList: HIMAGELIST; + FileInfo: TSHFileInfo; + SaveCursor: HCURSOR; +begin + FDestroyingHandle := False; + inherited; + FDirectory := ''; + if csDesigning in ComponentState then + Exit; + + { On Vista, enable the new Explorer-style look } + if (Lo(GetVersion) >= 6) and Assigned(SetWindowTheme) then begin + SetWindowTheme(Handle, 'Explorer', nil); + { Like Explorer, enable double buffering to avoid flicker when the mouse + is moved across the items } + SendMessage(Handle, TVM_SETEXTENDEDSTYLE, TVS_EX_DOUBLEBUFFER, + TVS_EX_DOUBLEBUFFER); + end; + + { Initialize the image list } + ImageList := SHGetFileInfo('', 0, FileInfo, SizeOf(FileInfo), + SHGFI_USEFILEATTRIBUTES or SHGFI_SYSICONINDEX or SHGFI_SMALLICON); + TreeView_SetImageList(Handle, ImageList, TVSIL_NORMAL); + + { Add the root items } + SaveCursor := SetCursor(LoadCursor(0, IDC_WAIT)); + try + ItemChildrenNeeded(nil); + finally + SetCursor(SaveCursor); + end; +end; + +procedure TCustomFolderTreeView.WMDestroy(var Message: TWMDestroy); +begin + { Work around bug in pre-v6 COMCTL32: If we have the TVS_SINGLEEXPAND style + and there is a selected item when the window is destroyed, we end up + getting a bunch of TVN_SINGLEEXPAND messages because it keeps moving the + selection as it's destroying items, resulting in a stream of "Please + insert a disk in drive X:" message boxes as the selection moves across + removable drives. + Currently, however, this problem isn't seen in practice because we don't + use TVS_SINGLEEXPAND on pre-XP Windows. } + FDestroyingHandle := True; { disables our TVN_SELCHANGED handling } + SelectItem(nil); + inherited; +end; + +procedure TCustomFolderTreeView.KeyDown(var Key: Word; Shift: TShiftState); +var + Item: HTREEITEM; +begin + inherited; + if (Key = VK_F2) and (Shift * [ssShift, ssAlt, ssCtrl] = []) then begin + Key := 0; + Item := TreeView_GetSelection(Handle); + if Assigned(Item) then + TreeView_EditLabel(Handle, Item); + end; +end; + +procedure TCustomFolderTreeView.CNKeyDown(var Message: TWMKeyDown); +var + FocusWnd: HWND; +begin + { On Delphi 5+, if a non-VCL control is focused, TApplication.IsKeyMsg will + send the CN_KEYDOWN message to the nearest VCL control. This means that + when the edit control is focused, the tree view itself gets CN_KEYDOWN + messages. Don't let the VCL handle Enter and Escape; if we're on a dialog, + those keys will close the window. } + FocusWnd := GetFocus; + if (FocusWnd <> 0) and (TreeView_GetEditControl(Handle) = FocusWnd) then + if (Message.CharCode = VK_RETURN) or (Message.CharCode = VK_ESCAPE) then + Exit; + inherited; +end; + +procedure TCustomFolderTreeView.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + { For TVS_EX_DOUBLEBUFFER to be truly flicker-free on Vista, we must use + comctl32's default WM_ERASEBKGND handling, not the VCL's (which calls + FillRect). } + DefaultHandler(Message); +end; + +procedure TCustomFolderTreeView.WMCtlColorEdit(var Message: TMessage); +begin + { We can't let TWinControl.DefaultHandler handle this message. It tries to + send a CN_CTLCOLOREDIT message to the tree view's internally-created edit + control, which it won't understand because it's not a VCL control. Without + this special handling, the border is painted incorrectly on Windows XP + with themes enabled. } + Message.Result := DefWindowProc(Handle, Message.Msg, Message.WParam, + Message.LParam); +end; + +function TCustomFolderTreeView.GetItemFullPath(Item: HTREEITEM): String; +var + TVItem: TTVItem; +begin + Result := ''; + while Assigned(Item) do begin + TVItem.mask := TVIF_PARAM; + TVItem.hItem := Item; + if not TreeView_GetItem(Handle, TVItem) then begin + Result := ''; + Exit; + end; + if Result = '' then + Result := PItemData(TVItem.lParam).Name + else + Insert(AddBackslash(PItemData(TVItem.lParam).Name), Result, 1); + Item := TreeView_GetParent(Handle, Item); + end; +end; + +procedure TCustomFolderTreeView.Change; +var + Item: HTREEITEM; +begin + Item := TreeView_GetSelection(Handle); + if Assigned(Item) then + FDirectory := GetItemFullPath(Item) + else + FDirectory := ''; + if Assigned(FOnChange) then + FOnChange(Self); +end; + +procedure TCustomFolderTreeView.CNNotify(var Message: TWMNotify); +const + TVN_SINGLEEXPAND = (TVN_FIRST-15); + TVNRET_SKIPOLD = 1; + TVNRET_SKIPNEW = 2; + + procedure HandleClick; + var + Item: HTREEITEM; + HitTestInfo: TTVHitTestInfo; + begin + HitTestInfo.pt := ScreenToClient(SmallPointToPoint(TSmallPoint(GetMessagePos()))); + Item := TreeView_HitTest(Handle, HitTestInfo); + if Assigned(Item) then begin + if HitTestInfo.flags and TVHT_ONITEMBUTTON <> 0 then + TreeView_Expand(Handle, Item, TVE_TOGGLE) + else begin + if TreeView_GetSelection(Handle) <> Item then + SelectItem(Item) + else begin + { In 'friendly tree' mode, if the item is already selected, ensure + it's expanded. + Note: We do this only if SelectItem wasn't called, since newly + selected items are expanded automatically. If we were to call this + unconditionally, any error message would be shown twice. } + if FFriendlyTree and (HitTestInfo.flags and TVHT_ONITEM <> 0) then + TreeView_Expand(Handle, Item, TVE_EXPAND); + end; + end; + end; + end; + +var + Hdr: PNMTreeView; + SaveCursor: HCURSOR; + DispItem: PTVItem; + TVItem: TTVItem; + S: String; + Accept: Boolean; +begin + inherited; + case Message.NMHdr.code of + TVN_DELETEITEM: + begin + Dispose(PItemData(PNMTreeView(Message.NMHdr).itemOld.lParam)); + end; + TVN_ITEMEXPANDING: + begin + { Sanity check: Make sure this message isn't sent recursively. + (See top of source code for details.) } + if FItemExpanding then + raise Exception.Create('Internal error: Item already expanding'); + FItemExpanding := True; + try + Hdr := PNMTreeView(Message.NMHdr); + if (Hdr.action = TVE_EXPAND) and + not PItemData(Hdr.itemNew.lParam).ChildrenAdded and + not PItemData(Hdr.itemNew.lParam).NewItem then begin + PItemData(Hdr.itemNew.lParam).ChildrenAdded := True; + SaveCursor := SetCursor(LoadCursor(0, IDC_WAIT)); + try + if ItemChildrenNeeded(Hdr.itemNew.hItem) then begin + { If no subfolders were found, and there are no 'new' items + underneath the parent item, remove the '+' sign } + if TreeView_GetChild(Handle, Hdr.itemNew.hItem) = nil then + SetItemHasChildren(Hdr.itemNew.hItem, False); + end + else begin + { A result of False means no children were added due to a + temporary error and that it should try again next time } + PItemData(Hdr.itemNew.lParam).ChildrenAdded := False; + { Return 1 to cancel the expansion process (although it seems + to do that anyway when it sees no children were added) } + Message.Result := 1; + end; + finally + SetCursor(SaveCursor); + end; + end; + finally + FItemExpanding := False; + end; + end; + TVN_GETDISPINFO: + begin + DispItem := @PTVDispInfo(Message.NMHdr).item; + if DispItem.mask and TVIF_IMAGE <> 0 then begin + DispItem.iImage := GetItemImageIndex(DispItem.hItem, + PItemData(DispItem.lParam).NewItem, False); + end; + if DispItem.mask and TVIF_SELECTEDIMAGE <> 0 then begin + DispItem.iSelectedImage := GetItemImageIndex(DispItem.hItem, + PItemData(DispItem.lParam).NewItem, True); + end; + if DispItem.mask and TVIF_CHILDREN <> 0 then begin + DispItem.cChildren := Ord(Assigned(TreeView_GetChild(Handle, DispItem.hItem))); + if (DispItem.cChildren = 0) and not PItemData(DispItem.lParam).NewItem then + DispItem.cChildren := Ord(ItemHasChildren(DispItem.hItem)); + end; + { Store the values with the item so the callback isn't called again } + DispItem.mask := DispItem.mask or TVIF_DI_SETITEM; + end; + TVN_SELCHANGED: + begin + if not FDestroyingHandle then + Change; + end; + TVN_BEGINLABELEDIT: + begin + DispItem := @PTVDispInfo(Message.NMHdr).item; + { Only 'new' items may be renamed } + if not PItemData(DispItem.lParam).NewItem then + Message.Result := 1; + end; + TVN_ENDLABELEDIT: + begin + DispItem := @PTVDispInfo(Message.NMHdr).item; + { Only 'new' items may be renamed } + if PItemData(DispItem.lParam).NewItem and + Assigned(DispItem.pszText) then begin + S := DispItem.pszText; + Accept := True; + if Assigned(FOnRename) then + FOnRename(Self, S, Accept); + if Accept then begin + PItemData(DispItem.lParam).Name := S; + { Instead of returning 1 to let the tree view update the text, + set the text ourself. This will downconvert any Unicode + characters to ANSI (if we're compiled as an ANSI app). } + TVItem.mask := TVIF_TEXT; + TVItem.hItem := DispItem.hItem; + TVItem.pszText := PChar(S); + TreeView_SetItem(Handle, TVItem); + TreeView_SortChildren(Handle, TreeView_GetParent(Handle, DispItem.hItem), 0); + Change; + end; + end; + end; + NM_CLICK: + begin + { Use custom click handler to work more like Windows XP Explorer: + - Items can be selected by clicking anywhere on their respective + rows, except for the button. + - In 'friendly tree' mode, clicking an item's icon or caption causes + the item to expand, but never to collapse. } + HandleClick; + Message.Result := 1; + end; + TVN_SINGLEEXPAND: + begin + Hdr := PNMTreeView(Message.NMHdr); + { Trying to emulate Windows XP's Explorer here: + Only collapse old item if it's at the same level as the new item. } + if Assigned(Hdr.itemOld.hItem) and Assigned(Hdr.itemNew.hItem) and + (TreeView_GetParent(Handle, Hdr.itemNew.hItem) <> + TreeView_GetParent(Handle, Hdr.itemOld.hItem)) then + Message.Result := Message.Result or TVNRET_SKIPOLD; + { Selecting expanded items shouldn't collapse them } + if Assigned(Hdr.itemNew.hItem) then begin + TVItem.mask := TVIF_STATE; + TVItem.hItem := Hdr.itemNew.hItem; + TVItem.stateMask := TVIS_EXPANDED; + if TreeView_GetItem(Handle, TVItem) and + (TVItem.state and TVIS_EXPANDED <> 0) then + Message.Result := Message.Result or TVNRET_SKIPNEW; + end; + end; + end; +end; + +procedure TCustomFolderTreeView.SetItemHasChildren(const Item: HTREEITEM; + const AHasChildren: Boolean); +var + TVItem: TTVItem; +begin + TVItem.mask := TVIF_CHILDREN; + TVItem.hItem := Item; + TVItem.cChildren := Ord(AHasChildren); + TreeView_SetItem(Handle, TVItem); +end; + +procedure TCustomFolderTreeView.DeleteObsoleteNewItems(const ParentItem, + ItemToKeep: HTREEITEM); +{ Destroys all 'new' items except for ItemToKeep and its parents. (ItemToKeep + doesn't necessarily have to be a 'new' item.) Pass nil in the ParentItem + parameter when calling this method. } + + function EqualsOrContains(const AParent: HTREEITEM; AChild: HTREEITEM): Boolean; + begin + Result := False; + repeat + if AChild = AParent then begin + Result := True; + Break; + end; + AChild := TreeView_GetParent(Handle, AChild); + until AChild = nil; + end; + +var + Item, NextItem: HTREEITEM; + TVItem: TTVItem; +begin + Item := TreeView_GetChild(Handle, ParentItem); + while Assigned(Item) do begin + { Determine the next item in advance since Item might get deleted } + NextItem := TreeView_GetNextSibling(Handle, Item); + TVItem.mask := TVIF_PARAM; + TVItem.hItem := Item; + if TreeView_GetItem(Handle, TVItem) then begin + if PItemData(TVItem.lParam).NewItem and not EqualsOrContains(Item, ItemToKeep) then begin + TreeView_DeleteItem(Handle, Item); + { If there are no children left on the parent, remove its '+' sign } + if TreeView_GetChild(Handle, ParentItem) = nil then + SetItemHasChildren(ParentItem, False); + end + else + DeleteObsoleteNewItems(Item, ItemToKeep); + end; + Item := NextItem; + end; +end; + +function TCustomFolderTreeView.InsertItem(const ParentItem: HTREEITEM; + const AName, ACustomDisplayName: String; const ANewItem: Boolean): HTREEITEM; +var + InsertStruct: TTVInsertStruct; + ItemData: PItemData; +begin + if ANewItem then + DeleteObsoleteNewItems(nil, ParentItem); + InsertStruct.hParent := ParentItem; + if ANewItem then + InsertStruct.hInsertAfter := TVI_SORT + else + InsertStruct.hInsertAfter := TVI_LAST; + InsertStruct.item.mask := TVIF_TEXT or TVIF_IMAGE or + TVIF_SELECTEDIMAGE or TVIF_CHILDREN or TVIF_PARAM; + InsertStruct.item.hItem := nil; { not used } + if ANewItem then begin + InsertStruct.item.mask := InsertStruct.item.mask or TVIF_STATE; + InsertStruct.item.stateMask := TVIS_CUT; + InsertStruct.item.state := TVIS_CUT; + end; + { Note: There's no performance advantage in using a callback for the text. + During a TreeView_InsertItem call, the tree view will try to read the + new item's text in order to update the horizontal scroll bar range. + (It doesn't wait until the item is painted.) + In addition, the caller may sort newly-inserted subitems, which obviously + requires reading their text. } + if ACustomDisplayName = '' then + InsertStruct.item.pszText := PChar(AName) + else + InsertStruct.item.pszText := PChar(ACustomDisplayName); + InsertStruct.item.iImage := I_IMAGECALLBACK; + InsertStruct.item.iSelectedImage := I_IMAGECALLBACK; + if ANewItem then + InsertStruct.item.cChildren := 0 + else begin + if ParentItem = nil then + InsertStruct.item.cChildren := 1 + else + InsertStruct.item.cChildren := I_CHILDRENCALLBACK; + end; + InsertStruct.item.lParam := 0; + New(ItemData); + ItemData.Name := AName; + ItemData.NewItem := ANewItem; + ItemData.ChildrenAdded := False; + Pointer(InsertStruct.item.lParam) := ItemData; + Result := TreeView_InsertItem(Handle, InsertStruct); +end; + +function TCustomFolderTreeView.FindItem(const ParentItem: HTREEITEM; + const AName: String): HTREEITEM; +var + TVItem: TTVItem; +begin + Result := TreeView_GetChild(Handle, ParentItem); + while Assigned(Result) do begin + TVItem.mask := TVIF_PARAM; + TVItem.hItem := Result; + if TreeView_GetItem(Handle, TVItem) then + if PathCompare(PItemData(TVItem.lParam).Name, AName) = 0 then + Break; + Result := TreeView_GetNextSibling(Handle, Result); + end; +end; + +function TCustomFolderTreeView.FindOrCreateItem(const ParentItem: HTREEITEM; + const AName: String): HTREEITEM; +begin + Result := FindItem(ParentItem, AName); + if Result = nil then begin + if Assigned(ParentItem) then + SetItemHasChildren(ParentItem, True); + Result := InsertItem(ParentItem, AName, '', True); + end; +end; + +function TCustomFolderTreeView.GetRootItem: HTREEITEM; +begin + Result := nil; +end; + +procedure TCustomFolderTreeView.SelectItem(const Item: HTREEITEM); + + procedure ExpandParents(Item: HTREEITEM); + begin + Item := TreeView_GetParent(Handle, Item); + if Assigned(Item) then begin + ExpandParents(Item); + TreeView_Expand(Handle, Item, TVE_EXPAND); + end; + end; + +begin + { Must manually expand parents prior to calling TreeView_SelectItem; + see top of source code for details } + if Assigned(Item) then + ExpandParents(Item); + TreeView_SelectItem(Handle, Item); +end; + +function TCustomFolderTreeView.TryExpandItem(const Item: HTREEITEM): Boolean; +{ Tries to expand the specified item. Returns True if the item's children were + initialized (if any), or False if the initialization failed due to a + temporary error (i.e. ItemChildrenNeeded returned False). } +var + TVItem: TTVItem; +begin + TreeView_Expand(Handle, Item, TVE_EXPAND); + TVItem.mask := TVIF_CHILDREN or TVIF_PARAM; + TVItem.hItem := Item; + Result := TreeView_GetItem(Handle, TVItem) and + (PItemData(TVItem.lParam).ChildrenAdded or (TVItem.cChildren = 0)); +end; + +procedure TCustomFolderTreeView.ChangeDirectory(const Value: String; + const CreateNewItems: Boolean); +{ Changes to the specified directory. Value must begin with a drive letter + (e.g. "C:\directory"); relative paths and UNC paths are not allowed. + If CreateNewItems is True, new items will be created if one or more elements + of the path do not exist. } +var + PStart, PEnd: PChar; + S: String; + ParentItem, Item: HTREEITEM; +begin + SelectItem(nil); + + ParentItem := GetRootItem; + PStart := PChar(Value); + while PStart^ <> #0 do begin + if Assigned(ParentItem) then + if not TryExpandItem(ParentItem) then + Break; + + { Extract a single path component } + PEnd := PStart; + while (PEnd^ <> #0) and not PathCharIsSlash(PEnd^) do + PEnd := PathStrNextChar(PEnd); + SetString(S, PStart, PEnd - PStart); + + { Find that component under ParentItem } + if CreateNewItems and Assigned(ParentItem) then + Item := FindOrCreateItem(ParentItem, S) + else + Item := FindItem(ParentItem, S); + if Item = nil then + Break; + ParentItem := Item; + + PStart := PEnd; + while PathCharIsSlash(PStart^) do + Inc(PStart); + end; + + if Assigned(ParentItem) then + SelectItem(ParentItem); +end; + +procedure TCustomFolderTreeView.SetDirectory(const Value: String); +begin + ChangeDirectory(Value, False); +end; + +procedure TCustomFolderTreeView.CreateNewDirectory(const ADefaultName: String); +{ Creates a new node named AName underneath the selected node. Does nothing + if there is no selected node. } +var + ParentItem, Item: HTREEITEM; + I: Integer; + S: String; +begin + ParentItem := TreeView_GetSelection(Handle); + if ParentItem = nil then + Exit; + + DeleteObsoleteNewItems(nil, ParentItem); + + { Expand and find a unique name } + if not TryExpandItem(ParentItem) then + Exit; + I := 0; + repeat + Inc(I); + if I = 1 then + S := ADefaultName + else + S := ADefaultName + Format(' (%d)', [I]); + until FindItem(ParentItem, S) = nil; + + SetItemHasChildren(ParentItem, True); + Item := InsertItem(ParentItem, S, '', True); + SelectItem(Item); + + if CanFocus then + SetFocus; + TreeView_EditLabel(Handle, Item); +end; + +{ TFolderTreeView } + +function TFolderTreeView.ItemChildrenNeeded(const Item: HTREEITEM): Boolean; + + procedure AddDrives; + var + Drives: DWORD; + Drive: Char; + begin + Drives := GetLogicalDrives; + for Drive := 'A' to 'Z' do begin + if (Drives and 1 <> 0) or IsNetworkDrive(Drive) then + InsertItem(nil, Drive + ':', GetFileDisplayName(Drive + ':\'), False); + Drives := Drives shr 1; + end; + end; + + function AddSubdirectories(const ParentItem: HTREEITEM; + const Path: String): Boolean; + var + OldErrorMode: UINT; + H: THandle; + FindData: TWin32FindData; + S: String; + begin + OldErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS); + try + { The path might be on a disconnected network drive. Ensure it's + connected before attempting to enumerate subdirectories. } + if Length(Path) = 3 then begin { ...only do this on the root } + if not EnsurePathIsAccessible(Path) then begin + Result := False; + Exit; + end; + { Refresh the icon and text in case the drive was indeed reconnected } + RefreshDriveItem(ParentItem, GetFileDisplayName(Path)); + end; + Result := True; + + H := FindFirstFile(PChar(AddBackslash(Path) + '*'), FindData); + if H <> INVALID_HANDLE_VALUE then begin + try + repeat + if IsListableDirectory(FindData) then begin + S := FindData.cFileName; + InsertItem(ParentItem, S, GetFileDisplayName(AddBackslash(Path) + S), + False); + end; + until not FindNextFile(H, FindData); + finally + Windows.FindClose(H); + end; + end; + finally + SetErrorMode(OldErrorMode); + end; + end; + +begin + if Item = nil then begin + AddDrives; + Result := True; + end + else begin + Result := AddSubdirectories(Item, GetItemFullPath(Item)); + if Result then begin + { When a text callback is used, sorting after all items are inserted is + exponentially faster than using hInsertAfter=TVI_SORT } + TreeView_SortChildren(Handle, Item, 0); + end; + end; +end; + +function TFolderTreeView.GetItemFullPath(Item: HTREEITEM): String; +begin + Result := inherited GetItemFullPath(Item); + if (Length(Result) = 2) and (Result[2] = ':') then + Result := Result + '\'; +end; + +function TFolderTreeView.GetItemImageIndex(const Item: HTREEITEM; + const NewItem, SelectedImage: Boolean): Integer; +begin + if NewItem then + Result := GetDefFolderImageIndex(SelectedImage) + else + Result := GetFileImageIndex(GetItemFullPath(Item), SelectedImage); +end; + +function TFolderTreeView.ItemHasChildren(const Item: HTREEITEM): Boolean; +var + Path: String; + OldErrorMode: UINT; +begin + Path := GetItemFullPath(Item); + OldErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS); + try + Result := (GetDriveType(PChar(AddBackslash(PathExtractDrive(Path)))) = DRIVE_REMOTE) or + HasSubfolders(Path); + finally + SetErrorMode(OldErrorMode); + end; +end; + +procedure TFolderTreeView.RefreshDriveItem(const Item: HTREEITEM; + const ANewDisplayName: String); +var + TVItem: TTVItem; +begin + TVItem.mask := TVIF_IMAGE or TVIF_SELECTEDIMAGE; + TVItem.hItem := Item; + TVItem.iImage := I_IMAGECALLBACK; + TVItem.iSelectedImage := I_IMAGECALLBACK; + if ANewDisplayName <> '' then begin + TVItem.mask := TVItem.mask or TVIF_TEXT; + TVItem.pszText := PChar(ANewDisplayName); + end; + TreeView_SetItem(Handle, TVItem); +end; + +{ TStartMenuFolderTreeView } + +procedure TStartMenuFolderTreeView.CreateParams(var Params: TCreateParams); +begin + inherited; + Params.Style := Params.Style and not TVS_LINESATROOT; +end; + +function TStartMenuFolderTreeView.GetItemImageIndex(const Item: HTREEITEM; + const NewItem, SelectedImage: Boolean): Integer; +begin + Result := FImageIndexes[SelectedImage]; +end; + +function TStartMenuFolderTreeView.GetRootItem: HTREEITEM; +begin + { The top item ('Programs') is considered the root } + Result := TreeView_GetRoot(Handle); +end; + +function TStartMenuFolderTreeView.ItemChildrenNeeded(const Item: HTREEITEM): Boolean; + + procedure AddSubfolders(const ParentItem: HTREEITEM; const Path, StartupPath: String); + var + StartupName: String; + OldErrorMode: UINT; + H: THandle; + FindData: TWin32FindData; + S: String; + begin + { Determine the name of the Startup folder so that we can hide it from the + list } + if StartupPath <> '' then + if PathCompare(AddBackslash(Path), PathExtractPath(StartupPath)) = 0 then + StartupName := PathExtractName(StartupPath); + + OldErrorMode := SetErrorMode(SEM_FAILCRITICALERRORS); + try + H := FindFirstFile(PChar(AddBackslash(Path) + '*'), FindData); + if H <> INVALID_HANDLE_VALUE then begin + try + repeat + if IsListableDirectory(FindData) then begin + S := FindData.cFileName; + if PathCompare(S, StartupName) <> 0 then + if FindItem(ParentItem, S) = nil then + InsertItem(ParentItem, S, GetFileDisplayName(AddBackslash(Path) + S), False); + end; + until not FindNextFile(H, FindData); + finally + Windows.FindClose(H); + end; + end; + finally + SetErrorMode(OldErrorMode); + end; + end; + +var + Root, S: String; + NewItem: HTREEITEM; + Path: String; +begin + Result := True; + if Item = nil then begin + Root := FUserPrograms; + if Root = '' then begin + { User programs folder doesn't exist for some reason? } + Root := FCommonPrograms; + if Root = '' then + Exit; + end; + FImageIndexes[False] := GetFileImageIndex(Root, False); + FImageIndexes[True] := FImageIndexes[False]; + S := GetFileDisplayName(Root); + if S = '' then + S := PathExtractName(Root); + NewItem := InsertItem(nil, '', S, False); + TreeView_Expand(Handle, NewItem, TVE_EXPAND); + end + else begin + Path := GetItemFullPath(Item); + if FCommonPrograms <> '' then + AddSubfolders(Item, AddBackslash(FCommonPrograms) + Path, FCommonStartup); + if FUserPrograms <> '' then + AddSubfolders(Item, AddBackslash(FUserPrograms) + Path, FUserStartup); + TreeView_SortChildren(Handle, Item, 0); + end; +end; + +function TStartMenuFolderTreeView.ItemHasChildren(const Item: HTREEITEM): Boolean; +var + Path: String; +begin + Path := GetItemFullPath(Item); + if (FCommonPrograms <> '') and HasSubfolders(AddBackslash(FCommonPrograms) + Path) then + Result := True + else if (FUserPrograms <> '') and HasSubfolders(AddBackslash(FUserPrograms) + Path) then + Result := True + else + Result := False; +end; + +procedure TStartMenuFolderTreeView.SetPaths(const AUserPrograms, ACommonPrograms, + AUserStartup, ACommonStartup: String); +begin + FUserPrograms := AUserPrograms; + FCommonPrograms := ACommonPrograms; + FUserStartup := AUserStartup; + FCommonStartup := ACommonStartup; + RecreateWnd; +end; + +initialization + InitThemeLibrary; + SHPathPrepareForWriteFunc := GetProcAddress(LoadLibrary(shell32), + {$IFDEF UNICODE}'SHPathPrepareForWriteW'{$ELSE}'SHPathPrepareForWriteA'{$ENDIF}); +end. diff --git a/Components/NewCheckListBox.pas b/Components/NewCheckListBox.pas new file mode 100644 index 000000000..f996ff2c7 --- /dev/null +++ b/Components/NewCheckListBox.pas @@ -0,0 +1,2130 @@ +unit NewCheckListBox; + +{ TNewCheckListBox by Martijn Laan for My Inno Setup Extensions + See http://isx.wintax.nl/ for more information + + Based on TPBCheckListBox by Patrick Brisacier and TCheckListBox by Borland + + Group item support, child item support, exclusive item support, + ShowLines support and 'WantTabs mode' by Alex Yackimoff. + + Note: TNewCheckListBox uses Items.Objects to store the item state. Don't use + Item.Objects yourself, use ItemObject instead. + + $jrsoftware: issrc/Components/NewCheckListBox.pas,v 1.57 2009/03/25 11:47:32 mlaan Exp $ +} + +{$IFDEF VER90} + {$DEFINE DELPHI2} +{$ENDIF} +{$IFDEF VER200} + {$DEFINE DELPHI2009} +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls, UxThemeISX; + +const + WM_UPDATEUISTATE = $0128; + +type + TItemType = (itGroup, itCheck, itRadio); + TCheckBoxState2 = (cb2Normal, cb2Hot, cb2Pressed, cb2Disabled); + + TItemState = class (TObject) + public + Enabled: Boolean; + HasInternalChildren: Boolean; + CheckWhenParentChecked: Boolean; + IsLastChild: Boolean; + ItemType: TItemType; + Level: Byte; + Obj: TObject; + State: TCheckBoxState; + SubItem: string; + ThreadCache: set of Byte; + MeasuredHeight: Integer; + end; + + TCheckItemOperation = (coUncheck, coCheck, coCheckWithChildren); + TEnumChildrenProc = procedure(Index: Integer; HasChildren: Boolean; Ext: Longint) of object; + + TNewCheckListBox = class (TCustomListBox) + private + FAccObjectInstance: TObject; + FCaptureIndex: Integer; + FSpaceDown: Boolean; + FCheckHeight: Integer; + FCheckWidth: Integer; + FFormFocusChanged: Boolean; + FFlat: Boolean; + FLastMouseMoveIndex: Integer; + FMinItemHeight: Integer; + FOffset: Integer; + FOnClickCheck: TNotifyEvent; + FRequireRadioSelection: Boolean; + FShowLines: Boolean; + FStateList: TList; + FWantTabs: Boolean; + FThemeData: HTHEME; + FThreadsUpToDate: Boolean; + FHotIndex: Integer; + FDisableItemStateDeletion: Integer; + FWheelAccum: Integer; + FUseRightToLeft: Boolean; + procedure UpdateThemeData(const Close, Open: Boolean); + function CanFocusItem(Item: Integer): Boolean; + function CheckPotentialRadioParents(Index, ALevel: Integer): Boolean; + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CMEnter(var Message: TCMEnter); message CM_ENTER; + procedure CMExit(var Message: TCMExit); message CM_EXIT; + procedure CMFocusChanged(var Message: TCMFocusChanged); message CM_FOCUSCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMWantSpecialKey(var Message: TMessage); message CM_WANTSPECIALKEY; + procedure CNDrawItem(var Message: TWMDrawItem); message CN_DRAWITEM; + procedure EndCapture(Cancel: Boolean); + function AddItem2(AType: TItemType; const ACaption, ASubItem: string; + ALevel: Byte; AChecked, AEnabled, AHasInternalChildren, + ACheckWhenParentChecked: Boolean; AObject: TObject): Integer; + function FindAccel(VK: Word): Integer; + function FindCheckedSibling(const AIndex: Integer): Integer; + function FindNextItem(StartFrom: Integer; GoForward, + SkipUncheckedRadios: Boolean): Integer; + function GetItemState(Index: Integer): TItemState; + procedure InvalidateCheck(Index: Integer); + function RemeasureItem(Index: Integer): Integer; + procedure Toggle(Index: Integer); + procedure UpdateScrollRange; + procedure LBDeleteString(var Message: TMessage); message LB_DELETESTRING; + procedure LBResetContent(var Message: TMessage); message LB_RESETCONTENT; + procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; + procedure WMGetObject(var Message: TMessage); message $003D; //WM_GETOBJECT + procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN; + procedure WMMouseMove(var Message: TWMMouseMove); message WM_MOUSEMOVE; + procedure WMMouseWheel(var Message: TMessage); message $020A; //WM_MOUSEWHEEL + procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST; + procedure WMSetFocus(var Message: TWMSetFocus); message WM_SETFOCUS; + procedure WMSize(var Message: TWMSize); message WM_SIZE; + procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED; + procedure WMUpdateUIState(var Message: TMessage); message WM_UPDATEUISTATE; + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + procedure MeasureItem(Index: Integer; var Height: Integer); override; + procedure DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); + override; + function GetCaption(Index: Integer): String; + function GetChecked(Index: Integer): Boolean; + function GetItemEnabled(Index: Integer): Boolean; + function GetLevel(Index: Integer): Byte; + function GetObject(Index: Integer): TObject; + function GetState(Index: Integer): TCheckBoxState; + function GetSubItem(Index: Integer): string; + procedure KeyDown(var Key: Word; Shift: TShiftState); override; + procedure KeyUp(var Key: Word; Shift: TShiftState); override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); + override; + procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure UpdateHotIndex(NewHotIndex: Integer); + procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE; + procedure SetCaption(Index: Integer; const Value: String); + procedure SetChecked(Index: Integer; const AChecked: Boolean); + procedure SetFlat(Value: Boolean); + procedure SetItemEnabled(Index: Integer; const AEnabled: Boolean); + procedure SetObject(Index: Integer; const AObject: TObject); + procedure SetOffset(AnOffset: Integer); + procedure SetShowLines(Value: Boolean); + procedure SetSubItem(Index: Integer; const ASubItem: String); + property ItemStates[Index: Integer]: TItemState read GetItemState; + public + constructor Create(AOwner: TComponent); override; + procedure CreateWindowHandle(const Params: TCreateParams); override; + destructor Destroy; override; + function AddCheckBox(const ACaption, ASubItem: string; ALevel: Byte; + AChecked, AEnabled, AHasInternalChildren, ACheckWhenParentChecked: Boolean; + AObject: TObject): Integer; + function AddGroup(const ACaption, ASubItem: string; ALevel: Byte; + AObject: TObject): Integer; + function AddRadioButton(const ACaption, ASubItem: string; + ALevel: Byte; AChecked, AEnabled: Boolean; AObject: TObject): Integer; + function CheckItem(const Index: Integer; const AOperation: TCheckItemOperation): Boolean; + procedure EnumChildrenOf(Item: Integer; Proc: TEnumChildrenProc; Ext: Longint); + function GetParentOf(Item: Integer): Integer; + procedure UpdateThreads; + property Checked[Index: Integer]: Boolean read GetChecked write SetChecked; + property ItemCaption[Index: Integer]: String read GetCaption write SetCaption; + property ItemEnabled[Index: Integer]: Boolean read GetItemEnabled write SetItemEnabled; + property ItemLevel[Index: Integer]: Byte read GetLevel; + property ItemObject[Index: Integer]: TObject read GetObject write SetObject; + property ItemSubItem[Index: Integer]: string read GetSubItem write SetSubItem; + property State[Index: Integer]: TCheckBoxState read GetState; + published + property Align; + property BorderStyle; + property Color; + property Ctl3D; + property DragCursor; + property DragMode; + property Enabled; + property Flat: Boolean read FFlat write SetFlat default False; + property Font; + property Items; + property MinItemHeight: Integer read FMinItemHeight write FMinItemHeight default 16; + property Offset: Integer read FOffset write SetOffset default 4; + property OnClick; + property OnClickCheck: TNotifyEvent read FOnClickCheck write FOnClickCheck; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnKeyDown; + property OnKeyPress; + property OnKeyUp; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + property ParentColor; + property ParentCtl3D; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property RequireRadioSelection: Boolean read FRequireRadioSelection write FRequireRadioSelection default False; + property ShowHint; + property ShowLines: Boolean read FShowLines write SetShowLines default True; + property TabOrder; + property Visible; + property WantTabs: Boolean read FWantTabs write FWantTabs default False; + end; + +procedure Register; + +implementation + +uses + TmSchemaISX, {$IFDEF DELPHI2} Ole2 {$ELSE} ActiveX {$ENDIF}, BidiUtils{$IFDEF DELPHI2009}, Types{$ENDIF}; + +const + sRadioCantHaveDisabledChildren = 'Radio item cannot have disabled child items'; + + OBM_CHECKBOXES = 32759; + WM_CHANGEUISTATE = $0127; + WM_QUERYUISTATE = $0129; + UIS_SET = 1; + UIS_CLEAR = 2; + UIS_INITIALIZE = 3; + UISF_HIDEFOCUS = $1; + UISF_HIDEACCEL = $2; + DT_HIDEPREFIX = $00100000; + + OBJID_CLIENT = $FFFFFFFC; + CHILDID_SELF = 0; + ROLE_SYSTEM_OUTLINE = $23; + ROLE_SYSTEM_STATICTEXT = $29; + ROLE_SYSTEM_CHECKBUTTON = $2c; + ROLE_SYSTEM_RADIOBUTTON = $2d; + STATE_SYSTEM_UNAVAILABLE = $1; + STATE_SYSTEM_CHECKED = $10; + STATE_SYSTEM_MIXED = $20; + EVENT_OBJECT_STATECHANGE = $800A; + + IID_IUnknown: TGUID = ( + D1:$00000000; D2:$0000; D3:$0000; D4:($C0,$00,$00,$00,$00,$00,$00,$46)); + IID_IDispatch: TGUID = ( + D1:$00020400; D2:$0000; D3:$0000; D4:($C0,$00,$00,$00,$00,$00,$00,$46)); + IID_IAccessible: TGUID = ( + D1:$618736e0; D2:$3c3d; D3:$11cf; D4:($81,$0c,$00,$aa,$00,$38,$9b,$71)); + +var + CanQueryUIState: Boolean; + +type + TWinControlAccess = class (TWinControl); + + { Note: We have to use TVariantArg for Delphi 2 compat., because D2 passes + Variant parameters by reference (wrong), unlike D3+ which pass + Variant/OleVariant parameters by value } + NewOleVariant = TVariantArg; + NewWideString = Pointer; + + TIUnknown = class + public + function QueryInterface(const iid: TIID; var obj): HRESULT; virtual; stdcall; abstract; + function AddRef: Longint; virtual; stdcall; abstract; + function Release: Longint; virtual; stdcall; abstract; + end; + + TIDispatch = class(TIUnknown) + public + function GetTypeInfoCount(var ctinfo: Integer): HRESULT; virtual; stdcall; abstract; + function GetTypeInfo(itinfo: Integer; lcid: TLCID; var tinfo: ITypeInfo): HRESULT; virtual; stdcall; abstract; + function GetIDsOfNames(const iid: TIID; rgszNames: POleStrList; + cNames: Integer; lcid: TLCID; rgdispid: PDispIDList): HRESULT; virtual; stdcall; abstract; + function Invoke(dispIDMember: TDispID; const iid: TIID; lcid: TLCID; + flags: Word; var dispParams: TDispParams; varResult: PVariant; + excepInfo: PExcepInfo; argErr: PInteger): HRESULT; virtual; stdcall; abstract; + end; + + TIAccessible = class(TIDispatch) + public + function get_accParent(var ppdispParent: IDispatch): HRESULT; virtual; stdcall; abstract; + function get_accChildCount(var pcountChildren: Integer): HRESULT; virtual; stdcall; abstract; + function get_accChild(varChild: NewOleVariant; var ppdispChild: IDispatch): HRESULT; virtual; stdcall; abstract; + function get_accName(varChild: NewOleVariant; var pszName: NewWideString): HRESULT; virtual; stdcall; abstract; + function get_accValue(varChild: NewOleVariant; var pszValue: NewWideString): HRESULT; virtual; stdcall; abstract; + function get_accDescription(varChild: NewOleVariant; var pszDescription: NewWideString): HRESULT; virtual; stdcall; abstract; + function get_accRole(varChild: NewOleVariant; var pvarRole: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function get_accState(varChild: NewOleVariant; var pvarState: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function get_accHelp(varChild: NewOleVariant; var pszHelp: NewWideString): HRESULT; virtual; stdcall; abstract; + function get_accHelpTopic(var pszHelpFile: NewWideString; varChild: NewOleVariant; var pidTopic: Integer): HRESULT; virtual; stdcall; abstract; + function get_accKeyboardShortcut(varChild: NewOleVariant; var pszKeyboardShortcut: NewWideString): HRESULT; virtual; stdcall; abstract; + function get_accFocus(var pvarID: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function get_accSelection(var pvarChildren: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function get_accDefaultAction(varChild: NewOleVariant; var pszDefaultAction: NewWideString): HRESULT; virtual; stdcall; abstract; + function accSelect(flagsSelect: Integer; varChild: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function accLocation(var pxLeft: Integer; var pyTop: Integer; var pcxWidth: Integer; + var pcyHeight: Integer; varChild: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function accNavigate(navDir: Integer; varStart: NewOleVariant; var pvarEnd: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function accHitTest(xLeft: Integer; yTop: Integer; var pvarID: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function accDoDefaultAction(varChild: NewOleVariant): HRESULT; virtual; stdcall; abstract; + function put_accName(varChild: NewOleVariant; const pszName: NewWideString): HRESULT; virtual; stdcall; abstract; + function put_accValue(varChild: NewOleVariant; const pszValue: NewWideString): HRESULT; virtual; stdcall; abstract; + end; + + TAccObject = class(TIAccessible) + private + FControl: TNewCheckListBox; + FRefCount: Integer; + FStdAcc: TIAccessible; + { TIUnknown } + function QueryInterface(const iid: TIID; var obj): HRESULT; override; + function AddRef: Longint; override; + function Release: Longint; override; + { TIDispatch } + function GetTypeInfoCount(var ctinfo: Integer): HRESULT; override; + function GetTypeInfo(itinfo: Integer; lcid: TLCID; var tinfo: ITypeInfo): HRESULT; override; + function GetIDsOfNames(const iid: TIID; rgszNames: POleStrList; + cNames: Integer; lcid: TLCID; rgdispid: PDispIDList): HRESULT; override; + function Invoke(dispIDMember: TDispID; const iid: TIID; lcid: TLCID; + flags: Word; var dispParams: TDispParams; varResult: PVariant; + excepInfo: PExcepInfo; argErr: PInteger): HRESULT; override; + { TIAccessible } + function get_accParent(var ppdispParent: IDispatch): HRESULT; override; + function get_accChildCount(var pcountChildren: Integer): HRESULT; override; + function get_accChild(varChild: NewOleVariant; var ppdispChild: IDispatch): HRESULT; override; + function get_accName(varChild: NewOleVariant; var pszName: NewWideString): HRESULT; override; + function get_accValue(varChild: NewOleVariant; var pszValue: NewWideString): HRESULT; override; + function get_accDescription(varChild: NewOleVariant; var pszDescription: NewWideString): HRESULT; override; + function get_accRole(varChild: NewOleVariant; var pvarRole: NewOleVariant): HRESULT; override; + function get_accState(varChild: NewOleVariant; var pvarState: NewOleVariant): HRESULT; override; + function get_accHelp(varChild: NewOleVariant; var pszHelp: NewWideString): HRESULT; override; + function get_accHelpTopic(var pszHelpFile: NewWideString; varChild: NewOleVariant; var pidTopic: Integer): HRESULT; override; + function get_accKeyboardShortcut(varChild: NewOleVariant; var pszKeyboardShortcut: NewWideString): HRESULT; override; + function get_accFocus(var pvarID: NewOleVariant): HRESULT; override; + function get_accSelection(var pvarChildren: NewOleVariant): HRESULT; override; + function get_accDefaultAction(varChild: NewOleVariant; var pszDefaultAction: NewWideString): HRESULT; override; + function accSelect(flagsSelect: Integer; varChild: NewOleVariant): HRESULT; override; + function accLocation(var pxLeft: Integer; var pyTop: Integer; var pcxWidth: Integer; + var pcyHeight: Integer; varChild: NewOleVariant): HRESULT; override; + function accNavigate(navDir: Integer; varStart: NewOleVariant; var pvarEnd: NewOleVariant): HRESULT; override; + function accHitTest(xLeft: Integer; yTop: Integer; var pvarID: NewOleVariant): HRESULT; override; + function accDoDefaultAction(varChild: NewOleVariant): HRESULT; override; + function put_accName(varChild: NewOleVariant; const pszName: NewWideString): HRESULT; override; + function put_accValue(varChild: NewOleVariant; const pszValue: NewWideString): HRESULT; override; + public + constructor Create(AControl: TNewCheckListBox); + destructor Destroy; override; + procedure ControlDestroying; + end; + +function CoDisconnectObject(unk: TIUnknown; dwReserved: DWORD): HRESULT; + stdcall; external 'ole32.dll'; + +var + NotifyWinEventFunc: procedure(event: DWORD; hwnd: HWND; idObject: DWORD; + idChild: Longint); stdcall; + OleAccInited: BOOL; + OleAccAvailable: BOOL; + LresultFromObjectFunc: function(const riid: TGUID; wParam: WPARAM; + pUnk: TIUnknown): LRESULT; stdcall; + CreateStdAccessibleObjectFunc: function(hwnd: HWND; idObject: Longint; + const riidInterface: TGUID; var ppvObject: Pointer): HRESULT; stdcall; + +function InitializeOleAcc: Boolean; +var + M: HMODULE; +begin + if not OleAccInited then begin + M := LoadLibrary('oleacc.dll'); + if M <> 0 then begin + LresultFromObjectFunc := GetProcAddress(M, 'LresultFromObject'); + CreateStdAccessibleObjectFunc := GetProcAddress(M, 'CreateStdAccessibleObject'); + if Assigned(LresultFromObjectFunc) and + Assigned(CreateStdAccessibleObjectFunc) then + OleAccAvailable := True; + end; + OleAccInited := True; + end; + Result := OleAccAvailable; +end; + +{ TNewCheckListBox } + +constructor TNewCheckListBox.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + + with TBitmap.Create do + begin + try + Handle := LoadBitmap(0, PChar(OBM_CHECKBOXES)); + FCheckWidth := Width div 4; + FCheckHeight := Height div 3; + finally + Free; + end; + end; + + FStateList := TList.Create; + FMinItemHeight := 16; + FOffset := 4; + FShowLines := True; + Style := lbOwnerDrawVariable; + FHotIndex := -1; + FCaptureIndex := -1; +end; + +procedure TNewCheckListBox.CreateParams(var Params: TCreateParams); +begin + inherited; + FUseRightToLeft := SetBiDiStyles(Self, Params); +end; + +procedure TNewCheckListBox.CreateWnd; +begin + { TCustomListBox.CreateWnd causes a LB_RESETCONTENT message to be sent when + it's restoring FSaveItems. Increment FDisableItemStateDeletion so that + our LB_RESETCONTENT handler doesn't delete any item states. } + Inc(FDisableItemStateDeletion); + try + inherited; + finally + Dec(FDisableItemStateDeletion); + end; +end; + +procedure TNewCheckListBox.UpdateThemeData(const Close, Open: Boolean); +begin + if Close then begin + if FThemeData <> 0 then begin + CloseThemeData(FThemeData); + FThemeData := 0; + end; + end; + + if Open then begin + if UseThemes then + FThemeData := OpenThemeData(Handle, 'Button') + else + FThemeData := 0; + end; +end; + +procedure TNewCheckListBox.CreateWindowHandle(const Params: TCreateParams); +begin + inherited CreateWindowHandle(Params); + UpdateThemeData(True, True); +end; + +destructor TNewCheckListBox.Destroy; +var + I: Integer; +begin + if Assigned(FAccObjectInstance) then begin + { Detach from FAccObjectInstance if someone still has a reference to it } + TAccObject(FAccObjectInstance).ControlDestroying; + FAccObjectInstance := nil; + end; + if Assigned(FStateList) then begin + for I := FStateList.Count-1 downto 0 do + TItemState(FStateList[I]).Free; + FStateList.Free; + end; + UpdateThemeData(True, False); + inherited Destroy; +end; + +function TNewCheckListBox.AddCheckBox(const ACaption, ASubItem: string; + ALevel: Byte; AChecked, AEnabled, AHasInternalChildren, + ACheckWhenParentChecked: Boolean; AObject: TObject): Integer; +begin + if not AEnabled and CheckPotentialRadioParents(Items.Count, ALevel) then + raise Exception.Create(sRadioCantHaveDisabledChildren); + Result := AddItem2(itCheck, ACaption, ASubItem, ALevel, AChecked, AEnabled, + AHasInternalChildren, ACheckWhenParentChecked, AObject); +end; + +function TNewCheckListBox.AddGroup(const ACaption, ASubItem: string; + ALevel: Byte; AObject: TObject): Integer; +begin + Result := AddItem2(itGroup, ACaption, ASubItem, ALevel, False, True, False, + True, AObject); +end; + +function TNewCheckListBox.AddRadioButton(const ACaption, ASubItem: string; + ALevel: Byte; AChecked, AEnabled: Boolean; AObject: TObject): Integer; +begin + if not AEnabled then + AChecked := False; + Result := AddItem2(itRadio, ACaption, ASubItem, ALevel, AChecked, AEnabled, + False, True, AObject); +end; + +function TNewCheckListBox.CanFocusItem(Item: Integer): Boolean; +begin + with ItemStates[Item] do + Result := Self.Enabled and Enabled and (ItemType <> itGroup); +end; + +function TNewCheckListBox.CheckPotentialRadioParents(Index, ALevel: Integer): Boolean; +begin + Result := True; + Dec(Index); + Dec(ALevel); + while Index >= 0 do + begin + with ItemStates[Index] do + if Level = ALevel then + if ItemType = itRadio then + Exit + else + Break; + Dec(Index); + end; + if Index >= 0 then + begin + Index := GetParentOf(Index); + while Index >= 0 do + begin + if ItemStates[Index].ItemType = itRadio then + Exit; + Index := GetParentOf(Index); + end; + end; + Result := False; +end; + +procedure TNewCheckListBox.CMDialogChar(var Message: TCMDialogChar); +var + I: Integer; +begin + if FWantTabs and CanFocus then + with Message do + begin + I := FindAccel(CharCode); + if I >= 0 then + begin + SetFocus; + if (FCaptureIndex <> I) or FSpaceDown then EndCapture(not FSpaceDown); + ItemIndex := I; + Toggle(I); + Result := 1 + end; + end; +end; + +procedure TNewCheckListBox.CMEnter(var Message: TCMEnter); +var + GoForward, Arrows: Boolean; +begin + if FWantTabs and FFormFocusChanged and (GetKeyState(VK_LBUTTON) >= 0) then + begin + if GetKeyState(VK_TAB) < 0 then begin + Arrows := False; + GoForward := (GetKeyState(VK_SHIFT) >= 0); + end + else if (GetKeyState(VK_UP) < 0) or (GetKeyState(VK_LEFT) < 0) then begin + Arrows := True; + GoForward := False; + end + else if (GetKeyState(VK_DOWN) < 0) or (GetKeyState(VK_RIGHT) < 0) then begin + Arrows := True; + GoForward := True; + end + else begin + { Otherwise, just select the first item } + Arrows := False; + GoForward := True; + end; + if GoForward then + ItemIndex := FindNextItem(-1, True, not Arrows) + else + ItemIndex := FindNextItem(Items.Count, False, not Arrows) + end; + inherited; +end; + +procedure TNewCheckListBox.CMExit(var Message: TCMExit); +begin + EndCapture(not FSpaceDown or (GetKeyState(VK_MENU) >= 0)); + inherited; +end; + +procedure TNewCheckListBox.CMFocusChanged(var Message: TCMFocusChanged); +begin + FFormFocusChanged := True; + inherited; +end; + +procedure TNewCheckListBox.CMFontChanged(var Message: TMessage); +begin + inherited; + Canvas.Font := Font; +end; + +procedure LineDDAProc(X, Y: Integer; Canvas: TCanvas); stdcall; +begin + if ((X xor Y) and 1) = 0 then + begin + Canvas.MoveTo(X, Y); + Canvas.LineTo(X + 1, Y) + end; +end; + +procedure TNewCheckListBox.CMWantSpecialKey(var Message: TMessage); +begin + Message.Result := Ord(FWantTabs and (Message.WParam = VK_TAB)); +end; + +procedure TNewCheckListBox.CNDrawItem(var Message: TWMDrawItem); +var + L: Integer; +begin + with Message.DrawItemStruct^ do + begin + { Note: itemID is -1 when there are no items } + if Integer(itemID) >= 0 then begin + L := ItemStates[itemID].Level; + if ItemStates[itemID].ItemType <> itGroup then Inc(L); + rcItem.Left := rcItem.Left + (FCheckWidth + 2 * FOffset) * L; + FlipRect(rcItem, ClientRect, FUseRightToLeft); + end; + { Don't let TCustomListBox.CNDrawItem draw the focus } + if FWantTabs or (CanQueryUIState and + (SendMessage(Handle, WM_QUERYUISTATE, 0, 0) and UISF_HIDEFOCUS <> 0)) then + itemState := itemState and not ODS_FOCUS; + inherited; + end; +end; + +function TNewCheckListBox.RemeasureItem(Index: Integer): Integer; +{ Recalculates an item's height. Does not repaint and does not update the + vertical scroll range (as the LB_SETITEMHEIGHT message does neither). } +begin + Result := ItemHeight; + MeasureItem(Index, Result); + SendMessage(Handle, LB_SETITEMHEIGHT, Index, Result); +end; + +procedure TNewCheckListBox.UpdateScrollRange; +{ Updates the vertical scroll range, hiding/showing the scroll bar if needed. + This should be called after any RemeasureItem call. } +begin + { Update the scroll bounds by sending a seemingly-ineffectual LB_SETTOPINDEX + message. This works on Windows 95 and 2000. + NOTE: This causes the selected item to be repainted for no apparent reason! + I wish I knew of a better way to do this... } + SendMessage(Handle, LB_SETTOPINDEX, SendMessage(Handle, LB_GETTOPINDEX, 0, 0), 0); +end; + +procedure TNewCheckListBox.MeasureItem(Index: Integer; var Height: Integer); +var + DrawTextFormat: Integer; + Rect, SubItemRect: TRect; + ItemState: TItemState; + L, SubItemWidth: Integer; + S: String; +begin + with Canvas do begin + ItemState := ItemStates[Index]; + Rect := Classes.Rect(0, 0, ClientWidth, 0); + + L := ItemState.Level; + if ItemState.ItemType <> itGroup then + Inc(L); + Rect.Left := Rect.Left + (FCheckWidth + 2 * FOffset) * L; + Inc(Rect.Left); + + if ItemState.SubItem <> '' then begin + DrawTextFormat := DT_CALCRECT or DT_NOCLIP or DT_NOPREFIX or DT_SINGLELINE; + if FUseRightToLeft then + DrawTextFormat := DrawTextFormat or (DT_RIGHT or DT_RTLREADING); + SetRectEmpty(SubItemRect); + DrawText(Canvas.Handle, PChar(ItemState.SubItem), Length(ItemState.SubItem), + SubItemRect, DrawTextFormat); + SubItemWidth := SubItemRect.Right + 2 * FOffset; + Dec(Rect.Right, SubItemWidth) + end else + Dec(Rect.Right, FOffset); + + if not FWantTabs then + Inc(Rect.Left); + + DrawTextFormat := DT_NOCLIP or DT_CALCRECT or DT_WORDBREAK or DT_WORD_ELLIPSIS; + if not FWantTabs or (ItemState.ItemType = itGroup) then + DrawTextFormat := DrawTextFormat or DT_NOPREFIX; + if FUseRightToLeft then + DrawTextFormat := DrawTextFormat or (DT_RIGHT or DT_RTLREADING); + + S := Items[Index]; { Passing Items[Index] directly into DrawText doesn't work on Unicode build. } + ItemState.MeasuredHeight := DrawText(Canvas.Handle, PChar(S), Length(S), Rect, DrawTextFormat); + if ItemState.MeasuredHeight < FMinItemHeight then + Height := FMinItemHeight + else + Height := ItemState.MeasuredHeight + 4; + + { The height must be an even number for tree lines to be painted correctly } + if Odd(Height) then + Inc(Height); + end; +end; + +procedure TNewCheckListBox.DrawItem(Index: Integer; Rect: TRect; State: TOwnerDrawState); +const + ButtonStates: array [TItemType] of Integer = + ( + 0, + DFCS_BUTTONCHECK, + DFCS_BUTTONRADIO + ); + ButtonPartIds: array [TItemType] of Integer = + ( + 0, + BP_CHECKBOX, + BP_RADIOBUTTON + ); + ButtonStateIds: array [TCheckBoxState, TCheckBoxState2] of Integer = + ( + //Can be used for both checkboxes and radiobuttons because RBS_... constants + //equal CBS_... constants + (CBS_UNCHECKEDNORMAL, CBS_UNCHECKEDHOT, CBS_UNCHECKEDPRESSED, CBS_UNCHECKEDDISABLED), + (CBS_CHECKEDNORMAL, CBS_CHECKEDHOT, CBS_CHECKEDPRESSED, CBS_CHECKEDDISABLED), + (CBS_MIXEDNORMAL, CBS_MIXEDHOT, CBS_MIXEDPRESSED, CBS_MIXEDDISABLED) + ); +var + SavedClientRect: TRect; + + function FlipX(const X: Integer): Integer; + begin + if FUseRightToLeft then + Result := (SavedClientRect.Right - 1) - X + else + Result := X; + end; + + procedure InternalDrawText(const S: string; var R: TRect; Format: Integer; + Embossed: Boolean); + begin + if Embossed then + begin + Canvas.Brush.Style := bsClear; + OffsetRect(R, 1, 1); + SetTextColor(Canvas.Handle, GetSysColor(COLOR_BTNHIGHLIGHT)); + DrawText(Canvas.Handle, PChar(S), Length(S), R, Format); + OffsetRect(R, -1, -1); + SetTextColor(Canvas.Handle, GetSysColor(COLOR_BTNSHADOW)); + DrawText(Canvas.Handle, PChar(S), Length(S), R, Format); + end + else + DrawText(Canvas.Handle, PChar(S), Length(S), R, Format); + end; + +var + Disabled: Boolean; + uState, I, ThreadPosX, ThreadBottom, ThreadLevel, ItemMiddle, + DrawTextFormat: Integer; + CheckRect, SubItemRect, FocusRect: TRect; + NewTextColor: TColor; + OldColor: TColorRef; + ItemState: TItemState; + UIState: DWORD; + SubItemWidth: Integer; + PartId, StateId: Integer; +begin + if FShowLines and not FThreadsUpToDate then begin + UpdateThreads; + FThreadsUpToDate := True; + end; + + SavedClientRect := ClientRect; + { Undo flipping performed by TNewCheckListBox.CNDrawItem } + FlipRect(Rect, SavedClientRect, FUseRightToLeft); + + ItemState := ItemStates[Index]; + if CanQueryUIState then + UIState := SendMessage(Handle, WM_QUERYUISTATE, 0, 0) + else + UIState := 0; //no UISF_HIDEACCEL and no UISF_HIDEFOCUS + Disabled := not Enabled or not ItemState.Enabled; + with Canvas do begin + if not FWantTabs and (odSelected in State) and Focused then begin + Brush.Color := clHighlight; + NewTextColor := clHighlightText; + end + else begin + Brush.Color := Self.Color; + if Disabled then + NewTextColor := clGrayText + else + NewTextColor := Self.Font.Color; + end; + { Draw threads } + if FShowLines then begin + Pen.Color := clGrayText; + ThreadLevel := ItemLevel[Index]; + for I := 0 to ThreadLevel - 1 do + if I in ItemStates[Index].ThreadCache then begin + ThreadPosX := (FCheckWidth + 2 * FOffset) * I + FCheckWidth div 2 + FOffset; + ItemMiddle := (Rect.Bottom - Rect.Top) div 2 + Rect.Top; + ThreadBottom := Rect.Bottom; + if I = ThreadLevel - 1 then begin + if ItemStates[Index].IsLastChild then + ThreadBottom := ItemMiddle; + LineDDA(FlipX(ThreadPosX), ItemMiddle, FlipX(ThreadPosX + FCheckWidth div 2 + FOffset), + ItemMiddle, @LineDDAProc, Integer(Canvas)); + end; + LineDDA(FlipX(ThreadPosX), Rect.Top, FlipX(ThreadPosX), ThreadBottom, + @LineDDAProc, Integer(Canvas)); + end; + end; + { Draw checkmark} + if ItemState.ItemType <> itGroup then begin + CheckRect := Bounds(Rect.Left - (FCheckWidth + FOffset), + Rect.Top + ((Rect.Bottom - Rect.Top - FCheckHeight) div 2), + FCheckWidth, FCheckHeight); + FlipRect(CheckRect, SavedClientRect, FUseRightToLeft); + if FThemeData = 0 then begin + case ItemState.State of + cbChecked: uState := ButtonStates[ItemState.ItemType] or DFCS_CHECKED; + cbUnchecked: uState := ButtonStates[ItemState.ItemType]; + else + uState := DFCS_BUTTON3STATE or DFCS_CHECKED; + end; + if FFlat then + uState := uState or DFCS_FLAT; + if Disabled then + uState := uState or DFCS_INACTIVE; + if (FCaptureIndex = Index) and (FSpaceDown or (FLastMouseMoveIndex = Index)) then + uState := uState or DFCS_PUSHED; + DrawFrameControl(Handle, CheckRect, DFC_BUTTON, uState) + end else begin + PartId := ButtonPartIds[ItemState.ItemType]; + if Disabled then + StateId := ButtonStateIds[ItemState.State][cb2Disabled] + else if Index = FCaptureIndex then + if FSpaceDown or (FLastMouseMoveIndex = Index) then + StateId := ButtonStateIds[ItemState.State][cb2Pressed] + else + StateId := ButtonStateIds[ItemState.State][cb2Hot] + else if (FCaptureIndex < 0) and (Index = FHotIndex) then + StateId := ButtonStateIds[ItemState.State][cb2Hot] + else + StateId := ButtonStateIds[ItemState.State][cb2Normal]; + //if IsThemeBackgroundPartiallyTransparent(FThemeData, PartId, StateId) then + // DrawThemeParentBackground(Self.Handle, Handle, @CheckRect); + DrawThemeBackGround(FThemeData, Handle, PartId, StateId, CheckRect, @CheckRect); + end; + end; + { Draw SubItem } + FlipRect(Rect, SavedClientRect, FUseRightToLeft); + FillRect(Rect); + FlipRect(Rect, SavedClientRect, FUseRightToLeft); + Inc(Rect.Left); + OldColor := SetTextColor(Handle, ColorToRGB(NewTextColor)); + if ItemState.SubItem <> '' then + begin + DrawTextFormat := DT_NOCLIP or DT_NOPREFIX or DT_SINGLELINE or DT_VCENTER; + if FUseRightToLeft then + DrawTextFormat := DrawTextFormat or (DT_RIGHT or DT_RTLREADING); + SetRectEmpty(SubItemRect); + InternalDrawText(ItemState.SubItem, SubItemRect, DrawTextFormat or + DT_CALCRECT, False); + SubItemWidth := SubItemRect.Right + 2 * FOffset; + SubItemRect := Rect; + SubItemRect.Left := SubItemRect.Right - SubItemWidth + FOffset; + FlipRect(SubItemRect, SavedClientRect, FUseRightToLeft); + InternalDrawText(ItemState.SubItem, SubItemRect, DrawTextFormat, + FWantTabs and Disabled); + Dec(Rect.Right, SubItemWidth); + end + else + Dec(Rect.Right, FOffset); + { Draw item text } + if not FWantTabs then + Inc(Rect.Left); + OffsetRect(Rect, 0, (Rect.Bottom - Rect.Top - ItemState.MeasuredHeight) div 2); + DrawTextFormat := DT_NOCLIP or DT_WORDBREAK or DT_WORD_ELLIPSIS; + if not FWantTabs or (ItemState.ItemType = itGroup) then + DrawTextFormat := DrawTextFormat or DT_NOPREFIX; + if (UIState and UISF_HIDEACCEL) <> 0 then + DrawTextFormat := DrawTextFormat or DT_HIDEPREFIX; + if FUseRightToLeft then + DrawTextFormat := DrawTextFormat or (DT_RIGHT or DT_RTLREADING); + { When you call DrawText with the DT_CALCRECT flag and there's a word wider + than the rectangle width, it increases the rectangle width and wraps + at the new Right point. On the other hand, when you call DrawText + _without_ the DT_CALCRECT flag, it always wraps at the Right point you + specify -- it doesn't check for long words first. + Therefore, to ensure we wrap at the same place when drawing as when + measuring, pass our rectangle to DrawText with DT_CALCRECT first. + Wrapping at the same place is important because it can affect how many + lines are drawn -- and we mustn't draw too many. } + InternalDrawText(Items[Index], Rect, DrawTextFormat or DT_CALCRECT, False); + FlipRect(Rect, SavedClientRect, FUseRightToLeft); + InternalDrawText(Items[Index], Rect, DrawTextFormat, FWantTabs and Disabled); + { Draw focus rectangle } + if FWantTabs and not Disabled and (odSelected in State) and Focused and + (UIState and UISF_HIDEFOCUS = 0) then + begin + FocusRect := Rect; + InflateRect(FocusRect, 1, 1); + DrawFocusRect(FocusRect); + end; + SetTextColor(Handle, OldColor); + end; +end; + +procedure TNewCheckListBox.EndCapture(Cancel: Boolean); +var + InvalidateItem: Boolean; + Item: Integer; +begin + Item := FCaptureIndex; + if Item >= 0 then + begin + InvalidateItem := FSpaceDown or (FCaptureIndex = FLastMouseMoveIndex) or (FThemeData <> 0); + FSpaceDown := False; + FCaptureIndex := -1; + FLastMouseMoveIndex := -1; + if not Cancel then + Toggle(Item); + if InvalidateItem then + InvalidateCheck(Item); + end; + if MouseCapture then + MouseCapture := False; +end; + +procedure TNewCheckListBox.EnumChildrenOf(Item: Integer; Proc: TEnumChildrenProc; + Ext: Longint); +var + L: Integer; +begin + if (Item < -1) or (Item >= Items.Count) then + Exit; + if Item = -1 then + begin + L := 0; + Item := 0; + end + else + begin + L := ItemLevel[Item] + 1; + Inc(Item); + end; + while (Item < Items.Count) and (ItemLevel[Item] >= L) do + begin + if ItemLevel[Item] = L then + Proc(Item, (Item < Items.Count - 1) and (ItemLevel[Item + 1] > L), Ext); + Inc(Item); + end; +end; + +function TNewCheckListBox.AddItem2(AType: TItemType; + const ACaption, ASubItem: string; ALevel: Byte; + AChecked, AEnabled, AHasInternalChildren, ACheckWhenParentChecked: Boolean; + AObject: TObject): Integer; +var + ItemState: TItemState; + I: Integer; +begin + if Items.Count <> FStateList.Count then { sanity check } + raise Exception.Create('List item and state item count mismatch'); + if Items.Count > 0 then + begin + if ItemLevel[Items.Count - 1] + 1 < ALevel then + ALevel := ItemLevel[Items.Count - 1] + 1; + end + else + ALevel := 0; + FThreadsUpToDate := False; + { Use our own grow code to minimize heap fragmentation } + if FStateList.Count = FStateList.Capacity then begin + if FStateList.Capacity < 64 then + FStateList.Capacity := 64 + else + FStateList.Capacity := FStateList.Capacity * 2; + end; + ItemState := TItemState.Create; + try + ItemState.ItemType := AType; + ItemState.Enabled := AEnabled; + ItemState.Obj := AObject; + ItemState.Level := ALevel; + ItemState.SubItem := ASubItem; + ItemState.HasInternalChildren := AHasInternalChildren; + ItemState.CheckWhenParentChecked := ACheckWhenParentChecked; + except + ItemState.Free; + raise; + end; + FStateList.Add(ItemState); + try + Result := Items.Add(ACaption); + except + FStateList.Delete(FStateList.Count-1); + ItemState.Free; + raise; + end; + { If the first item in a radio group is being added, and it is top-level or + has a checked parent, force it to be checked. (We don't want to allow radio + groups with no selection.) } + if (AType = itRadio) and not AChecked and AEnabled then begin + I := GetParentOf(Result); + { FRequireRadioSelection only affects top-level items; we never allow + child radio groups with no selection (because nobody should need that) } + if FRequireRadioSelection or (I <> -1) then + if (I = -1) or (GetState(I) <> cbUnchecked) then + if FindCheckedSibling(Result) = -1 then + AChecked := True; + end; + SetChecked(Result, AChecked); +end; + +function TNewCheckListBox.FindAccel(VK: Word): Integer; +begin + for Result := 0 to Items.Count - 1 do + if CanFocusItem(Result) and IsAccel(VK, Items[Result]) then + Exit; + Result := -1; +end; + +function TNewCheckListBox.FindNextItem(StartFrom: Integer; GoForward, + SkipUncheckedRadios: Boolean): Integer; + + function ShouldSkip(Index: Integer): Boolean; + begin + with ItemStates[Index] do + Result := (ItemType = itRadio) and (State <> cbChecked) + end; + +var + Delta: Integer; +begin + if StartFrom < -1 then + StartFrom := ItemIndex; + if Items.Count > 0 then + begin + Delta := Ord(GoForward) * 2 - 1; + Result := StartFrom + Delta; + while (Result >= 0) and (Result < Items.Count) and + (not CanFocusItem(Result) or SkipUncheckedRadios and ShouldSkip(Result)) do + Result := Result + Delta; + if (Result < 0) or (Result >= Items.Count) then + Result := -1; + end + else + Result := -1; +end; + +function TNewCheckListBox.GetCaption(Index: Integer): String; +begin + Result := Items[Index]; +end; + +function TNewCheckListBox.GetChecked(Index: Integer): Boolean; +begin + Result := GetState(Index) <> cbUnchecked; +end; + +function TNewCheckListBox.GetItemEnabled(Index: Integer): Boolean; +begin + Result := ItemStates[Index].Enabled; +end; + +function TNewCheckListBox.GetItemState(Index: Integer): TItemState; +begin + Result := FStateList[Index]; +end; + +function TNewCheckListBox.GetLevel(Index: Integer): Byte; +begin + Result := ItemStates[Index].Level; +end; + +function TNewCheckListBox.GetObject(Index: Integer): TObject; +begin + Result := ItemStates[Index].Obj; +end; + +function TNewCheckListBox.GetParentOf(Item: Integer): Integer; +{ Gets index of Item's parent, or -1 if there is none. } +var + Level, I: Integer; +begin + Level := ItemStates[Item].Level; + if Level > 0 then + for I := Item-1 downto 0 do begin + if ItemStates[I].Level < Level then begin + Result := I; + Exit; + end; + end; + Result := -1; +end; + +function TNewCheckListBox.GetState(Index: Integer): TCheckBoxState; +begin + Result := ItemStates[Index].State; +end; + +function TNewCheckListBox.GetSubItem(Index: Integer): String; +begin + Result := ItemStates[Index].SubItem; +end; + +procedure TNewCheckListBox.InvalidateCheck(Index: Integer); +var + IRect: TRect; +begin + IRect := ItemRect(Index); + Inc(IRect.Left, (FCheckWidth + 2 * Offset) * (ItemLevel[Index])); + IRect.Right := IRect.Left + (FCheckWidth + 2 * Offset); + FlipRect(IRect, ClientRect, FUseRightToLeft); + InvalidateRect(Handle, @IRect, FThemeData <> 0); +end; + +procedure TNewCheckListBox.KeyDown(var Key: Word; Shift: TShiftState); +begin + if (Key = VK_SPACE) and not (ssAlt in Shift) and (ItemIndex >= 0) and + (FCaptureIndex < 0) and CanFocusItem(ItemIndex) then + if FWantTabs then begin + if not FSpaceDown then begin + FCaptureIndex := ItemIndex; + FSpaceDown := True; + InvalidateCheck(ItemIndex); + if (FHotIndex <> ItemIndex) and (FHotIndex <> -1) and (FThemeData <> 0) then + InvalidateCheck(FHotIndex); + end; + end + else + Toggle(ItemIndex); + inherited; +end; + +procedure TNewCheckListBox.KeyUp(var Key: Word; Shift: TShiftState); +begin + if (Key = VK_SPACE) and FWantTabs and FSpaceDown and (FCaptureIndex >= 0) then begin + EndCapture(False); + if (FHotIndex <> -1) and (FThemeData <> 0) then + InvalidateCheck(FHotIndex); + end; + inherited; +end; + +procedure TNewCheckListBox.MouseDown(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +var + Index: Integer; +begin + if Button = mbLeft then begin + Index := ItemAtPos(Point(X, Y), True); + if (Index <> -1) and CanFocusItem(Index) then + begin + if FWantTabs then begin + if not FSpaceDown then begin + if not MouseCapture then + MouseCapture := True; + FCaptureIndex := Index; + FLastMouseMoveIndex := Index; + InvalidateCheck(Index); + end; + end + else + Toggle(Index); + end; + end; + inherited; +end; + +procedure TNewCheckListBox.MouseUp(Button: TMouseButton; Shift: TShiftState; + X, Y: Integer); +var + Index: Integer; +begin + if (Button = mbLeft) and FWantTabs and not FSpaceDown and (FCaptureIndex >= 0) then + begin + Index := ItemAtPos(Point(X, Y), True); + EndCapture(Index <> FCaptureIndex); + if (FHotIndex <> -1) and (FThemeData <> 0) then + InvalidateCheck(FHotIndex); + end; +end; + +procedure TNewCheckListBox.UpdateHotIndex(NewHotIndex: Integer); +var + OldHotIndex: Integer; +begin + OldHotIndex := FHotIndex; + if NewHotIndex <> OldHotIndex then + begin + FHotIndex := NewHotIndex; + if FCaptureIndex = -1 then begin + if (OldHotIndex <> -1) and (FThemeData <> 0) then + InvalidateCheck(OldHotIndex); + if (NewHotIndex <> -1) and (FThemeData <> 0) then + InvalidateCheck(NewHotIndex); + end; + end; +end; + +procedure TNewCheckListBox.CMMouseLeave(var Message: TMessage); +begin + UpdateHotIndex(-1); + inherited; +end; + +procedure TNewCheckListBox.SetCaption(Index: Integer; const Value: String); +begin + { Changing an item's text actually involves deleting and re-inserting the + item. Increment FDisableItemStateDeletion so the item state isn't lost. } + Inc(FDisableItemStateDeletion); + try + Items[Index] := Value; + finally + Dec(FDisableItemStateDeletion); + end; +end; + +procedure TNewCheckListBox.SetChecked(Index: Integer; const AChecked: Boolean); +begin + if AChecked then + CheckItem(Index, coCheck) + else + CheckItem(Index, coUncheck); +end; + +function TNewCheckListBox.FindCheckedSibling(const AIndex: Integer): Integer; +{ Finds a checked sibling of AIndex (which is assumed to be a radio button). + Returns -1 if no checked sibling was found. } +var + ThisLevel, I: Integer; +begin + ThisLevel := ItemStates[AIndex].Level; + for I := AIndex-1 downto 0 do begin + if ItemStates[I].Level < ThisLevel then + Break; + if ItemStates[I].Level = ThisLevel then begin + if ItemStates[I].ItemType <> itRadio then + Break; + if GetState(I) <> cbUnchecked then begin + Result := I; + Exit; + end; + end; + end; + for I := AIndex+1 to Items.Count-1 do begin + if ItemStates[I].Level < ThisLevel then + Break; + if ItemStates[I].Level = ThisLevel then begin + if ItemStates[I].ItemType <> itRadio then + Break; + if GetState(I) <> cbUnchecked then begin + Result := I; + Exit; + end; + end; + end; + Result := -1; +end; + +function TNewCheckListBox.CheckItem(const Index: Integer; + const AOperation: TCheckItemOperation): Boolean; +{ Tries to update the checked state of Index. Returns True if any changes were + made to the state of Index or any of its children. } + + procedure SetItemState(const AIndex: Integer; const AState: TCheckBoxState); + begin + if ItemStates[AIndex].State <> AState then begin + ItemStates[AIndex].State := AState; + InvalidateCheck(AIndex); + { Notify MSAA of the state change } + if Assigned(NotifyWinEventFunc) then + NotifyWinEventFunc(EVENT_OBJECT_STATECHANGE, Handle, OBJID_CLIENT, + 1 + AIndex); + end; + end; + + function CalcState(const AIndex: Integer; ACheck: Boolean): TCheckBoxState; + { Determines new state for AIndex based on desired checked state (ACheck) and + current state of the item's immediate children. } + var + RootLevel, I: Integer; + HasChecked, HasUnchecked: Boolean; + begin + HasChecked := False; + HasUnchecked := False; + RootLevel := ItemStates[AIndex].Level; + for I := AIndex+1 to Items.Count-1 do begin + if ItemStates[I].Level <= RootLevel then + Break; + if (ItemStates[I].Level = RootLevel+1) and + (ItemStates[I].ItemType in [itCheck, itRadio]) then begin + case GetState(I) of + cbUnchecked: begin + if (ItemStates[I].ItemType <> itRadio) or + (FindCheckedSibling(I) = -1) then + HasUnchecked := True; + end; + cbChecked: begin + HasChecked := True; + end; + cbGrayed: begin + HasChecked := True; + HasUnchecked := True; + end; + end; + end; + end; + + { If the parent is a check box with children, don't allow it to be checked + if none of its children are checked, unless it "has internal children" } + if HasUnchecked and not HasChecked and + (ItemStates[AIndex].ItemType = itCheck) and + not ItemStates[AIndex].HasInternalChildren then + ACheck := False; + + if ACheck or HasChecked then begin + if HasUnchecked and (ItemStates[AIndex].ItemType = itCheck) then + Result := cbGrayed + else + Result := cbChecked; + end + else + Result := cbUnchecked; + end; + + function RecursiveCheck(const AIndex: Integer; + const AOperation: TCheckItemOperation): Boolean; + { Checks or unchecks AIndex and all enabled child items of AIndex at any + level. In radio button groups, only one item per group is checked. + Returns True if any of the items' states were changed. } + var + RootLevel, I: Integer; + NewState: TCheckBoxState; + begin + Result := False; + RootLevel := ItemStates[AIndex].Level; + for I := AIndex+1 to Items.Count-1 do begin + if ItemStates[I].Level <= RootLevel then + Break; + if (ItemStates[I].Level = RootLevel+1) and ItemStates[I].Enabled and + ((AOperation = coUncheck) or + ((AOperation = coCheckWithChildren) and ItemStates[I].CheckWhenParentChecked) or + (ItemStates[I].ItemType = itRadio)) then + { If checking and I is a radio button, don't recurse if a sibling + already got checked in a previous iteration of this loop. This is + needed in the following case to prevent all three radio buttons from + being checked when "Parent check" is checked. In addition, it + prevents "Child check" from being checked. + [ ] Parent check + ( ) Radio 1 + ( ) Radio 2 + ( ) Radio 3 + [ ] Child check + } + if (AOperation = coUncheck) or (ItemStates[I].ItemType <> itRadio) or + (FindCheckedSibling(I) = -1) then + if RecursiveCheck(I, AOperation) then + Result := True; + end; + NewState := CalcState(AIndex, AOperation <> coUncheck); + if GetState(AIndex) <> NewState then begin + SetItemState(AIndex, NewState); + Result := True; + end; + end; + + procedure UncheckSiblings(const AIndex: Integer); + { Unchecks all siblings (and their children) of AIndex, which is assumed to + be a radio button. } + var + I: Integer; + begin + while True do begin + I := FindCheckedSibling(AIndex); + if I = -1 then + Break; + RecursiveCheck(I, coUncheck); + end; + end; + + procedure EnsureChildRadioItemsHaveSelection(const AIndex: Integer); + { Ensures all radio button groups that are immediate children of AIndex have + a selected item. } + var + RootLevel, I: Integer; + begin + RootLevel := ItemStates[AIndex].Level; + for I := AIndex+1 to Items.Count-1 do begin + if ItemStates[I].Level <= RootLevel then + Break; + if (ItemStates[I].Level = RootLevel+1) and + (ItemStates[I].ItemType = itRadio) and + ItemStates[I].Enabled and + (GetState(I) <> cbChecked) and + (FindCheckedSibling(I) = -1) then + { Note: This uses coCheck instead of coCheckWithChildren (or the value + of AOperation) in order to keep side effects to a minimum. Seems + like the most logical behavior. For example, in this case: + [ ] A + ( ) B + [ ] C + [ ] D + clicking D will cause the radio button B to be checked (out of + necessity), but won't automatically check its child check box, C. + (If C were instead a radio button, it *would* be checked.) } + RecursiveCheck(I, coCheck); + end; + end; + + procedure UpdateParentStates(const AIndex: Integer); + var + I: Integer; + ChildChecked: Boolean; + NewState: TCheckBoxState; + begin + I := AIndex; + while True do begin + ChildChecked := (GetState(I) <> cbUnchecked); + + I := GetParentOf(I); + if I = -1 then + Break; + + { When a child item is checked, must ensure that all sibling radio button + groups have selections } + if ChildChecked then + EnsureChildRadioItemsHaveSelection(I); + + NewState := CalcState(I, GetState(I) <> cbUnchecked); + + { If a parent radio button is becoming checked, uncheck any previously + selected sibling of that radio button } + if (NewState <> cbUnchecked) and (ItemStates[I].ItemType = itRadio) then + UncheckSiblings(I); + + SetItemState(I, NewState); + end; + end; + +begin + if ItemStates[Index].ItemType = itRadio then begin + { Setting Checked to False on a radio button is a no-op. (A radio button + may only be unchecked by checking another radio button in the group, or + by unchecking a parent check box.) } + if AOperation = coUncheck then begin + Result := False; + Exit; + end; + { Before checking a new item in a radio group, uncheck any siblings and + their children } + UncheckSiblings(Index); + end; + + { Check or uncheck this item and all its children } + Result := RecursiveCheck(Index, AOperation); + + { Update state of parents. For example, if a child check box is being + checked, its parent must also become checked if it isn't already. } + UpdateParentStates(Index); +end; + +procedure TNewCheckListBox.SetFlat(Value: Boolean); +begin + if Value <> FFlat then + begin + FFlat := Value; + Invalidate; + end; +end; + +procedure TNewCheckListBox.SetItemEnabled(Index: Integer; const AEnabled: Boolean); +begin + if ItemStates[Index].Enabled <> AEnabled then + begin + ItemStates[Index].Enabled := AEnabled; + InvalidateCheck(Index); + end; +end; + +procedure TNewCheckListBox.SetObject(Index: Integer; const AObject: TObject); +begin + ItemStates[Index].Obj := AObject; +end; + +procedure TNewCheckListBox.SetOffset(AnOffset: Integer); +begin + if FOffset <> AnOffset then + begin + FOffset := AnOffset; + Invalidate; + end; +end; + +procedure TNewCheckListBox.SetShowLines(Value: Boolean); +begin + if FShowLines <> Value then + begin + FShowLines := Value; + Invalidate; + end; +end; + +procedure TNewCheckListBox.SetSubItem(Index: Integer; const ASubItem: String); +var + OldHeight, NewHeight: Integer; + R, R2: TRect; +begin + if ItemStates[Index].SubItem <> ASubItem then + begin + ItemStates[Index].SubItem := ASubItem; + OldHeight := SendMessage(Handle, LB_GETITEMHEIGHT, Index, 0); + NewHeight := RemeasureItem(Index); + R := ItemRect(Index); + { Scroll subsequent items down or up, if necessary } + if NewHeight <> OldHeight then begin + if Index >= TopIndex then begin + R2 := ClientRect; + R2.Top := R.Top + OldHeight; + if not IsRectEmpty(R2) then + ScrollWindowEx(Handle, 0, NewHeight - OldHeight, @R2, nil, 0, nil, + SW_INVALIDATE or SW_ERASE); + end; + UpdateScrollRange; + end; + InvalidateRect(Handle, @R, True); + end; +end; + +procedure TNewCheckListBox.Toggle(Index: Integer); +begin + case ItemStates[Index].ItemType of + itCheck: + case ItemStates[Index].State of + cbUnchecked: CheckItem(Index, coCheckWithChildren); + cbChecked: CheckItem(Index, coUncheck); + cbGrayed: + { First try checking, but if that doesn't work because of children + that are disabled and unchecked, try unchecking } + if not CheckItem(Index, coCheckWithChildren) then + CheckItem(Index, coUncheck); + end; + itRadio: CheckItem(Index, coCheckWithChildren); + end; + if Assigned(FOnClickCheck) then + FOnClickCheck(Self); +end; + +procedure TNewCheckListBox.UpdateThreads; + + function LastImmediateChildOf(Item: Integer): Integer; + var + L: Integer; + begin + Result := -1; + L := ItemLevel[Item] + 1; + Inc(Item); + while (Item < Items.Count) and (ItemLevel[Item] >= L) do + begin + if ItemLevel[Item] = L then + Result := Item; + Inc(Item); + end; + if Result >= 0 then + ItemStates[Result].IsLastChild := True; + end; +var + I, J, LastChild, L: Integer; +begin + for I := 0 to Items.Count - 1 do + begin + ItemStates[I].ThreadCache := []; + ItemStates[I].IsLastChild := False; + end; + for I := 0 to Items.Count - 1 do + begin + LastChild := LastImmediateChildOf(I); + L := ItemLevel[I]; + for J := I + 1 to LastChild do + Include(ItemStates[J].ThreadCache, L); + end; +end; + +procedure TNewCheckListBox.LBDeleteString(var Message: TMessage); +var + I: Integer; + ItemState: TItemState; +begin + inherited; + if FDisableItemStateDeletion = 0 then begin + I := Message.WParam; + if (I >= 0) and (I < FStateList.Count) then begin + ItemState := FStateList[I]; + FStateList.Delete(I); + ItemState.Free; + end; + end; +end; + +procedure TNewCheckListBox.LBResetContent(var Message: TMessage); +var + I: Integer; + ItemState: TItemState; +begin + inherited; + if FDisableItemStateDeletion = 0 then + for I := FStateList.Count-1 downto 0 do begin + ItemState := FStateList[I]; + FStateList.Delete(I); + ItemState.Free; + end; +end; + +procedure TNewCheckListBox.WMGetDlgCode(var Message: TWMGetDlgCode); +begin + inherited; + if FWantTabs then + Message.Result := Message.Result and not DLGC_WANTCHARS; +end; + +procedure TNewCheckListBox.WMKeyDown(var Message: TWMKeyDown); +var + GoForward, Arrows: Boolean; + I: Integer; + Prnt, Ctrl: TWinControl; +begin + { If space is pressed, avoid flickering -- exit now. } + if not FWantTabs or (Message.CharCode = VK_SPACE) then + begin + inherited; + Exit; + end; + Arrows := True; + case Message.CharCode of + VK_TAB: + begin + GoForward := GetKeyState(VK_SHIFT) >= 0; + Arrows := False + end; + VK_DOWN, VK_RIGHT: GoForward := True; + VK_UP, VK_LEFT: GoForward := False + else + if FSpaceDown then EndCapture(True); + inherited; + Exit; + end; + EndCapture(not FSpaceDown); + SendMessage(Handle, WM_CHANGEUISTATE, UIS_CLEAR or (UISF_HIDEFOCUS shl 16), 0); + if Arrows or TabStop then + I := FindNextItem(-2, GoForward, not Arrows) + else + I := -1; + if I < 0 then + begin + Prnt := nil; + if not Arrows then + Prnt := GetParentForm(Self); + if Prnt = nil then Prnt := Parent; + if Prnt <> nil then + begin + Ctrl := TWinControlAccess(Prnt).FindNextControl(Self, GoForward, True, Arrows); + if (Ctrl <> nil) and (Ctrl <> Self) then + begin + Ctrl.SetFocus; + Exit; + end; + end; + if GoForward then + I := FindNextItem(-1, True, not Arrows) + else + I := FindNextItem(Items.Count, False, not Arrows); + end; + ItemIndex := I; + if (I <> -1) and (ItemStates[I].ItemType = itRadio) and Arrows then + Toggle(I); +end; + +procedure TNewCheckListBox.WMMouseMove(var Message: TWMMouseMove); +var + Pos: TPoint; + Index, NewHotIndex: Integer; + Rect: TRect; + Indent: Integer; +begin + Pos := SmallPointToPoint(Message.Pos); + Index := ItemAtPos(Pos, True); + + if FCaptureIndex >= 0 then begin + if not FSpaceDown and (Index <> FLastMouseMoveIndex) then begin + if (FLastMouseMoveIndex = FCaptureIndex) or (Index = FCaptureIndex) then + InvalidateCheck(FCaptureIndex); + FLastMouseMoveIndex := Index; + end + end; + + NewHotIndex := -1; + if (Index <> -1) and CanFocusItem(Index) then + begin + Rect := ItemRect(Index); + Indent := (FOffset * 2 + FCheckWidth); + if FWantTabs or ((Pos.X >= Rect.Left + Indent * ItemLevel[Index]) and + (Pos.X < Rect.Left + Indent * (ItemLevel[Index] + 1))) then + NewHotIndex := Index; + end; + UpdateHotIndex(NewHotIndex); +end; + +procedure TNewCheckListBox.WMMouseWheel(var Message: TMessage); +const + WHEEL_DELTA = 120; +begin + { Work around a Windows bug (reproducible on 2000/XP/2003, but not Vista): + On an ownerdraw-variable list box, scrolling up or down more than one item + at a time with animation enabled causes a strange effect: first all visible + items appear to scroll off the bottom, then the items are all repainted in + the correct position. To avoid that, we implement our own mouse wheel + handling that scrolls only one item at a time. + (Note: The same problem exists when scrolling a page at a time using the + scroll bar. But because it's not as obvious, we don't work around it.) } + if (Lo(GetVersion) = 5) and + (Message.WParam and (MK_CONTROL or MK_SHIFT) = 0) then begin + Inc(FWheelAccum, Smallint(Message.WParam shr 16)); + if Abs(FWheelAccum) >= WHEEL_DELTA then begin + while FWheelAccum >= WHEEL_DELTA do begin + SendMessage(Handle, WM_VSCROLL, SB_LINEUP, 0); + Dec(FWheelAccum, WHEEL_DELTA); + end; + while FWheelAccum <= -WHEEL_DELTA do begin + SendMessage(Handle, WM_VSCROLL, SB_LINEDOWN, 0); + Inc(FWheelAccum, WHEEL_DELTA); + end; + SendMessage(Handle, WM_VSCROLL, SB_ENDSCROLL, 0); + end; + end + else + { Like the default handling, don't scroll if Control or Shift are down, + and on Vista always use the default handling since it isn't bugged. } + inherited; +end; + +procedure TNewCheckListBox.WMNCHitTest(var Message: TWMNCHitTest); +var + I: Integer; +begin + inherited; + if FWantTabs and not (csDesigning in ComponentState) then + begin + if Message.Result = HTCLIENT then + begin + I := ItemAtPos(ScreenToClient(SmallPointToPoint(Message.Pos)), True); + if (I < 0) or not CanFocusItem(I) then + begin + UpdateHotIndex(-1); + Message.Result := 12345; + Exit; + end; + end; + end; +end; + +procedure TNewCheckListBox.WMSetFocus(var Message: TWMSetFocus); +begin + FWheelAccum := 0; + inherited; +end; + +procedure TNewCheckListBox.WMSize(var Message: TWMSize); +var + I: Integer; +begin + inherited; + { When the scroll bar appears/disappears, the client width changes and we + must recalculate the height of the items } + for I := Items.Count-1 downto 0 do + RemeasureItem(I); + UpdateScrollRange; +end; + +procedure TNewCheckListBox.WMThemeChanged(var Message: TMessage); +begin + { Don't Run to Cursor into this function, it will interrupt up the theme change } + UpdateThemeData(True, True); + inherited; +end; + +procedure TNewCheckListBox.WMUpdateUIState(var Message: TMessage); +begin + Invalidate; + inherited; +end; + +procedure TNewCheckListBox.WMGetObject(var Message: TMessage); +begin + if (Message.LParam = Integer(OBJID_CLIENT)) and InitializeOleAcc then begin + if FAccObjectInstance = nil then begin + try + FAccObjectInstance := TAccObject.Create(Self); + except + inherited; + Exit; + end; + end; + Message.Result := LresultFromObjectFunc(IID_IAccessible, Message.WParam, + TAccObject(FAccObjectInstance)); + end + else + inherited; +end; + +{ TAccObject } + +constructor TAccObject.Create(AControl: TNewCheckListBox); +begin + inherited Create; + if CreateStdAccessibleObjectFunc(AControl.Handle, Integer(OBJID_CLIENT), + IID_IAccessible, Pointer(FStdAcc)) <> S_OK then begin + { Note: The user will never actually see this message since the call to + TAccObject.Create in TNewCheckListBox.WMGetObject is protected by a + try..except. } + raise Exception.Create('CreateStdAccessibleObject failed'); + end; + FControl := AControl; +end; + +destructor TAccObject.Destroy; +begin + { If FControl is assigned, then we are being destroyed before the control -- + the usual case. Clear FControl's reference to us. } + if Assigned(FControl) then begin + FControl.FAccObjectInstance := nil; + FControl := nil; + end; + if Assigned(FStdAcc) then + FStdAcc.Release; + inherited; +end; + +procedure TAccObject.ControlDestroying; +begin + { Set FControl to nil, since it's no longer valid } + FControl := nil; + { Take this opportunity to disconnect remote clients, i.e. don't allow them + to call us anymore. This prevents invalid memory accesses if this unit's + code is in a DLL, and the application subsequently unloads the DLL while + remote clients still hold (and are using) references to this TAccObject. } + CoDisconnectObject(Self, 0); + { NOTE: Don't access Self in any way at this point. The CoDisconnectObject + call likely caused all references to be relinquished and Self to be + destroyed. } +end; + +function TAccObject.QueryInterface(const iid: TIID; var obj): HRESULT; +begin + if IsEqualIID(iid, IID_IUnknown) or + IsEqualIID(iid, IID_IDispatch) or + IsEqualIID(iid, IID_IAccessible) then begin + Pointer(obj) := Self; + AddRef; + Result := S_OK; + end + else begin + Pointer(obj) := nil; + Result := E_NOINTERFACE; + end; +end; + +function TAccObject.AddRef: Longint; +begin + Inc(FRefCount); + Result := FRefCount; +end; + +function TAccObject.Release: Longint; +begin + Dec(FRefCount); + Result := FRefCount; + if Result = 0 then + Destroy; +end; + +function TAccObject.GetTypeInfoCount(var ctinfo: Integer): HRESULT; +begin + Result := E_NOTIMPL; +end; + +function TAccObject.GetTypeInfo(itinfo: Integer; lcid: TLCID; var tinfo: ITypeInfo): HRESULT; +begin + Result := E_NOTIMPL; +end; + +function TAccObject.GetIDsOfNames(const iid: TIID; rgszNames: POleStrList; + cNames: Integer; lcid: TLCID; rgdispid: PDispIDList): HRESULT; +begin + Result := E_NOTIMPL; +end; + +function TAccObject.Invoke(dispIDMember: TDispID; const iid: TIID; lcid: TLCID; + flags: Word; var dispParams: TDispParams; varResult: PVariant; + excepInfo: PExcepInfo; argErr: PInteger): HRESULT; +begin + Result := E_NOTIMPL; +end; + +function TAccObject.accDoDefaultAction(varChild: NewOleVariant): HRESULT; +begin + { A list box's default action is Double Click, which is useless for a + list of check boxes. } + Result := DISP_E_MEMBERNOTFOUND; +end; + +function TAccObject.accHitTest(xLeft, yTop: Integer; + var pvarID: NewOleVariant): HRESULT; +begin + Result := FStdAcc.accHitTest(xLeft, yTop, pvarID); +end; + +function TAccObject.accLocation(var pxLeft, pyTop, pcxWidth, + pcyHeight: Integer; varChild: NewOleVariant): HRESULT; +begin + Result := FStdAcc.accLocation(pxLeft, pyTop, pcxWidth, pcyHeight, varChild); +end; + +function TAccObject.accNavigate(navDir: Integer; varStart: NewOleVariant; + var pvarEnd: NewOleVariant): HRESULT; +begin + Result := FStdAcc.accNavigate(navDir, varStart, pvarEnd); +end; + +function TAccObject.accSelect(flagsSelect: Integer; + varChild: NewOleVariant): HRESULT; +begin + Result := FStdAcc.accSelect(flagsSelect, varChild); +end; + +function TAccObject.get_accChild(varChild: NewOleVariant; + var ppdispChild: IDispatch): HRESULT; +begin + Result := FStdAcc.get_accChild(varChild, ppdispChild); +end; + +function TAccObject.get_accChildCount(var pcountChildren: Integer): HRESULT; +begin + Result := FStdAcc.get_accChildCount(pcountChildren); +end; + +function TAccObject.get_accDefaultAction(varChild: NewOleVariant; + var pszDefaultAction: NewWideString): HRESULT; +begin + { A list box's default action is Double Click, which is useless for a + list of check boxes. } + pszDefaultAction := nil; + Result := S_FALSE; +end; + +function TAccObject.get_accDescription(varChild: NewOleVariant; + var pszDescription: NewWideString): HRESULT; +begin + Result := FStdAcc.get_accDescription(varChild, pszDescription); +end; + +function TAccObject.get_accFocus(var pvarID: NewOleVariant): HRESULT; +begin + Result := FStdAcc.get_accFocus(pvarID); +end; + +function TAccObject.get_accHelp(varChild: NewOleVariant; + var pszHelp: NewWideString): HRESULT; +begin + Result := FStdAcc.get_accHelp(varChild, pszHelp); +end; + +function TAccObject.get_accHelpTopic(var pszHelpFile: NewWideString; + varChild: NewOleVariant; var pidTopic: Integer): HRESULT; +begin + Result := FStdAcc.get_accHelpTopic(pszHelpFile, varChild, pidTopic); +end; + +function TAccObject.get_accKeyboardShortcut(varChild: NewOleVariant; + var pszKeyboardShortcut: NewWideString): HRESULT; +begin + Result := FStdAcc.get_accKeyboardShortcut(varChild, pszKeyboardShortcut); +end; + +function TAccObject.get_accName(varChild: NewOleVariant; + var pszName: NewWideString): HRESULT; +begin + Result := FStdAcc.get_accName(varChild, pszName); +end; + +function TAccObject.get_accParent(var ppdispParent: IDispatch): HRESULT; +begin + Result := FStdAcc.get_accParent(ppdispParent); +end; + +function TAccObject.get_accRole(varChild: NewOleVariant; + var pvarRole: NewOleVariant): HRESULT; +begin + pvarRole.vt := VT_EMPTY; + if FControl = nil then begin + Result := E_FAIL; + Exit; + end; + if varChild.vt <> VT_I4 then begin + Result := E_INVALIDARG; + Exit; + end; + if varChild.lVal = CHILDID_SELF then begin + pvarRole.lVal := ROLE_SYSTEM_OUTLINE; + pvarRole.vt := VT_I4; + Result := S_OK; + end + else begin + try + case FControl.ItemStates[varChild.lVal-1].ItemType of + itCheck: pvarRole.lVal := ROLE_SYSTEM_CHECKBUTTON; + itRadio: pvarRole.lVal := ROLE_SYSTEM_RADIOBUTTON; + else + pvarRole.lVal := ROLE_SYSTEM_STATICTEXT; + end; + pvarRole.vt := VT_I4; + Result := S_OK; + except + Result := E_INVALIDARG; + end; + end; +end; + +function TAccObject.get_accSelection(var pvarChildren: NewOleVariant): HRESULT; +begin + Result := FStdAcc.get_accSelection(pvarChildren); +end; + +function TAccObject.get_accState(varChild: NewOleVariant; + var pvarState: NewOleVariant): HRESULT; +var + ItemState: TItemState; +begin + Result := FStdAcc.get_accState(varChild, pvarState); + try + if (Result = S_OK) and (varChild.vt = VT_I4) and + (varChild.lVal <> CHILDID_SELF) and (pvarState.vt = VT_I4) and + Assigned(FControl) then begin + ItemState := FControl.ItemStates[varChild.lVal-1]; + case ItemState.State of + cbChecked: pvarState.lVal := pvarState.lVal or STATE_SYSTEM_CHECKED; + cbGrayed: pvarState.lVal := pvarState.lVal or STATE_SYSTEM_MIXED; + end; + if not ItemState.Enabled then + pvarState.lVal := pvarState.lVal or STATE_SYSTEM_UNAVAILABLE; + end; + except + Result := E_INVALIDARG; + end; +end; + +function TAccObject.get_accValue(varChild: NewOleVariant; + var pszValue: NewWideString): HRESULT; +begin + pszValue := nil; + if FControl = nil then begin + Result := E_FAIL; + Exit; + end; + if varChild.vt <> VT_I4 then begin + Result := E_INVALIDARG; + Exit; + end; + if varChild.lVal = CHILDID_SELF then + Result := S_FALSE + else begin + { Return the level as the value, like standard tree view controls do. + Not sure if any screen readers will actually use this, seeing as we + aren't a real tree view control. } + try + pszValue := StringToOleStr(IntToStr(FControl.ItemStates[varChild.lVal-1].Level)); + Result := S_OK; + except + Result := E_INVALIDARG; + end; + end; +end; + +function TAccObject.put_accName(varChild: NewOleVariant; + const pszName: NewWideString): HRESULT; +begin + Result := S_FALSE; +end; + +function TAccObject.put_accValue(varChild: NewOleVariant; + const pszValue: NewWideString): HRESULT; +begin + Result := S_FALSE; +end; + + +procedure Register; +begin + RegisterComponents('JR', [TNewCheckListBox]); +end; + +procedure InitCanQueryUIState; +var + OSVersionInfo: TOSVersionInfo; +begin + CanQueryUIState := False; + if Win32Platform = VER_PLATFORM_WIN32_NT then begin + OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo); + if GetVersionEx(OSVersionInfo) then + CanQueryUIState := OSVersionInfo.dwMajorVersion >= 5; + end; +end; + +{ Note: This COM initialization code based on code from DBTables } +var + SaveInitProc: Pointer; + NeedToUninitialize: Boolean; + +procedure InitCOM; +begin + if SaveInitProc <> nil then TProcedure(SaveInitProc); + NeedToUninitialize := SUCCEEDED(CoInitialize(nil)); +end; + +initialization + if not IsLibrary then begin + SaveInitProc := InitProc; + InitProc := @InitCOM; + end; + InitCanQueryUIState; + InitThemeLibrary; + NotifyWinEventFunc := GetProcAddress(GetModuleHandle(user32), 'NotifyWinEvent'); +finalization + if NeedToUninitialize then + CoUninitialize; +end. diff --git a/Components/NewNotebook.pas b/Components/NewNotebook.pas new file mode 100644 index 000000000..5333a3dee --- /dev/null +++ b/Components/NewNotebook.pas @@ -0,0 +1,332 @@ +unit NewNotebook; + +{ + Inno Setup + Copyright (C) 1997-2008 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TNewNotebook component + + $jrsoftware: issrc/Components/NewNotebook.pas,v 1.4 2008/10/08 23:23:02 jr Exp $ +} + +{$IFDEF VER90} + {$DEFINE DELPHI2} +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms; + +type + TNewNotebookPage = class; + + TNewNotebook = class(TWinControl) + private + FActivePage: TNewNotebookPage; + FPages: TList; + function GetPage(Index: Integer): TNewNotebookPage; + function GetPageCount: Integer; + procedure InsertPage(Page: TNewNotebookPage); + procedure RemovePage(Page: TNewNotebookPage); + procedure SetActivePage(Page: TNewNotebookPage); + protected + procedure AlignControls(AControl: TControl; var Rect: TRect); override; + procedure CreateParams(var Params: TCreateParams); override; + procedure ShowControl(AControl: TControl); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function FindNextPage(CurPage: TNewNotebookPage; GoForward: Boolean): TNewNotebookPage; + procedure GetChildren(Proc: TGetChildProc {$IFNDEF DELPHI2} ; + Root: TComponent {$ENDIF}); override; + property PageCount: Integer read GetPageCount; + property Pages[Index: Integer]: TNewNotebookPage read GetPage; + published + property ActivePage: TNewNotebookPage read FActivePage write SetActivePage; + property Align; + property Color; + property DragCursor; + property DragMode; + property Enabled; + property Font; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + end; + + TNewNotebookPage = class(TCustomControl) + private + FNotebook: TNewNotebook; + function GetPageIndex: Integer; + procedure SetNotebook(ANotebook: TNewNotebook); + procedure SetPageIndex(Value: Integer); + protected + procedure Paint; override; + procedure ReadState(Reader: TReader); override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + property Notebook: TNewNotebook read FNotebook write SetNotebook; + published + property Color nodefault; { nodefault needed for Color=clWindow to persist } + property DragMode; + property Enabled; + property Font; + property Height stored False; + property Left stored False; + property PageIndex: Integer read GetPageIndex write SetPageIndex stored False; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowHint; + property Top stored False; + property Visible stored False; + property Width stored False; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + end; + +implementation + +{ TNewNotebookPage } + +constructor TNewNotebookPage.Create(AOwner: TComponent); +begin + inherited; + Align := alClient; + ControlStyle := ControlStyle + [csAcceptsControls, csNoDesignVisible]; + Visible := False; +end; + +destructor TNewNotebookPage.Destroy; +begin + if Assigned(FNotebook) then + FNotebook.RemovePage(Self); + inherited; +end; + +function TNewNotebookPage.GetPageIndex: Integer; +begin + if Assigned(FNotebook) then + Result := FNotebook.FPages.IndexOf(Self) + else + Result := -1; +end; + +procedure TNewNotebookPage.Paint; +begin + inherited; + if csDesigning in ComponentState then begin + Canvas.Pen.Style := psDash; + Canvas.Brush.Style := bsClear; + Canvas.Rectangle(0, 0, Width, Height); + end; +end; + +procedure TNewNotebookPage.ReadState(Reader: TReader); +begin + inherited; + if Reader.Parent is TNewNotebook then + Notebook := TNewNotebook(Reader.Parent); +end; + +procedure TNewNotebookPage.SetNotebook(ANotebook: TNewNotebook); +begin + if FNotebook <> ANotebook then begin + if Assigned(FNotebook) then + FNotebook.RemovePage(Self); + Parent := ANotebook; + if Assigned(ANotebook) then + ANotebook.InsertPage(Self); + end; +end; + +procedure TNewNotebookPage.SetPageIndex(Value: Integer); +begin + if Assigned(FNotebook) then begin + if Value >= FNotebook.FPages.Count then + Value := FNotebook.FPages.Count-1; + if Value < 0 then + Value := 0; + FNotebook.FPages.Move(PageIndex, Value); + end; +end; + +{ TNewNotebook } + +constructor TNewNotebook.Create(AOwner: TComponent); +begin + inherited; + Width := 150; + Height := 150; + FPages := TList.Create; +end; + +destructor TNewNotebook.Destroy; +var + I: Integer; +begin + if Assigned(FPages) then begin + for I := 0 to FPages.Count-1 do + TNewNotebookPage(FPages[I]).FNotebook := nil; + FPages.Free; + end; + inherited; +end; + +procedure TNewNotebook.AlignControls(AControl: TControl; var Rect: TRect); +var + I: Integer; + Ctl: TControl; +begin + inherited; + { The default AlignControls implementation in Delphi 2 and 3 doesn't set + the size of invisible controls. Pages that aren't currently visible must + have valid sizes for BidiUtils' FlipControls to work properly. + Note: We loop through Controls and not FPages here because + TNewNotebookPage.SetNotebook sets Parent (causing AlignControls to be + called) before it calls InsertPage. } + if not IsRectEmpty(Rect) then begin + for I := 0 to ControlCount-1 do begin + Ctl := Controls[I]; + if (Ctl is TNewNotebookPage) and not Ctl.Visible then + Ctl.BoundsRect := Rect; + end; + end; +end; + +procedure TNewNotebook.CreateParams(var Params: TCreateParams); +begin + inherited; + Params.Style := Params.Style or WS_CLIPCHILDREN; +end; + +function TNewNotebook.FindNextPage(CurPage: TNewNotebookPage; + GoForward: Boolean): TNewNotebookPage; +var + I, StartIndex: Integer; +begin + if FPages.Count > 0 then begin + StartIndex := FPages.IndexOf(CurPage); + if StartIndex = -1 then begin + if GoForward then + StartIndex := FPages.Count-1 + else + StartIndex := 0; + end; + I := StartIndex; + repeat + if GoForward then begin + Inc(I); + if I = FPages.Count then + I := 0; + end + else begin + if I = 0 then + I := FPages.Count; + Dec(I); + end; + Result := FPages[I]; + Exit; + until I = StartIndex; + end; + Result := nil; +end; + +procedure TNewNotebook.GetChildren(Proc: TGetChildProc {$IFNDEF DELPHI2} ; + Root: TComponent {$ENDIF}); +var + I: Integer; +begin + for I := 0 to FPages.Count-1 do + Proc(TNewNotebookPage(FPages[I])); +end; + +function TNewNotebook.GetPage(Index: Integer): TNewNotebookPage; +begin + Result := FPages[Index]; +end; + +function TNewNotebook.GetPageCount: Integer; +begin + Result := FPages.Count; +end; + +procedure TNewNotebook.InsertPage(Page: TNewNotebookPage); +begin + FPages.Add(Page); + Page.FNotebook := Self; +end; + +procedure TNewNotebook.RemovePage(Page: TNewNotebookPage); +begin + Page.FNotebook := nil; + FPages.Remove(Page); + if FActivePage = Page then + SetActivePage(nil); +end; + +procedure TNewNotebook.ShowControl(AControl: TControl); +begin + if (AControl is TNewNotebookPage) and (TNewNotebookPage(AControl).FNotebook = Self) then + SetActivePage(TNewNotebookPage(AControl)); + inherited; +end; + +procedure TNewNotebook.SetActivePage(Page: TNewNotebookPage); +var + ParentForm: {$IFDEF DELPHI2} TForm {$ELSE} TCustomForm {$ENDIF}; +begin + if Assigned(Page) and (Page.FNotebook <> Self) then + Exit; + if FActivePage <> Page then begin + ParentForm := GetParentForm(Self); + if Assigned(ParentForm) and Assigned(FActivePage) and + FActivePage.ContainsControl(ParentForm.ActiveControl) then + ParentForm.ActiveControl := FActivePage; + if Assigned(Page) then begin + Page.BringToFront; + Page.Visible := True; + if Assigned(ParentForm) and Assigned(FActivePage) and + (ParentForm.ActiveControl = FActivePage) then begin + if Page.CanFocus then + ParentForm.ActiveControl := Page + else + ParentForm.ActiveControl := Self; + end; + end; + if Assigned(FActivePage) then + FActivePage.Visible := False; + FActivePage := Page; + if Assigned(ParentForm) and Assigned(FActivePage) and + (ParentForm.ActiveControl = FActivePage) then + FActivePage.SelectFirst; + end; +end; + +end. diff --git a/Components/NewNotebookReg.pas b/Components/NewNotebookReg.pas new file mode 100644 index 000000000..bc000da39 --- /dev/null +++ b/Components/NewNotebookReg.pas @@ -0,0 +1,127 @@ +unit NewNotebookReg; + +{ + Inno Setup + Copyright (C) 1997-2005 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TNewNotebook design-time registration + + $jrsoftware: issrc/Components/NewNotebookReg.pas,v 1.3 2005/10/11 18:23:37 jr Exp $ +} + +interface + +uses + Classes; + +procedure Register; + +implementation + +{$IFNDEF VER80} { if it's not Delphi 1.0 } + {$IFNDEF VER90} { if it's not Delphi 2.0 } + {$IFNDEF VER93} { and it's not C++Builder 1.0 } + {$IFNDEF VER100} { if it's not Delphi 3.0 } + {$IFNDEF VER110} { and it's not C++Builder 3.0 } + {$IFNDEF VER120} {$IFNDEF VER125} { if it's not Delphi 4 or C++Builder 4 } + {$IFNDEF VER130} { if it's not Delphi 5 or C++Builder 5 } + {$DEFINE IS_D6} { then it must be at least Delphi 6 or C++Builder 6 } + {$ENDIF} + {$ENDIF} {$ENDIF} + {$ENDIF} + {$ENDIF} + {$ENDIF} + {$ENDIF} +{$ENDIF} + +uses + NewNotebook, + {$IFNDEF IS_D6} DsgnIntf {$ELSE} DesignIntf, DesignEditors {$ENDIF}; + +{ TNewNotebookEditor } + +type + TNewNotebookEditor = class(TComponentEditor) + public + procedure Edit; override; + procedure ExecuteVerb(Index: Integer); override; + function GetVerb(Index: Integer): String; override; + function GetVerbCount: Integer; override; + end; + +procedure TNewNotebookEditor.Edit; +var + Notebook: TNewNotebook; +begin + { When a page is double-clicked, select the parent notebook } + if Component is TNewNotebookPage then begin + Notebook := TNewNotebookPage(Component).Notebook; + if Assigned(Notebook) then + Designer.SelectComponent(Notebook); + end +end; + +procedure TNewNotebookEditor.ExecuteVerb(Index: Integer); +var + Notebook: TNewNotebook; + Page: TNewNotebookPage; +begin + { Find the notebook component to operate on. Note that this same editor class + is used for both TNewNotebook and TNewNotebookPage. } + if Component is TNewNotebookPage then begin + Notebook := TNewNotebookPage(Component).Notebook; + if Notebook = nil then + Exit; { just in case } + end + else + Notebook := Component as TNewNotebook; + + case Index of + 0, 1: + begin + Page := Notebook.FindNextPage(Notebook.ActivePage, Index = 0); + Notebook.ActivePage := Page; + Designer.Modified; + Designer.SelectComponent(Page); + end; + 3: + begin + Page := TNewNotebookPage.Create(Notebook.Owner); + Page.Name := Designer.UniqueName(Page.ClassName); + Page.Notebook := Notebook; + Notebook.ActivePage := Page; + Designer.Modified; + Designer.SelectComponent(Page); + end; + end; +end; + +function TNewNotebookEditor.GetVerbCount: Integer; +begin + Result := 4; +end; + +function TNewNotebookEditor.GetVerb(Index: Integer): String; +begin + case Index of + 0: Result := 'Next Page'; + 1: Result := 'Previous Page'; + 2: Result := '-'; + 3: Result := 'New Page'; + else + Result := ''; + end; +end; + +procedure Register; +begin + RegisterComponents('JR', [TNewNotebook]); + RegisterClass(TNewNotebookPage); + + RegisterComponentEditor(TNewNotebook, TNewNotebookEditor); + RegisterComponentEditor(TNewNotebookPage, TNewNotebookEditor); +end; + +end. diff --git a/Components/NewProgressBar.pas b/Components/NewProgressBar.pas new file mode 100644 index 000000000..d21fe6681 --- /dev/null +++ b/Components/NewProgressBar.pas @@ -0,0 +1,171 @@ +unit NewProgressBar; + +{ + Inno Setup + Copyright (C) 1997-2006 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TNewProgressBar component - a smooth TProgressBar for Delphi 2 and a 32 bit + TProgressBar for Delphi 2 and all platforms + + Note: themed Vista and newer animate progress bars and don't immediately show changes. + This applies both to Position and State. For example if you set State while the + progress bar is still moving towards a new Position, the new State doesnt show until + the moving animation has finished. + + $jrsoftware: issrc/Components/NewProgressBar.pas,v 1.10 2010/10/27 09:45:06 mlaan Exp $ +} + +interface + +uses + Messages, Classes, Controls, ComCtrls; + +type + TNewProgressBarState = (npbsNormal, npbsError, npbsPaused); + + TNewProgressBarStyle = (npbstNormal, npbstMarquee); + + TNewProgressBar = class(TWinControl) + private + FMin: LongInt; + FMax: LongInt; + FPosition: LongInt; + FState: TNewProgressBarState; + FStyle: TNewProgressBarStyle; + procedure SetMin(Value: LongInt); + procedure SetMax(Value: LongInt); + procedure SetPosition(Value: LongInt); + procedure SetState(Value: TNewProgressBarState); + procedure SetStyle(Value: TNewProgressBarStyle); + procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND; + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + public + constructor Create(AOwner: TComponent); override; + published + property Min: LongInt read FMin write SetMin; + property Max: LongInt read FMax write SetMax; + property Position: LongInt read FPosition write SetPosition default 0; + property State: TNewProgressBarState read FState write SetState default npbsNormal; + property Style: TNewProgressBarStyle read FStyle write SetStyle default npbstMarquee; + end; + +procedure Register; + +implementation + +uses + Windows, CommCtrl; + +var + XP, Vista: Boolean; + +procedure Register; +begin + RegisterComponents('JR', [TNewProgressBar]); +end; + +constructor TNewProgressBar.Create(AOwner: TComponent); +begin + inherited; + Width := 150; + Height := GetSystemMetrics(SM_CYVSCROLL); + FMin := 0; + FMax := 100; +end; + +procedure TNewProgressBar.CreateParams(var Params: TCreateParams); +const + PBS_SMOOTH = 1; + PBS_MARQUEE = 8; +begin + InitCommonControls; + inherited; + CreateSubClass(Params, PROGRESS_CLASS); + Params.Style := Params.Style or PBS_SMOOTH; + if XP and (Style = npbstMarquee) then + Params.Style := Params.Style or PBS_MARQUEE; +end; + +procedure TNewProgressBar.CreateWnd; +const + PBM_SETMARQUEE = WM_USER+10; +begin + inherited CreateWnd; + SendMessage(Handle, PBM_SETRANGE, 0, MAKELPARAM(0, 65535)); + SetPosition(FPosition); + SetState(FState); + if XP then + SendMessage(Handle, PBM_SETMARQUEE, WPARAM(FStyle = npbstMarquee), 0); +end; + +procedure TNewProgressBar.SetMin(Value: LongInt); +begin + FMin := Value; + SetPosition(FPosition); +end; + +procedure TNewProgressBar.SetMax(Value: LongInt); +begin + FMax := Value; + SetPosition(FPosition); +end; + +procedure TNewProgressBar.SetPosition(Value: LongInt); +begin + if Value < FMin then + Value := FMin + else if Value > FMax then + Value := FMax; + FPosition := Value; + if HandleAllocated and (FStyle <> npbstMarquee) then + SendMessage(Handle, PBM_SETPOS, MulDiv(Value - FMin, 65535, FMax - FMin), 0); +end; + +procedure TNewProgressBar.SetState(Value: TNewProgressBarState); +const + PBST_NORMAL = $0001; + PBST_ERROR = $0002; + PBST_PAUSED = $0003; + PBM_SETSTATE = WM_USER+16; + States: array[TNewProgressBarState] of UINT = (PBST_NORMAL, PBST_ERROR, PBST_PAUSED); +begin + if Vista then begin + FState := Value; + if HandleAllocated then + SendMessage(Handle, PBM_SETSTATE, States[Value], 0); + end; +end; + +procedure TNewProgressBar.SetStyle(Value: TNewProgressBarStyle); +begin + if XP and (FStyle <> Value) then begin + FStyle := Value; + RecreateWnd; + end; +end; + +procedure TNewProgressBar.WMEraseBkgnd(var Message: TWMEraseBkgnd); +begin + { Bypass TWinControl's default WM_ERASEBKGND handling. + On Windows Vista with COMCTL32 v6, a WM_ERASEBKGND message is sent every + time a progress bar's position changes. TWinControl.WMEraseBkgnd does a + FillRect on the whole client area, which results in ugly flickering. + Previous versions of Windows only sent a WM_ERASEBKGND message when a + progress bar moved backwards, so flickering was rarely apparent. } + DefaultHandler(Message); +end; + +var + OSVersionInfo: TOSVersionInfo; + +initialization + OSVersionInfo.dwOSVersionInfoSize := SizeOf(OSVersionInfo); + if GetVersionEx(OSVersionInfo) then begin + Vista := OSVersionInfo.dwMajorVersion >= 6; + XP := Vista or ((OSVersionInfo.dwMajorVersion = 5) and (OSVersionInfo.dwMinorVersion >= 1)); + end; +end. diff --git a/Components/NewStaticText.pas b/Components/NewStaticText.pas new file mode 100644 index 000000000..86f444657 --- /dev/null +++ b/Components/NewStaticText.pas @@ -0,0 +1,330 @@ +unit NewStaticText; + +{ + TNewStaticText - similar to TStaticText on D3+ but with multi-line AutoSize + support and a WordWrap property + + $jrsoftware: issrc/Components/NewStaticText.pas,v 1.7 2009/03/20 22:48:54 mlaan Exp $ +} + +interface + +{$I VERSION.INC} + +uses + Windows, Messages, SysUtils, Classes, Controls, Forms; + +type + TNewStaticText = class(TWinControl) + private + FAutoSize: Boolean; + FFocusControl: TWinControl; + FForceLTRReading: Boolean; + FLastAdjustBoundsRTL: Boolean; + FShowAccelChar: Boolean; + FWordWrap: Boolean; + procedure CMDialogChar(var Message: TCMDialogChar); message CM_DIALOGCHAR; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMParentFontChanged(var Message: TMessage); message CM_PARENTFONTCHANGED; + procedure CMTextChanged(var Message: TMessage); message CM_TEXTCHANGED; + procedure AdjustBounds; + function CalcBounds: TPoint; + function GetDrawTextFlags: UINT; + procedure SetFocusControl(Value: TWinControl); + procedure SetForceLTRReading(Value: Boolean); + procedure SetShowAccelChar(Value: Boolean); + procedure SetWordWrap(Value: Boolean); + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure Loaded; override; + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure SetAutoSize(Value: Boolean); {$IFDEF IS_D6}override;{$ENDIF} + public + constructor Create(AOwner: TComponent); override; + function AdjustHeight: Integer; + published + property Align; + property AutoSize: Boolean read FAutoSize write SetAutoSize default True; + property Caption; + property Color; + property DragCursor; + property DragMode; + property Enabled; + property FocusControl: TWinControl read FFocusControl write SetFocusControl; + property Font; + property ForceLTRReading: Boolean read FForceLTRReading write SetForceLTRReading + default False; + property ParentColor; + property ParentFont; + property ParentShowHint; + property PopupMenu; + property ShowAccelChar: Boolean read FShowAccelChar write SetShowAccelChar + default True; + property ShowHint; + property TabOrder; + property TabStop; + property Visible; + property WordWrap: Boolean read FWordWrap write SetWordWrap default False; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + end; + +procedure Register; + +implementation + +uses + BidiUtils; + +procedure Register; +begin + RegisterComponents('JR', [TNewStaticText]); +end; + +procedure DrawTextACP(const DC: HDC; const S: String; var R: TRect; + const AFormat: UINT); +{ Draws an ANSI string using the system's code page (CP_ACP), unlike DrawTextA + which uses the code page defined by the selected font. } +{$IFDEF UNICODE} +begin + DrawText(DC, PChar(S), Length(S), R, AFormat); +end; +{$ELSE} +var + SLen, WideLen: Integer; + WideStr: PWideChar; +begin + SLen := Length(S); + if SLen = 0 then + Exit; + if Win32Platform = VER_PLATFORM_WIN32_NT then begin + if SLen > High(Integer) div SizeOf(WideChar) then + Exit; + GetMem(WideStr, SLen * SizeOf(WideChar)); + try + WideLen := MultiByteToWideChar(CP_ACP, 0, PChar(S), SLen, WideStr, SLen); + DrawTextW(DC, WideStr, WideLen, R, AFormat); + finally + FreeMem(WideStr); + end; + end + else + DrawText(DC, PChar(S), SLen, R, AFormat); +end; +{$ENDIF} + +{ TNewStaticText } + +constructor TNewStaticText.Create(AOwner: TComponent); +begin + inherited Create(AOwner); + ControlStyle := [csCaptureMouse, csClickEvents, csSetCaption, + csOpaque, csReplicatable, csDoubleClicks]; + Width := 65; + Height := 17; + FAutoSize := True; + FShowAccelChar := True; + AdjustBounds; +end; + +procedure TNewStaticText.CreateParams(var Params: TCreateParams); +begin + inherited CreateParams(Params); + CreateSubClass(Params, 'STATIC'); + with Params do + begin + Style := Style or SS_NOTIFY; + if not SetBiDiStyles(Self, Params) then begin + { Quirk: No style is set for WordWrap=False in RTL mode; WS_EX_RIGHT + overrides SS_LEFTNOWORDWRAP, and there is no SS_RIGHTNOWORDWRAP style. + WordWrap=False still affects AdjustBounds, though. } + if not FWordWrap then Style := Style or SS_LEFTNOWORDWRAP; + end; + if not FShowAccelChar then Style := Style or SS_NOPREFIX; + if FForceLTRReading then ExStyle := ExStyle and not WS_EX_RTLREADING; + end; +end; + +procedure TNewStaticText.CMDialogChar(var Message: TCMDialogChar); +begin + if (FFocusControl <> nil) and Enabled and ShowAccelChar and + IsAccel(Message.CharCode, Caption) then + with FFocusControl do + if CanFocus then + begin + SetFocus; + Message.Result := 1; + end; +end; + +procedure TNewStaticText.CMFontChanged(var Message: TMessage); +begin + inherited; + AdjustBounds; +end; + +procedure TNewStaticText.CMParentFontChanged(var Message: TMessage); +begin + inherited; + { What we're really trapping here is changes to Parent. Recalculate size + if the new Parent's RTL setting is different. } + if IsParentRightToLeft(Self) <> FLastAdjustBoundsRTL then + AdjustBounds; +end; + +procedure TNewStaticText.CMTextChanged(var Message: TMessage); +begin + inherited; + Invalidate; + AdjustBounds; +end; + +procedure TNewStaticText.Loaded; +begin + inherited Loaded; + AdjustBounds; +end; + +function TNewStaticText.GetDrawTextFlags: UINT; +begin + Result := DT_EXPANDTABS or DT_NOCLIP; + if FWordWrap then Result := Result or DT_WORDBREAK; + if not FShowAccelChar then Result := Result or DT_NOPREFIX; + if IsParentRightToLeft(Self) then begin + { Note: DT_RTLREADING must be included even when just calculating the + size, since on certain fonts it can affect the width of characters. + (Consider the Hebrew string: 'a '#$F9' b'. On 2000 with Lucida Console + as the font, the spaces aren't drawn as wide with RTLREADING.) } + Result := Result or DT_RIGHT; + if not FForceLTRReading then + Result := Result or DT_RTLREADING; + end; +end; + +function TNewStaticText.CalcBounds: TPoint; +var + R: TRect; + S: String; + DC: HDC; +begin + { Note: The calculated width/height is actually one pixel wider/taller + than the size of the text, so that when Enabled=False the white shadow + does not get clipped } + R := Rect(0, 0, Width, 0); + if R.Right > 0 then Dec(R.Right); + + S := Caption; + if (S = '') or (FShowAccelChar and (S[1] = '&') and (S[2] = #0)) then + S := S + ' '; + + DC := GetDC(0); + try + SelectObject(DC, Font.Handle); + { On NT platforms, static controls are Unicode-based internally; when + ANSI text is assigned to them, it is converted to Unicode using the + system code page (ACP). We must be sure to use the ACP here, too, + otherwise the calculated size could be incorrect. The code page used + by DrawTextA is defined by the font, and not necessarily equal to the + ACP, so we can't use it. (To reproduce: with the ACP set to Hebrew + (1255), try passing Hebrew text to DrawTextA with the font set to + "Lucida Console". It appears to use CP 1252, not 1255.) } + DrawTextACP(DC, S, R, DT_CALCRECT or GetDrawTextFlags); + finally + ReleaseDC(0, DC); + end; + + Result.X := R.Right + 1; + Result.Y := R.Bottom + 1; +end; + +procedure TNewStaticText.AdjustBounds; +var + NewBounds: TPoint; + NewLeft, NewWidth: Integer; +begin + if not (csLoading in ComponentState) and FAutoSize then + begin + FLastAdjustBoundsRTL := IsParentRightToLeft(Self); + + NewBounds := CalcBounds; + + NewLeft := Left; + NewWidth := Width; + if not FWordWrap then begin + NewWidth := NewBounds.X; + if IsParentFlipped(Self) then + Inc(NewLeft, Width - NewWidth); + end; + SetBounds(NewLeft, Top, NewWidth, NewBounds.Y); + end; +end; + +function TNewStaticText.AdjustHeight: Integer; +var + OldHeight: Integer; +begin + OldHeight := Height; + Height := CalcBounds.Y; + Result := Height - OldHeight; +end; + +procedure TNewStaticText.Notification(AComponent: TComponent; + Operation: TOperation); +begin + inherited Notification(AComponent, Operation); + if (Operation = opRemove) and (AComponent = FFocusControl) then + FFocusControl := nil; +end; + +procedure TNewStaticText.SetAutoSize(Value: Boolean); +begin + if FAutoSize <> Value then + begin + FAutoSize := Value; + if Value then AdjustBounds; + end; +end; + +procedure TNewStaticText.SetFocusControl(Value: TWinControl); +begin + FFocusControl := Value; + if Value <> nil then Value.FreeNotification(Self); +end; + +procedure TNewStaticText.SetForceLTRReading(Value: Boolean); +begin + if FForceLTRReading <> Value then begin + FForceLTRReading := Value; + RecreateWnd; + AdjustBounds; + end; +end; + +procedure TNewStaticText.SetShowAccelChar(Value: Boolean); +begin + if FShowAccelChar <> Value then + begin + FShowAccelChar := Value; + RecreateWnd; + AdjustBounds; + end; +end; + +procedure TNewStaticText.SetWordWrap(Value: Boolean); +begin + if FWordWrap <> Value then + begin + FWordWrap := Value; + RecreateWnd; + AdjustBounds; + end; +end; + +end. diff --git a/Components/NewTabSet.pas b/Components/NewTabSet.pas new file mode 100644 index 000000000..04401b5df --- /dev/null +++ b/Components/NewTabSet.pas @@ -0,0 +1,301 @@ +unit NewTabSet; + +{ + Inno Setup + Copyright (C) 1997-2004 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TNewTabSet - modern VS.NET-style tabs + + $jrsoftware: issrc/Components/NewTabSet.pas,v 1.3 2010/08/18 03:36:36 jr Exp $ +} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms; + +type + TNewTabSet = class(TCustomControl) + private + FTabs: TStrings; + FTabIndex: Integer; + function GetTabRect(Index: Integer): TRect; + procedure InvalidateTab(Index: Integer); + procedure ListChanged(Sender: TObject); + procedure SetTabs(Value: TStrings); + procedure SetTabIndex(Value: Integer); + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override; + procedure Paint; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + published + property Align; + property Font; + property ParentFont; + property TabIndex: Integer read FTabIndex write SetTabIndex; + property Tabs: TStrings read FTabs write SetTabs; + property OnClick; + end; + +procedure Register; + +implementation + +procedure Register; +begin + RegisterComponents('JR', [TNewTabSet]); +end; + +procedure RGBToHSV(const R, G, B: Integer; var H, S: Double; var V: Integer); +var + Max, Min, C: Integer; +begin + Max := R; + if G > Max then Max := G; + if B > Max then Max := B; + Min := R; + if G < Min then Min := G; + if B < Min then Min := B; + + C := Max - Min; + if C = 0 then begin + H := 0; + S := 0; + end + else begin + if Max = R then + H := (60 * (G - B)) / C + else if Max = G then + H := (60 * (B - R)) / C + 120 + else if Max = B then + H := (60 * (R - G)) / C + 240; + if H < 0 then + H := H + 360; + S := C / Max; + end; + V := Max; +end; + +procedure HSVtoRGB(const H, S: Double; const V: Integer; var R, G, B: Integer); +var + I, P, Q, T: Integer; + F: Double; +begin + I := Trunc(H / 60); + F := Frac(H / 60); + P := Round(V * (1.0 - S)); + Q := Round(V * (1.0 - S * F)); + T := Round(V * (1.0 - S * (1.0 - F))); + case I of + 0: begin R := V; G := t; B := p; end; + 1: begin R := q; G := V; B := p; end; + 2: begin R := p; G := V; B := t; end; + 3: begin R := p; G := q; B := V; end; + 4: begin R := t; G := p; B := V; end; + 5: begin R := V; G := p; B := q; end; + else + { Should only get here with bogus input } + R := 0; G := 0; B := 0; + end; +end; + +function LightenColor(const Color: TColorRef; const Amount: Integer): TColorRef; +var + H, S: Double; + V, R, G, B: Integer; +begin + RGBtoHSV(Byte(Color), Byte(Color shr 8), Byte(Color shr 16), H, S, V); + Inc(V, Amount); + if V > 255 then + V := 255; + if V < 0 then + V := 0; + HSVtoRGB(H, S, V, R, G, B); + Result := R or (G shl 8) or (B shl 16); +end; + +{ TNewTabSet } + +const + TabPaddingX = 5; + TabPaddingY = 3; + TabSpacing = 1; + +constructor TNewTabSet.Create(AOwner: TComponent); +begin + inherited; + FTabs := TStringList.Create; + TStringList(FTabs).OnChange := ListChanged; + ControlStyle := ControlStyle + [csOpaque]; + Width := 129; + Height := 20; +end; + +procedure TNewTabSet.CreateParams(var Params: TCreateParams); +begin + inherited; + with Params.WindowClass do + style := style and not (CS_HREDRAW or CS_VREDRAW); +end; + +destructor TNewTabSet.Destroy; +begin + FTabs.Free; + inherited; +end; + +function TNewTabSet.GetTabRect(Index: Integer): TRect; +var + I: Integer; + Size: TSize; +begin + Canvas.Font.Assign(Font); + Result.Right := 4; + for I := 0 to FTabs.Count-1 do begin + Size := Canvas.TextExtent(FTabs[I]); + Result := Bounds(Result.Right, 0, Size.cx + (TabPaddingX * 2) + TabSpacing, + Size.cy + (TabPaddingY * 2)); + if Index = I then + Exit; + end; + SetRectEmpty(Result); +end; + +procedure TNewTabSet.InvalidateTab(Index: Integer); +var + R: TRect; +begin + if HandleAllocated and (Index >= 0) and (Index < FTabs.Count) then begin + R := GetTabRect(Index); + { Inc R.Right since the trailing separator of a tab overwrites the first + pixel of the next tab } + Inc(R.Right); + InvalidateRect(Handle, @R, False); + end; +end; + +procedure TNewTabSet.ListChanged(Sender: TObject); +begin + Invalidate; +end; + +procedure TNewTabSet.MouseDown(Button: TMouseButton; Shift: TShiftState; X, + Y: Integer); +var + I: Integer; + R: TRect; +begin + if Button = mbLeft then begin + for I := 0 to FTabs.Count-1 do begin + R := GetTabRect(I); + if (X >= R.Left) and (X < R.Right) then begin + TabIndex := I; + Break; + end; + end; + end; +end; + +procedure TNewTabSet.Paint; +var + HighColorMode: Boolean; + + procedure DrawTabs(const SelectedTab: Boolean); + var + I: Integer; + R: TRect; + begin + for I := 0 to FTabs.Count-1 do begin + R := GetTabRect(I); + if SelectedTab and (FTabIndex = I) then begin + Dec(R.Right, TabSpacing); + Canvas.Brush.Color := clBtnFace; + Canvas.FillRect(R); + Canvas.Pen.Color := clBtnHighlight; + Canvas.MoveTo(R.Left, R.Top); + Canvas.LineTo(R.Left, R.Bottom-1); + Canvas.Pen.Color := clBtnText; + Canvas.LineTo(R.Right-1, R.Bottom-1); + Canvas.LineTo(R.Right-1, R.Top-1); + Canvas.Font.Color := clBtnText; + Canvas.TextOut(R.Left + TabPaddingX, R.Top + TabPaddingY, FTabs[I]); + ExcludeClipRect(Canvas.Handle, R.Left, R.Top, R.Right, R.Bottom); + Break; + end; + if not SelectedTab and (FTabIndex <> I) then begin + if HighColorMode and (ColorToRGB(clBtnFace) <> clBlack) then + Canvas.Font.Color := LightenColor(ColorToRGB(clBtnShadow), -43) + else begin + { Like VS.NET, if the button face color is black, or if running in + low color mode, use plain clBtnHighlight as the text color } + Canvas.Font.Color := clBtnHighlight; + end; + Canvas.TextOut(R.Left + TabPaddingX, R.Top + TabPaddingY, FTabs[I]); + if HighColorMode then + Canvas.Pen.Color := clBtnShadow + else + Canvas.Pen.Color := clBtnFace; + Canvas.MoveTo(R.Right, R.Top+3); + Canvas.LineTo(R.Right, R.Bottom-2); + end; + end; + end; + +var + CR: TRect; +begin + Canvas.Font.Assign(Font); + + HighColorMode := (GetDeviceCaps(Canvas.Handle, BITSPIXEL) * + GetDeviceCaps(Canvas.Handle, PLANES)) >= 15; + + CR := ClientRect; + + { Work around an apparent NT 4.0/2000/??? bug. If the width of the DC is + greater than the width of the screen, then any call to ExcludeClipRect + inexplicably shrinks the DC's clipping rectangle to the screen width. + Calling IntersectClipRect first with the entire client area as the + rectangle solves this (don't ask me why). } + IntersectClipRect(Canvas.Handle, CR.Left, CR.Top, CR.Right, CR.Bottom); + + { Selected tab } + DrawTabs(True); + + { Top line } + Canvas.Pen.Color := clBtnText; + Canvas.MoveTo(0, 0); + Canvas.LineTo(CR.Right, 0); + + { Background fill } + if HighColorMode then + Canvas.Brush.Color := LightenColor(ColorToRGB(clBtnFace), 35) + else + Canvas.Brush.Color := clBtnShadow; + Inc(CR.Top); + Canvas.FillRect(CR); + + { Non-selected tabs } + DrawTabs(False); +end; + +procedure TNewTabSet.SetTabIndex(Value: Integer); +begin + if FTabIndex <> Value then begin + InvalidateTab(FTabIndex); + FTabIndex := Value; + InvalidateTab(Value); + Click; + end; +end; + +procedure TNewTabSet.SetTabs(Value: TStrings); +begin + FTabs.Assign(Value); +end; + +end. diff --git a/Components/PasswordEdit.pas b/Components/PasswordEdit.pas new file mode 100644 index 000000000..99852b914 --- /dev/null +++ b/Components/PasswordEdit.pas @@ -0,0 +1,107 @@ +unit PasswordEdit; + +{ + Inno Setup + Copyright (C) 1997-2007 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + This unit provides a true password edit for Delphi 2. + + $jrsoftware: issrc/Components/PasswordEdit.pas,v 1.3 2007/12/10 18:28:53 jr Exp $ +} + +interface + +uses + Windows, Classes, Controls, StdCtrls; + +type + TPasswordEdit = class(TCustomEdit) + private + FPassword: Boolean; + procedure SetPassword(Value: Boolean); + protected + procedure CreateParams(var Params: TCreateParams); override; + public + constructor Create(AOwner: TComponent); override; + published + property AutoSelect; + property AutoSize; + property BorderStyle; + property CharCase; + property Color; + property Ctl3D; + property DragCursor; + property DragMode; + property Enabled; + property Font; + property HideSelection; + property MaxLength; + property OEMConvert; + property ParentColor; + property ParentCtl3D; + property ParentFont; + property ParentShowHint; + property Password: Boolean read FPassword write SetPassword default True; + property PopupMenu; + property ReadOnly; + property ShowHint; + property TabOrder; + property TabStop; + property Text; + property Visible; + property OnChange; + property OnClick; + property OnDblClick; + property OnDragDrop; + property OnDragOver; + property OnEndDrag; + property OnEnter; + property OnExit; + property OnKeyDown; + property OnKeyPress; + property OnKeyUp; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnStartDrag; + end; + +procedure Register; + +implementation + +uses + BidiUtils; + +procedure Register; +begin + RegisterComponents('JR', [TPasswordEdit]); +end; + +{ TPasswordEdit } + +constructor TPasswordEdit.Create(AOwner: TComponent); +begin + inherited; + FPassword := True; +end; + +procedure TPasswordEdit.CreateParams(var Params: TCreateParams); +begin + inherited; + if FPassword then + Params.Style := Params.Style or ES_PASSWORD; + SetBiDiStyles(Self, Params); +end; + +procedure TPasswordEdit.SetPassword(Value: Boolean); +begin + if FPassword <> Value then begin + FPassword := Value; + RecreateWnd; + end; +end; + +end. diff --git a/Components/PathFunc.pas b/Components/PathFunc.pas new file mode 100644 index 000000000..27d26dd58 --- /dev/null +++ b/Components/PathFunc.pas @@ -0,0 +1,587 @@ +unit PathFunc; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + This unit provides some path-related, MBCS-aware functions. + + These functions should always be used in lieu of their SysUtils counterparts + since they aren't MBCS-aware on Delphi 2, and sometimes not MBCS-aware on + Delphi 6 and 7 either (see QC#5096). + + $jrsoftware: issrc/Components/PathFunc.pas,v 1.43 2010/04/19 21:43:01 jr Exp $ +} + +interface + +function AddBackslash(const S: String): String; +function PathChangeExt(const Filename, Extension: String): String; +function PathCharCompare(const S1, S2: PChar): Boolean; +function PathCharIsSlash(const C: Char): Boolean; +function PathCharIsTrailByte(const S: String; const Index: Integer): Boolean; +function PathCharLength(const S: String; const Index: Integer): Integer; +function PathCombine(const Dir, Filename: String): String; +function PathCompare(const S1, S2: String): Integer; +function PathDrivePartLength(const Filename: String): Integer; +function PathDrivePartLengthEx(const Filename: String; + const IncludeSignificantSlash: Boolean): Integer; +function PathExpand(const Filename: String): String; +function PathExtensionPos(const Filename: String): Integer; +function PathExtractDir(const Filename: String): String; +function PathExtractDrive(const Filename: String): String; +function PathExtractExt(const Filename: String): String; +function PathExtractName(const Filename: String): String; +function PathExtractPath(const Filename: String): String; +function PathIsRooted(const Filename: String): Boolean; +function PathLastChar(const S: String): PChar; +function PathLastDelimiter(const Delimiters, S: string): Integer; +function PathLowercase(const S: String): String; +function PathNormalizeSlashes(const S: String): String; +function PathPathPartLength(const Filename: String; + const IncludeSlashesAfterPath: Boolean): Integer; +function PathPos(Ch: Char; const S: String): Integer; +function PathStartsWith(const S, AStartsWith: String): Boolean; +function PathStrNextChar(const S: PChar): PChar; +function PathStrPrevChar(const Start, Current: PChar): PChar; +function PathStrScan(const S: PChar; const C: Char): PChar; +function RemoveBackslash(const S: String): String; +function RemoveBackslashUnlessRoot(const S: String): String; + +implementation + +uses + Windows, SysUtils; + +function AddBackslash(const S: String): String; +{ Returns S plus a trailing backslash, unless S is an empty string or already + ends in a backslash/slash. } +begin + if (S <> '') and not PathCharIsSlash(PathLastChar(S)^) then + Result := S + '\' + else + Result := S; +end; + +function PathCharLength(const S: String; const Index: Integer): Integer; +{ Returns the length in bytes of the character at Index in S. + Notes: + 1. If Index specifies the last character in S, 1 will always be returned, + even if the last character is a lead byte. + 2. If a lead byte is followed by a null character (e.g. #131#0), 2 will be + returned. This mimics the behavior of MultiByteToWideChar and CharPrev, + but not CharNext(P)-P, which would stop on the null. } +begin + {$IFNDEF UNICODE} + if IsDBCSLeadByte(Ord(S[Index])) and (Index < Length(S)) then + Result := 2 + else + {$ENDIF} + Result := 1; +end; + +function PathCharIsSlash(const C: Char): Boolean; +{ Returns True if C is a backslash or slash. } +begin + Result := (C = '\') or (C = '/'); +end; + +function PathCharIsTrailByte(const S: String; const Index: Integer): Boolean; +{ Returns False if S[Index] is a single byte character or a lead byte. + Returns True otherwise (i.e. it must be a trail byte). } +var + I: Integer; +begin + I := 1; + while I <= Index do begin + if I = Index then begin + Result := False; + Exit; + end; + Inc(I, PathCharLength(S, I)); + end; + Result := True; +end; + +function PathCharCompare(const S1, S2: PChar): Boolean; +{ Compares two first characters, and returns True if they are equal. } +var + N, I: Integer; +begin + N := PathStrNextChar(S1) - S1; + if N = PathStrNextChar(S2) - S2 then begin + for I := 0 to N-1 do begin + if S1[I] <> S2[I] then begin + Result := False; + Exit; + end; + end; + Result := True; + end else + Result := False; +end; + +function PathChangeExt(const Filename, Extension: String): String; +{ Takes Filename, removes any existing extension, then adds the extension + specified by Extension and returns the resulting string. } +var + I: Integer; +begin + I := PathExtensionPos(Filename); + if I = 0 then + Result := Filename + Extension + else + Result := Copy(Filename, 1, I - 1) + Extension; +end; + +function PathCombine(const Dir, Filename: String): String; +{ Combines a directory and filename into a path. + If Dir is empty, it just returns Filename. + If Filename is empty, it returns an empty string (ignoring Dir). + If Filename begins with a drive letter or slash, it returns Filename + (ignoring Dir). + If Dir specifies only a drive letter and colon ('c:'), it returns + Dir + Filename. + Otherwise, it returns the equivalent of AddBackslash(Dir) + Filename. } +var + I: Integer; +begin + if (Dir = '') or (Filename = '') or PathIsRooted(Filename) then + Result := Filename + else begin + I := PathCharLength(Dir, 1) + 1; + if ((I = Length(Dir)) and (Dir[I] = ':')) or + PathCharIsSlash(PathLastChar(Dir)^) then + Result := Dir + Filename + else + Result := Dir + '\' + Filename; + end; +end; + +function PathCompare(const S1, S2: String): Integer; +{ Compares two filenames, and returns 0 if they are equal. } +begin + Result := CompareStr(PathLowercase(S1), PathLowercase(S2)); +end; + +function PathDrivePartLength(const Filename: String): Integer; +begin + Result := PathDrivePartLengthEx(Filename, False); +end; + +function PathDrivePartLengthEx(const Filename: String; + const IncludeSignificantSlash: Boolean): Integer; +{ Returns length of the drive portion of Filename, or 0 if there is no drive + portion. + If IncludeSignificantSlash is True, the drive portion can include a trailing + slash if it is significant to the meaning of the path (i.e. 'x:' and 'x:\' + are not equivalent, nor are '\' and ''). + If IncludeSignificantSlash is False, the function works as follows: + 'x:file' -> 2 ('x:') + 'x:\file' -> 2 ('x:') + '\\server\share\file' -> 14 ('\\server\share') + '\file' -> 0 ('') + If IncludeSignificantSlash is True, the function works as follows: + 'x:file' -> 2 ('x:') + 'x:\file' -> 3 ('x:\') + '\\server\share\file' -> 14 ('\\server\share') + '\file' -> 1 ('\') + Note: This is MBCS-safe, unlike the Delphi's ExtractFileDrive function. + (Computer and share names can include multi-byte characters!) } +var + Len, I, C: Integer; +begin + Len := Length(Filename); + + { \\server\share } + if (Len >= 2) and PathCharIsSlash(Filename[1]) and PathCharIsSlash(Filename[2]) then begin + I := 3; + C := 0; + while I <= Len do begin + if PathCharIsSlash(Filename[I]) then begin + Inc(C); + if C >= 2 then + Break; + repeat + Inc(I); + { And skip any additional consecutive slashes: } + until (I > Len) or not PathCharIsSlash(Filename[I]); + end + else + Inc(I, PathCharLength(Filename, I)); + end; + Result := I - 1; + Exit; + end; + + { \ } + { Note: Test this before 'x:' since '\:stream' means access stream 'stream' + on the root directory of the current drive, not access drive '\:' } + if (Len >= 1) and PathCharIsSlash(Filename[1]) then begin + if IncludeSignificantSlash then + Result := 1 + else + Result := 0; + Exit; + end; + + { x: } + if Len > 0 then begin + I := PathCharLength(Filename, 1) + 1; + if (I <= Len) and (Filename[I] = ':') then begin + if IncludeSignificantSlash and (I < Len) and PathCharIsSlash(Filename[I+1]) then + Result := I+1 + else + Result := I; + Exit; + end; + end; + + Result := 0; +end; + +function PathIsRooted(const Filename: String): Boolean; +{ Returns True if Filename begins with a slash or drive ('x:'). + Equivalent to: PathDrivePartLengthEx(Filename, True) <> 0 } +var + Len, I: Integer; +begin + Result := False; + Len := Length(Filename); + if Len > 0 then begin + { \ or \\ } + if PathCharIsSlash(Filename[1]) then + Result := True + else begin + { x: } + I := PathCharLength(Filename, 1) + 1; + if (I <= Len) and (Filename[I] = ':') then + Result := True; + end; + end; +end; + +function PathPathPartLength(const Filename: String; + const IncludeSlashesAfterPath: Boolean): Integer; +{ Returns length of the path portion of Filename, or 0 if there is no path + portion. + Note these differences from Delphi's ExtractFilePath function: + - The result will never be less than what PathDrivePartLength returns. + If you pass a UNC root path, e.g. '\\server\share', it will return the + length of the entire string, NOT the length of '\\server\'. + - If you pass in a filename with a reference to an NTFS alternate data + stream, e.g. 'abc:def', it will return the length of the entire string, + NOT the length of 'abc:'. } +var + LastCharToKeep, Len, I: Integer; +begin + Result := PathDrivePartLengthEx(Filename, True); + LastCharToKeep := Result; + Len := Length(Filename); + I := Result + 1; + while I <= Len do begin + if PathCharIsSlash(Filename[I]) then begin + if IncludeSlashesAfterPath then + Result := I + else + Result := LastCharToKeep; + Inc(I); + end + else begin + Inc(I, PathCharLength(Filename, I)); + LastCharToKeep := I-1; + end; + end; +end; + +function PathExpand(const Filename: String): String; +{ Like Delphi's ExpandFileName, but does proper error checking. } +var + Res: Integer; + FilePart: PChar; + Buf: array[0..4095] of Char; +begin + DWORD(Res) := GetFullPathName(PChar(Filename), SizeOf(Buf) div SizeOf(Buf[0]), + Buf, FilePart); + if (Res > 0) and (Res < SizeOf(Buf) div SizeOf(Buf[0])) then + SetString(Result, Buf, Res) + else + Result := Filename; +end; + +function PathExtensionPos(const Filename: String): Integer; +{ Returns index of the last '.' character in the filename portion of Filename, + or 0 if there is no '.' in the filename portion. + Note: Filename is assumed to NOT include an NTFS alternate data stream name + (i.e. 'filename:stream'). } +var + Len, I: Integer; +begin + Result := 0; + Len := Length(Filename); + I := PathPathPartLength(Filename, True) + 1; + while I <= Len do begin + if Filename[I] = '.' then begin + Result := I; + Inc(I); + end + else + Inc(I, PathCharLength(Filename, I)); + end; +end; + +function PathExtractDir(const Filename: String): String; +{ Like PathExtractPath, but strips any trailing slashes, unless the resulting + path is the root directory of a drive (i.e. 'C:\' or '\'). } +var + I: Integer; +begin + I := PathPathPartLength(Filename, False); + Result := Copy(Filename, 1, I); +end; + +function PathExtractDrive(const Filename: String): String; +{ Returns the drive portion of Filename (either 'x:' or '\\server\share'), + or an empty string if there is no drive portion. } +var + L: Integer; +begin + L := PathDrivePartLength(Filename); + if L = 0 then + Result := '' + else + Result := Copy(Filename, 1, L); +end; + +function PathExtractExt(const Filename: String): String; +{ Returns the extension portion of the last component of Filename (e.g. '.txt') + or an empty string if there is no extension. } +var + I: Integer; +begin + I := PathExtensionPos(Filename); + if I = 0 then + Result := '' + else + Result := Copy(Filename, I, Maxint); +end; + +function PathExtractName(const Filename: String): String; +{ Returns the filename portion of Filename (e.g. 'filename.txt'). If Filename + ends in a slash or consists only of a drive part, the result will be an empty + string. + This function is essentially the opposite of PathExtractPath. } +var + I: Integer; +begin + I := PathPathPartLength(Filename, True); + Result := Copy(Filename, I + 1, Maxint); +end; + +function PathExtractPath(const Filename: String): String; +{ Returns the path portion of Filename (e.g. 'c:\dir\'). If Filename contains + no drive part or slash, the result will be an empty string. + This function is essentially the opposite of PathExtractName. } +var + I: Integer; +begin + I := PathPathPartLength(Filename, True); + Result := Copy(Filename, 1, I); +end; + +function PathLastChar(const S: String): PChar; +{ Returns pointer to last character in the string. Is MBCS-aware. Returns nil + if the string is empty. } +begin + if S = '' then + Result := nil + else + Result := PathStrPrevChar(Pointer(S), @S[Length(S)+1]); +end; + +function PathLastDelimiter(const Delimiters, S: string): Integer; +{ Returns the index of the last occurrence in S of one of the characters in + Delimiters, or 0 if none were found. + Note: S is allowed to contain null characters. } +var + P, E: PChar; +begin + Result := 0; + if (S = '') or (Delimiters = '') then + Exit; + P := Pointer(S); + E := @P[Length(S)]; + while P < E do begin + if P^ <> #0 then begin + if StrScan(PChar(Pointer(Delimiters)), P^) <> nil then + Result := (P - PChar(Pointer(S))) + 1; + P := PathStrNextChar(P); + end + else + Inc(P); + end; +end; + +function PathLowercase(const S: String): String; +{ Converts the specified path name to lowercase } +{$IFNDEF UNICODE} +var + I, L: Integer; +{$ENDIF} +begin + {$IFNDEF UNICODE} + if (Win32Platform <> VER_PLATFORM_WIN32_NT) and + (GetSystemMetrics(SM_DBCSENABLED) <> 0) then begin + { Japanese Windows 98's handling of double-byte Roman characters in + filenames is case sensitive, so we can't change the case of double-byte + characters. (Japanese Windows NT/2000 is case insensitive, on both FAT + and NTFS, in my tests.) Based on code from AnsiLowerCaseFileName. } + Result := S; + L := Length(Result); + I := 1; + while I <= L do begin + if Result[I] in ['A'..'Z'] then begin + Inc(Byte(Result[I]), 32); + Inc(I); + end + else + Inc(I, PathCharLength(Result, I)); + end; + end + else + {$ENDIF} + Result := AnsiLowerCase(S); +end; + +function PathPos(Ch: Char; const S: String): Integer; +{ This is an MBCS-aware Pos function. } +var + Len, I: Integer; +begin + Len := Length(S); + I := 1; + while I <= Len do begin + if S[I] = Ch then begin + Result := I; + Exit; + end; + Inc(I, PathCharLength(S, I)); + end; + Result := 0; +end; + +function PathNormalizeSlashes(const S: String): String; +{ Returns S minus any superfluous slashes, and with any forward slashes + converted to backslashes. For example, if S is 'C:\\\some//path', it returns + 'C:\some\path'. Does not remove a double backslash at the beginning of the + string, since that signifies a UNC path. } +var + Len, I: Integer; +begin + Result := S; + Len := Length(Result); + I := 1; + while I <= Len do begin + if Result[I] = '/' then + Result[I] := '\'; + Inc(I, PathCharLength(Result, I)); + end; + I := 1; + while I < Length(Result) do begin + if (Result[I] = '\') and (Result[I+1] = '\') and (I > 1) then + Delete(Result, I+1, 1) + else + Inc(I, PathCharLength(Result, I)); + end; +end; + +function PathStartsWith(const S, AStartsWith: String): Boolean; +{ Returns True if S starts with (or is equal to) AStartsWith. Uses path casing + rules, and is MBCS-aware. } +var + AStartsWithLen: Integer; +begin + AStartsWithLen := Length(AStartsWith); + if Length(S) = AStartsWithLen then + Result := (PathCompare(S, AStartsWith) = 0) + else if (Length(S) > AStartsWithLen) and not PathCharIsTrailByte(S, AStartsWithLen+1) then + Result := (PathCompare(Copy(S, 1, AStartsWithLen), AStartsWith) = 0) + else + Result := False; +end; + +function PathStrNextChar(const S: PChar): PChar; +{ Returns pointer to the character after S, unless S points to a null (#0). + Is MBCS-aware. } +begin + {$IFNDEF UNICODE} + Result := CharNext(S); + {$ELSE} + Result := S; + if Result^ <> #0 then + Inc(Result); + {$ENDIF} +end; + +function PathStrPrevChar(const Start, Current: PChar): PChar; +{ Returns pointer to the character before Current, unless Current = Start. + Is MBCS-aware. } +begin + {$IFNDEF UNICODE} + Result := CharPrev(Start, Current); + {$ELSE} + Result := Current; + if Result > Start then + Dec(Result); + {$ENDIF} +end; + +function PathStrScan(const S: PChar; const C: Char): PChar; +{ Returns pointer to first occurrence of C in S, or nil if there are no + occurrences. Like StrScan, but MBCS-aware. + Note: As with StrScan, specifying #0 for the search character is legal. } +begin + Result := S; + while Result^ <> C do begin + if Result^ = #0 then begin + Result := nil; + Break; + end; + Result := PathStrNextChar(Result); + end; +end; + +function RemoveBackslash(const S: String): String; +{ Returns S minus any trailing slashes. Use of this function is discouraged; + use RemoveBackslashUnlessRoot instead when working with file system paths. } +var + I: Integer; +begin + I := Length(S); + while (I > 0) and PathCharIsSlash(PathStrPrevChar(Pointer(S), @S[I+1])^) do + Dec(I); + if I = Length(S) then + Result := S + else + Result := Copy(S, 1, I); +end; + +function RemoveBackslashUnlessRoot(const S: String): String; +{ Returns S minus any trailing slashes, unless S specifies the root directory + of a drive (i.e. 'C:\' or '\'), in which case it leaves 1 slash. } +var + DrivePartLen, I: Integer; +begin + DrivePartLen := PathDrivePartLengthEx(S, True); + I := Length(S); + while (I > DrivePartLen) and PathCharIsSlash(PathStrPrevChar(Pointer(S), @S[I+1])^) do + Dec(I); + if I = Length(S) then + Result := S + else + Result := Copy(S, 1, I); +end; + +end. diff --git a/Components/PathFuncTest.pas b/Components/PathFuncTest.pas new file mode 100644 index 000000000..05c19a6ff --- /dev/null +++ b/Components/PathFuncTest.pas @@ -0,0 +1,236 @@ +unit PathFuncTest; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Test unit for PathFunc + + $jrsoftware: issrc/Components/PathFuncTest.pas,v 1.10 2010/04/19 21:43:01 jr Exp $ +} + +interface + +procedure PathFuncRunTests(const AlsoTestJapaneseDBCS: Boolean); + +implementation + +uses + Windows, SysUtils, PathFunc; + +procedure PathFuncRunTests(const AlsoTestJapaneseDBCS: Boolean); + + procedure Test(const Filename: String; + const DrivePartFalse, DrivePartTrue, PathPartFalse, PathPartTrue: Integer); + begin + if PathDrivePartLengthEx(Filename, False) <> DrivePartFalse then + raise Exception.CreateFmt('"%s" drive part(False) test failed', [Filename]); + if PathDrivePartLengthEx(Filename, True) <> DrivePartTrue then + raise Exception.CreateFmt('"%s" drive part(True) test failed', [Filename]); + if PathPathPartLength(Filename, False) <> PathPartFalse then + raise Exception.CreateFmt('"%s" path part(False) test failed', [Filename]); + if PathPathPartLength(Filename, True) <> PathPartTrue then + raise Exception.CreateFmt('"%s" path part(True) test failed', [Filename]); + + if PathIsRooted(Filename) <> (PathDrivePartLengthEx(Filename, True) <> 0) then + raise Exception.CreateFmt('"%s" PathIsRooted test failed', [Filename]); + end; + + procedure TestRemoveBackslash(const Filename, ExpectedResult: String); + begin + if RemoveBackslash(Filename) <> ExpectedResult then + raise Exception.Create('RemoveBackslash test failed'); + end; + + procedure TestRemoveBackslashUnlessRoot(const Filename, ExpectedResult: String); + begin + if RemoveBackslashUnlessRoot(Filename) <> ExpectedResult then + raise Exception.Create('RemoveBackslashUnlessRoot test failed'); + end; + + procedure TestPathChangeExt(const Filename, Extension, ExpectedResult: String); + begin + if PathChangeExt(Filename, Extension) <> ExpectedResult then + raise Exception.Create('PathChangeExt test failed'); + end; + + procedure TestPathExtractExt(const Filename, ExpectedResult: String); + begin + if PathExtractExt(Filename) <> ExpectedResult then + raise Exception.Create('PathExtractExt test failed'); + end; + + procedure TestPathCombine(const Dir, Filename, ExpectedResult: String); + begin + if PathCombine(Dir, Filename) <> ExpectedResult then + raise Exception.Create('PathCombine test failed'); + end; + + procedure TestPathStartsWith(const S, AStartsWith: String; const ExpectedResult: Boolean); + begin + if PathStartsWith(S, AStartsWith) <> ExpectedResult then + raise Exception.Create('PathStartsWith test failed'); + end; + +const + DBChar = #131'\'; { a double-byte character whose 2nd byte happens to be a backslash } +begin + {$IFDEF UNICODE} + if AlsoTestJapaneseDBCS then + raise Exception.Create('DBCS tests not supported in Unicode build'); + {$ENDIF} + if AlsoTestJapaneseDBCS and (GetACP <> 932) then + raise Exception.Create('Must be running in Japanese code page to run these tests'); + + { * = Bogus path case. What the "correct" result should be is debatable. } + { ** = Possible access to NTFS alternate data stream. The characters before + and after the colon must be kept together as a single component. } + + Test('', 0, 0, 0, 0); + Test('\', 0, 1, 1, 1); + Test('\a', 0, 1, 1, 1); + Test('\a\', 0, 1, 2, 3); + Test('\a\b', 0, 1, 2, 3); + Test('a', 0, 0, 0, 0); + Test('a\', 0, 0, 1, 2); + Test('a\\', 0, 0, 1, 3); + Test('a\\\', 0, 0, 1, 4); + Test('a\b', 0, 0, 1, 2); + Test('a\b:c', 0, 0, 1, 2); {**} + + Test('1:', 2, 2, 2, 2); {*} + + Test('\:', 0, 1, 1, 1); {*} + { Yes, the following is a valid path -- it specifies a stream named 'stream' + on the root directory of the current drive. (Yes, directories can have + named streams.) } + Test('\:stream', 0, 1, 1, 1); {**} + + Test('c:', 2, 2, 2, 2); + Test('c:a', 2, 2, 2, 2); + Test('c:\', 2, 3, 3, 3); + Test('c:\\', 2, 3, 3, 4); + Test('c:\\\', 2, 3, 3, 5); + Test('c:\a', 2, 3, 3, 3); + Test('c:\a\', 2, 3, 4, 5); + Test('c:\a\\', 2, 3, 4, 6); + Test('c:\a\\\', 2, 3, 4, 7); + Test('c:\a\b', 2, 3, 4, 5); + Test('c:\a\b:c', 2, 3, 4, 5); {**} + + Test('\\', 2, 2, 2, 2); {*} + { Odd cases follow: The extra slashes are considered to be in the drive part + since PathDrivePartLength keeps slurping slashes looking for a share name + that doesn't exist. } + Test('\\\', 3, 3, 3, 3); {*} + Test('\\\\', 4, 4, 4, 4); {*} + Test('\\\\\', 5, 5, 5, 5); {*} + Test('\\a', 3, 3, 3, 3); {*} + Test('\\a\', 4, 4, 4, 4); {*} + Test('\\a\b', 5, 5, 5, 5); + Test('\\a\b\', 5, 5, 5, 6); + Test('\\a\b\c', 5, 5, 5, 6); + Test('\\a\b\c\', 5, 5, 7, 8); + Test('\\a\b\c\d', 5, 5, 7, 8); + Test('\\a\b\c\d:e', 5, 5, 7, 8); {**} + Test('\\a\\\b', 7, 7, 7, 7); + Test('\\a\\\b\\\', 7, 7, 7, 10); + Test('\\a\\\b\\\c', 7, 7, 7, 10); + Test('\\a\\\b\\\c\\\', 7, 7, 11, 14); + + if AlsoTestJapaneseDBCS then begin + Test('\\'+DBChar+DBChar+'\b', 8, 8, 8, 8); + Test('\\'+DBChar+DBChar+'\b\c', 8, 8, 8, 9); + Test('\\'+DBChar+DBChar+'\b\c\', 8, 8, 10, 11); + Test('c:\'+DBChar+'\b', 2, 3, 5, 6); + Test(DBChar+':', 3, 3, 3, 3); {*} { double-byte drive letter? bogus, but be like Windows... } + end; + + TestRemoveBackslash('', ''); + TestRemoveBackslash('\', ''); + TestRemoveBackslash('\\', ''); + TestRemoveBackslash('\\\', ''); + TestRemoveBackslash('c:', 'c:'); + TestRemoveBackslash('c:\', 'c:'); + TestRemoveBackslash('c:\\', 'c:'); + TestRemoveBackslash('c:\\\', 'c:'); + + if AlsoTestJapaneseDBCS then begin + TestRemoveBackslash(DBChar, DBChar); + TestRemoveBackslash(DBChar+'\', DBChar); + TestRemoveBackslash(DBChar+'\\', DBChar); + end; + + TestRemoveBackslashUnlessRoot('', ''); + TestRemoveBackslashUnlessRoot('\', '\'); + TestRemoveBackslashUnlessRoot('\\', '\\'); {*} + TestRemoveBackslashUnlessRoot('\\\', '\\\'); {*} + TestRemoveBackslashUnlessRoot('\\\\', '\\\\'); {*} + TestRemoveBackslashUnlessRoot('a', 'a'); + TestRemoveBackslashUnlessRoot('a\', 'a'); + TestRemoveBackslashUnlessRoot('a\\', 'a'); + TestRemoveBackslashUnlessRoot('c:', 'c:'); + TestRemoveBackslashUnlessRoot('c:\', 'c:\'); + TestRemoveBackslashUnlessRoot('c:\a', 'c:\a'); + TestRemoveBackslashUnlessRoot('c:\a\', 'c:\a'); + TestRemoveBackslashUnlessRoot('c:\a\\', 'c:\a'); + TestRemoveBackslashUnlessRoot('\\a\b', '\\a\b'); + TestRemoveBackslashUnlessRoot('\\a\b\', '\\a\b'); + TestRemoveBackslashUnlessRoot('\\a\b\\', '\\a\b'); + + TestPathChangeExt('c:', '.txt', 'c:.txt'); {*} { weird, but same as Delphi's ChangeFileExt } + TestPathChangeExt('c:\', '.txt', 'c:\.txt'); {*} + TestPathChangeExt('c:\a', '.txt', 'c:\a.txt'); + TestPathChangeExt('c:\a.', '.txt', 'c:\a.txt'); + TestPathChangeExt('c:\a.tar', '.txt', 'c:\a.txt'); + TestPathChangeExt('c:\a.tar.gz', '.txt', 'c:\a.tar.txt'); + TestPathChangeExt('c:\x.y\a', '.txt', 'c:\x.y\a.txt'); + TestPathChangeExt('\\x.y\a', '.txt', '\\x.y\a.txt'); {*} { ditto above } + TestPathChangeExt('\\x.y\a\', '.txt', '\\x.y\a\.txt'); {*} + + TestPathExtractExt('c:', ''); + TestPathExtractExt('c:\', ''); + TestPathExtractExt('c:\a', ''); + TestPathExtractExt('c:\a.', '.'); + TestPathExtractExt('c:\a.txt', '.txt'); + TestPathExtractExt('c:\a.txt.gz', '.gz'); + TestPathExtractExt('c:\x.y\a', ''); + TestPathExtractExt('\\x.y\a', ''); + TestPathExtractExt('\\x.y\a.b', ''); + TestPathExtractExt('\\x.y\a.b\c', ''); + TestPathExtractExt('\\x.y\a.b\c.txt', '.txt'); + + TestPathCombine('', 'x', 'x'); + TestPathCombine('a', 'x', 'a\x'); + TestPathCombine('a\', 'x', 'a\x'); + TestPathCombine('a\\', 'x', 'a\\x'); + TestPathCombine('c:', 'x', 'c:x'); + TestPathCombine('c:\', 'x', 'c:\x'); + TestPathCombine('c:\\', 'x', 'c:\\x'); + TestPathCombine('c:\a', 'x', 'c:\a\x'); + TestPathCombine('\', 'x', '\x'); + if AlsoTestJapaneseDBCS then begin + TestPathCombine(DBChar+':', 'x', DBChar+':x'); {*} { double-byte drive letter? bogus, but be like Windows... } + TestPathCombine('c:\'+DBChar, 'x', 'c:\'+DBChar+'\x'); + end; + TestPathCombine('c:\', '', ''); + TestPathCombine('c:\', 'e:x', 'e:x'); + TestPathCombine('c:\', 'e:\x', 'e:\x'); + TestPathCombine('c:\', '\x', '\x'); + TestPathCombine('c:\', '\\a\b\c', '\\a\b\c'); + TestPathCombine('c:\', 'ee:x', 'c:\ee:x'); {**} + + TestPathStartsWith('C:', 'c:\', False); + TestPathStartsWith('C:\', 'c:\', True); + TestPathStartsWith('C:\test', 'c:\', True); + if AlsoTestJapaneseDBCS then begin + { Test PathStartsWith's PathCharIsTrailByte call; it shouldn't chop a + double-byte character in half } + TestPathStartsWith('C:'+DBChar, 'c:\', False); + TestPathStartsWith('C:'+DBChar, 'c:'+DBChar[1], False); + end; +end; + +end. diff --git a/Components/RichEditViewer.pas b/Components/RichEditViewer.pas new file mode 100644 index 000000000..4c27ed092 --- /dev/null +++ b/Components/RichEditViewer.pas @@ -0,0 +1,310 @@ +unit RichEditViewer; + +{ TRichEditViewer v1.12 by Jordan Russell and Martijn Laan + + Known problem: + If, after assigning rich text to a TRichEditViewer component, you change + a property that causes the component's handle to be recreated, all text + formatting will be lost. In the interests of code size, I do not intend + to work around this. + + $jrsoftware: issrc/Components/RichEditViewer.pas,v 1.12 2011/06/08 10:44:25 mlaan Exp $ +} + +{$IFDEF VER90} + {$DEFINE DELPHI2} +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + StdCtrls; + +type + TRichEditViewer = class(TMemo) + private + FUseRichEdit: Boolean; + FRichEditLoaded: Boolean; + procedure SetRTFTextProp(const Value: AnsiString); + procedure SetUseRichEdit(Value: Boolean); + procedure UpdateBackgroundColor; + procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; + procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; + procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; + protected + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + function SetRTFText(const Value: AnsiString): Integer; + property RTFText: AnsiString write SetRTFTextProp; + published + property UseRichEdit: Boolean read FUseRichEdit write SetUseRichEdit default True; + end; + +procedure Register; + +implementation + +uses + RichEdit, ShellApi, BidiUtils; + +const + { Note: There is no 'W' 1.0 class } + RICHEDIT_CLASS10A = 'RICHEDIT'; + RICHEDIT_CLASSA = 'RichEdit20A'; + RICHEDIT_CLASSW = 'RichEdit20W'; + MSFTEDIT_CLASS = 'RICHEDIT50W'; + EM_AUTOURLDETECT = WM_USER + 91; + ENM_LINK = $04000000; + EN_LINK = $070b; + +type + PEnLink = ^TEnLink; + TENLink = record + nmhdr: TNMHdr; + msg: UINT; + wParam: WPARAM; + lParam: LPARAM; + chrg: TCharRange; + end; + + TTextRange = record + chrg: TCharRange; + lpstrText: {$IFDEF UNICODE} PWideChar {$ELSE} PAnsiChar {$ENDIF}; + end; + +var + RichEditModule: HMODULE; + RichEditUseCount: Integer = 0; + RichEditVersion: Integer; + +procedure LoadRichEdit; +begin + if RichEditUseCount = 0 then begin + {$IFDEF UNICODE} + RichEditVersion := 4; + RichEditModule := LoadLibrary('MSFTEDIT.DLL'); + {$ELSE} + RichEditModule := 0; + {$ENDIF} + if RichEditModule = 0 then begin + RichEditVersion := 2; + RichEditModule := LoadLibrary('RICHED20.DLL'); + end; + {$IFNDEF UNICODE} + if RichEditModule = 0 then begin + RichEditVersion := 1; + RichEditModule := LoadLibrary('RICHED32.DLL'); + end; + {$ENDIF} + end; + Inc(RichEditUseCount); +end; + +procedure UnloadRichEdit; +begin + if RichEditUseCount > 0 then begin + Dec(RichEditUseCount); + if RichEditUseCount = 0 then begin + FreeLibrary(RichEditModule); + RichEditModule := 0; + end; + end; +end; + +{ TRichEditViewer } + +constructor TRichEditViewer.Create(AOwner: TComponent); +begin + inherited; + FUseRichEdit := True; +end; + +destructor TRichEditViewer.Destroy; +begin + inherited; + { First do all other deinitialization, then decrement the DLL use count } + if FRichEditLoaded then begin + FRichEditLoaded := False; + UnloadRichEdit; + end; +end; + +procedure TRichEditViewer.CreateParams(var Params: TCreateParams); +{ Based on code from TCustomRichEdit.CreateParams } +begin + if UseRichEdit and not FRichEditLoaded then begin + { Increment the DLL use count when UseRichEdit is True, load the DLL } + FRichEditLoaded := True; + LoadRichEdit; + end; + inherited; + if UseRichEdit then begin + {$IFDEF UNICODE} + if RichEditVersion = 4 then + CreateSubClass(Params, MSFTEDIT_CLASS) + else + CreateSubClass(Params, RICHEDIT_CLASSW); + {$ELSE} + if RichEditVersion = 2 then + CreateSubClass(Params, RICHEDIT_CLASSA) + else + CreateSubClass(Params, RICHEDIT_CLASS10A); + {$ENDIF} + end else + { Inherited handler creates a subclass of 'EDIT'. + Must have a unique class name since it uses two different classes + depending on the setting of the UseRichEdit property. } + StrCat(Params.WinClassName, '/Text'); { don't localize! } + SetBiDiStyles(Self, Params); +end; + +procedure TRichEditViewer.CreateWnd; +var + Mask: LongInt; +begin + inherited; + UpdateBackgroundColor; + if FUseRichEdit and (RichEditVersion >= 2) then begin + Mask := ENM_LINK or SendMessage(Handle, EM_GETEVENTMASK, 0, 0); + SendMessage(Handle, EM_SETEVENTMASK, 0, LPARAM(Mask)); + SendMessage(Handle, EM_AUTOURLDETECT, WPARAM(True), 0); + end; +end; + +procedure TRichEditViewer.UpdateBackgroundColor; +begin + if FUseRichEdit and HandleAllocated then + SendMessage(Handle, EM_SETBKGNDCOLOR, 0, ColorToRGB(Color)); +end; + +procedure TRichEditViewer.SetUseRichEdit(Value: Boolean); +begin + if FUseRichEdit <> Value then begin + FUseRichEdit := Value; + RecreateWnd; + if not Value and FRichEditLoaded then begin + { Decrement the DLL use count when UseRichEdit is set to False } + FRichEditLoaded := False; + UnloadRichEdit; + end; + end; +end; + +type + PStreamLoadData = ^TStreamLoadData; + TStreamLoadData = record + Buf: PByte; + BytesLeft: Integer; + end; + +function StreamLoad(dwCookie: Longint; pbBuff: PByte; + cb: Longint; var pcb: Longint): Longint; stdcall; +begin + Result := 0; + with PStreamLoadData(dwCookie)^ do begin + if cb > BytesLeft then + cb := BytesLeft; + Move(Buf^, pbBuff^, cb); + Inc(Buf, cb); + Dec(BytesLeft, cb); + pcb := cb; + end; +end; + +function TRichEditViewer.SetRTFText(const Value: AnsiString): Integer; + + function StreamIn(AFormat: WPARAM): Integer; +{$IFDEF DELPHI2} + const + SF_UNICODE = $0010; +{$ENDIF} + var + Data: TStreamLoadData; + EditStream: TEditStream; + begin + Data.Buf := @Value[1]; + Data.BytesLeft := Length(Value); + { Check for UTF-16 BOM } + if (AFormat and SF_TEXT <> 0) and (Data.BytesLeft >= 2) and + (PWord(Pointer(Value))^ = $FEFF) then begin + AFormat := AFormat or SF_UNICODE; + Inc(Data.Buf, 2); + Dec(Data.BytesLeft, 2); + end; + EditStream.dwCookie := Longint(@Data); + EditStream.dwError := 0; + EditStream.pfnCallback := @StreamLoad; + SendMessage(Handle, EM_STREAMIN, AFormat, LPARAM(@EditStream)); + Result := EditStream.dwError; + end; + +begin + if not FUseRichEdit then begin + Text := String(Value); + Result := 0; + end + else begin + SendMessage(Handle, EM_EXLIMITTEXT, 0, LParam($7FFFFFFE)); + Result := StreamIn(SF_RTF); + if Result <> 0 then + Result := StreamIn(SF_TEXT); + end; +end; + +procedure TRichEditViewer.SetRTFTextProp(const Value: AnsiString); +begin + SetRTFText(Value); +end; + +procedure TRichEditViewer.CMColorChanged(var Message: TMessage); +begin + inherited; + UpdateBackgroundColor; +end; + +procedure TRichEditViewer.CMSysColorChange(var Message: TMessage); +begin + inherited; + UpdateBackgroundColor; +end; + +procedure TRichEditViewer.CNNotify(var Message: TWMNotify); +var + EnLink: PEnLink; + CharRange: TCharRange; + TextRange: TTextRange; + Len: Integer; + URL: String; +begin + case Message.NMHdr^.code of + EN_LINK: begin + EnLink := PEnLink(Message.NMHdr); + if EnLink.msg = WM_LBUTTONUP then begin + CharRange := EnLink.chrg; + if (CharRange.cpMin >= 0) and (CharRange.cpMax > CharRange.cpMin) then begin + Len := CharRange.cpMax - CharRange.cpMin; + Inc(Len); { for null terminator } + if Len > 1 then begin + SetLength(URL, Len); + TextRange.chrg := CharRange; + TextRange.lpstrText := PChar(URL); + SetLength(URL, SendMessage(Handle, EM_GETTEXTRANGE, 0, LParam(@TextRange))); + if URL <> '' then + ShellExecute(Handle, 'open', PChar(URL), nil, nil, SW_SHOWNORMAL); + end; + end; + end; + end; + end; +end; + +procedure Register; +begin + RegisterComponents('JR', [TRichEditViewer]); +end; + +end. diff --git a/Components/ScintEdit.pas b/Components/ScintEdit.pas new file mode 100644 index 000000000..4dc6100fd --- /dev/null +++ b/Components/ScintEdit.pas @@ -0,0 +1,2048 @@ +unit ScintEdit; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TScintEdit component: a VCL wrapper for Scintilla + + $jrsoftware: issrc/Components/ScintEdit.pas,v 1.22 2010/12/28 06:52:20 jr Exp $ +} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, ScintInt; + +type + TScintEditChangeInfo = record + Inserting: Boolean; + StartPos, Length, LinesDelta: Integer; + end; + TScintEditChangeEvent = procedure(Sender: TObject; + const Info: TScintEditChangeInfo) of object; + TScintEditCharAddedEvent = procedure(Sender: TObject; Ch: AnsiChar) of object; + TScintEditDropFilesEvent = procedure(Sender: TObject; X, Y: Integer; + AFiles: TStrings) of object; + TScintHintInfo = {$IFDEF UNICODE} Controls. {$ENDIF} THintInfo; + TScintEditHintShowEvent = procedure(Sender: TObject; + var Info: TScintHintInfo) of object; + TScintEditMarginClickEvent = procedure(Sender: TObject; MarginNumber: Integer; + Line: Integer) of object; + TScintFindOption = (sfoMatchCase, sfoWholeWord); + TScintFindOptions = set of TScintFindOption; + TScintIndentationGuides = (sigNone, sigReal, sigLookForward, sigLookBoth); + TScintIndicatorNumber = 0..2; + TScintIndicatorNumbers = set of TScintIndicatorNumber; + TScintLineEndings = (sleCRLF, sleCR, sleLF); + TScintLineState = type Integer; + TScintMarkerNumber = 0..31; + TScintMarkerNumbers = set of TScintMarkerNumber; + TScintRange = record + StartPos, EndPos: Integer; + end; + TScintRawCharSet = set of AnsiChar; + TScintRawString = type {$IFDEF UNICODE} RawByteString {$ELSE} AnsiString {$ENDIF}; + TScintStyleNumber = 0..31; + TScintVirtualSpaceOption = (svsRectangularSelection, svsUserAccessible); + TScintVirtualSpaceOptions = set of TScintVirtualSpaceOption; + + TScintEditStrings = class; + TScintCustomStyler = class; + + TScintEdit = class(TWinControl) + private + FAcceptDroppedFiles: Boolean; + FAutoCompleteFontName: String; + FAutoCompleteFontSize: Integer; + FCodePage: Integer; + FDirectPtr: Pointer; + FEffectiveCodePage: Integer; + FEffectiveCodePageDBCS: Boolean; + FFillSelectionToEdge: Boolean; + FForceModified: Boolean; + FIndentationGuides: TScintIndentationGuides; + FLeadBytes: TScintRawCharSet; + FLines: TScintEditStrings; + FOnChange: TScintEditChangeEvent; + FOnCharAdded: TScintEditCharAddedEvent; + FOnDropFiles: TScintEditDropFilesEvent; + FOnHintShow: TScintEditHintShowEvent; + FOnMarginClick: TScintEditMarginClickEvent; + FOnModifiedChange: TNotifyEvent; + FOnUpdateUI: TNotifyEvent; + FReportCaretPositionToStyler: Boolean; + FStyler: TScintCustomStyler; + FTabWidth: Integer; + FUseStyleAttributes: Boolean; + FUseTabCharacter: Boolean; + FVirtualSpaceOptions: TScintVirtualSpaceOptions; + FWordWrap: Boolean; + procedure ApplyOptions; + function GetAutoCompleteActive: Boolean; + function GetCaretColumn: Integer; + function GetCaretColumnExpanded: Integer; + function GetCaretLine: Integer; + function GetCaretPosition: Integer; + function GetCaretVirtualSpace: Integer; + function GetInsertMode: Boolean; + function GetLineEndings: TScintLineEndings; + function GetLineEndingString: TScintRawString; + function GetLineHeight: Integer; + function GetLinesInWindow: Integer; + function GetModified: Boolean; + function GetRawSelText: TScintRawString; + function GetRawText: TScintRawString; + function GetRawTextLength: Integer; + function GetReadOnly: Boolean; + function GetSelection: TScintRange; + function GetSelText: String; + function GetTopLine: Integer; + function GetZoom: Integer; + procedure SetAcceptDroppedFiles(const Value: Boolean); + procedure SetAutoCompleteFontName(const Value: String); + procedure SetAutoCompleteFontSize(const Value: Integer); + procedure SetCodePage(const Value: Integer); + procedure SetCaretColumn(const Value: Integer); + procedure SetCaretLine(const Value: Integer); + procedure SetCaretPosition(const Value: Integer); + procedure SetCaretVirtualSpace(const Value: Integer); + procedure SetFillSelectionToEdge(const Value: Boolean); + procedure SetIndentationGuides(const Value: TScintIndentationGuides); + procedure SetRawSelText(const Value: TScintRawString); + procedure SetRawText(const Value: TScintRawString); + procedure SetReadOnly(const Value: Boolean); + procedure SetSelection(const Value: TScintRange); + procedure SetSelText(const Value: String); + procedure SetStyler(const Value: TScintCustomStyler); + procedure SetTabWidth(const Value: Integer); + procedure SetTopLine(const Value: Integer); + procedure SetUseStyleAttributes(const Value: Boolean); + procedure SetUseTabCharacter(const Value: Boolean); + procedure SetVirtualSpaceOptions(const Value: TScintVirtualSpaceOptions); + procedure SetWordWrap(const Value: Boolean); + procedure SetZoom(const Value: Integer); + procedure StyleNeeded(const EndPos: Integer); + procedure UpdateCodePage; + procedure UpdateStyleAttributes; + procedure CMColorChanged(var Message: TMessage); message CM_COLORCHANGED; + procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED; + procedure CMHintShow(var Message: TCMHintShow); message CM_HINTSHOW; + procedure CMSysColorChange(var Message: TMessage); message CM_SYSCOLORCHANGE; + procedure CNNotify(var Message: TWMNotify); message CN_NOTIFY; + procedure WMDestroy(var Message: TWMDestroy); message WM_DESTROY; + procedure WMDropFiles(var Message: TWMDropFiles); message WM_DROPFILES; + procedure WMEraseBkgnd(var Message: TMessage); message WM_ERASEBKGND; + procedure WMGetDlgCode(var Message: TWMGetDlgCode); message WM_GETDLGCODE; + procedure WMMouseWheel(var Message: TMessage); message WM_MOUSEWHEEL; + protected + procedure Change(const AInserting: Boolean; const AStartPos, ALength, + ALinesDelta: Integer); virtual; + procedure CheckPosRange(const StartPos, EndPos: Integer); + procedure CreateParams(var Params: TCreateParams); override; + procedure CreateWnd; override; + class procedure Error(const S: String); + class procedure ErrorFmt(const S: String; const Args: array of const); + function GetMainSelection: Integer; + function GetTarget: TScintRange; + procedure InitRawString(var S: TScintRawString; const Len: Integer); + procedure Notification(AComponent: TComponent; Operation: TOperation); override; + procedure Notify(const N: TSCNotification); virtual; + procedure SetTarget(const StartPos, EndPos: Integer); + public + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; + procedure AddMarker(const Line: Integer; const Marker: TScintMarkerNumber); + procedure BeginUndoAction; + function Call(Msg: Cardinal; WParam: Longint; LParam: Longint): Longint; + function CallStr(Msg: Cardinal; WParam: Longint; + const LParamStr: TScintRawString): Longint; + procedure CancelAutoComplete; + function CanRedo: Boolean; + function CanUndo: Boolean; + procedure ChooseCaretX; + procedure ClearAll; + procedure ClearSelection; + procedure ClearUndo; + function ConvertRawStringToString(const S: TScintRawString): String; + function ConvertPCharToRawString(const Text: PChar; + const TextLen: Integer): TScintRawString; + function ConvertStringToRawString(const S: String): TScintRawString; + procedure CopyToClipboard; + procedure CutToClipboard; + procedure DeleteAllMarkersOnLine(const Line: Integer); + procedure DeleteMarker(const Line: Integer; const Marker: TScintMarkerNumber); + procedure EndUndoAction; + function FindRawText(const StartPos, EndPos: Integer; const S: TScintRawString; + const Options: TScintFindOptions; out MatchRange: TScintRange): Boolean; + function FindText(const StartPos, EndPos: Integer; const S: String; + const Options: TScintFindOptions; out MatchRange: TScintRange): Boolean; + procedure ForceModifiedState; + function GetCharAtPosition(const Pos: Integer): AnsiChar; + function GetColumnFromPosition(const Pos: Integer): Integer; + function GetDocLineFromVisibleLine(const VisibleLine: Integer): Integer; + function GetIndicatorsAtPosition(const Pos: Integer): TScintIndicatorNumbers; + function GetLineEndPosition(const Line: Integer): Integer; + function GetLineFromPosition(const Pos: Integer): Integer; + function GetLineIndentation(const Line: Integer): Integer; + function GetLineIndentPosition(const Line: Integer): Integer; + function GetMarkers(const Line: Integer): TScintMarkerNumbers; + function GetPointFromPosition(const Pos: Integer): TPoint; + function GetPositionAfter(const Pos: Integer): Integer; + function GetPositionBefore(const Pos: Integer): Integer; + function GetPositionFromLine(const Line: Integer): Integer; + function GetPositionFromLineColumn(const Line, Column: Integer): Integer; + function GetPositionFromLineExpandedColumn(const Line, ExpandedColumn: Integer): Integer; + function GetPositionFromPoint(const P: TPoint; + const CharPosition, CloseOnly: Boolean): Integer; + function GetPositionOfMatchingBrace(const Pos: Integer): Integer; + function GetRawTextRange(const StartPos, EndPos: Integer): TScintRawString; + function GetStyleAtPosition(const Pos: Integer): TScintStyleNumber; + function GetTextRange(const StartPos, EndPos: Integer): String; + function GetVisibleLineFromDocLine(const DocLine: Integer): Integer; + function GetWordEndPosition(const Pos: Integer; const OnlyWordChars: Boolean): Integer; + function GetWordStartPosition(const Pos: Integer; const OnlyWordChars: Boolean): Integer; + function IsPositionInViewVertically(const Pos: Integer): Boolean; + procedure PasteFromClipboard; + function RawSelTextEquals(const S: TScintRawString; const MatchCase: Boolean): Boolean; + procedure Redo; + function ReplaceRawTextRange(const StartPos, EndPos: Integer; + const S: TScintRawString): TScintRange; + function ReplaceTextRange(const StartPos, EndPos: Integer; const S: String): TScintRange; + procedure RestyleLine(const Line: Integer); + procedure ScrollCaretIntoView; + function SelAvail: Boolean; + procedure SelectAll; + function SelTextEquals(const S: String; const MatchCase: Boolean): Boolean; + procedure SetAutoCompleteFillupChars(const FillupChars: AnsiString); + procedure SetAutoCompleteSelectedItem(const S: TScintRawString); + procedure SetAutoCompleteStopChars(const StopChars: AnsiString); + procedure SetBraceHighlighting(const Pos1, Pos2: Integer); + procedure SetCursorID(const CursorID: Integer); + procedure SetEmptySelection; + procedure SetLineIndentation(const Line, Indentation: Integer); + procedure SetSavePoint; + procedure ShowAutoComplete(const CharsEntered: Integer; const WordList: AnsiString); + procedure Undo; + function WordAtCursor: String; + procedure ZoomIn; + procedure ZoomOut; + property AutoCompleteActive: Boolean read GetAutoCompleteActive; + property CaretColumn: Integer read GetCaretColumn write SetCaretColumn; + property CaretColumnExpanded: Integer read GetCaretColumnExpanded; + property CaretLine: Integer read GetCaretLine write SetCaretLine; + property CaretPosition: Integer read GetCaretPosition write SetCaretPosition; + property CaretVirtualSpace: Integer read GetCaretVirtualSpace write SetCaretVirtualSpace; + property EffectiveCodePage: Integer read FEffectiveCodePage; + property InsertMode: Boolean read GetInsertMode; + property LineEndings: TScintLineEndings read GetLineEndings; + property LineEndingString: TScintRawString read GetLineEndingString; + property LineHeight: Integer read GetLineHeight; + property Lines: TScintEditStrings read FLines; + property LinesInWindow: Integer read GetLinesInWindow; + property Modified: Boolean read GetModified; + property RawSelText: TScintRawString read GetRawSelText write SetRawSelText; + property RawText: TScintRawString read GetRawText write SetRawText; + property RawTextLength: Integer read GetRawTextLength; + property ReadOnly: Boolean read GetReadOnly write SetReadOnly; + property Selection: TScintRange read GetSelection write SetSelection; + property SelText: String read GetSelText write SetSelText; + property Styler: TScintCustomStyler read FStyler write SetStyler; + property TopLine: Integer read GetTopLine write SetTopLine; + published + property AcceptDroppedFiles: Boolean read FAcceptDroppedFiles write SetAcceptDroppedFiles + default False; + property AutoCompleteFontName: String read FAutoCompleteFontName + write SetAutoCompleteFontName; + property AutoCompleteFontSize: Integer read FAutoCompleteFontSize + write SetAutoCompleteFontSize default 0; + property CodePage: Integer read FCodePage write SetCodePage default 0; + property FillSelectionToEdge: Boolean read FFillSelectionToEdge write SetFillSelectionToEdge + default False; + property Font; + property IndentationGuides: TScintIndentationGuides read FIndentationGuides + write SetIndentationGuides default sigNone; + property ParentFont; + property PopupMenu; + property ReportCaretPositionToStyler: Boolean read FReportCaretPositionToStyler + write FReportCaretPositionToStyler; + property TabStop default True; + property TabWidth: Integer read FTabWidth write SetTabWidth default 8; + property UseStyleAttributes: Boolean read FUseStyleAttributes write SetUseStyleAttributes + default True; + property UseTabCharacter: Boolean read FUseTabCharacter write SetUseTabCharacter + default True; + property VirtualSpaceOptions: TScintVirtualSpaceOptions read FVirtualSpaceOptions + write SetVirtualSpaceOptions default []; + property WordWrap: Boolean read FWordWrap write SetWordWrap default False; + property Zoom: Integer read GetZoom write SetZoom default 0; + property OnChange: TScintEditChangeEvent read FOnChange write FOnChange; + property OnCharAdded: TScintEditCharAddedEvent read FOnCharAdded write FOnCharAdded; + property OnDropFiles: TScintEditDropFilesEvent read FOnDropFiles write FOnDropFiles; + property OnHintShow: TScintEditHintShowEvent read FOnHintShow write FOnHintShow; + property OnKeyDown; + property OnKeyPress; + property OnKeyUp; + property OnMarginClick: TScintEditMarginClickEvent read FOnMarginClick write FOnMarginClick; + property OnModifiedChange: TNotifyEvent read FOnModifiedChange write FOnModifiedChange; + property OnMouseDown; + property OnMouseMove; + property OnMouseUp; + property OnUpdateUI: TNotifyEvent read FOnUpdateUI write FOnUpdateUI; + end; + + TScintEditStrings = class(TStrings) + private + FEdit: TScintEdit; + function GetLineEndingLength(const Index: Integer): Integer; + function GetRawLine(Index: Integer): TScintRawString; + function GetRawLineWithEnding(Index: Integer): TScintRawString; + function GetRawLineLength(Index: Integer): Integer; + function GetRawLineLengthWithEnding(Index: Integer): Integer; + function GetState(Index: Integer): TScintLineState; + procedure PutRawLine(Index: Integer; const S: TScintRawString); + protected + procedure CheckIndexRange(const Index: Integer); + procedure CheckIndexRangePlusOne(const Index: Integer); +{$IFNDEF UNICODE} + class procedure Error(Msg: PResStringRec; Data: Integer); +{$ENDIF} + function Get(Index: Integer): String; override; + function GetCount: Integer; override; + function GetTextStr: String; override; + procedure Put(Index: Integer; const S: String); override; + procedure SetTextStr(const Value: String); override; + public + procedure Clear; override; + procedure Delete(Index: Integer); override; + procedure Insert(Index: Integer; const S: String); override; + procedure InsertRawLine(Index: Integer; const S: TScintRawString); + procedure SetText(Text: PChar); override; + property RawLineLengths[Index: Integer]: Integer read GetRawLineLength; + property RawLineLengthsWithEnding[Index: Integer]: Integer read GetRawLineLengthWithEnding; + property RawLines[Index: Integer]: TScintRawString read GetRawLine write PutRawLine; + property RawLinesWithEnding[Index: Integer]: TScintRawString read GetRawLineWithEnding; + property State[Index: Integer]: TScintLineState read GetState; + end; + + TScintStyleAttributes = record + FontName: String; + FontSize: Integer; + FontStyle: TFontStyles; + FontCharset: TFontCharset; + ForeColor: TColor; + BackColor: TColor; + end; + + TScintCustomStyler = class(TComponent) + private + FCaretIndex: Integer; + FCurIndex: Integer; + FLineState: TScintLineState; + FStyleStartIndex: Integer; + FStyleStr: AnsiString; + FText: TScintRawString; + FTextLen: Integer; + function GetCurChar: AnsiChar; + function GetEndOfLine: Boolean; + protected + procedure ApplyIndicators(const Indicators: TScintIndicatorNumbers; + StartIndex, EndIndex: Integer); + procedure ApplyStyle(const Style: TScintStyleNumber; + StartIndex, EndIndex: Integer); + procedure CommitStyle(const Style: TScintStyleNumber); + function ConsumeAllRemaining: Boolean; + function ConsumeChar(const C: AnsiChar): Boolean; + function ConsumeChars(const Chars: TScintRawCharSet): Boolean; + function ConsumeCharsNot(const Chars: TScintRawCharSet): Boolean; + function ConsumeString(const Chars: TScintRawCharSet): TScintRawString; + function CurCharIn(const Chars: TScintRawCharSet): Boolean; + function CurCharIs(const C: AnsiChar): Boolean; + procedure GetStyleAttributes(const Style: Integer; + var Attributes: TScintStyleAttributes); virtual; abstract; + function LineTextSpans(const S: TScintRawString): Boolean; virtual; + function NextCharIs(const C: AnsiChar): Boolean; + function PreviousCharIn(const Chars: TScintRawCharSet): Boolean; + procedure ReplaceText(StartIndex, EndIndex: Integer; const C: AnsiChar); + procedure StyleNeeded; virtual; abstract; + property CaretIndex: Integer read FCaretIndex; + property CurChar: AnsiChar read GetCurChar; + property CurIndex: Integer read FCurIndex; + property EndOfLine: Boolean read GetEndOfLine; + property LineState: TScintLineState read FLineState write FLineState; + property StyleStartIndex: Integer read FStyleStartIndex; + property Text: TScintRawString read FText; + property TextLength: Integer read FTextLen; + end; + + EScintEditError = class(Exception); + +implementation + +uses + ShellAPI, +{$IFDEF UNICODE} + RTLConsts; +{$ELSE} + Consts; +{$ENDIF} + +{ TScintEdit } + +constructor TScintEdit.Create(AOwner: TComponent); +begin + inherited; + FLines := TScintEditStrings.Create; + FLines.FEdit := Self; + FTabWidth := 8; + FUseStyleAttributes := True; + FUseTabCharacter := True; + SetBounds(0, 0, 257, 193); + ParentColor := False; + TabStop := True; +end; + +destructor TScintEdit.Destroy; +begin + SetStyler(nil); + FLines.Free; + FLines := nil; + inherited; +end; + +procedure TScintEdit.AddMarker(const Line: Integer; + const Marker: TScintMarkerNumber); +begin + FLines.CheckIndexRange(Line); + Call(SCI_MARKERADD, Line, Marker); +end; + +procedure TScintEdit.ApplyOptions; +const + IndentationGuides: array [TScintIndentationGuides] of Integer = (SC_IV_NONE, SC_IV_REAL, + SC_IV_LOOKFORWARD, SC_IV_LOOKBOTH); +var + Flags: Integer; +begin + if not HandleAllocated then + Exit; + Call(SCI_SETSELEOLFILLED, Ord(FFillSelectionToEdge), 0); + Call(SCI_SETTABWIDTH, FTabWidth, 0); + Call(SCI_SETUSETABS, Ord(FUseTabCharacter), 0); + Flags := 0; + if svsRectangularSelection in VirtualSpaceOptions then + Flags := Flags or SCVS_RECTANGULARSELECTION; + if svsUserAccessible in VirtualSpaceOptions then + Flags := Flags or SCVS_USERACCESSIBLE; + Call(SCI_SETVIRTUALSPACEOPTIONS, Flags, 0); + Call(SCI_SETWRAPMODE, Ord(FWordWrap), 0); + Call(SCI_SETINDENTATIONGUIDES, IndentationGuides[FIndentationGuides], 0); +end; + +procedure TScintEdit.BeginUndoAction; +begin + Call(SCI_BEGINUNDOACTION, 0, 0); +end; + +function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint): Longint; +var + ErrorStatus: LRESULT; +begin + HandleNeeded; + if FDirectPtr = nil then + Error('Call: FDirectPtr is nil'); + Result := Scintilla_DirectFunction(FDirectPtr, Msg, WParam, LParam); + + ErrorStatus := Scintilla_DirectFunction(FDirectPtr, SCI_GETSTATUS, 0, 0); + if ErrorStatus <> 0 then begin + Scintilla_DirectFunction(FDirectPtr, SCI_SETSTATUS, 0, 0); + ErrorFmt('Error status %d returned after Call(%u, %d, %d) = %d', + [ErrorStatus, Msg, WParam, LParam, Result]); + end; +end; + +function TScintEdit.CallStr(Msg: Cardinal; WParam: Longint; + const LParamStr: TScintRawString): Longint; +begin + Result := Call(Msg, WParam, LPARAM(PAnsiChar(LParamStr))); +end; + +procedure TScintEdit.CancelAutoComplete; +begin + Call(SCI_AUTOCCANCEL, 0, 0); +end; + +function TScintEdit.CanRedo: Boolean; +begin + Result := Call(SCI_CANREDO, 0, 0) <> 0; +end; + +function TScintEdit.CanUndo: Boolean; +begin + Result := Call(SCI_CANUNDO, 0, 0) <> 0; +end; + +procedure TScintEdit.Change(const AInserting: Boolean; + const AStartPos, ALength, ALinesDelta: Integer); +var + Info: TScintEditChangeInfo; +begin + inherited Changed; + if Assigned(FOnChange) then begin + Info.Inserting := AInserting; + Info.StartPos := AStartPos; + Info.Length := ALength; + Info.LinesDelta := ALinesDelta; + FOnChange(Self, Info); + end; +end; + +procedure TScintEdit.CheckPosRange(const StartPos, EndPos: Integer); +begin + if (StartPos < 0) or (StartPos > EndPos) or (EndPos > GetRawTextLength) then + ErrorFmt('CheckPosRange: Invalid range (%d, %d)', [StartPos, EndPos]); +end; + +procedure TScintEdit.ChooseCaretX; +begin + Call(SCI_CHOOSECARETX, 0, 0); +end; + +procedure TScintEdit.ClearAll; +begin + Call(SCI_CLEARALL, 0, 0); + ChooseCaretX; +end; + +procedure TScintEdit.ClearSelection; +begin + Call(SCI_CLEAR, 0, 0); +end; + +procedure TScintEdit.ClearUndo; +begin + { SCI_EMPTYUNDOBUFFER resets the save point but doesn't send a + SCN_SAVEPOINTREACHED notification. Call SetSavePoint manually to get + that. SetSavePoint additionally resets FForceModified. } + SetSavePoint; + Call(SCI_EMPTYUNDOBUFFER, 0, 0); +end; + +function TScintEdit.ConvertRawStringToString(const S: TScintRawString): String; +{$IFDEF UNICODE} +var + SrcLen, DestLen: Integer; + DestStr: UnicodeString; +begin + SrcLen := Length(S); + if SrcLen > 0 then begin + DestLen := MultiByteToWideChar(FCodePage, 0, PAnsiChar(S), SrcLen, nil, 0); + if DestLen <= 0 then + Error('MultiByteToWideChar failed'); + SetString(DestStr, nil, DestLen); + if MultiByteToWideChar(FCodePage, 0, PAnsiChar(S), SrcLen, @DestStr[1], + Length(DestStr)) <> DestLen then + Error('Unexpected result from MultiByteToWideChar'); + end; + Result := DestStr; +end; +{$ELSE} +begin + Result := S; +end; +{$ENDIF} + +function TScintEdit.ConvertPCharToRawString(const Text: PChar; + const TextLen: Integer): TScintRawString; +var +{$IFDEF UNICODE} + DestLen: Integer; +{$ENDIF} + DestStr: TScintRawString; +begin + if TextLen > 0 then begin +{$IFDEF UNICODE} + DestLen := WideCharToMultiByte(FCodePage, 0, Text, TextLen, nil, 0, nil, nil); + if DestLen <= 0 then + Error('WideCharToMultiByte failed'); + InitRawString(DestStr, DestLen); + if WideCharToMultiByte(FCodePage, 0, Text, TextLen, @DestStr[1], Length(DestStr), + nil, nil) <> DestLen then + Error('Unexpected result from WideCharToMultiByte'); +{$ELSE} + SetString(DestStr, Text, TextLen); +{$ENDIF} + end; + Result := DestStr; +end; + +function TScintEdit.ConvertStringToRawString(const S: String): TScintRawString; +begin +{$IFDEF UNICODE} + Result := ConvertPCharToRawString(PChar(S), Length(S)); +{$ELSE} + Result := S; +{$ENDIF} +end; + +procedure TScintEdit.CopyToClipboard; +begin + Call(SCI_COPY, 0, 0); +end; + +procedure TScintEdit.CreateParams(var Params: TCreateParams); +begin + inherited; + CreateSubClass(Params, 'Scintilla'); + Params.ExStyle := Params.ExStyle or WS_EX_CLIENTEDGE; + Params.WindowClass.style := Params.WindowClass.style and + not (CS_HREDRAW or CS_VREDRAW); +end; + +procedure TScintEdit.CreateWnd; +begin + inherited; + FDirectPtr := Pointer(SendMessage(Handle, SCI_GETDIRECTPOINTER, 0, 0)); + if FDirectPtr = nil then + Error('CreateWnd: FDirectPtr is nil'); + UpdateCodePage; + Call(SCI_SETCARETPERIOD, GetCaretBlinkTime, 0); + Call(SCI_SETSCROLLWIDTHTRACKING, 1, 0); + { The default popup menu conflicts with the VCL's PopupMenu on Delphi 3 } + Call(SCI_USEPOPUP, 0, 0); +{$IFNDEF UNICODE} + { This hack is needed because non-Unicode VCL replaces the Scintilla's + default Unicode window proc with an ANSI one } + if Win32Platform = VER_PLATFORM_WIN32_NT then + Call(SCI_SETKEYSUNICODE, 1, 0); +{$ENDIF} + ApplyOptions; + UpdateStyleAttributes; + if FAcceptDroppedFiles then + DragAcceptFiles(Handle, True); +end; + +procedure TScintEdit.CutToClipboard; +begin + Call(SCI_CUT, 0, 0); +end; + +procedure TScintEdit.DeleteAllMarkersOnLine(const Line: Integer); +begin + FLines.CheckIndexRange(Line); + Call(SCI_MARKERDELETE, Line, -1); +end; + +procedure TScintEdit.DeleteMarker(const Line: Integer; + const Marker: TScintMarkerNumber); +begin + FLines.CheckIndexRange(Line); + Call(SCI_MARKERDELETE, Line, Marker); +end; + +procedure TScintEdit.EndUndoAction; +begin + Call(SCI_ENDUNDOACTION, 0, 0); +end; + +class procedure TScintEdit.Error(const S: String); +begin + raise EScintEditError.Create('TScintEdit error: ' + S); +end; + +class procedure TScintEdit.ErrorFmt(const S: String; const Args: array of const); +begin + Error(Format(S, Args)); +end; + +function TScintEdit.FindRawText(const StartPos, EndPos: Integer; + const S: TScintRawString; const Options: TScintFindOptions; + out MatchRange: TScintRange): Boolean; +var + Flags: Integer; +begin + Flags := 0; + if sfoMatchCase in Options then + Flags := Flags or SCFIND_MATCHCASE; + if sfoWholeWord in Options then + Flags := Flags or SCFIND_WHOLEWORD; + + SetTarget(StartPos, EndPos); + Call(SCI_SETSEARCHFLAGS, Flags, 0); + Result := Call(SCI_SEARCHINTARGET, Length(S), LPARAM(PAnsiChar(S))) >= 0; + if Result then + MatchRange := GetTarget; +end; + +function TScintEdit.FindText(const StartPos, EndPos: Integer; const S: String; + const Options: TScintFindOptions; out MatchRange: TScintRange): Boolean; +begin + Result := FindRawText(StartPos, EndPos, ConvertStringToRawString(S), + Options, MatchRange); +end; + +procedure TScintEdit.ForceModifiedState; +begin + if not FForceModified then begin + FForceModified := True; + if Assigned(FOnModifiedChange) then + FOnModifiedChange(Self); + end; +end; + +function TScintEdit.GetAutoCompleteActive: Boolean; +begin + Result := Call(SCI_AUTOCACTIVE, 0, 0) <> 0; +end; + +function TScintEdit.GetCaretColumn: Integer; +begin + Result := GetColumnFromPosition(GetCaretPosition); +end; + +function TScintEdit.GetCaretColumnExpanded: Integer; +begin + Result := Call(SCI_GETCOLUMN, GetCaretPosition, 0); + Inc(Result, GetCaretVirtualSpace); +end; + +function TScintEdit.GetCaretLine: Integer; +begin + Result := GetLineFromPosition(GetCaretPosition); +end; + +function TScintEdit.GetCaretPosition: Integer; +begin + Result := Call(SCI_GETCURRENTPOS, 0, 0); +end; + +function TScintEdit.GetCaretVirtualSpace: Integer; +begin + Result := Call(SCI_GETSELECTIONNCARETVIRTUALSPACE, GetMainSelection, 0); +end; + +function TScintEdit.GetCharAtPosition(const Pos: Integer): AnsiChar; +begin + Result := AnsiChar(Call(SCI_GETCHARAT, Pos, 0)); +end; + +function TScintEdit.GetColumnFromPosition(const Pos: Integer): Integer; +var + Line: Integer; +begin + Line := GetLineFromPosition(Pos); + Result := Pos - GetPositionFromLine(Line); +end; + +function TScintEdit.GetDocLineFromVisibleLine(const VisibleLine: Integer): Integer; +begin + Result := Call(SCI_DOCLINEFROMVISIBLE, VisibleLine, 0); +end; + +function TScintEdit.GetIndicatorsAtPosition(const Pos: Integer): TScintIndicatorNumbers; +var + Indic: Byte; +begin + Indic := Byte(Call(SCI_GETSTYLEAT, Pos, 0)) shr 5; + Result := TScintIndicatorNumbers(Indic); +end; + +function TScintEdit.GetInsertMode: Boolean; +begin + Result := Call(SCI_GETOVERTYPE, 0, 0) = 0; +end; + +function TScintEdit.GetLineEndings: TScintLineEndings; +begin + case Call(SCI_GETEOLMODE, 0, 0) of + SC_EOL_CR: Result := sleCR; + SC_EOL_LF: Result := sleLF; + else + Result := sleCRLF; + end; +end; + +function TScintEdit.GetLineEndingString: TScintRawString; +const + EndingStrs: array[TScintLineEndings] of TScintRawString = + (#13#10, #13, #10); +begin + Result := EndingStrs[LineEndings]; +end; + +function TScintEdit.GetLineEndPosition(const Line: Integer): Integer; +begin + FLines.CheckIndexRange(Line); + Result := Call(SCI_GETLINEENDPOSITION, Line, 0); +end; + +function TScintEdit.GetLineFromPosition(const Pos: Integer): Integer; +begin + Result := Call(SCI_LINEFROMPOSITION, Pos, 0); +end; + +function TScintEdit.GetLineHeight: Integer; +begin + Result := Call(SCI_TEXTHEIGHT, 0, 0); +end; + +function TScintEdit.GetLineIndentation(const Line: Integer): Integer; +begin + FLines.CheckIndexRange(Line); + Result := Call(SCI_GETLINEINDENTATION, Line, 0); +end; + +function TScintEdit.GetLineIndentPosition(const Line: Integer): Integer; +begin + FLines.CheckIndexRange(Line); + Result := Call(SCI_GETLINEINDENTPOSITION, Line, 0); +end; + +function TScintEdit.GetLinesInWindow: Integer; +begin + Result := Call(SCI_LINESONSCREEN, 0, 0); +end; + +function TScintEdit.GetMainSelection: Integer; +begin + Result := Call(SCI_GETMAINSELECTION, 0, 0); +end; + +function TScintEdit.GetMarkers(const Line: Integer): TScintMarkerNumbers; +begin + FLines.CheckIndexRange(Line); + Integer(Result) := Call(SCI_MARKERGET, Line, 0); +end; + +function TScintEdit.GetModified: Boolean; +begin + Result := FForceModified or (Call(SCI_GETMODIFY, 0, 0) <> 0); +end; + +function TScintEdit.GetPointFromPosition(const Pos: Integer): TPoint; +begin + Result.X := Call(SCI_POINTXFROMPOSITION, 0, Pos); + Result.Y := Call(SCI_POINTYFROMPOSITION, 0, Pos); +end; + +function TScintEdit.GetPositionAfter(const Pos: Integer): Integer; +begin + Result := Call(SCI_POSITIONAFTER, Pos, 0); +end; + +function TScintEdit.GetPositionBefore(const Pos: Integer): Integer; +begin + Result := Call(SCI_POSITIONBEFORE, Pos, 0); +end; + +function TScintEdit.GetPositionFromLine(const Line: Integer): Integer; +begin + FLines.CheckIndexRangePlusOne(Line); + Result := Call(SCI_POSITIONFROMLINE, Line, 0); +end; + +function TScintEdit.GetPositionFromLineColumn(const Line, Column: Integer): Integer; +var + Col, Len: Integer; +begin + Col := Column; + Result := GetPositionFromLine(Line); + Len := GetLineEndPosition(Line) - Result; + if Col > Len then + Col := Len; + if Col > 0 then + Inc(Result, Col); +end; + +function TScintEdit.GetPositionFromLineExpandedColumn(const Line, + ExpandedColumn: Integer): Integer; +begin + FLines.CheckIndexRange(Line); + Result := Call(SCI_FINDCOLUMN, Line, ExpandedColumn); +end; + +function TScintEdit.GetPositionFromPoint(const P: TPoint; + const CharPosition, CloseOnly: Boolean): Integer; +begin + if CharPosition then begin + if CloseOnly then + Result := Call(SCI_CHARPOSITIONFROMPOINTCLOSE, P.X, P.Y) + else + Result := Call(SCI_CHARPOSITIONFROMPOINT, P.X, P.Y); + end + else begin + if CloseOnly then + Result := Call(SCI_POSITIONFROMPOINTCLOSE, P.X, P.Y) + else + Result := Call(SCI_POSITIONFROMPOINT, P.X, P.Y); + end; +end; + +function TScintEdit.GetPositionOfMatchingBrace(const Pos: Integer): Integer; +begin + Result := Call(SCI_BRACEMATCH, Pos, 0); +end; + +function TScintEdit.GetRawSelText: TScintRawString; +var + Len: Integer; + S: TScintRawString; +begin + Len := Call(SCI_GETSELTEXT, 0, 0) - 1; + if Len > 0 then begin + InitRawString(S, Len); + Call(SCI_GETSELTEXT, 0, LPARAM(PAnsiChar(@S[1]))); + end; + Result := S; +end; + +function TScintEdit.GetRawText: TScintRawString; +begin + Result := GetRawTextRange(0, GetRawTextLength); +end; + +function TScintEdit.GetRawTextLength: Integer; +begin + Result := Call(SCI_GETLENGTH, 0, 0); +end; + +function TScintEdit.GetRawTextRange(const StartPos, EndPos: Integer): TScintRawString; +var + S: TScintRawString; + Range: TSci_TextRange; +begin + CheckPosRange(StartPos, EndPos); + if EndPos > StartPos then begin + InitRawString(S, EndPos - StartPos); + Range.chrg.cpMin := StartPos; + Range.chrg.cpMax := EndPos; + Range.lpstrText := @S[1]; + if Call(SCI_GETTEXTRANGE, 0, LPARAM(@Range)) <> EndPos - StartPos then + Error('Unexpected result from SCI_GETTEXTRANGE'); + end; + Result := S; +end; + +function TScintEdit.GetReadOnly: Boolean; +begin + Result := Call(SCI_GETREADONLY, 0, 0) <> 0; +end; + +function TScintEdit.GetSelection: TScintRange; +begin + Result.StartPos := Call(SCI_GETSELECTIONSTART, 0, 0); + Result.EndPos := Call(SCI_GETSELECTIONEND, 0, 0); +end; + +function TScintEdit.GetSelText: String; +begin + Result := ConvertRawStringToString(GetRawSelText); +end; + +function TScintEdit.GetStyleAtPosition(const Pos: Integer): TScintStyleNumber; +begin + Result := Call(SCI_GETSTYLEAT, Pos, 0) and $1F; +end; + +function TScintEdit.GetTarget: TScintRange; +begin + Result.StartPos := Call(SCI_GETTARGETSTART, 0, 0); + Result.EndPos := Call(SCI_GETTARGETEND, 0, 0); +end; + +function TScintEdit.GetTextRange(const StartPos, EndPos: Integer): String; +begin + Result := ConvertRawStringToString(GetRawTextRange(StartPos, EndPos)); +end; + +function TScintEdit.GetTopLine: Integer; +begin + Result := Call(SCI_GETFIRSTVISIBLELINE, 0, 0); +end; + +function TScintEdit.GetVisibleLineFromDocLine(const DocLine: Integer): Integer; +begin + FLines.CheckIndexRange(DocLine); + Result := Call(SCI_VISIBLEFROMDOCLINE, DocLine, 0); +end; + +function TScintEdit.GetWordEndPosition(const Pos: Integer; + const OnlyWordChars: Boolean): Integer; +begin + Result := Call(SCI_WORDENDPOSITION, Pos, Ord(OnlyWordChars)); +end; + +function TScintEdit.GetWordStartPosition(const Pos: Integer; + const OnlyWordChars: Boolean): Integer; +begin + Result := Call(SCI_WORDSTARTPOSITION, Pos, Ord(OnlyWordChars)); +end; + +function TScintEdit.GetZoom: Integer; +begin + Result := Call(SCI_GETZOOM, 0, 0); +end; + +procedure TScintEdit.InitRawString(var S: TScintRawString; const Len: Integer); +begin + SetString(S, nil, Len); +{$IFDEF UNICODE} + //experimental, dont need this ATM: + if FCodePage <> 0 then + System.SetCodePage(RawByteString(S), FCodePage, False); +{$ENDIF} +end; + +function TScintEdit.IsPositionInViewVertically(const Pos: Integer): Boolean; +var + P: TPoint; +begin + P := GetPointFromPosition(Pos); + Result := (P.Y >= 0) and (P.Y + GetLineHeight <= ClientHeight); +end; + +procedure TScintEdit.Notification(AComponent: TComponent; Operation: TOperation); +begin + inherited; + if Operation = opRemove then + if AComponent = FStyler then + SetStyler(nil); +end; + +procedure TScintEdit.Notify(const N: TSCNotification); +begin + case N.nmhdr.code of + SCN_CHARADDED: + begin + if Assigned(FOnCharAdded) then + FOnCharAdded(Self, AnsiChar(N.ch)); + end; + SCN_MARGINCLICK: + begin + if Assigned(FOnMarginClick) then + FOnMarginClick(Self, N.margin, GetLineFromPosition(N.position)); + end; + SCN_MODIFIED: + begin + if N.modificationType and SC_MOD_INSERTTEXT <> 0 then + Change(True, N.position, N.length, N.linesAdded) + else if N.modificationType and SC_MOD_DELETETEXT <> 0 then + Change(False, N.position, N.length, N.linesAdded); + end; + SCN_SAVEPOINTLEFT, + SCN_SAVEPOINTREACHED: + begin + if Assigned(FOnModifiedChange) then + FOnModifiedChange(Self); + end; + SCN_STYLENEEDED: StyleNeeded(N.position); + SCN_UPDATEUI: + begin + if Assigned(FOnUpdateUI) then + FOnUpdateUI(Self); + end; + end; +end; + +procedure TScintEdit.PasteFromClipboard; +begin + Call(SCI_PASTE, 0, 0); +end; + +function TScintEdit.RawSelTextEquals(const S: TScintRawString; + const MatchCase: Boolean): Boolean; +var + Flags: Integer; + Target, Sel: TScintRange; +begin + Flags := 0; + if MatchCase then + Flags := Flags or SCFIND_MATCHCASE; + + Call(SCI_TARGETFROMSELECTION, 0, 0); + Call(SCI_SETSEARCHFLAGS, Flags, 0); + Result := False; + if Call(SCI_SEARCHINTARGET, Length(S), LPARAM(PAnsiChar(S))) >= 0 then begin + Target := GetTarget; + Sel := GetSelection; + if (Target.StartPos = Sel.StartPos) and (Target.EndPos = Sel.EndPos) then + Result := True; + end; +end; + +procedure TScintEdit.Redo; +begin + Call(SCI_REDO, 0, 0); +end; + +function TScintEdit.ReplaceRawTextRange(const StartPos, EndPos: Integer; + const S: TScintRawString): TScintRange; +begin + CheckPosRange(StartPos, EndPos); + SetTarget(StartPos, EndPos); + Call(SCI_REPLACETARGET, Length(S), LPARAM(PAnsiChar(S))); + Result := GetTarget; +end; + +function TScintEdit.ReplaceTextRange(const StartPos, EndPos: Integer; + const S: String): TScintRange; +begin + Result := ReplaceRawTextRange(StartPos, EndPos, ConvertStringToRawString(S)); +end; + +procedure TScintEdit.RestyleLine(const Line: Integer); +var + StartPos, EndPos, EndStyledPos: Integer; +begin + StartPos := GetPositionFromLine(Line); + EndPos := GetPositionFromLine(Line + 1); + { Back up the 'last styled position' if necessary } + EndStyledPos := Call(SCI_GETENDSTYLED, 0, 0); + if StartPos < EndStyledPos then + Call(SCI_STARTSTYLING, StartPos, 0); + StyleNeeded(EndPos); +end; + +procedure TScintEdit.ScrollCaretIntoView; +begin + Call(SCI_SCROLLCARET, 0, 0); +end; + +function TScintEdit.SelAvail: Boolean; +var + Sel: TScintRange; +begin + Sel := GetSelection; + Result := (Sel.EndPos > Sel.StartPos); +end; + +procedure TScintEdit.SelectAll; +begin + Call(SCI_SELECTALL, 0, 0); +end; + +function TScintEdit.SelTextEquals(const S: String; + const MatchCase: Boolean): Boolean; +begin + Result := RawSelTextEquals(ConvertStringToRawString(S), MatchCase); +end; + +procedure TScintEdit.SetAcceptDroppedFiles(const Value: Boolean); +begin + if FAcceptDroppedFiles <> Value then begin + FAcceptDroppedFiles := Value; + if HandleAllocated then + DragAcceptFiles(Handle, Value); + end; +end; + +procedure TScintEdit.SetAutoCompleteFillupChars(const FillupChars: AnsiString); +begin + CallStr(SCI_AUTOCSETFILLUPS, 0, FillupChars); +end; + +procedure TScintEdit.SetAutoCompleteFontName(const Value: String); +begin + if FAutoCompleteFontName <> Value then begin + FAutoCompleteFontName := Value; + UpdateStyleAttributes; + end; +end; + +procedure TScintEdit.SetAutoCompleteFontSize(const Value: Integer); +begin + if FAutoCompleteFontSize <> Value then begin + FAutoCompleteFontSize := Value; + UpdateStyleAttributes; + end; +end; + +procedure TScintEdit.SetAutoCompleteSelectedItem(const S: TScintRawString); +begin + CallStr(SCI_AUTOCSELECT, 0, S); +end; + +procedure TScintEdit.SetAutoCompleteStopChars(const StopChars: AnsiString); +begin + CallStr(SCI_AUTOCSTOPS, 0, StopChars); +end; + +procedure TScintEdit.SetBraceHighlighting(const Pos1, Pos2: Integer); +begin + Call(SCI_BRACEHIGHLIGHT, Pos1, Pos2); +end; + +procedure TScintEdit.SetCaretColumn(const Value: Integer); +begin + SetCaretPosition(GetPositionFromLineColumn(GetCaretLine, Value)); +end; + +procedure TScintEdit.SetCaretLine(const Value: Integer); +begin + Call(SCI_GOTOLINE, Value, 0); + ChooseCaretX; +end; + +procedure TScintEdit.SetCaretPosition(const Value: Integer); +begin + Call(SCI_GOTOPOS, Value, 0); + ChooseCaretX; +end; + +procedure TScintEdit.SetCaretVirtualSpace(const Value: Integer); +var + Pos, LineEndPos, MainSel: Integer; +begin + { Weird things happen if a non-zero virtual space is set when the caret + isn't at the end of a line, so don't allow it } + Pos := GetCaretPosition; + LineEndPos := GetLineEndPosition(GetLineFromPosition(Pos)); + if (Pos = LineEndPos) or (Value = 0) then begin + MainSel := GetMainSelection; + Call(SCI_SETSELECTIONNANCHORVIRTUALSPACE, MainSel, Value); + Call(SCI_SETSELECTIONNCARETVIRTUALSPACE, MainSel, Value); + ChooseCaretX; + end; +end; + +procedure TScintEdit.SetCodePage(const Value: Integer); +begin + if FCodePage <> Value then begin + FCodePage := Value; + UpdateCodePage; + end; +end; + +procedure TScintEdit.SetCursorID(const CursorID: Integer); +begin + Call(SCI_SETCURSOR, CursorID, 0); +end; + +procedure TScintEdit.SetEmptySelection; +{ Clears all selections without scrolling the caret into view } +var + Pos: Integer; +begin + Pos := GetCaretPosition; + Call(SCI_SETSELECTION, Pos, Pos); +end; + +procedure TScintEdit.SetFillSelectionToEdge(const Value: Boolean); +begin + if FFillSelectionToEdge <> Value then begin + FFillSelectionToEdge := Value; + ApplyOptions; + end; +end; + +procedure TScintEdit.SetLineIndentation(const Line, Indentation: Integer); +begin + FLines.CheckIndexRange(Line); + Call(SCI_SETLINEINDENTATION, Line, Indentation); +end; + +procedure TScintEdit.SetIndentationGuides(const Value: TScintIndentationGuides); +begin + if FIndentationGuides <> Value then begin + FIndentationGuides := Value; + ApplyOptions; + end; +end; + +procedure TScintEdit.SetRawSelText(const Value: TScintRawString); +begin + Call(SCI_REPLACESEL, 0, LPARAM(PAnsiChar(Value))); + ChooseCaretX; +end; + +procedure TScintEdit.SetRawText(const Value: TScintRawString); +begin + { Workaround: Without this call, if the caret is on line 0 and out in + virtual space, it'll remain in virtual space after the replacement } + Call(SCI_CLEARSELECTIONS, 0, 0); + { Using ReplaceRawTextRange instead of SCI_SETTEXT for embedded null support } + ReplaceRawTextRange(0, GetRawTextLength, Value); + ChooseCaretX; +end; + +procedure TScintEdit.SetReadOnly(const Value: Boolean); +begin + Call(SCI_SETREADONLY, Ord(Value), 0); +end; + +procedure TScintEdit.SetSavePoint; +begin + if FForceModified then begin + FForceModified := False; + if Assigned(FOnModifiedChange) then + FOnModifiedChange(Self); + end; + Call(SCI_SETSAVEPOINT, 0, 0); +end; + +procedure TScintEdit.SetSelection(const Value: TScintRange); +begin + Call(SCI_SETSEL, Value.StartPos, Value.EndPos); + ChooseCaretX; +end; + +procedure TScintEdit.SetSelText(const Value: String); +begin + SetRawSelText(ConvertStringToRawString(Value)); +end; + +procedure TScintEdit.SetStyler(const Value: TScintCustomStyler); +begin + if FStyler <> Value then begin + if Assigned(Value) then + Value.FreeNotification(Self); + FStyler := Value; + if HandleAllocated then begin + Call(SCI_CLEARDOCUMENTSTYLE, 0, 0); + Call(SCI_STARTSTYLING, 0, 0); + UpdateStyleAttributes; + end; + end; +end; + +procedure TScintEdit.SetTabWidth(const Value: Integer); +begin + if (FTabWidth <> Value) and (Value > 0) and (Value < 100) then begin + FTabWidth := Value; + ApplyOptions; + end; +end; + +procedure TScintEdit.SetTarget(const StartPos, EndPos: Integer); +begin + Call(SCI_SETTARGETSTART, StartPos, 0); + Call(SCI_SETTARGETEND, EndPos, 0); +end; + +procedure TScintEdit.SetTopLine(const Value: Integer); +begin + Call(SCI_SETFIRSTVISIBLELINE, Value, 0); +end; + +procedure TScintEdit.SetUseStyleAttributes(const Value: Boolean); +begin + if FUseStyleAttributes <> Value then begin + FUseStyleAttributes := Value; + UpdateStyleAttributes; + end; +end; + +procedure TScintEdit.SetUseTabCharacter(const Value: Boolean); +begin + if FUseTabCharacter <> Value then begin + FUseTabCharacter := Value; + ApplyOptions; + end; +end; + +procedure TScintEdit.SetVirtualSpaceOptions(const Value: TScintVirtualSpaceOptions); +begin + if FVirtualSpaceOptions <> Value then begin + FVirtualSpaceOptions := Value; + ApplyOptions; + end; +end; + +procedure TScintEdit.SetWordWrap(const Value: Boolean); +begin + if FWordWrap <> Value then begin + FWordWrap := Value; + ApplyOptions; + end; +end; + +procedure TScintEdit.SetZoom(const Value: Integer); +begin + Call(SCI_SETZOOM, Value, 0); +end; + +procedure TScintEdit.ShowAutoComplete(const CharsEntered: Integer; + const WordList: AnsiString); +begin + Call(SCI_AUTOCSHOW, CharsEntered, LPARAM(PAnsiChar(WordList))); +end; + +procedure TScintEdit.StyleNeeded(const EndPos: Integer); + + function CalcCaretIndex(const FirstLine, LastLine: Integer): Integer; + var + CaretPos, StartPos, EndPos: Integer; + begin + Result := 0; + if FReportCaretPositionToStyler then begin + CaretPos := GetCaretPosition; + StartPos := GetPositionFromLine(FirstLine); + EndPos := GetLineEndPosition(LastLine); + if (CaretPos >= StartPos) and (CaretPos <= EndPos) then + Result := CaretPos - StartPos + 1; + end; + end; + + procedure MaskDoubleByteCharacters(var S: TScintRawString); + var + Len, I: Integer; + begin + { This replaces all lead and trail bytes in S with #$80 and #$81 to + ensure that stylers do not mistake trail bytes for single-byte ASCII + characters (e.g. #131'A' is a valid combination on CP 932). } + if not FEffectiveCodePageDBCS then + Exit; + Len := Length(S); + I := 1; + while I <= Len do begin + if S[I] in FLeadBytes then begin + S[I] := #$80; + if I < Len then begin + Inc(I); + S[I] := #$81; + end; + end; + Inc(I); + end; + end; + + function LineSpans(const Line: Integer): Boolean; + var + S: TScintRawString; + begin + S := FLines.RawLines[Line]; + MaskDoubleByteCharacters(S); + Result := FStyler.LineTextSpans(S); + end; + + function StyleLine(const FirstLine: Integer): Integer; + var + LastLine, I: Integer; + OldState: TScintLineState; + begin + { Find final line in series of spanned lines } + LastLine := FirstLine; + while (LastLine < Lines.Count - 1) and LineSpans(LastLine) do + Inc(LastLine); + + { We don't pass line endings to the styler, because when the style of a + line ending changes, Scintilla assumes it must be a 'hanging' style and + immediately repaints all subsequent lines. (To see this in the IS IDE, + insert and remove a ';' character before a [Setup] directive, i.e. + toggle comment styling.) } + + FStyler.FCaretIndex := CalcCaretIndex(FirstLine, LastLine); + FStyler.FCurIndex := 1; + FStyler.FStyleStartIndex := 1; + FStyler.FLineState := 0; + if FirstLine > 0 then + FStyler.FLineState := FLines.GetState(FirstLine-1); + FStyler.FText := GetRawTextRange(GetPositionFromLine(FirstLine), + GetLineEndPosition(LastLine)); + MaskDoubleByteCharacters(FStyler.FText); + FStyler.FTextLen := Length(FStyler.FText); + FStyler.FStyleStr := StringOfChar(AnsiChar(0), FStyler.FTextLen + + FLines.GetLineEndingLength(LastLine)); + + FStyler.StyleNeeded; + Call(SCI_SETSTYLINGEX, Length(FStyler.FStyleStr), LPARAM(PAnsiChar(FStyler.FStyleStr))); + + FStyler.FStyleStr := ''; + FStyler.FText := ''; + + for I := FirstLine to LastLine do begin + OldState := FLines.GetState(I); + if FStyler.FLineState <> OldState then + Call(SCI_SETLINESTATE, I, FStyler.FLineState); + end; + + Result := LastLine; + end; + + procedure DefaultStyleLine(const Line: Integer); + var + StyleStr: AnsiString; + begin + { Note: Using SCI_SETSTYLINGEX because it only redraws the part of the + range that changed, whereas SCI_SETSTYLING redraws the entire range. } + StyleStr := StringOfChar(AnsiChar(0), FLines.GetRawLineLengthWithEnding(Line)); + Call(SCI_SETSTYLINGEX, Length(StyleStr), LPARAM(PAnsiChar(StyleStr))); + end; + +var + StartPos, StartLine, EndLine, Line: Integer; +begin + StartPos := Call(SCI_GETENDSTYLED, 0, 0); + StartLine := GetLineFromPosition(StartPos); + { EndPos (always?) points to the position *after* the last character of the + last line needing styling (usually an LF), so subtract 1 to avoid + restyling one extra line unnecessarily. + But don't do this if we're being asked to style all the way to the end. + When the document's last line is empty, 'EndPos - 1' will point to the + line preceding the last line, so StyleLine() will never be called on the + last line, and it will never be assigned a LINESTATE. This causes IS's + autocompletion to think the last line's section is scNone. } + if EndPos < GetRawTextLength then + EndLine := GetLineFromPosition(EndPos - 1) + else + EndLine := GetLineFromPosition(EndPos); + + //outputdebugstring('-----'); + //outputdebugstring(pchar(format('StyleNeeded poses: %d, %d', [StartPos, EndPos]))); + //outputdebugstring(pchar(format('StyleNeeded lines: %d, %d', [StartLine, EndLine]))); + + { If StartLine is within a series of spanned lines, back up } + if Assigned(FStyler) then + while (StartLine > 0) and (LineSpans(StartLine - 1)) do + Dec(StartLine); + + Line := StartLine; + while Line <= EndLine do begin + Call(SCI_STARTSTYLING, GetPositionFromLine(Line), $FF); + if Assigned(FStyler) then + Line := StyleLine(Line) + else + DefaultStyleLine(Line); + Inc(Line); + end; +end; + +procedure TScintEdit.Undo; +begin + Call(SCI_UNDO, 0, 0); +end; + +procedure TScintEdit.UpdateCodePage; + + procedure InitLeadBytes; + var + Info: TCPInfo; + I: Integer; + J: Byte; + begin + FLeadBytes := []; + if FEffectiveCodePageDBCS and GetCPInfo(FEffectiveCodePage, Info) then begin + I := 0; + while (I < MAX_LEADBYTES) and ((Info.LeadByte[I] or Info.LeadByte[I+1]) <> 0) do begin + for J := Info.LeadByte[I] to Info.LeadByte[I+1] do + Include(FLeadBytes, AnsiChar(J)); + Inc(I, 2); + end; + end; + end; + +var + CP: Integer; +begin + if HandleAllocated then begin + { To Scintilla, code page 0 does not mean the current ANSI code page, but + an unspecified single byte code page. So that DBCS support is properly + enabled when running on a DBCS ANSI code page, replace 0 with GetACP. } + CP := FCodePage; + if CP = 0 then + CP := GetACP; + Call(SCI_SETCODEPAGE, CP, 0); + + { Scintilla ignores attempts to set a code page it has no special support + for. But the editor could currently be set for UTF-8 or DBCS, so get it + out of that mode by setting the code page to 0 (a value it does + recognize). } + if Call(SCI_GETCODEPAGE, 0, 0) <> CP then + Call(SCI_SETCODEPAGE, 0, 0); + + FEffectiveCodePage := Call(SCI_GETCODEPAGE, 0, 0); + FEffectiveCodePageDBCS := (FEffectiveCodePage <> 0) and + (FEffectiveCodePage <> SC_CP_UTF8); + InitLeadBytes; + end; +end; + +procedure TScintEdit.UpdateStyleAttributes; +var + DefaultAttr: TScintStyleAttributes; + + procedure SetStyleAttr(const StyleNumber: Integer; + const Attr: TScintStyleAttributes; const Force: Boolean); + begin + if Force or (Attr.FontName <> DefaultAttr.FontName) then + CallStr(SCI_STYLESETFONT, StyleNumber, AnsiString(Attr.FontName)); + if Force or (Attr.FontSize <> DefaultAttr.FontSize) then + { Note: Scintilla doesn't support negative point sizes like the VCL } + Call(SCI_STYLESETSIZE, StyleNumber, Abs(Attr.FontSize)); + if Force or (Attr.FontCharset <> DefaultAttr.FontCharset) then + Call(SCI_STYLESETCHARACTERSET, StyleNumber, Attr.FontCharset); + if Force or (Attr.FontStyle <> DefaultAttr.FontStyle) then begin + Call(SCI_STYLESETBOLD, StyleNumber, Ord(fsBold in Attr.FontStyle)); + Call(SCI_STYLESETITALIC, StyleNumber, Ord(fsItalic in Attr.FontStyle)); + Call(SCI_STYLESETUNDERLINE, StyleNumber, Ord(fsUnderline in Attr.FontStyle)); + end; + if Force or (Attr.ForeColor <> DefaultAttr.ForeColor) then + Call(SCI_STYLESETFORE, StyleNumber, ColorToRGB(Attr.ForeColor)); + if Force or (Attr.BackColor <> DefaultAttr.BackColor) then + Call(SCI_STYLESETBACK, StyleNumber, ColorToRGB(Attr.BackColor)); + end; + + procedure SetStyleAttrFromStyler(const StyleNumber: Integer); + var + Attr: TScintStyleAttributes; + begin + Attr := DefaultAttr; + FStyler.GetStyleAttributes(StyleNumber, Attr); + SetStyleAttr(StyleNumber, Attr, False); + end; + +const + { Note: This style is specific to our patched build } + STYLE_AUTOCOMPLETION = 39; +var + I: Integer; +begin + if not HandleAllocated then + Exit; + + Call(SCI_SETCARETFORE, ColorToRGB(Font.Color), 0); + + DefaultAttr.FontName := Font.Name; + DefaultAttr.FontSize := Font.Size; + DefaultAttr.FontStyle := Font.Style; + DefaultAttr.FontCharset := Font.Charset; + DefaultAttr.ForeColor := Font.Color; + DefaultAttr.BackColor := Color; + + Call(SCI_STYLERESETDEFAULT, 0, 0); + SetStyleAttr(STYLE_DEFAULT, DefaultAttr, True); + Call(SCI_STYLECLEARALL, 0, 0); + + if Assigned(FStyler) and FUseStyleAttributes then begin + for I := 0 to 31 do + SetStyleAttrFromStyler(I); + SetStyleAttrFromStyler(STYLE_BRACELIGHT); + SetStyleAttrFromStyler(STYLE_INDENTGUIDE); + end; + + if AutoCompleteFontName <> '' then + DefaultAttr.FontName := AutoCompleteFontName; + if AutoCompleteFontSize > 0 then + DefaultAttr.FontSize := AutoCompleteFontSize; + DefaultAttr.FontStyle := []; + { Note: Scintilla doesn't actually use the colors set here } + DefaultAttr.ForeColor := clWindowText; + DefaultAttr.BackColor := clWindow; + SetStyleAttr(STYLE_AUTOCOMPLETION, DefaultAttr, True); +end; + +function TScintEdit.WordAtCursor: String; +var + Pos, StartPos, EndPos: Integer; +begin + Pos := GetCaretPosition; + StartPos := GetWordStartPosition(Pos, True); + EndPos := GetWordEndPosition(Pos, True); + Result := GetTextRange(StartPos, EndPos); +end; + +procedure TScintEdit.ZoomIn; +begin + Call(SCI_ZOOMIN, 0, 0); +end; + +procedure TScintEdit.ZoomOut; +begin + Call(SCI_ZOOMOUT, 0, 0); +end; + +procedure TScintEdit.CMColorChanged(var Message: TMessage); +begin + inherited; + UpdateStyleAttributes; +end; + +procedure TScintEdit.CMFontChanged(var Message: TMessage); +begin + inherited; + UpdateStyleAttributes; +end; + +procedure TScintEdit.CMHintShow(var Message: TCMHintShow); +begin + inherited; + if Assigned(FOnHintShow) then + FOnHintShow(Self, Message.HintInfo^); +end; + +procedure TScintEdit.CMSysColorChange(var Message: TMessage); +begin + inherited; + UpdateStyleAttributes; +end; + +procedure TScintEdit.CNNotify(var Message: TWMNotify); +begin + Notify(PSCNotification(Message.NMHdr)^); +end; + +procedure TScintEdit.WMDestroy(var Message: TWMDestroy); +begin + FDirectPtr := nil; + inherited; +end; + +procedure TScintEdit.WMDropFiles(var Message: TWMDropFiles); +var + FileList: TStringList; + NumFiles, I: Integer; + Filename: array[0..MAX_PATH-1] of Char; + P: TPoint; +begin + FileList := nil; + try + if FAcceptDroppedFiles and Assigned(FOnDropFiles) then begin + FileList := TStringList.Create; + NumFiles := DragQueryFile(Message.Drop, UINT(-1), nil, 0); + for I := 0 to NumFiles-1 do + if DragQueryFile(Message.Drop, I, Filename, + SizeOf(Filename) div SizeOf(Filename[0])) <> 0 then + FileList.Add(Filename); + + if FileList.Count > 0 then begin + if not DragQueryPoint(Message.Drop, P) then begin + P.X := -1; + P.Y := -1; + end; + FOnDropFiles(Self, P.X, P.Y, FileList); + end; + end; + finally + FileList.Free; + DragFinish(Message.Drop); + Message.Drop := 0; + end; +end; + +procedure TScintEdit.WMEraseBkgnd(var Message: TMessage); +begin + { Bypass the VCL's WM_ERASEBKGND handler; it causes flicker when selecting + + scrolling downward using the mouse } + Message.Result := CallWindowProc(DefWndProc, Handle, Message.Msg, + Message.WParam, Message.LParam); +end; + +procedure TScintEdit.WMGetDlgCode(var Message: TWMGetDlgCode); +begin + inherited; + Message.Result := Message.Result or (DLGC_WANTARROWS or DLGC_WANTTAB); +end; + +procedure TScintEdit.WMMouseWheel(var Message: TMessage); +begin + { Bypass TControl's broken WM_MOUSEWHEEL handler: it translates WParamLo + from a combination of MK_* values to a TShiftState -- which is only + meaningful to the VCL -- but it doesn't restore the original value before + passing an unhandled WM_MOUSEWHEEL message up to DefWndProc. This causes + Scintilla to see Ctrl+wheel as Shift+wheel, breaking zoom. (Observed on + Delphi 2009.) } + Message.Result := CallWindowProc(DefWndProc, Handle, Message.Msg, + Message.WParam, Message.LParam); +end; + +{ TScintEditStrings } + +procedure TScintEditStrings.CheckIndexRange(const Index: Integer); +begin + if (Index < 0) or (Index >= GetCount) then + Error(@SListIndexError, Index); +end; + +procedure TScintEditStrings.CheckIndexRangePlusOne(const Index: Integer); +begin + if (Index < 0) or (Index > GetCount) then + Error(@SListIndexError, Index); +end; + +procedure TScintEditStrings.Clear; +begin + FEdit.SetRawText(''); +end; + +procedure TScintEditStrings.Delete(Index: Integer); +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetPositionFromLine(Index); + EndPos := FEdit.GetPositionFromLine(Index + 1); + FEdit.ReplaceRawTextRange(StartPos, EndPos, ''); +end; + +{$IFNDEF UNICODE} +class procedure TScintEditStrings.Error(Msg: PResStringRec; Data: Integer); +begin + TList.Error(LoadResString(Msg), Data); +end; +{$ENDIF} + +function TScintEditStrings.Get(Index: Integer): String; +begin + Result := FEdit.ConvertRawStringToString(GetRawLine(Index)); +end; + +function TScintEditStrings.GetCount: Integer; +begin + Result := FEdit.Call(SCI_GETLINECOUNT, 0, 0); +end; + +function TScintEditStrings.GetLineEndingLength(const Index: Integer): Integer; +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetLineEndPosition(Index); + EndPos := FEdit.GetPositionFromLine(Index + 1); + Result := EndPos - StartPos; +end; + +function TScintEditStrings.GetRawLine(Index: Integer): TScintRawString; +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetPositionFromLine(Index); + EndPos := FEdit.GetLineEndPosition(Index); + Result := FEdit.GetRawTextRange(StartPos, EndPos); +end; + +function TScintEditStrings.GetRawLineLength(Index: Integer): Integer; +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetPositionFromLine(Index); + EndPos := FEdit.GetLineEndPosition(Index); + Result := EndPos - StartPos; +end; + +function TScintEditStrings.GetRawLineLengthWithEnding(Index: Integer): Integer; +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetPositionFromLine(Index); + EndPos := FEdit.GetPositionFromLine(Index + 1); + Result := EndPos - StartPos; +end; + +function TScintEditStrings.GetRawLineWithEnding(Index: Integer): TScintRawString; +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetPositionFromLine(Index); + EndPos := FEdit.GetPositionFromLine(Index + 1); + Result := FEdit.GetRawTextRange(StartPos, EndPos); +end; + +function TScintEditStrings.GetState(Index: Integer): TScintLineState; +begin + CheckIndexRange(Index); + Result := FEdit.Call(SCI_GETLINESTATE, Index, 0); +end; + +function TScintEditStrings.GetTextStr: String; +begin + Result := FEdit.ConvertRawStringToString(FEdit.GetRawText); +end; + +procedure TScintEditStrings.Insert(Index: Integer; const S: String); +begin + InsertRawLine(Index, FEdit.ConvertStringToRawString(S)); +end; + +procedure TScintEditStrings.InsertRawLine(Index: Integer; const S: TScintRawString); +var + Pos: Integer; + EndingStr, InsertStr: TScintRawString; +begin + CheckIndexRangePlusOne(Index); + EndingStr := FEdit.GetLineEndingString; + Pos := FEdit.GetPositionFromLine(Index); + if (Index = GetCount) and (Pos <> FEdit.GetPositionFromLine(Index - 1)) then + InsertStr := EndingStr + S + EndingStr + else + InsertStr := S + EndingStr; + { Using ReplaceRawTextRange instead of SCI_INSERTTEXT for embedded null support } + FEdit.ReplaceRawTextRange(Pos, Pos, InsertStr); +end; + +procedure TScintEditStrings.Put(Index: Integer; const S: String); +begin + PutRawLine(Index, FEdit.ConvertStringToRawString(S)); +end; + +procedure TScintEditStrings.PutRawLine(Index: Integer; const S: TScintRawString); +var + StartPos, EndPos: Integer; +begin + CheckIndexRange(Index); + StartPos := FEdit.GetPositionFromLine(Index); + EndPos := FEdit.GetLineEndPosition(Index); + FEdit.ReplaceRawTextRange(StartPos, EndPos, S); +end; + +procedure TScintEditStrings.SetText(Text: PChar); +begin + FEdit.SetRawText(FEdit.ConvertPCharToRawString(Text, StrLen(Text))); +end; + +procedure TScintEditStrings.SetTextStr(const Value: String); +begin + FEdit.SetRawText(FEdit.ConvertStringToRawString(Value)); +end; + +{ TScintCustomStyler } + +procedure TScintCustomStyler.ApplyIndicators(const Indicators: TScintIndicatorNumbers; + StartIndex, EndIndex: Integer); +var + IndByte: Byte; + I: Integer; + P: PAnsiChar; +begin + IndByte := Byte(Indicators) shl 5; + if IndByte <> 0 then begin + if StartIndex < 1 then + StartIndex := 1; + if EndIndex > FTextLen then + EndIndex := FTextLen; + { Note: The PAnsiChar stuff is to avoid UniqueString() on every iteration } + P := @FStyleStr[1]; + for I := StartIndex to EndIndex do + P[I-1] := AnsiChar(Ord(P[I-1]) or IndByte); + end; +end; + +procedure TScintCustomStyler.ApplyStyle(const Style: TScintStyleNumber; + StartIndex, EndIndex: Integer); +const + StyleMask = $1F; +var + P: PAnsiChar; + I: Integer; +begin + if StartIndex < 1 then + StartIndex := 1; + if EndIndex > FTextLen then + EndIndex := FTextLen; + { Note: The PAnsiChar stuff is to avoid UniqueString() on every iteration } + P := @FStyleStr[1]; + for I := StartIndex to EndIndex do + if Ord(P[I-1]) and StyleMask = 0 then + P[I-1] := AnsiChar(Style or (Ord(P[I-1]) and not StyleMask)); +end; + +procedure TScintCustomStyler.CommitStyle(const Style: TScintStyleNumber); +begin + ApplyStyle(Style, FStyleStartIndex, FCurIndex - 1); + FStyleStartIndex := FCurIndex; +end; + +function TScintCustomStyler.ConsumeAllRemaining: Boolean; +begin + Result := (FCurIndex <= FTextLen); + if Result then + FCurIndex := FTextLen + 1; +end; + +function TScintCustomStyler.ConsumeChar(const C: AnsiChar): Boolean; +begin + Result := (FCurIndex <= FTextLen) and (FText[FCurIndex] = C); + if Result then + Inc(FCurIndex); +end; + +function TScintCustomStyler.ConsumeChars(const Chars: TScintRawCharSet): Boolean; +begin + Result := False; + while FCurIndex <= FTextLen do begin + if not(FText[FCurIndex] in Chars) then + Break; + Result := True; + Inc(FCurIndex); + end; +end; + +function TScintCustomStyler.ConsumeCharsNot(const Chars: TScintRawCharSet): Boolean; +begin + Result := False; + while FCurIndex <= FTextLen do begin + if FText[FCurIndex] in Chars then + Break; + Result := True; + Inc(FCurIndex); + end; +end; + +function TScintCustomStyler.ConsumeString(const Chars: TScintRawCharSet): TScintRawString; +var + StartIndex: Integer; +begin + StartIndex := FCurIndex; + ConsumeChars(Chars); + Result := Copy(FText, StartIndex, FCurIndex - StartIndex); +end; + +function TScintCustomStyler.CurCharIn(const Chars: TScintRawCharSet): Boolean; +begin + Result := (FCurIndex <= FTextLen) and (FText[FCurIndex] in Chars); +end; + +function TScintCustomStyler.CurCharIs(const C: AnsiChar): Boolean; +begin + Result := (FCurIndex <= FTextLen) and (FText[FCurIndex] = C); +end; + +function TScintCustomStyler.GetCurChar: AnsiChar; +begin + Result := #0; + if FCurIndex <= FTextLen then + Result := FText[FCurIndex]; +end; + +function TScintCustomStyler.GetEndOfLine: Boolean; +begin + Result := (FCurIndex > FTextLen); +end; + +function TScintCustomStyler.LineTextSpans(const S: TScintRawString): Boolean; +begin + Result := False; +end; + +function TScintCustomStyler.NextCharIs(const C: AnsiChar): Boolean; +begin + Result := (FCurIndex < FTextLen) and (FText[FCurIndex+1] = C); +end; + +function TScintCustomStyler.PreviousCharIn(const Chars: TScintRawCharSet): Boolean; +begin + Result := (FCurIndex > 1) and (FCurIndex-1 <= FTextLen) and + (FText[FCurIndex-1] in Chars); +end; + +procedure TScintCustomStyler.ReplaceText(StartIndex, EndIndex: Integer; + const C: AnsiChar); +var + P: PAnsiChar; + I: Integer; +begin + if StartIndex < 1 then + StartIndex := 1; + if EndIndex > FTextLen then + EndIndex := FTextLen; + P := @FText[1]; + for I := StartIndex to EndIndex do + P[I-1] := C; +end; + +end. diff --git a/Components/ScintInt.pas b/Components/ScintInt.pas new file mode 100644 index 000000000..34c674fa9 --- /dev/null +++ b/Components/ScintInt.pas @@ -0,0 +1,902 @@ +unit ScintInt; + +{ + Delphi translation of Scintilla.h from Scintilla 2.21 + by Jordan Russell + + $jrsoftware: issrc/Components/ScintInt.pas,v 1.3 2011/01/21 05:47:57 jr Exp $ +} + +interface + +uses + Windows; + +const + INVALID_POSITION = -1; + SCI_START = 2000; + SCI_OPTIONAL_START = 3000; + SCI_LEXER_START = 4000; + SCI_ADDTEXT = 2001; + SCI_ADDSTYLEDTEXT = 2002; + SCI_INSERTTEXT = 2003; + SCI_CLEARALL = 2004; + SCI_CLEARDOCUMENTSTYLE = 2005; + SCI_GETLENGTH = 2006; + SCI_GETCHARAT = 2007; + SCI_GETCURRENTPOS = 2008; + SCI_GETANCHOR = 2009; + SCI_GETSTYLEAT = 2010; + SCI_REDO = 2011; + SCI_SETUNDOCOLLECTION = 2012; + SCI_SELECTALL = 2013; + SCI_SETSAVEPOINT = 2014; + SCI_GETSTYLEDTEXT = 2015; + SCI_CANREDO = 2016; + SCI_MARKERLINEFROMHANDLE = 2017; + SCI_MARKERDELETEHANDLE = 2018; + SCI_GETUNDOCOLLECTION = 2019; + SCWS_INVISIBLE = 0; + SCWS_VISIBLEALWAYS = 1; + SCWS_VISIBLEAFTERINDENT = 2; + SCI_GETVIEWWS = 2020; + SCI_SETVIEWWS = 2021; + SCI_POSITIONFROMPOINT = 2022; + SCI_POSITIONFROMPOINTCLOSE = 2023; + SCI_GOTOLINE = 2024; + SCI_GOTOPOS = 2025; + SCI_SETANCHOR = 2026; + SCI_GETCURLINE = 2027; + SCI_GETENDSTYLED = 2028; + SC_EOL_CRLF = 0; + SC_EOL_CR = 1; + SC_EOL_LF = 2; + SCI_CONVERTEOLS = 2029; + SCI_GETEOLMODE = 2030; + SCI_SETEOLMODE = 2031; + SCI_STARTSTYLING = 2032; + SCI_SETSTYLING = 2033; + SCI_GETBUFFEREDDRAW = 2034; + SCI_SETBUFFEREDDRAW = 2035; + SCI_SETTABWIDTH = 2036; + SCI_GETTABWIDTH = 2121; + SC_CP_UTF8 = 65001; + SCI_SETCODEPAGE = 2037; + SCI_SETUSEPALETTE = 2039; + MARKER_MAX = 31; + SC_MARK_CIRCLE = 0; + SC_MARK_ROUNDRECT = 1; + SC_MARK_ARROW = 2; + SC_MARK_SMALLRECT = 3; + SC_MARK_SHORTARROW = 4; + SC_MARK_EMPTY = 5; + SC_MARK_ARROWDOWN = 6; + SC_MARK_MINUS = 7; + SC_MARK_PLUS = 8; + SC_MARK_VLINE = 9; + SC_MARK_LCORNER = 10; + SC_MARK_TCORNER = 11; + SC_MARK_BOXPLUS = 12; + SC_MARK_BOXPLUSCONNECTED = 13; + SC_MARK_BOXMINUS = 14; + SC_MARK_BOXMINUSCONNECTED = 15; + SC_MARK_LCORNERCURVE = 16; + SC_MARK_TCORNERCURVE = 17; + SC_MARK_CIRCLEPLUS = 18; + SC_MARK_CIRCLEPLUSCONNECTED = 19; + SC_MARK_CIRCLEMINUS = 20; + SC_MARK_CIRCLEMINUSCONNECTED = 21; + SC_MARK_BACKGROUND = 22; + SC_MARK_DOTDOTDOT = 23; + SC_MARK_ARROWS = 24; + SC_MARK_PIXMAP = 25; + SC_MARK_FULLRECT = 26; + SC_MARK_LEFTRECT = 27; + SC_MARK_AVAILABLE = 28; + SC_MARK_UNDERLINE = 29; + SC_MARK_CHARACTER = 10000; + SC_MARKNUM_FOLDEREND = 25; + SC_MARKNUM_FOLDEROPENMID = 26; + SC_MARKNUM_FOLDERMIDTAIL = 27; + SC_MARKNUM_FOLDERTAIL = 28; + SC_MARKNUM_FOLDERSUB = 29; + SC_MARKNUM_FOLDER = 30; + SC_MARKNUM_FOLDEROPEN = 31; + SC_MASK_FOLDERS = $FE000000; + SCI_MARKERDEFINE = 2040; + SCI_MARKERSETFORE = 2041; + SCI_MARKERSETBACK = 2042; + SCI_MARKERADD = 2043; + SCI_MARKERDELETE = 2044; + SCI_MARKERDELETEALL = 2045; + SCI_MARKERGET = 2046; + SCI_MARKERNEXT = 2047; + SCI_MARKERPREVIOUS = 2048; + SCI_MARKERDEFINEPIXMAP = 2049; + SCI_MARKERADDSET = 2466; + SCI_MARKERSETALPHA = 2476; + SC_MARGIN_SYMBOL = 0; + SC_MARGIN_NUMBER = 1; + SC_MARGIN_BACK = 2; + SC_MARGIN_FORE = 3; + SC_MARGIN_TEXT = 4; + SC_MARGIN_RTEXT = 5; + SCI_SETMARGINTYPEN = 2240; + SCI_GETMARGINTYPEN = 2241; + SCI_SETMARGINWIDTHN = 2242; + SCI_GETMARGINWIDTHN = 2243; + SCI_SETMARGINMASKN = 2244; + SCI_GETMARGINMASKN = 2245; + SCI_SETMARGINSENSITIVEN = 2246; + SCI_GETMARGINSENSITIVEN = 2247; + SCI_SETMARGINCURSORN = 2248; + SCI_GETMARGINCURSORN = 2249; + STYLE_DEFAULT = 32; + STYLE_LINENUMBER = 33; + STYLE_BRACELIGHT = 34; + STYLE_BRACEBAD = 35; + STYLE_CONTROLCHAR = 36; + STYLE_INDENTGUIDE = 37; + STYLE_CALLTIP = 38; + STYLE_LASTPREDEFINED = 39; + STYLE_MAX = 255; + SC_CHARSET_ANSI = 0; + SC_CHARSET_DEFAULT = 1; + SC_CHARSET_BALTIC = 186; + SC_CHARSET_CHINESEBIG5 = 136; + SC_CHARSET_EASTEUROPE = 238; + SC_CHARSET_GB2312 = 134; + SC_CHARSET_GREEK = 161; + SC_CHARSET_HANGUL = 129; + SC_CHARSET_MAC = 77; + SC_CHARSET_OEM = 255; + SC_CHARSET_RUSSIAN = 204; + SC_CHARSET_CYRILLIC = 1251; + SC_CHARSET_SHIFTJIS = 128; + SC_CHARSET_SYMBOL = 2; + SC_CHARSET_TURKISH = 162; + SC_CHARSET_JOHAB = 130; + SC_CHARSET_HEBREW = 177; + SC_CHARSET_ARABIC = 178; + SC_CHARSET_VIETNAMESE = 163; + SC_CHARSET_THAI = 222; + SC_CHARSET_8859_15 = 1000; + SCI_STYLECLEARALL = 2050; + SCI_STYLESETFORE = 2051; + SCI_STYLESETBACK = 2052; + SCI_STYLESETBOLD = 2053; + SCI_STYLESETITALIC = 2054; + SCI_STYLESETSIZE = 2055; + SCI_STYLESETFONT = 2056; + SCI_STYLESETEOLFILLED = 2057; + SCI_STYLERESETDEFAULT = 2058; + SCI_STYLESETUNDERLINE = 2059; + SC_CASE_MIXED = 0; + SC_CASE_UPPER = 1; + SC_CASE_LOWER = 2; + SCI_STYLEGETFORE = 2481; + SCI_STYLEGETBACK = 2482; + SCI_STYLEGETBOLD = 2483; + SCI_STYLEGETITALIC = 2484; + SCI_STYLEGETSIZE = 2485; + SCI_STYLEGETFONT = 2486; + SCI_STYLEGETEOLFILLED = 2487; + SCI_STYLEGETUNDERLINE = 2488; + SCI_STYLEGETCASE = 2489; + SCI_STYLEGETCHARACTERSET = 2490; + SCI_STYLEGETVISIBLE = 2491; + SCI_STYLEGETCHANGEABLE = 2492; + SCI_STYLEGETHOTSPOT = 2493; + SCI_STYLESETCASE = 2060; + SCI_STYLESETCHARACTERSET = 2066; + SCI_STYLESETHOTSPOT = 2409; + SCI_SETSELFORE = 2067; + SCI_SETSELBACK = 2068; + SCI_GETSELALPHA = 2477; + SCI_SETSELALPHA = 2478; + SCI_GETSELEOLFILLED = 2479; + SCI_SETSELEOLFILLED = 2480; + SCI_SETCARETFORE = 2069; + SCI_ASSIGNCMDKEY = 2070; + SCI_CLEARCMDKEY = 2071; + SCI_CLEARALLCMDKEYS = 2072; + SCI_SETSTYLINGEX = 2073; + SCI_STYLESETVISIBLE = 2074; + SCI_GETCARETPERIOD = 2075; + SCI_SETCARETPERIOD = 2076; + SCI_SETWORDCHARS = 2077; + SCI_BEGINUNDOACTION = 2078; + SCI_ENDUNDOACTION = 2079; + INDIC_PLAIN = 0; + INDIC_SQUIGGLE = 1; + INDIC_TT = 2; + INDIC_DIAGONAL = 3; + INDIC_STRIKE = 4; + INDIC_HIDDEN = 5; + INDIC_BOX = 6; + INDIC_ROUNDBOX = 7; + INDIC_MAX = 31; + INDIC_CONTAINER = 8; + INDIC0_MASK = $20; + INDIC1_MASK = $40; + INDIC2_MASK = $80; + INDICS_MASK = $E0; + SCI_INDICSETSTYLE = 2080; + SCI_INDICGETSTYLE = 2081; + SCI_INDICSETFORE = 2082; + SCI_INDICGETFORE = 2083; + SCI_INDICSETUNDER = 2510; + SCI_INDICGETUNDER = 2511; + SCI_SETWHITESPACEFORE = 2084; + SCI_SETWHITESPACEBACK = 2085; + SCI_SETWHITESPACESIZE = 2086; + SCI_GETWHITESPACESIZE = 2087; + SCI_SETSTYLEBITS = 2090; + SCI_GETSTYLEBITS = 2091; + SCI_SETLINESTATE = 2092; + SCI_GETLINESTATE = 2093; + SCI_GETMAXLINESTATE = 2094; + SCI_GETCARETLINEVISIBLE = 2095; + SCI_SETCARETLINEVISIBLE = 2096; + SCI_GETCARETLINEBACK = 2097; + SCI_SETCARETLINEBACK = 2098; + SCI_STYLESETCHANGEABLE = 2099; + SCI_AUTOCSHOW = 2100; + SCI_AUTOCCANCEL = 2101; + SCI_AUTOCACTIVE = 2102; + SCI_AUTOCPOSSTART = 2103; + SCI_AUTOCCOMPLETE = 2104; + SCI_AUTOCSTOPS = 2105; + SCI_AUTOCSETSEPARATOR = 2106; + SCI_AUTOCGETSEPARATOR = 2107; + SCI_AUTOCSELECT = 2108; + SCI_AUTOCSETCANCELATSTART = 2110; + SCI_AUTOCGETCANCELATSTART = 2111; + SCI_AUTOCSETFILLUPS = 2112; + SCI_AUTOCSETCHOOSESINGLE = 2113; + SCI_AUTOCGETCHOOSESINGLE = 2114; + SCI_AUTOCSETIGNORECASE = 2115; + SCI_AUTOCGETIGNORECASE = 2116; + SCI_USERLISTSHOW = 2117; + SCI_AUTOCSETAUTOHIDE = 2118; + SCI_AUTOCGETAUTOHIDE = 2119; + SCI_AUTOCSETDROPRESTOFWORD = 2270; + SCI_AUTOCGETDROPRESTOFWORD = 2271; + SCI_REGISTERIMAGE = 2405; + SCI_CLEARREGISTEREDIMAGES = 2408; + SCI_AUTOCGETTYPESEPARATOR = 2285; + SCI_AUTOCSETTYPESEPARATOR = 2286; + SCI_AUTOCSETMAXWIDTH = 2208; + SCI_AUTOCGETMAXWIDTH = 2209; + SCI_AUTOCSETMAXHEIGHT = 2210; + SCI_AUTOCGETMAXHEIGHT = 2211; + SCI_SETINDENT = 2122; + SCI_GETINDENT = 2123; + SCI_SETUSETABS = 2124; + SCI_GETUSETABS = 2125; + SCI_SETLINEINDENTATION = 2126; + SCI_GETLINEINDENTATION = 2127; + SCI_GETLINEINDENTPOSITION = 2128; + SCI_GETCOLUMN = 2129; + SCI_SETHSCROLLBAR = 2130; + SCI_GETHSCROLLBAR = 2131; + SC_IV_NONE = 0; + SC_IV_REAL = 1; + SC_IV_LOOKFORWARD = 2; + SC_IV_LOOKBOTH = 3; + SCI_SETINDENTATIONGUIDES = 2132; + SCI_GETINDENTATIONGUIDES = 2133; + SCI_SETHIGHLIGHTGUIDE = 2134; + SCI_GETHIGHLIGHTGUIDE = 2135; + SCI_GETLINEENDPOSITION = 2136; + SCI_GETCODEPAGE = 2137; + SCI_GETCARETFORE = 2138; + SCI_GETUSEPALETTE = 2139; + SCI_GETREADONLY = 2140; + SCI_SETCURRENTPOS = 2141; + SCI_SETSELECTIONSTART = 2142; + SCI_GETSELECTIONSTART = 2143; + SCI_SETSELECTIONEND = 2144; + SCI_GETSELECTIONEND = 2145; + SCI_SETPRINTMAGNIFICATION = 2146; + SCI_GETPRINTMAGNIFICATION = 2147; + SC_PRINT_NORMAL = 0; + SC_PRINT_INVERTLIGHT = 1; + SC_PRINT_BLACKONWHITE = 2; + SC_PRINT_COLOURONWHITE = 3; + SC_PRINT_COLOURONWHITEDEFAULTBG = 4; + SCI_SETPRINTCOLOURMODE = 2148; + SCI_GETPRINTCOLOURMODE = 2149; + SCFIND_WHOLEWORD = 2; + SCFIND_MATCHCASE = 4; + SCFIND_WORDSTART = $00100000; + SCFIND_REGEXP = $00200000; + SCFIND_POSIX = $00400000; + SCI_FINDTEXT = 2150; + SCI_FORMATRANGE = 2151; + SCI_GETFIRSTVISIBLELINE = 2152; + SCI_GETLINE = 2153; + SCI_GETLINECOUNT = 2154; + SCI_SETMARGINLEFT = 2155; + SCI_GETMARGINLEFT = 2156; + SCI_SETMARGINRIGHT = 2157; + SCI_GETMARGINRIGHT = 2158; + SCI_GETMODIFY = 2159; + SCI_SETSEL = 2160; + SCI_GETSELTEXT = 2161; + SCI_GETTEXTRANGE = 2162; + SCI_HIDESELECTION = 2163; + SCI_POINTXFROMPOSITION = 2164; + SCI_POINTYFROMPOSITION = 2165; + SCI_LINEFROMPOSITION = 2166; + SCI_POSITIONFROMLINE = 2167; + SCI_LINESCROLL = 2168; + SCI_SCROLLCARET = 2169; + SCI_REPLACESEL = 2170; + SCI_SETREADONLY = 2171; + SCI_NULL = 2172; + SCI_CANPASTE = 2173; + SCI_CANUNDO = 2174; + SCI_EMPTYUNDOBUFFER = 2175; + SCI_UNDO = 2176; + SCI_CUT = 2177; + SCI_COPY = 2178; + SCI_PASTE = 2179; + SCI_CLEAR = 2180; + SCI_SETTEXT = 2181; + SCI_GETTEXT = 2182; + SCI_GETTEXTLENGTH = 2183; + SCI_GETDIRECTFUNCTION = 2184; + SCI_GETDIRECTPOINTER = 2185; + SCI_SETOVERTYPE = 2186; + SCI_GETOVERTYPE = 2187; + SCI_SETCARETWIDTH = 2188; + SCI_GETCARETWIDTH = 2189; + SCI_SETTARGETSTART = 2190; + SCI_GETTARGETSTART = 2191; + SCI_SETTARGETEND = 2192; + SCI_GETTARGETEND = 2193; + SCI_REPLACETARGET = 2194; + SCI_REPLACETARGETRE = 2195; + SCI_SEARCHINTARGET = 2197; + SCI_SETSEARCHFLAGS = 2198; + SCI_GETSEARCHFLAGS = 2199; + SCI_CALLTIPSHOW = 2200; + SCI_CALLTIPCANCEL = 2201; + SCI_CALLTIPACTIVE = 2202; + SCI_CALLTIPPOSSTART = 2203; + SCI_CALLTIPSETHLT = 2204; + SCI_CALLTIPSETBACK = 2205; + SCI_CALLTIPSETFORE = 2206; + SCI_CALLTIPSETFOREHLT = 2207; + SCI_CALLTIPUSESTYLE = 2212; + SCI_VISIBLEFROMDOCLINE = 2220; + SCI_DOCLINEFROMVISIBLE = 2221; + SCI_WRAPCOUNT = 2235; + SC_FOLDLEVELBASE = $400; + SC_FOLDLEVELWHITEFLAG = $1000; + SC_FOLDLEVELHEADERFLAG = $2000; + SC_FOLDLEVELNUMBERMASK = $0FFF; + SCI_SETFOLDLEVEL = 2222; + SCI_GETFOLDLEVEL = 2223; + SCI_GETLASTCHILD = 2224; + SCI_GETFOLDPARENT = 2225; + SCI_SHOWLINES = 2226; + SCI_HIDELINES = 2227; + SCI_GETLINEVISIBLE = 2228; + SCI_SETFOLDEXPANDED = 2229; + SCI_GETFOLDEXPANDED = 2230; + SCI_TOGGLEFOLD = 2231; + SCI_ENSUREVISIBLE = 2232; + SC_FOLDFLAG_LINEBEFORE_EXPANDED = $0002; + SC_FOLDFLAG_LINEBEFORE_CONTRACTED = $0004; + SC_FOLDFLAG_LINEAFTER_EXPANDED = $0008; + SC_FOLDFLAG_LINEAFTER_CONTRACTED = $0010; + SC_FOLDFLAG_LEVELNUMBERS = $0040; + SCI_SETFOLDFLAGS = 2233; + SCI_ENSUREVISIBLEENFORCEPOLICY = 2234; + SCI_SETTABINDENTS = 2260; + SCI_GETTABINDENTS = 2261; + SCI_SETBACKSPACEUNINDENTS = 2262; + SCI_GETBACKSPACEUNINDENTS = 2263; + SC_TIME_FOREVER = 10000000; + SCI_SETMOUSEDWELLTIME = 2264; + SCI_GETMOUSEDWELLTIME = 2265; + SCI_WORDSTARTPOSITION = 2266; + SCI_WORDENDPOSITION = 2267; + SC_WRAP_NONE = 0; + SC_WRAP_WORD = 1; + SC_WRAP_CHAR = 2; + SCI_SETWRAPMODE = 2268; + SCI_GETWRAPMODE = 2269; + SC_WRAPVISUALFLAG_NONE = $0000; + SC_WRAPVISUALFLAG_END = $0001; + SC_WRAPVISUALFLAG_START = $0002; + SCI_SETWRAPVISUALFLAGS = 2460; + SCI_GETWRAPVISUALFLAGS = 2461; + SC_WRAPVISUALFLAGLOC_DEFAULT = $0000; + SC_WRAPVISUALFLAGLOC_END_BY_TEXT = $0001; + SC_WRAPVISUALFLAGLOC_START_BY_TEXT = $0002; + SCI_SETWRAPVISUALFLAGSLOCATION = 2462; + SCI_GETWRAPVISUALFLAGSLOCATION = 2463; + SCI_SETWRAPSTARTINDENT = 2464; + SCI_GETWRAPSTARTINDENT = 2465; + SC_WRAPINDENT_FIXED = 0; + SC_WRAPINDENT_SAME = 1; + SC_WRAPINDENT_INDENT = 2; + SCI_SETWRAPINDENTMODE = 2472; + SCI_GETWRAPINDENTMODE = 2473; + SC_CACHE_NONE = 0; + SC_CACHE_CARET = 1; + SC_CACHE_PAGE = 2; + SC_CACHE_DOCUMENT = 3; + SCI_SETLAYOUTCACHE = 2272; + SCI_GETLAYOUTCACHE = 2273; + SCI_SETSCROLLWIDTH = 2274; + SCI_GETSCROLLWIDTH = 2275; + SCI_SETSCROLLWIDTHTRACKING = 2516; + SCI_GETSCROLLWIDTHTRACKING = 2517; + SCI_TEXTWIDTH = 2276; + SCI_SETENDATLASTLINE = 2277; + SCI_GETENDATLASTLINE = 2278; + SCI_TEXTHEIGHT = 2279; + SCI_SETVSCROLLBAR = 2280; + SCI_GETVSCROLLBAR = 2281; + SCI_APPENDTEXT = 2282; + SCI_GETTWOPHASEDRAW = 2283; + SCI_SETTWOPHASEDRAW = 2284; + SC_EFF_QUALITY_MASK = $F; + SC_EFF_QUALITY_DEFAULT = 0; + SC_EFF_QUALITY_NON_ANTIALIASED = 1; + SC_EFF_QUALITY_ANTIALIASED = 2; + SC_EFF_QUALITY_LCD_OPTIMIZED = 3; + SCI_SETFONTQUALITY = 2611; + SCI_GETFONTQUALITY = 2612; + SCI_SETFIRSTVISIBLELINE = 2613; + SC_MULTIPASTE_ONCE = 0; + SC_MULTIPASTE_EACH = 1; + SCI_SETMULTIPASTE = 2614; + SCI_GETMULTIPASTE = 2615; + SCI_GETTAG = 2616; + SCI_TARGETFROMSELECTION = 2287; + SCI_LINESJOIN = 2288; + SCI_LINESSPLIT = 2289; + SCI_SETFOLDMARGINCOLOUR = 2290; + SCI_SETFOLDMARGINHICOLOUR = 2291; + SCI_LINEDOWN = 2300; + SCI_LINEDOWNEXTEND = 2301; + SCI_LINEUP = 2302; + SCI_LINEUPEXTEND = 2303; + SCI_CHARLEFT = 2304; + SCI_CHARLEFTEXTEND = 2305; + SCI_CHARRIGHT = 2306; + SCI_CHARRIGHTEXTEND = 2307; + SCI_WORDLEFT = 2308; + SCI_WORDLEFTEXTEND = 2309; + SCI_WORDRIGHT = 2310; + SCI_WORDRIGHTEXTEND = 2311; + SCI_HOME = 2312; + SCI_HOMEEXTEND = 2313; + SCI_LINEEND = 2314; + SCI_LINEENDEXTEND = 2315; + SCI_DOCUMENTSTART = 2316; + SCI_DOCUMENTSTARTEXTEND = 2317; + SCI_DOCUMENTEND = 2318; + SCI_DOCUMENTENDEXTEND = 2319; + SCI_PAGEUP = 2320; + SCI_PAGEUPEXTEND = 2321; + SCI_PAGEDOWN = 2322; + SCI_PAGEDOWNEXTEND = 2323; + SCI_EDITTOGGLEOVERTYPE = 2324; + SCI_CANCEL = 2325; + SCI_DELETEBACK = 2326; + SCI_TAB = 2327; + SCI_BACKTAB = 2328; + SCI_NEWLINE = 2329; + SCI_FORMFEED = 2330; + SCI_VCHOME = 2331; + SCI_VCHOMEEXTEND = 2332; + SCI_ZOOMIN = 2333; + SCI_ZOOMOUT = 2334; + SCI_DELWORDLEFT = 2335; + SCI_DELWORDRIGHT = 2336; + SCI_DELWORDRIGHTEND = 2518; + SCI_LINECUT = 2337; + SCI_LINEDELETE = 2338; + SCI_LINETRANSPOSE = 2339; + SCI_LINEDUPLICATE = 2404; + SCI_LOWERCASE = 2340; + SCI_UPPERCASE = 2341; + SCI_LINESCROLLDOWN = 2342; + SCI_LINESCROLLUP = 2343; + SCI_DELETEBACKNOTLINE = 2344; + SCI_HOMEDISPLAY = 2345; + SCI_HOMEDISPLAYEXTEND = 2346; + SCI_LINEENDDISPLAY = 2347; + SCI_LINEENDDISPLAYEXTEND = 2348; + SCI_HOMEWRAP = 2349; + SCI_HOMEWRAPEXTEND = 2450; + SCI_LINEENDWRAP = 2451; + SCI_LINEENDWRAPEXTEND = 2452; + SCI_VCHOMEWRAP = 2453; + SCI_VCHOMEWRAPEXTEND = 2454; + SCI_LINECOPY = 2455; + SCI_MOVECARETINSIDEVIEW = 2401; + SCI_LINELENGTH = 2350; + SCI_BRACEHIGHLIGHT = 2351; + SCI_BRACEBADLIGHT = 2352; + SCI_BRACEMATCH = 2353; + SCI_GETVIEWEOL = 2355; + SCI_SETVIEWEOL = 2356; + SCI_GETDOCPOINTER = 2357; + SCI_SETDOCPOINTER = 2358; + SCI_SETMODEVENTMASK = 2359; + EDGE_NONE = 0; + EDGE_LINE = 1; + EDGE_BACKGROUND = 2; + SCI_GETEDGECOLUMN = 2360; + SCI_SETEDGECOLUMN = 2361; + SCI_GETEDGEMODE = 2362; + SCI_SETEDGEMODE = 2363; + SCI_GETEDGECOLOUR = 2364; + SCI_SETEDGECOLOUR = 2365; + SCI_SEARCHANCHOR = 2366; + SCI_SEARCHNEXT = 2367; + SCI_SEARCHPREV = 2368; + SCI_LINESONSCREEN = 2370; + SCI_USEPOPUP = 2371; + SCI_SELECTIONISRECTANGLE = 2372; + SCI_SETZOOM = 2373; + SCI_GETZOOM = 2374; + SCI_CREATEDOCUMENT = 2375; + SCI_ADDREFDOCUMENT = 2376; + SCI_RELEASEDOCUMENT = 2377; + SCI_GETMODEVENTMASK = 2378; + SCI_SETFOCUS = 2380; + SCI_GETFOCUS = 2381; + SC_STATUS_OK = 0; + SC_STATUS_FAILURE = 1; + SC_STATUS_BADALLOC = 2; + SCI_SETSTATUS = 2382; + SCI_GETSTATUS = 2383; + SCI_SETMOUSEDOWNCAPTURES = 2384; + SCI_GETMOUSEDOWNCAPTURES = 2385; + SC_CURSORNORMAL = -1; + SC_CURSORARROW = 2; + SC_CURSORWAIT = 4; + SC_CURSORREVERSEARROW = 7; + SCI_SETCURSOR = 2386; + SCI_GETCURSOR = 2387; + SCI_SETCONTROLCHARSYMBOL = 2388; + SCI_GETCONTROLCHARSYMBOL = 2389; + SCI_WORDPARTLEFT = 2390; + SCI_WORDPARTLEFTEXTEND = 2391; + SCI_WORDPARTRIGHT = 2392; + SCI_WORDPARTRIGHTEXTEND = 2393; + VISIBLE_SLOP = $01; + VISIBLE_STRICT = $04; + SCI_SETVISIBLEPOLICY = 2394; + SCI_DELLINELEFT = 2395; + SCI_DELLINERIGHT = 2396; + SCI_SETXOFFSET = 2397; + SCI_GETXOFFSET = 2398; + SCI_CHOOSECARETX = 2399; + SCI_GRABFOCUS = 2400; + CARET_SLOP = $01; + CARET_STRICT = $04; + CARET_JUMPS = $10; + CARET_EVEN = $08; + SCI_SETXCARETPOLICY = 2402; + SCI_SETYCARETPOLICY = 2403; + SCI_SETPRINTWRAPMODE = 2406; + SCI_GETPRINTWRAPMODE = 2407; + SCI_SETHOTSPOTACTIVEFORE = 2410; + SCI_GETHOTSPOTACTIVEFORE = 2494; + SCI_SETHOTSPOTACTIVEBACK = 2411; + SCI_GETHOTSPOTACTIVEBACK = 2495; + SCI_SETHOTSPOTACTIVEUNDERLINE = 2412; + SCI_GETHOTSPOTACTIVEUNDERLINE = 2496; + SCI_SETHOTSPOTSINGLELINE = 2421; + SCI_GETHOTSPOTSINGLELINE = 2497; + SCI_PARADOWN = 2413; + SCI_PARADOWNEXTEND = 2414; + SCI_PARAUP = 2415; + SCI_PARAUPEXTEND = 2416; + SCI_POSITIONBEFORE = 2417; + SCI_POSITIONAFTER = 2418; + SCI_COPYRANGE = 2419; + SCI_COPYTEXT = 2420; + SC_SEL_STREAM = 0; + SC_SEL_RECTANGLE = 1; + SC_SEL_LINES = 2; + SC_SEL_THIN = 3; + SCI_SETSELECTIONMODE = 2422; + SCI_GETSELECTIONMODE = 2423; + SCI_GETLINESELSTARTPOSITION = 2424; + SCI_GETLINESELENDPOSITION = 2425; + SCI_LINEDOWNRECTEXTEND = 2426; + SCI_LINEUPRECTEXTEND = 2427; + SCI_CHARLEFTRECTEXTEND = 2428; + SCI_CHARRIGHTRECTEXTEND = 2429; + SCI_HOMERECTEXTEND = 2430; + SCI_VCHOMERECTEXTEND = 2431; + SCI_LINEENDRECTEXTEND = 2432; + SCI_PAGEUPRECTEXTEND = 2433; + SCI_PAGEDOWNRECTEXTEND = 2434; + SCI_STUTTEREDPAGEUP = 2435; + SCI_STUTTEREDPAGEUPEXTEND = 2436; + SCI_STUTTEREDPAGEDOWN = 2437; + SCI_STUTTEREDPAGEDOWNEXTEND = 2438; + SCI_WORDLEFTEND = 2439; + SCI_WORDLEFTENDEXTEND = 2440; + SCI_WORDRIGHTEND = 2441; + SCI_WORDRIGHTENDEXTEND = 2442; + SCI_SETWHITESPACECHARS = 2443; + SCI_SETCHARSDEFAULT = 2444; + SCI_AUTOCGETCURRENT = 2445; + SCI_AUTOCGETCURRENTTEXT = 2610; + SCI_ALLOCATE = 2446; + SCI_TARGETASUTF8 = 2447; + SCI_SETLENGTHFORENCODE = 2448; + SCI_ENCODEDFROMUTF8 = 2449; + SCI_FINDCOLUMN = 2456; + SCI_GETCARETSTICKY = 2457; + SCI_SETCARETSTICKY = 2458; + SC_CARETSTICKY_OFF = 0; + SC_CARETSTICKY_ON = 1; + SC_CARETSTICKY_WHITESPACE = 2; + SCI_TOGGLECARETSTICKY = 2459; + SCI_SETPASTECONVERTENDINGS = 2467; + SCI_GETPASTECONVERTENDINGS = 2468; + SCI_SELECTIONDUPLICATE = 2469; + SC_ALPHA_TRANSPARENT = 0; + SC_ALPHA_OPAQUE = 255; + SC_ALPHA_NOALPHA = 256; + SCI_SETCARETLINEBACKALPHA = 2470; + SCI_GETCARETLINEBACKALPHA = 2471; + CARETSTYLE_INVISIBLE = 0; + CARETSTYLE_LINE = 1; + CARETSTYLE_BLOCK = 2; + SCI_SETCARETSTYLE = 2512; + SCI_GETCARETSTYLE = 2513; + SCI_SETINDICATORCURRENT = 2500; + SCI_GETINDICATORCURRENT = 2501; + SCI_SETINDICATORVALUE = 2502; + SCI_GETINDICATORVALUE = 2503; + SCI_INDICATORFILLRANGE = 2504; + SCI_INDICATORCLEARRANGE = 2505; + SCI_INDICATORALLONFOR = 2506; + SCI_INDICATORVALUEAT = 2507; + SCI_INDICATORSTART = 2508; + SCI_INDICATOREND = 2509; + SCI_SETPOSITIONCACHE = 2514; + SCI_GETPOSITIONCACHE = 2515; + SCI_COPYALLOWLINE = 2519; + SCI_GETCHARACTERPOINTER = 2520; + SCI_SETKEYSUNICODE = 2521; + SCI_GETKEYSUNICODE = 2522; + SCI_INDICSETALPHA = 2523; + SCI_INDICGETALPHA = 2524; + SCI_SETEXTRAASCENT = 2525; + SCI_GETEXTRAASCENT = 2526; + SCI_SETEXTRADESCENT = 2527; + SCI_GETEXTRADESCENT = 2528; + SCI_MARKERSYMBOLDEFINED = 2529; + SCI_MARGINSETTEXT = 2530; + SCI_MARGINGETTEXT = 2531; + SCI_MARGINSETSTYLE = 2532; + SCI_MARGINGETSTYLE = 2533; + SCI_MARGINSETSTYLES = 2534; + SCI_MARGINGETSTYLES = 2535; + SCI_MARGINTEXTCLEARALL = 2536; + SCI_MARGINSETSTYLEOFFSET = 2537; + SCI_MARGINGETSTYLEOFFSET = 2538; + SCI_ANNOTATIONSETTEXT = 2540; + SCI_ANNOTATIONGETTEXT = 2541; + SCI_ANNOTATIONSETSTYLE = 2542; + SCI_ANNOTATIONGETSTYLE = 2543; + SCI_ANNOTATIONSETSTYLES = 2544; + SCI_ANNOTATIONGETSTYLES = 2545; + SCI_ANNOTATIONGETLINES = 2546; + SCI_ANNOTATIONCLEARALL = 2547; + ANNOTATION_HIDDEN = 0; + ANNOTATION_STANDARD = 1; + ANNOTATION_BOXED = 2; + SCI_ANNOTATIONSETVISIBLE = 2548; + SCI_ANNOTATIONGETVISIBLE = 2549; + SCI_ANNOTATIONSETSTYLEOFFSET = 2550; + SCI_ANNOTATIONGETSTYLEOFFSET = 2551; + UNDO_MAY_COALESCE = 1; + SCI_ADDUNDOACTION = 2560; + SCI_CHARPOSITIONFROMPOINT = 2561; + SCI_CHARPOSITIONFROMPOINTCLOSE = 2562; + SCI_SETMULTIPLESELECTION = 2563; + SCI_GETMULTIPLESELECTION = 2564; + SCI_SETADDITIONALSELECTIONTYPING = 2565; + SCI_GETADDITIONALSELECTIONTYPING = 2566; + SCI_SETADDITIONALCARETSBLINK = 2567; + SCI_GETADDITIONALCARETSBLINK = 2568; + SCI_SETADDITIONALCARETSVISIBLE = 2608; + SCI_GETADDITIONALCARETSVISIBLE = 2609; + SCI_GETSELECTIONS = 2570; + SCI_CLEARSELECTIONS = 2571; + SCI_SETSELECTION = 2572; + SCI_ADDSELECTION = 2573; + SCI_SETMAINSELECTION = 2574; + SCI_GETMAINSELECTION = 2575; + SCI_SETSELECTIONNCARET = 2576; + SCI_GETSELECTIONNCARET = 2577; + SCI_SETSELECTIONNANCHOR = 2578; + SCI_GETSELECTIONNANCHOR = 2579; + SCI_SETSELECTIONNCARETVIRTUALSPACE = 2580; + SCI_GETSELECTIONNCARETVIRTUALSPACE = 2581; + SCI_SETSELECTIONNANCHORVIRTUALSPACE = 2582; + SCI_GETSELECTIONNANCHORVIRTUALSPACE = 2583; + SCI_SETSELECTIONNSTART = 2584; + SCI_GETSELECTIONNSTART = 2585; + SCI_SETSELECTIONNEND = 2586; + SCI_GETSELECTIONNEND = 2587; + SCI_SETRECTANGULARSELECTIONCARET = 2588; + SCI_GETRECTANGULARSELECTIONCARET = 2589; + SCI_SETRECTANGULARSELECTIONANCHOR = 2590; + SCI_GETRECTANGULARSELECTIONANCHOR = 2591; + SCI_SETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2592; + SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE = 2593; + SCI_SETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2594; + SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE = 2595; + SCVS_NONE = 0; + SCVS_RECTANGULARSELECTION = 1; + SCVS_USERACCESSIBLE = 2; + SCI_SETVIRTUALSPACEOPTIONS = 2596; + SCI_GETVIRTUALSPACEOPTIONS = 2597; + SCI_SETRECTANGULARSELECTIONMODIFIER = 2598; + SCI_GETRECTANGULARSELECTIONMODIFIER = 2599; + SCI_SETADDITIONALSELFORE = 2600; + SCI_SETADDITIONALSELBACK = 2601; + SCI_SETADDITIONALSELALPHA = 2602; + SCI_GETADDITIONALSELALPHA = 2603; + SCI_SETADDITIONALCARETFORE = 2604; + SCI_GETADDITIONALCARETFORE = 2605; + SCI_ROTATESELECTION = 2606; + SCI_SWAPMAINANCHORCARET = 2607; + SCI_CHANGELEXERSTATE = 2617; + SCI_STARTRECORD = 3001; + SCI_STOPRECORD = 3002; + SCI_SETLEXER = 4001; + SCI_GETLEXER = 4002; + SCI_COLOURISE = 4003; + SCI_SETPROPERTY = 4004; + KEYWORDSET_MAX = 8; + SCI_SETKEYWORDS = 4005; + SCI_SETLEXERLANGUAGE = 4006; + SCI_LOADLEXERLIBRARY = 4007; + SCI_GETPROPERTY = 4008; + SCI_GETPROPERTYEXPANDED = 4009; + SCI_GETPROPERTYINT = 4010; + SCI_GETSTYLEBITSNEEDED = 4011; + SCI_GETLEXERLANGUAGE = 4012; + SCI_PRIVATELEXERCALL = 4013; + SCI_PROPERTYNAMES = 4014; + SC_TYPE_BOOLEAN = 0; + SC_TYPE_INTEGER = 1; + SC_TYPE_STRING = 2; + SCI_PROPERTYTYPE = 4015; + SCI_DESCRIBEPROPERTY = 4016; + SCI_DESCRIBEKEYWORDSETS = 4017; + SC_MOD_INSERTTEXT = $1; + SC_MOD_DELETETEXT = $2; + SC_MOD_CHANGESTYLE = $4; + SC_MOD_CHANGEFOLD = $8; + SC_PERFORMED_USER = $10; + SC_PERFORMED_UNDO = $20; + SC_PERFORMED_REDO = $40; + SC_MULTISTEPUNDOREDO = $80; + SC_LASTSTEPINUNDOREDO = $100; + SC_MOD_CHANGEMARKER = $200; + SC_MOD_BEFOREINSERT = $400; + SC_MOD_BEFOREDELETE = $800; + SC_MULTILINEUNDOREDO = $1000; + SC_STARTACTION = $2000; + SC_MOD_CHANGEINDICATOR = $4000; + SC_MOD_CHANGELINESTATE = $8000; + SC_MOD_CHANGEMARGIN = $10000; + SC_MOD_CHANGEANNOTATION = $20000; + SC_MOD_CONTAINER = $40000; + SC_MOD_LEXERSTATE = $80000; + SC_MODEVENTMASKALL = $FFFFF; + SCEN_CHANGE = 768; + SCEN_SETFOCUS = 512; + SCEN_KILLFOCUS = 256; + SCK_DOWN = 300; + SCK_UP = 301; + SCK_LEFT = 302; + SCK_RIGHT = 303; + SCK_HOME = 304; + SCK_END = 305; + SCK_PRIOR = 306; + SCK_NEXT = 307; + SCK_DELETE = 308; + SCK_INSERT = 309; + SCK_ESCAPE = 7; + SCK_BACK = 8; + SCK_TAB = 9; + SCK_RETURN = 13; + SCK_ADD = 310; + SCK_SUBTRACT = 311; + SCK_DIVIDE = 312; + SCK_WIN = 313; + SCK_RWIN = 314; + SCK_MENU = 315; + SCMOD_NORM = 0; + SCMOD_SHIFT = 1; + SCMOD_CTRL = 2; + SCMOD_ALT = 4; + SCMOD_SUPER = 8; + SCN_STYLENEEDED = 2000; + SCN_CHARADDED = 2001; + SCN_SAVEPOINTREACHED = 2002; + SCN_SAVEPOINTLEFT = 2003; + SCN_MODIFYATTEMPTRO = 2004; + SCN_KEY = 2005; + SCN_DOUBLECLICK = 2006; + SCN_UPDATEUI = 2007; + SCN_MODIFIED = 2008; + SCN_MACRORECORD = 2009; + SCN_MARGINCLICK = 2010; + SCN_NEEDSHOWN = 2011; + SCN_PAINTED = 2013; + SCN_USERLISTSELECTION = 2014; + SCN_URIDROPPED = 2015; + SCN_DWELLSTART = 2016; + SCN_DWELLEND = 2017; + SCN_ZOOM = 2018; + SCN_HOTSPOTCLICK = 2019; + SCN_HOTSPOTDOUBLECLICK = 2020; + SCN_CALLTIPCLICK = 2021; + SCN_AUTOCSELECTION = 2022; + SCN_INDICATORCLICK = 2023; + SCN_INDICATORRELEASE = 2024; + SCN_AUTOCCANCELLED = 2025; + SCN_AUTOCCHARDELETED = 2026; + +type + TSci_CharacterRange = record + cpMin: Longint; + cpMax: Longint; + end; + + TSci_TextRange = record + chrg: TSci_CharacterRange; + lpstrText: PAnsiChar; + end; + + PSCNotification = ^TSCNotification; + TSCNotification = record + nmhdr: TNMHdr; + position: Integer; { SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, SCN_DWELLEND } + ch: Integer; { SCN_CHARADDED, SCN_KEY } + modifiers: Integer; { SCN_KEY } + modificationType: Integer; { SCN_MODIFIED } + text: PAnsiChar; { SCN_MODIFIED, SCN_USERLISTSELECTION, SCN_AUTOCSELECTION } + length: Integer; { SCN_MODIFIED } + linesAdded: Integer; { SCN_MODIFIED } + message: Integer; { SCN_MACRORECORD } + wParam: WPARAM; { SCN_MACRORECORD } + lParam: LPARAM; { SCN_MACRORECORD } + line: Integer; { SCN_MODIFIED } + foldLevelNow: Integer; { SCN_MODIFIED } + foldLevelPrev: Integer; { SCN_MODIFIED } + margin: Integer; { SCN_MARGINCLICK } + listType: Integer; { SCN_USERLISTSELECTION } + x: Integer; { SCN_DWELLSTART, SCN_DWELLEND } + y: Integer; { SCN_DWELLSTART, SCN_DWELLEND } + token: Integer; { SCN_MODIFIED with SC_MOD_CONTAINER } + annotationLinesAdded: Integer; { SC_MOD_CHANGEANNOTATION } + end; + +function Scintilla_DirectFunction(ptr: Pointer; iMessage: Cardinal; + wParam: WPARAM; lParam: LPARAM): LRESULT; stdcall; external 'isscint.dll'; + +implementation + +end. diff --git a/Components/ScintStylerInnoSetup.pas b/Components/ScintStylerInnoSetup.pas new file mode 100644 index 000000000..450b3967a --- /dev/null +++ b/Components/ScintStylerInnoSetup.pas @@ -0,0 +1,1179 @@ +unit ScintStylerInnoSetup; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + TInnoSetupStyler: styler for Inno Setup scripts + + $jrsoftware: issrc/Components/ScintStylerInnoSetup.pas,v 1.13 2010/12/30 13:00:11 mlaan Exp $ +} + +interface + +uses + SysUtils, Classes, Graphics, ScintEdit; + +type + { Internally-used types } + TInnoSetupStylerParamInfo = record + Name: TScintRawString; + end; + TInnoSetupStylerSpanState = (spNone, spBraceComment, spStarComment); + + TInnoSetupStylerSection = ( + scNone, { Not inside a section (start of file, or last section was closed) } + scUnknown, { Inside an unrecognized section } + scThirdParty, { Inside a '_' section (reserved for third-party tools) } + scCode, + scComponents, + scCustomMessages, + scDirs, + scFiles, + scIcons, + scINI, + scInstallDelete, + scLangOptions, + scLanguages, + scMessages, + scRegistry, + scRun, + scSetup, + scTasks, + scTypes, + scUninstallDelete, + scUninstallRun); + + TInnoSetupStylerStyle = (stDefault, stCompilerDirective, + stComment, stSection, stSymbol, stKeyword, stParameterValue, + stEventFunction, stConstant, stMessageArg); + + TInnoSetupStyler = class(TScintCustomStyler) + private + FKeywordList: array[TInnoSetupStylerSection] of AnsiString; + procedure ApplyPendingSquigglyFromIndex(const StartIndex: Integer); + procedure ApplySquigglyFromIndex(const StartIndex: Integer); + procedure BuildKeywordListFromEnumType(const Section: TInnoSetupStylerSection; + const EnumTypeInfo: Pointer); + procedure BuildKeywordListFromParameters(const Section: TInnoSetupStylerSection; + const Parameters: array of TInnoSetupStylerParamInfo); + procedure CommitStyleSq(const Style: TInnoSetupStylerStyle; + const Squigglify: Boolean); + procedure CommitStyleSqPending(const Style: TInnoSetupStylerStyle); + function GetKeywordList(Section: TInnoSetupStylerSection): AnsiString; + procedure HandleCodeSection(var SpanState: TInnoSetupStylerSpanState); + procedure HandleKeyValueSection(const Section: TInnoSetupStylerSection); + procedure HandleParameterSection(const ValidParameters: array of TInnoSetupStylerParamInfo); + procedure PreStyleInlineISPPDirectives; + procedure SkipWhitespace; + procedure SquigglifyUntilChars(const Chars: TScintRawCharSet; + const Style: TInnoSetupStylerStyle); + procedure StyleConstsUntilChars(const Chars: TScintRawCharSet; + const NonConstStyle: TInnoSetupStylerStyle; var BraceLevel: Integer); + protected + procedure CommitStyle(const Style: TInnoSetupStylerStyle); + procedure GetStyleAttributes(const Style: Integer; + var Attributes: TScintStyleAttributes); override; + function LineTextSpans(const S: TScintRawString): Boolean; override; + procedure StyleNeeded; override; + public + constructor Create(AOwner: TComponent); override; + class function GetSectionFromLineState(const LineState: TScintLineState): TInnoSetupStylerSection; + class function IsParamSection(const Section: TInnoSetupStylerSection): Boolean; + class function IsSymbolStyle(const Style: TScintStyleNumber): Boolean; + property KeywordList[Section: TInnoSetupStylerSection]: AnsiString read GetKeywordList; + end; + +implementation + +uses + TypInfo; + +type + TInnoSetupStylerLineState = record + Section, NextLineSection: TInnoSetupStylerSection; + SpanState: TInnoSetupStylerSpanState; + Reserved: Byte; + end; + + TSetupSectionDirective = ( + ssAllowCancelDuringInstall, + ssAllowNoIcons, + ssAllowRootDirectory, + ssAllowUNCPath, + ssAlwaysRestart, + ssAlwaysShowComponentsList, + ssAlwaysShowDirOnReadyPage, + ssAlwaysShowGroupOnReadyPage, + ssAlwaysUsePersonalGroup, + ssAppCopyright, + ssAppendDefaultDirName, + ssAppendDefaultGroupName, + ssAppComments, + ssAppContact, + ssAppId, + ssAppModifyPath, + ssAppMutex, + ssAppName, + ssAppPublisher, + ssAppPublisherURL, + ssAppReadmeFile, + ssAppSupportPhone, + ssAppSupportURL, + ssAppUpdatesURL, + ssAppVerName, + ssAppVersion, + ssArchitecturesAllowed, + ssArchitecturesInstallIn64BitMode, + ssBackColor, + ssBackColor2, + ssBackColorDirection, + ssBackSolid, + ssChangesAssociations, + ssChangesEnvironment, + ssCompression, + ssCompressionThreads, + ssCreateAppDir, + ssCreateUninstallRegKey, + ssDefaultDialogFontName, + ssDefaultDirName, + ssDefaultGroupName, + ssDefaultUserInfoName, + ssDefaultUserInfoOrg, + ssDefaultUserInfoSerial, + ssDirExistsWarning, + ssDisableDirPage, + ssDisableFinishedPage, + ssDisableProgramGroupPage, + ssDisableReadyMemo, + ssDisableReadyPage, + ssDisableStartupPrompt, + ssDisableWelcomePage, + ssDiskClusterSize, + ssDiskSliceSize, + ssDiskSpanning, + ssDontMergeDuplicateFiles, + ssEnableDirDoesntExistWarning, + ssEncryption, + ssExtraDiskSpaceRequired, + ssFlatComponentsList, + ssInfoAfterFile, + ssInfoBeforeFile, + ssInternalCompressLevel, + ssLanguageDetectionMethod, + ssLicenseFile, + ssLZMAAlgorithm, + ssLZMABlockSize, + ssLZMADictionarySize, + ssLZMAMatchFinder, + ssLZMANumBlockThreads, + ssLZMANumFastBytes, + ssLZMAUseSeparateProcess, + ssMergeDuplicateFiles, + ssMessagesFile, + ssMinVersion, + ssOnlyBelowVersion, + ssOutputBaseFilename, + ssOutputDir, + ssOutputManifestFile, + ssPassword, + ssPrivilegesRequired, + ssReserveBytes, + ssRestartIfNeededByRun, + ssSetupIconFile, + ssSetupLogging, + ssShowComponentSizes, + ssShowLanguageDialog, + ssShowTasksTreeLines, + ssShowUndisplayableLanguages, + ssSignedUninstaller, + ssSignedUninstallerDir, + ssSignTool, + ssSlicesPerDisk, + ssSolidCompression, + ssSourceDir, + ssTerminalServicesAware, + ssTimeStampRounding, + ssTimeStampsInUTC, + ssTouchDate, + ssTouchTime, + ssUpdateUninstallLogAppName, + ssUninstallable, + ssUninstallDisplayIcon, + ssUninstallDisplayName, + ssUninstallDisplaySize, + ssUninstallFilesDir, + ssUninstallIconFile, + ssUninstallLogMode, + ssUninstallRestartComputer, + ssUninstallStyle, + ssUsePreviousAppDir, + ssUsePreviousGroup, + ssUsePreviousLanguage, + ssUsePreviousSetupType, + ssUsePreviousTasks, + ssUsePreviousUserInfo, + ssUseSetupLdr, + ssUserInfoPage, + ssVersionInfoCompany, + ssVersionInfoCopyright, + ssVersionInfoDescription, + ssVersionInfoProductName, + ssVersionInfoProductVersion, + ssVersionInfoProductTextVersion, + ssVersionInfoTextVersion, + ssVersionInfoVersion, + ssWindowResizable, + ssWindowShowCaption, + ssWindowStartMaximized, + ssWindowVisible, + ssWizardImageBackColor, + ssWizardImageFile, + ssWizardImageStretch, + ssWizardSmallImageBackColor, + ssWizardSmallImageFile, + ssWizardStyle); + + TLangOptionsSectionDirective = ( + lsCopyrightFontName, + lsCopyrightFontSize, + lsDialogFontName, + lsDialogFontSize, + lsDialogFontStandardHeight, + lsLanguageCodePage, + lsLanguageID, + lsLanguageName, + lsRightToLeft, + lsTitleFontName, + lsTitleFontSize, + lsWelcomeFontName, + lsWelcomeFontSize); + +const + ComponentsSectionParameters: array[0..8] of TInnoSetupStylerParamInfo = ( + (Name: 'Check'), + (Name: 'Description'), + (Name: 'ExtraDiskSpaceRequired'), + (Name: 'Flags'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'Name'), + (Name: 'OnlyBelowVersion'), + (Name: 'Types')); + + DeleteSectionParameters: array[0..9] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Components'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'Name'), + (Name: 'OnlyBelowVersion'), + (Name: 'Tasks'), + (Name: 'Type')); + + DirsSectionParameters: array[0..11] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'Attribs'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Components'), + (Name: 'Flags'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'Name'), + (Name: 'OnlyBelowVersion'), + (Name: 'Permissions'), + (Name: 'Tasks')); + + FilesSectionParameters: array[0..18] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'Attribs'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Components'), + (Name: 'CopyMode'), + (Name: 'DestDir'), + (Name: 'DestName'), + (Name: 'Excludes'), + (Name: 'ExternalSize'), + (Name: 'Flags'), + (Name: 'FontInstall'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'OnlyBelowVersion'), + (Name: 'Permissions'), + (Name: 'Source'), + (Name: 'StrongAssemblyName'), + (Name: 'Tasks')); + + IconsSectionParameters: array[0..17] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'AppUserModelID'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Comment'), + (Name: 'Components'), + (Name: 'Filename'), + (Name: 'Flags'), + (Name: 'HotKey'), + (Name: 'IconFilename'), + (Name: 'IconIndex'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'Name'), + (Name: 'OnlyBelowVersion'), + (Name: 'Parameters'), + (Name: 'Tasks'), + (Name: 'WorkingDir')); + + INISectionParameters: array[0..12] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Components'), + (Name: 'Filename'), + (Name: 'Flags'), + (Name: 'Key'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'OnlyBelowVersion'), + (Name: 'Section'), + (Name: 'String'), + (Name: 'Tasks')); + + LanguagesSectionParameters: array[0..4] of TInnoSetupStylerParamInfo = ( + (Name: 'InfoAfterFile'), + (Name: 'InfoBeforeFile'), + (Name: 'LicenseFile'), + (Name: 'MessagesFile'), + (Name: 'Name')); + + RegistrySectionParameters: array[0..14] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Components'), + (Name: 'Flags'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'OnlyBelowVersion'), + (Name: 'Permissions'), + (Name: 'Root'), + (Name: 'Subkey'), + (Name: 'Tasks'), + (Name: 'ValueData'), + (Name: 'ValueName'), + (Name: 'ValueType')); + + RunSectionParameters: array[0..15] of TInnoSetupStylerParamInfo = ( + (Name: 'AfterInstall'), + (Name: 'BeforeInstall'), + (Name: 'Check'), + (Name: 'Components'), + (Name: 'Description'), + (Name: 'Filename'), + (Name: 'Flags'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'OnlyBelowVersion'), + (Name: 'Parameters'), + (Name: 'RunOnceId'), + (Name: 'StatusMsg'), + (Name: 'Tasks'), + (Name: 'Verb'), + (Name: 'WorkingDir')); + + TasksSectionParameters: array[0..8] of TInnoSetupStylerParamInfo = ( + (Name: 'Check'), + (Name: 'Components'), + (Name: 'Description'), + (Name: 'Flags'), + (Name: 'GroupDescription'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'Name'), + (Name: 'OnlyBelowVersion')); + + TypesSectionParameters: array[0..6] of TInnoSetupStylerParamInfo = ( + (Name: 'Check'), + (Name: 'Description'), + (Name: 'Flags'), + (Name: 'Languages'), + (Name: 'MinVersion'), + (Name: 'Name'), + (Name: 'OnlyBelowVersion')); + +const + stPascalNumber = stDefault; + stPascalReservedWord = stKeyword; + stPascalString = stDefault; + + inSquiggly = 0; + inPendingSquiggly = 1; + + AllChars = [#0..#255]; + WhitespaceChars = [#0..' ']; + AlphaChars = ['A'..'Z', 'a'..'z']; + DigitChars = ['0'..'9']; + HexDigitChars = DigitChars + ['A'..'F', 'a'..'f']; + AlphaUnderscoreChars = AlphaChars + ['_']; + AlphaDigitChars = AlphaChars + DigitChars; + AlphaDigitUnderscoreChars = AlphaChars + DigitChars + ['_']; + + PascalIdentFirstChars = AlphaUnderscoreChars; + PascalIdentChars = AlphaDigitUnderscoreChars; + +function SameRawText(const S1, S2: TScintRawString): Boolean; +var + Len, I: Integer; + C1, C2: AnsiChar; +begin + Len := Length(S1); + if Length(S2) <> Len then begin + Result := False; + Exit; + end; + for I := 1 to Len do begin + C1 := S1[I]; + C2 := S2[I]; + if C1 in ['A'..'Z'] then + Inc(C1, 32); + if C2 in ['A'..'Z'] then + Inc(C2, 32); + if C1 <> C2 then begin + Result := False; + Exit; + end; + end; + Result := True; +end; + + +function GetASCIISortedInsertPos(const SL: TStringList; const S: String): Integer; +var + L, H, I, C: Integer; +begin + L := 0; + H := SL.Count - 1; + while L <= H do begin + I := (L + H) div 2; + C := CompareText(SL[I], S); + if C = 0 then begin + L := I; + Break; + end; + if C < 0 then + L := I + 1 + else + H := I - 1; + end; + Result := L; +end; + +function MapSectionNameString(const S: TScintRawString): TInnoSetupStylerSection; +type + TSectionMapEntry = record + Name: TScintRawString; + Value: TInnoSetupStylerSection; + end; +const + SectionMap: array[0..17] of TSectionMapEntry = ( + (Name: 'Code'; Value: scCode), + (Name: 'Components'; Value: scComponents), + (Name: 'CustomMessages'; Value: scCustomMessages), + (Name: 'Dirs'; Value: scDirs), + (Name: 'Files'; Value: scFiles), + (Name: 'Icons'; Value: scIcons), + (Name: 'INI'; Value: scINI), + (Name: 'InstallDelete'; Value: scInstallDelete), + (Name: 'LangOptions'; Value: scLangOptions), + (Name: 'Languages'; Value: scLanguages), + (Name: 'Messages'; Value: scMessages), + (Name: 'Registry'; Value: scRegistry), + (Name: 'Run'; Value: scRun), + (Name: 'Setup'; Value: scSetup), + (Name: 'Tasks'; Value: scTasks), + (Name: 'Types'; Value: scTypes), + (Name: 'UninstallDelete'; Value: scUninstallDelete), + (Name: 'UninstallRun'; Value: scUninstallRun)); +var + I: Integer; +begin + if (S <> '') and (S[1] = '_') then + Result := scThirdParty + else begin + Result := scUnknown; + for I := Low(SectionMap) to High(SectionMap) do + if SameRawText(S, SectionMap[I].Name) then begin + Result := SectionMap[I].Value; + Break; + end; + end; +end; + +{ TInnoSetupStyler } + +constructor TInnoSetupStyler.Create(AOwner: TComponent); +begin + inherited; + BuildKeywordListFromParameters(scComponents, ComponentsSectionParameters); + BuildKeywordListFromParameters(scDirs, DirsSectionParameters); + BuildKeywordListFromParameters(scFiles, FilesSectionParameters); + BuildKeywordListFromParameters(scIcons, IconsSectionParameters); + BuildKeywordListFromParameters(scINI, INISectionParameters); + BuildKeywordListFromParameters(scInstallDelete, DeleteSectionParameters); + BuildKeywordListFromEnumType(scLangOptions, TypeInfo(TLangOptionsSectionDirective)); + BuildKeywordListFromParameters(scLanguages, LanguagesSectionParameters); + BuildKeywordListFromParameters(scRegistry, RegistrySectionParameters); + BuildKeywordListFromParameters(scRun, RunSectionParameters); + BuildKeywordListFromEnumType(scSetup, TypeInfo(TSetupSectionDirective)); + BuildKeywordListFromParameters(scTasks, TasksSectionParameters); + BuildKeywordListFromParameters(scTypes, TypesSectionParameters); + BuildKeywordListFromParameters(scUninstallDelete, DeleteSectionParameters); + BuildKeywordListFromParameters(scUninstallRun, RunSectionParameters); +end; + +procedure TInnoSetupStyler.ApplyPendingSquigglyFromIndex(const StartIndex: Integer); +begin + if (CaretIndex >= StartIndex) and (CaretIndex <= CurIndex) then + ApplyIndicators([inPendingSquiggly], StartIndex, CurIndex - 1) + else + ApplyIndicators([inSquiggly], StartIndex, CurIndex - 1); +end; + +procedure TInnoSetupStyler.ApplySquigglyFromIndex(const StartIndex: Integer); +begin + ApplyIndicators([inSquiggly], StartIndex, CurIndex - 1); +end; + +procedure TInnoSetupStyler.BuildKeywordListFromEnumType( + const Section: TInnoSetupStylerSection; const EnumTypeInfo: Pointer); +var + SL: TStringList; + I: Integer; + S: String; + A, WordList: AnsiString; +begin + SL := TStringList.Create; + try + { Scintilla uses an ASCII binary search so the list must be in + ASCII sort order (case-insensitive). (TStringList's Sort method is + not suitable as it uses AnsiCompareText.) } + for I := 0 to GetTypeData(EnumTypeInfo).MaxValue do begin + S := Copy(GetEnumName(EnumTypeInfo, I), 3, Maxint); + SL.Insert(GetASCIISortedInsertPos(SL, S), S); + end; + for I := 0 to SL.Count-1 do begin + A := AnsiString(SL[I]); + if I = 0 then + WordList := A + else + WordList := WordList + ' ' + A; + end; + finally + SL.Free; + end; + FKeywordList[Section] := WordList; +end; + +procedure TInnoSetupStyler.BuildKeywordListFromParameters( + const Section: TInnoSetupStylerSection; + const Parameters: array of TInnoSetupStylerParamInfo); +var + SL: TStringList; + I: Integer; + S: String; + A, WordList: AnsiString; +begin + SL := TStringList.Create; + try + { Scintilla uses an ASCII binary search so the list must be in + ASCII sort order (case-insensitive). (TStringList's Sort method is + not suitable as it uses AnsiCompareText.) } + for I := 0 to High(Parameters) do begin + S := String(Parameters[I].Name); + SL.Insert(GetASCIISortedInsertPos(SL, S), S); + end; + for I := 0 to SL.Count-1 do begin + A := AnsiString(SL[I]); + if I = 0 then + WordList := A + else + WordList := WordList + ' ' + A; + end; + finally + SL.Free; + end; + FKeywordList[Section] := WordList; +end; + +procedure TInnoSetupStyler.CommitStyle(const Style: TInnoSetupStylerStyle); +begin + inherited CommitStyle(Ord(Style)); +end; + +procedure TInnoSetupStyler.CommitStyleSq(const Style: TInnoSetupStylerStyle; + const Squigglify: Boolean); +begin + if Squigglify then + ApplySquigglyFromIndex(StyleStartIndex); + CommitStyle(Style); +end; + +procedure TInnoSetupStyler.CommitStyleSqPending(const Style: TInnoSetupStylerStyle); +begin + ApplyPendingSquigglyFromIndex(StyleStartIndex); + CommitStyle(Style); +end; + +function TInnoSetupStyler.GetKeywordList(Section: TInnoSetupStylerSection): AnsiString; +begin + Result := FKeywordList[Section]; +end; + +class function TInnoSetupStyler.GetSectionFromLineState( + const LineState: TScintLineState): TInnoSetupStylerSection; +begin + Result := TInnoSetupStylerLineState(LineState).Section; +end; + +procedure TInnoSetupStyler.GetStyleAttributes(const Style: Integer; + var Attributes: TScintStyleAttributes); +const + STYLE_BRACELIGHT = 34; + STYLE_IDENTGUIDE = 37; +begin + if (Style >= 0) and (Style <= Ord(High(TInnoSetupStylerStyle))) then begin + case TInnoSetupStylerStyle(Style) of + stCompilerDirective: Attributes.ForeColor := $4040C0; + stComment: Attributes.ForeColor := clGreen; + stSection: Attributes.FontStyle := [fsBold]; + stSymbol: Attributes.ForeColor := $707070; + stKeyword: Attributes.ForeColor := clBlue; + //stParameterValue: Attributes.ForeColor := clTeal; + stEventFunction: Attributes.FontStyle := [fsBold]; + stConstant: Attributes.ForeColor := $C00080; + stMessageArg: Attributes.ForeColor := $FF8000; + end; + end + else begin + case Style of + STYLE_BRACELIGHT: Attributes.BackColor := $E0E0E0; + STYLE_IDENTGUIDE: Attributes.ForeColor := clSilver; + end; + end; +end; + +procedure TInnoSetupStyler.HandleCodeSection(var SpanState: TInnoSetupStylerSpanState); + + function FinishConsumingBraceComment: Boolean; + begin + ConsumeCharsNot(['}']); + Result := ConsumeChar('}'); + CommitStyle(stComment); + end; + + function FinishConsumingStarComment: Boolean; + begin + Result := False; + while True do begin + ConsumeCharsNot(['*']); + if not ConsumeChar('*') then + Break; + if ConsumeChar(')') then begin + Result := True; + Break; + end; + end; + CommitStyle(stComment); + end; + +const + PascalReservedWords: array[0..41] of TScintRawString = ( + 'and', 'array', 'as', 'begin', 'case', 'const', 'div', + 'do', 'downto', 'else', 'end', 'except', 'external', + 'finally', 'for', 'function', 'goto', 'if', 'in', 'is', + 'label', 'mod', 'nil', 'not', 'of', 'or', 'procedure', + 'program', 'record', 'repeat', 'set', 'shl', 'shr', + 'then', 'to', 'try', 'type', 'until', 'var', 'while', + 'with', 'xor'); + EventFunctions: array[0..20] of TScintRawString = ( + 'InitializeSetup', 'DeinitializeSetup', 'CurStepChanged', + 'NextButtonClick', 'BackButtonClick', 'ShouldSkipPage', + 'CurPageChanged', 'CheckPassword', 'NeedRestart', + 'UpdateReadyMemo', 'RegisterPreviousData', 'CheckSerial', + 'InitializeWizard', 'GetCustomSetupExitCode', + 'InitializeUninstall', 'DeinitializeUninstall', + 'CurUninstallStepChanged', 'UninstallNeedRestart', + 'CancelButtonClick', 'InitializeUninstallProgressForm', + 'PrepareToInstall'); +var + S: TScintRawString; + I: Integer; + C: AnsiChar; +begin + case SpanState of + spBraceComment: + if not FinishConsumingBraceComment then + Exit; + spStarComment: + if not FinishConsumingStarComment then + Exit; + end; + + SpanState := spNone; + SkipWhitespace; + while not EndOfLine do begin + if CurChar in PascalIdentFirstChars then begin + S := ConsumeString(PascalIdentChars); + for I := Low(PascalReservedWords) to High(PascalReservedWords) do + if SameRawText(S, PascalReservedWords[I]) then begin + CommitStyle(stPascalReservedWord); + Break; + end; + for I := Low(EventFunctions) to High(EventFunctions) do + if SameRawText(S, EventFunctions[I]) then begin + CommitStyle(stEventFunction); + Break; + end; + CommitStyle(stDefault); + end + else if ConsumeChars(DigitChars) then begin + if not CurCharIs('.') or not NextCharIs('.') then begin + if ConsumeChar('.') then + ConsumeChars(DigitChars); + C := CurChar; + if C in ['E', 'e'] then begin + ConsumeChar(C); + if not ConsumeChar('-') then + ConsumeChar('+'); + if not ConsumeChars(DigitChars) then + CommitStyleSqPending(stPascalNumber); + end; + end; + CommitStyle(stPascalNumber); + end + else begin + C := CurChar; + ConsumeChar(C); + case C of + ';', ':', '=', '+', '-', '*', '/', '<', '>', ',', '(', ')', + '.', '[', ']', '@', '^': + begin + if (C = '/') and ConsumeChar('/') then begin + ConsumeAllRemaining; + CommitStyle(stComment); + end + else if (C = '(') and ConsumeChar('*') then begin + if not FinishConsumingStarComment then begin + SpanState := spStarComment; + Exit; + end; + end + else + CommitStyle(stSymbol); + end; + '''': + begin + while True do begin + ConsumeCharsNot(['''']); + if not ConsumeChar('''') then begin + CommitStyleSqPending(stPascalString); + Break; + end; + if not ConsumeChar('''') then begin + CommitStyle(stPascalString); + Break; + end; + end; + end; + '{': + begin + if not FinishConsumingBraceComment then begin + SpanState := spBraceComment; + Exit; + end; + end; + '$': + begin + ConsumeChars(HexDigitChars); + CommitStyle(stPascalNumber); + end; + '#': + begin + if ConsumeChar('$') then + ConsumeChars(HexDigitChars) + else + ConsumeChars(DigitChars); + CommitStyle(stPascalString); + end; + else + { Illegal character } + CommitStyleSq(stSymbol, True); + end; + end; + SkipWhitespace; + end; +end; + +procedure TInnoSetupStyler.HandleParameterSection( + const ValidParameters: array of TInnoSetupStylerParamInfo); +var + ParamsSpecified: set of 0..31; + S: TScintRawString; + I, ParamValueIndex, BraceLevel: Integer; + NamePresent, ValidName, DuplicateName, ColonPresent: Boolean; +begin + ParamsSpecified := []; + while not EndOfLine do begin + { Squigglify any bogus characters before the parameter name } + SquigglifyUntilChars(AlphaChars + [':'], stDefault); + + { Parameter name } + S := ConsumeString(AlphaDigitChars); + NamePresent := (S <> ''); + ValidName := False; + DuplicateName := False; + for I := Low(ValidParameters) to High(ValidParameters) do + if SameRawText(S, ValidParameters[I].Name) then begin + ValidName := True; + DuplicateName := (I in ParamsSpecified); + Include(ParamsSpecified, I); + Break; + end; + if DuplicateName then + CommitStyleSqPending(stKeyword) + else if ValidName then + CommitStyle(stKeyword) + else + CommitStyleSqPending(stDefault); + SkipWhitespace; + + { If there's a semicolon with no colon, squigglify the semicolon } + if ConsumeChar(';') then begin + CommitStyleSq(stSymbol, True); + SkipWhitespace; + Continue; + end; + + { Colon } + ColonPresent := ConsumeChar(':'); + CommitStyleSq(stSymbol, not NamePresent); + SkipWhitespace; + + { Parameter value. This consumes until a ';' is found or EOL is reached. } + ParamValueIndex := CurIndex; + BraceLevel := 0; + if ConsumeChar('"') then begin + while True do begin + StyleConstsUntilChars(['"'], stParameterValue, BraceLevel); + { If no closing quote exists, squigglify the whole value and break } + if not ConsumeChar('"') then begin + ApplyPendingSquigglyFromIndex(ParamValueIndex); + Break; + end; + { Quote found, now break, unless there are two quotes in a row } + if not ConsumeChar('"') then + Break; + end; + end + else begin + while True do begin + StyleConstsUntilChars([';', '"'], stParameterValue, BraceLevel); + { Squigglify any quote characters inside an unquoted string } + if ConsumeChar('"') then + ApplySquigglyFromIndex(CurIndex - 1) + else + Break; + end; + end; + CommitStyle(stParameterValue); + if not ColonPresent then + ApplySquigglyFromIndex(ParamValueIndex); + { Squigglify any characters between a quoted string and the next ';' } + SquigglifyUntilChars([';'], stDefault); + + { Semicolon } + ConsumeChar(';'); + CommitStyle(stSymbol); + SkipWhitespace; + end; +end; + +procedure TInnoSetupStyler.HandleKeyValueSection(const Section: TInnoSetupStylerSection); + + procedure StyleMessageArgs; + begin + while True do begin + ConsumeCharsNot(['%']); + CommitStyle(stDefault); + if not ConsumeChar('%') then + Break; + if CurCharIn(['1'..'9', '%', 'n']) then begin + ConsumeChar(CurChar); + CommitStyle(stMessageArg); + end; + end; + end; + +var + S: String; + I, BraceLevel: Integer; +begin + { Squigglify any bogus characters at the start of the line } + SquigglifyUntilChars(AlphaUnderscoreChars, stDefault); + if EndOfLine then + Exit; + + S := String(ConsumeString(AlphaDigitUnderscoreChars)); + { Was that a language name? } + if (Section in [scCustomMessages, scLangOptions, scMessages]) and + CurCharIs('.') then begin + CommitStyle(stDefault); + ConsumeChar('.'); + CommitStyle(stSymbol); + { Squigglify any spaces or bogus characters between the '.' and key name } + if ConsumeCharsNot(AlphaUnderscoreChars) then + CommitStyleSq(stDefault, True); + S := String(ConsumeString(AlphaDigitUnderscoreChars)); + end; + + case Section of + scLangOptions: + I := GetEnumValue(TypeInfo(TLangOptionsSectionDirective), 'ls' + S); + scSetup: + I := GetEnumValue(TypeInfo(TSetupSectionDirective), 'ss' + S); + else + I := -1; + end; + if I <> -1 then + CommitStyle(stKeyword) + else begin + if Section in [scLangOptions, scSetup] then + CommitStyleSqPending(stDefault) + else + CommitStyle(stDefault); + end; + SquigglifyUntilChars(['='], stDefault); + + ConsumeChar('='); + CommitStyle(stSymbol); + SkipWhitespace; + + if Section in [scCustomMessages, scMessages] then + StyleMessageArgs + else begin + BraceLevel := 0; + StyleConstsUntilChars([], stDefault, BraceLevel); + end; +end; + +class function TInnoSetupStyler.IsParamSection( + const Section: TInnoSetupStylerSection): Boolean; +begin + Result := not (Section in [scCustomMessages, scLangOptions, scMessages, scSetup]); +end; + +class function TInnoSetupStyler.IsSymbolStyle(const Style: TScintStyleNumber): Boolean; +begin + Result := (Style = Ord(stSymbol)); +end; + +function TInnoSetupStyler.LineTextSpans(const S: TScintRawString): Boolean; +var + I: Integer; +begin + { Note: To match ISPP behavior, require length of at least 3 } + I := Length(S); + Result := (I > 2) and (S[I] = '\') and (S[I-1] in WhitespaceChars); +end; + +procedure TInnoSetupStyler.PreStyleInlineISPPDirectives; + + function IsLineCommented: Boolean; + var + I: Integer; + begin + Result := False; + for I := 1 to TextLength do begin + { In ISPP, only ';' and '//' inhibit processing of inline directives } + if (Text[I] = ';') or + ((I < TextLength) and (Text[I] = '/') and (Text[I+1] = '/')) then begin + Result := True; + Break; + end; + if not(Text[I] in WhitespaceChars) then + Break; + end; + end; + +const + LineEndChars = [#10, #13]; +var + I, StartIndex: Integer; + Valid: Boolean; +begin + { Style span symbols, then replace them with spaces to prevent any further + processing } + for I := 3 to TextLength do begin + if ((I = TextLength) or (Text[I+1] in LineEndChars)) and + (Text[I] = '\') and (Text[I-1] in WhitespaceChars) and + not(Text[I-2] in LineEndChars) then begin + ReplaceText(I, I, ' '); + ApplyStyle(Ord(stSymbol), I, I); + end; + end; + + { Style all '{#' ISPP inline directives before anything else } + if not IsLineCommented then begin + I := 1; + while I < TextLength do begin + if (Text[I] = '{') and (Text[I+1] = '#') then begin + StartIndex := I; + Valid := False; + while I <= TextLength do begin + Inc(I); + if Text[I-1] = '}' then begin + Valid := True; + Break; + end; + end; + { Replace the directive with spaces to prevent any further processing } + ReplaceText(StartIndex, I - 1, ' '); + if Valid then + ApplyStyle(Ord(stCompilerDirective), StartIndex, I - 1) + else begin + if (CaretIndex >= StartIndex) and (CaretIndex <= I) then + ApplyIndicators([inPendingSquiggly], StartIndex, I - 1) + else + ApplyIndicators([inSquiggly], StartIndex, I - 1); + end; + end + else + Inc(I); + end; + end; +end; + +procedure TInnoSetupStyler.SkipWhitespace; +begin + ConsumeChars(WhitespaceChars); + CommitStyle(stDefault); +end; + +procedure TInnoSetupStyler.SquigglifyUntilChars(const Chars: TScintRawCharSet; + const Style: TInnoSetupStylerStyle); +var + IsWhitespace: Boolean; +begin + { Consume and squigglify all non-whitespace characters until one of Chars + is encountered } + while not EndOfLine and not CurCharIn(Chars) do begin + IsWhitespace := CurCharIn(WhitespaceChars); + ConsumeChar(CurChar); + if IsWhitespace then + CommitStyle(stDefault) + else + CommitStyleSq(Style, True); + end; + CommitStyle(stDefault); +end; + +procedure TInnoSetupStyler.StyleConstsUntilChars(const Chars: TScintRawCharSet; + const NonConstStyle: TInnoSetupStylerStyle; var BraceLevel: Integer); +var + C: AnsiChar; +begin + while not EndOfLine and not CurCharIn(Chars) do begin + if BraceLevel = 0 then + CommitStyle(NonConstStyle); + C := CurChar; + ConsumeChar(C); + if C = '{' then begin + if not ConsumeChar('{') then + Inc(BraceLevel); + end; + if (C = '}') and (BraceLevel > 0) then begin + Dec(BraceLevel); + if BraceLevel = 0 then + CommitStyle(stConstant); + end; + end; +end; + +procedure TInnoSetupStyler.StyleNeeded; +var + NewLineState: TInnoSetupStylerLineState; + Section, NewSection: TInnoSetupStylerSection; + SectionEnd: Boolean; + S: TScintRawString; +begin + NewLineState := TInnoSetupStylerLineState(LineState); + if NewLineState.NextLineSection <> scNone then begin + NewLineState.Section := NewLineState.NextLineSection; + NewLineState.NextLineSection := scNone; + end; + Section := NewLineState.Section; + + PreStyleInlineISPPDirectives; + + SkipWhitespace; + if (Section <> scCode) and ConsumeChar(';') then begin + ConsumeAllRemaining; + CommitStyle(stComment); + end + else if ConsumeChar('[') then begin + SectionEnd := ConsumeChar('/'); + S := ConsumeString(AlphaUnderscoreChars); + if ConsumeChar(']') then begin + NewSection := MapSectionNameString(S); + { Unknown section names and erroneously-placed end tags get squigglified } + CommitStyleSq(stSection, (NewSection = scUnknown) or + (SectionEnd and (NewSection <> Section))); + if not SectionEnd then + NewLineState.NextLineSection := NewSection; + end + else + CommitStyleSqPending(stDefault); + { Section tags themselves are not associated with any section } + Section := scNone; + SquigglifyUntilChars([], stDefault); + end + else if ConsumeChar('#') then begin + ConsumeAllRemaining; + CommitStyle(stCompilerDirective); + end + else begin + case Section of + scUnknown: ; + scThirdParty: ; + scCode: HandleCodeSection(NewLineState.SpanState); + scComponents: HandleParameterSection(ComponentsSectionParameters); + scCustomMessages: HandleKeyValueSection(Section); + scDirs: HandleParameterSection(DirsSectionParameters); + scFiles: HandleParameterSection(FilesSectionParameters); + scIcons: HandleParameterSection(IconsSectionParameters); + scINI: HandleParameterSection(INISectionParameters); + scInstallDelete: HandleParameterSection(DeleteSectionParameters); + scLangOptions: HandleKeyValueSection(Section); + scLanguages: HandleParameterSection(LanguagesSectionParameters); + scMessages: HandleKeyValueSection(Section); + scRegistry: HandleParameterSection(RegistrySectionParameters); + scRun: HandleParameterSection(RunSectionParameters); + scSetup: HandleKeyValueSection(Section); + scTasks: HandleParameterSection(TasksSectionParameters); + scTypes: HandleParameterSection(TypesSectionParameters); + scUninstallDelete: HandleParameterSection(DeleteSectionParameters); + scUninstallRun: HandleParameterSection(RunSectionParameters); + end; + end; + + NewLineState.Section := Section; + LineState := TScintLineState(NewLineState); +end; + +end. diff --git a/Components/TmSchemaISX.pas b/Components/TmSchemaISX.pas new file mode 100644 index 000000000..05421153e --- /dev/null +++ b/Components/TmSchemaISX.pas @@ -0,0 +1,1629 @@ +{******************************************************************************} +{ } +{ Visual Styles (Themes) API interface Unit for Object Pascal } +{ } +{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft } +{ Corporation. All Rights Reserved. } +{ } +{ The original file is: tmschema.h, released June 2001. The original Pascal } +{ code is: TmSchema.pas, released July 2001. The initial developer of the } +{ Pascal code is Marcel van Brakel (brakelm@chello.nl). } +{ } +{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 } +{ Marcel van Brakel. All Rights Reserved. } +{ } +{ Portions created by Mike Lischke are Copyright (C) 1999-2001 } +{ Mike Lischke. All Rights Reserved. } +{ } +{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project JEDI home } +{ page, located at http://delphi-jedi.org or my personal homepage located at } +{ http://members.chello.nl/m.vanbrakel2 } +{ } +{ The contents of this file are used with permission, subject to the Mozilla } +{ Public License Version 1.1 (the "License"); you may not use this file except } +{ in compliance with the License. You may obtain a copy of the License at } +{ http://www.mozilla.org/MPL/MPL-1.1.html } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, } +{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } +{ the specific language governing rights and limitations under the License. } +{ } +{ Alternatively, the contents of this file may be used under the terms of the } +{ GNU Lesser General Public License (the "LGPL License"), in which case the } +{ provisions of the LGPL License are applicable instead of those above. } +{ If you wish to allow use of your version of this file only under the terms } +{ of the LGPL License and not to allow others to use your version of this file } +{ under the MPL, indicate your decision by deleting the provisions above and } +{ replace them with the notice and other provisions required by the LGPL } +{ License. If you do not delete the provisions above, a recipient may use } +{ your version of this file under either the MPL or the LGPL License. } +{ } +{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html } +{ } +{******************************************************************************} + +{ Simplified by Martijn Laan for My Inno Setup Extensions and Delphi 2 + See http://isx.wintax.nl/ for more information +} + +unit TmSchemaISX; + +interface + +//---------------------------------------------------------------------------------------------------------------------- +// TmSchema.h - Theme Manager schema (properties, parts, etc) +//---------------------------------------------------------------------------------------------------------------------- + +const + THEMEMGR_VERSION = 1; // increment if order of props changes or + // any props are deleted (will prevent loading + // of controlsets that use older version + +//---------------------------------------------------------------------------------------------------------------------- +// TM_ENUM (must also be declared in PROPERTIES section) +// +// these cannot be renumbered (part of uxtheme API) +//---------------------------------------------------------------------------------------------------------------------- + +type + BGTYPE = Cardinal; + +const + BT_IMAGEFILE = 0; + BT_BORDERFILL = 1; + BT_NONE = 2; + +type + IMAGELAYOUT = Cardinal; + +const + IL_VERTICAL = 0; + IL_HORIZONTAL = 1; + +type + BORDERTYPE = Cardinal; + +const + BT_RECT = 0; + BT_ROUNDRECT = 1; + BT_ELLIPSE = 2; + +type + FILLTYPE = Cardinal; + +const + FT_SOLID = 0; + FT_VERTGRADIENT = 1; + FT_HORZGRADIENT = 2; + FT_RADIALGRADIENT = 3; + FT_TILEIMAGE = 4; + +type + SIZINGTYPE = Cardinal; + +const + ST_TRUESIZE = 0; + ST_STRETCH = 1; + ST_TILE = 2; + +type + HALIGN = Cardinal; + +const + HA_LEFT = 0; + HA_CENTER = 1; + HA_RIGHT = 2; + +type + CONTENTALIGNMENT = Cardinal; + +const + CA_LEFT = 0; + CA_CENTER = 1; + CA_RIGHT = 2; + +type + VALIGN = Cardinal; + +const + VA_TOP = 0; + VA_CENTER = 1; + VA_BOTTOM = 2; + +type + OFFSETTYPE = Cardinal; + +const + OT_TOPLEFT = 0; + OT_TOPRIGHT = 1; + OT_TOPMIDDLE = 2; + OT_BOTTOMLEFT = 3; + OT_BOTTOMRIGHT = 4; + OT_BOTTOMMIDDLE = 5; + OT_MIDDLELEFT = 6; + OT_MIDDLERIGHT = 7; + OT_LEFTOFCAPTION = 8; + OT_RIGHTOFCAPTION = 9; + OT_LEFTOFLASTBUTTON = 10; + OT_RIGHTOFLASTBUTTON = 11; + OT_ABOVELASTBUTTON = 12; + OT_BELOWLASTBUTTON = 13; + +type + ICONEFFECT = Cardinal; + +const + ICE_NONE = 0; + ICE_GLOW = 1; + ICE_SHADOW = 2; + ICE_PULSE = 3; + ICE_ALPHA = 4; + +type + TEXTSHADOWTYPE = Cardinal; + +const + TST_NONE = 0; + TST_SINGLE = 1; + TST_CONTINUOUS = 2; + +type + GLYPHTYPE = Cardinal; + +const + GT_NONE = 0; + GT_IMAGEGLYPH = 1; + GT_FONTGLYPH = 2; + +type + IMAGESELECTTYPE = Cardinal; + +const + IST_NONE = 0; + IST_SIZE = 1; + IST_DPI = 2; + +type + TRUESIZESCALINGTYPE = Cardinal; + +const + TSST_NONE = 0; + TSST_SIZE = 1; + TSST_DPI = 2; + +type + GLYPHFONTSIZINGTYPE = Cardinal; + +const + GFST_NONE = 0; + GFST_SIZE = 1; + GFST_DPI = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// PROPERTIES - used by uxtheme rendering and controls +// +// these cannot be renumbered (part of uxtheme API) +//---------------------------------------------------------------------------------------------------------------------- + +const + + //---- primitive types ---- + + TMT_STRING = 201; + TMT_INT = 202; + TMT_BOOL = 203; + TMT_COLOR = 204; + TMT_MARGINS = 205; + TMT_FILENAME = 206; + TMT_SIZE = 207; + TMT_POSITION = 208; + TMT_RECT = 209; + TMT_FONT = 210; + TMT_INTLIST = 211; + + //---- special misc. properties ---- + + TMT_COLORSCHEMES = 401; + TMT_SIZES = 402; + TMT_CHARSET = 403; + + //---- [documentation] properties ---- + + TMT_DISPLAYNAME = 601; + TMT_TOOLTIP = 602; + TMT_COMPANY = 603; + TMT_AUTHOR = 604; + TMT_COPYRIGHT = 605; + TMT_URL = 606; + TMT_VERSION = 607; + TMT_DESCRIPTION = 608; + + {$ifndef BCB} + TMT_FIRST_RCSTRING_NAME = TMT_DISPLAYNAME; + TMT_LAST_RCSTRING_NAME = TMT_DESCRIPTION; + {$endif BCB} + + //---- theme metrics: fonts ---- + + TMT_CAPTIONFONT = 801; + TMT_SMALLCAPTIONFONT = 802; + TMT_MENUFONT = 803; + TMT_STATUSFONT = 804; + TMT_MSGBOXFONT = 805; + TMT_ICONTITLEFONT = 806; + + {$ifndef BCB} + TMT_FIRSTFONT = TMT_CAPTIONFONT; + TMT_LASTFONT = TMT_ICONTITLEFONT; + {$endif BCB} + + //---- theme metrics: bools ---- + + TMT_FLATMENUS = 1001; + + {$ifndef BCB} + TMT_FIRSTBOOL = TMT_FLATMENUS; + TMT_LASTBOOL = TMT_FLATMENUS; + {$endif BCB} + + //---- theme metrics: sizes ---- + + TMT_SIZINGBORDERWIDTH = 1201; + TMT_SCROLLBARWIDTH = 1202; + TMT_SCROLLBARHEIGHT = 1203; + TMT_CAPTIONBARWIDTH = 1204; + TMT_CAPTIONBARHEIGHT = 1205; + TMT_SMCAPTIONBARWIDTH = 1206; + TMT_SMCAPTIONBARHEIGHT = 1207; + TMT_MENUBARWIDTH = 1208; + TMT_MENUBARHEIGHT = 1209; + + {$ifndef BCB} + TMT_FIRSTSIZE = TMT_SIZINGBORDERWIDTH; + TMT_LASTSIZE = TMT_MENUBARHEIGHT; + {$endif BCB} + + //---- theme metrics: ints ---- + + TMT_MINCOLORDEPTH = 1301; + + {$ifndef BCB} + TMT_FIRSTINT = TMT_MINCOLORDEPTH; + TMT_LASTINT = TMT_MINCOLORDEPTH; + {$endif BCB} + + //---- theme metrics: strings ---- + + TMT_CSSNAME = 1401; + TMT_XMLNAME = 1402; + + {$ifndef BCB} + TMT_FIRSTSTRING = TMT_CSSNAME; + TMT_LASTSTRING = TMT_XMLNAME; + {$endif BCB} + + //---- theme metrics: colors ---- + + TMT_SCROLLBAR = 1601; + TMT_BACKGROUND = 1602; + TMT_ACTIVECAPTION = 1603; + TMT_INACTIVECAPTION = 1604; + TMT_MENU = 1605; + TMT_WINDOW = 1606; + TMT_WINDOWFRAME = 1607; + TMT_MENUTEXT = 1608; + TMT_WINDOWTEXT = 1609; + TMT_CAPTIONTEXT = 1610; + TMT_ACTIVEBORDER = 1611; + TMT_INACTIVEBORDER = 1612; + TMT_APPWORKSPACE = 1613; + TMT_HIGHLIGHT = 1614; + TMT_HIGHLIGHTTEXT = 1615; + TMT_BTNFACE = 1616; + TMT_BTNSHADOW = 1617; + TMT_GRAYTEXT = 1618; + TMT_BTNTEXT = 1619; + TMT_INACTIVECAPTIONTEXT = 1620; + TMT_BTNHIGHLIGHT = 1621; + TMT_DKSHADOW3D = 1622; + TMT_LIGHT3D = 1623; + TMT_INFOTEXT = 1624; + TMT_INFOBK = 1625; + TMT_BUTTONALTERNATEFACE = 1626; + TMT_HOTTRACKING = 1627; + TMT_GRADIENTACTIVECAPTION = 1628; + TMT_GRADIENTINACTIVECAPTION = 1629; + TMT_MENUHILIGHT = 1630; + TMT_MENUBAR = 1631; + + {$ifndef BCB} + TMT_FIRSTCOLOR = TMT_SCROLLBAR; + TMT_LASTCOLOR = TMT_MENUBAR; + {$endif BCB} + + //---- hue substitutions ---- + + TMT_FROMHUE1 = 1801; + TMT_FROMHUE2 = 1802; + TMT_FROMHUE3 = 1803; + TMT_FROMHUE4 = 1804; + TMT_FROMHUE5 = 1805; + TMT_TOHUE1 = 1806; + TMT_TOHUE2 = 1807; + TMT_TOHUE3 = 1808; + TMT_TOHUE4 = 1809; + TMT_TOHUE5 = 1810; + + //---- color substitutions ---- + + TMT_FROMCOLOR1 = 2001; + TMT_FROMCOLOR2 = 2002; + TMT_FROMCOLOR3 = 2003; + TMT_FROMCOLOR4 = 2004; + TMT_FROMCOLOR5 = 2005; + TMT_TOCOLOR1 = 2006; + TMT_TOCOLOR2 = 2007; + TMT_TOCOLOR3 = 2008; + TMT_TOCOLOR4 = 2009; + TMT_TOCOLOR5 = 2010; + + //---- rendering BOOL properties ---- + + TMT_TRANSPARENT = 2201; + TMT_AUTOSIZE = 2202; + TMT_BORDERONLY = 2203; + TMT_COMPOSITED = 2204; + TMT_BGFILL = 2205; + TMT_GLYPHTRANSPARENT = 2206; + TMT_GLYPHONLY = 2207; + TMT_ALWAYSSHOWSIZINGBAR = 2208; + TMT_MIRRORIMAGE = 2209; + TMT_UNIFORMSIZING = 2210; + TMT_INTEGRALSIZING = 2211; + TMT_SOURCEGROW = 2212; + TMT_SOURCESHRINK = 2213; + + //---- rendering INT properties ---- + + TMT_IMAGECOUNT = 2401; + TMT_ALPHALEVEL = 2402; + TMT_BORDERSIZE = 2403; + TMT_ROUNDCORNERWIDTH = 2404; + TMT_ROUNDCORNERHEIGHT = 2405; + TMT_GRADIENTRATIO1 = 2406; + TMT_GRADIENTRATIO2 = 2407; + TMT_GRADIENTRATIO3 = 2408; + TMT_GRADIENTRATIO4 = 2409; + TMT_GRADIENTRATIO5 = 2410; + TMT_PROGRESSCHUNKSIZE = 2411; + TMT_PROGRESSSPACESIZE = 2412; + TMT_SATURATION = 2413; + TMT_TEXTBORDERSIZE = 2414; + TMT_ALPHATHRESHOLD = 2415; + TMT_WIDTH = 2416; + TMT_HEIGHT = 2417; + TMT_GLYPHINDEX = 2418; + TMT_TRUESIZESTRETCHMARK = 2419; + TMT_MINDPI1 = 2420; + TMT_MINDPI2 = 2421; + TMT_MINDPI3 = 2422; + TMT_MINDPI4 = 2423; + TMT_MINDPI5 = 2424; + + //---- rendering FONT properties ---- + + TMT_GLYPHFONT = 2601; + + //---- rendering INTLIST properties ---- + // start with 2801 + // (from smallest to largest) + //---- rendering FILENAME properties ---- + + TMT_IMAGEFILE = 3001; + TMT_IMAGEFILE1 = 3002; + TMT_IMAGEFILE2 = 3003; + TMT_IMAGEFILE3 = 3004; + TMT_IMAGEFILE4 = 3005; + TMT_IMAGEFILE5 = 3006; + TMT_STOCKIMAGEFILE = 3007; + TMT_GLYPHIMAGEFILE = 3008; + + //---- rendering STRING properties ---- + + TMT_TEXT = 3201; + + //---- rendering POSITION (x and y values) properties ---- + + TMT_OFFSET = 3401; + TMT_TEXTSHADOWOFFSET = 3402; + TMT_MINSIZE = 3403; + TMT_MINSIZE1 = 3404; + TMT_MINSIZE2 = 3405; + TMT_MINSIZE3 = 3406; + TMT_MINSIZE4 = 3407; + TMT_MINSIZE5 = 3408; + TMT_NORMALSIZE = 3409; + + //---- rendering MARGIN properties ---- + + TMT_SIZINGMARGINS = 3601; + TMT_CONTENTMARGINS = 3602; + TMT_CAPTIONMARGINS = 3603; + + //---- rendering COLOR properties ---- + + TMT_BORDERCOLOR = 3801; + TMT_FILLCOLOR = 3802; + TMT_TEXTCOLOR = 3803; + TMT_EDGELIGHTCOLOR = 3804; + TMT_EDGEHIGHLIGHTCOLOR = 3805; + TMT_EDGESHADOWCOLOR = 3806; + TMT_EDGEDKSHADOWCOLOR = 3807; + TMT_EDGEFILLCOLOR = 3808; + TMT_TRANSPARENTCOLOR = 3809; + TMT_GRADIENTCOLOR1 = 3810; + TMT_GRADIENTCOLOR2 = 3811; + TMT_GRADIENTCOLOR3 = 3812; + TMT_GRADIENTCOLOR4 = 3813; + TMT_GRADIENTCOLOR5 = 3814; + TMT_SHADOWCOLOR = 3815; + TMT_GLOWCOLOR = 3816; + TMT_TEXTBORDERCOLOR = 3817; + TMT_TEXTSHADOWCOLOR = 3818; + TMT_GLYPHTEXTCOLOR = 3819; + TMT_GLYPHTRANSPARENTCOLOR = 3820; + TMT_FILLCOLORHINT = 3821; + TMT_BORDERCOLORHINT = 3822; + TMT_ACCENTCOLORHINT = 3823; + + //---- rendering enum properties (must be declared in TM_ENUM section above) ---- + + TMT_BGTYPE = 4001; + TMT_BORDERTYPE = 4002; + TMT_FILLTYPE = 4003; + TMT_SIZINGTYPE = 4004; + TMT_HALIGN = 4005; + TMT_CONTENTALIGNMENT = 4006; + TMT_VALIGN = 4007; + TMT_OFFSETTYPE = 4008; + TMT_ICONEFFECT = 4009; + TMT_TEXTSHADOWTYPE = 4010; + TMT_IMAGELAYOUT = 4011; + TMT_GLYPHTYPE = 4012; + TMT_IMAGESELECTTYPE = 4013; + TMT_GLYPHFONTSIZINGTYPE = 4014; + TMT_TRUESIZESCALINGTYPE = 4015; + + //---- custom properties (used only by controls/shell) ---- + + TMT_USERPICTURE = 5001; + TMT_DEFAULTPANESIZE = 5002; + TMT_BLENDCOLOR = 5003; + +//---------------------------------------------------------------------------------------------------------------------- +// "Window" (i.e., non-client) Parts & States +// +// these cannot be renumbered (part of uxtheme API) +//---------------------------------------------------------------------------------------------------------------------- + +type + WINDOWPARTS = Cardinal; + +const + WINDOWPartFiller0 = 0; + WP_CAPTION = 1; + WP_SMALLCAPTION = 2; + WP_MINCAPTION = 3; + WP_SMALLMINCAPTION = 4; + WP_MAXCAPTION = 5; + WP_SMALLMAXCAPTION = 6; + WP_FRAMELEFT = 7; + WP_FRAMERIGHT = 8; + WP_FRAMEBOTTOM = 9; + WP_SMALLFRAMELEFT = 10; + WP_SMALLFRAMERIGHT = 11; + WP_SMALLFRAMEBOTTOM = 12; + WP_SYSBUTTON = 13; + WP_MDISYSBUTTON = 14; + WP_MINBUTTON = 15; + WP_MDIMINBUTTON = 16; + WP_MAXBUTTON = 17; + WP_CLOSEBUTTON = 18; + WP_SMALLCLOSEBUTTON = 19; + WP_MDICLOSEBUTTON = 20; + WP_RESTOREBUTTON = 21; + WP_MDIRESTOREBUTTON = 22; + WP_HELPBUTTON = 23; + WP_MDIHELPBUTTON = 24; + WP_HORZSCROLL = 25; + WP_HORZTHUMB = 26; + WP_VERTSCROLL = 27; + WP_VERTTHUMB = 28; + WP_DIALOG = 29; + WP_CAPTIONSIZINGTEMPLATE = 30; + WP_SMALLCAPTIONSIZINGTEMPLATE = 31; + WP_FRAMELEFTSIZINGTEMPLATE = 32; + WP_SMALLFRAMELEFTSIZINGTEMPLATE = 33; + WP_FRAMERIGHTSIZINGTEMPLATE = 34; + WP_SMALLFRAMERIGHTSIZINGTEMPLATE = 35; + WP_FRAMEBOTTOMSIZINGTEMPLATE = 36; + WP_SMALLFRAMEBOTTOMSIZINGTEMPLATE = 37; + +type + FRAMESTATES = Cardinal; + +const + FRAMEStateFiller0 = 0; + FS_ACTIVE = 1; + FS_INACTIVE = 2; + +type + CAPTIONSTATES = Cardinal; + +const + CAPTIONStateFiller0 = 0; + CS_ACTIVE = 1; + CS_INACTIVE = 2; + CS_DISABLED = 3; + +type + MAXCAPTIONSTATES = Cardinal; + +const + MAXCAPTIONStateFiller0 = 0; + MXCS_ACTIVE = 1; + MXCS_INACTIVE = 2; + MXCS_DISABLED = 3; + +type + MINCAPTIONSTATES = Cardinal; + +const + MINCAPTIONStateFiller0 = 0; + MNCS_ACTIVE = 1; + MNCS_INACTIVE = 2; + MNCS_DISABLED = 3; + +type + HORZSCROLLSTATES = Cardinal; + +const + HORZSCROLLStateFiller0 = 0; + HSS_NORMAL = 1; + HSS_HOT = 2; + HSS_PUSHED = 3; + HSS_DISABLED = 4; + +type + HORZTHUMBSTATES = Cardinal; + +const + HORZTHUMBStateFiller0 = 0; + HTS_NORMAL = 1; + HTS_HOT = 2; + HTS_PUSHED = 3; + HTS_DISABLED = 4; + +type + VERTSCROLLSTATES = Cardinal; + +const + VERTSCROLLStateFiller0 = 0; + VSS_NORMAL = 1; + VSS_HOT = 2; + VSS_PUSHED = 3; + VSS_DISABLED = 4; + +type + VERTTHUMBSTATES = Cardinal; + +const + VERTTHUMBStateFiller0 = 0; + VTS_NORMAL = 1; + VTS_HOT = 2; + VTS_PUSHED = 3; + VTS_DISABLED = 4; + +type + SYSBUTTONSTATES = Cardinal; + +const + SYSBUTTONStateFiller0 = 0; + SBS_NORMAL = 1; + SBS_HOT = 2; + SBS_PUSHED = 3; + SBS_DISABLED = 4; + +type + MINBUTTONSTATES = Cardinal; + +const + MINBUTTONStateFiller0 = 0; + MINBS_NORMAL = 1; + MINBS_HOT = 2; + MINBS_PUSHED = 3; + MINBS_DISABLED = 4; + +type + MAXBUTTONSTATES = Cardinal; + +const + MAXBUTTONStateFiller0 = 0; + MAXBS_NORMAL = 1; + MAXBS_HOT = 2; + MAXBS_PUSHED = 3; + MAXBS_DISABLED = 4; + +type + RESTOREBUTTONSTATES = Cardinal; + +const + RESTOREBUTTONStateFiller0 = 0; + RBS_NORMAL = 1; + RBS_HOT = 2; + RBS_PUSHED = 3; + RBS_DISABLED = 4; + +type + HELPBUTTONSTATES = Cardinal; + +const + HELPBUTTONStateFiller0 = 0; + HBS_NORMAL = 1; + HBS_HOT = 2; + HBS_PUSHED = 3; + HBS_DISABLED = 4; + +type + CLOSEBUTTONSTATES = Cardinal; + +const + CLOSEBUTTONStateFiller0 = 0; + CBS_NORMAL = 1; + CBS_HOT = 2; + CBS_PUSHED = 3; + CBS_DISABLED = 4; + +//---------------------------------------------------------------------------------------------------------------------- +// "Button" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + BUTTONPARTS = Cardinal; + +const + BUTTONPartFiller0 = 0; + BP_PUSHBUTTON = 1; + BP_RADIOBUTTON = 2; + BP_CHECKBOX = 3; + BP_GROUPBOX = 4; + BP_USERBUTTON = 5; + +type + PUSHBUTTONSTATES = Cardinal; + +const + PUSHBUTTONStateFiller0 = 0; + PBS_NORMAL = 1; + PBS_HOT = 2; + PBS_PRESSED = 3; + PBS_DISABLED = 4; + PBS_DEFAULTED = 5; + +type + RADIOBUTTONSTATES = Cardinal; + +const + RADIOBUTTONStateFiller0 = 0; + RBS_UNCHECKEDNORMAL = 1; + RBS_UNCHECKEDHOT = 2; + RBS_UNCHECKEDPRESSED = 3; + RBS_UNCHECKEDDISABLED = 4; + RBS_CHECKEDNORMAL = 5; + RBS_CHECKEDHOT = 6; + RBS_CHECKEDPRESSED = 7; + RBS_CHECKEDDISABLED = 8; + +type + CHECKBOXSTATES = Cardinal; + +const + CHECKBOXStateFiller0 = 0; + CBS_UNCHECKEDNORMAL = 1; + CBS_UNCHECKEDHOT = 2; + CBS_UNCHECKEDPRESSED = 3; + CBS_UNCHECKEDDISABLED = 4; + CBS_CHECKEDNORMAL = 5; + CBS_CHECKEDHOT = 6; + CBS_CHECKEDPRESSED = 7; + CBS_CHECKEDDISABLED = 8; + CBS_MIXEDNORMAL = 9; + CBS_MIXEDHOT = 10; + CBS_MIXEDPRESSED = 11; + CBS_MIXEDDISABLED = 12; + +type + GROUPBOXSTATES = Cardinal; + +const + GROUPBOXStateFiller0 = 0; + GBS_NORMAL = 1; + GBS_DISABLED = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// "Rebar" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + REBARPARTS = Cardinal; + +const + REBARPartFiller0 = 0; + RP_GRIPPER = 1; + RP_GRIPPERVERT = 2; + RP_BAND = 3; + RP_CHEVRON = 4; + RP_CHEVRONVERT = 5; + +type + CHEVRONSTATES = Cardinal; + +const + CHEVRONStateFiller0 = 0; + CHEVS_NORMAL = 1; + CHEVS_HOT = 2; + CHEVS_PRESSED = 3; + +//---------------------------------------------------------------------------------------------------------------------- +// "Toolbar" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TOOLBARPARTS = Cardinal; + +const + TOOLBARPartFiller0 = 0; + TP_BUTTON = 1; + TP_DROPDOWNBUTTON = 2; + TP_SPLITBUTTON = 3; + TP_SPLITBUTTONDROPDOWN = 4; + TP_SEPARATOR = 5; + TP_SEPARATORVERT = 6; + +type + TOOLBARSTATES = Cardinal; + +const + TOOLBARStateFiller0 = 0; + TS_NORMAL = 1; + TS_HOT = 2; + TS_PRESSED = 3; + TS_DISABLED = 4; + TS_CHECKED = 5; + TS_HOTCHECKED = 6; + +//---------------------------------------------------------------------------------------------------------------------- +// "Status" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + STATUSPARTS = Cardinal; + +const + STATUSPartFiller0 = 0; + SP_PANE = 1; + SP_GRIPPERPANE = 2; + SP_GRIPPER = 3; + +//---------------------------------------------------------------------------------------------------------------------- +// "Menu" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + MENUPARTS = Cardinal; + +const + MENUPartFiller0 = 0; + MP_MENUITEM = 1; + MP_MENUDROPDOWN = 2; + MP_MENUBARITEM = 3; + MP_MENUBARDROPDOWN = 4; + MP_CHEVRON = 5; + MP_SEPARATOR = 6; + +type + MENUSTATES = Cardinal; + +const + MENUStateFiller0 = 0; + MS_NORMAL = 1; + MS_SELECTED = 2; + MS_DEMOTED = 3; + +//---------------------------------------------------------------------------------------------------------------------- +// "ListView" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + LISTVIEWPARTS = Cardinal; + +const + LISTVIEWPartFiller0 = 0; + LVP_LISTITEM = 1; + LVP_LISTGROUP = 2; + LVP_LISTDETAIL = 3; + LVP_LISTSORTEDDETAIL = 4; + LVP_EMPTYTEXT = 5; + +type + LISTITEMSTATES = Cardinal; + +const + LISTITEMStateFiller0 = 0; + LIS_NORMAL = 1; + LIS_HOT = 2; + LIS_SELECTED = 3; + LIS_DISABLED = 4; + LIS_SELECTEDNOTFOCUS = 5; + +//---------------------------------------------------------------------------------------------------------------------- +// "Header" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + HEADERPARTS = Cardinal; + +const + HEADERPartFiller0 = 0; + HP_HEADERITEM = 1; + HP_HEADERITEMLEFT = 2; + HP_HEADERITEMRIGHT = 3; + HP_HEADERSORTARROW = 4; + +type + HEADERITEMSTATES = Cardinal; + +const + HEADERITEMStateFiller0 = 0; + HIS_NORMAL = 1; + HIS_HOT = 2; + HIS_PRESSED = 3; + +type + HEADERITEMLEFTSTATES = Cardinal; + +const + HEADERITEMLEFTStateFiller0 = 0; + HILS_NORMAL = 1; + HILS_HOT = 2; + HILS_PRESSED = 3; + +type + HEADERITEMRIGHTSTATES = Cardinal; + +const + HEADERITEMRIGHTStateFiller0 = 0; + HIRS_NORMAL = 1; + HIRS_HOT = 2; + HIRS_PRESSED = 3; + +type + HEADERSORTARROWSTATES = Cardinal; + +const + HEADERSORTARROWStateFiller0 = 0; + HSAS_SORTEDUP = 1; + HSAS_SORTEDDOWN = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// "Progress" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + PROGRESSPARTS = Cardinal; + +const + PROGRESSPartFiller0 = 0; + PP_BAR = 1; + PP_BARVERT = 2; + PP_CHUNK = 3; + PP_CHUNKVERT = 4; + +//---------------------------------------------------------------------------------------------------------------------- +// "Tab" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TABPARTS = Cardinal; + +const + TABPartFiller0 = 0; + TABP_TABITEM = 1; + TABP_TABITEMLEFTEDGE = 2; + TABP_TABITEMRIGHTEDGE = 3; + TABP_TABITEMBOTHEDGE = 4; + TABP_TOPTABITEM = 5; + TABP_TOPTABITEMLEFTEDGE = 6; + TABP_TOPTABITEMRIGHTEDGE = 7; + TABP_TOPTABITEMBOTHEDGE = 8; + TABP_PANE = 9; + TABP_BODY = 10; + +type + TABITEMSTATES = Cardinal; + +const + TABITEMStateFiller0 = 0; + TIS_NORMAL = 1; + TIS_HOT = 2; + TIS_SELECTED = 3; + TIS_DISABLED = 4; + TIS_FOCUSED = 5; + +type + TABITEMLEFTEDGESTATES = Cardinal; + +const + TABITEMLEFTEDGEStateFiller0 = 0; + TILES_NORMAL = 1; + TILES_HOT = 2; + TILES_SELECTED = 3; + TILES_DISABLED = 4; + TILES_FOCUSED = 5; + +type + TABITEMRIGHTEDGESTATES = Cardinal; + +const + TABITEMRIGHTEDGEStateFiller0 = 0; + TIRES_NORMAL = 1; + TIRES_HOT = 2; + TIRES_SELECTED = 3; + TIRES_DISABLED = 4; + TIRES_FOCUSED = 5; + +type + TABITEMBOTHEDGESSTATES = Cardinal; + +const + TABITEMBOTHEDGESStateFiller0 = 0; + TIBES_NORMAL = 1; + TIBES_HOT = 2; + TIBES_SELECTED = 3; + TIBES_DISABLED = 4; + TIBES_FOCUSED = 5; + +type + TOPTABITEMSTATES = Cardinal; + +const + TOPTABITEMStateFiller0 = 0; + TTIS_NORMAL = 1; + TTIS_HOT = 2; + TTIS_SELECTED = 3; + TTIS_DISABLED = 4; + TTIS_FOCUSED = 5; + +type + TOPTABITEMLEFTEDGESTATES = Cardinal; + +const + TOPTABITEMLEFTEDGEStateFiller0 = 0; + TTILES_NORMAL = 1; + TTILES_HOT = 2; + TTILES_SELECTED = 3; + TTILES_DISABLED = 4; + TTILES_FOCUSED = 5; + +type + TOPTABITEMRIGHTEDGESTATES = Cardinal; + +const + TOPTABITEMRIGHTEDGEStateFiller0 = 0; + TTIRES_NORMAL = 1; + TTIRES_HOT = 2; + TTIRES_SELECTED = 3; + TTIRES_DISABLED = 4; + TTIRES_FOCUSED = 5; + +type + TOPTABITEMBOTHEDGESSTATES = Cardinal; + +const + TOPTABITEMBOTHEDGESStateFiller0 = 0; + TTIBES_NORMAL = 1; + TTIBES_HOT = 2; + TTIBES_SELECTED = 3; + TTIBES_DISABLED = 4; + TTIBES_FOCUSED = 5; + +//---------------------------------------------------------------------------------------------------------------------- +// "Trackbar" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TRACKBARPARTS = Cardinal; + +const + TRACKBARPartFiller0 = 0; + TKP_TRACK = 1; + TKP_TRACKVERT = 2; + TKP_THUMB = 3; + TKP_THUMBBOTTOM = 4; + TKP_THUMBTOP = 5; + TKP_THUMBVERT = 6; + TKP_THUMBLEFT = 7; + TKP_THUMBRIGHT = 8; + TKP_TICS = 9; + TKP_TICSVERT = 10; + +type + TRACKBARSTATES = Cardinal; + +const + TRACKBARStateFiller0 = 0; + TKS_NORMAL = 1; + +type + TRACKSTATES = Cardinal; + +const + TRACKStateFiller0 = 0; + TRS_NORMAL = 1; + +type + TRACKVERTSTATES = Cardinal; + +const + TRACKVERTStateFiller0 = 0; + TRVS_NORMAL = 1; + +type + THUMBSTATES = Cardinal; + +const + THUMBStateFiller0 = 0; + TUS_NORMAL = 1; + TUS_HOT = 2; + TUS_PRESSED = 3; + TUS_FOCUSED = 4; + TUS_DISABLED = 5; + +type + THUMBBOTTOMSTATES = Cardinal; + +const + THUMBBOTTOMStateFiller0 = 0; + TUBS_NORMAL = 1; + TUBS_HOT = 2; + TUBS_PRESSED = 3; + TUBS_FOCUSED = 4; + TUBS_DISABLED = 5; + +type + THUMBTOPSTATES = Cardinal; + +const + THUMBTOPStateFiller0 = 0; + TUTS_NORMAL = 1; + TUTS_HOT = 2; + TUTS_PRESSED = 3; + TUTS_FOCUSED = 4; + TUTS_DISABLED = 5; + +type + THUMBVERTSTATES = Cardinal; + +const + THUMBVERTStateFiller0 = 0; + TUVS_NORMAL = 1; + TUVS_HOT = 2; + TUVS_PRESSED = 3; + TUVS_FOCUSED = 4; + TUVS_DISABLED = 5; + +type + THUMBLEFTSTATES = Cardinal; + +const + THUMBLEFTStateFiller0 = 0; + TUVLS_NORMAL = 1; + TUVLS_HOT = 2; + TUVLS_PRESSED = 3; + TUVLS_FOCUSED = 4; + TUVLS_DISABLED = 5; + +type + THUMBRIGHTSTATES = Cardinal; + +const + THUMBRIGHTStateFiller0 = 0; + TUVRS_NORMAL = 1; + TUVRS_HOT = 2; + TUVRS_PRESSED = 3; + TUVRS_FOCUSED = 4; + TUVRS_DISABLED = 5; + +type + TICSSTATES = Cardinal; + +const + TICSStateFiller0 = 0; + TSS_NORMAL = 1; + +type + TICSVERTSTATES = Cardinal; + +const + TICSVERTStateFiller0 = 0; + TSVS_NORMAL = 1; + +//---------------------------------------------------------------------------------------------------------------------- +// "Tooltips" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TOOLTIPPARTS = Cardinal; + +const + TOOLTIPPartFiller0 = 0; + TTP_STANDARD = 1; + TTP_STANDARDTITLE = 2; + TTP_BALLOON = 3; + TTP_BALLOONTITLE = 4; + TTP_CLOSE = 5; + +type + CLOSESTATES = Cardinal; + +const + CLOSEStateFiller0 = 0; + TTCS_NORMAL = 1; + TTCS_HOT = 2; + TTCS_PRESSED = 3; + +type + STANDARDSTATES = Cardinal; + +const + STANDARDStateFiller0 = 0; + TTSS_NORMAL = 1; + TTSS_LINK = 2; + +type + BALLOONSTATES = Cardinal; + +const + BALLOONStateFiller0 = 0; + TTBS_NORMAL = 1; + TTBS_LINK = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// "TreeView" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TREEVIEWPARTS = Cardinal; + +const + TREEVIEWPartFiller0 = 0; + TVP_TREEITEM = 1; + TVP_GLYPH = 2; + TVP_BRANCH = 3; + +type + TREEITEMSTATES = Cardinal; + +const + TREEITEMStateFiller0 = 0; + TREIS_NORMAL = 1; + TREIS_HOT = 2; + TREIS_SELECTED = 3; + TREIS_DISABLED = 4; + TREIS_SELECTEDNOTFOCUS = 5; + +type + GLYPHSTATES = Cardinal; + +const + GLYPHStateFiller0 = 0; + GLPS_CLOSED = 1; + GLPS_OPENED = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// "Spin" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + SPINPARTS = Cardinal; + +const + SPINPartFiller0 = 0; + SPNP_UP = 1; + SPNP_DOWN = 2; + SPNP_UPHORZ = 3; + SPNP_DOWNHORZ = 4; + +type + UPSTATES = Cardinal; + +const + UPStateFiller0 = 0; + UPS_NORMAL = 1; + UPS_HOT = 2; + UPS_PRESSED = 3; + UPS_DISABLED = 4; + +type + DOWNSTATES = Cardinal; + +const + DOWNStateFiller0 = 0; + DNS_NORMAL = 1; + DNS_HOT = 2; + DNS_PRESSED = 3; + DNS_DISABLED = 4; + +type + UPHORZSTATES = Cardinal; + +const + UPHORZStateFiller0 = 0; + UPHZS_NORMAL = 1; + UPHZS_HOT = 2; + UPHZS_PRESSED = 3; + UPHZS_DISABLED = 4; + +type + DOWNHORZSTATES = Cardinal; + +const + DOWNHORZStateFiller0 = 0; + DNHZS_NORMAL = 1; + DNHZS_HOT = 2; + DNHZS_PRESSED = 3; + DNHZS_DISABLED = 4; + +//---------------------------------------------------------------------------------------------------------------------- +// "Page" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + PAGEPARTS = Cardinal; + +const + PAGEPartFiller0 = 0; + PGRP_UP = 1; + PGRP_DOWN = 2; + PGRP_UPHORZ = 3; + PGRP_DOWNHORZ = 4; + +//--- Pager uses same states as Spin --- + +//---------------------------------------------------------------------------------------------------------------------- +// "Scrollbar" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + SCROLLBARPARTS = Cardinal; + +const + SCROLLBARPartFiller0 = 0; + SBP_ARROWBTN = 1; + SBP_THUMBBTNHORZ = 2; + SBP_THUMBBTNVERT = 3; + SBP_LOWERTRACKHORZ = 4; + SBP_UPPERTRACKHORZ = 5; + SBP_LOWERTRACKVERT = 6; + SBP_UPPERTRACKVERT = 7; + SBP_GRIPPERHORZ = 8; + SBP_GRIPPERVERT = 9; + SBP_SIZEBOX = 10; + +type + ARROWBTNSTATES = Cardinal; + +const + ARROWBTNStateFiller0 = 0; + ABS_UPNORMAL = 1; + ABS_UPHOT = 2; + ABS_UPPRESSED = 3; + ABS_UPDISABLED = 4; + ABS_DOWNNORMAL = 5; + ABS_DOWNHOT = 6; + ABS_DOWNPRESSED = 7; + ABS_DOWNDISABLED = 8; + ABS_LEFTNORMAL = 9; + ABS_LEFTHOT = 10; + ABS_LEFTPRESSED = 11; + ABS_LEFTDISABLED = 12; + ABS_RIGHTNORMAL = 13; + ABS_RIGHTHOT = 14; + ABS_RIGHTPRESSED = 15; + ABS_RIGHTDISABLED = 16; + +type + SCROLLBARSTATES = Cardinal; + +const + SCROLLBARStateFiller0 = 0; + SCRBS_NORMAL = 1; + SCRBS_HOT = 2; + SCRBS_PRESSED = 3; + SCRBS_DISABLED = 4; + +type + SIZEBOXSTATES = Cardinal; + +const + SIZEBOXStateFiller0 = 0; + SZB_RIGHTALIGN = 1; + SZB_LEFTALIGN = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// "Edit" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + EDITPARTS = Cardinal; + +const + EDITPartFiller0 = 0; + EP_EDITTEXT = 1; + EP_CARET = 2; + +type + EDITTEXTSTATES = Cardinal; + +const + EDITTEXTStateFiller0 = 0; + ETS_NORMAL = 1; + ETS_HOT = 2; + ETS_SELECTED = 3; + ETS_DISABLED = 4; + ETS_FOCUSED = 5; + ETS_READONLY = 6; + ETS_ASSIST = 7; + +//---------------------------------------------------------------------------------------------------------------------- +// "ComboBox" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + COMBOBOXPARTS = Cardinal; + +const + COMBOBOXPartFiller0 = 0; + CP_DROPDOWNBUTTON = 1; + +type + COMBOBOXSTATES = Cardinal; + +const + COMBOBOXStateFiller0 = 0; + CBXS_NORMAL = 1; + CBXS_HOT = 2; + CBXS_PRESSED = 3; + CBXS_DISABLED = 4; + +//---------------------------------------------------------------------------------------------------------------------- +// "Taskbar Clock" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + CLOCKPARTS = Cardinal; + +const + CLOCKPartFiller0 = 0; + CLP_TIME = 1; + +type + CLOCKSTATES = Cardinal; + +const + CLOCKStateFiller0 = 0; + CLS_NORMAL = 1; + +//---------------------------------------------------------------------------------------------------------------------- +// "Tray Notify" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TRAYNOTIFYPARTS = Cardinal; + +const + TRAYNOTIFYPartFiller0 = 0; + TNP_BACKGROUND = 1; + TNP_ANIMBACKGROUND = 2; + +//---------------------------------------------------------------------------------------------------------------------- +// "TaskBar" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TASKBARPARTS = Cardinal; + +const + TASKBARPartFiller0 = 0; + TBP_BACKGROUNDBOTTOM = 1; + TBP_BACKGROUNDRIGHT = 2; + TBP_BACKGROUNDTOP = 3; + TBP_BACKGROUNDLEFT = 4; + TBP_SIZINGBARBOTTOM = 5; + TBP_SIZINGBARRIGHT = 6; + TBP_SIZINGBARTOP = 7; + TBP_SIZINGBARLEFT = 8; + +//---------------------------------------------------------------------------------------------------------------------- +// "TaskBand" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + TASKBANDPARTS = Cardinal; + +const + TASKBANDPartFiller0 = 0; + TDP_GROUPCOUNT = 1; + TDP_FLASHBUTTON = 2; + TDP_FLASHBUTTONGROUPMENU = 3; + +//---------------------------------------------------------------------------------------------------------------------- +// "StartPanel" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + STARTPANELPARTS = Cardinal; + +const + STARTPANELPartFiller0 = 0; + SPP_USERPANE = 1; + SPP_MOREPROGRAMS = 2; + SPP_MOREPROGRAMSARROW = 3; + SPP_PROGLIST = 4; + SPP_PROGLISTSEPARATOR = 5; + SPP_PLACESLIST = 6; + SPP_PLACESLISTSEPARATOR = 7; + SPP_LOGOFF = 8; + SPP_LOGOFFBUTTONS = 9; + SPP_USERPICTURE = 10; + SPP_PREVIEW = 11; + +type + MOREPROGRAMSARROWSTATES = Cardinal; + +const + MOREPROGRAMSARROWStateFiller0 = 0; + SPS_NORMAL = 1; + SPS_HOT = 2; + SPS_PRESSED = 3; + +type + LOGOFFBUTTONSSTATES = Cardinal; + +const + LOGOFFBUTTONSStateFiller0 = 0; + SPLS_NORMAL = 1; + SPLS_HOT = 2; + SPLS_PRESSED = 3; + +//---------------------------------------------------------------------------------------------------------------------- +// "ExplorerBar" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + EXPLORERBARPARTS = Cardinal; + +const + EXPLORERBARPartFiller0 = 0; + EBP_HEADERBACKGROUND = 1; + EBP_HEADERCLOSE = 2; + EBP_HEADERPIN = 3; + EBP_IEBARMENU = 4; + EBP_NORMALGROUPBACKGROUND = 5; + EBP_NORMALGROUPCOLLAPSE = 6; + EBP_NORMALGROUPEXPAND = 7; + EBP_NORMALGROUPHEAD = 8; + EBP_SPECIALGROUPBACKGROUND = 9; + EBP_SPECIALGROUPCOLLAPSE = 10; + EBP_SPECIALGROUPEXPAND = 11; + EBP_SPECIALGROUPHEAD = 12; + +type + HEADERCLOSESTATES = Cardinal; + +const + HEADERCLOSEStateFiller0 = 0; + EBHC_NORMAL = 1; + EBHC_HOT = 2; + EBHC_PRESSED = 3; + +type + HEADERPINSTATES = Cardinal; + +const + HEADERPINStateFiller0 = 0; + EBHP_NORMAL = 1; + EBHP_HOT = 2; + EBHP_PRESSED = 3; + EBHP_SELECTEDNORMAL = 4; + EBHP_SELECTEDHOT = 5; + EBHP_SELECTEDPRESSED = 6; + +type + IEBARMENUSTATES = Cardinal; + +const + IEBARMENUStateFiller0 = 0; + EBM_NORMAL = 1; + EBM_HOT = 2; + EBM_PRESSED = 3; + +type + NORMALGROUPCOLLAPSESTATES = Cardinal; + +const + NORMALGROUPCOLLAPSEStateFiller0 = 0; + EBNGC_NORMAL = 1; + EBNGC_HOT = 2; + EBNGC_PRESSED = 3; + +type + NORMALGROUPEXPANDSTATES = Cardinal; + +const + NORMALGROUPEXPANDStateFiller0 = 0; + EBNGE_NORMAL = 1; + EBNGE_HOT = 2; + EBNGE_PRESSED = 3; + +type + SPECIALGROUPCOLLAPSESTATES = Cardinal; + +const + SPECIALGROUPCOLLAPSEStateFiller0 = 0; + EBSGC_NORMAL = 1; + EBSGC_HOT = 2; + EBSGC_PRESSED = 3; + +type + SPECIALGROUPEXPANDSTATES = Cardinal; + +const + SPECIALGROUPEXPANDStateFiller0 = 0; + EBSGE_NORMAL = 1; + EBSGE_HOT = 2; + EBSGE_PRESSED = 3; + +//---------------------------------------------------------------------------------------------------------------------- +// "TaskBand" Parts & States +//---------------------------------------------------------------------------------------------------------------------- + +type + MENUBANDPARTS = Cardinal; + +const + MENUBANDPartFiller0 = 0; + MDP_NEWAPPBUTTON = 1; + MDP_SEPERATOR = 2; + +type + MENUBANDSTATES = Cardinal; + +const + MENUBANDStateFiller0 = 0; + MDS_NORMAL = 1; + MDS_HOT = 2; + MDS_PRESSED = 3; + MDS_DISABLED = 4; + MDS_CHECKED = 5; + MDS_HOTCHECKED = 6; + +//---------------------------------------------------------------------------------------------------------------------- + +implementation + +//---------------------------------------------------------------------------------------------------------------------- + +end. diff --git a/Components/UxThemeISX.pas b/Components/UxThemeISX.pas new file mode 100644 index 000000000..2c7bf96d3 --- /dev/null +++ b/Components/UxThemeISX.pas @@ -0,0 +1,1193 @@ +{******************************************************************************} +{ } +{ Visual Styles (Themes) API interface Unit for Object Pascal } +{ } +{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft } +{ Corporation. All Rights Reserved. } +{ } +{ The original file is: uxtheme.h, released June 2001. The original Pascal } +{ code is: UxTheme.pas, released July 2001. The initial developer of the } +{ Pascal code is Marcel van Brakel (brakelm@chello.nl). } +{ } +{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001 } +{ Marcel van Brakel. All Rights Reserved. } +{ } +{ Portions created by Mike Lischke are Copyright (C) 1999-2002 } +{ Mike Lischke. All Rights Reserved. } +{ } +{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) } +{ } +{ You may retrieve the latest version of this file at the Project JEDI home } +{ page, located at http://delphi-jedi.org or my personal homepage located at } +{ http://members.chello.nl/m.vanbrakel2 } +{ } +{ The contents of this file are used with permission, subject to the Mozilla } +{ Public License Version 1.1 (the "License"); you may not use this file except } +{ in compliance with the License. You may obtain a copy of the License at } +{ http://www.mozilla.org/MPL/MPL-1.1.html } +{ } +{ Software distributed under the License is distributed on an "AS IS" basis, } +{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for } +{ the specific language governing rights and limitations under the License. } +{ } +{ Alternatively, the contents of this file may be used under the terms of the } +{ GNU Lesser General Public License (the "LGPL License"), in which case the } +{ provisions of the LGPL License are applicable instead of those above. } +{ If you wish to allow use of your version of this file only under the terms } +{ of the LGPL License and not to allow others to use your version of this file } +{ under the MPL, indicate your decision by deleting the provisions above and } +{ replace them with the notice and other provisions required by the LGPL } +{ License. If you do not delete the provisions above, a recipient may use } +{ your version of this file under either the MPL or the LGPL License. } +{ } +{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html } +{ } +{******************************************************************************} + +{ Simplified by Martijn Laan for My Inno Setup Extensions and Delphi 2 + See http://isx.wintax.nl/ for more information +} + +unit UxThemeISX; + +interface + +uses + Windows; + +procedure FreeThemeLibrary; +function InitThemeLibrary: Boolean; +function UseThemes: Boolean; + +const + WM_THEMECHANGED = $031A; + +type + HIMAGELIST = THANDLE; // TODO TEMPORARY + HTHEME = THANDLE; // handle to a section of theme data for class + +//---------------------------------------------------------------------------------------------------------------------- +// NOTE: PartId's and StateId's used in the theme API are defined in the +// hdr file using the TM_PART and TM_STATE macros. For +// example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON". +//---------------------------------------------------------------------------------------------------------------------- +// OpenThemeData() - Open the theme data for the specified HWND and +// semi-colon separated list of class names. +// +// OpenThemeData() will try each class name, one at +// a time, and use the first matching theme info +// found. If a match is found, a theme handle +// to the data is returned. If no match is found, +// a "NULL" handle is returned. +// +// When the window is destroyed or a WM_THEMECHANGED +// msg is received, "CloseThemeData()" should be +// called to close the theme handle. +// +// hwnd - window handle of the control/window to be themed +// +// pszClassList - class name (or list of names) to match to theme data +// section. if the list contains more than one name, +// the names are tested one at a time for a match. +// If a match is found, OpenThemeData() returns a +// theme handle associated with the matching class. +// This param is a list (instead of just a single +// class name) to provide the class an opportunity +// to get the "best" match between the class and +// the current theme. For example, a button might +// pass L"OkButton, Button" if its ID=ID_OK. If +// the current theme has an entry for OkButton, +// that will be used. Otherwise, we fall back on +// the normal Button entry. +//---------------------------------------------------------------------------------------------------------------------- + +var + OpenThemeData: function(hwnd: HWND; pszClassList: LPCWSTR): HTHEME; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// CloseTHemeData() - closes the theme data handle. This should be done +// when the window being themed is destroyed or +// whenever a WM_THEMECHANGED msg is received +// (followed by an attempt to create a new Theme data +// handle). +// +// hTheme - open theme data handle (returned from prior call +// to OpenThemeData() API). +//---------------------------------------------------------------------------------------------------------------------- + +var + CloseThemeData: function(hTheme: HTHEME): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// functions for basic drawing support +//---------------------------------------------------------------------------------------------------------------------- +// The following methods are the theme-aware drawing services. +// Controls/Windows are defined in drawable "parts" by their author: a +// parent part and 0 or more child parts. Each of the parts can be +// described in "states" (ex: disabled, hot, pressed). +//---------------------------------------------------------------------------------------------------------------------- +// For the list of all themed classes and the definition of all +// parts and states, see the file "tmschmea.h". +//---------------------------------------------------------------------------------------------------------------------- +// Each of the below methods takes a "iPartId" param to specify the +// part and a "iStateId" to specify the state of the part. +// "iStateId=0" refers to the root part. "iPartId" = "0" refers to +// the root class. +//---------------------------------------------------------------------------------------------------------------------- +// Note: draw operations are always scaled to fit (and not to exceed) +// the specified "Rect". +//---------------------------------------------------------------------------------------------------------------------- + +//---------------------------------------------------------------------------------------------------------------------- +// DrawThemeBackground() +// - draws the theme-specified border and fill for +// the "iPartId" and "iStateId". This could be +// based on a bitmap file, a border and fill, or +// other image description. +// +// hTheme - theme data handle +// hdc - HDC to draw into +// iPartId - part number to draw +// iStateId - state number (of the part) to draw +// pRect - defines the size/location of the part +// pClipRect - optional clipping rect (don't draw outside it) +//---------------------------------------------------------------------------------------------------------------------- + +var + DrawThemeBackground: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; const pRect: TRect; + pClipRect: PRECT): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +//----- DrawThemeText() flags ---- + +const + DTT_GRAYED = $1; // draw a grayed-out string + +//---------------------------------------------------------------------------------------------------------------------- +// DrawThemeText() - draws the text using the theme-specified +// color and font for the "iPartId" and +// "iStateId". +// +// hTheme - theme data handle +// hdc - HDC to draw into +// iPartId - part number to draw +// iStateId - state number (of the part) to draw +// pszText - actual text to draw +// dwCharCount - number of chars to draw (-1 for all) +// dwTextFlags - same as DrawText() "uFormat" param +// dwTextFlags2 - additional drawing options +// pRect - defines the size/location of the part +//---------------------------------------------------------------------------------------------------------------------- + +var + DrawThemeText: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; pszText: LPCWSTR; iCharCount: Integer; + dwTextFlags, dwTextFlags2: DWORD; const pRect: TRect): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeBackgroundContentRect() +// - gets the size of the content for the theme-defined +// background. This is usually the area inside +// the borders or Margins. +// +// hTheme - theme data handle +// hdc - (optional) device content to be used for drawing +// iPartId - part number to draw +// iStateId - state number (of the part) to draw +// pBoundingRect - the outer RECT of the part being drawn +// pContentRect - RECT to receive the content area +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeBackgroundContentRect: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; + const pBoundingRect: TRect; pContentRect: PRECT): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeBackgroundExtent() - calculates the size/location of the theme- +// specified background based on the +// "pContentRect". +// +// hTheme - theme data handle +// hdc - (optional) device content to be used for drawing +// iPartId - part number to draw +// iStateId - state number (of the part) to draw +// pContentRect - RECT that defines the content area +// pBoundingRect - RECT to receive the overall size/location of part +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeBackgroundExtent: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; const pContentRect: TRect; + var pExtentRect: TRect): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- + +type + THEMESIZE = ( + TS_MIN, // minimum size + TS_TRUE, // size without stretching + TS_DRAW // size that theme mgr will use to draw part + ); + TThemeSize = THEMESIZE; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemePartSize() - returns the specified size of the theme part +// +// hTheme - theme data handle +// hdc - HDC to select font into & measure against +// iPartId - part number to retrieve size for +// iStateId - state number (of the part) +// prc - (optional) rect for part drawing destination +// eSize - the type of size to be retreived +// psz - receives the specified size of the part +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemePartSize: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; prc: PRECT; eSize: THEMESIZE; + var psz: TSize): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeTextExtent() - calculates the size/location of the specified +// text when rendered in the Theme Font. +// +// hTheme - theme data handle +// hdc - HDC to select font & measure into +// iPartId - part number to draw +// iStateId - state number (of the part) +// pszText - the text to be measured +// dwCharCount - number of chars to draw (-1 for all) +// dwTextFlags - same as DrawText() "uFormat" param +// pszBoundingRect - optional: to control layout of text +// pszExtentRect - receives the RECT for text size/location +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeTextExtent: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; pszText: LPCWSTR; + iCharCount: Integer; dwTextFlags: DWORD; pBoundingRect: PRECT; var pExtentRect: TRect): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeTextMetrics() +// - returns info about the theme-specified font +// for the part/state passed in. +// +// hTheme - theme data handle +// hdc - optional: HDC for screen context +// iPartId - part number to draw +// iStateId - state number (of the part) +// ptm - receives the font info +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeTextMetrics: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; + var ptm: TTEXTMETRIC): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeBackgroundRegion() +// - computes the region for a regular or partially +// transparent theme-specified background that is +// bound by the specified "pRect". +// If the rectangle is empty, sets the HRGN to NULL +// and return S_FALSE. +// +// hTheme - theme data handle +// hdc - optional HDC to draw into (DPI scaling) +// iPartId - part number to draw +// iStateId - state number (of the part) +// pRect - the RECT used to draw the part +// pRegion - receives handle to calculated region +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeBackgroundRegion: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; const pRect: TRect; + var pRegion: HRGN): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +//----- HitTestThemeBackground, HitTestThemeBackgroundRegion flags ---- + +// Theme background segment hit test flag (default). possible return values are: +// HTCLIENT: hit test succeeded in the middle background segment +// HTTOP, HTLEFT, HTTOPLEFT, etc: // hit test succeeded in the the respective theme background segment. + +const + HTTB_BACKGROUNDSEG = $0000; + +// Fixed border hit test option. possible return values are: +// HTCLIENT: hit test succeeded in the middle background segment +// HTBORDER: hit test succeeded in any other background segment + + HTTB_FIXEDBORDER = $0002; // Return code may be either HTCLIENT or HTBORDER. + +// Caption hit test option. Possible return values are: +// HTCAPTION: hit test succeeded in the top, top left, or top right background segments +// HTNOWHERE or another return code, depending on absence or presence of accompanying flags, resp. + + HTTB_CAPTION = $0004; + +// Resizing border hit test flags. Possible return values are: +// HTCLIENT: hit test succeeded in middle background segment +// HTTOP, HTTOPLEFT, HTLEFT, HTRIGHT, etc: hit test succeeded in the respective system resizing zone +// HTBORDER: hit test failed in middle segment and resizing zones, but succeeded in a background border segment + + HTTB_RESIZINGBORDER_LEFT = $0010; // Hit test left resizing border, + HTTB_RESIZINGBORDER_TOP = $0020; // Hit test top resizing border + HTTB_RESIZINGBORDER_RIGHT = $0040; // Hit test right resizing border + HTTB_RESIZINGBORDER_BOTTOM = $0080; // Hit test bottom resizing border + + HTTB_RESIZINGBORDER = (HTTB_RESIZINGBORDER_LEFT or HTTB_RESIZINGBORDER_TOP or + HTTB_RESIZINGBORDER_RIGHT or HTTB_RESIZINGBORDER_BOTTOM); + +// Resizing border is specified as a template, not just window edges. +// This option is mutually exclusive with HTTB_SYSTEMSIZINGWIDTH; HTTB_SIZINGTEMPLATE takes precedence + + HTTB_SIZINGTEMPLATE = $0100; + +// Use system resizing border width rather than theme content margins. +// This option is mutually exclusive with HTTB_SIZINGTEMPLATE, which takes precedence. + + HTTB_SYSTEMSIZINGMARGINS = $0200; + +//---------------------------------------------------------------------------------------------------------------------- +// HitTestThemeBackground() +// - returns a HitTestCode (a subset of the values +// returned by WM_NCHITTEST) for the point "ptTest" +// within the theme-specified background +// (bound by pRect). "pRect" and "ptTest" should +// both be in the same coordinate system +// (client, screen, etc). +// +// hTheme - theme data handle +// hdc - HDC to draw into +// iPartId - part number to test against +// iStateId - state number (of the part) +// pRect - the RECT used to draw the part +// hrgn - optional region to use; must be in same coordinates as +// - pRect and pTest. +// ptTest - the hit point to be tested +// dwOptions - HTTB_xxx constants +// pwHitTestCode - receives the returned hit test code - one of: +// +// HTNOWHERE, HTLEFT, HTTOPLEFT, HTBOTTOMLEFT, +// HTRIGHT, HTTOPRIGHT, HTBOTTOMRIGHT, +// HTTOP, HTBOTTOM, HTCLIENT +//---------------------------------------------------------------------------------------------------------------------- + +var + HitTestThemeBackground: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; dwOptions: DWORD; + const pRect: TRect; hrgn: HRGN; ptTest: TPoint; var pwHitTestCode: WORD): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// DrawThemeEdge() - Similar to the DrawEdge() API, but uses part colors +// and is high-DPI aware +// hTheme - theme data handle +// hdc - HDC to draw into +// iPartId - part number to draw +// iStateId - state number of part +// pDestRect - the RECT used to draw the line(s) +// uEdge - Same as DrawEdge() API +// uFlags - Same as DrawEdge() API +// pContentRect - Receives the interior rect if (uFlags & BF_ADJUST) +//---------------------------------------------------------------------------------------------------------------------- + +var + DrawThemeEdge: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; const pDestRect: TRect; uEdge, + uFlags: UINT; pContentRect: PRECT): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// DrawThemeIcon() - draws an image within an imagelist based on +// a (possible) theme-defined effect. +// +// hTheme - theme data handle +// hdc - HDC to draw into +// iPartId - part number to draw +// iStateId - state number of part +// pRect - the RECT to draw the image within +// himl - handle to IMAGELIST +// iImageIndex - index into IMAGELIST (which icon to draw) +//---------------------------------------------------------------------------------------------------------------------- + +var + DrawThemeIcon: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId: Integer; const pRect: TRect; himl: HIMAGELIST; + iImageIndex: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// IsThemePartDefined() - returns TRUE if the theme has defined parameters +// for the specified "iPartId" and "iStateId". +// +// hTheme - theme data handle +// iPartId - part number to find definition for +// iStateId - state number of part +//---------------------------------------------------------------------------------------------------------------------- + +var + IsThemePartDefined: function(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// IsThemeBackgroundPartiallyTransparent() +// - returns TRUE if the theme specified background for +// the part/state has transparent pieces or +// alpha-blended pieces. +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +//---------------------------------------------------------------------------------------------------------------------- + +var + IsThemeBackgroundPartiallyTransparent: function(hTheme: HTHEME; iPartId, iStateId: Integer): BOOL; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// lower-level theme information services +//---------------------------------------------------------------------------------------------------------------------- +// The following methods are getter routines for each of the Theme Data types. +// Controls/Windows are defined in drawable "parts" by their author: a +// parent part and 0 or more child parts. Each of the parts can be +// described in "states" (ex: disabled, hot, pressed). +//---------------------------------------------------------------------------------------------------------------------- +// Each of the below methods takes a "iPartId" param to specify the +// part and a "iStateId" to specify the state of the part. +// "iStateId=0" refers to the root part. "iPartId" = "0" refers to +// the root class. +//---------------------------------------------------------------------------------------------------------------------- +// Each method also take a "iPropId" param because multiple instances of +// the same primitive type can be defined in the theme schema. +//---------------------------------------------------------------------------------------------------------------------- + + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeColor() - Get the value for the specified COLOR property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pColor - receives the value of the property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeColor: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; var pColor: COLORREF): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeMetric() - Get the value for the specified metric/size +// property +// +// hTheme - theme data handle +// hdc - (optional) hdc to be drawn into (DPI scaling) +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// piVal - receives the value of the property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeMetric: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer; + var piVal: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeString() - Get the value for the specified string property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pszBuff - receives the string property value +// cchMaxBuffChars - max. number of chars allowed in pszBuff +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeString: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; pszBuff: LPWSTR; + cchMaxBuffChars: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeBool() - Get the value for the specified BOOL property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pfVal - receives the value of the property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeBool: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; var pfVal: BOOL): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeInt() - Get the value for the specified int property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// piVal - receives the value of the property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeInt: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; var piVal: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeEnumValue() - Get the value for the specified ENUM property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// piVal - receives the value of the enum (cast to int*) +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeEnumValue: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; var piVal: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemePosition() - Get the value for the specified position +// property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pPoint - receives the value of the position property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemePosition: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer;var pPoint: TPoint): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeFont() - Get the value for the specified font property +// +// hTheme - theme data handle +// hdc - (optional) hdc to be drawn to (DPI scaling) +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pFont - receives the value of the LOGFONT property +// (scaled for the current logical screen dpi) +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeFont: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer; + var pFont: TLOGFONT): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeRect() - Get the value for the specified RECT property +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pRect - receives the value of the RECT property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeRect: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; var pRect: TRect): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- + +type + _MARGINS = record + cxLeftWidth: Integer; // width of left border that retains its size + cxRightWidth: Integer; // width of right border that retains its size + cyTopHeight: Integer; // height of top border that retains its size + cyBottomHeight: Integer; // height of bottom border that retains its size + end; + MARGINS = _MARGINS; + PMARGINS = ^MARGINS; + TMargins = MARGINS; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeMargins() - Get the value for the specified MARGINS property +// +// hTheme - theme data handle +// hdc - (optional) hdc to be used for drawing +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// prc - RECT for area to be drawn into +// pMargins - receives the value of the MARGINS property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeMargins: function(hTheme: HTHEME; hdc: HDC; iPartId, iStateId, iPropId: Integer; prc: PRECT; + var pMargins: MARGINS): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- + +const + MAX_INTLIST_COUNT = 10; + +type + _INTLIST = record + iValueCount: Integer; // number of values in iValues + iValues: array [0..MAX_INTLIST_COUNT - 1] of Integer; + end; + INTLIST = _INTLIST; + PINTLIST = ^INTLIST; + TIntList = INTLIST; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeIntList() - Get the value for the specified INTLIST struct +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to get the value for +// pIntList - receives the value of the INTLIST property +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeIntList: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; var pIntList: INTLIST): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- + +type + PROPERTYORIGIN = ( + PO_STATE, // property was found in the state section + PO_PART, // property was found in the part section + PO_CLASS, // property was found in the class section + PO_GLOBAL, // property was found in [globals] section + PO_NOTFOUND); // property was not found + TPropertyOrigin = PROPERTYORIGIN; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemePropertyOrigin() +// - searches for the specified theme property +// and sets "pOrigin" to indicate where it was +// found (or not found) +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to search for +// pOrigin - receives the value of the property origin +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemePropertyOrigin: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; + var pOrigin: PROPERTYORIGIN): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// SetWindowTheme() +// - redirects an existing Window to use a different +// section of the current theme information than its +// class normally asks for. +// +// hwnd - the handle of the window (cannot be NULL) +// +// pszSubAppName - app (group) name to use in place of the calling +// app's name. If NULL, the actual calling app +// name will be used. +// +// pszSubIdList - semicolon separated list of class Id names to +// use in place of actual list passed by the +// window's class. if NULL, the id list from the +// calling class is used. +//---------------------------------------------------------------------------------------------------------------------- +// The Theme Manager will remember the "pszSubAppName" and the +// "pszSubIdList" associations thru the lifetime of the window (even +// if themes are subsequently changed). The window is sent a +// "WM_THEMECHANGED" msg at the end of this call, so that the new +// theme can be found and applied. +//---------------------------------------------------------------------------------------------------------------------- +// When "pszSubAppName" or "pszSubIdList" are NULL, the Theme Manager +// removes the previously remember association. To turn off theme-ing for +// the specified window, you can pass an empty string (L"") so it +// won't match any section entries. +//---------------------------------------------------------------------------------------------------------------------- + +var + SetWindowTheme: function(hwnd: HWND; pszSubAppName: LPCWSTR; pszSubIdList: LPCWSTR): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeFilename() - Get the value for the specified FILENAME property. +// +// hTheme - theme data handle +// iPartId - part number +// iStateId - state number of part +// iPropId - the property number to search for +// pszThemeFileName - output buffer to receive the filename +// cchMaxBuffChars - the size of the return buffer, in chars +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeFilename: function(hTheme: HTHEME; iPartId, iStateId, iPropId: Integer; pszThemeFileName: LPWSTR; + cchMaxBuffChars: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysColor() - Get the value of the specified System color. +// +// hTheme - the theme data handle. if non-NULL, will return +// color from [SysMetrics] section of theme. +// if NULL, will return the global system color. +// +// iColorId - the system color index defined in winuser.h +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysColor: function(hTheme: HTHEME; iColorId: Integer): COLORREF; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysColorBrush() +// - Get the brush for the specified System color. +// +// hTheme - the theme data handle. if non-NULL, will return +// brush matching color from [SysMetrics] section of +// theme. if NULL, will return the brush matching +// global system color. +// +// iColorId - the system color index defined in winuser.h +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysColorBrush: function(hTheme: HTHEME; iColorId: Integer): HBRUSH; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysBool() - Get the boolean value of specified System metric. +// +// hTheme - the theme data handle. if non-NULL, will return +// BOOL from [SysMetrics] section of theme. +// if NULL, will return the specified system boolean. +// +// iBoolId - the TMT_XXX BOOL number (first BOOL +// is TMT_FLATMENUS) +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysBool: function(hTheme: HTHEME; iBoolId: Integer): BOOL; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysSize() - Get the value of the specified System size metric. +// (scaled for the current logical screen dpi) +// +// hTheme - the theme data handle. if non-NULL, will return +// size from [SysMetrics] section of theme. +// if NULL, will return the global system metric. +// +// iSizeId - the following values are supported when +// hTheme is non-NULL: +// +// SM_CXBORDER (border width) +// SM_CXVSCROLL (scrollbar width) +// SM_CYHSCROLL (scrollbar height) +// SM_CXSIZE (caption width) +// SM_CYSIZE (caption height) +// SM_CXSMSIZE (small caption width) +// SM_CYSMSIZE (small caption height) +// SM_CXMENUSIZE (menubar width) +// SM_CYMENUSIZE (menubar height) +// +// when hTheme is NULL, iSizeId is passed directly +// to the GetSystemMetrics() function +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysSize: function(hTheme: HTHEME; iSizeId: Integer): Integer; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysFont() - Get the LOGFONT for the specified System font. +// +// hTheme - the theme data handle. if non-NULL, will return +// font from [SysMetrics] section of theme. +// if NULL, will return the specified system font. +// +// iFontId - the TMT_XXX font number (first font +// is TMT_CAPTIONFONT) +// +// plf - ptr to LOGFONT to receive the font value. +// (scaled for the current logical screen dpi) +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysFont: function(hTheme: HTHEME; iFontId: Integer; var plf: TLOGFONT): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysString() - Get the value of specified System string metric. +// +// hTheme - the theme data handle (required) +// +// iStringId - must be one of the following values: +// +// TMT_CSSNAME +// TMT_XMLNAME +// +// pszStringBuff - the buffer to receive the string value +// +// cchMaxStringChars - max. number of chars that pszStringBuff can hold +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysString: function(hTheme: HTHEME; iStringId: Integer; pszStringBuff: LPWSTR; + cchMaxStringChars: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeSysInt() - Get the value of specified System int. +// +// hTheme - the theme data handle (required) +// +// iIntId - must be one of the following values: +// +// TMT_DPIX +// TMT_DPIY +// TMT_MINCOLORDEPTH +// +// piValue - ptr to int to receive value +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeSysInt: function(hTheme: HTHEME; iIntId: Integer; var piValue: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// IsThemeActive() - can be used to test if a system theme is active +// for the current user session. +// +// use the API "IsAppThemed()" to test if a theme is +// active for the calling process. +//---------------------------------------------------------------------------------------------------------------------- + +var + IsThemeActive: function: BOOL; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// IsAppThemed() - returns TRUE if a theme is active and available to +// the current process +//---------------------------------------------------------------------------------------------------------------------- + +var + IsAppThemed: function: BOOL; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetWindowTheme() - if window is themed, returns its most recent +// HTHEME from OpenThemeData() - otherwise, returns +// NULL. +// +// hwnd - the window to get the HTHEME of +//---------------------------------------------------------------------------------------------------------------------- + +var + GetWindowTheme: function(hwnd: HWND): HTHEME; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// EnableThemeDialogTexture() +// +// - Enables/disables dialog background theme. This method can be used to +// tailor dialog compatibility with child windows and controls that +// may or may not coordinate the rendering of their client area backgrounds +// with that of their parent dialog in a manner that supports seamless +// background texturing. +// +// hdlg - the window handle of the target dialog +// dwFlags - ETDT_ENABLE to enable the theme-defined dialog background texturing, +// ETDT_DISABLE to disable background texturing, +// ETDT_ENABLETAB to enable the theme-defined background +// texturing using the Tab texture +//---------------------------------------------------------------------------------------------------------------------- + +const + ETDT_DISABLE = $00000001; + ETDT_ENABLE = $00000002; + ETDT_USETABTEXTURE = $00000004; + ETDT_ENABLETAB = (ETDT_ENABLE or ETDT_USETABTEXTURE); + +var + EnableThemeDialogTexture: function(hwnd: HWND; dwFlags: DWORD): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// IsThemeDialogTextureEnabled() +// +// - Reports whether the dialog supports background texturing. +// +// hdlg - the window handle of the target dialog +//---------------------------------------------------------------------------------------------------------------------- + +var + IsThemeDialogTextureEnabled: function(hwnd: HWND): BOOL; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +//---- flags to control theming within an app ---- + +const + STAP_ALLOW_NONCLIENT = (1 shl 0); + STAP_ALLOW_CONTROLS = (1 shl 1); + STAP_ALLOW_WEBCONTENT = (1 shl 2); + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeAppProperties() +// - returns the app property flags that control theming +//---------------------------------------------------------------------------------------------------------------------- + +var + GetThemeAppProperties: function: DWORD; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// SetThemeAppProperties() +// - sets the flags that control theming within the app +// +// dwFlags - the flag values to be set +//---------------------------------------------------------------------------------------------------------------------- + +var + SetThemeAppProperties: procedure(dwFlags: DWORD); stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetCurrentThemeName() +// - Get the name of the current theme in-use. +// Optionally, return the ColorScheme name and the +// Size name of the theme. +// +// pszThemeFileName - receives the theme path & filename +// cchMaxNameChars - max chars allowed in pszNameBuff +// +// pszColorBuff - (optional) receives the canonical color scheme name +// (not the display name) +// cchMaxColorChars - max chars allowed in pszColorBuff +// +// pszSizeBuff - (optional) receives the canonical size name +// (not the display name) +// cchMaxSizeChars - max chars allowed in pszSizeBuff +//---------------------------------------------------------------------------------------------------------------------- + +var + GetCurrentThemeName: function(pszThemeFileName: LPWSTR; cchMaxNameChars: Integer; pszColorBuff: LPWSTR; + cchMaxColorChars: Integer; pszSizeBuff: LPWSTR; cchMaxSizeChars: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// GetThemeDocumentationProperty() +// - Get the value for the specified property name from +// the [documentation] section of the themes.ini file +// for the specified theme. If the property has been +// localized in the theme files string table, the +// localized version of the property value is returned. +// +// pszThemeFileName - filename of the theme file to query +// pszPropertyName - name of the string property to retreive a value for +// pszValueBuff - receives the property string value +// cchMaxValChars - max chars allowed in pszValueBuff +//---------------------------------------------------------------------------------------------------------------------- + +const + SZ_THDOCPROP_DISPLAYNAME = 'DisplayName'; + SZ_THDOCPROP_CANONICALNAME = 'ThemeName'; + SZ_THDOCPROP_TOOLTIP = 'ToolTip'; + SZ_THDOCPROP_AUTHOR = 'author'; + +var + GetThemeDocumentationProperty: function(pszThemeName, pszPropertyName: LPCWSTR; pszValueBuff: LPWSTR; + cchMaxValChars: Integer): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// Theme API Error Handling +// +// All functions in the Theme API not returning an HRESULT (THEMEAPI_) +// use the WIN32 function "SetLastError()" to record any call failures. +// +// To retreive the error code of the last failure on the +// current thread for these type of API's, use the WIN32 function +// "GetLastError()". +// +// All Theme API error codes (HRESULT's and GetLastError() values) +// should be normal win32 errors which can be formatted into +// strings using the Win32 API FormatMessage(). +//---------------------------------------------------------------------------------------------------------------------- + +//---------------------------------------------------------------------------------------------------------------------- +// DrawThemeParentBackground() +// - used by partially-transparent or alpha-blended +// child controls to draw the part of their parent +// that they appear in front of. +// +// hwnd - handle of the child control +// hdc - hdc of the child control +// prc - (optional) rect that defines the area to be +// drawn (CHILD coordinates) +//---------------------------------------------------------------------------------------------------------------------- + +var + DrawThemeParentBackground: function(hwnd: HWND; hdc: HDC; prc: PRECT): HRESULT; stdcall; + +//---------------------------------------------------------------------------------------------------------------------- +// EnableTheming() - enables or disables themeing for the current user +// in the current and future sessions. +// +// fEnable - if FALSE, disable theming & turn themes off. +// - if TRUE, enable themeing and, if user previously +// had a theme active, make it active now. +//---------------------------------------------------------------------------------------------------------------------- + +var + EnableTheming: function(fEnable: BOOL): HRESULT; stdcall; + +implementation + +//---------------------------------------------------------------------------------------------------------------------- + +const + themelib = 'uxtheme.dll'; + +var + ThemeLibrary: THandle; + ReferenceCount: Integer; // We have to keep track of several load/unload calls. + +procedure FreeThemeLibrary; + +begin + if ReferenceCount > 0 then + Dec(ReferenceCount); + + if (ThemeLibrary <> 0) and (ReferenceCount = 0) then + begin + FreeLibrary(ThemeLibrary); + ThemeLibrary := 0; + + OpenThemeData := nil; + CloseThemeData := nil; + DrawThemeBackground := nil; + DrawThemeText := nil; + GetThemeBackgroundContentRect := nil; + GetThemeBackgroundExtent := nil; + GetThemePartSize := nil; + GetThemeTextExtent := nil; + GetThemeTextMetrics := nil; + GetThemeBackgroundRegion := nil; + HitTestThemeBackground := nil; + DrawThemeEdge := nil; + DrawThemeIcon := nil; + IsThemePartDefined := nil; + IsThemeBackgroundPartiallyTransparent := nil; + GetThemeColor := nil; + GetThemeMetric := nil; + GetThemeString := nil; + GetThemeBool := nil; + GetThemeInt := nil; + GetThemeEnumValue := nil; + GetThemePosition := nil; + GetThemeFont := nil; + GetThemeRect := nil; + GetThemeMargins := nil; + GetThemeIntList := nil; + GetThemePropertyOrigin := nil; + SetWindowTheme := nil; + GetThemeFilename := nil; + GetThemeSysColor := nil; + GetThemeSysColorBrush := nil; + GetThemeSysBool := nil; + GetThemeSysSize := nil; + GetThemeSysFont := nil; + GetThemeSysString := nil; + GetThemeSysInt := nil; + IsThemeActive := nil; + IsAppThemed := nil; + GetWindowTheme := nil; + EnableThemeDialogTexture := nil; + IsThemeDialogTextureEnabled := nil; + GetThemeAppProperties := nil; + SetThemeAppProperties := nil; + GetCurrentThemeName := nil; + GetThemeDocumentationProperty := nil; + DrawThemeParentBackground := nil; + EnableTheming := nil; + end; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function InitThemeLibrary: Boolean; + + function IsWindowsXP: Boolean; + var + Info: TOSVersionInfo; + begin + Result := False; + Info.dwOSVersionInfoSize := SizeOf(Info); + if GetVersionEx(Info) then + if Info.dwPlatformId = VER_PLATFORM_WIN32_NT then + if (Info.dwMajorVersion > 5) or + ((Info.dwMajorVersion = 5) and (Info.dwMinorVersion >= 1)) then + Result := True; + end; + +begin + Inc(ReferenceCount); + + { Only attempt to load uxtheme.dll if running Windows XP or later; otherwise + if uxtheme.dll happens to exist on Windows 2000 (it shouldn't unless a + bugged installer put it there) we get a "RtlUnhandledExceptionFilter could + not be located in the dynamic link library ntdll.dll" error message } + if (ThemeLibrary = 0) and IsWindowsXP then + begin + ThemeLibrary := LoadLibrary(themelib); + if ThemeLibrary <> 0 then + begin + OpenThemeData := GetProcAddress(ThemeLibrary, 'OpenThemeData'); + CloseThemeData := GetProcAddress(ThemeLibrary, 'CloseThemeData'); + DrawThemeBackground := GetProcAddress(ThemeLibrary, 'DrawThemeBackground'); + DrawThemeText := GetProcAddress(ThemeLibrary, 'DrawThemeText'); + GetThemeBackgroundContentRect := GetProcAddress(ThemeLibrary, 'GetThemeBackgroundContentRect'); + GetThemeBackgroundExtent := GetProcAddress(ThemeLibrary, 'GetThemeBackgroundContentRect'); + GetThemePartSize := GetProcAddress(ThemeLibrary, 'GetThemePartSize'); + GetThemeTextExtent := GetProcAddress(ThemeLibrary, 'GetThemeTextExtent'); + GetThemeTextMetrics := GetProcAddress(ThemeLibrary, 'GetThemeTextMetrics'); + GetThemeBackgroundRegion := GetProcAddress(ThemeLibrary, 'GetThemeBackgroundRegion'); + HitTestThemeBackground := GetProcAddress(ThemeLibrary, 'HitTestThemeBackground'); + DrawThemeEdge := GetProcAddress(ThemeLibrary, 'DrawThemeEdge'); + DrawThemeIcon := GetProcAddress(ThemeLibrary, 'DrawThemeIcon'); + IsThemePartDefined := GetProcAddress(ThemeLibrary, 'IsThemePartDefined'); + IsThemeBackgroundPartiallyTransparent := GetProcAddress(ThemeLibrary, 'IsThemeBackgroundPartiallyTransparent'); + GetThemeColor := GetProcAddress(ThemeLibrary, 'GetThemeColor'); + GetThemeMetric := GetProcAddress(ThemeLibrary, 'GetThemeMetric'); + GetThemeString := GetProcAddress(ThemeLibrary, 'GetThemeString'); + GetThemeBool := GetProcAddress(ThemeLibrary, 'GetThemeBool'); + GetThemeInt := GetProcAddress(ThemeLibrary, 'GetThemeInt'); + GetThemeEnumValue := GetProcAddress(ThemeLibrary, 'GetThemeEnumValue'); + GetThemePosition := GetProcAddress(ThemeLibrary, 'GetThemePosition'); + GetThemeFont := GetProcAddress(ThemeLibrary, 'GetThemeFont'); + GetThemeRect := GetProcAddress(ThemeLibrary, 'GetThemeRect'); + GetThemeMargins := GetProcAddress(ThemeLibrary, 'GetThemeMargins'); + GetThemeIntList := GetProcAddress(ThemeLibrary, 'GetThemeIntList'); + GetThemePropertyOrigin := GetProcAddress(ThemeLibrary, 'GetThemePropertyOrigin'); + SetWindowTheme := GetProcAddress(ThemeLibrary, 'SetWindowTheme'); + GetThemeFilename := GetProcAddress(ThemeLibrary, 'GetThemeFilename'); + GetThemeSysColor := GetProcAddress(ThemeLibrary, 'GetThemeSysColor'); + GetThemeSysColorBrush := GetProcAddress(ThemeLibrary, 'GetThemeSysColorBrush'); + GetThemeSysBool := GetProcAddress(ThemeLibrary, 'GetThemeSysBool'); + GetThemeSysSize := GetProcAddress(ThemeLibrary, 'GetThemeSysSize'); + GetThemeSysFont := GetProcAddress(ThemeLibrary, 'GetThemeSysFont'); + GetThemeSysString := GetProcAddress(ThemeLibrary, 'GetThemeSysString'); + GetThemeSysInt := GetProcAddress(ThemeLibrary, 'GetThemeSysInt'); + IsThemeActive := GetProcAddress(ThemeLibrary, 'IsThemeActive'); + IsAppThemed := GetProcAddress(ThemeLibrary, 'IsAppThemed'); + GetWindowTheme := GetProcAddress(ThemeLibrary, 'GetWindowTheme'); + EnableThemeDialogTexture := GetProcAddress(ThemeLibrary, 'EnableThemeDialogTexture'); + IsThemeDialogTextureEnabled := GetProcAddress(ThemeLibrary, 'IsThemeDialogTextureEnabled'); + GetThemeAppProperties := GetProcAddress(ThemeLibrary, 'GetThemeAppProperties'); + SetThemeAppProperties := GetProcAddress(ThemeLibrary, 'SetThemeAppProperties'); + GetCurrentThemeName := GetProcAddress(ThemeLibrary, 'GetCurrentThemeName'); + GetThemeDocumentationProperty := GetProcAddress(ThemeLibrary, 'GetThemeDocumentationProperty'); + DrawThemeParentBackground := GetProcAddress(ThemeLibrary, 'DrawThemeParentBackground'); + EnableTheming := GetProcAddress(ThemeLibrary, 'EnableTheming'); + end; + end; + Result := ThemeLibrary <> 0; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +function UseThemes: Boolean; + +begin + Result := ThemeLibrary <> 0; + if Result then + Result := IsAppThemed and IsThemeActive; +end; + +//---------------------------------------------------------------------------------------------------------------------- + +{ Following commented out by JR. Depending on unit deinitialization order, the + FreeThemeLibrary call below could be made while other units are still using + the theme library. This happens with NewCheckListBox when Application.Run + isn't called; this unit gets deinitialized before WizardForm and its + TNewCheckListBoxes are destroyed. This resulted in an AV before because + TNewCheckListBox.Destroy calls theme functions. + And there's really no point in freeing a DLL during shutdown anyway; the + system will do so automatically. } +(* +initialization +finalization + while ReferenceCount > 0 do + FreeThemeLibrary; +*) +end. diff --git a/Components/dwTaskbarList.pas b/Components/dwTaskbarList.pas new file mode 100644 index 000000000..aa5aa1247 --- /dev/null +++ b/Components/dwTaskbarList.pas @@ -0,0 +1,150 @@ +{ Original file taken from "Windows 7 Controls for Delphi" by Daniel Wischnewski + http://www.gumpi.com/Blog/2009/01/20/Alpha1OfWindows7ControlsForDelphi.aspx + MPL licensed } + +{ D2/D3 support and correct IID consts added by Martijn Laan for Inno Setup } + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + This unit provides the ITaskbarList3 interface for Windows 7 taskbar progress indicators. + + $jrsoftware: issrc/Components/dwTaskbarList.pas,v 1.5 2010/10/21 02:14:14 jr Exp $ +} + +{$IFDEF VER90} + {$DEFINE DELPHI2} +{$ENDIF} + +unit dwTaskbarList; + +interface + +uses + Windows {$IFDEF DELPHI2}, OLE2 {$ENDIF}; + +const + CLSID_TaskbarList: TGUID = ( + D1:$56FDF344; D2:$FD6D; D3:$11D0; D4:($95,$8A,$00,$60,$97,$C9,$A0,$90)); + IID_TaskbarList: TGUID = ( + D1:$56FDF342; D2:$FD6D; D3:$11D0; D4:($95,$8A,$00,$60,$97,$C9,$A0,$90)); + IID_TaskbarList2: TGUID = ( + D1:$602D4995; D2:$B13A; D3:$429B; D4:($A6,$6E,$19,$35,$E4,$4F,$43,$17)); + IID_TaskbarList3: TGUID = ( + D1:$EA1AFB91; D2:$9E28; D3:$4B86; D4:($90,$E9,$9E,$9F,$8A,$5E,$EF,$AF)); + +const + THBF_ENABLED = $0000; + THBF_DISABLED = $0001; + THBF_DISMISSONCLICK = $0002; + THBF_NOBACKGROUND = $0004; + THBF_HIDDEN = $0008; + +const + THB_BITMAP = $0001; + THB_ICON = $0002; + THB_TOOLTIP = $0004; + THB_FLAGS = $0008; + +const + THBN_CLICKED = $1800; + +const + TBPF_NOPROGRESS = $00; + TBPF_INDETERMINATE = $01; + TBPF_NORMAL = $02; + TBPF_ERROR = $04; + TBPF_PAUSED = $08; + +const + TBATF_USEMDITHUMBNAIL: DWORD = $00000001; + TBATF_USEMDILIVEPREVIEW: DWORD = $00000002; + +const + WM_DWMSENDICONICTHUMBNAIL = $0323; + WM_DWMSENDICONICLIVEPREVIEWBITMAP = $0326; + +type + TTipString = array[0..259] of WideChar; + PTipString = ^TTipString; + tagTHUMBBUTTON = packed record + dwMask: DWORD; + iId: UINT; + iBitmap: UINT; + hIcon: HICON; + szTip: TTipString; + dwFlags: DWORD; + end; + THUMBBUTTON = tagTHUMBBUTTON; + THUMBBUTTONLIST = ^THUMBBUTTON; + + dwInteger64 = record + Lo, Hi: Cardinal; + end; + +type +{$IFDEF DELPHI2} + ITaskbarList = class(IUnknown) + function HrInit: HRESULT; virtual; stdcall; abstract; + function AddTab(hwnd: Cardinal): HRESULT; virtual; stdcall; abstract; + function DeleteTab(hwnd: Cardinal): HRESULT; virtual; stdcall; abstract; + function ActivateTab(hwnd: Cardinal): HRESULT; virtual; stdcall; abstract; + function SetActiveAlt(hwnd: Cardinal): HRESULT; virtual; stdcall; abstract; + end; + + ITaskbarList2 = class(ITaskbarList) + function MarkFullscreenWindow(hwnd: Cardinal; fFullscreen: Bool): HRESULT; virtual; stdcall; abstract; + end; + + ITaskbarList3 = class(ITaskbarList2) + function SetProgressValue(hwnd: Cardinal; ullCompleted, ullTotal: dwInteger64): HRESULT; virtual; stdcall; abstract; + function SetProgressState(hwnd: Cardinal; tbpFlags: DWORD): HRESULT; virtual; stdcall; abstract; + function RegisterTab(hwndTab: Cardinal; hwndMDI: Cardinal): HRESULT; virtual; stdcall; abstract; + function UnregisterTab(hwndTab: Cardinal): HRESULT; virtual; stdcall; abstract; + function SetTabOrder(hwndTab: Cardinal; hwndInsertBefore: Cardinal): HRESULT; virtual; stdcall; abstract; + function SetTabActive(hwndTab: Cardinal; hwndMDI: Cardinal; tbatFlags: DWORD): HRESULT; virtual; stdcall; abstract; + function ThumbBarAddButtons(hwnd: Cardinal; cButtons: UINT; Button: THUMBBUTTONLIST): HRESULT; virtual; stdcall; abstract; + function ThumbBarUpdateButtons(hwnd: Cardinal; cButtons: UINT; pButton: THUMBBUTTONLIST): HRESULT; virtual; stdcall; abstract; + function ThumbBarSetImageList(hwnd: Cardinal; himl: Cardinal): HRESULT; virtual; stdcall; abstract; + function SetOverlayIcon(hwnd: Cardinal; hIcon: HICON; pszDescription: LPCWSTR): HRESULT; virtual; stdcall; abstract; + function SetThumbnailTooltip(hwnd: Cardinal; pszTip: LPCWSTR): HRESULT; virtual; stdcall; abstract; + function SetThumbnailClip(hwnd: Cardinal; prcClip: PRect): HRESULT; virtual; stdcall; abstract; + end; +{$ELSE} + ITaskbarList = interface + ['{56FDF342-FD6D-11D0-958A-006097C9A090}'] + function HrInit: HRESULT; stdcall; + function AddTab(hwnd: Cardinal): HRESULT; stdcall; + function DeleteTab(hwnd: Cardinal): HRESULT; stdcall; + function ActivateTab(hwnd: Cardinal): HRESULT; stdcall; + function SetActiveAlt(hwnd: Cardinal): HRESULT; stdcall; + end; + + ITaskbarList2 = interface(ITaskbarList) + ['{602D4995-B13A-429B-A66E-1935E44F4317}'] + function MarkFullscreenWindow(hwnd: Cardinal; fFullscreen: Bool): HRESULT; stdcall; + end; + + ITaskbarList3 = interface(ITaskbarList2) + ['{EA1AFB91-9E28-4B86-90E9-9E9F8A5EEFAF}'] + function SetProgressValue(hwnd: Cardinal; ullCompleted, ullTotal: dwInteger64): HRESULT; stdcall; + function SetProgressState(hwnd: Cardinal; tbpFlags: DWORD): HRESULT; stdcall; + function RegisterTab(hwndTab: Cardinal; hwndMDI: Cardinal): HRESULT; stdcall; + function UnregisterTab(hwndTab: Cardinal): HRESULT; stdcall; + function SetTabOrder(hwndTab: Cardinal; hwndInsertBefore: Cardinal): HRESULT; stdcall; + function SetTabActive(hwndTab: Cardinal; hwndMDI: Cardinal; tbatFlags: DWORD): HRESULT; stdcall; + function ThumbBarAddButtons(hwnd: Cardinal; cButtons: UINT; Button: THUMBBUTTONLIST): HRESULT; stdcall; + function ThumbBarUpdateButtons(hwnd: Cardinal; cButtons: UINT; pButton: THUMBBUTTONLIST): HRESULT; stdcall; + function ThumbBarSetImageList(hwnd: Cardinal; himl: Cardinal): HRESULT; stdcall; + function SetOverlayIcon(hwnd: Cardinal; hIcon: HICON; pszDescription: LPCWSTR): HRESULT; stdcall; + function SetThumbnailTooltip(hwnd: Cardinal; pszTip: LPCWSTR): HRESULT; stdcall; + function SetThumbnailClip(hwnd: Cardinal; prcClip: PRect): HRESULT; stdcall; + end; +{$ENDIF} + +implementation + +end. diff --git a/Examples/64Bit.iss b/Examples/64Bit.iss new file mode 100644 index 000000000..824fdaba5 --- /dev/null +++ b/Examples/64Bit.iss @@ -0,0 +1,32 @@ +; -- 64Bit.iss -- +; Demonstrates installation of a program built for the x64 (a.k.a. AMD64) +; architecture. +; To successfully run this installation and the program it installs, +; you must have the "x64" edition of Windows XP or Windows Server 2003. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=userdocs:Inno Setup Examples Output +; "ArchitecturesAllowed=x64" specifies that Setup cannot run on +; anything but x64. +ArchitecturesAllowed=x64 +; "ArchitecturesInstallIn64BitMode=x64" requests that the install be +; done in "64-bit mode" on x64, meaning it should use the native +; 64-bit Program Files directory and the 64-bit view of the registry. +ArchitecturesInstallIn64BitMode=x64 + +[Files] +Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" diff --git a/Examples/64BitThreeArch.iss b/Examples/64BitThreeArch.iss new file mode 100644 index 000000000..59bee0fee --- /dev/null +++ b/Examples/64BitThreeArch.iss @@ -0,0 +1,48 @@ +; -- 64BitThreeArch.iss -- +; Demonstrates how to install a program built for three different +; architectures (x86, x64, Itanium) using a single installer. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=userdocs:Inno Setup Examples Output +; "ArchitecturesInstallIn64BitMode=x64 ia64" requests that the install +; be done in "64-bit mode" on x64 & Itanium, meaning it should use the +; native 64-bit Program Files directory and the 64-bit view of the +; registry. On all other architectures it will install in "32-bit mode". +ArchitecturesInstallIn64BitMode=x64 ia64 + +[Files] +; Install MyProg-x64.exe if running on x64, MyProg-IA64.exe if +; running on Itanium, MyProg.exe otherwise. +Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: IsX64 +Source: "MyProg-IA64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: IsIA64 +Source: "MyProg.exe"; DestDir: "{app}"; Check: IsOtherArch +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" + +[Code] +function IsX64: Boolean; +begin + Result := Is64BitInstallMode and (ProcessorArchitecture = paX64); +end; + +function IsIA64: Boolean; +begin + Result := Is64BitInstallMode and (ProcessorArchitecture = paIA64); +end; + +function IsOtherArch: Boolean; +begin + Result := not IsX64 and not IsIA64; +end; diff --git a/Examples/64BitTwoArch.iss b/Examples/64BitTwoArch.iss new file mode 100644 index 000000000..30606a802 --- /dev/null +++ b/Examples/64BitTwoArch.iss @@ -0,0 +1,34 @@ +; -- 64BitTwoArch.iss -- +; Demonstrates how to install a program built for two different +; architectures (x86 and x64) using a single installer. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=userdocs:Inno Setup Examples Output +; "ArchitecturesInstallIn64BitMode=x64" requests that the install be +; done in "64-bit mode" on x64, meaning it should use the native +; 64-bit Program Files directory and the 64-bit view of the registry. +; On all other architectures it will install in "32-bit mode". +ArchitecturesInstallIn64BitMode=x64 +; Note: We don't set ProcessorsAllowed because we want this +; installation to run on all architectures (including Itanium, +; since it's capable of running 32-bit code too). + +[Files] +; Install MyProg-x64.exe if running in 64-bit mode (x64; see above), +; MyProg.exe otherwise. +Source: "MyProg-x64.exe"; DestDir: "{app}"; DestName: "MyProg.exe"; Check: Is64BitInstallMode +Source: "MyProg.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" diff --git a/Examples/CodeAutomation.iss b/Examples/CodeAutomation.iss new file mode 100644 index 000000000..09856341b --- /dev/null +++ b/Examples/CodeAutomation.iss @@ -0,0 +1,310 @@ +; -- CodeAutomation.iss -- +; +; This script shows how to use IDispatch based COM Automation objects. + +[Setup] +AppName=My Program +AppVersion=1.5 +CreateAppDir=no +DisableProgramGroupPage=yes +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Code] + +{--- SQLDMO ---} + +const + SQLServerName = 'localhost'; + SQLDMOGrowth_MB = 0; + +procedure SQLDMOButtonOnClick(Sender: TObject); +var + SQLServer, Database, DBFile, LogFile: Variant; + IDColumn, NameColumn, Table: Variant; +begin + if MsgBox('Setup will now connect to Microsoft SQL Server ''' + SQLServerName + ''' via a trusted connection and create a database. Do you want to continue?', mbInformation, mb_YesNo) = idNo then + Exit; + + { Create the main SQLDMO COM Automation object } + + try + SQLServer := CreateOleObject('SQLDMO.SQLServer'); + except + RaiseException('Please install Microsoft SQL server connectivity tools first.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)'); + end; + + { Connect to the Microsoft SQL Server } + + SQLServer.LoginSecure := True; + SQLServer.Connect(SQLServerName); + + MsgBox('Connected to Microsoft SQL Server ''' + SQLServerName + '''.', mbInformation, mb_Ok); + + { Setup a database } + + Database := CreateOleObject('SQLDMO.Database'); + Database.Name := 'Inno Setup'; + + DBFile := CreateOleObject('SQLDMO.DBFile'); + DBFile.Name := 'ISData1'; + DBFile.PhysicalName := 'c:\program files\microsoft sql server\mssql\data\IS.mdf'; + DBFile.PrimaryFile := True; + DBFile.FileGrowthType := SQLDMOGrowth_MB; + DBFile.FileGrowth := 1; + + Database.FileGroups.Item('PRIMARY').DBFiles.Add(DBFile); + + LogFile := CreateOleObject('SQLDMO.LogFile'); + LogFile.Name := 'ISLog1'; + LogFile.PhysicalName := 'c:\program files\microsoft sql server\mssql\data\IS.ldf'; + + Database.TransactionLog.LogFiles.Add(LogFile); + + { Add the database } + + SQLServer.Databases.Add(Database); + + MsgBox('Added database ''' + Database.Name + '''.', mbInformation, mb_Ok); + + { Setup some columns } + + IDColumn := CreateOleObject('SQLDMO.Column'); + IDColumn.Name := 'id'; + IDColumn.Datatype := 'int'; + IDColumn.Identity := True; + IDColumn.IdentityIncrement := 1; + IDColumn.IdentitySeed := 1; + IDColumn.AllowNulls := False; + + NameColumn := CreateOleObject('SQLDMO.Column'); + NameColumn.Name := 'name'; + NameColumn.Datatype := 'varchar'; + NameColumn.Length := '64'; + NameColumn.AllowNulls := False; + + { Setup a table } + + Table := CreateOleObject('SQLDMO.Table'); + Table.Name := 'authors'; + Table.FileGroup := 'PRIMARY'; + + { Add the columns and the table } + + Table.Columns.Add(IDColumn); + Table.Columns.Add(NameColumn); + + Database.Tables.Add(Table); + + MsgBox('Added table ''' + Table.Name + '''.', mbInformation, mb_Ok); +end; + +{--- IIS ---} + +const + IISServerName = 'localhost'; + IISServerNumber = '1'; + IISURL = 'http://127.0.0.1'; + +procedure IISButtonOnClick(Sender: TObject); +var + IIS, WebSite, WebServer, WebRoot, VDir: Variant; + ErrorCode: Integer; +begin + if MsgBox('Setup will now connect to Microsoft IIS Server ''' + IISServerName + ''' and create a virtual directory. Do you want to continue?', mbInformation, mb_YesNo) = idNo then + Exit; + + { Create the main IIS COM Automation object } + + try + IIS := CreateOleObject('IISNamespace'); + except + RaiseException('Please install Microsoft IIS first.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)'); + end; + + { Connect to the IIS server } + + WebSite := IIS.GetObject('IIsWebService', IISServerName + '/w3svc'); + WebServer := WebSite.GetObject('IIsWebServer', IISServerNumber); + WebRoot := WebServer.GetObject('IIsWebVirtualDir', 'Root'); + + { (Re)create a virtual dir } + + try + WebRoot.Delete('IIsWebVirtualDir', 'innosetup'); + WebRoot.SetInfo(); + except + end; + + VDir := WebRoot.Create('IIsWebVirtualDir', 'innosetup'); + VDir.AccessRead := True; + VDir.AppFriendlyName := 'Inno Setup'; + VDir.Path := 'C:\inetpub\innosetup'; + VDir.AppCreate(True); + VDir.SetInfo(); + + MsgBox('Created virtual directory ''' + VDir.Path + '''.', mbInformation, mb_Ok); + + { Write some html and display it } + + if MsgBox('Setup will now write some HTML and display the virtual directory. Do you want to continue?', mbInformation, mb_YesNo) = idNo then + Exit; + + ForceDirectories(VDir.Path); + SaveStringToFile(VDir.Path + '/index.htm', 'Inno Setup rocks!', False); + if not ShellExecAsOriginalUser('open', IISURL + '/innosetup/index.htm', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode) then + MsgBox('Can''t display the created virtual directory: ''' + SysErrorMessage(ErrorCode) + '''.', mbError, mb_Ok); +end; + +{--- MSXML ---} + +const + XMLURL = 'http://cvs.jrsoftware.org/view/*checkout*/ishelp/isxfunc.xml'; + XMLFileName = 'isxfunc.xml'; + XMLFileName2 = 'isxfuncmodified.xml'; + +procedure MSXMLButtonOnClick(Sender: TObject); +var + XMLHTTP, XMLDoc, NewNode, RootNode: Variant; + Path: String; +begin + if MsgBox('Setup will now use MSXML to download XML file ''' + XMLURL + ''' and save it to disk.'#13#13'Setup will then load, modify and save this XML file. Do you want to continue?', mbInformation, mb_YesNo) = idNo then + Exit; + + { Create the main MSXML COM Automation object } + + try + XMLHTTP := CreateOleObject('MSXML2.ServerXMLHTTP'); + except + RaiseException('Please install MSXML first.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)'); + end; + + { Download the XML file } + + XMLHTTP.Open('GET', XMLURL, False); + XMLHTTP.Send(); + + Path := ExpandConstant('{src}\'); + XMLHTTP.responseXML.Save(Path + XMLFileName); + + MsgBox('Downloaded the XML file and saved it as ''' + XMLFileName + '''.', mbInformation, mb_Ok); + + { Load the XML File } + + XMLDoc := CreateOleObject('MSXML2.DOMDocument'); + XMLDoc.async := False; + XMLDoc.resolveExternals := False; + XMLDoc.load(Path + XMLFileName); + if XMLDoc.parseError.errorCode <> 0 then + RaiseException('Error on line ' + IntToStr(XMLDoc.parseError.line) + ', position ' + IntToStr(XMLDoc.parseError.linepos) + ': ' + XMLDoc.parseError.reason); + + MsgBox('Loaded the XML file.', mbInformation, mb_Ok); + + { Modify the XML document } + + NewNode := XMLDoc.createElement('isxdemo'); + RootNode := XMLDoc.documentElement; + RootNode.appendChild(NewNode); + RootNode.lastChild.text := 'Hello, World'; + + { Save the XML document } + + XMLDoc.Save(Path + XMLFileName2); + + MsgBox('Saved the modified XML as ''' + XMLFileName2 + '''.', mbInformation, mb_Ok); +end; + + +{--- Word ---} + +procedure WordButtonOnClick(Sender: TObject); +var + Word: Variant; +begin + if MsgBox('Setup will now check whether Microsoft Word is running. Do you want to continue?', mbInformation, mb_YesNo) = idNo then + Exit; + + { Try to get an active Word COM Automation object } + + try + Word := GetActiveOleObject('Word.Application'); + except + end; + + if VarIsEmpty(Word) then + MsgBox('Microsoft Word is not running.', mbInformation, mb_Ok) + else + MsgBox('Microsoft Word is running.', mbInformation, mb_Ok) +end; + +{--- Windows Firewall ---} + +const + NET_FW_IP_VERSION_ANY = 2; + NET_FW_SCOPE_ALL = 0; + +procedure FirewallButtonOnClick(Sender: TObject); +var + Firewall, Application: Variant; +begin + if MsgBox('Setup will now add itself to Windows Firewall as an authorized application for the current profile (' + GetUserNameString + '). Do you want to continue?', mbInformation, mb_YesNo) = idNo then + Exit; + + { Create the main Windows Firewall COM Automation object } + + try + Firewall := CreateOleObject('HNetCfg.FwMgr'); + except + RaiseException('Please install Windows Firewall first.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)'); + end; + + { Add the authorization } + + Application := CreateOleObject('HNetCfg.FwAuthorizedApplication'); + Application.Name := 'Setup'; + Application.IPVersion := NET_FW_IP_VERSION_ANY; + Application.ProcessImageFileName := ExpandConstant('{srcexe}'); + Application.Scope := NET_FW_SCOPE_ALL; + Application.Enabled := True; + + Firewall.LocalPolicy.CurrentProfile.AuthorizedApplications.Add(Application); + + MsgBox('Setup is now an authorized application for the current profile', 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, LeftInc, Top, TopInc: Integer; +begin + Left := WizardForm.WelcomeLabel2.Left; + LeftInc := WizardForm.CancelButton.Width + ScaleX(8); + TopInc := WizardForm.CancelButton.Height + ScaleY(8); + Top := WizardForm.WelcomeLabel2.Top + WizardForm.WelcomeLabel2.Height - 4*TopInc; + + CreateButton(Left, Top, '&SQLDMO...', @SQLDMOButtonOnClick); + CreateButton(Left + LeftInc, Top, '&Firewall...', @FirewallButtonOnClick); + Top := Top + TopInc; + CreateButton(Left, Top, '&IIS...', @IISButtonOnClick); + Top := Top + TopInc; + CreateButton(Left, Top, '&MSXML...', @MSXMLButtonOnClick); + Top := Top + TopInc; + CreateButton(Left, Top, '&Word...', @WordButtonOnClick); +end; + + diff --git a/Examples/CodeAutomation2.iss b/Examples/CodeAutomation2.iss new file mode 100644 index 000000000..c6f87005f --- /dev/null +++ b/Examples/CodeAutomation2.iss @@ -0,0 +1,298 @@ +; -- CodeAutomation2.iss -- +; +; This script shows how to use IUnknown based COM Automation objects. +; +; REQUIRES UNICODE INNO SETUP! +; +; Note: some unneeded interface functions which had special types have been replaced +; by dummies to avoid having to define those types. Do not remove these dummies as +; that would change the function indices which is bad. Also, not all function +; protoypes have been tested, only those used by this example. + +[Setup] +AppName=My Program +AppVersion=1.5 +CreateAppDir=no +DisableProgramGroupPage=yes +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Code] + +{--- IShellLink ---} + +const + CLSID_ShellLink = '{00021401-0000-0000-C000-000000000046}'; + +type + IShellLinkW = interface(IUnknown) + '{000214F9-0000-0000-C000-000000000046}' + procedure Dummy; + procedure Dummy2; + procedure Dummy3; + function GetDescription(pszName: String; cchMaxName: Integer): HResult; + function SetDescription(pszName: String): HResult; + function GetWorkingDirectory(pszDir: String; cchMaxPath: Integer): HResult; + function SetWorkingDirectory(pszDir: String): HResult; + function GetArguments(pszArgs: String; cchMaxPath: Integer): HResult; + function SetArguments(pszArgs: String): HResult; + function GetHotkey(var pwHotkey: Word): HResult; + function SetHotkey(wHotkey: Word): HResult; + function GetShowCmd(out piShowCmd: Integer): HResult; + function SetShowCmd(iShowCmd: Integer): HResult; + function GetIconLocation(pszIconPath: String; cchIconPath: Integer; + out piIcon: Integer): HResult; + function SetIconLocation(pszIconPath: String; iIcon: Integer): HResult; + function SetRelativePath(pszPathRel: String; dwReserved: DWORD): HResult; + function Resolve(Wnd: HWND; fFlags: DWORD): HResult; + function SetPath(pszFile: String): HResult; + end; + + IPersist = interface(IUnknown) + '{0000010C-0000-0000-C000-000000000046}' + function GetClassID(var classID: TGUID): HResult; + end; + + IPersistFile = interface(IPersist) + '{0000010B-0000-0000-C000-000000000046}' + function IsDirty: HResult; + function Load(pszFileName: String; dwMode: Longint): HResult; + function Save(pszFileName: String; fRemember: BOOL): HResult; + function SaveCompleted(pszFileName: String): HResult; + function GetCurFile(out pszFileName: String): HResult; + end; + +procedure IShellLinkButtonOnClick(Sender: TObject); +var + Obj: IUnknown; + SL: IShellLinkW; + PF: IPersistFile; +begin + { Create the main ShellLink COM Automation object } + Obj := CreateComObject(StringToGuid(CLSID_ShellLink)); + + { Set the shortcut properties } + SL := IShellLinkW(Obj); + OleCheck(SL.SetPath(ExpandConstant('{srcexe}'))); + OleCheck(SL.SetArguments('')); + OleCheck(SL.SetShowCmd(SW_SHOWNORMAL)); + + { Save the shortcut } + PF := IPersistFile(Obj); + OleCheck(PF.Save(ExpandConstant('{commondesktop}\CodeAutomation2 Test.lnk'), True)); + + MsgBox('Saved a shortcut named ''CodeAutomation2 Test'' on the common desktop.', mbInformation, mb_Ok); +end; + +{--- ITaskScheduler ---} + +const + CLSID_TaskScheduler = '{148BD52A-A2AB-11CE-B11F-00AA00530503}'; + CLSID_Task = '{148BD520-A2AB-11CE-B11F-00AA00530503}'; + IID_Task = '{148BD524-A2AB-11CE-B11F-00AA00530503}'; + TASK_TIME_TRIGGER_DAILY = 1; + +type + ITaskScheduler = interface(IUnknown) + '{148BD527-A2AB-11CE-B11F-00AA00530503}' + function SetTargetComputer(pwszComputer: String): HResult; + function GetTargetComputer(out ppwszComputer: String): HResult; + procedure Dummy; + function Activate(pwszName: String; var riid: TGUID; out ppUnk: IUnknown): HResult; + function Delete(pwszName: String): HResult; + function NewWorkItem(pwszTaskName: String; var rclsid: TGUID; var riid: TGUID; out ppUnk: IUnknown): HResult; + procedure Dummy2; + function IsOfType(pwszName: String; var riid: TGUID): HResult; + end; + + TDaily = record + DaysInterval: WORD; + end; + + TWeekly = record + WeeksInterval: WORD; + rgfDaysOfTheWeek: WORD; + end; + + TMonthyDate = record + rgfDays: DWORD; + rgfMonths: WORD; + end; + + TMonthlyDow = record + wWhichWeek: WORD; + rgfDaysOfTheWeek: WORD; + rgfMonths: WORD; + end; + + { ROPS doesn't support unions, replace this with the type you need and adjust padding (end size has to be 48). } + TTriggerTypeUnion = record + Daily: TDaily; + Pad1: WORD; + Pad2: WORD; + Pad3: WORD; + end; + + TTaskTrigger = record + cbTriggerSize: WORD; + Reserved1: WORD; + wBeginYear: WORD; + wBeginMonth: WORD; + wBeginDay: WORD; + wEndYear: WORD; + wEndMonth: WORD; + wEndDay: WORD; + wStartHour: WORD; + wStartMinute: WORD; + MinutesDuration: DWORD; + MinutesInterval: DWORD; + rgFlags: DWORD; + TriggerType: DWORD; + Type_: TTriggerTypeUnion; + Reserved2: WORD; + wRandomMinutesInterval: WORD; + end; + + ITaskTrigger = interface(IUnknown) + '{148BD52B-A2AB-11CE-B11F-00AA00530503}' + function SetTrigger(var pTrigger: TTaskTrigger): HResult; + function GetTrigger(var pTrigger: TTaskTrigger): HResult; + function GetTriggerString(var ppwszTrigger: String): HResult; + end; + + IScheduledWorkItem = interface(IUnknown) + '{A6B952F0-A4B1-11D0-997D-00AA006887EC}' + function CreateTrigger(out piNewTrigger: Word; out ppTrigger: ITaskTrigger): HResult; + function DeleteTrigger(iTrigger: Word): HResult; + function GetTriggerCount(out pwCount: Word): HResult; + function GetTrigger(iTrigger: Word; var ppTrigger: ITaskTrigger): HResult; + function GetTriggerString(iTrigger: Word; out ppwszTrigger: String): HResult; + procedure Dummy; + procedure Dummy2; + function SetIdleWait(wIdleMinutes: Word; wDeadlineMinutes: Word): HResult; + function GetIdleWait(out pwIdleMinutes: Word; out pwDeadlineMinutes: Word): HResult; + function Run: HResult; + function Terminate: HResult; + function EditWorkItem(hParent: HWND; dwReserved: DWORD): HResult; + procedure Dummy3; + function GetStatus(out phrStatus: HResult): HResult; + function GetExitCode(out pdwExitCode: DWORD): HResult; + function SetComment(pwszComment: String): HResult; + function GetComment(out ppwszComment: String): HResult; + function SetCreator(pwszCreator: String): HResult; + function GetCreator(out ppwszCreator: String): HResult; + function SetWorkItemData(cbData: Word; var rgbData: Byte): HResult; + function GetWorkItemData(out pcbData: Word; out prgbData: Byte): HResult; + function SetErrorRetryCount(wRetryCount: Word): HResult; + function GetErrorRetryCount(out pwRetryCount: Word): HResult; + function SetErrorRetryInterval(wRetryInterval: Word): HResult; + function GetErrorRetryInterval(out pwRetryInterval: Word): HResult; + function SetFlags(dwFlags: DWORD): HResult; + function GetFlags(out pdwFlags: DWORD): HResult; + function SetAccountInformation(pwszAccountName: String; pwszPassword: String): HResult; + function GetAccountInformation(out ppwszAccountName: String): HResult; + end; + + ITask = interface(IScheduledWorkItem) + '{148BD524-A2AB-11CE-B11F-00AA00530503}' + function SetApplicationName(pwszApplicationName: String): HResult; + function GetApplicationName(out ppwszApplicationName: String): HResult; + function SetParameters(pwszParameters: String): HResult; + function GetParameters(out ppwszParameters: String): HResult; + function SetWorkingDirectory(pwszWorkingDirectory: String): HResult; + function GetWorkingDirectory(out ppwszWorkingDirectory: String): HResult; + function SetPriority(dwPriority: DWORD): HResult; + function GetPriority(out pdwPriority: DWORD): HResult; + function SetTaskFlags(dwFlags: DWORD): HResult; + function GetTaskFlags(out pdwFlags: DWORD): HResult; + function SetMaxRunTime(dwMaxRunTimeMS: DWORD): HResult; + function GetMaxRunTime(out pdwMaxRunTimeMS: DWORD): HResult; + end; + + +procedure ITaskSchedulerButtonOnClick(Sender: TObject); +var + Obj, Obj2: IUnknown; + TaskScheduler: ITaskScheduler; + G1, G2: TGUID; + Task: ITask; + iNewTrigger: WORD; + TaskTrigger: ITaskTrigger; + TaskTrigger2: TTaskTrigger; + PF: IPersistFile; +begin + { Create the main TaskScheduler COM Automation object } + Obj := CreateComObject(StringToGuid(CLSID_TaskScheduler)); + + { Create the Task COM automation object } + TaskScheduler := ITaskScheduler(Obj); + G1 := StringToGuid(CLSID_Task); + G2 := StringToGuid(IID_Task); + //This will throw an exception if the task already exists + OleCheck(TaskScheduler.NewWorkItem('CodeAutomation2 Test', G1, G2, Obj2)); + + { Set the task properties } + Task := ITask(Obj2); + OleCheck(Task.SetComment('CodeAutomation2 Test Comment')); + OleCheck(Task.SetApplicationName(ExpandConstant('{srcexe}'))); + + { Set the task account information } + //Uncomment the following and provide actual user info to get a runnable task + //OleCheck(Task.SetAccountInformation('username', 'password')); + + { Create the TaskTrigger COM automation object } + OleCheck(Task.CreateTrigger(iNewTrigger, TaskTrigger)); + + { Set the task trigger properties } + with TaskTrigger2 do begin + cbTriggerSize := SizeOf(TaskTrigger2); + wBeginYear := 2009; + wBeginMonth := 10; + wBeginDay := 1; + wStartHour := 12; + TriggerType := TASK_TIME_TRIGGER_DAILY; + Type_.Daily.DaysInterval := 1; + end; + OleCheck(TaskTrigger.SetTrigger(TaskTrigger2)); + + { Save the task } + PF := IPersistFile(Obj2); + OleCheck(PF.Save('', True)); + + MsgBox('Created a daily task named named ''CodeAutomation2 Test''.' + #13#13 + 'Note: Account information not set so the task won''t actually run, uncomment the SetAccountInfo call and provide actual user info to get a runnable task.', 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*3)/2; + Height := WizardForm.CancelButton.Height; + Caption := ACaption; + OnClick := ANotifyEvent; + Parent := WizardForm.WelcomePage; + end; +end; + +procedure InitializeWizard(); +var + Left, LeftInc, Top, TopInc: Integer; +begin + Left := WizardForm.WelcomeLabel2.Left; + LeftInc := (WizardForm.CancelButton.Width*3)/2 + ScaleX(8); + TopInc := WizardForm.CancelButton.Height + ScaleY(8); + Top := WizardForm.WelcomeLabel2.Top + WizardForm.WelcomeLabel2.Height - 4*TopInc; + + CreateButton(Left, Top, '&IShellLink...', @IShellLinkButtonOnClick); + Top := Top + TopInc; + CreateButton(Left, Top, '&ITaskScheduler...', @ITaskSchedulerButtonOnClick); +end; + + + + + diff --git a/Examples/CodeClasses.iss b/Examples/CodeClasses.iss new file mode 100644 index 000000000..e182709a6 --- /dev/null +++ b/Examples/CodeClasses.iss @@ -0,0 +1,364 @@ +; -- CodeClasses.iss -- +; +; This script shows how to use the WizardForm object and the various VCL classes. + +[Setup] +AppName=My Program +AppVersion=1.5 +CreateAppDir=no +DisableProgramGroupPage=yes +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +WindowVisible=yes +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: compiler:WizModernSmallImage.bmp; Flags: dontcopy + +[Code] +procedure ButtonOnClick(Sender: TObject); +begin + MsgBox('You clicked the button!', mbInformation, mb_Ok); +end; + +procedure BitmapImageOnClick(Sender: TObject); +begin + MsgBox('You clicked the image!', mbInformation, mb_Ok); +end; + +procedure FormButtonOnClick(Sender: TObject); +var + Form: TSetupForm; + OKButton, CancelButton: TNewButton; +begin + Form := CreateCustomForm(); + try + Form.ClientWidth := ScaleX(256); + Form.ClientHeight := ScaleY(256); + Form.Caption := 'TSetupForm'; + Form.CenterInsideControl(WizardForm, False); + + OKButton := TNewButton.Create(Form); + OKButton.Parent := Form; + OKButton.Width := ScaleX(75); + OKButton.Height := ScaleY(23); + OKButton.Left := Form.ClientWidth - ScaleX(75 + 6 + 75 + 10); + OKButton.Top := Form.ClientHeight - ScaleY(23 + 10); + OKButton.Caption := 'OK'; + OKButton.ModalResult := mrOk; + + CancelButton := TNewButton.Create(Form); + CancelButton.Parent := Form; + CancelButton.Width := ScaleX(75); + CancelButton.Height := ScaleY(23); + CancelButton.Left := Form.ClientWidth - ScaleX(75 + 10); + CancelButton.Top := Form.ClientHeight - ScaleY(23 + 10); + CancelButton.Caption := 'Cancel'; + CancelButton.ModalResult := mrCancel; + CancelButton.Cancel := True; + + Form.ActiveControl := OKButton; + + if Form.ShowModal() = mrOk then + MsgBox('You clicked OK.', mbInformation, MB_OK); + finally + Form.Free(); + end; +end; + +procedure CreateTheWizardPages; +var + Page: TWizardPage; + Button, FormButton: TNewButton; + Panel: TPanel; + CheckBox: TNewCheckBox; + Edit: TNewEdit; + PasswordEdit: TPasswordEdit; + Memo: TNewMemo; + ComboBox: TNewComboBox; + ListBox: TNewListBox; + StaticText, ProgressBarLabel: TNewStaticText; + ProgressBar, ProgressBar2, ProgressBar3: TNewProgressBar; + CheckListBox, CheckListBox2: TNewCheckListBox; + FolderTreeView: TFolderTreeView; + BitmapImage, BitmapImage2, BitmapImage3: TBitmapImage; + BitmapFileName: String; + RichEditViewer: TRichEditViewer; +begin + { TButton and others } + + Page := CreateCustomPage(wpWelcome, 'Custom wizard page controls', 'TButton and others'); + + Button := TNewButton.Create(Page); + Button.Width := ScaleX(75); + Button.Height := ScaleY(23); + Button.Caption := 'TNewButton'; + Button.OnClick := @ButtonOnClick; + Button.Parent := Page.Surface; + + Panel := TPanel.Create(Page); + Panel.Width := Page.SurfaceWidth div 2 - ScaleX(8); + Panel.Left := Page.SurfaceWidth - Panel.Width; + Panel.Height := Button.Height * 2; + Panel.Caption := 'TPanel'; + Panel.Color := clWindow; + Panel.ParentBackground := False; + Panel.Parent := Page.Surface; + + CheckBox := TNewCheckBox.Create(Page); + CheckBox.Top := Button.Top + Button.Height + ScaleY(8); + CheckBox.Width := Page.SurfaceWidth div 2; + CheckBox.Height := ScaleY(17); + CheckBox.Caption := 'TNewCheckBox'; + CheckBox.Checked := True; + CheckBox.Parent := Page.Surface; + + Edit := TNewEdit.Create(Page); + Edit.Top := CheckBox.Top + CheckBox.Height + ScaleY(8); + Edit.Width := Page.SurfaceWidth div 2 - ScaleX(8); + Edit.Text := 'TNewEdit'; + Edit.Parent := Page.Surface; + + PasswordEdit := TPasswordEdit.Create(Page); + PasswordEdit.Left := Page.SurfaceWidth - Edit.Width; + PasswordEdit.Top := CheckBox.Top + CheckBox.Height + ScaleY(8); + PasswordEdit.Width := Edit.Width; + PasswordEdit.Text := 'TPasswordEdit'; + PasswordEdit.Parent := Page.Surface; + + Memo := TNewMemo.Create(Page); + Memo.Top := Edit.Top + Edit.Height + ScaleY(8); + Memo.Width := Page.SurfaceWidth; + Memo.Height := ScaleY(89); + Memo.ScrollBars := ssVertical; + Memo.Text := 'TNewMemo'; + Memo.Parent := Page.Surface; + + FormButton := TNewButton.Create(Page); + FormButton.Top := Memo.Top + Memo.Height + ScaleY(8); + FormButton.Width := ScaleX(75); + FormButton.Height := ScaleY(23); + FormButton.Caption := 'TSetupForm'; + FormButton.OnClick := @FormButtonOnClick; + FormButton.Parent := Page.Surface; + + { TComboBox and others } + + Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TComboBox and others'); + + ComboBox := TNewComboBox.Create(Page); + ComboBox.Width := Page.SurfaceWidth; + ComboBox.Parent := Page.Surface; + ComboBox.Style := csDropDownList; + ComboBox.Items.Add('TComboBox'); + ComboBox.ItemIndex := 0; + + ListBox := TNewListBox.Create(Page); + ListBox.Top := ComboBox.Top + ComboBox.Height + ScaleY(8); + ListBox.Width := Page.SurfaceWidth; + ListBox.Height := ScaleY(97); + ListBox.Parent := Page.Surface; + ListBox.Items.Add('TListBox'); + ListBox.ItemIndex := 0; + + StaticText := TNewStaticText.Create(Page); + StaticText.Top := ListBox.Top + ListBox.Height + ScaleY(8); + StaticText.Caption := 'TNewStaticText'; + StaticText.AutoSize := True; + StaticText.Parent := Page.Surface; + + ProgressBarLabel := TNewStaticText.Create(Page); + ProgressBarLabel.Top := StaticText.Top + StaticText.Height + ScaleY(8); + ProgressBarLabel.Caption := 'TNewProgressBar'; + ProgressBarLabel.AutoSize := True; + ProgressBarLabel.Parent := Page.Surface; + + ProgressBar := TNewProgressBar.Create(Page); + ProgressBar.Left := ProgressBarLabel.Width + ScaleX(8); + ProgressBar.Top := ProgressBarLabel.Top; + ProgressBar.Width := Page.SurfaceWidth - ProgressBar.Left; + ProgressBar.Height := ProgressBarLabel.Height + ScaleY(8); + ProgressBar.Parent := Page.Surface; + ProgressBar.Position := 25; + + ProgressBar2 := TNewProgressBar.Create(Page); + ProgressBar2.Left := ProgressBarLabel.Width + ScaleX(8); + ProgressBar2.Top := ProgressBar.Top + ProgressBar.Height + ScaleY(4); + ProgressBar2.Width := Page.SurfaceWidth - ProgressBar.Left; + ProgressBar2.Height := ProgressBarLabel.Height + ScaleY(8); + ProgressBar2.Parent := Page.Surface; + ProgressBar2.Position := 50; + { Note: TNewProgressBar.State property only has an effect on Windows Vista and newer } + ProgressBar2.State := npbsError; + + ProgressBar3 := TNewProgressBar.Create(Page); + ProgressBar3.Left := ProgressBarLabel.Width + ScaleX(8); + ProgressBar3.Top := ProgressBar2.Top + ProgressBar2.Height + ScaleY(4); + ProgressBar3.Width := Page.SurfaceWidth - ProgressBar.Left; + ProgressBar3.Height := ProgressBarLabel.Height + ScaleY(8); + ProgressBar3.Parent := Page.Surface; + { Note: TNewProgressBar.Style property only has an effect on Windows XP and newer } + ProgressBar3.Style := npbstMarquee; + + { TNewCheckListBox } + + Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TNewCheckListBox'); + + CheckListBox := TNewCheckListBox.Create(Page); + CheckListBox.Width := Page.SurfaceWidth; + CheckListBox.Height := ScaleY(97); + CheckListBox.Flat := True; + CheckListBox.Parent := Page.Surface; + CheckListBox.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil); + CheckListBox.AddRadioButton('TNewCheckListBox', '', 1, True, True, nil); + CheckListBox.AddRadioButton('TNewCheckListBox', '', 1, False, True, nil); + CheckListBox.AddCheckBox('TNewCheckListBox', '', 0, True, True, False, True, nil); + + CheckListBox2 := TNewCheckListBox.Create(Page); + CheckListBox2.Top := CheckListBox.Top + CheckListBox.Height + ScaleY(8); + CheckListBox2.Width := Page.SurfaceWidth; + CheckListBox2.Height := ScaleY(97); + CheckListBox2.BorderStyle := bsNone; + CheckListBox2.ParentColor := True; + CheckListBox2.MinItemHeight := WizardForm.TasksList.MinItemHeight; + CheckListBox2.ShowLines := False; + CheckListBox2.WantTabs := True; + CheckListBox2.Parent := Page.Surface; + CheckListBox2.AddGroup('TNewCheckListBox', '', 0, nil); + CheckListBox2.AddRadioButton('TNewCheckListBox', '', 0, True, True, nil); + CheckListBox2.AddRadioButton('TNewCheckListBox', '', 0, False, True, nil); + + { TFolderTreeView } + + Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TFolderTreeView'); + + FolderTreeView := TFolderTreeView.Create(Page); + FolderTreeView.Width := Page.SurfaceWidth; + FolderTreeView.Height := Page.SurfaceHeight; + FolderTreeView.Parent := Page.Surface; + FolderTreeView.Directory := ExpandConstant('{src}'); + + { TBitmapImage } + + Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TBitmapImage'); + + BitmapFileName := ExpandConstant('{tmp}\WizModernSmallImage.bmp'); + ExtractTemporaryFile(ExtractFileName(BitmapFileName)); + + BitmapImage := TBitmapImage.Create(Page); + BitmapImage.AutoSize := True; + BitmapImage.Bitmap.LoadFromFile(BitmapFileName); + BitmapImage.Cursor := crHand; + BitmapImage.OnClick := @BitmapImageOnClick; + BitmapImage.Parent := Page.Surface; + + BitmapImage2 := TBitmapImage.Create(Page); + BitmapImage2.BackColor := $400000; + BitmapImage2.Bitmap := BitmapImage.Bitmap; + BitmapImage2.Center := True; + BitmapImage2.Left := BitmapImage.Width + 10; + BitmapImage2.Height := 2*BitmapImage.Height; + BitmapImage2.Width := 2*BitmapImage.Width; + BitmapImage2.Cursor := crHand; + BitmapImage2.OnClick := @BitmapImageOnClick; + BitmapImage2.Parent := Page.Surface; + + BitmapImage3 := TBitmapImage.Create(Page); + BitmapImage3.Bitmap := BitmapImage.Bitmap; + BitmapImage3.Stretch := True; + BitmapImage3.Left := 3*BitmapImage.Width + 20; + BitmapImage3.Height := 4*BitmapImage.Height; + BitmapImage3.Width := 4*BitmapImage.Width; + BitmapImage3.Cursor := crHand; + BitmapImage3.OnClick := @BitmapImageOnClick; + BitmapImage3.Parent := Page.Surface; + + { TRichViewer } + + Page := CreateCustomPage(Page.ID, 'Custom wizard page controls', 'TRichViewer'); + + RichEditViewer := TRichEditViewer.Create(Page); + RichEditViewer.Width := Page.SurfaceWidth; + RichEditViewer.Height := Page.SurfaceHeight; + RichEditViewer.Parent := Page.Surface; + RichEditViewer.ScrollBars := ssVertical; + RichEditViewer.UseRichEdit := True; + RichEditViewer.RTFText := '{\rtf1\ansi\ansicpg1252\deff0\deflang1043{\fonttbl{\f0\fswiss\fcharset0 Arial;}}{\colortbl ;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue128;}\viewkind4\uc1\pard\f0\fs20 T\cf1 Rich\cf2 Edit\cf3 Viewer\cf0\par}'; + RichEditViewer.ReadOnly := True; +end; + +procedure AboutButtonOnClick(Sender: TObject); +begin + MsgBox('This demo shows some features of the various form objects and control classes.', mbInformation, mb_Ok); +end; + +procedure URLLabelOnClick(Sender: TObject); +var + ErrorCode: Integer; +begin + ShellExecAsOriginalUser('open', 'http://www.innosetup.com/', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); +end; + +procedure CreateAboutButtonAndURLLabel(ParentForm: TSetupForm; CancelButton: TNewButton); +var + AboutButton: TNewButton; + URLLabel: TNewStaticText; +begin + AboutButton := TNewButton.Create(ParentForm); + AboutButton.Left := ParentForm.ClientWidth - CancelButton.Left - CancelButton.Width; + AboutButton.Top := CancelButton.Top; + AboutButton.Width := CancelButton.Width; + AboutButton.Height := CancelButton.Height; + AboutButton.Caption := '&About...'; + AboutButton.OnClick := @AboutButtonOnClick; + AboutButton.Parent := ParentForm; + + URLLabel := TNewStaticText.Create(ParentForm); + URLLabel.Caption := 'www.innosetup.com'; + URLLabel.Cursor := crHand; + URLLabel.OnClick := @URLLabelOnClick; + URLLabel.Parent := ParentForm; + { Alter Font *after* setting Parent so the correct defaults are inherited first } + URLLabel.Font.Style := URLLabel.Font.Style + [fsUnderline]; + if GetWindowsVersion >= $040A0000 then { Windows 98 or later? } + URLLabel.Font.Color := clHotLight + else + URLLabel.Font.Color := clBlue; + URLLabel.Top := AboutButton.Top + AboutButton.Height - URLLabel.Height - 2; + URLLabel.Left := AboutButton.Left + AboutButton.Width + ScaleX(20); +end; + +procedure InitializeWizard(); +var + BackgroundBitmapImage: TBitmapImage; + BackgroundBitmapText: TNewStaticText; +begin + { Custom wizard pages } + + CreateTheWizardPages; + + { Custom controls } + + CreateAboutButtonAndURLLabel(WizardForm, WizardForm.CancelButton); + + BackgroundBitmapImage := TBitmapImage.Create(MainForm); + BackgroundBitmapImage.Left := 50; + BackgroundBitmapImage.Top := 90; + BackgroundBitmapImage.AutoSize := True; + BackgroundBitmapImage.Bitmap := WizardForm.WizardBitmapImage.Bitmap; + BackgroundBitmapImage.Parent := MainForm; + + BackgroundBitmapText := TNewStaticText.Create(MainForm); + BackgroundBitmapText.Left := BackgroundBitmapImage.Left; + BackgroundBitmapText.Top := BackgroundBitmapImage.Top + BackgroundBitmapImage.Height + ScaleY(8); + BackgroundBitmapText.Caption := 'TBitmapImage'; + BackgroundBitmapText.Parent := MainForm; +end; + +procedure InitializeUninstallProgressForm(); +begin + { Custom controls } + + CreateAboutButtonAndURLLabel(UninstallProgressForm, UninstallProgressForm.CancelButton); +end; + diff --git a/Examples/CodeDlg.iss b/Examples/CodeDlg.iss new file mode 100644 index 000000000..b9674aba9 --- /dev/null +++ b/Examples/CodeDlg.iss @@ -0,0 +1,204 @@ +; -- CodeDlg.iss -- +; +; This script shows how to insert custom wizard pages into Setup and how to handle +; these pages. Furthermore it shows how to 'communicate' between the [Code] section +; and the regular Inno Setup sections using {code:...} constants. Finally it shows +; how to customize the settings text on the 'Ready To Install' page. + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DisableProgramGroupPage=yes +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; 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: "{code:GetUser|Name}" +Root: HKCU; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "Company"; ValueData: "{code:GetUser|Company}" +Root: HKCU; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "DataDir"; ValueData: "{code:GetDataDir}" +; etc. + +[Dirs] +Name: {code:GetDataDir}; Flags: uninsneveruninstall + +[Code] +var + UserPage: TInputQueryWizardPage; + UsagePage: TInputOptionWizardPage; + LightMsgPage: TOutputMsgWizardPage; + KeyPage: TInputQueryWizardPage; + ProgressPage: TOutputProgressWizardPage; + DataDirPage: TInputDirWizardPage; + +procedure InitializeWizard; +begin + { Create the pages } + + UserPage := CreateInputQueryPage(wpWelcome, + 'Personal Information', 'Who are you?', + 'Please specify your name and the company for whom you work, then click Next.'); + UserPage.Add('Name:', False); + UserPage.Add('Company:', False); + + UsagePage := CreateInputOptionPage(UserPage.ID, + 'Personal Information', 'How will you use My Program?', + 'Please specify how you would like to use My Program, then click Next.', + True, False); + UsagePage.Add('Light mode (no ads, limited functionality)'); + UsagePage.Add('Sponsored mode (with ads, full functionality)'); + UsagePage.Add('Paid mode (no ads, full functionality)'); + + LightMsgPage := CreateOutputMsgPage(UsagePage.ID, + 'Personal Information', 'How will you use My Program?', + 'Note: to enjoy all features My Program can offer and to support its development, ' + + 'you can switch to sponsored or paid mode at any time by selecting ''Usage Mode'' ' + + 'in the ''Help'' menu of My Program after the installation has completed.'#13#13 + + 'Click Back if you want to change your usage mode setting now, or click Next to ' + + 'continue with the installation.'); + + KeyPage := CreateInputQueryPage(UsagePage.ID, + 'Personal Information', 'What''s your registration key?', + 'Please specify your registration key and click Next to continue. If you don''t ' + + 'have a valid registration key, click Back to choose a different usage mode.'); + KeyPage.Add('Registration key:', False); + + ProgressPage := CreateOutputProgressPage('Personal Information', + 'What''s your registration key?'); + + 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(''); + + { Set default values, using settings that were stored last time if possible } + + UserPage.Values[0] := GetPreviousData('Name', ExpandConstant('{sysuserinfoname}')); + UserPage.Values[1] := GetPreviousData('Company', ExpandConstant('{sysuserinfoorg}')); + + case GetPreviousData('UsageMode', '') of + 'light': UsagePage.SelectedValueIndex := 0; + 'sponsored': UsagePage.SelectedValueIndex := 1; + 'paid': UsagePage.SelectedValueIndex := 2; + else + UsagePage.SelectedValueIndex := 1; + end; + + DataDirPage.Values[0] := GetPreviousData('DataDir', ''); +end; + +procedure RegisterPreviousData(PreviousDataKey: Integer); +var + UsageMode: String; +begin + { Store the settings so we can restore them next time } + SetPreviousData(PreviousDataKey, 'Name', UserPage.Values[0]); + SetPreviousData(PreviousDataKey, 'Company', UserPage.Values[1]); + case UsagePage.SelectedValueIndex of + 0: UsageMode := 'light'; + 1: UsageMode := 'sponsored'; + 2: UsageMode := 'paid'; + end; + SetPreviousData(PreviousDataKey, 'UsageMode', UsageMode); + SetPreviousData(PreviousDataKey, 'DataDir', DataDirPage.Values[0]); +end; + +function ShouldSkipPage(PageID: Integer): Boolean; +begin + { Skip pages that shouldn't be shown } + if (PageID = LightMsgPage.ID) and (UsagePage.SelectedValueIndex <> 0) then + Result := True + else if (PageID = KeyPage.ID) and (UsagePage.SelectedValueIndex <> 2) then + Result := True + else + Result := False; +end; + +function NextButtonClick(CurPageID: Integer): Boolean; +var + I: Integer; +begin + { Validate certain pages before allowing the user to proceed } + if CurPageID = UserPage.ID then begin + if UserPage.Values[0] = '' then begin + MsgBox('You must enter your name.', mbError, MB_OK); + Result := False; + end else begin + if DataDirPage.Values[0] = '' then + DataDirPage.Values[0] := 'C:\' + UserPage.Values[0]; + Result := True; + end; + end else if CurPageID = KeyPage.ID then begin + { Just to show how 'OutputProgress' pages work. + Always use a try..finally between the Show and Hide calls as shown below. } + ProgressPage.SetText('Authorizing registration key...', ''); + ProgressPage.SetProgress(0, 0); + ProgressPage.Show; + try + for I := 0 to 10 do begin + ProgressPage.SetProgress(I, 10); + Sleep(100); + end; + finally + ProgressPage.Hide; + end; + if KeyPage.Values[0] = 'inno' then + Result := True + else begin + MsgBox('You must enter a valid registration key. (Hint: The key is "inno".)', mbError, MB_OK); + Result := False; + end; + end else + 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 + 'Personal Information:' + NewLine; + S := S + Space + UserPage.Values[0] + NewLine; + if UserPage.Values[1] <> '' then + S := S + Space + UserPage.Values[1] + NewLine; + S := S + NewLine; + + S := S + 'Usage Mode:' + NewLine + Space; + case UsagePage.SelectedValueIndex of + 0: S := S + 'Light mode'; + 1: S := S + 'Sponsored mode'; + 2: S := S + 'Paid mode'; + end; + S := S + NewLine + NewLine; + + S := S + MemoDirInfo + NewLine; + S := S + Space + DataDirPage.Values[0] + ' (personal data files)' + NewLine; + + Result := S; +end; + +function GetUser(Param: String): String; +begin + { Return a user value } + { Could also be split into separate GetUserName and GetUserCompany functions } + if Param = 'Name' then + Result := UserPage.Values[0] + else if Param = 'Company' then + Result := UserPage.Values[1]; +end; + +function GetDataDir(Param: String): String; +begin + { Return the selected DataDir } + Result := DataDirPage.Values[0]; +end; diff --git a/Examples/CodeDll.iss b/Examples/CodeDll.iss new file mode 100644 index 000000000..979287b12 --- /dev/null +++ b/Examples/CodeDll.iss @@ -0,0 +1,72 @@ +; -- CodeDll.iss -- +; +; This script shows how to call DLL functions at runtime from a [Code] section. + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DisableProgramGroupPage=yes +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme +; Install our DLL to {app} so we can access it at uninstall time +; Use "Flags: dontcopy" if you don't need uninstall time access +Source: "MyDll.dll"; DestDir: "{app}" + +[Code] +const + MB_ICONINFORMATION = $40; + +//importing a Windows API function +function MessageBox(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal): Integer; +external 'MessageBoxA@user32.dll stdcall'; + +//importing a custom DLL function, first for Setup, then for uninstall +procedure MyDllFuncSetup(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal); +external 'MyDllFunc@files:MyDll.dll stdcall setuponly'; + +procedure MyDllFuncUninstall(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal); +external 'MyDllFunc@{app}\MyDll.dll stdcall uninstallonly'; + +//importing a function for a DLL which might not exist at runtime +procedure DelayLoadedFunc(hWnd: Integer; lpText, lpCaption: AnsiString; uType: Cardinal); +external 'DllFunc@DllWhichMightNotExist.dll stdcall delayload'; + +function NextButtonClick(CurPage: Integer): Boolean; +var + hWnd: Integer; +begin + if CurPage = wpWelcome then begin + hWnd := StrToInt(ExpandConstant('{wizardhwnd}')); + + MessageBox(hWnd, 'Hello from Windows API function', 'MessageBoxA', MB_OK or MB_ICONINFORMATION); + + MyDllFuncSetup(hWnd, 'Hello from custom DLL function', 'MyDllFunc', MB_OK or MB_ICONINFORMATION); + + try + //if this DLL does not exist (it shouldn't), an exception will be raised + DelayLoadedFunc(hWnd, 'Hello from delay loaded function', 'DllFunc', MB_OK or MB_ICONINFORMATION); + except + //handle missing dll here + end; + end; + Result := True; +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + // Call our function just before the actual uninstall process begins + if CurUninstallStep = usUninstall then + begin + MyDllFuncUninstall(0, 'Hello from custom DLL function', 'MyDllFunc', MB_OK or MB_ICONINFORMATION); + + // Now that we're finished with it, unload MyDll.dll from memory. + // We have to do this so that the uninstaller will be able to remove the DLL and the {app} directory. + UnloadDLL(ExpandConstant('{app}\MyDll.dll')); + end; +end; diff --git a/Examples/CodeExample1.iss b/Examples/CodeExample1.iss new file mode 100644 index 000000000..edbeb1e02 --- /dev/null +++ b/Examples/CodeExample1.iss @@ -0,0 +1,149 @@ +; -- CodeExample1.iss -- +; +; This script shows various things you can achieve using a [Code] section + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={code:MyConst}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +InfoBeforeFile=Readme.txt +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}"; Check: MyProgCheck; BeforeInstall: BeforeMyProgInstall('MyProg.exe'); AfterInstall: AfterMyProgInstall('MyProg.exe') +Source: "MyProg.chm"; DestDir: "{app}"; Check: MyProgCheck; BeforeInstall: BeforeMyProgInstall('MyProg.chm'); AfterInstall: AfterMyProgInstall('MyProg.chm') +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" + +[Code] +var + MyProgChecked: Boolean; + MyProgCheckResult: Boolean; + FinishedInstall: Boolean; + +function InitializeSetup(): Boolean; +begin + Log('InitializeSetup called'); + Result := MsgBox('InitializeSetup:' #13#13 'Setup is initializing. Do you really want to start setup?', mbConfirmation, MB_YESNO) = idYes; + if Result = False then + MsgBox('InitializeSetup:' #13#13 'Ok, bye bye.', mbInformation, MB_OK); +end; + +procedure DeinitializeSetup(); +var + FileName: String; + ResultCode: Integer; +begin + Log('DeinitializeSetup called'); + if FinishedInstall then begin + if MsgBox('DeinitializeSetup:' #13#13 'The [Code] scripting demo has finished. Do you want to uninstall My Program now?', mbConfirmation, MB_YESNO) = idYes then begin + FileName := ExpandConstant('{uninstallexe}'); + if not Exec(FileName, '', '', SW_SHOWNORMAL, ewNoWait, ResultCode) then + MsgBox('DeinitializeSetup:' #13#13 'Execution of ''' + FileName + ''' failed. ' + SysErrorMessage(ResultCode) + '.', mbError, MB_OK); + end else + MsgBox('DeinitializeSetup:' #13#13 'Ok, bye bye.', mbInformation, MB_OK); + end; +end; + +procedure CurStepChanged(CurStep: TSetupStep); +begin + Log('CurStepChanged(' + IntToStr(Ord(CurStep)) + ') called'); + if CurStep = ssPostInstall then + FinishedInstall := True; +end; + +function NextButtonClick(CurPageID: Integer): Boolean; +var + ResultCode: Integer; +begin + Log('NextButtonClick(' + IntToStr(CurPageID) + ') called'); + case CurPageID of + wpSelectDir: + MsgBox('NextButtonClick:' #13#13 'You selected: ''' + WizardDirValue + '''.', mbInformation, MB_OK); + wpSelectProgramGroup: + MsgBox('NextButtonClick:' #13#13 'You selected: ''' + WizardGroupValue + '''.', mbInformation, MB_OK); + wpReady: + begin + if MsgBox('NextButtonClick:' #13#13 'Using the script, files can be extracted before the installation starts. For example we could extract ''MyProg.exe'' now and run it.' #13#13 'Do you want to do this?', mbConfirmation, MB_YESNO) = idYes then begin + ExtractTemporaryFile('myprog.exe'); + if not Exec(ExpandConstant('{tmp}\myprog.exe'), '', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode) then + MsgBox('NextButtonClick:' #13#13 'The file could not be executed. ' + SysErrorMessage(ResultCode) + '.', mbError, MB_OK); + end; + BringToFrontAndRestore(); + MsgBox('NextButtonClick:' #13#13 'The normal installation will now start.', mbInformation, MB_OK); + end; + end; + + Result := True; +end; + +function BackButtonClick(CurPageID: Integer): Boolean; +begin + Log('BackButtonClick(' + IntToStr(CurPageID) + ') called'); + Result := True; +end; + +function ShouldSkipPage(PageID: Integer): Boolean; +begin + Log('ShouldSkipPage(' + IntToStr(PageID) + ') called'); + { Skip wpInfoBefore page; show all others } + case PageID of + wpInfoBefore: + Result := True; + else + Result := False; + end; +end; + +procedure CurPageChanged(CurPageID: Integer); +begin + Log('CurPageChanged(' + IntToStr(CurPageID) + ') called'); + case CurPageID of + wpWelcome: + MsgBox('CurPageChanged:' #13#13 'Welcome to the [Code] scripting demo. This demo will show you some possibilities of the scripting support.' #13#13 'The scripting engine used is RemObjects Pascal Script by Carlo Kok. See http://www.remobjects.com/ps for more information.', mbInformation, MB_OK); + wpFinished: + MsgBox('CurPageChanged:' #13#13 'Welcome to final page of this demo. Click Finish to exit.', mbInformation, MB_OK); + end; +end; + +function PrepareToInstall(var NeedsRestart: Boolean): String; +begin + Log('PrepareToInstall() called'); + if MsgBox('PrepareToInstall:' #13#13 'Setup is preparing to install. Using the script you can install any prerequisites, abort Setup on errors, and request restarts. Do you want to return an error now?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = idYes then + Result := '.' + else + Result := ''; +end; + +function MyProgCheck(): Boolean; +begin + Log('MyProgCheck() called'); + if not MyProgChecked then begin + MyProgCheckResult := MsgBox('MyProgCheck:' #13#13 'Using the script you can decide at runtime to include or exclude files from the installation. Do you want to install MyProg.exe and MyProg.chm to ' + ExtractFilePath(CurrentFileName) + '?', mbConfirmation, MB_YESNO) = idYes; + MyProgChecked := True; + end; + Result := MyProgCheckResult; +end; + +procedure BeforeMyProgInstall(S: String); +begin + Log('BeforeMyProgInstall(''' + S + ''') called'); + MsgBox('BeforeMyProgInstall:' #13#13 'Setup is now going to install ' + S + ' as ' + CurrentFileName + '.', mbInformation, MB_OK); +end; + +procedure AfterMyProgInstall(S: String); +begin + Log('AfterMyProgInstall(''' + S + ''') called'); + MsgBox('AfterMyProgInstall:' #13#13 'Setup just installed ' + S + ' as ' + CurrentFileName + '.', mbInformation, MB_OK); +end; + +function MyConst(Param: String): String; +begin + Log('MyConst(''' + Param + ''') called'); + Result := ExpandConstant('{pf}'); +end; + diff --git a/Examples/CodePrepareToInstall.iss b/Examples/CodePrepareToInstall.iss new file mode 100644 index 000000000..3007c919f --- /dev/null +++ b/Examples/CodePrepareToInstall.iss @@ -0,0 +1,117 @@ +; -- CodePrepareToInstall.iss -- +; +; This script shows how the PrepareToInstall event function can be used to +; install prerequisites and handle any reboots in between, while remembering +; user selections across reboots. + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}"; +Source: "MyProg.chm"; DestDir: "{app}"; +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme; + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" + +[Code] +const + (*** Customize the following to your own name. ***) + RunOnceName = 'My Program Setup restart'; + + QuitMessageReboot = 'The installation of a prerequisite program was not completed. You will need to restart your computer to complete that installation.'#13#13'After restarting your computer, Setup will continue next time an administrator logs in.'; + QuitMessageError = 'Error. Cannot continue.'; + +var + Restarted: Boolean; + +function InitializeSetup(): Boolean; +begin + Restarted := ExpandConstant('{param:restart|0}') = '1'; + + if not Restarted then begin + Result := not RegValueExists(HKLM, 'Software\Microsoft\Windows\CurrentVersion\RunOnce', RunOnceName); + if not Result then + MsgBox(QuitMessageReboot, mbError, mb_Ok); + end else + Result := True; +end; + +function DetectAndInstallPrerequisites: Boolean; +begin + (*** Place your prerequisite detection and installation code below. ***) + (*** Return False if missing prerequisites were detected but their installation failed, else return True. ***) + + // + + Result := True; + + (*** Remove the following block! Used by this demo to simulate a prerequisite install requiring a reboot. ***) + if not Restarted then + RestartReplace(ParamStr(0), ''); +end; + +function Quote(const S: String): String; +begin + Result := '"' + S + '"'; +end; + +function AddParam(const S, P, V: String): String; +begin + if V <> '""' then + Result := S + ' /' + P + '=' + V; +end; + +function AddSimpleParam(const S, P: String): String; +begin + Result := S + ' /' + P; +end; + +procedure CreateRunOnceEntry; +var + RunOnceData: String; +begin + RunOnceData := Quote(ExpandConstant('{srcexe}')) + ' /restart=1'; + RunOnceData := AddParam(RunOnceData, 'LANG', ExpandConstant('{language}')); + RunOnceData := AddParam(RunOnceData, 'DIR', Quote(WizardDirValue)); + RunOnceData := AddParam(RunOnceData, 'GROUP', Quote(WizardGroupValue)); + if WizardNoIcons then + RunOnceData := AddSimpleParam(RunOnceData, 'NOICONS'); + RunOnceData := AddParam(RunOnceData, 'TYPE', Quote(WizardSetupType(False))); + RunOnceData := AddParam(RunOnceData, 'COMPONENTS', Quote(WizardSelectedComponents(False))); + RunOnceData := AddParam(RunOnceData, 'TASKS', Quote(WizardSelectedTasks(False))); + + (*** Place any custom user selection you want to remember below. ***) + + // + + RegWriteStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\RunOnce', RunOnceName, RunOnceData); +end; + +function PrepareToInstall(var NeedsRestart: Boolean): String; +var + ChecksumBefore, ChecksumAfter: String; +begin + ChecksumBefore := MakePendingFileRenameOperationsChecksum; + if DetectAndInstallPrerequisites then begin + ChecksumAfter := MakePendingFileRenameOperationsChecksum; + if ChecksumBefore <> ChecksumAfter then begin + CreateRunOnceEntry; + NeedsRestart := True; + Result := QuitMessageReboot; + end; + end else + Result := QuitMessageError; +end; + +function ShouldSkipPage(PageID: Integer): Boolean; +begin + Result := Restarted; +end; + diff --git a/Examples/Components.iss b/Examples/Components.iss new file mode 100644 index 000000000..5d4276ddd --- /dev/null +++ b/Examples/Components.iss @@ -0,0 +1,33 @@ +; -- Components.iss -- +; Demonstrates a components-based installation. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Types] +Name: "full"; Description: "Full installation" +Name: "compact"; Description: "Compact installation" +Name: "custom"; Description: "Custom installation"; Flags: iscustom + +[Components] +Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed +Name: "help"; Description: "Help File"; Types: full +Name: "readme"; Description: "Readme File"; Types: full +Name: "readme\en"; Description: "English"; Flags: exclusive +Name: "readme\de"; Description: "German"; Flags: exclusive + +[Files] +Source: "MyProg.exe"; DestDir: "{app}"; Components: program +Source: "MyProg.chm"; DestDir: "{app}"; Components: help +Source: "Readme.txt"; DestDir: "{app}"; Components: readme\en; Flags: isreadme +Source: "Readme-German.txt"; DestName: "Liesmich.txt"; DestDir: "{app}"; Components: readme\de; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" diff --git a/Examples/Example1.iss b/Examples/Example1.iss new file mode 100644 index 000000000..1d1a392a0 --- /dev/null +++ b/Examples/Example1.iss @@ -0,0 +1,22 @@ +; -- Example1.iss -- +; Demonstrates copying 3 files and creating an icon. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" diff --git a/Examples/Example2.iss b/Examples/Example2.iss new file mode 100644 index 000000000..c3f3a6bfe --- /dev/null +++ b/Examples/Example2.iss @@ -0,0 +1,24 @@ +; -- Example2.iss -- +; Same as Example1.iss, but creates its icon in the Programs folder of the +; Start Menu instead of in a subfolder, and also creates a desktop icon. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +; Since no icons will be created in "{group}", we don't need the wizard +; to ask for a Start Menu folder name: +DisableProgramGroupPage=yes +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{commonprograms}\My Program"; Filename: "{app}\MyProg.exe" +Name: "{commondesktop}\My Program"; Filename: "{app}\MyProg.exe" diff --git a/Examples/Example3.iss b/Examples/Example3.iss new file mode 100644 index 000000000..40962c695 --- /dev/null +++ b/Examples/Example3.iss @@ -0,0 +1,35 @@ +; -- Example3.iss -- +; Same as Example1.iss, but creates some registry entries too. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Icons] +Name: "{group}\My Program"; Filename: "{app}\MyProg.exe" + +; NOTE: Most apps do not need registry entries to be pre-created. If you +; don't know what the registry is or if you need to use it, then chances are +; you don't need a [Registry] section. + +[Registry] +; Start "Software\My Company\My Program" keys under HKEY_CURRENT_USER +; and HKEY_LOCAL_MACHINE. The flags tell it to always delete the +; "My Program" keys upon uninstall, and delete the "My Company" keys +; if there is nothing left in them. +Root: HKCU; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty +Root: HKCU; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey +Root: HKLM; Subkey: "Software\My Company"; Flags: uninsdeletekeyifempty +Root: HKLM; Subkey: "Software\My Company\My Program"; Flags: uninsdeletekey +Root: HKLM; Subkey: "Software\My Company\My Program\Settings"; ValueType: string; ValueName: "Path"; ValueData: "{app}" diff --git a/Examples/ISPPExample1.iss b/Examples/ISPPExample1.iss new file mode 100644 index 000000000..cb3e7b4e7 --- /dev/null +++ b/Examples/ISPPExample1.iss @@ -0,0 +1,44 @@ +; -- ISPPExample1.iss -- +; +; This script shows various basic things you can achieve using Inno Setup Preprocessor (ISPP). +; To enable commented #define's, either remove the ';' or use ISCC with the /D switch. + +#pragma option -v+ +#pragma verboselevel 9 + +;#define Debug + +;#define AppEnterprise + +#ifdef AppEnterprise + #define AppName "My Program Enterprise Edition" +#else + #define AppName "My Program" +#endif + +#define AppVersion GetFileVersion(AddBackslash(SourcePath) + "MyProg.exe") + +[Setup] +AppName={#AppName} +AppVersion={#AppVersion} +DefaultDirName={pf}\{#AppName} +DefaultGroupName={#AppName} +UninstallDisplayIcon={app}\MyProg.exe +LicenseFile={#file AddBackslash(SourcePath) + "ISPPExample1License.txt"} +VersionInfoVersion={#AppVersion} +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +#ifdef AppEnterprise +Source: "MyProg.chm"; DestDir: "{app}" +#endif +Source: "Readme.txt"; DestDir: "{app}"; \ + Flags: isreadme + +[Icons] +Name: "{group}\{#AppName}"; Filename: "{app}\MyProg.exe" + +#ifdef Debug + #expr SaveToFile(AddBackslash(SourcePath) + "Preprocessed.iss") +#endif diff --git a/Examples/ISPPExample1License.txt b/Examples/ISPPExample1License.txt new file mode 100644 index 000000000..a6468eb88 --- /dev/null +++ b/Examples/ISPPExample1License.txt @@ -0,0 +1,4 @@ +#pragma option -e+ +{#AppName} version {#AppVersion} License + +Bla bla bla \ No newline at end of file diff --git a/Examples/Languages.iss b/Examples/Languages.iss new file mode 100644 index 000000000..0c1c6b2a3 --- /dev/null +++ b/Examples/Languages.iss @@ -0,0 +1,59 @@ +; -- Languages.iss -- +; Demonstrates a multilingual installation. + +; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES! + +[Setup] +AppName={cm:MyAppName} +AppId=My Program +AppVerName={cm:MyAppVerName,1.5} +DefaultDirName={pf}\{cm:MyAppName} +DefaultGroupName={cm:MyAppName} +UninstallDisplayIcon={app}\MyProg.exe +VersionInfoDescription=My Program Setup +VersionInfoProductName=My Program +OutputDir=userdocs:Inno Setup Examples Output +; Uncomment the following line to disable the "Select Setup Language" +; dialog and have it rely solely on auto-detection. +;ShowLanguageDialog=no +; If you want all languages to be listed in the "Select Setup Language" +; dialog, even those that can't be displayed in the active code page, +; uncomment the following line. Note: Unicode Inno Setup always displays +; all languages. +;ShowUndisplayableLanguages=yes + +[Languages] +Name: en; MessagesFile: "compiler:Default.isl" +Name: nl; MessagesFile: "compiler:Languages\Dutch.isl" +Name: de; MessagesFile: "compiler:Languages\German.isl" + +[Messages] +en.BeveledLabel=English +nl.BeveledLabel=Nederlands +de.BeveledLabel=Deutsch + +[CustomMessages] +en.MyDescription=My description +en.MyAppName=My Program +en.MyAppVerName=My Program %1 +nl.MyDescription=Mijn omschrijving +nl.MyAppName=Mijn programma +nl.MyAppVerName=Mijn programma %1 +de.MyDescription=Meine Beschreibung +de.MyAppName=Meine Anwendung +de.MyAppVerName=Meine Anwendung %1 + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}"; Languages: en +Source: "Readme.txt"; DestDir: "{app}"; Languages: en; Flags: isreadme +Source: "Readme-Dutch.txt"; DestName: "Leesmij.txt"; DestDir: "{app}"; Languages: nl; Flags: isreadme +Source: "Readme-German.txt"; DestName: "Liesmich.txt"; DestDir: "{app}"; Languages: de; Flags: isreadme + +[Icons] +Name: "{group}\{cm:MyAppName}"; Filename: "{app}\MyProg.exe" +Name: "{group}\{cm:UninstallProgram,{cm:MyAppName}}"; Filename: "{uninstallexe}" + +[Tasks] +; The following task doesn't do anything and is only meant to show [CustomMessages] usage +Name: mytask; Description: "{cm:MyDescription}" diff --git a/Examples/MyDll/Delphi/MyDll.dpr b/Examples/MyDll/Delphi/MyDll.dpr new file mode 100644 index 000000000..202ce8440 --- /dev/null +++ b/Examples/MyDll/Delphi/MyDll.dpr @@ -0,0 +1,14 @@ +library MyDll; + +uses + Windows; + +procedure MyDllFunc(hWnd: Integer; lpText, lpCaption: PAnsiChar; uType: Cardinal); stdcall; +begin + MessageBoxA(hWnd, lpText, lpCaption, uType); +end; + +exports MyDllFunc; + +begin +end. diff --git a/Examples/MyProg-IA64.exe b/Examples/MyProg-IA64.exe new file mode 100644 index 000000000..bb93ad854 Binary files /dev/null and b/Examples/MyProg-IA64.exe differ diff --git a/Examples/MyProg-x64.exe b/Examples/MyProg-x64.exe new file mode 100644 index 000000000..06e12b68a Binary files /dev/null and b/Examples/MyProg-x64.exe differ diff --git a/Examples/MyProg/Help/hh_contents.hhc b/Examples/MyProg/Help/hh_contents.hhc new file mode 100644 index 000000000..2ad4ee520 --- /dev/null +++ b/Examples/MyProg/Help/hh_contents.hhc @@ -0,0 +1,5 @@ + +
    +
  • +
+ diff --git a/Examples/MyProg/Help/hh_index.hhk b/Examples/MyProg/Help/hh_index.hhk new file mode 100644 index 000000000..3afa3c464 --- /dev/null +++ b/Examples/MyProg/Help/hh_index.hhk @@ -0,0 +1,3 @@ +
    +
  • +
diff --git a/Examples/MyProg/Help/hh_project.hhp b/Examples/MyProg/Help/hh_project.hhp new file mode 100644 index 000000000..cc58bdbbd --- /dev/null +++ b/Examples/MyProg/Help/hh_project.hhp @@ -0,0 +1,18 @@ +[OPTIONS] +Compatibility=1.1 or later +Compiled file=MyProg.chm +Contents file=hh_contents.hhc +Default Window=main +Default topic=topic_myprog.htm +Display compile progress=Yes +Full-text search=Yes +Index file=hh_index.hhk +Language=0x409 English (United States) +Title=My Program Help + +[WINDOWS] +main=,"hh_contents.hhc","hh_index.hhk",,,,,,,0x2520,,0x300e,,,,,,,,0 + + +[INFOTYPES] + diff --git a/Examples/MyProg/Help/styles.css b/Examples/MyProg/Help/styles.css new file mode 100644 index 000000000..32fe1e1fa --- /dev/null +++ b/Examples/MyProg/Help/styles.css @@ -0,0 +1,125 @@ +/* + Inno Setup + Copyright (C) 1997-2006 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + $jrsoftware: issrc/Examples/MyProg/Help/styles.css,v 1.1 2006/09/28 12:24:33 mlaan Exp $ +*/ + +BODY { + font: small arial, sans-serif; + margin: 0; +} +PRE, TT { + font: small "courier new", monospace; +} +P, H1, H2, H3, H4, H5, BLOCKQUOTE, PRE, FORM, OL, UL, LI, DL, DD, TABLE, .examplebox, DIV.margined { + /* only the end of paragraphs etc. has a margin */ + margin-top: 0; + margin-bottom: 0.6em; +} +UL, DD { + /* specify both of these for firefox compat. */ + margin-left: 0; + padding-left: 2em; +} +TABLE { + /* equivalent of cellspacing="0" */ + border-collapse: collapse; +} +TD { + /* equivalent of cellpadding="0" */ + padding: 0; + /* note: "baseline" is broken on IE6; it only aligns correctly when there's + a single line of text, and that text is directly inside the tag + (not inside a
). otherwise it behaves more like "top". + (firefox 1.5 and opera 9 don't have this problem) */ + vertical-align: baseline; +} +A:link, A:visited, A:active { + color: #008000; +} + +.small { + /* what we want is an 8pt font. 8pt/10pt = 80%, but on firefox that + actually creates a font smaller than 8pt, so use 82% */ + font-size: 82%; +} +.heading { + margin-top: 0.6em; + font-size: 120%; + font-weight: bold; +} +.indent { + margin-left: 2em; +} +PRE.nomargin { + margin: 0; +} +LI.compact { + margin-bottom: 2px; +} + +.topicheading { + background: ButtonFace; + color: WindowText; + padding: 5px 8px; + margin: 0; + border-bottom: 1px solid black; + font-size: 120%; + font-weight: bold; +} +.topicbody { + padding: 8px; +} + +.examplebox { + background: #f8f8f8; + color: black; + padding: 4px; + border: 1px solid #e0e0e0; + /* on IE6, if the content of the box is wider than the page, + the width of the box is increased. on firefox 1.5, by default + the box width stays the same, and the content is drawn outside + the box. that looks ugly. "overflow: auto" tells it to put a + scroll bar on the box when the content is too wide. (IE6 + apparently ignores "overflow: auto", at least here.) */ + overflow: auto; +} +.exampleheader { + font-size: 82%; + font-weight: bold; + margin-bottom: 0.6em; +} + + +DT.paramlist { + margin-bottom: 0.6em; +} +DD.paramlist { + /* give a little extra spacing between items */ + margin-bottom: 1.2em; +} + +DT.flaglist { + font-weight: bold; +} + +TD.cellleft { + white-space: nowrap; +} +TD.cellright { + padding-left: 2em; +} + +TABLE.setuphdr { + margin: 0; +} +TD.setuphdrl { + font-weight: bold; + white-space: nowrap; +} +TD.setuphdrr { + padding-left: 1em; +} diff --git a/Examples/MyProg/Help/topic_myprog.htm b/Examples/MyProg/Help/topic_myprog.htm new file mode 100644 index 000000000..8a6270c05 --- /dev/null +++ b/Examples/MyProg/Help/topic_myprog.htm @@ -0,0 +1,15 @@ + + + + +My Program Help + + + + +

My Program Help Contents

+
+

There is no help! This is just an example.

+
+ + diff --git a/Examples/MyProg/MyProg.manifest.txt b/Examples/MyProg/MyProg.manifest.txt new file mode 100644 index 000000000..718b93941 --- /dev/null +++ b/Examples/MyProg/MyProg.manifest.txt @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/MyProg/MyProg.vcproj b/Examples/MyProg/MyProg.vcproj new file mode 100644 index 000000000..2398a9eae --- /dev/null +++ b/Examples/MyProg/MyProg.vcproj @@ -0,0 +1,563 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Examples/MyProg/resource.h b/Examples/MyProg/resource.h new file mode 100644 index 000000000..cc752d434 --- /dev/null +++ b/Examples/MyProg/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by MyProg.rc +// +#define IDI_ICON1 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/Examples/Readme-Dutch.txt b/Examples/Readme-Dutch.txt new file mode 100644 index 000000000..7f190a690 --- /dev/null +++ b/Examples/Readme-Dutch.txt @@ -0,0 +1 @@ +Dit is het Leesmij bestand voor My Program. \ No newline at end of file diff --git a/Examples/Readme-German.txt b/Examples/Readme-German.txt new file mode 100644 index 000000000..57cf84a86 --- /dev/null +++ b/Examples/Readme-German.txt @@ -0,0 +1 @@ +Dies ist die LIESMICH-Datei für "My Program". \ No newline at end of file diff --git a/Examples/Readme.txt b/Examples/Readme.txt new file mode 100644 index 000000000..5c16a64fa --- /dev/null +++ b/Examples/Readme.txt @@ -0,0 +1 @@ +This is the README file for My Program. diff --git a/Examples/UninstallCodeExample1.iss b/Examples/UninstallCodeExample1.iss new file mode 100644 index 000000000..db50264b4 --- /dev/null +++ b/Examples/UninstallCodeExample1.iss @@ -0,0 +1,45 @@ +; -- UninstallCodeExample1.iss -- +; +; This script shows various things you can achieve using a [Code] section for Uninstall + +[Setup] +AppName=My Program +AppVersion=1.5 +DefaultDirName={pf}\My Program +DefaultGroupName=My Program +UninstallDisplayIcon={app}\MyProg.exe +OutputDir=userdocs:Inno Setup Examples Output + +[Files] +Source: "MyProg.exe"; DestDir: "{app}" +Source: "MyProg.chm"; DestDir: "{app}" +Source: "Readme.txt"; DestDir: "{app}"; Flags: isreadme + +[Code] +function InitializeUninstall(): Boolean; +begin + Result := MsgBox('InitializeUninstall:' #13#13 'Uninstall is initializing. Do you really want to start Uninstall?', mbConfirmation, MB_YESNO) = idYes; + if Result = False then + MsgBox('InitializeUninstall:' #13#13 'Ok, bye bye.', mbInformation, MB_OK); +end; + +procedure DeinitializeUninstall(); +begin + MsgBox('DeinitializeUninstall:' #13#13 'Bye bye!', mbInformation, MB_OK); +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + case CurUninstallStep of + usUninstall: + begin + MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall is about to start.', mbInformation, MB_OK) + // ...insert code to perform pre-uninstall tasks here... + end; + usPostUninstall: + begin + MsgBox('CurUninstallStepChanged:' #13#13 'Uninstall just finished.', mbInformation, MB_OK); + // ...insert code to perform post-uninstall tasks here... + end; + end; +end; diff --git a/Files/.gitignore b/Files/.gitignore new file mode 100644 index 000000000..6120d2b7d --- /dev/null +++ b/Files/.gitignore @@ -0,0 +1,6 @@ +*.hlp +*.cnt +*.gid +*.e32 +*.dll +*.exe diff --git a/Files/Default.isl b/Files/Default.isl new file mode 100644 index 000000000..aa01053bc --- /dev/null +++ b/Files/Default.isl @@ -0,0 +1,317 @@ +; *** Inno Setup version 5.1.11+ English messages *** +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/files/istrans/ +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=English +LanguageID=$0409 +LanguageCodePage=0 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +;WelcomeFontName=Verdana +;WelcomeFontSize=12 +;TitleFontName=Arial +;TitleFontSize=29 +;CopyrightFontName=Arial +;CopyrightFontSize=8 + +[Messages] + +; *** Application titles +SetupAppTitle=Setup +SetupWindowTitle=Setup - %1 +UninstallAppTitle=Uninstall +UninstallAppFullTitle=%1 Uninstall + +; *** Misc. common +InformationTitle=Information +ConfirmTitle=Confirm +ErrorTitle=Error + +; *** SetupLdr messages +SetupLdrStartupMessage=This will install %1. Do you wish to continue? +LdrCannotCreateTemp=Unable to create a temporary file. Setup aborted +LdrCannotExecTemp=Unable to execute file in the temporary directory. Setup aborted + +; *** Startup error messages +LastErrorMessage=%1.%n%nError %2: %3 +SetupFileMissing=The file %1 is missing from the installation directory. Please correct the problem or obtain a new copy of the program. +SetupFileCorrupt=The setup files are corrupted. Please obtain a new copy of the program. +SetupFileCorruptOrWrongVer=The setup files are corrupted, or are incompatible with this version of Setup. Please correct the problem or obtain a new copy of the program. +NotOnThisPlatform=This program will not run on %1. +OnlyOnThisPlatform=This program must be run on %1. +OnlyOnTheseArchitectures=This program can only be installed on versions of Windows designed for the following processor architectures:%n%n%1 +MissingWOW64APIs=The version of Windows you are running does not include functionality required by Setup to perform a 64-bit installation. To correct this problem, please install Service Pack %1. +WinVersionTooLowError=This program requires %1 version %2 or later. +WinVersionTooHighError=This program cannot be installed on %1 version %2 or later. +AdminPrivilegesRequired=You must be logged in as an administrator when installing this program. +PowerUserPrivilegesRequired=You must be logged in as an administrator or as a member of the Power Users group when installing this program. +SetupAppRunningError=Setup has detected that %1 is currently running.%n%nPlease close all instances of it now, then click OK to continue, or Cancel to exit. +UninstallAppRunningError=Uninstall has detected that %1 is currently running.%n%nPlease close all instances of it now, then click OK to continue, or Cancel to exit. + +; *** Misc. errors +ErrorCreatingDir=Setup was unable to create the directory "%1" +ErrorTooManyFilesInDir=Unable to create a file in the directory "%1" because it contains too many files + +; *** Setup common messages +ExitSetupTitle=Exit Setup +ExitSetupMessage=Setup is not complete. If you exit now, the program will not be installed.%n%nYou may run Setup again at another time to complete the installation.%n%nExit Setup? +AboutSetupMenuItem=&About Setup... +AboutSetupTitle=About Setup +AboutSetupMessage=%1 version %2%n%3%n%n%1 home page:%n%4 +AboutSetupNote= +TranslatorNote= + +; *** Buttons +ButtonBack=< &Back +ButtonNext=&Next > +ButtonInstall=&Install +ButtonOK=OK +ButtonCancel=Cancel +ButtonYes=&Yes +ButtonYesToAll=Yes to &All +ButtonNo=&No +ButtonNoToAll=N&o to All +ButtonFinish=&Finish +ButtonBrowse=&Browse... +ButtonWizardBrowse=B&rowse... +ButtonNewFolder=&Make New Folder + +; *** "Select Language" dialog messages +SelectLanguageTitle=Select Setup Language +SelectLanguageLabel=Select the language to use during the installation: + +; *** Common wizard text +ClickNext=Click Next to continue, or Cancel to exit Setup. +BeveledLabel= +BrowseDialogTitle=Browse For Folder +BrowseDialogLabel=Select a folder in the list below, then click OK. +NewFolderName=New Folder + +; *** "Welcome" wizard page +WelcomeLabel1=Welcome to the [name] Setup Wizard +WelcomeLabel2=This will install [name/ver] on your computer.%n%nIt is recommended that you close all other applications before continuing. + +; *** "Password" wizard page +WizardPassword=Password +PasswordLabel1=This installation is password protected. +PasswordLabel3=Please provide the password, then click Next to continue. Passwords are case-sensitive. +PasswordEditLabel=&Password: +IncorrectPassword=The password you entered is not correct. Please try again. + +; *** "License Agreement" wizard page +WizardLicense=License Agreement +LicenseLabel=Please read the following important information before continuing. +LicenseLabel3=Please read the following License Agreement. You must accept the terms of this agreement before continuing with the installation. +LicenseAccepted=I &accept the agreement +LicenseNotAccepted=I &do not accept the agreement + +; *** "Information" wizard pages +WizardInfoBefore=Information +InfoBeforeLabel=Please read the following important information before continuing. +InfoBeforeClickLabel=When you are ready to continue with Setup, click Next. +WizardInfoAfter=Information +InfoAfterLabel=Please read the following important information before continuing. +InfoAfterClickLabel=When you are ready to continue with Setup, click Next. + +; *** "User Information" wizard page +WizardUserInfo=User Information +UserInfoDesc=Please enter your information. +UserInfoName=&User Name: +UserInfoOrg=&Organization: +UserInfoSerial=&Serial Number: +UserInfoNameRequired=You must enter a name. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Select Destination Location +SelectDirDesc=Where should [name] be installed? +SelectDirLabel3=Setup will install [name] into the following folder. +SelectDirBrowseLabel=To continue, click Next. If you would like to select a different folder, click Browse. +DiskSpaceMBLabel=At least [mb] MB of free disk space is required. +ToUNCPathname=Setup cannot install to a UNC pathname. If you are trying to install to a network, you will need to map a network drive. +InvalidPath=You must enter a full path with drive letter; for example:%n%nC:\APP%n%nor a UNC path in the form:%n%n\\server\share +InvalidDrive=The drive or UNC share you selected does not exist or is not accessible. Please select another. +DiskSpaceWarningTitle=Not Enough Disk Space +DiskSpaceWarning=Setup requires at least %1 KB of free space to install, but the selected drive only has %2 KB available.%n%nDo you want to continue anyway? +DirNameTooLong=The folder name or path is too long. +InvalidDirName=The folder name is not valid. +BadDirName32=Folder names cannot include any of the following characters:%n%n%1 +DirExistsTitle=Folder Exists +DirExists=The folder:%n%n%1%n%nalready exists. Would you like to install to that folder anyway? +DirDoesntExistTitle=Folder Does Not Exist +DirDoesntExist=The folder:%n%n%1%n%ndoes not exist. Would you like the folder to be created? + +; *** "Select Components" wizard page +WizardSelectComponents=Select Components +SelectComponentsDesc=Which components should be installed? +SelectComponentsLabel2=Select the components you want to install; clear the components you do not want to install. Click Next when you are ready to continue. +FullInstallation=Full installation +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Compact installation +CustomInstallation=Custom installation +NoUninstallWarningTitle=Components Exist +NoUninstallWarning=Setup has detected that the following components are already installed on your computer:%n%n%1%n%nDeselecting these components will not uninstall them.%n%nWould you like to continue anyway? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Current selection requires at least [mb] MB of disk space. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Select Additional Tasks +SelectTasksDesc=Which additional tasks should be performed? +SelectTasksLabel2=Select the additional tasks you would like Setup to perform while installing [name], then click Next. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Select Start Menu Folder +SelectStartMenuFolderDesc=Where should Setup place the program's shortcuts? +SelectStartMenuFolderLabel3=Setup will create the program's shortcuts in the following Start Menu folder. +SelectStartMenuFolderBrowseLabel=To continue, click Next. If you would like to select a different folder, click Browse. +MustEnterGroupName=You must enter a folder name. +GroupNameTooLong=The folder name or path is too long. +InvalidGroupName=The folder name is not valid. +BadGroupName=The folder name cannot include any of the following characters:%n%n%1 +NoProgramGroupCheck2=&Don't create a Start Menu folder + +; *** "Ready to Install" wizard page +WizardReady=Ready to Install +ReadyLabel1=Setup is now ready to begin installing [name] on your computer. +ReadyLabel2a=Click Install to continue with the installation, or click Back if you want to review or change any settings. +ReadyLabel2b=Click Install to continue with the installation. +ReadyMemoUserInfo=User information: +ReadyMemoDir=Destination location: +ReadyMemoType=Setup type: +ReadyMemoComponents=Selected components: +ReadyMemoGroup=Start Menu folder: +ReadyMemoTasks=Additional tasks: + +; *** "Preparing to Install" wizard page +WizardPreparing=Preparing to Install +PreparingDesc=Setup is preparing to install [name] on your computer. +PreviousInstallNotCompleted=The installation/removal of a previous program was not completed. You will need to restart your computer to complete that installation.%n%nAfter restarting your computer, run Setup again to complete the installation of [name]. +CannotContinue=Setup cannot continue. Please click Cancel to exit. + +; *** "Installing" wizard page +WizardInstalling=Installing +InstallingLabel=Please wait while Setup installs [name] on your computer. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Completing the [name] Setup Wizard +FinishedLabelNoIcons=Setup has finished installing [name] on your computer. +FinishedLabel=Setup has finished installing [name] on your computer. The application may be launched by selecting the installed icons. +ClickFinish=Click Finish to exit Setup. +FinishedRestartLabel=To complete the installation of [name], Setup must restart your computer. Would you like to restart now? +FinishedRestartMessage=To complete the installation of [name], Setup must restart your computer.%n%nWould you like to restart now? +ShowReadmeCheck=Yes, I would like to view the README file +YesRadio=&Yes, restart the computer now +NoRadio=&No, I will restart the computer later +; used for example as 'Run MyProg.exe' +RunEntryExec=Run %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=View %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Setup Needs the Next Disk +SelectDiskLabel2=Please insert Disk %1 and click OK.%n%nIf the files on this disk can be found in a folder other than the one displayed below, enter the correct path or click Browse. +PathLabel=&Path: +FileNotInDir2=The file "%1" could not be located in "%2". Please insert the correct disk or select another folder. +SelectDirectoryLabel=Please specify the location of the next disk. + +; *** Installation phase messages +SetupAborted=Setup was not completed.%n%nPlease correct the problem and run Setup again. +EntryAbortRetryIgnore=Click Retry to try again, Ignore to proceed anyway, or Abort to cancel installation. + +; *** Installation status messages +StatusCreateDirs=Creating directories... +StatusExtractFiles=Extracting files... +StatusCreateIcons=Creating shortcuts... +StatusCreateIniEntries=Creating INI entries... +StatusCreateRegistryEntries=Creating registry entries... +StatusRegisterFiles=Registering files... +StatusSavingUninstall=Saving uninstall information... +StatusRunProgram=Finishing installation... +StatusRollback=Rolling back changes... + +; *** Misc. errors +ErrorInternal2=Internal error: %1 +ErrorFunctionFailedNoCode=%1 failed +ErrorFunctionFailed=%1 failed; code %2 +ErrorFunctionFailedWithMessage=%1 failed; code %2.%n%3 +ErrorExecutingProgram=Unable to execute file:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Error opening registry key:%n%1\%2 +ErrorRegCreateKey=Error creating registry key:%n%1\%2 +ErrorRegWriteKey=Error writing to registry key:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Error creating INI entry in file "%1". + +; *** File copying errors +FileAbortRetryIgnore=Click Retry to try again, Ignore to skip this file (not recommended), or Abort to cancel installation. +FileAbortRetryIgnore2=Click Retry to try again, Ignore to proceed anyway (not recommended), or Abort to cancel installation. +SourceIsCorrupted=The source file is corrupted +SourceDoesntExist=The source file "%1" does not exist +ExistingFileReadOnly=The existing file is marked as read-only.%n%nClick Retry to remove the read-only attribute and try again, Ignore to skip this file, or Abort to cancel installation. +ErrorReadingExistingDest=An error occurred while trying to read the existing file: +FileExists=The file already exists.%n%nWould you like Setup to overwrite it? +ExistingFileNewer=The existing file is newer than the one Setup is trying to install. It is recommended that you keep the existing file.%n%nDo you want to keep the existing file? +ErrorChangingAttr=An error occurred while trying to change the attributes of the existing file: +ErrorCreatingTemp=An error occurred while trying to create a file in the destination directory: +ErrorReadingSource=An error occurred while trying to read the source file: +ErrorCopying=An error occurred while trying to copy a file: +ErrorReplacingExistingFile=An error occurred while trying to replace the existing file: +ErrorRestartReplace=RestartReplace failed: +ErrorRenamingTemp=An error occurred while trying to rename a file in the destination directory: +ErrorRegisterServer=Unable to register the DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 failed with exit code %1 +ErrorRegisterTypeLib=Unable to register the type library: %1 + +; *** Post-installation errors +ErrorOpeningReadme=An error occurred while trying to open the README file. +ErrorRestartingComputer=Setup was unable to restart the computer. Please do this manually. + +; *** Uninstaller messages +UninstallNotFound=File "%1" does not exist. Cannot uninstall. +UninstallOpenError=File "%1" could not be opened. Cannot uninstall +UninstallUnsupportedVer=The uninstall log file "%1" is in a format not recognized by this version of the uninstaller. Cannot uninstall +UninstallUnknownEntry=An unknown entry (%1) was encountered in the uninstall log +ConfirmUninstall=Are you sure you want to completely remove %1 and all of its components? +UninstallOnlyOnWin64=This installation can only be uninstalled on 64-bit Windows. +OnlyAdminCanUninstall=This installation can only be uninstalled by a user with administrative privileges. +UninstallStatusLabel=Please wait while %1 is removed from your computer. +UninstalledAll=%1 was successfully removed from your computer. +UninstalledMost=%1 uninstall complete.%n%nSome elements could not be removed. These can be removed manually. +UninstalledAndNeedsRestart=To complete the uninstallation of %1, your computer must be restarted.%n%nWould you like to restart now? +UninstallDataCorrupted="%1" file is corrupted. Cannot uninstall + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Remove Shared File? +ConfirmDeleteSharedFile2=The system indicates that the following shared file is no longer in use by any programs. Would you like for Uninstall to remove this shared file?%n%nIf any programs are still using this file and it is removed, those programs may not function properly. If you are unsure, choose No. Leaving the file on your system will not cause any harm. +SharedFileNameLabel=File name: +SharedFileLocationLabel=Location: +WizardUninstalling=Uninstall Status +StatusUninstalling=Uninstalling %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 version %2 +AdditionalIcons=Additional icons: +CreateDesktopIcon=Create a &desktop icon +CreateQuickLaunchIcon=Create a &Quick Launch icon +ProgramOnTheWeb=%1 on the Web +UninstallProgram=Uninstall %1 +LaunchProgram=Launch %1 +AssocFileExtension=&Associate %1 with the %2 file extension +AssocingFileExtension=Associating %1 with the %2 file extension... diff --git a/Files/ISPP.ico b/Files/ISPP.ico new file mode 100644 index 000000000..91e8ef1a5 Binary files /dev/null and b/Files/ISPP.ico differ diff --git a/Files/ISPPBuiltins.iss b/Files/ISPPBuiltins.iss new file mode 100644 index 000000000..d8d0aa8ca --- /dev/null +++ b/Files/ISPPBuiltins.iss @@ -0,0 +1,345 @@ +; BEGIN ISPPBUILTINS.ISS +// +// Inno Setup Preprocessor 5 +// +// Copyright (C) 2001-2004 Alex Yackimoff. All Rights Reserved. +// Portions by Martijn Laan. +// http://ispp.sourceforge.net +// +// Inno Setup (C) 1997-2009 Jordan Russell. All Rights Reserved. +// Portions by Martijn Laan. +// +// $Id: ISPPBuiltins.iss,v 1.3 2010/12/29 15:20:26 mlaan Exp $ +// +#if defined(ISPP_INVOKED) && !defined(_BUILTINS_ISS_) +// +#if PREPROCVER < 0x01000000 +# error Inno Setup Preprocessor version is outdated +#endif +// +#define _BUILTINS_ISS_ +// +// =========================================================================== +// +// Default states for options. +// +//#pragma parseroption -b+ ; short circuit boolean evaluation: on +//#pragma parseroption -m- ; short circuit multiplication evaluation (0 * A will not eval A): off +//#pragma parseroption -p+ ; string literals without escape sequences: on +//#pragma parseroption -u- ; allow undeclared identifiers: off +//#pragma option -c+ ; pass script to the compiler: on +//#pragma option -e- ; emit empty lines to translation: off +//#pragma option -v- ; verbose mode: off +// +// --------------------------------------------------------------------------- +// +// Verbose levels: +// 0 - #include and #file acknowledgements +// 1 - information about any temp files created by #file +// 2 - #insert and #append acknowledgements +// 3 - reserved +// 4 - #dim, #define and #undef acknowledgements +// 5 - reserved +// 6 - conditional inclusion acknowledgements +// 7 - reserved +// 8 - show strings emitted with #emit directive +// 9 - macro and functions successfull call acknowledgements +//10 - Local macro array allocation acknowledgements +// +//#pragma verboselevel 0 +// +#ifndef __POPT_P__ +# define private CStrings +# pragma parseroption -p+ +#endif +// +#pragma spansymbol "\" +// +#define True 1 +#define False 0 +#define Yes True +#define No False +// +#define MaxInt 0x7FFFFFFFL +#define MinInt 0x80000000L +// +#define NULL +#define void +// +// TypeOf constants +// +#define TYPE_ERROR 0 +#define TYPE_NULL 1 +#define TYPE_INTEGER 2 +#define TYPE_STRING 3 +#define TYPE_MACRO 4 +#define TYPE_FUNC 5 +#define TYPE_ARRAY 6 +// +// Helper macro to find out the type of an array element or expression. TypeOf +// standard function only allows identifier as its parameter. Use this macro +// to convert an expression to identifier. +// +#define TypeOf2(any Expr) TypeOf(Expr) +// +// ReadReg constants +// +#define HKEY_CLASSES_ROOT 0x80000000UL +#define HKEY_CURRENT_USER 0x80000001UL +#define HKEY_LOCAL_MACHINE 0x80000002UL +#define HKEY_USERS 0x80000003UL +// +#define HKCR HKEY_CLASSES_ROOT +#define HKCU HKEY_CURRENT_USER +#define HKLM HKEY_LOCAL_MACHINE +#define HKU HKEY_USERS +// +// Exec constants +// +#define SW_HIDE 0 +#define SW_SHOWNORMAL 1 +#define SW_NORMAL 1 +#define SW_SHOWMINIMIZED 2 +#define SW_SHOWMAXIMIZED 3 +#define SW_MAXIMIZE 3 +#define SW_SHOWNOACTIVATE 4 +#define SW_SHOW 5 +#define SW_MINIMIZE 6 +#define SW_SHOWMINNOACTIVE 7 +#define SW_SHOWNA 8 +#define SW_RESTORE 9 +#define SW_SHOWDEFAULT 10 +#define SW_MAX 10 +// +// Find constants +// +#define FIND_MATCH 0x00 +#define FIND_BEGINS 0x01 +#define FIND_ENDS 0x02 +#define FIND_CONTAINS 0x03 +#define FIND_CASESENSITIVE 0x04 +#define FIND_SENSITIVE FIND_CASESENSITIVE +#define FIND_AND 0x00 +#define FIND_OR 0x08 +#define FIND_NOT 0x10 +#define FIND_TRIM 0x20 +// +// FindFirst constants +// +#define faReadOnly 0x00000001 +#define faHidden 0x00000002 +#define faSysFile 0x00000004 +#define faVolumeID 0x00000008 +#define faDirectory 0x00000010 +#define faArchive 0x00000020 +#define faSymLink 0x00000040 +#define faAnyFile 0x0000003F +// +// GetStringFileInfo standard names +// +#define COMPANY_NAME "CompanyName" +#define FILE_DESCRIPTION "FileDescription" +#define FILE_VERSION "FileVersion" +#define INTERNAL_NAME "InternalName" +#define LEGAL_COPYRIGHT "LegalCopyright" +#define ORIGINAL_FILENAME "OriginalFilename" +#define PRODUCT_NAME "ProductName" +#define PRODUCT_VERSION "ProductVersion" +// +// GetStringFileInfo helpers +// +#define GetFileCompany(str FileName) GetStringFileInfo(FileName, COMPANY_NAME) +#define GetFileCopyright(str FileName) GetStringFileInfo(FileName, LEGAL_COPYRIGHT) +#define GetFileDescription(str FileName) GetStringFileInfo(FileName, FILE_DESCRIPTION) +#define GetFileProductVersion(str FileName) GetStringFileInfo(FileName, PRODUCT_VERSION) +#define GetFileVersionString(str FileName) GetStringFileInfo(FileName, FILE_VERSION) +// +// ParseVersion +// +// Macro internally calls GetFileVersion function and parses string returned +// by that function (in form "0.0.0.0"). All four version elements are stored +// in by-reference parameters Major, Minor, Rev, and Build. Macro returns +// string returned by GetFileVersion. +// +#define DeleteToFirstPeriod(str *S) \ + Local[1] = Copy(S, 1, (Local[0] = Pos(".", S)) - 1), \ + S = Copy(S, Local[0] + 1), \ + Local[1] +// +#define ParseVersion(str FileName, *Major, *Minor, *Rev, *Build) \ + Local[1] = Local[0] = GetFileVersion(FileName), \ + Local[1] == "" ? "" : ( \ + Major = Int(DeleteToFirstPeriod(Local[1])), \ + Minor = Int(DeleteToFirstPeriod(Local[1])), \ + Rev = Int(DeleteToFirstPeriod(Local[1])), \ + Build = Int(Local[1]), \ + Local[0]) +// +// EncodeVer +// +// Encodes given four version elements to a 32 bit integer number (8 bits for +// each element, i.e. elements must be within 0...255 range). +// +#define EncodeVer(int Major, int Minor, int Revision = 0, int Build = -1) \ + Major << 24 | (Minor & 0xFF) << 16 | (Revision & 0xFF) << 8 | (Build >= 0 ? Build & 0xFF : 0) +// +// DecodeVer +// +// Decodes given 32 bit integer encoded version to its string representation, +// Digits parameter indicates how many elements to show (if the fourth element +// is 0, it won't be shown anyway). +// +#define DecodeVer(int Ver, int Digits = 3) \ + Str(Ver >> 0x18 & 0xFF) + (Digits > 1 ? "." : "") + \ + (Digits > 1 ? \ + Str(Ver >> 0x10 & 0xFF) + (Digits > 2 ? "." : "") : "") + \ + (Digits > 2 ? \ + Str(Ver >> 0x08 & 0xFF) + (Digits > 3 && (Local = Ver & 0xFF) ? "." : "") : "") + \ + (Digits > 3 && Local ? \ + Str(Ver & 0xFF) : "") +// +// FindSection +// +// Returns index of the line following the header of the section. This macro +// is intended to be used with #insert directive. +// +#define FindSection(str Section = "Files") \ + Find(0, "[" + Section + "]", FIND_MATCH | FIND_TRIM) + 1 +// +// FindSectionEnd +// +// Returns index of the line following last entry of the section. This macro +// is intended to be used with #insert directive. +// +#if VER >= 0x03000000 +# define FindNextSection(int Line) \ + Find(Line, "[", FIND_BEGINS | FIND_TRIM, "]", FIND_ENDS | FIND_AND) +# define FindSectionEnd(str Section = "Files") \ + FindNextSection(FindSection(Section)) +#else +# define FindSectionEnd(str Section = "Files") \ + FindSection(Section) + EntryCount(Section) +#endif +// +// FindCode +// +// Returns index of the line (of translation) following either [Code] section +// header, or "program" keyword, if any. +// +#define FindCode() \ + Local[1] = FindSection("Code"), \ + Local[0] = Find(Local[1] - 1, "program", FIND_BEGINS, ";", FIND_ENDS | FIND_AND), \ + (Local[0] < 0 ? Local[1] : Local[0] + 1) +// +// ExtractFilePath +// +// Returns directory portion of the given filename without backslash (unless +// it is a root directory). If PathName doesn't contain directory portion, +// the result is an empty string. +// +#define ExtractFilePath(str PathName) \ + (Local[0] = \ + !(Local[1] = RPos("\", PathName)) ? \ + "" : \ + Copy(PathName, 1, Local[1] - 1)), \ + Local[0] + \ + ((Local[2] = Len(Local[0])) == 2 && Copy(Local[0], Local[2]) == ":" ? \ + "\" : \ + "") +#define ExtractFileDir(str PathName) \ + RemoveBackslash(ExtractFilePath(PathName)) + +#define ExtractFileExt(str PathName) \ + Local[0] = RPos(".", PathName), \ + Copy(PathName, Local[0] + 1) +// +// ExtractFileName +// +// Returns name portion of the given filename. If PathName ends with +// a backslash, the result is an empty string. +// +#define ExtractFileName(str PathName) \ + !(Local[0] = RPos("\", PathName)) ? \ + PathName : \ + Copy(PathName, Local[0] + 1) +// +// ChangeFileExt +// +// Changes extension in FileName with NewExt. NewExt must not contain +// period. +// +#define ChangeFileExt(str FileName, str NewExt) \ + !(Local[0] = RPos(".", FileName)) ? \ + FileName + "." + NewExt : \ + Copy(FileName, 1, Local[0]) + NewExt +// +// AddBackslash +// +// Adds a backslash to the string, if it's not already there. +// +#define AddBackslash(str S) \ + Copy(S, Len(S)) == "\" ? S : S + "\" +// +// RemoveBackslash +// +// Removes trailing backslash from the string unless the string points to +// a root directory. +// +#define RemoveBackslash(str S) \ + Local[0] = Len(S), \ + Local[0] > 0 ? \ + Copy(S, Local[0]) == "\" ? \ + (Local[0] == 3 && Copy(S, 2, 1) == ":" ? \ + S : \ + Copy(S, 1, Local[0] - 1)) : \ + S : \ + "" +// +// Delete +// +// Deletes specified number of characters beginning with Index from S. S is +// passed by reference (therefore is modified). Acts like Delete function in +// Delphi (from System unit). +// +#define Delete(str *S, int Index, int Count = MaxInt) \ + S = Copy(S, 1, Index - 1) + Copy(S, Index + Count) +// +// Insert +// +// Inserts specified Substr at Index'th character into S. S is passed by +// reference (therefore is modified). +// +#define Insert(str *S, int Index, str Substr) \ + Index > Len(S) + 1 ? \ + S : \ + S = Copy(S, 1, Index - 1) + SubStr + Copy(S, Index) +// +// YesNo, IsDirSet +// +// Returns nonzero value if given string is "yes", "true" or "1". Intended to +// be used with SetupSetting function. This macro replaces YesNo function +// available in previous releases. +// +#define YesNo(str S) \ + (S = LowerCase(S)) == "yes" || S == "true" || S == "1" +// +#define IsDirSet(str SetupDirective) \ + YesNo(SetupSetting(SetupDirective)) +// +// +#define Power(int X, int P = 2) \ + !P ? 1 : X * Power(X, P - 1) +// +#define Min(int A, int B, int C = MaxInt) \ + A < B ? A < C ? Int(A) : Int(C) : Int(B) +// +#define Max(int A, int B, int C = MinInt) \ + A > B ? A > C ? Int(A) : Int(C) : Int(B) +// + +#ifdef CStrings +# pragma parseroption -p- +#endif +#endif +; END ISPPBUILTINS.ISS + diff --git a/Files/Languages/Basque.isl b/Files/Languages/Basque.isl new file mode 100644 index 000000000..1b130bf4c --- /dev/null +++ b/Files/Languages/Basque.isl @@ -0,0 +1,318 @@ +; *** Inno Setup version 5.1.11+ Basque messages *** +; +; Translated by 3ARRANO (3arrano@3arrano.com) +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=Euskara +LanguageID=$042d +LanguageCodePage=0 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +;WelcomeFontName=Verdana +;WelcomeFontSize=12 +;TitleFontName=Arial +;TitleFontSize=29 +;CopyrightFontName=Arial +;CopyrightFontSize=8 + +[Messages] + +; *** Application titles +SetupAppTitle=Instalaketa +SetupWindowTitle=Instalaketa - %1 +UninstallAppTitle=Desinstalaketa +UninstallAppFullTitle=Desinstalaketa - %1 + +; *** Misc. common +InformationTitle=Argibideak +ConfirmTitle=Berretsi +ErrorTitle=Akatsa + +; *** SetupLdr messages +SetupLdrStartupMessage=Programa honek %1 instalatuko du. Jarraitu nahi duzu? +LdrCannotCreateTemp=Ezin izan da aldi baterako fitxategirik sortu. Instalaketa ezeztatu da +LdrCannotExecTemp=Aldi baterako karpetako fitxategia ezin izan da abiarazi. Instalaketa ezeztatu da +; *** Startup error messages +LastErrorMessage=%1.%n%n%2 akatsa: %3 +SetupFileMissing=Ez da %1 fitxategia aurkitu instalaketaren direktorioan. Zuzendu arazoa edo eskuratu programaren kopia berri bat. +SetupFileCorrupt=Instalaketa fitxategiak hondaturik daude. Eskuratu programaren kopia berri bat. +SetupFileCorruptOrWrongVer=Instalaketa fitxategiak hondaturik daude, edo ez dira instalatzailearen bertsio honekin bateragarriak. Zuzendu arazoa edo eskuratu programaren kopia berri bat. +NotOnThisPlatform=Programa hau ez dabil %1 sistemapean. +OnlyOnThisPlatform=Programa hau %1 sistemapean soilik dabil. +OnlyOnTheseArchitectures=Programa hau ondorengo prozesagailuen arkitekturetarako diseinatu diren Windowsen bertsioetan soilik instala daiteke:%n%n%1 +MissingWOW64APIs=Darabilzun Windowsen bertsioak ez dakar 64-biteko instalaketa bat burutzeko instalatzaileak behar duen funtzionalitaterik. Arazo hau konpontzeko, instalatu Service Pack %1 zerbitzu paketea. +WinVersionTooLowError=Programa honek %1 %2 edo bertsio berriagoa behar du. +WinVersionTooHighError=Programa hau ezin da instalatu %1 %2 edo bertsio berriagoan. +AdminPrivilegesRequired=Programa hau instalatzeko administratzaile gisa hasi behar duzu saioa. +PowerUserPrivilegesRequired=Programa hau instalatzeko administratzaile gisa edo Agintedun Erabiltzaileen taldeko kide gisa hasi behar duzu saioa. +SetupAppRunningError=Instalatzaileak une honetan %1 irekita dagoela nabaritu du.%n%nItxi bere leiho guztiak, ondoren klikatu Ados jarraitzeko, edo Utzi irteteko. +UninstallAppRunningError=Instalatzaileak une honetan %1 irekita dagoela nabaritu du.%n%nItxi bere leiho guztiak, ondoren klikatu Ados jarraitzeko, edo Utzi irteteko. + +; *** Misc. errors +ErrorCreatingDir=Instalatzaileak ezin izan du "%1" direktorioa sortu +ErrorTooManyFilesInDir=Ezinezkoa izan da "%1" direktorioan fitxategi bat sortzea, fitxategi gehiegi dituelako barnean + +; *** Setup common messages +ExitSetupTitle=Instalatzailetik Irten +ExitSetupMessage=Instalaketa ez da burutu. Orain irtenez gero, programa ez da instalatuko.%n%nInstalaketa burutzeko edonoiz ireki dezakezu berriro instalatzailea.%n%nInstalatzailetik Irten? +AboutSetupMenuItem=&Instalatzaileari Buruz... +AboutSetupTitle=Instalatzaileari Buruz +AboutSetupMessage=%1 %2%n%3%n%n%1en webgunea :%n%4 +AboutSetupNote= +TranslatorNote= + +; *** Buttons +ButtonBack=< A&urrekoa +ButtonNext=&Hurrengoa > +ButtonInstall=&Instalatu +ButtonOK=Ados +ButtonCancel=Utzi +ButtonYes=&Bai +ButtonYesToAll=Bai &Guztiari +ButtonNo=&Ez +ButtonNoToAll=E&z Guztiari +ButtonFinish=A&maitu +ButtonBrowse=&Arakatu... +ButtonWizardBrowse=A&rakatu... +ButtonNewFolder=&Karpeta Berria Sortu + +; *** "Select Language" dialog messages +SelectLanguageTitle=Hautatu Instalatzailearen Hizkuntza +SelectLanguageLabel=Hautatu instalaketarako erabili nahi duzun hizkuntza: + +; *** Common wizard text +ClickNext=Klikatu Hurrengoa jarraitzeko, edo Utzi instalatzailetik irteteko. +BeveledLabel= +BrowseDialogTitle=Karpetak Arakatu +BrowseDialogLabel=Hautatu karpeta bat azpiko zerrendan, ondoren klikatu Ados. +NewFolderName=Karpeta Berria + +; *** "Welcome" wizard page +WelcomeLabel1=Ongietorri [name] Instalatzeko Morroira +WelcomeLabel2=Programa honek [name/ver] zure konputagailuan instalatuko du.%n%nGomendagarria da jarraitu aurretik gainontzeko aplikazioak ixtea. + +; *** "Password" wizard page +WizardPassword=Pasahitza +PasswordLabel1=Instalaketa hau pasahitzez babesturik dago. +PasswordLabel3=Sartu pasahitza, ondoren klikatu Hurrengoa jarraitzeko. Pasahitzetan maiuskulak bereizten dira. +PasswordEditLabel=&Pasahitza: +IncorrectPassword=Sartu duzun pasahitza ez da zuzena. Saiatu berriro. + +; *** "License Agreement" wizard page +WizardLicense=Lizentziaren Onarpena +LicenseLabel=Irakurri ondorengo argibide garrantzitsu hauek jarraitu aurretik. +LicenseLabel3=Irakurri ondorengo Lizentziaren Onarpena. Lizentzia honen baldintzak onartu behar dituzu instalaketaren jarraitu aurretik. +LicenseAccepted=Lizentziaren baldintzak &onartzen ditut +LicenseNotAccepted=&Ez ditut lizentziaren baldintzak onartzen + +; *** "Information" wizard pages +WizardInfoBefore=Argibideak +InfoBeforeLabel=Irakurri ondorengo argibide garrantzitsu hauek jarraitu aurretik. +InfoBeforeClickLabel=Instalaketarekin jarraitzeko gertu egotean, klikatu Hurrengoa. +WizardInfoAfter=Argibideak +InfoAfterLabel=Irakurri ondorengo argibide garrantzitsu hauek jarraitu aurretik. +InfoAfterClickLabel=Instalaketarekin jarraitzeko gertu egotean, klikatu Hurrengoa. + +; *** "User Information" wizard page +WizardUserInfo=Erabiltzailearen Datuak +UserInfoDesc=Sartu zure datuak. +UserInfoName=&Erabiltzaile Izena: +UserInfoOrg=E&rakundea: +UserInfoSerial=&Serie Zenbakia: +UserInfoNameRequired=Izen bat sartu behar duzu. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Hautatu Helburu Direktorioa +SelectDirDesc=Non instalatu beharko litzateke [name]? +SelectDirLabel3=Instalatzaileak [name] ondorengo karpetan instalatuko du. +SelectDirBrowseLabel=Jarraitzeko, klikatu Hurrengoa. Beste karpeta bat hautatu nahi baduzu, klikatu Arakatu. +DiskSpaceMBLabel=Gutxienez [mb] MBko toki hutsa behar da diskan. +ToUNCPathname=Instalatzaileak ezin du UNC bideizen baten instalatu. Sarean instalatzen saiatzen ari bazara, sareko diska bat mapeatu beharko duzu. +InvalidPath=Bideizen oso bat sartu behar duzu, unitate hizki eta guzti; adibidez:%n%nC:\APP%n%nedo UNC bideizen bat honela:%n%n\\zerbitzaria\elkarbanatua +InvalidDrive=Hautatu duzun unitatea edo UNC elkarbanatua ez dago edo ezin da bertara sartu. Hautatu beste bat. +DiskSpaceWarningTitle=Ez Dago Behar Beste Toki Diskan +DiskSpaceWarning=Instalatzaileak gutxienez %1 KBko toki hutsa behar du instalatzeko, baina hautaturiko unitateak %2 KB soilik ditu hutsik.%n%nHala ere jarraitu nahi duzu? +DirNameTooLong=Karpetaren izena edo bideizena luzeegia da. +InvalidDirName=Karpetaren izena ez da zuzena. +BadDirName32=Karpetaren izenak ezin dezake ondorengo karaktereetarik bat ere eduki:%n%n%1 +DirExistsTitle=Karpeta Badago +DirExists=Karpeta hau:%n%n%1%n%nlehendik ere badago. Hala ere bertan instalatu nahi duzu? +DirDoesntExistTitle=Karpeta Ez Dago +DirDoesntExist=Karpeta hau:%n%n%1%n%nez dago. Sortu nahi duzu? + +; *** "Select Components" wizard page +WizardSelectComponents=Hautatu Osagaiak +SelectComponentsDesc=Zein osagai instalatu behar dira? +SelectComponentsLabel2=Hautatu instalatu nahi dituzun osagaiak; garbitu instalatu nahi ez dituzunak. Klikatu Hurrengoa jarraitzeko gertu egotean. +FullInstallation=Guztia instalatu +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Instalaketa Trinkoa +CustomInstallation=Instalaketa Pertsonalizatua +NoUninstallWarningTitle=Osagai Hauek Badituzu +NoUninstallWarning=Instalatzaileak nabaritu du ondorengo osagaiok jadanik konputagailuan instalaturik dituzula:%n%n%1%n%nOsagai hauek ez aukeratzeak ez ditu desinstalatuko.%n%nHala ere jarraitu nahi duzu? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Uneko aukeraketak gutxienez [mb] MBko toki hutsa behar du diskan. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Hautatu Ataza Gehigarriak +SelectTasksDesc=Zein ataza gehigarri burutu behar dira? +SelectTasksLabel2=Hautatu [name] instalatu bitartean instalatzaileak burutu beharreko ataza gehigarriak, ondoren klikatu Hurrengoa. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Hautatu Hasi Menuko Karpeta +SelectStartMenuFolderDesc=Non sortu behar ditu instalatzaileak programaren lasterbideak? +SelectStartMenuFolderLabel3=Instalatzaileak Hasi Menuko ondorengo karpetan sortuko ditu programaren lasterbideak. +SelectStartMenuFolderBrowseLabel=Jarraitzeko, klikatu Hurrengoa. Beste karpeta bat hautatu nahi baduzu, klikatu Arakatu. +MustEnterGroupName=Karpeta izen bat sartu behar duzu. +GroupNameTooLong=Karpetaren izena edo bideizena luzeegia da. +InvalidGroupName=Karpetaren izena ez da zuzena. +BadGroupName=Karpetaren izenak ezin dezake ondorengo karaktereetarik bat ere eduki:%n%n%1 +NoProgramGroupCheck2=&Ez sortu Hasi Menuko karpetarik + +; *** "Ready to Install" wizard page +WizardReady=Instalatzeko Gertu +ReadyLabel1=Instalatzailea [name] zure konputagailuan instalatzen hasteko gertu dago. +ReadyLabel2a=Klikatu Instalatu instalaketarekin jarraitzeko, edo klikatu Aurrekoa ezarpenen bat berrikusi edo aldatu nahi baduzu. +ReadyLabel2b=Klikatu Instalatu instalaketarekin jarraitzeko. +ReadyMemoUserInfo=Erabiltzailearen datuak: +ReadyMemoDir=Helburu direktorioa: +ReadyMemoType=Instalaketa mota: +ReadyMemoComponents=Hautaturiko osagaiak: +ReadyMemoGroup=Hasi Menuko karpeta: +ReadyMemoTasks=Ataza gehigarriak: + +; *** "Preparing to Install" wizard page +WizardPreparing=Instalatzeko Gertatzen +PreparingDesc=Instalatzailea [name] zure konputagailuan instalatzeko gertatzen ari da. +PreviousInstallNotCompleted=Aurreko programa baten instalaketa/desinstalaketa ez da burutu. Instalaketa hura burutzeko konputagailua berrabiarazi beharko duzu.%n%nKonputagailua berrabiarazi ondoren, ireki instalatzailea berriro [name] instalatzen bukatzeko. +CannotContinue=Ezinezkoa da instalaketarekin jarraitzea. Klikatu Utzi irteteko. + +; *** "Installing" wizard page +WizardInstalling=Instalatzen +InstallingLabel=Itxaron instalatzaileak [name] zure konputagailuan instalatu artean. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=[name] Instalatzeko Morroia Burutzen +FinishedLabelNoIcons=Instalatzaileak [name] zure konputagailuan instalatu du. +FinishedLabel=Instalatzaileak [name] zure konputagailuan instalatu du. Aplikazioa abiarazteko instalaturiko ikonoetan klikatu. +ClickFinish=Klikatu Amaitu instalatzailetik irteteko. +FinishedRestartLabel=[name] programaren instalaketa burutzeko, instalatzaileak konputagailua berrabiarazi beharra du. Orain berrabiarazi nahi duzu? +FinishedRestartMessage=[name] programaren instalaketa burutzeko, instalatzaileak konputagailua berrabiarazi beharra du.%n%nOrain berrabiarazi nahi duzu? +ShowReadmeCheck=Bai, IRAKURRI fitxategia ikusi nahi dut +YesRadio=&Bai, berrabiarazi orain +NoRadio=&Ez, beranduago berrabiaraziko dut +; used for example as 'Run MyProg.exe' +RunEntryExec=Abiarazi %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Ikusi %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Instalatzaileak Hurrengo Diska Behar Du +SelectDiskLabel2=Sartu %1. diska eta klikatu Ados.%n%nDiska honetako fitxategiak ez badaude azpian ageri den karpetan, sartu bideizen egokia edo klikatu Arakatu. +PathLabel=&Bideizena: +FileNotInDir2="%1" fitxategia ezin izan da "%2" karpetan aurkitu. Sartu diska zuzena edo hautatu beste karpeta bat. +SelectDirectoryLabel=Zehaztu hurrengo diskaren kokapena. + +; *** Installation phase messages +SetupAborted=Instalaketa ez da burutu.%n%nKonpondu arazoa eta abiarazi instalatzailea berriro. +EntryAbortRetryIgnore=Klikatu Saiatu Berriz berriro saiatzeko, Ezikusi hala ere jarraitzeko, edo Utzi instalaketa uzteko. + +; *** Installation status messages +StatusCreateDirs=Direktorioak sortzen... +StatusExtractFiles=Fitxategiak ateratzen... +StatusCreateIcons=Lasterbideak sortzen... +StatusCreateIniEntries=INI sarrerak sortzen... +StatusCreateRegistryEntries=Erregistroko sarrerak sortzen... +StatusRegisterFiles=Fitxategiak erregistratzen... +StatusSavingUninstall=Desinstalaketarako datuak gordetzen... +StatusRunProgram=Instalaketa burutzen... +StatusRollback=Aldaketak desegiten... + +; *** Misc. errors +ErrorInternal2=Barneko akatsa: %1 +ErrorFunctionFailedNoCode=Hutsegitea: %1 +ErrorFunctionFailed=Hutsegitea: %1; Kodea: %2 +ErrorFunctionFailedWithMessage=Hutsegitea: %1; Kodea: %2.%n%3 +ErrorExecutingProgram=Ezin izan da fitxategi hau abiarazi:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Akatsa erregistroko gakoa irekitzean:%n%1\%2 +ErrorRegCreateKey=Akatsa erregistroko gakoa sortzean:%n%1\%2 +ErrorRegWriteKey=Akatsa erregistroko gakoa idaztean:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Akatsa "%1" fitxategian INI sarrera sortzean. + +; *** File copying errors +FileAbortRetryIgnore=Klikatu Saiatu Berriz berriro saiatzeko, Ezikusi fitxategi hau saltatzeko (ez da gomendagarria), edo Utzi instalaketa uzteko. +FileAbortRetryIgnore2=Klikatu Saiatu Berriz berriro saiatzeko, Ezikusi hala ere jarraitzeko (ez da gomendagarria), edo Utzi instalaketa uzteko. +SourceIsCorrupted=Iturburu fitxategia hondaturik dago +SourceDoesntExist=Ez dago "%1" izeneko iturburu fitxategirik +ExistingFileReadOnly=Lehendik zegoen fitxategia irakurtzeko-soilik gisa markaturik dago.%n%nKlikatu Saiatu Berriz irakurtzeko-soilik atributua ezabatu eta berriro saiatzeko, Ezikusi fitxategi hau saltatzeko, edo Utzi instalaketa uzteko. +ErrorReadingExistingDest=Akats bat izan da lehendik zegoen fitxategi hau irakurtzean: +FileExists=Fitxategia lehendik ere bazegoen.%n%nInstalatzaileak gainidatzi dezan nahi duzu? +ExistingFileNewer=Lehendik zegoen fitxategia Instalatzaileak instalatu nahi duena baino berriagoa da. Lehendik zegoena mantentzea gomendatzen da.%n%nLehengoa mantendu nahi duzu? +ErrorChangingAttr=Akats bat izan da lehendik zegoen fitxategi honen atributuak aldatzean: +ErrorCreatingTemp=Akats bat izan da ondorengo helburu direktorioan fitxategi bat sortzean: +ErrorReadingSource=Akats bat izan da iturburu fitxategia irakurtzean: +ErrorCopying=Akats bat izan da fitxategi hau kopiatzean: +ErrorReplacingExistingFile=Akats bat izan da lehendik zegoen fitxategi hau ordezkatzean: +ErrorRestartReplace=RestartReplacek huts egin du: +ErrorRenamingTemp=Akats bat izan da ondorengo helburu direktorioan fitxategi bat berrizendatzean: +ErrorRegisterServer=Ezinezkoa izan da DLL/OCX hau erregistratzea: %1 +ErrorRegSvr32Failed=RegSvr32k huts egin du %1 itxiera kodea emanez +ErrorRegisterTypeLib=Ezinezkoa izan da moten liburutegi hau erregistratzea: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Akats bat izan da IRAKURRI fitxategia irekitzean. +ErrorRestartingComputer=Instalatzaileak ezin izan du konputagailua berrabiarazi. Egin ezazu eskuz. + +; *** Uninstaller messages +UninstallNotFound=Ez da "%1" fitxategia aurkitu. Ezin izan da desinstalatu. +UninstallOpenError=Ezin izan da "%1" ireki. Ezin izan da desinstalatu +UninstallUnsupportedVer=Desinstalaketarako "%1" log fitxategia instalatzailearen bertsio honek ezagutzen ez duen formatu batean dago. Ezin izan da desinstalatu +UninstallUnknownEntry=Sarrera ezezagun bat (%1) aurkitu da desinstalaketarako logean +ConfirmUninstall=Ziur %1 eta bere osagai guztiak ezabatu nahi dituzula? +UninstallOnlyOnWin64=Instalaketa hau 64-biteko Windowsean soilik desinstala daiteke. +OnlyAdminCanUninstall=Instalaketa hau administratzaile eskumenak dituen erabiltzaile batek soilik desinstala dezake. +UninstallStatusLabel=Itxaron %1 zure konputagailutik ezabatzen den artean. +UninstalledAll=%1 arrakastatsuki ezabatu da zure konputagailutik. +UninstalledMost=%1 desinstalatu da.%n%nZenbait fitxategi ezin izan dira ezabatu. Fitxategi hauek eskuz ezaba daitezke. +UninstalledAndNeedsRestart=%1 guztiz desinstalatzeko, zure konputagailua berrabiarazi beharra dago.%n%nOrain berrabiarazi nahi duzu? +UninstallDataCorrupted="%1" fitxategia hondaturik dago. Ezin izan da desinstalatu + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Fitxategi Elkarbanatua Ezabatu? +ConfirmDeleteSharedFile2=Sistemaren arabera ondorengo fitxategi elkarbanatua ez du inongo programak erabiliko hemendik aurrera. Desinstalatzaileak fitxategi hau ezabatu nahi duzu?%n%nProgramaren bat fitxategi hau erabiltzen badabil oraindik eta ezabatzen baduzu, programa hori ez da egoki ibiliko. Ziur ez bazaude, hautatu Ez. Fitxategia sisteman uzteak ez dizu inongo kalterik eragingo. +SharedFileNameLabel=Fitxategi izena: +SharedFileLocationLabel=Kokapena: +WizardUninstalling=Desinstalaketaren Egoera +StatusUninstalling=Orain desinstalatzen: %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 %2 bertsioa +AdditionalIcons=Ikono gehigarriak: +CreateDesktopIcon=&Mahaigainean lasterbidea sortu +CreateQuickLaunchIcon=&Ataza Barran lasterbidea sortu +ProgramOnTheWeb=%1 sarean +UninstallProgram=%1 desinstalatu +LaunchProgram=%1 abiarazi +AssocFileExtension=&Lotu %1 programa %2 fitxategi luzapenarekin +AssocingFileExtension=%1 programa %2 fitxategi luzapenarekin lotzen... diff --git a/Files/Languages/BrazilianPortuguese.isl b/Files/Languages/BrazilianPortuguese.isl new file mode 100644 index 000000000..e9afdf7d8 --- /dev/null +++ b/Files/Languages/BrazilianPortuguese.isl @@ -0,0 +1,341 @@ +; *************************************************************** +; *** *** +; *** Inno Setup version 5.1.11+ Portuguese (Brazil) messages *** +; *** *** +; *** Original Author: *** +; *** *** +; *** Paulo Andre Rosa (parosa@gmail.com) *** +; *** *** +; *** Maintainer: *** +; *** *** +; *** Jeferson Oliveira (jefersonfoliveira@gmail.com) *** +; *** *** +; *** Contributors: *** +; *** *** +; *** Felipe (felipefpl@ig.com.br) *** +; *** *** +; *************************************************************** + +; Default.isl version 1.69 + +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; $jrsoftware: issrc/Files/Languages/BrazilianPortuguese.isl,v 1.7 2008/05/21 12:37:37 mlaan Exp $ +; + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=Portugu<00EA>s (Brasil) +LanguageID=$0416 +LanguageCodePage=1252 + +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +;WelcomeFontName=Verdana +;WelcomeFontSize=12 +;TitleFontName=Arial +;TitleFontSize=29 +;CopyrightFontName=Arial +;CopyrightFontSize=8 + +[Messages] + +; *** Application titles +SetupAppTitle=Programa de Instalação +SetupWindowTitle=%1 - Programa de Instalação +UninstallAppTitle=Desinstalar +UninstallAppFullTitle=Desinstalar %1 + +; *** Misc. common +InformationTitle=Informação +ConfirmTitle=Confirmação +ErrorTitle=Erro + +; *** SetupLdr messages +SetupLdrStartupMessage=Este programa irá instalar %1. Você quer continuar? +LdrCannotCreateTemp=Não foi possível criar um arquivo temporário. Instalação cancelada +LdrCannotExecTemp=Não foi possível executar um arquivo na pasta de arquivos temporários. Instalação cancelada + +; *** Startup error messages +LastErrorMessage=%1.%n%nErro %2: %3 +SetupFileMissing=O arquivo %1 não se encontra no diretório de instalação. Por favor, corrija o problema ou obtenha uma nova cópia do programa. +SetupFileCorrupt=Os arquivos de instalação estão corrompidos. Por favor, obtenha uma nova cópia do programa. +SetupFileCorruptOrWrongVer=Os arquivos de instalação estão corrompidos ou são incompatíveis com esta versão do Instalador. Por favor, corrija o problema ou obtenha uma nova cópia do programa. +NotOnThisPlatform=Este programa não executará no %1. +OnlyOnThisPlatform=Este programa deve ser executado no %1. +OnlyOnTheseArchitectures=Este programa só pode ser instalado em versões do Windows projetadas para as seguintes arquiteturas de processador:%n%n%1 +MissingWOW64APIs=A versão do Windows que você está executando não inclui a funcionalidade requerida pelo Programa de Instalação para realizar uma instalação de 64 bits. Para corrigir este problema, por favor instale o Service Pack %1. +WinVersionTooLowError=Este programa requer %1 versão %2 ou posterior. +WinVersionTooHighError=Este programa não pode ser instalado em %1 versão %2 ou posterior. +AdminPrivilegesRequired=Você deve estar logado como um administrador para instalar este programa. +PowerUserPrivilegesRequired=Você deve estar logado como um administrador ou como membro do grupo Usuários Avançados para instalar este programa. +SetupAppRunningError=O Programa de Instalação detectou que %1 está sendo executado.%n%nPor favor, feche todas as instâncias do programa agora e clique em OK para continuar, ou em Cancelar para sair. +UninstallAppRunningError=O Desinstalador detectou que %1 está em execução atualmente.%n%nPor favor, feche todas as instâncias dele agora, então clique em OK para continuar, ou em Cancelar para sair. + +; *** Misc. errors +ErrorCreatingDir=O Programa de Instalação foi incapaz de criar o diretório "%1" +ErrorTooManyFilesInDir=Incapaz de criar um arquivo no diretório "%1" porque ele contém arquivos demais + +; *** Setup common messages +ExitSetupTitle=Sair do Programa de Instalação +ExitSetupMessage=A Instalação não foi concluída. Se você sair agora, o programa não será instalado.%n%nVocê pode executar o Programa de instalação novamente em outra hora, para concluir a instalação.%n%nSair do Programa de Instalação? +AboutSetupMenuItem=&Sobre o Programa de Instalação... +AboutSetupTitle=Sobre o Programa de Instalação +AboutSetupMessage=%1 versão %2%n%3%n%n%1 página na internet:%n%4 +AboutSetupNote= +TranslatorNote= + +; *** Buttons +ButtonBack=< &Voltar +ButtonNext=&Avançar > +ButtonInstall=&Instalar +ButtonOK=OK +ButtonCancel=Cancelar +ButtonYes=&Sim +ButtonYesToAll=Sim para &Todos +ButtonNo=&Não +ButtonNoToAll=Nã&o para Todos +ButtonFinish=&Concluir +ButtonBrowse=&Procurar... +ButtonWizardBrowse=P&rocurar... +ButtonNewFolder=&Criar Nova Pasta + +; *** "Select Language" dialog messages +SelectLanguageTitle=Selecionar Idioma do Programa de Instalação +SelectLanguageLabel=Selecione o idioma a ser utilizado durante a instalação: + +; *** Common wizard text +ClickNext=Clique em Avançar para continuar, ou em Cancelar para sair do Programa de Instalação. +BeveledLabel= +BrowseDialogTitle=Procurar Pasta +BrowseDialogLabel=Selecione uma pasta na lista abaixo e clique em OK. +NewFolderName=Nova Pasta + +; *** "Welcome" wizard page +WelcomeLabel1=Bem-vindo ao Assistente de Instalação de [name] +WelcomeLabel2=Este Assistente irá instalar [name/ver] no seu computador.%n%nÉ recomendado que você feche todos os outros aplicativos antes de continuar. + +; *** "Password" wizard page +WizardPassword=Senha +PasswordLabel1=Esta instalação é protegida por senha. +PasswordLabel3=Por favor, forneça a senha e clique em Avançar para continuar. As senhas diferenciam maiúsculas de minúsculas. +PasswordEditLabel=&Senha: +IncorrectPassword=A senha que você informou não é correta. Por favor, tente novamente. + +; *** "License Agreement" wizard page +WizardLicense=Contrato de Licença de Uso +LicenseLabel=Por favor, leia as seguintes informações importantes antes de continuar. +LicenseLabel3=Por favor, leia o seguinte Contrato de Licença de Uso. Você deve aceitar os termos do Contrato antes de prosseguir com a instalação. +LicenseAccepted=Eu aceito os termos do &Contrato +LicenseNotAccepted=Eu &não aceito os termos do Contrato + +; *** "Information" wizard pages +WizardInfoBefore=Informação +InfoBeforeLabel=Por favor, leia as seguintes informações importantes antes de continuar. +InfoBeforeClickLabel=Quando você estiver pronto para continuar, clique em Avançar. +WizardInfoAfter=Informação +InfoAfterLabel=Por favor, leia as seguintes informações importantes antes de continuar. +InfoAfterClickLabel=Quando você estiver pronto para continuar, clique Avançar. + +; *** "User Information" wizard page +WizardUserInfo=Informações do Usuário +UserInfoDesc=Por favor, insira suas informações. +UserInfoName=&Nome do Usuário: +UserInfoOrg=&Empresa: +UserInfoSerial=Número de &Série: +UserInfoNameRequired=Você deve informar um nome. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Selecione o Local de Destino +SelectDirDesc=Onde [name] deve ser instalado? +SelectDirLabel3=O Programa de Instalação irá instalar [name] na seguinte pasta. +SelectDirBrowseLabel=Para continuar, clique em Avançar. Se você deseja escolher uma pasta diferente, clique em Procurar. +DiskSpaceMBLabel=São necessários pelo menos [mb] MB de espaço livre em disco. +ToUNCPathname=O Programa de Instalação não pode fazer a instalação num caminho de rede UNC. Se você estiver tentando instalar num local de rede, deverá mapear uma unidade de rede. +InvalidPath=Você deve informar um caminho completo, incluindo a letra da unidade de disco; por exemplo:%n%nC:\APP%n%e não um caminho de rede UNC na forma:%n%n\\servidor\compartilhamento +InvalidDrive=A unidade de disco ou compartilhamento de rede UNC que você selecionou não existe ou não está acessível. Por favor, selecione outro local. +DiskSpaceWarningTitle=Espaço em Disco Insuficiente +DiskSpaceWarning=O Programa de Instalação requer pelo menos %1 KB de espaço livre, mas a unidade de disco selecionada tem apenas %2 KB disponíveis.%n%nVocê quer continuar assim mesmo? +DirNameTooLong=O nome da pasta ou caminho é muito longo. +InvalidDirName=O nome da pasta não é válido. +BadDirName32=Nomes de pastas não podem incluir quaisquer dos seguintes caracteres:%n%n%1 +DirExistsTitle=A Pasta Existe +DirExists=A pasta:%n%n%1%n%njá existe. Você quer instalar nesta pasta assim mesmo? +DirDoesntExistTitle=A Pasta Não Existe +DirDoesntExist=A pasta:%n%n%1%n%nnão existe. Você gostaria que a pasta fosse criada? + +; *** "Select Components" wizard page +WizardSelectComponents=Selecionar Componentes +SelectComponentsDesc=Quais componentes devem ser instalados? +SelectComponentsLabel2=Selecione os componentes que você quer instalar; desmarque os componentes que você não quer instalar. Clique em Avançar quando estiver pronto para continuar. +FullInstallation=Instalação completa +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Instalação compacta +CustomInstallation=Instalação personalizada +NoUninstallWarningTitle=Componente Existe +NoUninstallWarning=O Programa de Instalação detectou que os seguintes componentes já estão instalados em seu computador:%n%n%1%n%nDesmarcar estes componentes, não irá desinstalar eles.%n%nVocê quer continuar assim mesmo? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=A seleção atual requer pelo menos [mb] MB de espaço em disco. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Selecionar Tarefas Adicionais +SelectTasksDesc=Quais tarefas adicionais devem ser executadas? +SelectTasksLabel2=Selecione as tarefas adicionais que você deseja que o Programa de Instalação execute enquanto instala [name] e clique em Avançar. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Selecionar a Pasta do Menu Iniciar +SelectStartMenuFolderDesc=Onde o Programa de Instalação deve colocar os atalhos do programa? +SelectStartMenuFolderLabel3=O Programa de Instalação irá criar os atalhos do programa na seguinte pasta do Menu Iniciar. +SelectStartMenuFolderBrowseLabel=Clique em Avançar para continuar. Se você quiser escolher outra pasta, clique em Procurar. +MustEnterGroupName=Você deve informar um nome de pasta. +GroupNameTooLong=O nome da pasta ou caminho é muito longo. +InvalidGroupName=O nome da pasta não é válido. +BadGroupName=O nome da pasta não pode incluir quaisquer dos seguintes caracteres:%n%n%1 +NoProgramGroupCheck2=&Não criar uma pasta no Menu Iniciar + +; *** "Ready to Install" wizard page +WizardReady=Pronto para Instalar +ReadyLabel1=O Programa de Instalação está pronto para começar a instalação de [name] no seu computador. +ReadyLabel2a=Clique Instalar para iniciar a instalação, ou clique em Voltar se você quer revisar ou alterar alguma configuração. +ReadyLabel2b=Clique em Instalar para iniciar a instalação. +ReadyMemoUserInfo=Dados do Usuário: +ReadyMemoDir=Local de destino: +ReadyMemoType=Tipo de Instalação: +ReadyMemoComponents=Componentes selecionados: +ReadyMemoGroup=Pasta do Menu Iniciar: +ReadyMemoTasks=Tarefas adicionais: + +; *** "Preparing to Install" wizard page +WizardPreparing=Preparando para Instalar +PreparingDesc=O Programa de Instalação está se preparando para instalar [name] no seu computador. +PreviousInstallNotCompleted=A instalação/remoção de um programa anterior não foi concluída. Você precisará reiniciar seu computador para finalizá-la.%n%nApós reiniciar o computador, execute novamente o Programa de Instalação para concluir a instalação de [name]. +CannotContinue=O Programa de Instalação não pode continuar. Por favor, clique em Cancelar para sair. + +; *** "Installing" wizard page +WizardInstalling=Instalando +InstallingLabel=Por favor, aguarde enquanto o Programa de Instalação instala [name] no seu computador. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Finalizando o Assistente de Instalação de [name] +FinishedLabelNoIcons=O Programa de Instalação finalizou a instalação de [name] no seu computador. +FinishedLabel=O Programa de Instalação terminou de instalar [name] no seu computador. O programa pode ser iniciado clicando nos ícones instalados. +ClickFinish=Clique em Concluir para sair do Programa de Instalação. +FinishedRestartLabel=Para concluir a instalação de [name], o Programa de Instalação deve reiniciar o computador. Você gostaria de reiniciar agora? +FinishedRestartMessage=Para concluir a instalação de [name], o Programa de Instalação deve reiniciar o computador.%n%nVocê gostaria de reiniciar agora? +ShowReadmeCheck=Sim, eu quero visualizar o arquivo LEIA-ME +YesRadio=&Sim, reiniciar o computador agora +NoRadio=&Não, eu vou reiniciar o computador depois +; used for example as 'Run MyProg.exe' +RunEntryExec=Executar %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Visualizar %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=O Programa de Instalação Precisa do Próximo Disco +SelectDiskLabel2=Por favor, insira o Disco %1 e clique em OK.%n%nSe os arquivos deste disco estão numa pasta diferente da indicada abaixo, informe o caminho correto ou clique em Procurar. +PathLabel=&Caminho: +FileNotInDir2=O arquivo "%1" não pôde ser encontrado em "%2". Por favor, insira o disco correto ou escolha outra pasta. +SelectDirectoryLabel=Por favor, informe o local do próximo disco. + +; *** Installation phase messages +SetupAborted=A instalação não foi concluída.%n%nPor favor, corrija o problema e execute novamente o Programa de Instalação. +EntryAbortRetryIgnore=Clique Repetir para tentar novamente, Ignorar para continuar assim mesmo, or Cancelar para cancelar a instalação. + +; *** Installation status messages +StatusCreateDirs=Criando diretórios... +StatusExtractFiles=Extraindo arquivos... +StatusCreateIcons=Criando atalhos... +StatusCreateIniEntries=Criando entradas INI... +StatusCreateRegistryEntries=Criando entradas no Registro... +StatusRegisterFiles=Registrando arquivos... +StatusSavingUninstall=Salvando informações de desinstalação... +StatusRunProgram=Finalizando a instalação... +StatusRollback=Desfazendo as alterações efetuadas... + +; *** Misc. errors +ErrorInternal2=Erro interno: %1 +ErrorFunctionFailedNoCode=%1 falhou +ErrorFunctionFailed=%1 falhou; código %2 +ErrorFunctionFailedWithMessage=%1 falhou; código %2.%n%3 +ErrorExecutingProgram=Não foi possível executar o arquivo:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Erro ao abrir a chave do registro:%n%1\%2 +ErrorRegCreateKey=Erro ao criar a chave do registro:%n%1\%2 +ErrorRegWriteKey=Erro ao escrever na chave do registro:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Erro ao criar entrada INI no arquivo "%1". + +; *** File copying errors +FileAbortRetryIgnore=Clique em Repetir para tentar novamente, em Ignorar para ignorar este arquivo (não recomendado) ou em Cancelar para cancelar a instalação. +FileAbortRetryIgnore2=Clique em Repetir para tentar novamente, em Ignorar para ignorar este arquivo (não recomendado) ou em Cancelar para cancelar a instalação. +SourceIsCorrupted=O arquivo de origem está corrompido +SourceDoesntExist=O arquivo de origem "%1" não existe +ExistingFileReadOnly=O arquivo existente está marcado como somente leitura.%n%nClique em Repetir para remover o atributo de somente leitura e tentar novamente, em Ignorar para ignorar este arquivo, ou em Anular para cancelar a instalação. +ErrorReadingExistingDest=Ocorreu um erro ao tentar ler o arquivo existente: +FileExists=O arquivo já existe.%n%nVocê quer que o Programa de Instalação sobrescreva o arquivo? +ExistingFileNewer=O arquivo já existente é mais recente do que o arquivo que o Programa de Instalação está tentando instalar. Recomenda-se que você mantenha o arquivo existente.%n%nVocê quer manter o arquivo existente? +ErrorChangingAttr=Ocorreu um erro ao tentar modificar os atributos do arquivo existente: +ErrorCreatingTemp=Ocorreu um erro ao tentar criar um arquivo nao diretório de destino: +ErrorReadingSource=Ocorreu um erro ao tentar ler o arquivo de origem: +ErrorCopying=Ocorreu um erro ao tentar copiar um arquivo: +ErrorReplacingExistingFile=Ocorreu um erro ao tentar substituir o arquivo existente: +ErrorRestartReplace=Reiniciar/Substituir falhou: +ErrorRenamingTemp=Ocorreu um erro ao tentar renomear um arquivo no diretório de destino: +ErrorRegisterServer=Não foi possível registrar a DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 falhou com o código de saída %1 +ErrorRegisterTypeLib=Não foi possível registrar a biblioteca de tipos: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Ocorreu um erro ao tentar abrir o arquivo LEIA-ME. +ErrorRestartingComputer=O Programa de Instalação não conseguiu reiniciar o computador. Por favor, reinicie o computador manualmente. + +; *** Uninstaller messages +UninstallNotFound=O arquivo "%1" não existe. Não é possível desinstalar. +UninstallOpenError=O arquivo "%1" não pode ser aberto. Não é possível desinstalar +UninstallUnsupportedVer=O arquivo de log de desinstalação "%1" está num formato não reconhecido por esta versão do desinstalador. Não é possível desinstalar +UninstallUnknownEntry=Foi encontrada uma entrada desconhecida (%1) no arquivo de log de desinstalação +ConfirmUninstall=Você tem certeza que deseja remover completamente %1 e todos os seus componentes? +UninstallOnlyOnWin64=Esta instalação não pode ser desinstalada em Windows 64 bits. +OnlyAdminCanUninstall=Esta instalação só pode ser desinstalada por usuários com direitos administrativos. +UninstallStatusLabel=Por favor, aguarde enquanto %1 é removido do seu computador. +UninstalledAll=%1 foi removido com sucesso do seu computador. +UninstalledMost=A desinstalação de %1 foi concluída.%n%nAlguns elementos não puderam ser removidos. Estes podem ser removidos manualmente. +UninstalledAndNeedsRestart=Para concluir a desinstalação de %1, o computador deve ser reiniciado.%n%nVocê quer que o computador seja reiniciado agora? +UninstallDataCorrupted=O arquivo "%1" está corrompido. Não é possível desinstalar + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Remover Arquivo Compartilhado? + +ConfirmDeleteSharedFile2=O sistema indica que o seguinte arquivo compartilhado não está mais em uso por nenhum outro programa. Você quer que a desinstalação remova este arquivo compartilhado?%n%nSe ainda houver programas utilizando este arquivo e ele for removido, esses programas poderão não funcionar corretamente. Se você não tem certeza, escolha Não. Manter o arquivo no seu computador não trará prejuízo algum. + +SharedFileNameLabel=Nome do arquivo: +SharedFileLocationLabel=Local: +WizardUninstalling=Status da Desinstalação +StatusUninstalling=Desinstalando %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 versão %2 +AdditionalIcons=Ícones adicionais: +CreateDesktopIcon=Criar um ícone na Área de &Trabalho +CreateQuickLaunchIcon=Criar um ícone na &Barra de Inicialização Rápida +ProgramOnTheWeb=%1 na Internet +UninstallProgram=Desinstalar %1 +LaunchProgram=Executar %1 +AssocFileExtension=Associar %1 com a e&xtensão de arquivo %2 +AssocingFileExtension=Associando %1 com a extensão de arquivo... diff --git a/Files/Languages/Catalan.isl b/Files/Languages/Catalan.isl new file mode 100644 index 000000000..69a9c19e8 --- /dev/null +++ b/Files/Languages/Catalan.isl @@ -0,0 +1,302 @@ +; *** Inno Setup 5.1.11+ Catalan messages *** +; +; Translated by Carles Millan (email: carles at carlesmillan dot cat) +; +; $jrsoftware: issrc/Files/Languages/Catalan.isl,v 1.15 2007/10/22 11:52:47 mlaan Exp $ + +[LangOptions] + +LanguageName=Catal<00E0> +LanguageID=$0403 +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Instal·lació +SetupWindowTitle=Instal·lació - %1 +UninstallAppTitle=Desinstal·lació +UninstallAppFullTitle=Desinstal·la %1 + +; *** Misc. common +InformationTitle=Informació +ConfirmTitle=Confirmació +ErrorTitle=Error + +; *** SetupLdr messages +SetupLdrStartupMessage=Aquest programa instal·larà %1. Voleu continuar? +LdrCannotCreateTemp=No s'ha pogut crear un fitxer temporal. Instal·lació cancel·lada +LdrCannotExecTemp=No s'ha pogut executar el fitxer a la carpeta temporal. Instal·lació cancel·lada + +; *** Startup error messages +LastErrorMessage=%1.%n%nError %2: %3 +SetupFileMissing=El fitxer %1 no es troba a la carpeta d'instal·lació. Si us plau, resoleu el problema o obteniu una nova còpia del programa. +SetupFileCorrupt=Els fitxers d'instal·lació estan corromputs. Si us plau, obteniu una nova còpia del programa. +SetupFileCorruptOrWrongVer=Els fitxers d'instal·lació estan espatllats, o són incompatibles amb aquesta versió del programa. Si us plau, resoleu el problema o obteniu una nova còpia del programa. +NotOnThisPlatform=Aquest programa no funcionarà sota %1. +OnlyOnThisPlatform=Aquest programa només pot ser executat sota %1. +OnlyOnTheseArchitectures=Aquest programa només pot ser instal·lat en versions de Windows dissenyades per a les següents arquitectures de processador:%n%n%1 +MissingWOW64APIs=Aquesta versió de Windows no conté la funcionalitat necessària per a realitzar una instal·lació de 64 bits. Per tal de corregir aquest problema, si us plau, instal·leu el Service Pack %1. +WinVersionTooLowError=Aquest programa requereix %1 versió %2 o posterior. +WinVersionTooHighError=Aquest programa no pot ser instal·lat sota %1 versió %2 o posterior. +AdminPrivilegesRequired=Cal que tingueu privilegis d'administrador per poder instal·lar aquest programa. +PowerUserPrivilegesRequired=Cal que accediu com a administrador o com a membre del grup Power Users en instal·lar aquest programa. +SetupAppRunningError=El programa d'instal·lació ha detectat que %1 s'està executant actualment.%n%nSi us plau, tanqueu el programa i premeu Accepta per a continuar o Cancel·la per a sortir. +UninstallAppRunningError=El programa de desinstal·lació ha detectat que %1 s'està executant en aquest moment.%n%nSi us plau, tanqueu el programa i premeu Accepta per a continuar o Cancel·la per a sortir. + +; *** Misc. errors +ErrorCreatingDir=El programa d'instal·lació no ha pogut crear la carpeta "%1" +ErrorTooManyFilesInDir=No s'ha pogut crear un fitxer a la carpeta "%1" perquè conté massa fitxers + +; *** Setup common messages +ExitSetupTitle=Surt +ExitSetupMessage=La instal·lació no s'ha completat. Si sortiu ara, el programa no serà instal·lat.%n%nPer a completar-la podreu tornar a executar el programa d'instal·lació quan vulgueu.%n%nVoleu sortir-ne? +AboutSetupMenuItem=&Sobre la instal·lació... +AboutSetupTitle=Sobre la instal·lació +AboutSetupMessage=%1 versió %2%n%3%n%nPàgina web de %1:%n%4 +AboutSetupNote= +TranslatorNote=Catalan translation by Carles Millan (carles at carlesmillan.cat) + +; *** Buttons +ButtonBack=< &Enrere +ButtonNext=&Següent > +ButtonInstall=&Instal·la +ButtonOK=Accepta +ButtonCancel=Cancel·la +ButtonYes=&Sí +ButtonYesToAll=Sí a &tot +ButtonNo=&No +ButtonNoToAll=N&o a tot +ButtonFinish=&Finalitza +ButtonBrowse=&Explora... +ButtonWizardBrowse=&Cerca... +ButtonNewFolder=Crea &nova carpeta + +; *** "Select Language" dialog messages +SelectLanguageTitle=Trieu idioma +SelectLanguageLabel=Trieu idioma a emprar durant la instal·lació: + +; *** Common wizard text +ClickNext=Premeu Següent per a continuar o Cancel·la per a abandonar la instal·lació. +BeveledLabel= + +; *** "Welcome" wizard page +BrowseDialogTitle=Trieu una carpeta +BrowseDialogLabel=Trieu la carpeta de destinació i premeu Accepta. +NewFolderName=Nova carpeta +WelcomeLabel1=Benvingut a l'assistent d'instal·lació de [name] +WelcomeLabel2=Aquest programa instal·larà [name/ver] al vostre ordinador.%n%nÉs molt recomanable que abans de continuar tanqueu tots els altres programes oberts, per tal d'evitar conflictes durant el procés d'instal·lació. + +; *** "Password" wizard page +WizardPassword=Contrasenya +PasswordLabel1=Aquesta instal·lació està protegida amb una contrasenya. +PasswordLabel3=Indiqueu la contrasenya i premeu Següent per a continuar. Aquesta contrasenya distingeix entre majúscules i minúscules. +PasswordEditLabel=&Contrasenya: +IncorrectPassword=La contrasenya introduïda no és correcta. Torneu-ho a intentar. + +; *** "License Agreement" wizard page +WizardLicense=Acord de Llicència +LicenseLabel=Cal que llegiu aquesta informació abans de continuar. +LicenseLabel3=Si us plau, llegiu l'Acord de Llicència següent. Cal que n'accepteu els termes abans de continuar amb la instal·lació. +LicenseAccepted=&Accepto l'acord +LicenseNotAccepted=&No accepto l'acord + +; *** "Information" wizard pages +WizardInfoBefore=Informació +InfoBeforeLabel=Si us plau, llegiu la informació següent abans de continuar. +InfoBeforeClickLabel=Quan estigueu preparat per a continuar, premeu Següent +WizardInfoAfter=Informació +InfoAfterLabel=Si us plau, llegiu la informació següent abans de continuar. +InfoAfterClickLabel=Quan estigueu preparat per a continuar, premeu Següent + +; *** "User Information" wizard page +WizardUserInfo=Informació sobre l'usuari +UserInfoDesc=Si us plau, entreu la vostra informació. +UserInfoName=&Nom de l'usuari: +UserInfoOrg=&Organització +UserInfoSerial=&Número de sèrie: +UserInfoNameRequired=Cal que hi entreu un nom + +; *** "Select Destination Location" wizard page +WizardSelectDir=Trieu Carpeta de Destinació +SelectDirDesc=On s'ha d'instal·lar [name]? +SelectDirLabel3=El programa d'instal·lació instal·larà [name] a la carpeta següent. +SelectDirBrowseLabel=Per a continuar, premeu Següent. Si desitgeu triar una altra capeta, premeu Cerca. +DiskSpaceMBLabel=Aquest programa necessita un mínim de [mb] MB d'espai a disc. +ToUNCPathname=La instal·lació no pot instal·lar el programa en una carpeta UNC. Si esteu provant d'instal·lar-lo en xarxa, haureu d'assignar una lletra (D:, E:, etc...) al disc de destinació. +InvalidPath=Cal donar una ruta completa amb lletra d'unitat, per exemple:%n%nC:\Aplicació%n%no bé una ruta UNC en la forma:%n%n\\servidor\compartit +InvalidDrive=El disc o ruta de xarxa seleccionat no existeix, si us plau trieu-ne un altre. +DiskSpaceWarningTitle=No hi ha prou espai al disc +DiskSpaceWarning=El programa d'instal·lació necessita com a mínim %1 KB d'espai lliure, però el disc seleccionat només té %2 KB disponibles.%n%nTot i amb això, desitgeu continuar? +DirNameTooLong=El nom de la carpeta o de la ruta és massa llarg. +InvalidDirName=El nom de la carpeta no és vàlid. +BadDirName32=Un nom de carpeta no pot contenir cap dels caràcters següents:%n%n%1 +DirExistsTitle=La carpeta existeix +DirExists=La carpeta:%n%n%1%n%nja existeix. Voleu instal·lar igualment el programa en aquesta carpeta? +DirDoesntExistTitle=La Carpeta No Existeix +DirDoesntExist=La carpeta:%n%n%1%n%nno existeix. Voleu que sigui creada? + +; *** "Select Program Group" wizard page +WizardSelectComponents=Trieu Components +SelectComponentsDesc=Quins components cal instal·lar? +SelectComponentsLabel2=Trieu els components que voleu instal·lar; elimineu els components que no voleu instal·lar. Premeu Següent per a continuar. +FullInstallation=Instal·lació completa +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Instal·lació compacta +CustomInstallation=Instal·lació personalitzada +NoUninstallWarningTitle=Els components Existeixen +NoUninstallWarning=El programa d'instal·lació ha detectat que els components següents ja es troben al vostre ordinador:%n%n%1%n%nSi no estan seleccionats no seran desinstal·lats.%n%nVoleu continuar igualment? +ComponentSize1=%1 Kb +ComponentSize2=%1 Mb +ComponentsDiskSpaceMBLabel=Aquesta selecció requereix un mínim de [mb] Mb d'espai al disc. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Trieu tasques addicionals +SelectTasksDesc=Quines tasques addicionals cal executar? +SelectTasksLabel2=Trieu les tasques addicionals que voleu que siguin executades mentre s'instal·la [name], i després premeu Següent. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Trieu la carpeta del Menú Inici +SelectStartMenuFolderDesc=On cal situar els enllaços del programa? +SelectStartMenuFolderLabel3=El programa d'instal·lació crearà l'accés directe al programa a la següent carpeta del menú d'Inici. +SelectStartMenuFolderBrowseLabel=Per a continuar, premeu Següent. Si desitgeu triar una altra carpeta, premeu Cerca. +MustEnterGroupName=Cal que hi entreu un nom de carpeta. +GroupNameTooLong=El nom de la carpeta o de la ruta és massa llarg. +InvalidGroupName=El nom de la carpeta no és vàlid. +BadGroupName=El nom del grup no pot contenir cap dels caràcters següents:%n%n%1 +NoProgramGroupCheck2=&No creïs una carpeta al Menú Inici + +; *** "Ready to Install" wizard page +WizardReady=Preparat per a instal·lar +ReadyLabel1=El programa d'instal·lació està preparat per a iniciar la instal·lació de [name] al vostre ordinador. +ReadyLabel2a=Premeu Instal·la per a continuar amb la instal·lació, o Enrere si voleu revisar o modificar les opcions d'instal·lació. +ReadyLabel2b=Premeu Instal·la per a continuar amb la instal·lació. +ReadyMemoUserInfo=Informació de l'usuari: +ReadyMemoDir=Carpeta de destinació: +ReadyMemoType=Tipus d'instal·lació: +ReadyMemoComponents=Components seleccionats: +ReadyMemoGroup=Carpeta del Menú Inici: +ReadyMemoTasks=Tasques addicionals: + +; *** "Preparing to Install" wizard page +WizardPreparing=Preparant la instal·lació +PreparingDesc=Preparant la instal·lació de [name] al vostre ordinador. +PreviousInstallNotCompleted=La instal·lació o desinstal·lació anterior no s'ha dut a terme. Caldrà que reinicieu l'ordinador per a finalitzar aquesta instal·lació.%n%nDesprés de reiniciar l'ordinador, executeu aquest programa de nou per completar la instal·lació de [name]. +CannotContinue=La instal·lació no pot continuar. Si us plau, premeu Cancel·la per a sortir. + +; *** "Installing" wizard page +WizardInstalling=Instal·lant +InstallingLabel=Si us plau, espereu mentre s'instal·la [name] al vostre ordinador. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Completant l'assistent d'instal·lació de [name] +FinishedLabelNoIcons=El programa ha finalitzat la instal·lació de [name] al vostre ordinador. +FinishedLabel=El programa ha finalitzat la instal·lació de [name] al vostre ordinador. L'aplicació pot ser iniciada seleccionant les icones instal·lades. +ClickFinish=Premeu Finalitza per a sortir de la instal·lació. +FinishedRestartLabel=Per a completar la instal·lació de [name] cal reiniciar l'ordinador. Voleu fer-ho ara? +FinishedRestartMessage=Per a completar la instal·lació de [name] cal reiniciar l'ordinador. Voleu fer-ho ara? +ShowReadmeCheck=Sí, vull visualitzar el fitxer LLEGIUME.TXT +YesRadio=&Sí, reiniciar l'ordinador ara +NoRadio=&No, reiniciaré l'ordinador més tard +; used for example as 'Run MyProg.exe' +RunEntryExec=Executa %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Visualitza %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=El programa d'instal·lació necessita el disc següent +SelectDiskLabel2=Si us plau, introduiu el disc %1 i premeu Continua.%n%nSi els fitxers d'aquest disc es poden trobar en una carpeta diferent de la indicada tot seguit, entreu-ne la ruta correcta o bé premeu Explora. +PathLabel=&Ruta: +FileNotInDir2=El fitxer "%1" no s'ha pogut trobar a "%2". Si us plau, introduïu el disc correcte o trieu una altra carpeta. +SelectDirectoryLabel=Si us plau, indiqueu on es troba el disc següent. + +; *** Installation phase messages +SetupAborted=La instal·lació no s'ha completat.%n%n%Si us plau, resoleu el problema i executeu de nou el programa d'instal·lació. +EntryAbortRetryIgnore=Premeu Reintenta per a intentar-ho de nou, Ignora per a continuar igualment, o Abandona per a abandonar la instal·lació. + +; *** Installation status messages +StatusCreateDirs=Creant carpetes... +StatusExtractFiles=Extraient fitxers... +StatusCreateIcons=Creant enllaços del programa... +StatusCreateIniEntries=Creant entrades al fitxer INI... +StatusCreateRegistryEntries=Creant entrades de registre... +StatusRegisterFiles=Registrant fitxers... +StatusSavingUninstall=Desant informació de desinstal·lació... +StatusRunProgram=Finalitzant la instal·lació... +StatusRollback=Desfent els canvis... + +; *** Misc. errors +ErrorInternal2=Error intern: %1 +ErrorFunctionFailedNoCode=%1 ha fallat +ErrorFunctionFailed=%1 ha fallat; codi %2 +ErrorFunctionFailedWithMessage=%1 ha fallat; codi %2.%n%3 +ErrorExecutingProgram=No es pot executar el fitxer:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Error en obrir la clau de registre:%n%1\%2 +ErrorRegCreateKey=Error en crear la clau de registre:%n%1\%2 +ErrorRegWriteKey=Error en escriure a la clau de registre:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Error en crear l'entrada INI al fitxer "%1". + +; *** File copying errors +FileAbortRetryIgnore=Premeu Reintenta per a intentar-ho de nou, Ignora per a saltar-se aquest fitxer (no recomanat), o Abandona per a abandonar la instal·lació. +FileAbortRetryIgnore2=Premeu Reintenta per a intentar-ho de nou, Ignora per a continuar igualment (no recomanat), o Abandona per a abandonar la instal·lació. +SourceIsCorrupted=El fitxer d'origen està corromput +SourceDoesntExist=El fitxer d'origen "%1" no existeix +ExistingFileReadOnly=El fitxer és de només lectura.%n%nPremeu Reintenta per a treure-li l'atribut de només lectura i tornar-ho a intentar, Ignora per a saltar-se'l (no recomanat), o Abandona per a abandonar la instal·lació. +ErrorReadingExistingDest=S'ha produït un error en llegir el fitxer: +FileExists=El fitxer ja existeix.%n%nVoleu que sigui sobre-escrit? +ExistingFileNewer=El fitxer existent és més nou que el que s'intenta instal·lar. Es recomana mantenir el fitxer existent.%n%nVoleu mantenir-lo? +ErrorChangingAttr=Hi ha hagut un error en canviar els atributs del fitxer: +ErrorCreatingTemp=Hi ha hagut un error en crear un fitxer a la carpeta de destinació: +ErrorReadingSource=Hi ha hagut un error en llegir el fitxer d'origen: +ErrorCopying=Hi ha hagut un error en copiar un fitxer: +ErrorReplacingExistingFile=Hi ha hagut un error en reemplaçar el fitxer existent: +ErrorRestartReplace=Ha fallat reemplaçar: +ErrorRenamingTemp=Hi ha hagut un error en reanomenar un fitxer a la carpeta de destinació: +ErrorRegisterServer=No s'ha pogut registrar el DLL/OCX: %1 +ErrorRegSvr32Failed=Ha fallat RegSvr32 amb el codi de sortida %1 +ErrorRegisterTypeLib=No s'ha pogut registrar la biblioteca de tipus: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Hi ha hagut un error en obrir el fitxer LLEGIUME.TXT. +ErrorRestartingComputer=El programa d'instal·lació no ha pogut reiniciar l'ordinador. Si us plau, feu-ho manualment. + +; *** Uninstaller messages +UninstallNotFound=El fitxer "%1" no existeix. No es pot desinstal·lar. +UninstallOpenError=El fitxer "%1" no pot ser obert. No es pot desinstal·lar. +UninstallUnsupportedVer=El fitxer de desinstal·lació "%1" està en un format no reconegut per aquesta versió del desinstal·lador. No es pot desinstal·lar +UninstallUnknownEntry=S'ha trobat una entrada desconeguda (%1) al fitxer de desinstal·lació. +ConfirmUninstall=Esteu segur de voler eliminar completament %1 i tots els seus components? +UninstallOnlyOnWin64=Aquest programa només pot ser desinstal·lat en Windows de 64 bits. +OnlyAdminCanUninstall=Aquest programa només pot ser desinstal·lat per un usuari amb privilegis d'administrador. +UninstallStatusLabel=Si us plau, espereu mentre s'elimina %1 del vostre ordinador. +UninstalledAll=%1 ha estat desinstal·lat correctament del vostre ordinador. +UninstalledMost=Desinstal·lació de %1 completada.%n%nAlguns elements no s'han pogut eliminar. Poden ser eliminats manualment. +UninstalledAndNeedsRestart=Per completar la instal·lació de %1, cal reiniciar el vostre ordinador.%n%nVoleu fer-ho ara? +UninstallDataCorrupted=El fitxer "%1" està corromput. No es pot desinstal·lar. + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Eliminar fitxer compartit? +ConfirmDeleteSharedFile2=El sistema indica que el fitxer compartit següent ja no és emprat per cap altre programa. Voleu que la desinstal·lació elimini aquest fitxer?%n%nSi algun programa encara el fa servir i és eliminat, podria no funcionar correctament. Si no n'esteu segur, trieu No. Deixar el fitxer al sistema no farà cap mal. +SharedFileNameLabel=Nom del fitxer: +SharedFileLocationLabel=Localització: +WizardUninstalling=Estat de la desinstal·lació +StatusUninstalling=Desinstal·lant %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 versió %2 +AdditionalIcons=Icones addicionals: +CreateDesktopIcon=Crea una icona a l'&Escriptori +CreateQuickLaunchIcon=Crea una icona a la &Barra de tasques +ProgramOnTheWeb=%1 a Internet +UninstallProgram=Desinstal·la %1 +LaunchProgram=Obre %1 +AssocFileExtension=&Associa %1 amb l'extensió de fitxer %2 +AssocingFileExtension=Associant %1 amb l'extensió de fitxer %2... diff --git a/Files/Languages/Czech.isl b/Files/Languages/Czech.isl new file mode 100644 index 000000000..6ceab66e6 --- /dev/null +++ b/Files/Languages/Czech.isl @@ -0,0 +1,318 @@ +; ******************************************************* +; *** *** +; *** Inno Setup version 5.1.11+ Czech messages *** +; *** *** +; *** Original Author: *** +; *** *** +; *** Ivo Bauer (bauer@ozm.cz) *** +; *** *** +; *** Contributors: *** +; *** *** +; *** Lubos Stanek (lubek@users.sourceforge.net) *** +; *** Vitezslav Svejdar (vitezslav.svejdar@cuni.cz) *** +; *** *** +; ******************************************************* +; +; Copyright (C) 1997-2010 Jordan Russell. All rights reserved. +; Translations (C) 2002-2010 Original Author and Contributors. All rights reserved. +; +; The contents of this file are subject to the Inno Setup License (the "License"). +; You may obtain a copy of the License at http://www.jrsoftware.org/files/is/license.txt +; +; $jrsoftware: issrc/Files/Languages/Czech.isl,v 1.19 2010/01/05 11:37:24 mlaan Exp $ + +[LangOptions] +LanguageName=<010C>e<0161>tina +LanguageID=$0405 +LanguageCodePage=1250 + +[Messages] + +; *** Application titles +SetupAppTitle=Prùvodce instalací +SetupWindowTitle=Prùvodce instalací - %1 +UninstallAppTitle=Prùvodce odinstalací +UninstallAppFullTitle=Prùvodce odinstalací - %1 + +; *** Misc. common +InformationTitle=Informace +ConfirmTitle=Potvrzení +ErrorTitle=Chyba + +; *** SetupLdr messages +SetupLdrStartupMessage=Vítá Vás prùvodce instalací produktu %1. Chcete pokraèovat? +LdrCannotCreateTemp=Nelze vytvoøit doèasný soubor. Prùvodce instalací bude ukonèen +LdrCannotExecTemp=Nelze spustit soubor v doèasné složce. Prùvodce instalací bude ukonèen + +; *** Startup error messages +LastErrorMessage=%1.%n%nChyba %2: %3 +SetupFileMissing=Instalaèní složka neobsahuje soubor %1. Opravte prosím tuto chybu nebo si opatøete novou kopii tohoto produktu. +SetupFileCorrupt=Soubory prùvodce instalací jsou poškozeny. Opatøete si prosím novou kopii tohoto produktu. +SetupFileCorruptOrWrongVer=Soubory prùvodce instalací jsou poškozeny nebo se nesluèují s touto verzí prùvodce instalací. Opravte prosím tuto chybu nebo si opatøete novou kopii tohoto produktu. +NotOnThisPlatform=Tento produkt nelze spustit ve %1. +OnlyOnThisPlatform=Tento produkt musí být spuštìn ve %1. +OnlyOnTheseArchitectures=Tento produkt lze nainstalovat pouze ve verzích MS Windows s podporou architektury procesorù:%n%n%1 +MissingWOW64APIs=Aktuální verze MS Windows postrádá funkce, které vyžaduje prùvodce instalací pro 64-bitovou instalaci. Opravte prosím tuto chybu nainstalováním aktualizace Service Pack %1. +WinVersionTooLowError=Tento produkt vyžaduje %1 verzi %2 nebo vyšší. +WinVersionTooHighError=Tento produkt nelze nainstalovat ve %1 verzi %2 nebo vyšší. +AdminPrivilegesRequired=K instalaci tohoto produktu musíte být pøihlášeni s právy administrátora. +PowerUserPrivilegesRequired=K instalaci tohoto produktu musíte být pøihlášeni s právy administrátora nebo èlena skupiny Power Users. +SetupAppRunningError=Prùvodce instalací zjistil, že produkt %1 je nyní spuštìn.%n%nUkonèete prosím všechny spuštìné instance tohoto produktu a pokraèujte klepnutím na tlaèítko OK, nebo ukonèete instalaci tlaèítkem Storno. +UninstallAppRunningError=Prùvodce odinstalací zjistil, že produkt %1 je nyní spuštìn.%n%nUkonèete prosím všechny spuštìné instance tohoto produktu a pokraèujte klepnutím na tlaèítko OK, nebo ukonèete odinstalaci tlaèítkem Storno. + +; *** Misc. errors +ErrorCreatingDir=Prùvodce instalací nemohl vytvoøit složku "%1" +ErrorTooManyFilesInDir=Nelze vytvoøit soubor ve složce "%1", protože tato složka již obsahuje pøíliš mnoho souborù + +; *** Setup common messages +ExitSetupTitle=Ukonèit prùvodce instalací +ExitSetupMessage=Instalace nebyla zcela dokonèena. Jestliže nyní prùvodce instalací ukonèíte, produkt nebude nainstalován.%n%nPrùvodce instalací mùžete znovu spustit kdykoliv jindy a instalaci dokonèit.%n%nChcete prùvodce instalací ukonèit? +AboutSetupMenuItem=&O prùvodci instalací... +AboutSetupTitle=O prùvodci instalací +AboutSetupMessage=%1 verze %2%n%3%n%n%1 domovská stránka:%n%4 +AboutSetupNote= +TranslatorNote=Czech translation maintained by Ivo Bauer (bauer@ozm.cz), Lubos Stanek (lubek@users.sourceforge.net) and Vitezslav Svejdar (vitezslav.svejdar@cuni.cz) + +; *** Buttons +ButtonBack=< &Zpìt +ButtonNext=&Další > +ButtonInstall=&Instalovat +ButtonOK=OK +ButtonCancel=Storno +ButtonYes=&Ano +ButtonYesToAll=Ano &všem +ButtonNo=&Ne +ButtonNoToAll=N&e všem +ButtonFinish=&Dokonèit +ButtonBrowse=&Procházet... +ButtonWizardBrowse=&Procházet... +ButtonNewFolder=&Vytvoøit novou složku + +; *** "Select Language" dialog messages +SelectLanguageTitle=Výbìr jazyka prùvodce instalací +SelectLanguageLabel=Zvolte jazyk, který se má použít pøi instalaci: + +; *** Common wizard text +ClickNext=Pokraèujte klepnutím na tlaèítko Další, nebo ukonèete prùvodce instalací tlaèítkem Storno. +BeveledLabel= +BrowseDialogTitle=Vyhledat složku +BrowseDialogLabel=Z níže uvedeného seznamu vyberte složku a klepnìte na tlaèítko OK. +NewFolderName=Nová složka + +; *** "Welcome" wizard page +WelcomeLabel1=Vítá Vás prùvodce instalací produktu [name]. +WelcomeLabel2=Produkt [name/ver] bude nainstalován na Váš poèítaè.%n%nDøíve než budete pokraèovat, doporuèuje se ukonèit veškeré spuštìné aplikace. + +; *** "Password" wizard page +WizardPassword=Heslo +PasswordLabel1=Tato instalace je chránìna heslem. +PasswordLabel3=Zadejte prosím heslo a pokraèujte klepnutím na tlaèítko Další. Pøi zadávání hesla rozlišujte malá a velká písmena. +PasswordEditLabel=&Heslo: +IncorrectPassword=Zadané heslo není správné. Zkuste to prosím znovu. + +; *** "License Agreement" wizard page +WizardLicense=Licenèní smlouva +LicenseLabel=Døíve než budete pokraèovat, pøeètìte si prosím pozornì následující dùležité informace. +LicenseLabel3=Pøeètìte si prosím tuto licenèní smlouvu. Musíte souhlasit s podmínkami této smlouvy, aby instalace mohla pokraèovat. +LicenseAccepted=&Souhlasím s podmínkami licenèní smlouvy +LicenseNotAccepted=&Nesouhlasím s podmínkami licenèní smlouvy + +; *** "Information" wizard pages +WizardInfoBefore=Informace +InfoBeforeLabel=Døíve než budete pokraèovat, pøeètìte si prosím pozornì následující dùležité informace. +InfoBeforeClickLabel=Pokraèujte v instalaci klepnutím na tlaèítko Další. +WizardInfoAfter=Informace +InfoAfterLabel=Døíve než budete pokraèovat, pøeètìte si prosím pozornì následující dùležité informace. +InfoAfterClickLabel=Pokraèujte v instalaci klepnutím na tlaèítko Další. + +; *** "User Information" wizard page +WizardUserInfo=Informace o uživateli +UserInfoDesc=Zadejte prosím požadované údaje. +UserInfoName=&Uživatelské jméno: +UserInfoOrg=&Spoleènost: +UserInfoSerial=Sé&riové èíslo: +UserInfoNameRequired=Musíte zadat uživatelské jméno. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Zvolte cílové umístìní +SelectDirDesc=Kam má být produkt [name] nainstalován? +SelectDirLabel3=Prùvodce nainstaluje produkt [name] do následující složky. +SelectDirBrowseLabel=Pokraèujte klepnutím na tlaèítko Další. Chcete-li zvolit jinou složku, klepnìte na tlaèítko Procházet. +DiskSpaceMBLabel=Instalace vyžaduje nejménì [mb] MB volného místa na disku. +ToUNCPathname=Prùvodce instalací nemùže instalovat do cesty UNC. Pokud se pokoušíte instalovat v síti, budete muset použít nìkterou z dostupných síových jednotek. +InvalidPath=Musíte zadat úplnou cestu vèetnì písmene jednotky; napøíklad:%n%nC:\Aplikace%n%nnebo cestu UNC ve tvaru:%n%n\\server\sdílená složka +InvalidDrive=Vámi zvolená jednotka nebo cesta UNC neexistuje nebo není dostupná. Zvolte prosím jiné umístìní. +DiskSpaceWarningTitle=Nedostatek místa na disku +DiskSpaceWarning=Prùvodce instalací vyžaduje nejménì %1 KB volného místa pro instalaci produktu, ale na zvolené jednotce je dostupných pouze %2 KB.%n%nChcete pøesto pokraèovat? +DirNameTooLong=Název složky nebo cesta jsou pøíliš dlouhé. +InvalidDirName=Název složky není platný. +BadDirName32=Název složky nemùže obsahovat žádný z následujících znakù:%n%n%1 +DirExistsTitle=Složka existuje +DirExists=Složka:%n%n%1%n%njiž existuje. Má se pøesto instalovat do této složky? +DirDoesntExistTitle=Složka neexistuje +DirDoesntExist=Složka:%n%n%1%n%nneexistuje. Má být tato složka vytvoøena? + +; *** "Select Components" wizard page +WizardSelectComponents=Zvolte souèásti +SelectComponentsDesc=Jaké souèásti mají být nainstalovány? +SelectComponentsLabel2=Zaškrtnìte souèásti, které mají být nainstalovány; souèásti, které se nemají instalovat, ponechte nezaškrtnuté. Pokraèujte klepnutím na tlaèítko Další. +FullInstallation=Úplná instalace +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Kompaktní instalace +CustomInstallation=Volitelná instalace +NoUninstallWarningTitle=Souèásti existují +NoUninstallWarning=Prùvodce instalací zjistil, že následující souèásti jsou již na Vašem poèítaèi nainstalovány:%n%n%1%n%nNezahrnete-li tyto souèásti do výbìru, nebudou nyní odinstalovány.%n%nChcete pøesto pokraèovat? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Vybrané souèásti vyžadují nejménì [mb] MB místa na disku. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Zvolte další úlohy +SelectTasksDesc=Které další úlohy mají být provedeny? +SelectTasksLabel2=Zvolte další úlohy, které mají být provedeny v prùbìhu instalace produktu [name], a pak pokraèujte klepnutím na tlaèítko Další. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Vyberte složku v nabídce Start +SelectStartMenuFolderDesc=Kam má prùvodce instalací umístit zástupce aplikace? +SelectStartMenuFolderLabel3=Prùvodce instalací vytvoøí zástupce aplikace v následující složce nabídky Start. +SelectStartMenuFolderBrowseLabel=Pokraèujte klepnutím na tlaèítko Další. Chcete-li zvolit jinou složku, klepnìte na tlaèítko Procházet. +MustEnterGroupName=Musíte zadat název složky. +GroupNameTooLong=Název složky nebo cesta jsou pøíliš dlouhé. +InvalidGroupName=Název složky není platný. +BadGroupName=Název složky nemùže obsahovat žádný z následujících znakù:%n%n%1 +NoProgramGroupCheck2=&Nevytváøet složku v nabídce Start + +; *** "Ready to Install" wizard page +WizardReady=Instalace je pøipravena +ReadyLabel1=Prùvodce instalací je nyní pøipraven nainstalovat produkt [name] na Váš poèítaè. +ReadyLabel2a=Pokraèujte v instalaci klepnutím na tlaèítko Instalovat. Pøejete-li si zmìnit nìkterá nastavení instalace, klepnìte na tlaèítko Zpìt. +ReadyLabel2b=Pokraèujte v instalaci klepnutím na tlaèítko Instalovat. +ReadyMemoUserInfo=Informace o uživateli: +ReadyMemoDir=Cílové umístìní: +ReadyMemoType=Typ instalace: +ReadyMemoComponents=Vybrané souèásti: +ReadyMemoGroup=Složka v nabídce Start: +ReadyMemoTasks=Další úlohy: + +; *** "Preparing to Install" wizard page +WizardPreparing=Pøíprava k instalaci +PreparingDesc=Prùvodce instalací pøipravuje instalaci produktu [name] na Váš poèítaè. +PreviousInstallNotCompleted=Instalace/odinstalace pøedchozího produktu nebyla zcela dokonèena. Aby mohla být dokonèena, musíte restartovat Váš poèítaè.%n%nPo restartování Vašeho poèítaèe spuste znovu prùvodce instalací, aby bylo možné dokonèit instalaci produktu [name]. +CannotContinue=Prùvodce instalací nemùže pokraèovat. Ukonèete prosím prùvodce instalací klepnutím na tlaèítko Storno. + +; *** "Installing" wizard page +WizardInstalling=Instalování +InstallingLabel=Èekejte prosím, dokud prùvodce instalací nedokonèí instalaci produktu [name] na Váš poèítaè. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Dokonèuje se instalace produktu [name] +FinishedLabelNoIcons=Prùvodce instalací dokonèil instalaci produktu [name] na Váš poèítaè. +FinishedLabel=Prùvodce instalací dokonèil instalaci produktu [name] na Váš poèítaè. Produkt lze spustit pomocí nainstalovaných zástupcù. +ClickFinish=Ukonèete prùvodce instalací klepnutím na tlaèítko Dokonèit. +FinishedRestartLabel=Pro dokonèení instalace produktu [name] je nezbytné, aby prùvodce instalací restartoval Váš poèítaè. Chcete jej nyní restartovat? +FinishedRestartMessage=Pro dokonèení instalace produktu [name] je nezbytné, aby prùvodce instalací restartoval Váš poèítaè.%n%nChcete jej nyní restartovat? +ShowReadmeCheck=Ano, chci zobrazit dokument "ÈTIMNE" +YesRadio=&Ano, chci nyní restartovat poèítaè +NoRadio=&Ne, poèítaè restartuji pozdìji +; used for example as 'Run MyProg.exe' +RunEntryExec=Spustit %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Zobrazit %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Prùvodce instalací vyžaduje další disk +SelectDiskLabel2=Vložte prosím disk %1 a klepnìte na tlaèítko OK.%n%nPokud se soubory na tomto disku nacházejí v jiné složce než v té, která je zobrazena níže, pak zadejte správnou cestu nebo ji zvolte klepnutím na tlaèítko Procházet. +PathLabel=&Cesta: +FileNotInDir2=Soubor "%1" nelze najít v "%2". Vložte prosím správný disk nebo zvolte jinou složku. +SelectDirectoryLabel=Specifikujte prosím umístìní dalšího disku. + +; *** Installation phase messages +SetupAborted=Instalace nebyla zcela dokonèena.%n%nOpravte prosím chybu a spuste prùvodce instalací znovu. +EntryAbortRetryIgnore=Akci zopakujete klepnutím na tlaèítko Opakovat. Tento krok vynecháte klepnutím na tlaèítko Pøeskoèit. Instalaci stornujete klepnutím na tlaèítko Pøerušit. + +; *** Installation status messages +StatusCreateDirs=Vytváøejí se složky... +StatusExtractFiles=Extrahují se soubory... +StatusCreateIcons=Vytváøejí se zástupci... +StatusCreateIniEntries=Vytváøejí se záznamy v inicializaèních souborech... +StatusCreateRegistryEntries=Vytváøejí se záznamy v systémovém registru... +StatusRegisterFiles=Registrují se soubory... +StatusSavingUninstall=Ukládají se informace pro odinstalaci produktu... +StatusRunProgram=Dokonèuje se instalace... +StatusRollback=Provedené zmìny se vracejí zpìt... + +; *** Misc. errors +ErrorInternal2=Interní chyba: %1 +ErrorFunctionFailedNoCode=%1 selhala +ErrorFunctionFailed=%1 selhala; kód %2 +ErrorFunctionFailedWithMessage=%1 selhala; kód %2.%n%3 +ErrorExecutingProgram=Nelze spustit soubor:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Došlo k chybì pøi otevírání klíèe systémového registru:%n%1\%2 +ErrorRegCreateKey=Došlo k chybì pøi vytváøení klíèe systémového registru:%n%1\%2 +ErrorRegWriteKey=Došlo k chybì pøi zápisu do klíèe systémového registru:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Došlo k chybì pøi vytváøení záznamu v inicializaèním souboru "%1". + +; *** File copying errors +FileAbortRetryIgnore=Akci zopakujete klepnutím na tlaèítko Opakovat. Tento soubor pøeskoèíte klepnutím na tlaèítko Pøeskoèit (nedoporuèuje se). Instalaci stornujete klepnutím na tlaèítko Pøerušit. +FileAbortRetryIgnore2=Akci zopakujete klepnutím na tlaèítko Opakovat. Pokraèujete klepnutím na tlaèítko Pøeskoèit (nedoporuèuje se). Instalaci stornujete klepnutím na tlaèítko Pøerušit. +SourceIsCorrupted=Zdrojový soubor je poškozen +SourceDoesntExist=Zdrojový soubor "%1" neexistuje +ExistingFileReadOnly=Existující soubor je urèen pouze pro ètení.%n%nAtribut "pouze pro ètení" odstraníte a akci zopakujete klepnutím na tlaèítko Opakovat. Tento soubor pøeskoèíte klepnutím na tlaèítko Pøeskoèit. Instalaci stornujete klepnutím na tlaèítko Pøerušit. +ErrorReadingExistingDest=Došlo k chybì pøi pokusu o ètení existujícího souboru: +FileExists=Soubor již existuje.%n%nMá být prùvodcem instalace pøepsán? +ExistingFileNewer=Existující soubor je novìjší než ten, který se prùvodce instalací pokouší nainstalovat. Doporuèuje se ponechat existující soubor.%n%nChcete jej ponechat? +ErrorChangingAttr=Došlo k chybì pøi pokusu o zmìnu atributù existujícího souboru: +ErrorCreatingTemp=Došlo k chybì pøi pokusu o vytvoøení souboru v cílové složce: +ErrorReadingSource=Došlo k chybì pøi pokusu o ètení zdrojového souboru: +ErrorCopying=Došlo k chybì pøi pokusu o zkopírování souboru: +ErrorReplacingExistingFile=Došlo k chybì pøi pokusu o nahrazení existujícího souboru: +ErrorRestartReplace=Funkce "RestartReplace" prùvodce instalací selhala: +ErrorRenamingTemp=Došlo k chybì pøi pokusu o pøejmenování souboru v cílové složce: +ErrorRegisterServer=Nelze zaregistrovat DLL/OCX: %1 +ErrorRegSvr32Failed=Volání RegSvr32 selhalo s návratovým kódem %1 +ErrorRegisterTypeLib=Nelze zaregistrovat typovou knihovnu: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Došlo k chybì pøi pokusu o otevøení dokumentu "ÈTIMNE". +ErrorRestartingComputer=Prùvodci instalace se nepodaøilo restartovat Váš poèítaè. Restartujte jej prosím ruènì. + +; *** Uninstaller messages +UninstallNotFound=Soubor "%1" neexistuje. Produkt nelze odinstalovat. +UninstallOpenError=Soubor "%1" nelze otevøít. Produkt nelze odinstalovat. +UninstallUnsupportedVer=Formát souboru se záznamy k odinstalaci produktu "%1" nebyl touto verzí prùvodce odinstalací rozpoznán. Produkt nelze odinstalovat +UninstallUnknownEntry=V souboru obsahujícím informace k odinstalaci produktu byla zjištìna neznámá položka (%1) +ConfirmUninstall=Jste si opravdu jisti, že chcete produkt %1 a všechny jeho souèásti odinstalovat? +UninstallOnlyOnWin64=Tento produkt lze odinstalovat pouze v 64-bitových verzích MS Windows. +OnlyAdminCanUninstall=K odinstalaci tohoto produktu musíte být pøihlášeni s právy administrátora. +UninstallStatusLabel=Èekejte prosím, dokud produkt %1 nebude odinstalován z Vašeho poèítaèe. +UninstalledAll=Produkt %1 byl z Vašeho poèítaèe úspìšnì odinstalován. +UninstalledMost=Produkt %1 byl odinstalován.%n%nNìkteré jeho souèásti se odinstalovat nepodaøilo. Mùžete je však odstranit ruènì. +UninstalledAndNeedsRestart=K dokonèení odinstalace produktu %1 je nezbytné, aby prùvodce odinstalací restartoval Váš poèítaè.%n%nChcete jej nyní restartovat? +UninstallDataCorrupted=Soubor "%1" je poškozen. Produkt nelze odinstalovat + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Odebrat sdílený soubor? +ConfirmDeleteSharedFile2=Systém indikuje, že následující sdílený soubor není používán žádnými jinými aplikacemi. Má být tento sdílený soubor prùvodcem odinstalací odstranìn?%n%nPokud nìkteré aplikace tento soubor používají, pak po jeho odstranìní nemusejí pracovat správnì. Pokud si nejste jisti, zvolte Ne. Ponechání tohoto souboru ve Vašem systému nezpùsobí žádnou škodu. +SharedFileNameLabel=Název souboru: +SharedFileLocationLabel=Umístìní: +WizardUninstalling=Stav odinstalace +StatusUninstalling=Probíhá odinstalace produktu %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 verze %2 +AdditionalIcons=Další zástupci: +CreateDesktopIcon=Vytvoøit zástupce na &ploše +CreateQuickLaunchIcon=Vytvoøit zástupce na panelu &Snadné spuštìní +ProgramOnTheWeb=Aplikace %1 na internetu +UninstallProgram=Odinstalovat aplikaci %1 +LaunchProgram=Spustit aplikaci %1 +AssocFileExtension=Vytvoøit &asociaci mezi soubory typu %2 a aplikací %1 +AssocingFileExtension=Vytváøí se asociace mezi soubory typu %2 a aplikací %1... diff --git a/Files/Languages/Danish.isl b/Files/Languages/Danish.isl new file mode 100644 index 000000000..947e8380a --- /dev/null +++ b/Files/Languages/Danish.isl @@ -0,0 +1,315 @@ +; Translation made with Translator 1.32 (http://www2.arnes.si/~sopjsimo/translator.html) +; $Translator:NL=%n:TB=%t +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/files/istrans/ +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; ID: Danish.isl,v 5.1.11 2008/02/26 12:37:00 Thomas Vedel, veco@veco.dk + +[LangOptions] +LanguageName=Dansk +LanguageID=$0406 +LanguageCodePage=1252 + +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName=MS Shell Dlg +;DialogFontSize=8 +;DialogFontStandardHeight=13 +;TitleFontName=Arial +;TitleFontSize=29 +;WelcomeFontName=Arial +;WelcomeFontSize=12 +;CopyrightFontName=Arial +;CopyrightFontSize=8 + +[Messages] +; *** Application titles +SetupAppTitle=Installationsguide +SetupWindowTitle=Installationsguide - %1 +UninstallAppTitle=Afinstaller +UninstallAppFullTitle=Afinstallerer %1 + +; *** Misc. common +InformationTitle=Information +ConfirmTitle=Bekræft +ErrorTitle=Fejl + +; *** SetupLdr messages +SetupLdrStartupMessage=Denne guide installerer %1. Fortsæt? +LdrCannotCreateTemp=Kan ikke danne en midlertidig fil. Installationen afbrydes +LdrCannotExecTemp=Kan ikke udføre et program i mappen til opbevaring af midlertidige filer. Installationen afbrydes + +; *** Startup error messages +LastErrorMessage=%1.%n%nFejl %2: %3 +SetupFileMissing=Filen %1 mangler i installations-mappen. Ret fejlen eller skaf en ny kopi af programmet. +SetupFileCorrupt=Installationsfilerne er ødelagt. Skaf en ny kopi af installationsprogrammet. +SetupFileCorruptOrWrongVer=Installationsfilerne er ødelagt, eller også passer de ikke til denne version af installationen. Ret fejlen eller skaf en ny kopi af installationsprogrammet. +NotOnThisPlatform=Programmet kan ikke anvendes på %1. +OnlyOnThisPlatform=Programmet kan kun anvendes på %1. +OnlyOnTheseArchitectures=Dette program kan kun installeres på Windows-versioner som er designet til denne processortype:%n%n%1 +MissingWOW64APIs=Den anvendte Windows-version indeholder ikke funktioner som er nødvendige for at foretage en 64-bit installation. Du kan afhjælpe problemet ved at installere Service Pack %1. +WinVersionTooLowError=Programmet kræver %1 version %2 eller nyere. +WinVersionTooHighError=Programmet kan ikke installeres på %1 version %2 eller nyere. +AdminPrivilegesRequired=Du skal være logget på som administrator for at kunne installere dette program. +PowerUserPrivilegesRequired=Du skal være logget på som administrator eller være medlem af superbruger-gruppen for at kunne installere dette program. +SetupAppRunningError=Programmet %1 er aktivt.%n%nAfslut venligst først programmet, og klik dernæst OK for at fortsætte, eller Annuller for at afbryde. +UninstallAppRunningError=Programmet %1 er aktivt.%n%nAfslut venligst først programmet, og klik dernæst OK for at fortsætte, eller Annuller for at afbryde. + +; *** Misc. errors +ErrorCreatingDir=Installationen kunne ikke oprette mappen "%1" +ErrorTooManyFilesInDir=Det kan ikke lade sig gøre at oprette en fil i mappen "%1" fordi mappen indeholder for mange filer + +; *** Setup common messages +ExitSetupTitle=Afbryd installationen +ExitSetupMessage=Installationen er ikke færdiggjort. Hvis der afbrydes nu, vil programmet ikke blive installeret.%n%nInstallationsguiden skal køres igen for at færdiggøre installationen.%n%nAfbryd installationen? +AboutSetupMenuItem=&Om installationsguiden... +AboutSetupTitle=Om installationsguiden +AboutSetupMessage=%1 version %2%n%3%n%n%1 hjemmeside:%n%4 +AboutSetupNote= + +; *** Buttons +TranslatorNote= +ButtonBack=< &Tilbage +ButtonNext=Næ&ste > +ButtonInstall=&Installer +ButtonOK=&OK +ButtonCancel=&Afbryd +ButtonYes=&Ja +ButtonYesToAll=Ja til A&lle +ButtonNo=&Nej +ButtonNoToAll=Nej t&il Alle +ButtonFinish=&Færdig +ButtonBrowse=&Gennemse... +ButtonWizardBrowse=G&ennemse... +ButtonNewFolder=&Opret Ny Mappe + +; *** "Select Language" dialog messages +SelectLanguageTitle=Vælg installationssprog +SelectLanguageLabel=Vælg hvilket sprog der skal anvendes under installationen: + +; *** Common wizard text +ClickNext=Klik Næste for at fortsætte, eller Afbryd for at afslutte. +BeveledLabel= +BrowseDialogTitle=Udvælg mappe +BrowseDialogLabel=Vælg en mappe fra nedenstående liste. Klik dernæst OK. +NewFolderName=Ny Mappe + +; *** "Welcome" wizard page +WelcomeLabel1=Velkommen til [name] installationsguiden +WelcomeLabel2=Denne guide installerer [name/ver] på computeren.%n%nDet anbefales at alle andre programmer afsluttes før der fortsættes. + +; *** "Password" wizard page +WizardPassword=Adgangskode +PasswordLabel1=Installationen er beskyttet med adgangskode. +PasswordLabel3=Indtast adgangskoden og klik Næste for at fortsætte. Der skelnes mellem store og små bogstaver. +PasswordEditLabel=&Adgangskode: +IncorrectPassword=Adgangskoden er ikke korrekt. Prøv igen, og husk at der skelnes mellem store og små bogstaver. + +; *** "License Agreement" wizard page +WizardLicense=Licensaftale +LicenseLabel=Læs venligst den følgende information, som er vigtig, inden du fortsætter. +LicenseLabel3=Læs venligst licensaftalen. Du skal acceptere betingelserne i aftalen for at fortsætte installationen. +LicenseAccepted=Jeg &accepterer aftalen +LicenseNotAccepted=Jeg accepterer &ikke aftalen + +; *** "Information" wizard pages +WizardInfoBefore=Information +InfoBeforeLabel=Læs følgende information inden du fortsætter. +InfoBeforeClickLabel=Tryk på Næste, når du er klar til at fortsætte installationen. +WizardInfoAfter=Information +InfoAfterLabel=Læs følgende information inden du fortsætter. +InfoAfterClickLabel=Tryk på Næste, når du er klar til at fortsætte installationen. + +; *** "User Information" wizard page +WizardUserInfo=Brugerinformation +UserInfoDesc=Indtast dine oplysninger. +UserInfoName=&Brugernavn: +UserInfoOrg=&Organisation: +UserInfoSerial=&Serienummer: +UserInfoNameRequired=Du skal indtaste et navn. + +; *** "Select Destination Directory" wizard page +WizardSelectDir=Vælg installationsmappe +SelectDirDesc=Hvor skal [name] installeres? +SelectDirLabel3=Guiden installerer [name] i følgende mappe. +SelectDirBrowseLabel=Klik Næste for at fortsætte. Hvis du vil vælge en anden mappe skal du klikke Gennemse. +DiskSpaceMBLabel=Der skal være mindst [mb] MB fri diskplads. +ToUNCPathname=Guiden kan ikke installere på et UNC-stinavn. Hvis du prøver på at installere på et netværk, er du nødt til at oprette et netværksdrev. +InvalidPath=Du skal indtaste den fulde sti med drevangivelse; for eksempel:%n%nC:\APP%n%neller et UNC-stinavn på formen:%n%n\\server\share +InvalidDrive=Drevet eller UNC-stien du valgte eksisterer ikke. Vælg venligst noget andet. +DiskSpaceWarningTitle=Ikke nok fri diskplads. +DiskSpaceWarning=Guiden kræver mindst %1 KB fri diskplads for at kunne foretage installationen, men det valgte drev har kun %2 KB diskplads tilgængelig.%n%nVil du installere alligevel? +DirNameTooLong=Mappens eller stiens navn er for langt. +InvalidDirName=Mappenavnet er ikke gyldigt. +BadDirName32=Navne på mapper må ikke indeholde nogen af følgende tegn:%n%n%1 +DirExistsTitle=Mappen eksisterer +DirExists=Mappen:%n%n%1%n%neksisterer allerede. Ønsker du at installere i denne mappe alligevel? +DirDoesntExistTitle=Mappen eksisterer ikke. +DirDoesntExist=Mappen:%n%n%1%n%neksisterer ikke. Ønsker du at oprette denne mappe? + +; *** "Select Components" wizard page +WizardSelectComponents=Vælg Komponenter +SelectComponentsDesc=Hvilke komponenter skal installeres? +SelectComponentsLabel2=Vælg de komponenter der skal installeres, og fjern markering fra dem der ikke skal installeres. Klik Næste for at fortsætte. +FullInstallation=Komplet installation +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Kompakt installation +CustomInstallation=Tilpasset installation +NoUninstallWarningTitle=Komponenterne er installeret +NoUninstallWarning=Installationen har konstateret at følgende komponenter allerede er installeret på computeren:%n%n%1%n%nAt fravælge komponenterne vil ikke fjerne dem.%n%nFortsæt alligevel? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Det valgte kræver mindst [mb] MB fri plads på harddisken. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Vælg ekstra opgaver +SelectTasksDesc=Hvilke andre opgaver skal udføres? +SelectTasksLabel2=Vælg hvilke ekstraopgaver der skal udføres under installationen af [name] og klik på Næste. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Vælg Start-menu mappe +SelectStartMenuFolderDesc=Hvor skal installationen oprette genveje til programmet? +SelectStartMenuFolderLabel3=Installationsguiden opretter genveje (ikoner) til programmet i følgende mappe i Start-menuen. +SelectStartMenuFolderBrowseLabel=Klik Næste for at fortsætte. Hvis du vil vælge en anden mappe skal du klikke Gennemse. +MustEnterGroupName=Du skal angive et mappenavn. +GroupNameTooLong=Mappens eller stiens navn er for langt. +InvalidGroupName=Mappenavnet er ikke gyldigt. +BadGroupName=Tegnene %1 må ikke anvendes i navnet på en programgruppe. Angiv andet navn. +NoProgramGroupCheck2=Opret &ingen programgruppe i Start-menuen + +; *** "Ready to Install" wizard page +WizardReady=Klar til at installere +ReadyLabel1=Installationsguiden er nu klar til at installere [name] på computeren. +ReadyLabel2a=Tryk på Installer for at fortsætte med installationen, eller tryk på Tilbage hvis du ønsker at se eller ændre dine indstillinger. +ReadyLabel2b=Tryk på Installer for at fortsætte med installationen. +ReadyMemoUserInfo=Oplysninger om brugeren: +ReadyMemoDir=Installationsmappe : +ReadyMemoType=Installationstype: +ReadyMemoComponents=Valgte komponenter: +ReadyMemoGroup=Start-menu mappe: +ReadyMemoTasks=Valgte ekstraopgaver: + +; *** "Preparing to Install" wizard page +WizardPreparing=Klargør installationen +PreparingDesc=Installationsguiden klargør installationen af [name] på din computer. +PreviousInstallNotCompleted=Den foregående installation eller fjernelse af et program er ikke afsluttet. Du skal genstarte computeren for at afslutte den foregående installation.%n%nEfter genstarten skal du køre installationsguiden igen for at fuldføre installationen af [name]. +CannotContinue=Installationsguiden kan ikke fortsætte. Klik på Fortryd for at afslutte. + +; *** "Installing" wizard page +WizardInstalling=Installerer +InstallingLabel=Vent mens installationsguiden installerer [name] på din computer. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Afslutter installation af [name] +FinishedLabelNoIcons=Installationsguiden har installeret [name] på din computer. +FinishedLabel=Installationsguiden har installeret [name] på din computer. Programmet kan startes ved at vælge de oprettede genveje. +ClickFinish=Klik på Færdig for at afslutte installationsprogrammet. +FinishedRestartLabel=For at fuldføre installationen af [name], skal din computer genstartes. Vil du genstarte computeren nu? +FinishedRestartMessage=For at fuldføre installationen af [name], skal din computer genstartes.%n%nVil du genstarte computeren nu? +ShowReadmeCheck=Ja, jeg vil gerne læse README filen +YesRadio=&Ja, genstart computeren nu +NoRadio=&Nej, jeg genstarter selv computeren senere +; used for example as 'Run MyProg.exe' +RunEntryExec=Kør %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Læs %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Installationsprogrammet skal bruge den næste disk(ette) +SelectDiskLabel2=Indsæt disk nr. %1 og klik OK.%n%nHvis filerne findes i en anden mappe så indtast stien eller klik Gennemse. +PathLabel=&Stinavn: +FileNotInDir2=Filen "%1" findes ikke i "%2". Indsæt den rigtige disk eller vælg en anden mappe. +SelectDirectoryLabel=Angiv placeringen af den næste disk. + +; *** Installation phase messages +SetupAborted=Installationen blev ikke gennemført.%n%nInstaller igen, hent programmet på ny, eller kontakt producenten for hjælp. +EntryAbortRetryIgnore=Klik Gentag for at forsøge igen, Ignorer for at fortsætte alligevel, eller Afbryd for at annullere installationen. + +; *** Installation status messages +StatusCreateDirs=Opretter mapper... +StatusExtractFiles=Udpakker filer... +StatusCreateIcons=Opretter program-genveje... +StatusCreateIniEntries=Opretter INI-filer... +StatusCreateRegistryEntries=Opdaterer registrerings-databasen... +StatusRegisterFiles=Registrerer filer... +StatusSavingUninstall=Gemmer information om afinstallation... +StatusRunProgram=Færdiggør installation... +StatusRollback=Fjerner programmet igen... + +; *** Misc. errors +ErrorInternal2=Intern fejl: %1 +ErrorFunctionFailedNoCode=%1 fejlede +ErrorFunctionFailed=%1 fejlede; kode %2 +ErrorFunctionFailedWithMessage=%1 fejlede; kode %2.%n%3 +ErrorExecutingProgram=Kan ikke udføre filen:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Fejl ved åbning af registreringsnøgle:%n%1\%2 +ErrorRegCreateKey=Fejl ved oprettelse af registreringsnøgle:%n%1\%2 +ErrorRegWriteKey=Fejl ved skrivning til registreringsnøgle:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Fejl ved oprettelse af variabel i INI-filen "%1". + +; *** File copying errors +FileAbortRetryIgnore=Klik Gentag for at prøve igen, Ignorer for at springe filen over (kan normalt ikke anbefales) eller Afbryd for at afslutte installationen. +FileAbortRetryIgnore2=Klik Gentag for at prøve igen, Ignorer for at fortsætte alligevel (kan normalt ikke anbefales) eller Afbryd for at afslutte installationen. +SourceIsCorrupted=Kildefilen er beskadiget +SourceDoesntExist=Kildefilen "%1" findes ikke +ExistingFileReadOnly=Den eksisterende fil er markeret som skrivebeskyttet.%n%nKlik Gentag for at prøve igen (efter at du har fjernet skrivebeskyttelsen), Ignorer for at springe filen over eller Afbryd for at afslutte installationen. +ErrorReadingExistingDest=Der opsted en fejl ved forsøg på at læse den eksisterende fil: +FileExists=Filen eksisterer allerede.%n%nSkal Installationsguiden overskrive den? +ExistingFileNewer=Den eksisterende fil er nyere end den installation forsøger at skrive. Det anbefales at beholde den eksisterende fil.%n%n Skal den eksisterende fil beholdes? +ErrorChangingAttr=Der opstod en fejl ved forsøg på at ændre attributter for den eksisterende fil: +ErrorCreatingTemp=En fejl opstod ved forsøg på at oprette en fil i mappen: +ErrorReadingSource=En fejl opstod ved forsøg på at læse kildefilen: +ErrorCopying=En fejl opstod ved forsøg på at kopiere en fil: +ErrorReplacingExistingFile=En fejl opstod ved forsøg på at overskrive den eksisterende fil: +ErrorRestartReplace=Genstart/Erstat fejlede: +ErrorRenamingTemp=En fejl opstod ved forsøg på at omdøbe en fil i modtagemappen: +ErrorRegisterServer=Kan ikke registrere DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 fejlede med exit kode %1 +ErrorRegisterTypeLib=Kan ikke registrere typebiblioteket: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Der opstod en fejl ved forsøg på at åbne README filen. +ErrorRestartingComputer=Installationen kunne ikke genstarte computeren. Genstart venligst computeren manuelt. + +; *** Uninstaller messages +UninstallNotFound=Filen "%1" eksisterer ikke. Afinstallationen kan ikke fortsætte. +UninstallOpenError=Filen "%1" kunne ikke åbnes. Kan ikke afinstallere +UninstallUnsupportedVer=Afinstallations-logfilen "%1" er i et format der ikke kan genkendes af denne version af afinstallations-programmet. Afinstallationen afbrydes +UninstallUnknownEntry=Der er en ukendt kommando (%1) i afinstallings-logfilen. +ConfirmUninstall=Er du sikker på at %1 og alle tilhørende komponenter skal fjernes fra computeren? +UninstallOnlyOnWin64=Denne installation kan kun fjernes på 64-bit Windows-versioner +OnlyAdminCanUninstall=Programmet kan kun fjernes af en bruger med administrator-rettigheder. +UninstallStatusLabel=Vent venligst imens %1 fjernes. +UninstalledAll=%1 er fjernet uden fejl. +UninstalledMost=%1 Afinstallation er afsluttet.%n%nNogle filer kunne ikke fjernes. Fjern dem manuelt, hvis du ikke ønsker de skal blive liggende. +UninstalledAndNeedsRestart=For at afslutte afinstallation af %1 skal computeren genstartes.%n%nVil du genstarte nu? +UninstallDataCorrupted="%1" er beskadiget. Afinstallation kan ikke foretages + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Fjern delt fil? +ConfirmDeleteSharedFile2=Systemet mener ikke længere at følgende delte fil(er) benyttes. Skal den/de delte fil(er) fjernes under afinstallationen?%n%nHvis du er usikker så vælg Nej. Beholdes filen på maskinen, vil den ikke gøre nogen skade, men hvis filen fjernes, selv om den stadig anvendes, bliver de programmer, der anvender filen, ustabile +SharedFileNameLabel=Filnavn: +SharedFileLocationLabel=Placering: +WizardUninstalling=Status for afinstallation +StatusUninstalling=Afinstallerer %1... + +[CustomMessages] +NameAndVersion=%1 version %2 +AdditionalIcons=Ekstra ikoner: +CreateDesktopIcon=Lav ikon på skrive&bordet +CreateQuickLaunchIcon=Lav &hurtigstart-ikon +ProgramOnTheWeb=%1 på internettet +UninstallProgram=Afinstaller (fjern) %1 +LaunchProgram=&Kør %1 +AssocFileExtension=Sammen&kæd %1 med filtypen %2 +AssocingFileExtension=Sammenkæder %1 med filtypen %2... diff --git a/Files/Languages/Dutch.isl b/Files/Languages/Dutch.isl new file mode 100644 index 000000000..da82c496a --- /dev/null +++ b/Files/Languages/Dutch.isl @@ -0,0 +1,297 @@ +; *** Inno Setup version 5.1.11+ Dutch messages *** +; +; This file is based on user-contributed translations by various authors +; +; Maintained by Martijn Laan (mlaan@jrsoftware.org) +; +; $jrsoftware: issrc/Files/Languages/Dutch.isl,v 1.27 2010/03/25 09:49:38 mlaan Exp $ + +[LangOptions] +LanguageName=Nederlands +LanguageID=$0413 +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Setup +SetupWindowTitle=Setup - %1 +UninstallAppTitle=Verwijderen +UninstallAppFullTitle=%1 verwijderen + +; *** Misc. common +InformationTitle=Informatie +ConfirmTitle=Bevestigen +ErrorTitle=Fout + +; *** SetupLdr messages +SetupLdrStartupMessage=Hiermee wordt %1 geïnstalleerd. Wilt u doorgaan? +LdrCannotCreateTemp=Kan geen tijdelijk bestand maken. Setup wordt afgesloten +LdrCannotExecTemp=Kan een bestand in de tijdelijke map niet uitvoeren. Setup wordt afgesloten + +; *** Startup error messages +LastErrorMessage=%1.%n%nFout %2: %3 +SetupFileMissing=Het bestand %1 ontbreekt in de installatiemap. Corrigeer dit probleem of gebruik een andere kopie van het programma. +SetupFileCorrupt=De installatiebestanden zijn beschadigd. Gebruik een andere kopie van het programma. +SetupFileCorruptOrWrongVer=De installatiebestanden zijn beschadigd, of zijn niet compatibel met deze versie van Setup. Corrigeer dit probleem of gebruik een andere kopie van het programma. +NotOnThisPlatform=Dit programma kan niet worden uitgevoerd onder %1. +OnlyOnThisPlatform=Dit programma moet worden uitgevoerd onder %1. +OnlyOnTheseArchitectures=Dit programma kan alleen geïnstalleerd worden onder versies van Windows ontworpen voor de volgende processor architecturen:%n%n%1 +MissingWOW64APIs=De versie van Windows die u gebruikt bevat niet de door Setup benodige functionaliteit om een 64-bit installatie uit te voeren. Installeer Service Pack %1 om dit probleem te corrigeren. +WinVersionTooLowError=Dit programma vereist %1 versie %2 of hoger. +WinVersionTooHighError=Dit programma kan niet worden geïnstalleerd onder %1 versie %2 of hoger. +AdminPrivilegesRequired=U moet aangemeld zijn als een systeembeheerder om dit programma te kunnen installeren. +PowerUserPrivilegesRequired=U moet ingelogd zijn als systeembeheerder of als gebruiker met systeembeheerders rechten om dit programma te kunnen installeren. +SetupAppRunningError=Setup heeft vastgesteld dat %1 op dit moment actief is.%n%nSluit alle vensters van dit programma, en klik daarna op OK om verder te gaan, of op Annuleren om Setup af te sluiten. +UninstallAppRunningError=Het verwijderprogramma heeft vastgesteld dat %1 op dit moment actief is.%n%nSluit alle vensters van dit programma, en klik daarna op OK om verder te gaan, of op Annuleren om het verwijderen af te breken. + +; *** Misc. errors +ErrorCreatingDir=Setup kan de map "%1" niet maken +ErrorTooManyFilesInDir=Kan geen bestand maken in de map "%1" omdat deze te veel bestanden bevat + +; *** Setup common messages +ExitSetupTitle=Setup afsluiten +ExitSetupMessage=Setup is niet voltooid. Als u nu afsluit, wordt het programma niet geïnstalleerd.%n%nU kunt Setup later opnieuw uitvoeren om de installatie te voltooien.%n%nSetup afsluiten? +AboutSetupMenuItem=&Over Setup... +AboutSetupTitle=Over Setup +AboutSetupMessage=%1 versie %2%n%3%n%n%1-homepage:%n%4 +AboutSetupNote= +TranslatorNote=Dutch translation maintained by Martijn Laan (mlaan@jrsoftware.org) + +; *** Buttons +ButtonBack=< Vo&rige +ButtonNext=&Volgende > +ButtonInstall=&Installeren +ButtonOK=OK +ButtonCancel=Annuleren +ButtonYes=&Ja +ButtonYesToAll=Ja op &alles +ButtonNo=&Nee +ButtonNoToAll=N&ee op alles +ButtonFinish=&Voltooien +ButtonBrowse=&Bladeren... +ButtonWizardBrowse=B&laderen... +ButtonNewFolder=&Nieuwe map maken + +; *** "Select Language" dialog messages +SelectLanguageTitle=Taalkeuze voor Setup +SelectLanguageLabel=Selecteer de taal welke Setup gebruikt tijdens de installatie: + +; *** Common wizard text +ClickNext=Klik op Volgende om verder te gaan of op Annuleren om Setup af te sluiten. +BeveledLabel= +BrowseDialogTitle=Map Selecteren +BrowseDialogLabel=Selecteer een map in onderstaande lijst en klik daarna op OK. +NewFolderName=Nieuwe map + +; *** "Welcome" wizard page +WelcomeLabel1=Welkom bij het installatieprogramma van [name]. +WelcomeLabel2=Hiermee wordt [name/ver] geïnstalleerd op deze computer.%n%nU wordt aanbevolen alle actieve programma's af te sluiten voordat u verder gaat. + +; *** "Password" wizard page +WizardPassword=Wachtwoord +PasswordLabel1=Deze installatie is beveiligd met een wachtwoord. +PasswordLabel3=Voer het wachtwoord in en klik op Volgende om verder te gaan. Wachtwoorden zijn hoofdlettergevoelig. +PasswordEditLabel=&Wachtwoord: +IncorrectPassword=Het ingevoerde wachtwoord is niet correct. Probeer het opnieuw. + +; *** "License Agreement" wizard page +WizardLicense=Licentieovereenkomst +LicenseLabel=Lees de volgende belangrijke informatie voordat u verder gaat. +LicenseLabel3=Lees de volgende licentieovereenkomst. Gebruik de schuifbalk of druk op de knop Page Down om de rest van de overeenkomst te zien. +LicenseAccepted=Ik &accepteer de licentieovereenkomst +LicenseNotAccepted=Ik accepteer de licentieovereenkomst &niet + +; *** "Information" wizard pages +WizardInfoBefore=Informatie +InfoBeforeLabel=Lees de volgende belangrijke informatie voordat u verder gaat. +InfoBeforeClickLabel=Klik op Volgende als u gereed bent om verder te gaan met Setup. +WizardInfoAfter=Informatie +InfoAfterLabel=Lees de volgende belangrijke informatie voordat u verder gaat. +InfoAfterClickLabel=Klik op Volgende als u gereed bent om verder te gaan met Setup. + +; *** "User Information" wizard page +WizardUserInfo=Gebruikersinformatie +UserInfoDesc=Vul hier uw informatie in. +UserInfoName=&Gebruikersnaam: +UserInfoOrg=&Organisatie: +UserInfoSerial=&Serienummer: +UserInfoNameRequired=U moet een naam invullen. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Kies de doelmap +SelectDirDesc=Waar moet [name] geïnstalleerd worden? +SelectDirLabel3=Setup zal [name] in de volgende map installeren. +SelectDirBrowseLabel=Klik op Volgende om door te gaan. Klik op Bladeren om een andere map te kiezen. +DiskSpaceMBLabel=Er is ten minste [mb] MB vrije schijfruimte vereist. +ToUNCPathname=Setup kan niet installeren naar een UNC-padnaam. Als u wilt installeren naar een netwerk, moet u een netwerkverbinding maken. +InvalidPath=U moet een volledig pad met stationsletter invoeren; bijvoorbeeld:%nC:\APP%n%nof een UNC pad zoals:%n%n\\server\share +InvalidDrive=Het geselecteerde station bestaat niet. Kies een ander station. +DiskSpaceWarningTitle=Onvoldoende schijfruimte +DiskSpaceWarning=Setup vereist ten minste %1 kB vrije schijfruimte voor het installeren, maar het geselecteerde station heeft slechts %2 kB beschikbaar.%n%nWilt u toch doorgaan? +DirNameTooLong=De mapnaam of het pad is te lang. +InvalidDirName=De mapnaam is ongeldig. +BadDirName32=Mapnamen mogen geen van de volgende tekens bevatten:%n%n%1 +DirExistsTitle=Map bestaat al +DirExists=De map:%n%n%1%n%nbestaat al. Wilt u toch naar die map installeren? +DirDoesntExistTitle=Map bestaat niet +DirDoesntExist=De map:%n%n%1%n%nbestaat niet. Wilt u de map aanmaken? + +; *** "Select Components" wizard page +WizardSelectComponents=Selecteer componenten +SelectComponentsDesc=Welke componenten moeten geïnstalleerd worden? +SelectComponentsLabel2=Selecteer de componenten die u wilt installeren. Klik op Volgende als u klaar bent om verder te gaan. +FullInstallation=Volledige installatie +CompactInstallation=Compacte installatie +CustomInstallation=Aangepaste installatie +NoUninstallWarningTitle=Component bestaat +NoUninstallWarning=Setup heeft gedetecteerd dat de volgende componenten al geïnstalleerd zijn op uw computer:%n%n%1%n%nAls u de selectie van deze componenten ongedaan maakt, worden ze niet verwijderd.%n%nWilt u toch doorgaan? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=De huidige selectie vereist ten minste [mb] MB vrije schijfruimte. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Selecteer extra taken +SelectTasksDesc=Welke extra taken moeten uitgevoerd worden? +SelectTasksLabel2=Selecteer de extra taken die u door Setup wilt laten uitvoeren bij het installeren van [name], en klik vervolgens op Volgende. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Selecteer menu Start map +SelectStartMenuFolderDesc=Waar moeten de snelkoppelingen van het programma geplaatst worden? +SelectStartMenuFolderLabel3=Setup plaatst de snelkoppelingen van het programma in de volgende menu Start map. +SelectStartMenuFolderBrowseLabel=Klik op Volgende om door te gaan. Klik op Bladeren om een andere map te kiezen. +MustEnterGroupName=U moet een mapnaam invoeren. +GroupNameTooLong=De mapnaam of het pad is te lang. +InvalidGroupName=De mapnaam is ongeldig. +BadGroupName=De mapnaam mag geen van de volgende tekens bevatten:%n%n%1 +NoProgramGroupCheck2=&Geen menu Start map maken + +; *** "Ready to Install" wizard page +WizardReady=Het voorbereiden van de installatie is gereed +ReadyLabel1=Setup is nu gereed om te beginnen met het installeren van [name] op deze computer. +ReadyLabel2a=Klik op Installeren om verder te gaan met installeren, of klik op Vorige als u instellingen wilt terugzien of veranderen. +ReadyLabel2b=Klik op Installeren om verder te gaan met installeren. +ReadyMemoUserInfo=Gebruikersinformatie: +ReadyMemoDir=Doelmap: +ReadyMemoType=Installatietype: +ReadyMemoComponents=Geselecteerde componenten: +ReadyMemoGroup=Menu Start map: +ReadyMemoTasks=Extra taken: + +; *** "Preparing to Install" wizard page +WizardPreparing=Bezig met het voorbereiden van de installatie +PreparingDesc=Bezig met het voorbereiden van [name] installatie. +PreviousInstallNotCompleted=De installatie/verwijdering van een vorig programma is niet voltooid. U moet uw computer opnieuw opstarten om die installatie te voltooien.%n%nStart [name] Setup nogmaals als uw computer opnieuw is opgestart. +CannotContinue=Setup kan niet doorgaan. Klik op annuleren om af te sluiten. + +; *** "Installing" wizard page +WizardInstalling=Bezig met installeren +InstallingLabel=Setup installeert [name] op uw computer. Een ogenblik geduld... + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Setup heeft het installeren van [name] op deze computer voltooid. +FinishedLabelNoIcons=Setup heeft het installeren van [name] op deze computer voltooid. +FinishedLabel=Setup heeft het installeren van [name] op deze computer voltooid. U kunt het programma uitvoeren met de geïnstalleerde snelkoppelingen. +ClickFinish=Klik op Voltooien om Setup te beëindigen. +FinishedRestartLabel=Setup moet de computer opnieuw opstarten om de installatie van [name] te voltooien. Wilt u nu opnieuw opstarten? +FinishedRestartMessage=Setup moet uw computer opnieuw opstarten om de installatie van [name] te voltooien.%n%nWilt u nu opnieuw opstarten? +ShowReadmeCheck=Ja, ik wil het bestand Leesmij zien +YesRadio=&Ja, start de computer nu opnieuw op +NoRadio=&Nee, ik start de computer later opnieuw op +RunEntryExec=Start %1 +RunEntryShellExec=Bekijk %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Setup heeft de volgende diskette nodig +SelectDiskLabel2=Voer diskette %1 in en klik op OK.%n%nAls de bestanden op deze diskette in een andere map gevonden kunnen worden dan die hieronder wordt getoond, voer dan het juiste pad in of klik op Bladeren. +PathLabel=&Pad: +FileNotInDir2=Kan het bestand "%1" niet vinden in "%2". Voer de juiste diskette in of kies een andere map. +SelectDirectoryLabel=Geef de locatie van de volgende diskette. + +; *** Installation phase messages +SetupAborted=Setup is niet voltooid.%n%nCorrigeer het probleem en voer Setup opnieuw uit. +EntryAbortRetryIgnore=Klik op Opnieuw om het opnieuw te proberen, op Negeren om toch door te gaan, of op Afbreken om de installatie af te breken. + +; *** Installation status messages +StatusCreateDirs=Mappen maken... +StatusExtractFiles=Bestanden uitpakken... +StatusCreateIcons=Snelkoppelingen maken... +StatusCreateIniEntries=INI-gegevens instellen... +StatusCreateRegistryEntries=Registergegevens instellen... +StatusRegisterFiles=Bestanden registreren... +StatusSavingUninstall=Verwijderingsinformatie opslaan... +StatusRunProgram=Installatie voltooien... +StatusRollback=Veranderingen ongedaan maken... + +; *** Misc. errors +ErrorInternal2=Interne fout: %1 +ErrorFunctionFailedNoCode=%1 mislukt +ErrorFunctionFailed=%1 mislukt; code %2 +ErrorFunctionFailedWithMessage=%1 mislukt; code %2.%n%3 +ErrorExecutingProgram=Kan bestand niet uitvoeren:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Fout bij het openen van registersleutel:%n%1\%2 +ErrorRegCreateKey=Fout bij het maken van registersleutel:%n%1\%2 +ErrorRegWriteKey=Fout bij het schrijven naar registersleutel:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Fout bij het maken van een INI-instelling in bestand "%1". + +; *** File copying errors +FileAbortRetryIgnore=Klik op Opnieuw om het opnieuw te proberen, op Negeren om toch door te gaan (niet aanbevolen), of op Afbreken om de installatie af te breken. +FileAbortRetryIgnore2=Klik op Opnieuw om het opnieuw te proberen, op Negeren om toch door te gaan (niet aanbevolen), of op Afbreken om de installatie af te breken. +SourceIsCorrupted=Het bronbestand is beschadigd +SourceDoesntExist=Het bronbestand "%1" bestaat niet +ExistingFileReadOnly=Het bestaande bestand is gemarkeerd als alleen-lezen.%n%nKlik op Opnieuw om het kenmerk alleen-lezen te verwijderen en opnieuw te proberen, op Negeren om dit bestand over te slaan, of op Afbreken om de installatie af te breken. +ErrorReadingExistingDest=Er is een fout opgetreden bij het lezen van het bestaande bestand: +FileExists=Het bestand bestaat al.%n%nWilt u dat Setup het overschrijft? +ExistingFileNewer=Het bestaande bestand is nieuwer dan het bestand dat Setup probeert te installeren. U wordt aanbevolen het bestaande bestand te behouden.%n%nWilt u het bestaande bestand behouden? +ErrorChangingAttr=Er is een fout opgetreden bij het wijzigen van de kenmerken van het bestaande bestand: +ErrorCreatingTemp=Er is een fout opgetreden bij het maken van een bestand in de doelmap: +ErrorReadingSource=Er is een fout opgetreden bij het lezen van het bronbestand: +ErrorCopying=Er is een fout opgetreden bij het kopiëren van een bestand: +ErrorReplacingExistingFile=Er is een fout opgetreden bij het vervangen van het bestaande bestand: +ErrorRestartReplace=Vervangen na opnieuw starten is mislukt: +ErrorRenamingTemp=Er is een fout opgetreden bij het hernoemen van een bestand in de doelmap: +ErrorRegisterServer=Kan de DLL/OCX niet registreren: %1 +ErrorRegSvr32Failed=RegSvr32 mislukt met afsluitcode %1 +ErrorRegisterTypeLib=Kan de type library niet registreren: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Er is een fout opgetreden bij het openen van het Leesmij-bestand. +ErrorRestartingComputer=Setup kan de computer niet opnieuw opstarten. Doe dit handmatig. + +; *** Uninstaller messages +UninstallNotFound=Bestand "%1" bestaat niet. Kan het programma niet verwijderen. +UninstallUnsupportedVer=Het installatie-logbestand "%1" heeft een formaat dat niet herkend wordt door deze versie van het verwijderprogramma. Kan het programma niet verwijderen +UninstallUnknownEntry=Er is een onbekend gegeven (%1) aangetroffen in het installatie-logbestand +ConfirmUninstall=Weet u zeker dat u %1 en alle bijbehorende componenten wilt verwijderen? +UninstallOnlyOnWin64=Deze installatie kan alleen worden verwijderd onder 64-bit Windows. +OnlyAdminCanUninstall=Deze installatie kan alleen worden verwijderd door een gebruiker met administratieve rechten. +UninstallStatusLabel=%1 wordt verwijderd van uw computer. Een ogenblik geduld. +UninstallOpenError=Bestand "%1" kon niet worden geopend. Kan het verwijderen niet voltooien. +UninstalledAll=%1 is met succes van deze computer verwijderd. +UninstalledMost=Het verwijderen van %1 is voltooid.%n%nEnkele elementen konden niet verwijderd worden. Deze kunnen handmatig verwijderd worden. +UninstalledAndNeedsRestart=Om het verwijderen van %1 te voltooien, moet uw computer opnieuw worden opgestart.%n%nWilt u nu opnieuw opstarten? +UninstallDataCorrupted="%1" bestand is beschadigd. Kan verwijderen niet voltooien + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Gedeeld bestand verwijderen? +ConfirmDeleteSharedFile2=Het systeem geeft aan dat het volgende gedeelde bestand niet langer gebruikt wordt door enig programma. Wilt u dat dit gedeelde bestand verwijderd wordt?%n%nAls dit bestand toch nog gebruikt wordt door een programma en het verwijderd wordt, werkt dat programma misschien niet meer correct. Als u het niet zeker weet, kies dan Nee. Bewaren van het bestand op dit systeem is niet schadelijk. +SharedFileNameLabel=Bestandsnaam: +SharedFileLocationLabel=Locatie: +WizardUninstalling=Verwijderingsstatus +StatusUninstalling=Verwijderen van %1... + +[CustomMessages] + +NameAndVersion=%1 versie %2 +AdditionalIcons=Extra snelkoppelingen: +CreateDesktopIcon=Maak een snelkoppeling op het &bureaublad +CreateQuickLaunchIcon=Maak een snelkoppeling op de &Snel starten werkbalk +ProgramOnTheWeb=%1 op het Web +UninstallProgram=Verwijder %1 +LaunchProgram=&Start %1 +AssocFileExtension=&Koppel %1 aan de %2 bestandsextensie +AssocingFileExtension=Bezig met koppelen van %1 aan de %2 bestandsextensie... diff --git a/Files/Languages/Finnish.isl b/Files/Languages/Finnish.isl new file mode 100644 index 000000000..d009948ff --- /dev/null +++ b/Files/Languages/Finnish.isl @@ -0,0 +1,296 @@ +; *** Inno Setup version 5.1.11+ Finnish messages *** +; +; Finnish translation by Antti Karttunen +; E-mail: antti.karttunen@joensuu.fi +; Translation home page: http://cc.joensuu.fi/~ankarttu/innosetup/ +; Last modification date: 2008-04-23 + +[LangOptions] +LanguageName=Suomi +LanguageID=$040B +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Asennus +SetupWindowTitle=%1 - Asennus +UninstallAppTitle=Asennuksen poisto +UninstallAppFullTitle=%1 - Asennuksen poisto + +; *** Misc. common +InformationTitle=Ilmoitus +ConfirmTitle=Varmistus +ErrorTitle=Virhe + +; *** SetupLdr messages +SetupLdrStartupMessage=Tällä asennusohjelmalla asennetaan %1. Haluatko jatkaa? +LdrCannotCreateTemp=Väliaikaistiedostoa ei voitu luoda. Asennus keskeytettiin +LdrCannotExecTemp=Väliaikaisessa hakemistossa olevaa tiedostoa ei voitu suorittaa. Asennus keskeytettiin + +; *** Startup error messages +LastErrorMessage=%1.%n%nVirhe %2: %3 +SetupFileMissing=Tiedostoa %1 ei löydy asennushakemistosta. Korjaa ongelma tai hanki uusi kopio ohjelmasta. +SetupFileCorrupt=Asennustiedostot ovat vaurioituneet. Hanki uusi kopio ohjelmasta. +SetupFileCorruptOrWrongVer=Asennustiedostot ovat vaurioituneet tai ovat epäyhteensopivia tämän Asennuksen version kanssa. Korjaa ongelma tai hanki uusi kopio ohjelmasta. +NotOnThisPlatform=Tämä ohjelma ei toimi %1-käyttöjärjestelmässä. +OnlyOnThisPlatform=Tämä ohjelma toimii vain %1-käyttöjärjestelmässä. +OnlyOnTheseArchitectures=Tämä ohjelma voidaan asentaa vain niihin Windowsin versioihin, jotka on suunniteltu seuraaville prosessorityypeille:%n%n%1 +MissingWOW64APIs=Tämä Windowsin versio ei sisällä ominaisuuksia, joita Asennus tarvitsee suorittaakseen 64-bittisen asennuksen. Korjaa ongelma asentamalla Service Pack %1. +WinVersionTooLowError=Tämä ohjelma vaatii version %2 tai myöhemmän %1-käyttöjärjestelmästä. +WinVersionTooHighError=Tätä ohjelmaa ei voi asentaa %1-käyttöjärjestelmän versioon %2 tai myöhempään. +AdminPrivilegesRequired=Sinun täytyy kirjautua sisään järjestelmänvalvojana asentaaksesi tämän ohjelman. +PowerUserPrivilegesRequired=Sinun täytyy kirjautua sisään järjestelmänvalvojana tai tehokäyttäjänä asentaaksesi tämän ohjelman. +SetupAppRunningError=Asennus löysi käynnissä olevan kopion ohjelmasta %1.%n%nSulje kaikki käynnissä olevat kopiot ohjelmasta ja valitse OK jatkaaksesi, tai valitse Peruuta poistuaksesi. +UninstallAppRunningError=Asennuksen poisto löysi käynnissä olevan kopion ohjelmasta %1.%n%nSulje kaikki käynnissä olevat kopiot ohjelmasta ja valitse OK jatkaaksesi, tai valitse Peruuta poistuaksesi. + +; *** Misc. errors +ErrorCreatingDir=Asennus ei voinut luoda hakemistoa "%1" +ErrorTooManyFilesInDir=Tiedoston luominen hakemistoon "%1" epäonnistui, koska se sisältää liian monta tiedostoa + +; *** Setup common messages +ExitSetupTitle=Poistu Asennuksesta +ExitSetupMessage=Asennus ei ole valmis. Jos lopetat nyt, ohjelmaa ei asenneta.%n%nVoit ajaa Asennuksen toiste asentaaksesi ohjelman.%n%nLopetetaanko Asennus? +AboutSetupMenuItem=&Tietoja Asennuksesta... +AboutSetupTitle=Tietoja Asennuksesta +AboutSetupMessage=%1 versio %2%n%3%n%n%1 -ohjelman kotisivu:%n%4 +AboutSetupNote= +TranslatorNote=Suomenkielinen käännös: Antti Karttunen (antti.karttunen@joensuu.fi) + +; *** Buttons +ButtonBack=< &Takaisin +ButtonNext=&Seuraava > +ButtonInstall=&Asenna +ButtonOK=OK +ButtonCancel=Peruuta +ButtonYes=&Kyllä +ButtonYesToAll=Kyllä k&aikkiin +ButtonNo=&Ei +ButtonNoToAll=E&i kaikkiin +ButtonFinish=&Lopeta +ButtonBrowse=S&elaa... +ButtonWizardBrowse=S&elaa... +ButtonNewFolder=&Luo uusi kansio + +; *** "Select Language" dialog messages +SelectLanguageTitle=Valitse Asennuksen kieli +SelectLanguageLabel=Valitse asentamisen aikana käytettävä kieli: + +; *** Common wizard text +ClickNext=Valitse Seuraava jatkaaksesi tai Peruuta poistuaksesi. +BeveledLabel= +BrowseDialogTitle=Selaa kansioita +BrowseDialogLabel=Valitse kansio allaolevasta listasta ja valitse sitten OK jatkaaksesi. +NewFolderName=Uusi kansio + +; *** "Welcome" wizard page +WelcomeLabel1=Tervetuloa [name] -asennusohjelmaan. +WelcomeLabel2=Tällä asennusohjelmalla koneellesi asennetaan [name/ver]. %n%nOn suositeltavaa, että suljet kaikki muut käynnissä olevat sovellukset ennen jatkamista. Tämä auttaa välttämään ristiriitatilanteita asennuksen aikana. + +; *** "Password" wizard page +WizardPassword=Salasana +PasswordLabel1=Tämä asennusohjelma on suojattu salasanalla. +PasswordLabel3=Anna salasana ja valitse sitten Seuraava jatkaaksesi.%n%nIsot ja pienet kirjaimet ovat eriarvoisia. +PasswordEditLabel=&Salasana: +IncorrectPassword=Antamasi salasana oli virheellinen. Anna salasana uudelleen. + +; *** "License Agreement" wizard page +WizardLicense=Käyttöoikeussopimus +LicenseLabel=Lue seuraava tärkeä tiedotus ennen kuin jatkat. +LicenseLabel3=Lue seuraava käyttöoikeussopimus tarkasti. Sinun täytyy hyväksyä sopimus, jos haluat jatkaa asentamista. +LicenseAccepted=&Hyväksyn sopimuksen +LicenseNotAccepted=&En hyväksy sopimusta + +; *** "Information" wizard pages +WizardInfoBefore=Tiedotus +InfoBeforeLabel=Lue seuraava tärkeä tiedotus ennen kuin jatkat. +InfoBeforeClickLabel=Kun olet valmis jatkamaan asentamista, valitse Seuraava. +WizardInfoAfter=Tiedotus +InfoAfterLabel=Lue seuraava tärkeä tiedotus ennen kuin jatkat. +InfoAfterClickLabel=Kun olet valmis jatkamaan asentamista, valitse Seuraava. + +; *** "Select Destination Directory" wizard page +WizardUserInfo=Käyttäjätiedot +UserInfoDesc=Anna pyydetyt tiedot. +UserInfoName=Käyttäjän &nimi: +UserInfoOrg=&Yritys: +UserInfoSerial=&Tunnuskoodi: +UserInfoNameRequired=Sinun täytyy antaa nimi. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Valitse kohdekansio +SelectDirDesc=Mihin [name] asennetaan? +SelectDirLabel3=[name] asennetaan tähän kansioon. +SelectDirBrowseLabel=Valitse Seuraava jatkaaksesi. Jos haluat vaihtaa kansiota, valitse Selaa. +DiskSpaceMBLabel=Vapaata levytilaa tarvitaan vähintään [mb] Mt. +ToUNCPathname=Asennus ei osaa käyttää UNC-polunnimiä. Jos haluat asentaa ohjelman verkkolevylle, yhdistä verkkoasema ensin levyasematunnukseen. +InvalidPath=Anna täydellinen polku levyaseman kirjaimen kanssa. Esimerkiksi %nC:\OHJELMA%n%ntai UNC-polku muodossa %n%n\\palvelin\resurssi +InvalidDrive=Valitsemaasi asemaa tai UNC-polkua ei ole olemassa tai sitä ei voi käyttää. Valitse toinen asema tai UNC-polku. +DiskSpaceWarningTitle=Ei tarpeeksi vapaata levytilaa +DiskSpaceWarning=Asennus vaatii vähintään %1 kt vapaata levytilaa, mutta valitulla levyasemalla on vain %2 kt vapaata levytilaa.%n%nHaluatko jatkaa tästä huolimatta? +DirNameTooLong=Kansion nimi tai polku on liian pitkä. +InvalidDirName=Virheellinen kansion nimi. +BadDirName32=Kansion nimessä ei saa olla seuraavia merkkejä:%n%n%1 +DirExistsTitle=Kansio on olemassa +DirExists=Kansio:%n%n%1%n%non jo olemassa. Haluatko kuitenkin suorittaa asennuksen tähän kansioon? +DirDoesntExistTitle=Kansiota ei ole olemassa +DirDoesntExist=Kansiota%n%n%1%n%nei ole olemassa. Luodaanko kansio? + +; *** "Select Components" wizard page +WizardSelectComponents=Valitse asennettavat osat +SelectComponentsDesc=Mitkä osat asennetaan? +SelectComponentsLabel2=Valitse ne osat, jotka haluat asentaa, ja poista niiden osien valinta, joita et halua asentaa. Valitse Seuraava, kun olet valmis. +FullInstallation=Normaali asennus +CompactInstallation=Suppea asennus +CustomInstallation=Mukautettu asennus +NoUninstallWarningTitle=Asennettuja osia löydettiin +NoUninstallWarning=Seuraavat osat on jo asennettu koneelle:%n%n%1%n%nNäiden osien valinnan poistaminen ei poista niitä koneelta.%n%nHaluatko jatkaa tästä huolimatta? +ComponentSize1=%1 kt +ComponentSize2=%1 Mt +ComponentsDiskSpaceMBLabel=Nykyiset valinnat vaativat vähintään [mb] Mt levytilaa. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Valitse muut toiminnot +SelectTasksDesc=Mitä muita toimintoja suoritetaan? +SelectTasksLabel2=Valitse muut toiminnot, jotka haluat Asennuksen suorittavan samalla kun [name] asennetaan. Valitse Seuraava, kun olet valmis. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Valitse Käynnistä-valikon kansio +SelectStartMenuFolderDesc=Mihin ohjelman pikakuvakkeet sijoitetaan? +SelectStartMenuFolderLabel3=Ohjelman pikakuvakkeet luodaan tähän Käynnistä-valikon kansioon. +SelectStartMenuFolderBrowseLabel=Valitse Seuraava jatkaaksesi. Jos haluat vaihtaa kansiota, valitse Selaa. +MustEnterGroupName=Kansiolle pitää antaa nimi. +GroupNameTooLong=Kansion nimi tai polku on liian pitkä. +InvalidGroupName=Virheellinen kansion nimi. +BadGroupName=Kansion nimessä ei saa olla seuraavia merkkejä:%n%n%1 +NoProgramGroupCheck2=Älä luo k&ansiota Käynnistä-valikkoon + +; *** "Ready to Install" wizard page +WizardReady=Valmiina asennukseen +ReadyLabel1=[name] on nyt valmis asennettavaksi. +ReadyLabel2a=Valitse Asenna jatkaaksesi asentamista tai valitse Takaisin, jos haluat tarkastella tekemiäsi asetuksia tai muuttaa niitä. +ReadyLabel2b=Valitse Asenna jatkaaksesi asentamista. +ReadyMemoUserInfo=Käyttäjätiedot: +ReadyMemoDir=Kohdekansio: +ReadyMemoType=Asennustyyppi: +ReadyMemoComponents=Asennettavaksi valitut osat: +ReadyMemoGroup=Käynnistä-valikon kansio: +ReadyMemoTasks=Muut toiminnot: + +; *** "Preparing to Install" wizard page +WizardPreparing=Valmistellaan asennusta +PreparingDesc=Valmistaudutaan asentamaan [name] koneellesi. +PreviousInstallNotCompleted=Edellisen ohjelman asennus tai asennuksen poisto ei ole valmis. Sinun täytyy käynnistää kone uudelleen viimeistelläksesi edellisen asennuksen.%n%nAja [name] -asennusohjelma uudestaan, kun olet käynnistänyt koneen uudelleen. +CannotContinue=Asennusta ei voida jatkaa. Valitse Peruuta poistuaksesi. + +; *** "Installing" wizard page +WizardInstalling=Asennus käynnissä +InstallingLabel=Odota, kun [name] asennetaan koneellesi. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=[name] - Asennuksen viimeistely +FinishedLabelNoIcons=[name] on nyt asennettu koneellesi. +FinishedLabel=[name] on nyt asennettu. Sovellus voidaan käynnistää valitsemalla jokin asennetuista kuvakkeista. +ClickFinish=Valitse Lopeta poistuaksesi Asennuksesta. +FinishedRestartLabel=Jotta [name] saataisiin asennettua loppuun, pitää kone käynnistää uudelleen. Haluatko käynnistää koneen uudelleen nyt? +FinishedRestartMessage=Jotta [name] saataisiin asennettua loppuun, pitää kone käynnistää uudelleen.%n%nHaluatko käynnistää koneen uudelleen nyt? +ShowReadmeCheck=Kyllä, haluan nähdä LUEMINUT-tiedoston +YesRadio=&Kyllä, käynnistä kone uudelleen +NoRadio=&Ei, käynnistän koneen uudelleen myöhemmin +RunEntryExec=Käynnistä %1 +RunEntryShellExec=Näytä %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Asennus tarvitsee seuraavan levykkeen +SelectDiskLabel2=Aseta levyke %1 asemaan ja valitse OK. %n%nJos joku toinen kansio sisältää levykkeen tiedostot, anna oikea polku tai valitse Selaa. +PathLabel=&Polku: +FileNotInDir2=Tiedostoa "%1" ei löytynyt lähteestä "%2". Aseta oikea levyke asemaan tai valitse toinen kansio. +SelectDirectoryLabel=Määritä seuraavan levykkeen sisällön sijainti. + +; *** Installation phase messages +SetupAborted=Asennusta ei suoritettu loppuun.%n%nKorjaa ongelma ja suorita Asennus uudelleen. +EntryAbortRetryIgnore=Valitse Uudelleen yrittääksesi uudelleen, Ohita jatkaaksesi kaikesta huolimatta tai Hylkää peruuttaaksesi asennuksen. + +; *** Installation status messages +StatusCreateDirs=Luodaan hakemistoja... +StatusExtractFiles=Puretaan tiedostoja... +StatusCreateIcons=Luodaan pikakuvakkeita... +StatusCreateIniEntries=Luodaan INI-merkintöjä... +StatusCreateRegistryEntries=Luodaan rekisterimerkintöjä... +StatusRegisterFiles=Rekisteröidään tiedostoja... +StatusSavingUninstall=Tallennetaan Asennuksen poiston tietoja... +StatusRunProgram=Viimeistellään asennusta... +StatusRollback=Peruutetaan tehdyt muutokset... + +; *** Misc. errors +ErrorInternal2=Sisäinen virhe: %1 +ErrorFunctionFailedNoCode=%1 epäonnistui +ErrorFunctionFailed=%1 epäonnistui; virhekoodi %2 +ErrorFunctionFailedWithMessage=%1 epäonnistui; virhekoodi %2.%n%3 +ErrorExecutingProgram=Virhe suoritettaessa tiedostoa%n%1 + +; *** Registry errors +ErrorRegOpenKey=Virhe avattaessa rekisteriavainta%n%1\%2 +ErrorRegCreateKey=Virhe luotaessa rekisteriavainta%n%1\%2 +ErrorRegWriteKey=Virhe kirjoitettaessa rekisteriavaimeen%n%1\%2 + +; *** INI errors +ErrorIniEntry=Virhe luotaessa INI-merkintää tiedostoon "%1". + +; *** File copying errors +FileAbortRetryIgnore=Valitse Uudelleen yrittääksesi uudelleen, Ohita ohittaaksesi tämän tiedoston (ei suositeltavaa) tai Hylkää peruuttaaksesi asennuksen. +FileAbortRetryIgnore2=Valitse Uudelleen yrittääksesi uudelleen, Ohita jatkaaksesi kaikesta huolimatta (ei suositeltavaa) tai Hylkää peruuttaaksesi asennuksen. +SourceIsCorrupted=Lähdetiedosto on vaurioitunut +SourceDoesntExist=Lähdetiedostoa "%1" ei ole olemassa +ExistingFileReadOnly=Nykyinen tiedosto on Vain luku -tiedosto.%n%nValitse Uudelleen poistaaksesi Vain luku -määritteen uudelleenyritystä varten, Ohita ohittaaksesi tämän tiedoston tai Hylkää peruuttaaksesi asennuksen. +ErrorReadingExistingDest=Virhe luettaessa nykyistä tiedostoa: +FileExists=Tiedosto on jo olemassa.%n%nKorvataanko se? +ExistingFileNewer=Nykyinen tiedosto on uudempi kuin asennettava tiedosto. Nykyisen tiedoston säilyttäminen on suositeltavaa.n%nHaluatko säilyttää nykyisen tiedoston? +ErrorChangingAttr=Virhe vaihdettaessa nykyisen tiedoston määritteitä: +ErrorCreatingTemp=Virhe luotaessa tiedostoa kohdehakemistoon: +ErrorReadingSource=Virhe luettaessa lähdetiedostoa: +ErrorCopying=Virhe kopioitaessa tiedostoa: +ErrorReplacingExistingFile=Virhe korvattaessa nykyistä tiedostoa: +ErrorRestartReplace=RestartReplace-komento epäonnistui: +ErrorRenamingTemp=Virhe uudelleennimettäessä tiedostoa kohdehakemistossa: +ErrorRegisterServer=DLL/OCX -laajennuksen rekisteröinti epäonnistui: %1 +ErrorRegSvr32Failed=RegSvr32-toiminto epäonnistui. Virhekoodi: %1 +ErrorRegisterTypeLib=Tyyppikirjaston rekisteröiminen epäonnistui: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Virhe avattaessa LUEMINUT-tiedostoa. +ErrorRestartingComputer=Koneen uudelleenkäynnistäminen ei onnistunut. Suorita uudelleenkäynnistys itse. + +; *** Uninstaller messages +UninstallNotFound=Tiedostoa "%1" ei löytynyt. Asennuksen poisto ei onnistu. +UninstallOpenError=Tiedostoa "%1" ei voitu avata. Asennuksen poisto ei onnistu. +UninstallUnsupportedVer=Tämä versio Asennuksen poisto-ohjelmasta ei pysty lukemaan lokitiedostoa "%1". Asennuksen poisto ei onnistu +UninstallUnknownEntry=Asennuksen poisto-ohjelman lokitiedostosta löytyi tuntematon merkintä (%1) +ConfirmUninstall=Poistetaanko %1 ja kaikki sen osat? +UninstallOnlyOnWin64=Tämä ohjelma voidaan poistaa vain 64-bittisestä Windowsista käsin. +OnlyAdminCanUninstall=Tämän asennuksen poistaminen vaatii järjestelmänvalvojan oikeudet. +UninstallStatusLabel=Odota, kun %1 poistetaan koneeltasi. +UninstalledAll=%1 poistettiin onnistuneesti. +UninstalledMost=%1 poistettiin koneelta.%n%nJoitakin osia ei voitu poistaa. Voit poistaa osat itse. +UninstalledAndNeedsRestart=Kone täytyy käynnistää uudelleen, jotta %1 voidaan poistaa kokonaan.%n%nHaluatko käynnistää koneen uudeelleen nyt? +UninstallDataCorrupted=Tiedosto "%1" on vaurioitunut. Asennuksen poisto ei onnistu. + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Poistetaanko jaettu tiedosto? +ConfirmDeleteSharedFile2=Järjestelmän mukaan seuraava jaettu tiedosto ei ole enää minkään muun sovelluksen käytössä. Poistetaanko tiedosto?%n%nJos jotkut sovellukset käyttävät vielä tätä tiedostoa ja se poistetaan, ne eivät välttämättä toimi enää kunnolla. Jos olet epävarma, valitse Ei. Tiedoston jättäminen koneelle ei aiheuta ongelmia. +SharedFileNameLabel=Tiedoston nimi: +SharedFileLocationLabel=Sijainti: +WizardUninstalling=Asennuksen poiston tila +StatusUninstalling=Poistetaan %1... + +[CustomMessages] + +NameAndVersion=%1 versio %2 +AdditionalIcons=Lisäkuvakkeet: +CreateDesktopIcon=Lu&o kuvake työpöydälle +CreateQuickLaunchIcon=Luo kuvake &pikakäynnistyspalkkiin +ProgramOnTheWeb=%1 Internetissä +UninstallProgram=Poista %1 +LaunchProgram=&Käynnistä %1 +AssocFileExtension=&Yhdistä %1 tiedostopäätteeseen %2 +AssocingFileExtension=Yhdistetään %1 tiedostopäätteeseen %2 ... diff --git a/Files/Languages/French.isl b/Files/Languages/French.isl new file mode 100644 index 000000000..b26dc6888 --- /dev/null +++ b/Files/Languages/French.isl @@ -0,0 +1,322 @@ +; *** Inno Setup version 5.1.11+ French messages *** +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; Maintained by Pierre Yager (pierre@levosgien.net) +; +; Contributors : Frédéric Bonduelle, Francis Pallini, Lumina, Pascal Peyrot +; +; Changes : +; + Accents on uppercase letters +; http://www.academie-francaise.fr/langue/questions.html#accentuation (lumina) +; + Typography quotes [see ISBN: 978-2-7433-0482-9] +; http://fr.wikipedia.org/wiki/Guillemet (lumina) +; + Binary units (Kio, Mio) [IEC 80000-13:2008] +; http://fr.wikipedia.org/wiki/Octet (lumina) +; + Reverted to standard units (Ko, Mo) to follow Windows Explorer Standard +; http://blogs.msdn.com/b/oldnewthing/archive/2009/06/11/9725386.aspx +; +; $jrsoftware: issrc/Files/Languages/French.isl,v 1.18 2011/02/15 14:52:59 mlaan Exp $ + +[LangOptions] +LanguageName=Fran<00E7>ais +LanguageID=$040C +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Installation +SetupWindowTitle=Installation - %1 +UninstallAppTitle=Désinstallation +UninstallAppFullTitle=Désinstallation - %1 + +; *** Misc. common +InformationTitle=Information +ConfirmTitle=Confirmation +ErrorTitle=Erreur + +; *** SetupLdr messages +SetupLdrStartupMessage=Cet assistant va installer %1. Voulez-vous continuer ? +LdrCannotCreateTemp=Impossible de créer un fichier temporaire. Abandon de l'installation +LdrCannotExecTemp=Impossible d'exécuter un fichier depuis le dossier temporaire. Abandon de l'installation + +; *** Startup error messages +LastErrorMessage=%1.%n%nErreur %2 : %3 +SetupFileMissing=Le fichier %1 est absent du dossier d'installation. Veuillez corriger le problème ou vous procurer une nouvelle copie du programme. +SetupFileCorrupt=Les fichiers d'installation sont altérés. Veuillez vous procurer une nouvelle copie du programme. +SetupFileCorruptOrWrongVer=Les fichiers d'installation sont altérés ou ne sont pas compatibles avec cette version de l'assistant d'installation. Veuillez corriger le problème ou vous procurer une nouvelle copie du programme. +NotOnThisPlatform=Ce programme ne fonctionne pas sous %1. +OnlyOnThisPlatform=Ce programme ne peut fonctionner que sous %1. +OnlyOnTheseArchitectures=Ce programme ne peut être installé que sur des versions de Windows qui supportent ces architectures : %n%n%1 +MissingWOW64APIs=La version de Windows que vous utilisez ne dispose pas des fonctionnalités nécessaires pour que l'assistant puisse réaliser une installation 64 bits. Pour corriger ce problème vous devez installer le Service Pack %1. +WinVersionTooLowError=Ce programme requiert la version %2 ou supérieure de %1. +WinVersionTooHighError=Ce programme ne peut pas être installé sous %1 version %2 ou supérieure. +AdminPrivilegesRequired=Vous devez disposer des droits d'administration de cet ordinateur pour installer ce programme. +PowerUserPrivilegesRequired=Vous devez disposer des droits d'administration ou faire partie du groupe « Utilisateurs avec pouvoir » de cet ordinateur pour installer ce programme. +SetupAppRunningError=L'assistant d'installation a détecté que %1 est actuellement en cours d'exécution.%n%nVeuillez fermer toutes les instances de cette application puis appuyer sur OK pour continuer, ou bien appuyer sur Annuler pour abandonner l'installation. +UninstallAppRunningError=La procédure de désinstallation a détecté que %1 est actuellement en cours d'exécution.%n%nVeuillez fermer toutes les instances de cette application puis appuyer sur OK pour continuer, ou bien appuyer sur Annuler pour abandonner la désinstallation. + +; *** Misc. errors +ErrorCreatingDir=L'assistant d'installation n'a pas pu créer le dossier "%1" +ErrorTooManyFilesInDir=L'assistant d'installation n'a pas pu créer un fichier dans le dossier "%1" car celui-ci contient trop de fichiers + +; *** Setup common messages +ExitSetupTitle=Quitter l'installation +ExitSetupMessage=L'installation n'est pas terminée. Si vous abandonnez maintenant, le programme ne sera pas installé.%n%nVous devrez relancer cet assistant pour finir l'installation.%n%nVoulez-vous quand même quitter l'assistant d'installation ? +AboutSetupMenuItem=&À propos... +AboutSetupTitle=À Propos de l'assistant d'installation +AboutSetupMessage=%1 version %2%n%3%n%nPage d'accueil de %1 :%n%4 +AboutSetupNote= +TranslatorNote=Traduction française maintenue par Pierre Yager (pierre@levosgien.net) + +; *** Buttons +ButtonBack=< &Précédent +ButtonNext=&Suivant > +ButtonInstall=&Installer +ButtonOK=OK +ButtonCancel=Annuler +ButtonYes=&Oui +ButtonYesToAll=Oui pour &tout +ButtonNo=&Non +ButtonNoToAll=N&on pour tout +ButtonFinish=&Terminer +ButtonBrowse=Pa&rcourir... +ButtonWizardBrowse=Pa&rcourir... +ButtonNewFolder=Nouveau &dossier + +; *** "Select Language" dialog messages +SelectLanguageTitle=Langue de l'assistant d'installation +SelectLanguageLabel=Veuillez sélectionner la langue qui sera utilisée par l'assistant d'installation : + +; *** Common wizard text +ClickNext=Appuyez sur Suivant pour continuer ou sur Annuler pour abandonner l'installation. +BeveledLabel= +BrowseDialogTitle=Parcourir les dossiers +BrowseDialogLabel=Veuillez choisir un dossier de destination, puis appuyez sur OK. +NewFolderName=Nouveau dossier + +; *** "Welcome" wizard page +WelcomeLabel1=Bienvenue dans l'assistant d'installation de [name] +WelcomeLabel2=Cet assistant va vous guider dans l'installation de [name/ver] sur votre ordinateur.%n%nIl est recommandé de fermer toutes les applications actives avant de continuer. + +; *** "Password" wizard page +WizardPassword=Mot de passe +PasswordLabel1=Cette installation est protégée par un mot de passe. +PasswordLabel3=Veuillez saisir le mot de passe (attention à la distinction entre majuscules et minuscules) puis appuyez sur Suivant pour continuer. +PasswordEditLabel=&Mot de passe : +IncorrectPassword=Le mot de passe saisi n'est pas valide. Veuillez essayer à nouveau. + +; *** "License Agreement" wizard page +WizardLicense=Accord de licence +LicenseLabel=Les informations suivantes sont importantes. Veuillez les lire avant de continuer. +LicenseLabel3=Veuillez lire le contrat de licence suivant. Vous devez en accepter tous les termes avant de continuer l'installation. +LicenseAccepted=Je comprends et j'&accepte les termes du contrat de licence +LicenseNotAccepted=Je &refuse les termes du contrat de licence + +; *** "Information" wizard pages +WizardInfoBefore=Information +InfoBeforeLabel=Les informations suivantes sont importantes. Veuillez les lire avant de continuer. +InfoBeforeClickLabel=Lorsque vous êtes prêt à continuer, appuyez sur Suivant. +WizardInfoAfter=Information +InfoAfterLabel=Les informations suivantes sont importantes. Veuillez les lire avant de continuer. +InfoAfterClickLabel=Lorsque vous êtes prêt à continuer, appuyez sur Suivant. + +; *** "User Information" wizard page +WizardUserInfo=Informations sur l'Utilisateur +UserInfoDesc=Veuillez saisir les informations qui vous concernent. +UserInfoName=&Nom d'utilisateur : +UserInfoOrg=&Organisation : +UserInfoSerial=Numéro de &série : +UserInfoNameRequired=Vous devez au moins saisir un nom. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Dossier de destination +SelectDirDesc=Où [name] doit-il être installé ? +SelectDirLabel3=L'assistant va installer [name] dans le dossier suivant. +SelectDirBrowseLabel=Pour continuer, appuyez sur Suivant. Si vous souhaitez choisir un dossier différent, appuyez sur Parcourir. +DiskSpaceMBLabel=Le programme requiert au moins [mb] Mo d'espace disque disponible. +ToUNCPathname=L'assistant d'installation ne supporte pas les chemins réseau. Si vous souhaitez effectuer cette installation sur un réseau, vous devez d'abord connecter un lecteur réseau. +InvalidPath=Vous devez saisir un chemin complet avec sa lettre de lecteur ; par exemple :%n%nC:\APP%n%nou un chemin réseau de la forme :%n%n\\serveur\partage +InvalidDrive=L'unité ou l'emplacement réseau que vous avez sélectionné n'existe pas ou n'est pas accessible. Veuillez choisir une autre destination. +DiskSpaceWarningTitle=Espace disponible insuffisant +DiskSpaceWarning=L'assistant a besoin d'au moins %1 Ko d'espace disponible pour effectuer l'installation, mais l'unité que vous avez sélectionnée ne dispose que de %2 Ko d'espace disponible.%n%nSouhaitez-vous continuer malgré tout ? +DirNameTooLong=Le nom ou le chemin du dossier est trop long. +InvalidDirName=Le nom du dossier est invalide. +BadDirName32=Le nom du dossier ne doit contenir aucun des caractères suivants :%n%n%1 +DirExistsTitle=Dossier existant +DirExists=Le dossier :%n%n%1%n%nexiste déjà. Souhaitez-vous installer dans ce dossier malgré tout ? +DirDoesntExistTitle=Le dossier n'existe pas +DirDoesntExist=Le dossier %n%n%1%n%nn'existe pas. Souhaitez-vous que ce dossier soit créé ? + +; *** "Select Components" wizard page +WizardSelectComponents=Composants à installer +SelectComponentsDesc=Quels composants de l'application souhaitez-vous installer ? +SelectComponentsLabel2=Sélectionnez les composants que vous désirez installer ; décochez les composants que vous ne désirez pas installer. Appuyez ensuite sur Suivant pour continuer l'installation. +FullInstallation=Installation complète +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Installation compacte +CustomInstallation=Installation personnalisée +NoUninstallWarningTitle=Composants existants +NoUninstallWarning=L'assistant d'installation a détecté que les composants suivants sont déjà installés sur votre système :%n%n%1%n%nDésélectionner ces composants ne les désinstallera pas pour autant.%n%nVoulez-vous continuer malgré tout ? +ComponentSize1=%1 Ko +ComponentSize2=%1 Mo +ComponentsDiskSpaceMBLabel=Les composants sélectionnés nécessitent au moins [mb] Mo d'espace disponible. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Tâches supplémentaires +SelectTasksDesc=Quelles sont les tâches supplémentaires qui doivent être effectuées ? +SelectTasksLabel2=Sélectionnez les tâches supplémentaires que l'assistant d'installation doit effectuer pendant l'installation de [name], puis appuyez sur Suivant. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Sélection du dossier du menu Démarrer +SelectStartMenuFolderDesc=Où l'assistant d'installation doit-il placer les raccourcis du programme ? +SelectStartMenuFolderLabel3=L'assistant va créer les raccourcis du programme dans le dossier du menu Démarrer indiqué ci-dessous. +SelectStartMenuFolderBrowseLabel=Appuyez sur Suivant pour continuer. Appuyez sur Parcourir si vous souhaitez sélectionner un autre dossier du menu Démarrer. +MustEnterGroupName=Vous devez saisir un nom de dossier du menu Démarrer. +GroupNameTooLong=Le nom ou le chemin du dossier est trop long. +InvalidGroupName=Le nom du dossier n'est pas valide. +BadGroupName=Le nom du dossier ne doit contenir aucun des caractères suivants :%n%n%1 +NoProgramGroupCheck2=Ne pas créer de &dossier dans le menu Démarrer + +; *** "Ready to Install" wizard page +WizardReady=Prêt à installer +ReadyLabel1=L'assistant dispose à présent de toutes les informations pour installer [name] sur votre ordinateur. +ReadyLabel2a=Appuyez sur Installer pour procéder à l'installation ou sur Précédent pour revoir ou modifier une option d'installation. +ReadyLabel2b=Appuyez sur Installer pour procéder à l'installation. +ReadyMemoUserInfo=Informations sur l'utilisateur : +ReadyMemoDir=Dossier de destination : +ReadyMemoType=Type d'installation : +ReadyMemoComponents=Composants sélectionnés : +ReadyMemoGroup=Dossier du menu Démarrer : +ReadyMemoTasks=Tâches supplémentaires : + +; *** "Preparing to Install" wizard page +WizardPreparing=Préparation de l'installation +PreparingDesc=L'assistant d'installation prépare l'installation de [name] sur votre ordinateur. +PreviousInstallNotCompleted=L'installation ou la suppression d'un programme précédent n'est pas totalement achevée. Veuillez redémarrer votre ordinateur pour achever cette installation ou suppression.%n%nUne fois votre ordinateur redémarré, veuillez relancer cet assistant pour reprendre l'installation de [name]. +CannotContinue=L'assistant ne peut pas continuer. Veuillez appuyer sur Annuler pour abandonner l'installation. + +; *** "Installing" wizard page +WizardInstalling=Installation en cours +InstallingLabel=Veuillez patienter pendant que l'assistant installe [name] sur votre ordinateur. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Fin de l'installation de [name] +FinishedLabelNoIcons=L'assistant a terminé l'installation de [name] sur votre ordinateur. +FinishedLabel=L'assistant a terminé l'installation de [name] sur votre ordinateur. L'application peut être lancée à l'aide des icônes créées sur le Bureau par l'installation. +ClickFinish=Veuillez appuyer sur Terminer pour quitter l'assistant d'installation. +FinishedRestartLabel=L'assistant doit redémarrer votre ordinateur pour terminer l'installation de [name].%n%nVoulez-vous redémarrer maintenant ? +FinishedRestartMessage=L'assistant doit redémarrer votre ordinateur pour terminer l'installation de [name].%n%nVoulez-vous redémarrer maintenant ? +ShowReadmeCheck=Oui, je souhaite lire le fichier LISEZMOI +YesRadio=&Oui, redémarrer mon ordinateur maintenant +NoRadio=&Non, je préfère redémarrer mon ordinateur plus tard +; used for example as 'Run MyProg.exe' +RunEntryExec=Exécuter %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Voir %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=L'assistant a besoin du disque suivant +SelectDiskLabel2=Veuillez insérer le disque %1 et appuyer sur OK.%n%nSi les fichiers de ce disque se trouvent à un emplacement différent de celui indiqué ci-dessous, veuillez saisir le chemin correspondant ou appuyez sur Parcourir. +PathLabel=&Chemin : +FileNotInDir2=Le fichier "%1" ne peut pas être trouvé dans "%2". Veuillez insérer le bon disque ou sélectionner un autre dossier. +SelectDirectoryLabel=Veuillez indiquer l'emplacement du disque suivant. + +; *** Installation phase messages +SetupAborted=L'installation n'est pas terminée.%n%nVeuillez corriger le problème et relancer l'installation. +EntryAbortRetryIgnore=Appuyez sur Réessayer pour essayer à nouveau, Ignorer pour continuer malgré tout, ou Abandonner pour annuler l'installation. + +; *** Installation status messages +StatusCreateDirs=Création des dossiers... +StatusExtractFiles=Extraction des fichiers... +StatusCreateIcons=Création des raccourcis... +StatusCreateIniEntries=Création des entrées du fichier INI... +StatusCreateRegistryEntries=Création des entrées de registre... +StatusRegisterFiles=Enregistrement des fichiers... +StatusSavingUninstall=Sauvegarde des informations de désinstallation... +StatusRunProgram=Finalisation de l'installation... +StatusRollback=Annulation des modifications... + +; *** Misc. errors +ErrorInternal2=Erreur interne : %1 +ErrorFunctionFailedNoCode=%1 a échoué +ErrorFunctionFailed=%1 a échoué ; code %2 +ErrorFunctionFailedWithMessage=%1 a échoué ; code %2.%n%3 +ErrorExecutingProgram=Impossible d'exécuter le fichier :%n%1 + +; *** Registry errors +ErrorRegOpenKey=Erreur lors de l'ouverture de la clé de registre :%n%1\%2 +ErrorRegCreateKey=Erreur lors de la création de la clé de registre :%n%1\%2 +ErrorRegWriteKey=Erreur lors de l'écriture de la clé de registre :%n%1\%2 + +; *** INI errors +ErrorIniEntry=Erreur d'écriture d'une entrée dans le fichier INI "%1". + +; *** File copying errors +FileAbortRetryIgnore=Appuyez sur Réessayer pour essayer à nouveau, Ignorer pour passer ce fichier (déconseillé), ou Abandonner pour annuler l'installation. +FileAbortRetryIgnore2=Appuyez sur Réessayer pour essayer à nouveau, Ignorer pour continuer malgré tout (déconseillé), ou Abandonner pour annuler l'installation. +SourceIsCorrupted=Le fichier source est altéré +SourceDoesntExist=Le fichier source "%1" n'existe pas +ExistingFileReadOnly=Le fichier existant est protégé en lecture seule.%n%nAppuyez sur Réessayer pour enlever la protection et essayer à nouveau, Ignorer pour passer ce fichier, ou Abandonner pour annuler l'installation. +ErrorReadingExistingDest=Une erreur s'est produite lors de la tentative de lecture du fichier existant : +FileExists=Le fichier existe déjà.%n%nSouhaitez-vous que l'installation le remplace ? +ExistingFileNewer=Le fichier existant est plus récent que celui que l'assistant essaie d'installer. Il est recommandé de conserver le fichier existant.%n%nSouhaitez-vous conserver le fichier existant ? +ErrorChangingAttr=Une erreur est survenue en essayant de modifier les attributs du fichier existant : +ErrorCreatingTemp=Une erreur est survenue en essayant de créer un fichier dans le dossier de destination : +ErrorReadingSource=Une erreur est survenue lors de la lecture du fichier source : +ErrorCopying=Une erreur est survenue lors de la copie d'un fichier : +ErrorReplacingExistingFile=Une erreur est survenue lors du remplacement d'un fichier existant : +ErrorRestartReplace=Le marquage d'un fichier pour remplacement au redémarrage de l'ordinateur a échoué : +ErrorRenamingTemp=Une erreur est survenue en essayant de renommer un fichier dans le dossier de destination : +ErrorRegisterServer=Impossible d'enregistrer la bibliothèque DLL/OCX : %1 +ErrorRegSvr32Failed=RegSvr32 a échoué et a retourné le code d'erreur %1 +ErrorRegisterTypeLib=Impossible d'enregistrer la bibliothèque de type : %1 + +; *** Post-installation errors +ErrorOpeningReadme=Une erreur est survenue à l'ouverture du fichier LISEZMOI. +ErrorRestartingComputer=L'installation n'a pas pu redémarrer l'ordinateur. Merci de bien vouloir le faire vous-même. + +; *** Uninstaller messages +UninstallNotFound=Le fichier "%1" n'existe pas. Impossible de désinstaller. +UninstallOpenError=Le fichier "%1" n'a pas pu être ouvert. Impossible de désinstaller +UninstallUnsupportedVer=Le format du fichier journal de désinstallation "%1" n'est pas reconnu par cette version de la procédure de désinstallation. Impossible de désinstaller +UninstallUnknownEntry=Une entrée inconnue (%1) a été rencontrée dans le fichier journal de désinstallation +ConfirmUninstall=Voulez-vous vraiment désinstaller complètement %1 ainsi que tous ses composants ? +UninstallOnlyOnWin64=La désinstallation de ce programme ne fonctionne qu'avec une version 64 bits de Windows. +OnlyAdminCanUninstall=Ce programme ne peut être désinstallé que par un utilisateur disposant des droits d'administration. +UninstallStatusLabel=Veuillez patienter pendant que %1 est retiré de votre ordinateur. +UninstalledAll=%1 a été correctement désinstallé de cet ordinateur. +UninstalledMost=La désinstallation de %1 est terminée.%n%nCertains éléments n'ont pas pu être supprimés automatiquement. Vous pouvez les supprimer manuellement. +UninstalledAndNeedsRestart=Vous devez redémarrer l'ordinateur pour terminer la désinstallation de %1.%n%nVoulez-vous redémarrer maintenant ? +UninstallDataCorrupted=Le ficher "%1" est altéré. Impossible de désinstaller + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Supprimer les fichiers partagés ? +ConfirmDeleteSharedFile2=Le système indique que le fichier partagé suivant n'est plus utilisé par aucun programme. Souhaitez-vous que la désinstallation supprime ce fichier partagé ?%n%nSi des programmes utilisent encore ce fichier et qu'il est supprimé, ces programmes ne pourront plus fonctionner correctement. Si vous n'êtes pas sûr, choisissez Non. Laisser ce fichier dans votre système ne posera pas de problème. +SharedFileNameLabel=Nom du fichier : +SharedFileLocationLabel=Emplacement : +WizardUninstalling=État de la désinstallation +StatusUninstalling=Désinstallation de %1... + +; Les messages personnalisés suivants ne sont pas utilisé par l'installation +; elle-même, mais si vous les utilisez dans vos scripts, vous devez les +; traduire + +[CustomMessages] + +NameAndVersion=%1 version %2 +AdditionalIcons=Icônes supplémentaires : +CreateDesktopIcon=Créer une icône sur le &Bureau +CreateQuickLaunchIcon=Créer une icône dans la barre de &Lancement rapide +ProgramOnTheWeb=Page d'accueil de %1 +UninstallProgram=Désinstaller %1 +LaunchProgram=Exécuter %1 +AssocFileExtension=&Associer %1 avec l'extension de fichier %2 +AssocingFileExtension=Associe %1 avec l'extension de fichier %2... diff --git a/Files/Languages/German.isl b/Files/Languages/German.isl new file mode 100644 index 000000000..64c956358 --- /dev/null +++ b/Files/Languages/German.isl @@ -0,0 +1,306 @@ +; ****************************************************** +; *** *** +; *** Inno Setup version 5.1.11+ German messages *** +; *** *** +; *** Original Author: *** +; *** *** +; *** Michael Reitz (innosetup@assimilate.de) *** +; *** *** +; *** Contributors: *** +; *** *** +; *** Roland Ruder (info@rr4u.de) *** +; *** LaughingMan (puma.d@web.de) *** +; *** *** +; ****************************************************** +; +; Diese Übersetzung hält sich an die neue deutsche Rechtschreibung. + +[LangOptions] +LanguageName=Deutsch +LanguageID=$0407 +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Setup +SetupWindowTitle=Setup - %1 +UninstallAppTitle=Entfernen +UninstallAppFullTitle=%1 entfernen + +; *** Misc. common +InformationTitle=Information +ConfirmTitle=Bestätigen +ErrorTitle=Fehler + +; *** SetupLdr messages +SetupLdrStartupMessage=%1 wird jetzt installiert. Möchten Sie fortfahren? +LdrCannotCreateTemp=Es konnte keine temporäre Datei erstellt werden. Das Setup wurde abgebrochen +LdrCannotExecTemp=Die Datei konnte nicht im temporären Ordner ausgeführt werden. Das Setup wurde abgebrochen + +; *** Startup error messages +LastErrorMessage=%1.%n%nFehler %2: %3 +SetupFileMissing=Die Datei %1 fehlt im Installations-Ordner. Bitte beheben Sie das Problem, oder besorgen Sie sich eine neue Kopie des Programms. +SetupFileCorrupt=Die Setup-Dateien sind beschädigt. Besorgen Sie sich bitte eine neue Kopie des Programms. +SetupFileCorruptOrWrongVer=Die Setup-Dateien sind beschädigt oder inkompatibel zu dieser Version des Setups. Bitte beheben Sie das Problem, oder besorgen Sie sich eine neue Kopie des Programms. +NotOnThisPlatform=Dieses Programm kann nicht unter %1 ausgeführt werden. +OnlyOnThisPlatform=Dieses Programm muss unter %1 ausgeführt werden. +OnlyOnTheseArchitectures=Dieses Programm kann nur auf Windows-Versionen installiert werden, die folgende Prozessor-Architekturen unterstützen:%n%n%1 +MissingWOW64APIs=Ihre Windows-Version enthält nicht die Funktionen, die vom Setup für eine 64-bit Installation benötigt werden. Installieren Sie bitte Service Pack %1, um dieses Problem zu beheben. +WinVersionTooLowError=Dieses Programm benötigt %1 Version %2 oder höher. +WinVersionTooHighError=Dieses Programm kann nicht unter %1 Version %2 oder höher installiert werden. +AdminPrivilegesRequired=Sie müssen als Administrator angemeldet sein, um dieses Programm installieren zu können. +PowerUserPrivilegesRequired=Sie müssen als Administrator oder als Mitglied der Hauptbenutzer-Gruppe angemeldet sein, um dieses Programm installieren zu können. +SetupAppRunningError=Das Setup hat entdeckt, dass %1 zur Zeit ausgeführt wird.%n%nBitte schließen Sie jetzt alle laufenden Instanzen, und klicken Sie auf "OK", um fortzufahren, oder auf "Abbrechen", um zu beenden. +UninstallAppRunningError=Die Deinstallation hat entdeckt, dass %1 zur Zeit ausgeführt wird.%n%nBitte schließen Sie jetzt alle laufenden Instanzen, und klicken Sie auf "OK", um fortzufahren, oder auf "Abbrechen", um zu beenden. + +; *** Misc. errors +ErrorCreatingDir=Das Setup konnte den Ordner "%1" nicht erstellen +ErrorTooManyFilesInDir=Das Setup konnte eine Datei im Ordner "%1" nicht erstellen, weil er zu viele Dateien enthält + +; *** Setup common messages +ExitSetupTitle=Setup verlassen +ExitSetupMessage=Das Setup ist noch nicht abgeschlossen. Wenn Sie jetzt beenden, wird das Programm nicht installiert.%n%nSie können das Setup zu einem späteren Zeitpunkt nochmals ausführen, um die Installation zu vervollständigen.%n%nSetup verlassen? +AboutSetupMenuItem=&Über das Setup ... +AboutSetupTitle=Über das Setup +AboutSetupMessage=%1 Version %2%n%3%n%n%1 Internet-Seite:%n%4 +AboutSetupNote= +TranslatorNote=German translation maintained by Michael Reitz (innosetup@assimilate.de) + +; *** Buttons +ButtonBack=< &Zurück +ButtonNext=&Weiter > +ButtonInstall=&Installieren +ButtonOK=OK +ButtonCancel=Abbrechen +ButtonYes=&Ja +ButtonYesToAll=J&a für Alle +ButtonNo=&Nein +ButtonNoToAll=N&ein für Alle +ButtonFinish=&Fertigstellen +ButtonBrowse=&Durchsuchen ... +ButtonWizardBrowse=Du&rchsuchen ... +ButtonNewFolder=&Neuen Ordner erstellen + +; *** "Select Language" dialog messages +SelectLanguageTitle=Setup-Sprache auswählen +SelectLanguageLabel=Wählen Sie die Sprache aus, die während der Installation benutzt werden soll: + +; *** Common wizard text +ClickNext="Weiter" zum Fortfahren, "Abbrechen" zum Verlassen. +BeveledLabel= +BrowseDialogTitle=Ordner suchen +BrowseDialogLabel=Wählen Sie einen Ordner aus, und klicken Sie danach auf "OK". +NewFolderName=Neuer Ordner + +; *** "Welcome" wizard page +WelcomeLabel1=Willkommen zum [name] Setup-Assistenten +WelcomeLabel2=Dieser Assistent wird jetzt [name/ver] auf Ihrem Computer installieren.%n%nSie sollten alle anderen Anwendungen beenden, bevor Sie mit dem Setup fortfahren. + +; *** "Password" wizard page +WizardPassword=Passwort +PasswordLabel1=Diese Installation wird durch ein Passwort geschützt. +PasswordLabel3=Bitte geben Sie das Passwort ein, und klicken Sie danach auf "Weiter". Achten Sie auf korrekte Groß-/Kleinschreibung. +PasswordEditLabel=&Passwort: +IncorrectPassword=Das eingegebene Passwort ist nicht korrekt. Bitte versuchen Sie es noch einmal. + +; *** "License Agreement" wizard page +WizardLicense=Lizenzvereinbarung +LicenseLabel=Lesen Sie bitte folgende, wichtige Informationen bevor Sie fortfahren. +LicenseLabel3=Lesen Sie bitte die folgenden Lizenzvereinbarungen. Benutzen Sie bei Bedarf die Bildlaufleiste oder drücken Sie die "Bild Ab"-Taste. +LicenseAccepted=Ich &akzeptiere die Vereinbarung +LicenseNotAccepted=Ich &lehne die Vereinbarung ab + +; *** "Information" wizard pages +WizardInfoBefore=Information +InfoBeforeLabel=Lesen Sie bitte folgende, wichtige Informationen bevor Sie fortfahren. +InfoBeforeClickLabel=Klicken Sie auf "Weiter", sobald Sie bereit sind mit dem Setup fortzufahren. +WizardInfoAfter=Information +InfoAfterLabel=Lesen Sie bitte folgende, wichtige Informationen bevor Sie fortfahren. +InfoAfterClickLabel=Klicken Sie auf "Weiter", sobald Sie bereit sind mit dem Setup fortzufahren. + +; *** "User Information" wizard page +WizardUserInfo=Benutzerinformationen +UserInfoDesc=Bitte tragen Sie Ihre Daten ein. +UserInfoName=&Name: +UserInfoOrg=&Organisation: +UserInfoSerial=&Seriennummer: +UserInfoNameRequired=Sie müssen einen Namen eintragen. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Ziel-Ordner wählen +SelectDirDesc=Wohin soll [name] installiert werden? +SelectDirLabel3=Das Setup wird [name] in den folgenden Ordner installieren. +SelectDirBrowseLabel=Klicken Sie auf "Weiter", um fortzufahren. Klicken Sie auf "Durchsuchen", falls Sie einen anderen Ordner auswählen möchten. +DiskSpaceMBLabel=Mindestens [mb] MB freier Speicherplatz ist erforderlich. +ToUNCPathname=Das Setup kann nicht in einen UNC-Pfad installieren. Wenn Sie auf ein Netzlaufwerk installieren möchten, müssen Sie dem Netzwerkpfad einen Laufwerksbuchstaben zuordnen. +InvalidPath=Sie müssen einen vollständigen Pfad mit einem Laufwerksbuchstaben angeben; z.B.:%n%nC:\Beispiel%n%noder einen UNC-Pfad in der Form:%n%n\\Server\Freigabe +InvalidDrive=Das angegebene Laufwerk bzw. der UNC-Pfad existiert nicht oder es kann nicht darauf zugegriffen werden. Wählen Sie bitte einen anderen Ordner. +DiskSpaceWarningTitle=Nicht genug freier Speicherplatz +DiskSpaceWarning=Das Setup benötigt mindestens %1 KB freien Speicherplatz zum Installieren, aber auf dem ausgewählten Laufwerk sind nur %2 KB verfügbar.%n%nMöchten Sie trotzdem fortfahren? +DirNameTooLong=Der Ordnername/Pfad ist zu lang. +InvalidDirName=Der Ordnername ist nicht gültig. +BadDirName32=Ordnernamen dürfen keine der folgenden Zeichen enthalten:%n%n%1 +DirExistsTitle=Ordner existiert bereits +DirExists=Der Ordner:%n%n%1%n%n existiert bereits. Möchten Sie trotzdem in diesen Ordner installieren? +DirDoesntExistTitle=Ordner ist nicht vorhanden +DirDoesntExist=Der Ordner:%n%n%1%n%nist nicht vorhanden. Soll der Ordner erstellt werden? + +; *** "Select Components" wizard page +WizardSelectComponents=Komponenten auswählen +SelectComponentsDesc=Welche Komponenten sollen installiert werden? +SelectComponentsLabel2=Wählen Sie die Komponenten aus, die Sie installieren möchten. Klicken Sie auf "Weiter", wenn sie bereit sind fortzufahren. +FullInstallation=Vollständige Installation +CompactInstallation=Kompakte Installation +CustomInstallation=Benutzerdefinierte Installation +NoUninstallWarningTitle=Komponenten vorhanden +NoUninstallWarning=Das Setup hat festgestellt, dass die folgenden Komponenten bereits auf Ihrem Computer installiert sind:%n%n%1%n%nDiese nicht mehr ausgewählten Komponenten werden nicht vom Computer entfernt.%n%nMöchten Sie trotzdem fortfahren? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Die aktuelle Auswahl erfordert min. [mb] MB Speicherplatz. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Zusätzliche Aufgaben auswählen +SelectTasksDesc=Welche zusätzlichen Aufgaben sollen ausgeführt werden? +SelectTasksLabel2=Wählen Sie die zusätzlichen Aufgaben aus, die das Setup während der Installation von [name] ausführen soll, und klicken Sie danach auf "Weiter". + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Startmenü-Ordner auswählen +SelectStartMenuFolderDesc=Wo soll das Setup die Programm-Verknüpfungen erstellen? +SelectStartMenuFolderLabel3=Das Setup wird die Programm-Verknüpfungen im folgenden Startmenü-Ordner erstellen. +SelectStartMenuFolderBrowseLabel=Klicken Sie auf "Weiter", um fortzufahren. Klicken Sie auf "Durchsuchen", falls Sie einen anderen Ordner auswählen möchten. +MustEnterGroupName=Sie müssen einen Ordnernamen eingeben. +GroupNameTooLong=Der Ordnername/Pfad ist zu lang. +InvalidGroupName=Der Ordnername ist nicht gültig. +BadGroupName=Der Ordnername darf keine der folgenden Zeichen enthalten:%n%n%1 +NoProgramGroupCheck2=&Keinen Ordner im Startmenü erstellen + +; *** "Ready to Install" wizard page +WizardReady=Installation durchführen +ReadyLabel1=Das Setup ist jetzt bereit, [name] auf Ihrem Computer zu installieren. +ReadyLabel2a=Klicken Sie auf "Installieren", um mit der Installation zu beginnen, oder auf "Zurück", um Ihre Einstellungen zu überprüfen oder zu ändern. +ReadyLabel2b=Klicken Sie auf "Installieren", um mit der Installation zu beginnen. +ReadyMemoUserInfo=Benutzerinformationen: +ReadyMemoDir=Ziel-Ordner: +ReadyMemoType=Setup-Typ: +ReadyMemoComponents=Ausgewählte Komponenten: +ReadyMemoGroup=Startmenü-Ordner: +ReadyMemoTasks=Zusätzliche Aufgaben: + +; *** "Preparing to Install" wizard page +WizardPreparing=Vorbereitung der Installation +PreparingDesc=Das Setup bereitet die Installation von [name] auf diesen Computer vor. +PreviousInstallNotCompleted=Eine vorherige Installation/Deinstallation eines Programms wurde nicht abgeschlossen. Der Computer muss neu gestartet werden, um die Installation/Deinstallation zu beenden.%n%nStarten Sie das Setup nach dem Neustart Ihres Computers erneut, um die Installation von [name] durchzuführen. +CannotContinue=Das Setup kann nicht fortfahren. Bitte klicken Sie auf "Abbrechen" zum Verlassen. + +; *** "Installing" wizard page +WizardInstalling=Installiere ... +InstallingLabel=Warten Sie bitte während [name] auf Ihrem Computer installiert wird. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Beenden des [name] Setup-Assistenten +FinishedLabelNoIcons=Das Setup hat die Installation von [name] auf Ihrem Computer abgeschlossen. +FinishedLabel=Das Setup hat die Installation von [name] auf Ihrem Computer abgeschlossen. Die Anwendung kann über die installierten Programm-Verknüpfungen gestartet werden. +ClickFinish=Klicken Sie auf "Fertigstellen", um das Setup zu beenden. +FinishedRestartLabel=Um die Installation von [name] abzuschließen, muss das Setup Ihren Computer neu starten. Möchten Sie jetzt neu starten? +FinishedRestartMessage=Um die Installation von [name] abzuschließen, muss das Setup Ihren Computer neu starten.%n%nMöchten Sie jetzt neu starten? +ShowReadmeCheck=Ja, ich möchte die LIESMICH-Datei sehen +YesRadio=&Ja, Computer jetzt neu starten +NoRadio=&Nein, ich werde den Computer später neu starten +RunEntryExec=%1 starten +RunEntryShellExec=%1 anzeigen + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Nächste Diskette einlegen +SelectDiskLabel2=Legen Sie bitte Diskette %1 ein, und klicken Sie auf "OK".%n%nWenn sich die Dateien von dieser Diskette in einem anderen als dem angezeigten Ordner befinden, dann geben Sie bitte den korrekten Pfad ein oder klicken auf "Durchsuchen". +PathLabel=&Pfad: +FileNotInDir2=Die Datei "%1" befindet sich nicht in "%2". Bitte Ordner ändern oder richtige Diskette einlegen. +SelectDirectoryLabel=Geben Sie bitte an, wo die nächste Diskette eingelegt wird. + +; *** Installation phase messages +SetupAborted=Das Setup konnte nicht abgeschlossen werden.%n%nBeheben Sie bitte das Problem, und starten Sie das Setup erneut. +EntryAbortRetryIgnore=Klicken Sie auf "Wiederholen" für einen weiteren Versuch, "Ignorieren", um trotzdem fortzufahren, oder "Abbrechen", um die Installation abzubrechen. + +; *** Installation status messages +StatusCreateDirs=Ordner werden erstellt ... +StatusExtractFiles=Dateien werden entpackt ... +StatusCreateIcons=Verknüpfungen werden erstellt ... +StatusCreateIniEntries=INI-Einträge werden erstellt ... +StatusCreateRegistryEntries=Registry-Einträge werden erstellt ... +StatusRegisterFiles=Dateien werden registriert ... +StatusSavingUninstall=Deinstallations-Informationen werden gespeichert ... +StatusRunProgram=Installation wird beendet ... +StatusRollback=Änderungen werden rückgängig gemacht ... + +; *** Misc. errors +ErrorInternal2=Interner Fehler: %1 +ErrorFunctionFailedNoCode=%1 schlug fehl +ErrorFunctionFailed=%1 schlug fehl; Code %2 +ErrorFunctionFailedWithMessage=%1 schlug fehl; Code %2.%n%3 +ErrorExecutingProgram=Datei kann nicht ausgeführt werden:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Registry-Schlüssel konnte nicht geöffnet werden:%n%1\%2 +ErrorRegCreateKey=Registry-Schlüssel konnte nicht erstellt werden:%n%1\%2 +ErrorRegWriteKey=Fehler beim Schreiben des Registry-Schlüssels:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Fehler beim Erstellen eines INI-Eintrages in der Datei "%1". + +; *** File copying errors +FileAbortRetryIgnore=Klicken Sie auf "Wiederholen" für einen weiteren Versuch, "Ignorieren", um diese Datei zu überspringen (nicht empfohlen), oder "Abbrechen", um die Installation abzubrechen. +FileAbortRetryIgnore2=Klicken Sie auf "Wiederholen" für einen weiteren Versuch, "Ignorieren", um trotzdem fortzufahren (nicht empfohlen), oder "Abbrechen", um die Installation abzubrechen. +SourceIsCorrupted=Die Quelldatei ist beschädigt +SourceDoesntExist=Die Quelldatei "%1" existiert nicht +ExistingFileReadOnly=Die vorhandene Datei ist schreibgeschützt.%n%nKlicken Sie auf "Wiederholen", um den Schreibschutz zu entfernen, "Ignorieren", um die Datei zu überspringen, oder "Abbrechen", um die Installation abzubrechen. +ErrorReadingExistingDest=Lesefehler in Datei: +FileExists=Die Datei ist bereits vorhanden.%n%nSoll sie überschrieben werden? +ExistingFileNewer=Die vorhandene Datei ist neuer als die Datei, die installiert werden soll. Es wird empfohlen die vorhandene Datei beizubehalten.%n%n Möchten Sie die vorhandene Datei beibehalten? +ErrorChangingAttr=Fehler beim Ändern der Datei-Attribute: +ErrorCreatingTemp=Fehler beim Erstellen einer Datei im Ziel-Ordner: +ErrorReadingSource=Fehler beim Lesen der Quelldatei: +ErrorCopying=Fehler beim Kopieren einer Datei: +ErrorReplacingExistingFile=Fehler beim Ersetzen einer vorhandenen Datei: +ErrorRestartReplace="Ersetzen nach Neustart" fehlgeschlagen: +ErrorRenamingTemp=Fehler beim Umbenennen einer Datei im Ziel-Ordner: +ErrorRegisterServer=DLL/OCX konnte nicht registriert werden: %1 +ErrorRegSvr32Failed=RegSvr32-Aufruf scheiterte mit Exit-Code %1 +ErrorRegisterTypeLib=Typen-Bibliothek konnte nicht registriert werden: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Fehler beim Öffnen der LIESMICH-Datei. +ErrorRestartingComputer=Das Setup konnte den Computer nicht neu starten. Bitte führen Sie den Neustart manuell durch. + +; *** Uninstaller messages +UninstallNotFound=Die Datei "%1" existiert nicht. Entfernen der Anwendung fehlgeschlagen. +UninstallOpenError=Die Datei "%1" konnte nicht geöffnet werden. Entfernen der Anwendung fehlgeschlagen. +UninstallUnsupportedVer=Das Format der Deinstallations-Datei "%1" konnte nicht erkannt werden. Entfernen der Anwendung fehlgeschlagen +UninstallUnknownEntry=In der Deinstallations-Datei wurde ein unbekannter Eintrag (%1) gefunden +ConfirmUninstall=Sind Sie sicher, dass Sie %1 und alle zugehörigen Komponenten entfernen möchten? +UninstallOnlyOnWin64=Diese Installation kann nur unter 64-bit Windows-Versionen entfernt werden. +OnlyAdminCanUninstall=Diese Installation kann nur von einem Benutzer mit Administrator-Rechten entfernt werden. +UninstallStatusLabel=Warten Sie bitte während %1 von Ihrem Computer entfernt wird. +UninstalledAll=%1 wurde erfolgreich von Ihrem Computer entfernt. +UninstalledMost=Entfernen von %1 beendet.%n%nEinige Komponenten konnten nicht entfernt werden. Diese können von Ihnen manuell gelöscht werden. +UninstalledAndNeedsRestart=Um die Deinstallation von %1 abzuschließen, muss Ihr Computer neu gestartet werden.%n%nMöchten Sie jetzt neu starten? +UninstallDataCorrupted="%1"-Datei ist beschädigt. Entfernen der Anwendung fehlgeschlagen. + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Gemeinsame Datei entfernen? +ConfirmDeleteSharedFile2=Das System zeigt an, dass die folgende gemeinsame Datei von keinem anderen Programm mehr benutzt wird. Möchten Sie diese Datei entfernen lassen?%nSollte es doch noch Programme geben, die diese Datei benutzen, und sie wird entfernt, funktionieren diese Programme vielleicht nicht mehr richtig. Wenn Sie unsicher sind, wählen Sie "Nein" um die Datei im System zu belassen. Es schadet Ihrem System nicht, wenn Sie die Datei behalten. +SharedFileNameLabel=Dateiname: +SharedFileLocationLabel=Ordner: +WizardUninstalling=Entfernen (Status) +StatusUninstalling=Entferne %1 ... + +[CustomMessages] + +NameAndVersion=%1 Version %2 +AdditionalIcons=Zusätzliche Symbole: +CreateDesktopIcon=&Desktop-Symbol erstellen +CreateQuickLaunchIcon=Symbol in der Schnellstartleiste erstellen +ProgramOnTheWeb=%1 im Internet +UninstallProgram=%1 entfernen +LaunchProgram=%1 starten +AssocFileExtension=&Registriere %1 mit der %2-Dateierweiterung +AssocingFileExtension=%1 wird mit der %2-Dateierweiterung registriert... diff --git a/Files/Languages/Hebrew.isl b/Files/Languages/Hebrew.isl new file mode 100644 index 000000000..b2528bb19 --- /dev/null +++ b/Files/Languages/Hebrew.isl @@ -0,0 +1,314 @@ +; *** Inno Setup version 5.1.11+ Hebrew messages (stilgar(at)divrei-tora.com) *** +; +; +; Translated by Stilgar (stilgar(at)divrei-tora.com) (c) 2005 +; ( AntiSpam: replace (at) with @ ) +; + + +[LangOptions] +LanguageName=<05E2><05D1><05E8><05D9><05EA> +LanguageID=$040D +LanguageCodePage=1255 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +WelcomeFontName=Tahoma +WelcomeFontSize=11 +;TitleFontName=Arial +;TitleFontSize=29 +;CopyrightFontName=Arial +;CopyrightFontSize=8 +RightToLeft=yes + +[Messages] + +; *** Application titles +SetupAppTitle=äú÷ðä +SetupWindowTitle=äú÷ðä - %1 +UninstallAppTitle=äñøä +UninstallAppFullTitle=äñøú %1 + +; *** Misc. common +InformationTitle=îéãò +ConfirmTitle=àéùåø +ErrorTitle=ùâéàä + +; *** SetupLdr messages +SetupLdrStartupMessage=úåëðä æå úú÷éï àú %1 òì îçùáê. äàí áøöåðê ìäîùéê? +LdrCannotCreateTemp=ùâéàä áòú éöéøú ÷åáõ æîðé. ääú÷ðä úéñâø +LdrCannotExecTemp=ìà ðéúï ìäøéõ ÷åáõ áúé÷éä äæîðéú. ìà ðéúï ìäîùéê áäú÷ðä + +; *** Startup error messages +LastErrorMessage=%1.%n%nùâéàä %2: %3 +SetupFileMissing=ìà ðéúï ìàúø àú ä÷åáõ %1 áúé÷ééú ääú÷ðä. àðà ú÷ï àú äáòéä àå ðñä ùåá òí òåú÷ çãù ùì äúåëðä. +SetupFileCorrupt=÷áöé ääú÷ðä ÷èåòéí. àðà ðñä ìäú÷éï òí òåú÷ çãù ùì äúåëðä. +SetupFileCorruptOrWrongVer=÷áöé ääú÷ðä ÷èåòéí, àå ùàéðí úåàîéí ìâéøñä æå ùì úåëðú ääú÷ðä. àðà ú÷ï àú äáòéä àå äú÷ï àú äúåëðä îäú÷ðä çãùä. +NotOnThisPlatform=úåëðä æå ìà úôòì òì %1. +OnlyOnThisPlatform=úåëðä æå çééáú ìôòåì òì %1. +OnlyOnTheseArchitectures=ðéúï ìäú÷éï úåëðä æå ø÷ òì âéøñàåú ùì 'çìåðåú' ùúåëððåú ìàøëéè÷èåøåú îòáã àìå:%n%n%1 +MissingWOW64APIs=äâéøñä ùì 'çìåðåú' òìéä àúä òåáã ìà îëéìä àú äôåð÷öéåðìéåú äãøåùä ìäú÷ðú 64-áéè. ëãé ìú÷ï ùâéàä æå, àðà äú÷ï òøëú ùéøåú %1. +WinVersionTooLowError=úåëðä æå îöøéëä %1 ìôçåú áâøñä %2. +WinVersionTooHighError=ìà ðéúï ìäú÷éï úåëðä æå òì %1 áâéøñä %2 àå îàåçøú éåúø +AdminPrivilegesRequired=àúä çééá ìäúçáø ëîðäì äîçùá ëãé ìäú÷éï úåëðä æå. +PowerUserPrivilegesRequired=òìéê ìäúçáø ëîðäì äîçùá, àå ëçáø ùì ÷áåöú 'îùúîùé òì' ëãé ìäú÷éï úåëðä æå. +SetupAppRunningError=úåëðú ääú÷ðä àéáçðä ëé %1 ëøâò ôåòìú áø÷ò.%n%nàðà ñâåø àú ëì äçìåðåú ùìä, åìçõ òì 'àéùåø' ìäîùê, àå 'áéèåì' ìéöéàä. +UninstallAppRunningError=úåëðú ääñøä àéáçðä ëé %1 ëøâò ôåòìú áø÷ò.%n%nàðà ñâåø àú ëì äçìåðåú ùìä, åìçõ òì 'àéùåø' ìäîùê, àå 'áéèåì' ìéöéàä. + +; *** Misc. errors +ErrorCreatingDir=úåëðú ääú÷ðä ìà äöìéçä ìéöåø àú äúé÷éä "%1" +ErrorTooManyFilesInDir=ìà ðéúï ìéöåø ÷åáõ áúé÷éä "%1" áâìì ùäéà îëéìä éåúø îãé ÷áöéí + +; *** Setup common messages +ExitSetupTitle=éöéàä îääú÷ðä +ExitSetupMessage=ääú÷ðä òåã ìà äñúééîä. àí úöà îîðä òëùéå, äúåëðä ìà úåú÷ï òì îçùáê.%n%náàôùøåúê ìäôòéì àú úåëðú ääú÷ðä áæîï àçø ëãé ìñééí àú úäìéê ääú÷ðä.%n%näàí àúä áèåç ùáøöåðê ìöàú? +AboutSetupMenuItem=&àåãåú ääú÷ðä... +AboutSetupTitle=àåãåú ääú÷ðä +AboutSetupMessage=%1 âéøñä %2%n%3%n%n%1 ãó äáéú:%n%4 +AboutSetupNote= +TranslatorNote=ñèéìâàø + +; *** Buttons +ButtonBack=< &ä÷åãí +ButtonNext=&äáà > +ButtonInstall=&äú÷ï +ButtonOK=àéùåø +ButtonCancel=áéèåì +ButtonYes=&ëï +ButtonYesToAll=ëï ì&äëì +ButtonNo=&ìà +ButtonNoToAll=ì&à ìäëì +ButtonFinish=&ñééí +ButtonBrowse=&òéåï... +ButtonWizardBrowse=òéåï... +ButtonNewFolder=&öåø úé÷éä çãùä + +; *** "Select Language" dialog messages +SelectLanguageTitle=áçø ùôú äú÷ðä +SelectLanguageLabel=áçø àú ùôú ääú÷ðä ùì úåëðú ääú÷ðä: + +; *** Common wizard text +ClickNext=ìçõ òì 'äáà' ëãé ìäîùéê áúäìéê ääú÷ðä, àå 'áéèåì' ìéöéàä. +BeveledLabel= +BrowseDialogTitle=áçø úé÷éä +BrowseDialogLabel=áçø úé÷éä îäøùéîä åìçõ òì 'àéùåø' +NewFolderName=úé÷éä çãùä + +; *** "Welcome" wizard page +WelcomeLabel1=áøåëéí äáàéí ìúåëðú ääú÷ðä ùì [name] +WelcomeLabel2=àùó æä éãøéê àåúê áîäìê úäìéê äú÷ðú [name/ver] òì îçùáê.%n%nîåîìõ ùúñâåø àú ëì äééùåîéí äôòéìéí áîçùáê ìôðé ääú÷ðä. + +; *** "Password" wizard page +WizardPassword=ñéñîä +PasswordLabel1=ääú÷ðä îåâðú áñéñîä. +PasswordLabel3=àðà äæï àú äñéñîä, åìçõ òì 'äáà' ëãé ìäîùéê. áàåúéåú ìåòæéåú, éùðå äáãì áéï àåúéåú ÷èðåú ìâãåìåú. +PasswordEditLabel=&ñéñîä: +IncorrectPassword=äñéñîä ùä÷ìãú ùâåéä. àðà ðñä ùåá. + +; *** "License Agreement" wizard page +WizardLicense=øùéåï ùéîåù +LicenseLabel=àðà ÷øà àú äîéãò äçùåá äáà ìôðé äîùê ääú÷ðä. +LicenseLabel3=àðà ÷øà àú øùéåï äùéîåù äáà. òìéê ì÷áì àú äúðàéí ùáäñëí æä ìôðé äîùê ääú÷ðä. +LicenseAccepted=àðé &î÷áì àú ääñëí +LicenseNotAccepted=àðé &ìà î÷áì àú ääñëí + +; *** "Information" wizard pages +WizardInfoBefore=îéãò +InfoBeforeLabel=àðà ÷øà àú äîéãò äçùåá äáà ìôðé äîùê ääú÷ðä. +InfoBeforeClickLabel=ëùúäéä îåëï ìäîùéê áäú÷ðä, ìçõ òì 'äáà'. +WizardInfoAfter=îéãò +InfoAfterLabel=àðà ÷øà àú äîéãò äçùåá äáà ìôðé äîùê ääú÷ðä +InfoAfterClickLabel=ëùúäéä îåëï ìäîùéê áäú÷ðä, ìçõ òì 'äáà'. + +; *** "User Information" wizard page +WizardUserInfo=ôøèé äîùúîù +UserInfoDesc=àðà äæï àú ðúåðéê. +UserInfoName=&ùí îùúîù: +UserInfoOrg=&àéøâåï: +UserInfoSerial=&îñôø ñéãåøé: +UserInfoNameRequired=òìéê ìäæéï ùí. + +; *** "Select Destination Location" wizard page +WizardSelectDir=áçø éòã ìäú÷ðä +SelectDirDesc=äéëï ìäú÷éï àú [name]? +SelectDirLabel3=úåëðú ääú÷ðä úú÷éï àú [name] ìúåê äúé÷ééä äáàä. +SelectDirBrowseLabel=ìäîùê, ìçõ òì 'äáà'. àí áøöåðê ìáçåø úé÷éä àçøú ìäú÷ðä, ìçõ òì 'òéåï'. +DiskSpaceMBLabel=ãøåùéí ìäú÷ðä ìôçåú [mb] MB ùì ùèç ãéñ÷ ôðåé. +ToUNCPathname=úåëðú ääú÷ðä ìà éëåìä ìäú÷éï ìðúéá UNC. àí àúä îðñä ìäú÷éï ìøùú, úöèøê ìîôåú ëåðï øùú. +InvalidPath=òìéê ìñô÷ ðúéá îìà òí àåú äëåðï; ìãåâîä:%n%nC:\APP%n%nàå ðúéá UNC áúöåøä:%n%n\\server\share +InvalidDrive=äëåðï àå ùéúåôéú ä-UNC ùáçøú ìà ÷ééîéí àå ùàéðí ðâéùéí. àðà áçø ëåðï àå ùéúåôéú àçøéí. +DiskSpaceWarningTitle=ùèç ôðåé àéðå îñôé÷ +DiskSpaceWarning=ãøåù ìôçåú %1KB ùèç ãéñ÷ ôðåé ìäú÷ðä, àê ìëåðï ùðáçø éù ø÷ %2KB æîéðéí. äàí áøöåðê ìäîùéê ìîøåú æàú? +DirNameTooLong=ùí äúé÷éä àå ðúéáä àøåê îãé +InvalidDirName=ùí äúé÷éä àéððå çå÷é. +BadDirName32=ùí äúé÷éä àéðå éëåì ìëìåì úååéí àìå:%n%n%1 +DirExistsTitle=äúé÷éä ÷ééîú +DirExists=äúé÷éä:%n%n%1%n%nëáø ÷ééîú. äàí áøöåðê ìäú÷éï ìúé÷éä æå áëì àåôï? +DirDoesntExistTitle=äúé÷ééä àéðä ÷ééîú +DirDoesntExist=äúé÷éä:%n%n%1%n%nàéðä ÷ééîú. äàí áøöåðê ùúåëðú ääú÷ðä úéöåø àåúä? + +; *** "Select Components" wizard page +WizardSelectComponents=áçø øëéáéí +SelectComponentsDesc=àéìå øëéáéí áøöåðê ìäú÷éï? +SelectComponentsLabel2=áçø àú äøëéáéí ùáøöåðê ìäú÷éï; äñø àú äñéîåï îäøëéáéí àåúí àéï áøöåðê ìäú÷éï. ìçõ òì 'äáà' ëàùø úäéä îåëï ìäîùéê. +FullInstallation=äú÷ðä îìàä +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=äú÷ðä áñéñéú +CustomInstallation=äú÷ðä îåúàîú àéùéú +NoUninstallWarningTitle=øëéáéí ÷ééîéí +NoUninstallWarning=úåëðú ääú÷ðä æéäúä ùäøëéáéí äáàéí ëáø îåú÷ðéí òì îçùáê:%n%n%1%näñøú äñéîåï îøëéáéí àìå ìà úñéø àåúí îîçùáê.%n%näàí áøöåðê ìäîùéê áëì æàú? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=ìäú÷ðú äøëéáéí ùðáçøå ãøåùéí ìôçåú [mb] MB ôðåééí òì ëåðï äéòã. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=áçø îùéîåú ðåñôåú +SelectTasksDesc=àéìå îùéîåú ðåñôåú òì úåëðú ääú÷ðä ìáöò? +SelectTasksLabel2=áçø àú äîùéîåú äðåñôåú ùáøöåðê ùúåëðú ääú÷ðä úáöò áòú äú÷ðú [name], åìàçø îëï ìçõ òì 'äáà'. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=áçø úé÷ééä áúôøéè 'äúçì' +SelectStartMenuFolderDesc=äéëï ìî÷í àú ÷éöåøé äãøê ìúåëðä? +SelectStartMenuFolderLabel3=úåëðú ääú÷ðä úéöåø ÷éöåøé ãøê ìúåëðä áúé÷éä äáàä áúôøéè ä'äúçì'. +SelectStartMenuFolderBrowseLabel=ìäîùê, ìçõ òì 'äáà'. àí áøöåðê ìáçåø úé÷éä àçøú ìäú÷ðä, ìçõ òì 'òéåï'. +MustEnterGroupName=àúä çééá ìöééï ùí úé÷éä. +GroupNameTooLong=ùí äúé÷éä àå ðúéáä àøåê îãé +InvalidGroupName=ùí äúé÷éä àéðå áø-úå÷ó. +BadGroupName=ùí äúé÷éä àéðå éëåì ìëìåì úååéí àìå:%n%n%1 +NoProgramGroupCheck2=&àì úéöåø úé÷éä áúôøéè 'äúçì' + +; *** "Ready to Install" wizard page +WizardReady=îåëï ìäú÷ðä +ReadyLabel1=úåëðú ääú÷ðä îåëðä ëòú ìäú÷éï àú [name] òì îçùáê. +ReadyLabel2a=ìçõ òì 'äú÷ï' ìäîùéê áäú÷ðä, àå 'çæåø' àí áøöåðê ìùðåú äâãøåú ëìùäï. +ReadyLabel2b=ìçõ òì 'äú÷ï' ëãé ìäîùéê áäú÷ðä +ReadyMemoUserInfo=ôøèé äîùúîù: +ReadyMemoDir=îé÷åí éòã: +ReadyMemoType=ñåâ ääú÷ðä: +ReadyMemoComponents=øëéáéí ùðáçøå: +ReadyMemoGroup=úé÷éä áúôøéè 'äúçì': +ReadyMemoTasks=îùéîåú ðåñôåú ìáéöåò: + +; *** "Preparing to Install" wizard page +WizardPreparing=îúëåðï ìäú÷ðä +PreparingDesc=úåëðú ääú÷ðä îúëåððú ìäú÷ðú [name] òì îçùáê. +PreviousInstallNotCompleted=äú÷ðú/äñøú ééùåí ÷åãí ìà äåùìîä. òìéê ìäôòéì àú îçùáê îçãù ëãé ìäùìéîä.%n%nìàçø äôòìú äîçùá îçãù, äôòì àú úåëðú ääú÷ðä ùåá ëãé ìäú÷éï àú [name]. +CannotContinue=àéï áàôùøåú úåëðú ääú÷ðä ìäîùéê áúäìéê ääú÷ðä. ðà ìçõ 'áéèåì' ìéöéàä. + +; *** "Installing" wizard page +WizardInstalling=îú÷éï +InstallingLabel=àðà äîúï áùòä ùúåëðú ääú÷ðä îú÷éðä àú [name] òì îçùáê. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=îñééí àú äú÷ðú [name] +FinishedLabelNoIcons=äú÷ðú [name] òì îçùáê äñúééîä áäöìçä. +FinishedLabel=äú÷ðú [name] òì îçùáê äñúééîä áäöìçä. ìäôòìú äúåëðä ìçõ òì ÷éöåøé äãøê ùäåòú÷å ìîçùáê. +ClickFinish=ìçõ òì 'ñéåí' ìéöéàä. +FinishedRestartLabel=ìäùìîú ääú÷ðä ùì [name], òì úåëðú ääú÷ðä ìäôòéì îçãù àú îçùáê. äàí áøöåðê ìäôòéìå îçãù òëùéå? +FinishedRestartMessage=ìäùìîú ääú÷ðä ùì [name], òì úåëðú ääú÷ðä ìäôòéì îçãù àú îçùáê.%n%näàí áøöåðê ìäôòéìå îçãù òëùéå? +ShowReadmeCheck=ëï, áøöåðé ìøàåú àú ÷åáõ ä-'÷øà àåúé' +YesRadio=&ëï, äôòì îçãù àú äîçùá òëùéå +NoRadio=&ìà, àôòéìå îçãù éãðéú îàåçø éåúø +; used for example as 'Run MyProg.exe' +RunEntryExec=äôòì àú %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=äöâ %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=ãøåù äãéñ÷ äáà ìäîùê ääú÷ðä +SelectDiskLabel2=àðà äëðñ àú ãéñ÷ îñ' %1 åìçõ òì 'àéùåø'.%n%nàí ä÷áöéí ùòì äãéñ÷ ðîöàéí áúé÷éä àçøú îæå äîåöâú ëàï, àðà äæï àú äðúéá äðëåï àå ìçõ òì 'òéåï'. +PathLabel=&ðúéá: +FileNotInDir2=ä÷åáõ "%1" ìà ðîöà á"%2". àðà äëðñ àú äãéñ÷ äðëåï àå áçø úé÷éä àçøú. +SelectDirectoryLabel=àðà áçø àú îé÷åîå ùì äãéñ÷ äáà. + +; *** Installation phase messages +SetupAborted=úäìéê ääú÷ðä ìà äåùìí.%n%nàðà ú÷ï àú äáòéä åäôòì àú úäìéê ääú÷ðä ùåá. +EntryAbortRetryIgnore=ìçõ òì 'ðñä ùåá' ìðñåú ùåá, 'äúòìí' ëãé ìäîùéê áëì î÷øä àå 'áéèåì' ëãé ìáèì àú ääú÷ðä. + +; *** Installation status messages +StatusCreateDirs=éåöø úé÷éåú... +StatusExtractFiles=îòúé÷ ÷áöéí... +StatusCreateIcons=éåöø ÷éöåøé ãøê... +StatusCreateIniEntries=éåöø øùåîåú INI... +StatusCreateRegistryEntries=éåöø øùåîåú á÷åáõ äøéùåí... +StatusRegisterFiles=øåùí ÷áöéí... +StatusSavingUninstall=ùåîø îéãò äçéåðé ìäñøú äúåëðä... +StatusRunProgram=îñééí äú÷ðä... +StatusRollback=îáèì ùéðåééí... + +; *** Misc. errors +ErrorInternal2=ùâéàä ôðéîéú: %1 +ErrorFunctionFailedNoCode=%1 ðëùì +ErrorFunctionFailed=%1 ðëùì; ÷åã %2 +ErrorFunctionFailedWithMessage=%1 ðëùì; ÷åã %2.%n%3 +ErrorExecutingProgram=ùâéàä áòú ðñéåï ìäøéõ àú ä÷åáõ:%n%1 + +; *** Registry errors +ErrorRegOpenKey=ùâéàä áòú ôúéçú îôúç øéùåí:%n%1\%2 +ErrorRegCreateKey=ùâéàä áòú éöéøú îôúç øéùåí:%n%1\%2 +ErrorRegWriteKey=ùâéàä áòú ëúéáä ìîôúç øéùåí:%n%1\%2 + +; *** INI errors +ErrorIniEntry=ùâéàä áòú ëúéáú øùåîú INI ì÷åáõ "%1". + +; *** File copying errors +FileAbortRetryIgnore=ìçõ òì 'ðñä ùåá' ëãé ìðñåú ùåá, 'äúòìí' ëãé ìãìâ òì ä÷åáõ äæä (ìà îåîìõ), àå 'áéèåì' ëãé ìáèì àú ääú÷ðä. +FileAbortRetryIgnore2=ìçõ òì 'ðñä ùåá' ëãé ìðñåú ùåá, 'äúòìí' ëãé ìäîùéê áëì àåôï (ìà îåîìõ), àå 'áéèåì' ëãé ìáèì àú ääú÷ðä. +SourceIsCorrupted=÷åáõ äî÷åø ÷èåò +SourceDoesntExist=÷åáõ äî÷åø "%1" àéðå ÷ééí +ExistingFileReadOnly=ä÷åáõ ä÷ééí îñåîï ë÷åáõ ì÷øéàä áìáã.%n%nìçõ òì 'ðñä ùåá' ëãé ìäåøéã àú úëåðú ä÷øéàä áìáã åìðñåú ùåá, 'äúòìí' ëãé ìãìâ òì ÷åáõ æä, àå 'áéèåì' ëãé ìáèì àú ääú÷ðä. +ErrorReadingExistingDest=ùâéàä áòú ðñéåï ì÷øåà àú ä÷åáõ ä÷ééí: +FileExists=ä÷åáõ ëáø ÷ééí.%n%näàí áøöåðê ùúåëðú ääú÷ðä úùëúá àåúå? +ExistingFileNewer=ä÷åáõ ä÷ééí çãù éåúø îä÷åáõ ùúåëðú ääú÷ðä øåöä ìäú÷éï. äîìöúðå äéà ùúùîåø òì ä÷åáõ ä÷ééí.%n%näàí áøöåðê ìùîåø àú ä÷åáõ ä÷ééí? +ErrorChangingAttr=ùâéàä áòú ðñéåï ìùðåú îàôééðéí ùì ä÷åáõ ä÷ééí: +ErrorCreatingTemp=ùâéàä áòú ðñéåï ìéöåø ÷åáõ áúé÷ééú äéòã: +ErrorReadingSource=ùâéàä áòú ÷øéàú ÷åáõ äî÷åø: +ErrorCopying=ùâéàä áòú äòú÷ú ÷åáõ: +ErrorReplacingExistingFile=ùâéàä áòú ðñéåï ìäçìéó àú ä÷åáõ ä÷ééí: +ErrorRestartReplace=ëùì á-RestartReplace: +ErrorRenamingTemp=ùâéàä áòú ðñéåï ìùðåú ùí ÷åáõ áúé÷ééú äéòã: +ErrorRegisterServer=ùâéàä áòú øéùåí DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 ëùì òí ÷åã éöéàä %1 +ErrorRegisterTypeLib=ìà ðéúï ìøùåí àú ñôøééú äèéôåñ: %1 + +; *** Post-installation errors +ErrorOpeningReadme=ùâéàä áðñéåï ôúéçú ÷åáõ '÷øà àåúé'. +ErrorRestartingComputer=úåëðú ääú÷ðä ìà äöìéçä ìäôòéì îçãù àú îçùáê. àðà òùä æàú éãðéú. + +; *** Uninstaller messages +UninstallNotFound=ä÷åáõ "%1" ìà ÷ééí. ìà ðéúï ìäîùéê áäú÷ðä. +UninstallOpenError=ìà ðéúï ìôúåç àú ä÷åáõ "%1". ìà ðéúï ìäîùéê áäú÷ðä. +UninstallUnsupportedVer=÷åáõ úéòåã ääñøä "%1" äåà áôåøîè ùàéðå îæåää ò"é âéøñä æå ùì úåëðú ääñøä. ìà ðéúï ìäîùéê áúäìéê ääñøä +UninstallUnknownEntry=øùåîä ìà îæåää (%1) æåäúä áúéòåã ääñøä. +ConfirmUninstall=äàí àúä áèåç ùáøöåðê ìäñéø ìçìåèéï àú %1 åàú ëì îøëéáéå äðìååéí? +UninstallOnlyOnWin64=äú÷ðä æå éëåìä ìäéåú îåñøú ø÷ òì 'çìåðåú' áâéøñú 64-áéè. +OnlyAdminCanUninstall=ø÷ îùúîù áòì æëåéåú ðéäåì éëåì ìäñéø äú÷ðä æå. +UninstallStatusLabel=àðà äîúï áòú ù%1 îåñøú îîçùáê. +UninstalledAll=%1 äåñøä îîçùáê áäöìçä. +UninstalledMost=äñøú %1 äñúééîä.%n%nîñôø øëéáéí ìà äåñøå ò"é äúåëðä, àê ðéúï ìäñéøí éãðéú. +UninstalledAndNeedsRestart=ëãé ìäùìéí àú úäìéê ääñøä ùì %1, òìéê ìäôòéì îçãù àú îçùáê.%n%näàí áøöåðê ìäôòéìå îçãù òëùéå? +UninstallDataCorrupted=ä÷åáõ "%1" ÷èåò. ìà ðéúï ìäîùéê áúäìéê ääú÷ðä + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=äàí ìäñéø àú ÷åáõ îùåúó? +ConfirmDeleteSharedFile2=äîòøëú àéáçðä ëé ä÷åáõ äîùåúó äæä àéðå áùéîåù òåã òì éãé àó úåëðä. äàí ìäñéø àú ä÷åáõ äîùåúó?%n%nàí éùðï úåëðåú ùòãééï îùúîùåú á÷åáõ æä åäåà éåñø, úô÷åãï ùì úåëðåú àìå òìåì ìäéôâò. àí àéðê áèåç, áçø 'ìà'. äùàøú ä÷åáõ òì îçùáê ìà úæé÷. +SharedFileNameLabel=ùí ä÷åáõ: +SharedFileLocationLabel=îé÷åí: +WizardUninstalling=îöá úäìéê ääñøä +StatusUninstalling=îñéø àú %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 âéøñä %2 +AdditionalIcons=ñéîìåðéí ðåñôéí: +CreateDesktopIcon=öåø ÷éöåø ãøê òì &ùåìçï äòáåãä +CreateQuickLaunchIcon=öåø ñéîìåï áùåøú ääøöä äîäéøä +ProgramOnTheWeb=%1 áøùú +UninstallProgram=äñø àú %1 +LaunchProgram=äôòì %1 +AssocFileExtension=&÷ùø àú %1 òí ñéåîú ä÷åáõ %2 +AssocingFileExtension=î÷ùø àú %1 òí ñéåîú ä÷åáõ %2 diff --git a/Files/Languages/Hungarian.isl b/Files/Languages/Hungarian.isl new file mode 100644 index 000000000..d5ea3a171 --- /dev/null +++ b/Files/Languages/Hungarian.isl @@ -0,0 +1,339 @@ +; *** Inno Setup version 5.1.11+ Hungarian messages with "a(z)" definite articles *** +; Copyright (C) 1999-2008 Kornél Pál +; All rights reserved. +; E-mail: kornelpal@gmail.com +; Hungarian Inno Setup translation home page: http://www.kornelpal.hu/ishu +; +; You can download the versions with "a" and "az" definite articles and read +; about the usage of different Hungarian definite articles on this page. +; +; For conditions of use and distribution see Readme.htm file contained in the +; Hungarian Inno Setup messages package available on the above home page. +; +; *** Inno Setup 5.1.11+ verzió magyar üzenetek "a(z)" határozott névelõkkel *** +; Copyright (C) 1999-2008 Pál Kornél +; Minden jog fenntartva. +; E-mail: kornelpal@gmail.com +; Magyar Inno Setup oldal: http://www.palkornel.hu/innosetup +; +; Az oldalról letölthetõ az "a" és az "az" névelõket tartalmazó változat, és +; olvashatsz a különbözõ magyar határozott névelõk használatáról is. +; +; A használat és a továbbadás feltételei a fenti oldalról letölthetõ Magyar +; Inno Setup üzenetek csomagban található Fontos.htm fájlban olvashatóak. +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=Magyar +LanguageID=$040E +LanguageCodePage=1250 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +;WelcomeFontName=Verdana +;WelcomeFontSize=12 +TitleFontName=Arial CE +;TitleFontSize=29 +CopyrightFontName=Arial CE +;CopyrightFontSize=8 + +[Messages] + +; *** Application titles +SetupAppTitle=Telepítõ +SetupWindowTitle=%1 Telepítõ +UninstallAppTitle=Eltávolító +UninstallAppFullTitle=%1 Eltávolító + +; *** Misc. common +InformationTitle=Információk +ConfirmTitle=Megerõsítés +ErrorTitle=Hiba + +; *** SetupLdr messages +SetupLdrStartupMessage=A(z) %1 telepítésre fog kerülni. Kívánja folytatni a telepítést? +LdrCannotCreateTemp=Nem lehet átmeneti fájlt létrehozni. A telepítés megszakadt +LdrCannotExecTemp=Az átmeneti könyvtárban nem lehet fájlt végrehajtani. A telepítés megszakadt + +; *** Startup error messages +LastErrorMessage=%1.%n%nHiba %2: %3 +SetupFileMissing=A(z) %1 fájl hiányzik a telepítõ könyvtárából. Hárítsa el a hibát, vagy szerezzen be egy új másolatot a programról. +SetupFileCorrupt=A telepítõ fájlok megsérültek. Szerezzen be egy új másolatot a programról. +SetupFileCorruptOrWrongVer=A telepítõ fájlok megsérültek, vagy nem kompatibilisek a Telepítõ jelen verziójával. Hárítsa el a hibát, vagy szerezzen be egy új másolatot a programról. +NotOnThisPlatform=Ez a program nem futtatható %1 alatt. +OnlyOnThisPlatform=Ezt a programot %1 alatt kell futtatni. +OnlyOnTheseArchitectures=Ezt a programot csak a Windows következõ processzorarchitektúrákhoz tervezett változataira lehet telepíteni:%n%n%1 +MissingWOW64APIs=A Windows Ön által futtatott verziója nem tartalmazza a Telepítõ által a 64-bites telepítés elvégzéséhez igényelt funkcionalitást. A hiba elhárításához a Service Pack %1 telepítése szükséges. +WinVersionTooLowError=A program a %1 %2 vagy késõbbi verzióját igényli. +WinVersionTooHighError=A programot nem lehet a %1 %2 vagy késõbbi verziójára telepíteni. +AdminPrivilegesRequired=A program telepítéséhez rendszergazdaként kell bejelentkezni. +PowerUserPrivilegesRequired=A program telepítéséhez rendszergazdaként vagy a kiemelt felhasználók csoport tagjaként kell bejelentkezni. +SetupAppRunningError=A Telepítõ megállapította, hogy a(z) %1 jelenleg fut.%n%nKérem, zárja be az összes példányát, majd a folytatáshoz kattintson az OK gombra, vagy a Mégse gombra a kilépéshez. +UninstallAppRunningError=Az Eltávolító megállapította, hogy a(z) %1 jelenleg fut.%n%nKérem, zárja be az összes példányát, majd a folytatáshoz kattintson az OK gombra, vagy a Mégse gombra a kilépéshez. + +; *** Misc. errors +ErrorCreatingDir=A telepítõ nem tudta létrehozni a(z) "%1" könyvtárat +ErrorTooManyFilesInDir=Nem hozható létre fájl a(z) "%1" könyvtárban, mert az már túl sok fájlt tartalmaz + +; *** Setup common messages +ExitSetupTitle=Kilépés a Telepítõbõl +ExitSetupMessage=A telepítés még nem fejezõdött be. Ha most kilép, a program nem kerül telepítésre.%n%nA Telepítõt késõbb is futtathatja a telepítés befejezéséhez.%n%nKilép a Telepítõbõl? +AboutSetupMenuItem=&Névjegy... +AboutSetupTitle=Telepítõ névjegye +AboutSetupMessage=%1 %2 verzió%n%3%n%nAz %1 honlapja:%n%4 +AboutSetupNote= +TranslatorNote=Magyar változat:%nCopyright (C) 1999-2008 Pál Kornél%nMinden jog fenntartva.%n%nMagyar Inno Setup oldal:%nhttp://www.palkornel.hu/innosetup + +; *** Buttons +ButtonBack=< &Vissza +ButtonNext=&Tovább > +ButtonInstall=&Telepítés +ButtonOK=OK +ButtonCancel=Mégse +ButtonYes=&Igen +ButtonYesToAll=Igen, &mindet +ButtonNo=&Nem +ButtonNoToAll=&Egyiket sem +ButtonFinish=&Befejezés +ButtonBrowse=&Tallózás... +ButtonWizardBrowse=T&allózás... +ButtonNewFolder=Ú&j mappa + +; *** "Select Language" dialog messages +SelectLanguageTitle=Válasszon telepítési nyelvet +SelectLanguageLabel=Válassza ki a telepítés során használandó nyelvet: + +; *** Common wizard text +ClickNext=A folytatáshoz kattintson a Tovább gombra, vagy a Mégse gombra a Telepítõbõl történõ kilépéshez. +BeveledLabel= +BrowseDialogTitle=Tallózás a mappák között +BrowseDialogLabel=Válasszon egy mappát az alábbi listából, majd kattintson az OK gombra. +NewFolderName=Új mappa + +; *** "Welcome" wizard page +WelcomeLabel1=Üdvözli a(z) [name] Telepítõ Varázsló. +WelcomeLabel2=A(z) [name/ver] a számítógépére fog kerülni.%n%nA telepítés folytatása elõtt ajánlott minden más futó alkalmazást bezárni. + +; *** "Password" wizard page +WizardPassword=Jelszó +PasswordLabel1=Ez a telepítés jelszóval van védve. +PasswordLabel3=Adja meg a jelszót, majd a folytatáshoz kattintson a Tovább gombra. A jelszavakban a kis- és a nagybetûk különbözõnek számítanak. +PasswordEditLabel=&Jelszó: +IncorrectPassword=A megadott jelszó helytelen. Próbálja újra. + +; *** "License Agreement" wizard page +WizardLicense=Licencszerzõdés +LicenseLabel=Olvassa el a következõ fontos információkat a folytatás elõtt. +LicenseLabel3=Kérem, olvassa el az alábbi licencszerzõdést. El kell fogadnia a szerzõdés feltételeit a telepítés folytatása elõtt. +LicenseAccepted=&Elfogadom a szerzõdést +LicenseNotAccepted=&Nem fogadom el a szerzõdést + +; *** "Information" wizard pages +WizardInfoBefore=Információk +InfoBeforeLabel=Olvassa el a következõ fontos információkat a folytatás elõtt. +InfoBeforeClickLabel=Ha felkészült a telepítés folytatására, kattintson a Tovább gombra. +WizardInfoAfter=Információk +InfoAfterLabel=Olvassa el a következõ fontos információkat a folytatás elõtt. +InfoAfterClickLabel=Ha felkészült a telepítés folytatására, kattintson a Tovább gombra. + +; *** "User Information" wizard page +WizardUserInfo=Felhasználó adatai +UserInfoDesc=Kérem, adja meg az adatait. +UserInfoName=&Felhasználónév: +UserInfoOrg=&Szervezet: +UserInfoSerial=&Sorozatszám: +UserInfoNameRequired=Meg kell adnia egy nevet. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Válasszon telepítési helyet +SelectDirDesc=Hova kerüljön telepítésre a(z) [name]? +SelectDirLabel3=A Telepítõ a(z) [name] alkalmazást a következõ mappába fogja telepíteni. +SelectDirBrowseLabel=A folytatáshoz kattintson a Tovább gombra. Másik mappa kiválasztásához kattintson a Tallózás gombra. +DiskSpaceMBLabel=Legalább [mb] MB szabad lemezterületre van szükség. +ToUNCPathname=A Telepítõ nem tud hálózati útvonalra telepíteni. Ha hálózatra kíván telepíteni, csatlakoztatnia kell egy hálózati meghajtót. +InvalidPath=Teljes útvonalat írjon be a meghajtó betûjelével; például:%n%nC:\Alkalmazás%n%nvagy egy hálózati útvonalat a következõ alakban:%n%n\\kiszolgáló\megosztás +InvalidDrive=A kiválasztott meghajtó vagy hálózati megosztás nem létezik vagy nem érhetõ el. Válasszon másikat. +DiskSpaceWarningTitle=Nincs elég szabad lemezterület a meghajtón +DiskSpaceWarning=A Telepítõnek legalább %1 KB szabad lemezterületre van szüksége, de a kiválasztott meghajtón csak %2 KB áll rendelkezésre.%n%nMindenképpen folytatni kívánja? +DirNameTooLong=A mappanév vagy az útvonal túl hosszú. +InvalidDirName=A mappanév érvénytelen. +BadDirName32=A mappanevekben nem szerepelhetnek a következõ karakterek:%n%n%1 +DirExistsTitle=A mappa már létezik +DirExists=A következõ mappa már létezik:%n%n%1 %n%nEbbe a mappába kívánja telepíteni a programot? +DirDoesntExistTitle=A mappa nem létezik +DirDoesntExist= A következõ mappa nem létezik:%n%n%1%n%nLétre kívánja hozni a mappát? + +; *** "Select Components" wizard page +WizardSelectComponents=Összetevõk kiválasztása +SelectComponentsDesc=Mely összetevõk kerüljenek telepítésre? +SelectComponentsLabel2=Válassza ki a telepítendõ összetevõket; törölje a telepíteni nem kívánt összetevõket. Kattintson a Tovább gombra, ha készen áll a folytatásra. +FullInstallation=Teljes telepítés +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Szokásos telepítés +CustomInstallation=Egyéni telepítés +NoUninstallWarningTitle=Létezõ összetevõ +NoUninstallWarning=A Telepítõ megállapította, hogy a következõ összetevõk már telepítve vannak a számítógépére:%n%n%1%n%nEzen összetevõk kijelölésének törlése nem távolítja el azokat a számítógépérõl.%n%nMindenképpen folytatja? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=A jelenlegi kijelölés legalább [mb] MB lemezterületet igényel. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Jelöljön ki kiegészítõ feladatokat +SelectTasksDesc=Mely kiegészítõ feladatok kerüljenek végrehajtásra? +SelectTasksLabel2=Jelölje ki, mely kiegészítõ feladatokat hajtsa végre a Telepítõ a(z) [name] telepítése során, majd kattintson a Tovább gombra. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Válasszon mappát a Start menüben +SelectStartMenuFolderDesc=Hova helyezze a Telepítõ a program parancsikonjait? +SelectStartMenuFolderLabel3=A Telepítõ a program parancsikonjait a Start menü következõ mappájában fogja létrehozni. +SelectStartMenuFolderBrowseLabel=A folytatáshoz kattintson a Tovább gombra. Másik mappa kiválasztásához kattintson a Tallózás gombra. +MustEnterGroupName=Meg kell adnia egy mappanevet. +GroupNameTooLong=A mappanév vagy az útvonal túl hosszú. +InvalidGroupName=A mappanév érvénytelen. +BadGroupName=A mappa nevében nem szerepelhetnek a következõ karakterek:%n%n%1 +NoProgramGroupCheck2=&Ne hozzon létre mappát a Start menüben + +; *** "Ready to Install" wizard page +WizardReady=A Telepítõ felkészült +ReadyLabel1=A Telepítõ felkészült a(z) [name] számítógépére történõ telepítésére. +ReadyLabel2a=Kattintson a Telepítés gombra a folytatáshoz, vagy a Vissza gombra a beállítások áttekintéséhez, megváltoztatásához. +ReadyLabel2b=Kattintson a Telepítés gombra a folytatáshoz. +ReadyMemoUserInfo=Felhasználó adatai: +ReadyMemoDir=Telepítés helye: +ReadyMemoType=Telepítés típusa: +ReadyMemoComponents=Választott összetevõk: +ReadyMemoGroup=Start menü mappája: +ReadyMemoTasks=Kiegészítõ feladatok: + +; *** "Preparing to Install" wizard page +WizardPreparing=Felkészülés a telepítésre +PreparingDesc=A Telepítõ felkészül a(z) [name] számítógépére történõ telepítésére. +PreviousInstallNotCompleted=Egy korábbi program telepítése/eltávolítása nem fejezõdött be. Újra kell indítania a számítógépét a másik telepítés befejezéséhez.%n%nA számítógépe újraindítása után ismét futtassa a Telepítõt a(z) [name] telepítésének befejezéséhez. +CannotContinue=A telepítés nem folytatható. A kilépéshez kattintson a Mégse gombra. + +; *** "Installing" wizard page +WizardInstalling=Telepítés állapota +InstallingLabel=Legyen türelemmel, amíg a(z) [name] számítógépére történõ telepítése folyik. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=A(z) [name] Telepítõ Varázsló befejezése +FinishedLabelNoIcons=A(z) [name] telepítése befejezõdött. +FinishedLabel=A(z) [name] telepítése befejezõdött. Az alkalmazást a létrehozott ikonok kiválasztásával indíthatja. +ClickFinish=Kattintson a Befejezés gombra a Telepítõbõl történõ kilépéshez. +FinishedRestartLabel=A(z) [name] telepítésének befejezéséhez újra kell indítani a számítógépet. Újraindítja most? +FinishedRestartMessage=A(z) [name] telepítésének befejezéséhez újra kell indítani a számítógépet.%n%nÚjraindítja most? +ShowReadmeCheck=Igen, szeretném elolvasni a FONTOS fájlt +YesRadio=&Igen, újraindítom +NoRadio=&Nem, késõbb indítom újra +; used for example as 'Run MyProg.exe' +RunEntryExec=%1 futtatása +; used for example as 'View Readme.txt' +RunEntryShellExec=%1 megtekintése + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=A Telepítõnek szüksége van a következõ lemezre +SelectDiskLabel2=Helyezze be a(z) %1. lemezt és kattintson az OK gombra.%n%nHa a fájlok a lemez egy a megjelenítettõl különbözõ mappájában találhatók, írja be a helyes útvonalat vagy kattintson a Tallózás gombra. +PathLabel=Ú&tvonal: +FileNotInDir2=A(z) "%1" fájl nem található a következõ helyen: "%2". Helyezze be a megfelelõ lemezt vagy válasszon egy másik mappát. +SelectDirectoryLabel=Adja meg a következõ lemez helyét. + +; *** Installation phase messages +SetupAborted=A telepítés nem fejezõdött be.%n%nHárítsa el a hibát, és futtassa újra a Telepítõt. +EntryAbortRetryIgnore=Kilépés: megszakítás, Ismét: megismétlés, Tovább: folytatás + +; *** Installation status messages +StatusCreateDirs=Könyvtárak létrehozása... +StatusExtractFiles=Fájlok kibontása... +StatusCreateIcons=Parancsikonok létrehozása... +StatusCreateIniEntries=INI bejegyzések létrehozása... +StatusCreateRegistryEntries=Rendszerleíró bejegyzések létrehozása... +StatusRegisterFiles=Fájlok regisztrálása... +StatusSavingUninstall=Eltávolító információk mentése... +StatusRunProgram=Telepítés befejezése... +StatusRollback=Változtatások visszavonása... + +; *** Misc. errors +ErrorInternal2=Belsõ hiba: %1 +ErrorFunctionFailedNoCode=Sikertelen %1 +ErrorFunctionFailed=Sikertelen %1; kód: %2 +ErrorFunctionFailedWithMessage=Sikertelen %1; kód: %2.%n%3 +ErrorExecutingProgram=Nem hajtható végre a fájl:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Nem nyitható meg a rendszerleíró kulcs:%n%1\%2 +ErrorRegCreateKey=Nem hozható létre a rendszerleíró kulcs:%n%1\%2 +ErrorRegWriteKey=Nem módosítható a rendszerleíró kulcs:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Hiba az INI bejegyzés létrehozása közben a(z) "%1" fájlban. + +; *** File copying errors +FileAbortRetryIgnore=Kilépés: megszakítás, Ismét: megismétlés, Tovább: a fájl átlépése (nem ajánlott) +FileAbortRetryIgnore2=Kilépés: megszakítás, Ismét: megismétlés, Tovább: folytatás (nem ajánlott) +SourceIsCorrupted=A forrásfájl megsérült +SourceDoesntExist=A(z) "%1" forrásfájl nem létezik +ExistingFileReadOnly=A fájl csak olvashatóként van jelölve.%n%nKilépés: megszakítás, Ismét: csak olvasható jelölés megszüntetése, és megismétlés, Tovább: a fájl átlépése (nem ajánlott) +ErrorReadingExistingDest=Hiba lépett fel a fájl olvasása közben: +FileExists=A fájl már létezik.%n%nFelül kívánja írni? +ExistingFileNewer=A létezõ fájl újabb a telepítésre kerülõnél. Ajánlott a létezõ fájl megtartása.%n%nMeg kívánja tartani a létezõ fájlt? +ErrorChangingAttr=Hiba lépett fel a fájl attribútumának módosítása közben: +ErrorCreatingTemp=Hiba lépett fel a fájl telepítési könyvtárban történõ létrehozása közben: +ErrorReadingSource=Hiba lépett fel a forrásfájl olvasása közben: +ErrorCopying=Hiba lépett fel a fájl másolása közben: +ErrorReplacingExistingFile=Hiba lépett fel a létezõ fájl cseréje közben: +ErrorRestartReplace=A fájl cseréje az újraindítás után sikertelen volt: +ErrorRenamingTemp=Hiba lépett fel fájl telepítési könyvtárban történõ átnevezése közben: +ErrorRegisterServer=Nem lehet regisztrálni a DLL-t/OCX-et: %1 +ErrorRegSvr32Failed=sikertelen RegSvr32. A visszaadott kód: %1 +ErrorRegisterTypeLib=Nem lehet regisztrálni a típustárat: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Hiba lépett fel a FONTOS fájl megnyitása közben. +ErrorRestartingComputer=A Telepítõ nem tudta újraindítani a számítógépet. Indítsa újra kézileg. + +; *** Uninstaller messages +UninstallNotFound=A(z) "%1" fájl nem létezik. Nem távolítható el. +UninstallOpenError=A(z) "%1" fájl nem nyitható meg. Nem távolítható el +UninstallUnsupportedVer=A(z) "%1" eltávolítási naplófájl formátumát nem tudja felismerni az eltávolító jelen verziója. Az eltávolítás nem folytatható +UninstallUnknownEntry=Egy ismeretlen bejegyzés (%1) található az eltávolítási naplófájlban +ConfirmUninstall=Biztosan el kívánja távolítani a(z) %1 programot és minden összetevõjét? +UninstallOnlyOnWin64=Ezt a telepítést csak 64-bites Windowson lehet eltávolítani. +OnlyAdminCanUninstall=Ezt a telepítést csak adminisztrációs jogokkal rendelkezõ felhasználó távolíthatja el. +UninstallStatusLabel=Legyen türelemmel, amíg a(z) %1 számítógépérõl történõ eltávolítása befejezõdik. +UninstalledAll=A(z) %1 sikeresen el lett távolítva a számítógéprõl. +UninstalledMost=A(z) %1 eltávolítása befejezõdött.%n%nNéhány elemet nem lehetetett eltávolítani. Törölje kézileg. +UninstalledAndNeedsRestart=A(z) %1 eltávolításának befejezéséhez újra kell indítania a számítógépét.%n%nÚjraindítja most? +UninstallDataCorrupted=A(z) "%1" fájl sérült. Nem távolítható el. + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Törli a megosztott fájlt? +ConfirmDeleteSharedFile2=A rendszer azt jelzi, hogy a következõ megosztott fájlra már nincs szüksége egyetlen programnak sem. Eltávolítja a megosztott fájlt?%n%nHa más programok még mindig használják a megosztott fájlt, akkor az eltávolítása után lehet, hogy nem fognak megfelelõen mûködni. Ha bizonytalan, válassza a Nemet. A fájl megtartása nem okoz problémát a rendszerben. +SharedFileNameLabel=Fájlnév: +SharedFileLocationLabel=Helye: +WizardUninstalling=Eltávolítás állapota +StatusUninstalling=%1 eltávolítása... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 %2 verzió +AdditionalIcons=További ikonok: +CreateDesktopIcon=Ikon létrehozása az &Asztalon +CreateQuickLaunchIcon=Ikon létrehozása a &Gyorsindítás eszköztáron +ProgramOnTheWeb=%1 a weben +UninstallProgram=%1 eltávolítása +LaunchProgram=%1 elindítása +AssocFileExtension=A(z) %1 &társítása a(z) %2 fájlkiterjesztéssel +AssocingFileExtension=A(z) %1 társítása a(z) %2 fájlkiterjesztéssel... diff --git a/Files/Languages/Italian.isl b/Files/Languages/Italian.isl new file mode 100644 index 000000000..31948d6bb --- /dev/null +++ b/Files/Languages/Italian.isl @@ -0,0 +1,323 @@ +; *** Inno Setup versione 5.1.11+ lingua Italiana *** +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; Italian.isl revisione 30b - 2007/02/28 (Basato su Default.isl 1.69) +; +; Tradotto da ale5000 +; E-mail: ale5000 AT tiscali DOT it +; Segnalatemi via e-mail eventuali errori o suggerimenti. + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=Italiano +LanguageID=$0410 +LanguageCodePage=1252 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +;WelcomeFontName=Verdana +;WelcomeFontSize=12 +;TitleFontName=Arial +;TitleFontSize=29 +;CopyrightFontName=Arial +;CopyrightFontSize=8 + +[Messages] + +; *** Application titles +SetupAppTitle=Installazione +SetupWindowTitle=Installazione di %1 +UninstallAppTitle=Disinstallazione +UninstallAppFullTitle=Disinstallazione di %1 + +; *** Misc. common +InformationTitle=Informazioni +ConfirmTitle=Conferma +ErrorTitle=Errore + +; *** SetupLdr messages +SetupLdrStartupMessage=Questa è l'installazione di %1. Si desidera continuare? +LdrCannotCreateTemp=Impossibile creare un file temporaneo. Installazione annullata +LdrCannotExecTemp=Impossibile eseguire un file nella cartella temporanea. Installazione annullata + +; *** Startup error messages +LastErrorMessage=%1.%n%nErrore %2: %3 +SetupFileMissing=File %1 non trovato nella cartella di installazione. Correggere il problema o richiedere una nuova copia del software. +SetupFileCorrupt=I file di installazione sono danneggiati. Richiedere una nuova copia del software. +SetupFileCorruptOrWrongVer=I file di installazione sono danneggiati, o sono incompatibili con questa versione del programma di installazione. Correggere il problema o richiedere una nuova copia del software. +NotOnThisPlatform=Questo programma non è compatibile con %1. +OnlyOnThisPlatform=Questo programma richiede %1. +OnlyOnTheseArchitectures=Questo programma può essere installato solo su versioni di Windows progettate per le seguenti architetture del processore:%n%n%1 +MissingWOW64APIs=La versione di Windows utilizzata non include la funzionalità richiesta dal programma di installazione per realizzare un'installazione a 64-bit. Per correggere questo problema, installare il Service Pack %1. +WinVersionTooLowError=Questo programma richiede %1 versione %2 o successiva. +WinVersionTooHighError=Questo programma non può essere installato su %1 versione %2 o successiva. +AdminPrivilegesRequired=Sono richiesti privilegi di amministratore per installare questo programma. +PowerUserPrivilegesRequired=Sono richiesti privilegi di amministratore o di Power Users per poter installare questo programma. +SetupAppRunningError=%1 è attualmente in esecuzione.%n%nChiudere adesso tutte le istanze del programma e poi premere OK, oppure premere Annulla per uscire. +UninstallAppRunningError=%1 è attualmente in esecuzione.%n%nChiudere adesso tutte le istanze del programma e poi premere OK, oppure premere Annulla per uscire. + +; *** Misc. errors +ErrorCreatingDir=Impossibile creare la cartella "%1" +ErrorTooManyFilesInDir=Impossibile creare i file nella cartella "%1" perché contiene troppi file + +; *** Setup common messages +ExitSetupTitle=Uscita dall'installazione +ExitSetupMessage=L'installazione non è completa. Uscendo dall'installazione in questo momento, il programma non sarà installato.%n%nÈ possibile eseguire l'installazione in un secondo tempo.%n%nUscire dall'installazione? +AboutSetupMenuItem=&Informazioni sull'installazione... +AboutSetupTitle=Informazioni sull'installazione +AboutSetupMessage=%1 versione %2%n%3%n%n%1 sito web:%n%4 +AboutSetupNote= +TranslatorNote= + +; *** Buttons +ButtonBack=< &Indietro +ButtonNext=&Avanti > +ButtonInstall=&Installa +ButtonOK=OK +ButtonCancel=Annulla +ButtonYes=&Si +ButtonYesToAll=Si a &tutto +ButtonNo=&No +ButtonNoToAll=N&o a tutto +ButtonFinish=&Fine +ButtonBrowse=&Sfoglia... +ButtonWizardBrowse=S&foglia... +ButtonNewFolder=&Crea nuova cartella + +; *** "Select Language" dialog messages +SelectLanguageTitle=Selezionare la lingua dell'installazione +SelectLanguageLabel=Selezionare la lingua da utilizzare durante l'installazione: + +; *** Common wizard text +ClickNext=Premere Avanti per continuare, o Annulla per uscire. +BeveledLabel= +BrowseDialogTitle=Sfoglia per cartelle +BrowseDialogLabel=Selezionare una cartella dalla lista, poi premere OK. +NewFolderName=Nuova cartella + +; *** "Welcome" wizard page +WelcomeLabel1=Benvenuti nel programma di installazione di [name] +WelcomeLabel2=[name/ver] sarà installato sul computer.%n%nSi consiglia di chiudere tutte le applicazioni attive prima di procedere. + +; *** "Password" wizard page +WizardPassword=Password +PasswordLabel1=Questa installazione è protetta da password. +PasswordLabel3=Inserire la password, poi premere Avanti per continuare. Le password sono sensibili alle maiuscole/minuscole. +PasswordEditLabel=&Password: +IncorrectPassword=La password inserita non è corretta, riprovare. + +; *** "License Agreement" wizard page +WizardLicense=Contratto di licenza +LicenseLabel=Leggere con attenzione le informazioni che seguono prima di procedere. +LicenseLabel3=Leggere il seguente contratto di licenza. È necessario accettare tutti i termini del contratto per procedere con l'installazione. +LicenseAccepted=&Accetto i termini del contratto di licenza +LicenseNotAccepted=&Non accetto i termini del contratto di licenza + +; *** "Information" wizard pages +WizardInfoBefore=Informazioni +InfoBeforeLabel=Leggere le importanti informazioni che seguono prima di procedere. +InfoBeforeClickLabel=Quando si è pronti per proseguire, premere Avanti. +WizardInfoAfter=Informazioni +InfoAfterLabel=Leggere le importanti informazioni che seguono prima di procedere. +InfoAfterClickLabel=Quando si è pronti per proseguire, premere Avanti. + +; *** "User Information" wizard page +WizardUserInfo=Informazioni utente +UserInfoDesc=Inserire le seguenti informazioni. +UserInfoName=&Nome: +UserInfoOrg=&Società: +UserInfoSerial=&Numero di serie: +UserInfoNameRequired=È necessario inserire un nome. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Selezione della cartella di installazione +SelectDirDesc=Dove si vuole installare [name]? +SelectDirLabel3=[name] sarà installato nella seguente cartella. +SelectDirBrowseLabel=Per continuare, premere Avanti. Per scegliere un'altra cartella, premere Sfoglia. +DiskSpaceMBLabel=Sono richiesti almeno [mb] MB di spazio sul disco. +ToUNCPathname=Non è possiblie installare su un percorso di rete. Se si sta installando attraverso una rete, si deve connettere la risorsa come una unità di rete. +InvalidPath=Si deve inserire un percorso completo di lettera di unità; per esempio:%n%nC:\APP%n%no un percorso di rete nella forma:%n%n\\server\condivisione +InvalidDrive=L'unità o il percorso di rete selezionato non esiste o non è accessibile. Selezionarne un'altro. +DiskSpaceWarningTitle=Spazio su disco insufficiente +DiskSpaceWarning=L'installazione richiede almeno %1 KB di spazio libero per eseguire l'installazione, ma l'unità selezionata ha solo %2 KB disponibili.%n%nSi desidera continuare comunque? +DirNameTooLong=Il nome della cartella o il percorso sono troppo lunghi. +InvalidDirName=Il nome della cartella non è valido. +BadDirName32=Il nome della cartella non può includere nessuno dei caratteri seguenti:%n%n%1 +DirExistsTitle=Cartella già esistente +DirExists=La cartella:%n%n%1 esiste già.%n%nSi desidera utilizzarla comunque? +DirDoesntExistTitle=Cartella inesistente +DirDoesntExist=La cartella:%n%n%1 non esiste.%n%nSi desidera crearla? + +; *** "Select Components" wizard page +WizardSelectComponents=Selezione componenti +SelectComponentsDesc=Quali componenti devono essere installati? +SelectComponentsLabel2=Selezionare i componenti da installare, deselezionare quelli che non si desidera installare. Premere Avanti per continuare. +FullInstallation=Installazione completa +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Installazione compatta +CustomInstallation=Installazione personalizzata +NoUninstallWarningTitle=Componente esistente +NoUninstallWarning=I seguenti componenti sono già installati sul computer:%n%n%1%n%nDeselezionando questi componenti non verranno disinstallati.%n%nSi desidera continuare comunque? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=La selezione corrente richiede almeno [mb] MB di spazio su disco. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Selezione processi addizionali +SelectTasksDesc=Quali processi aggiuntivi si vogliono avviare? +SelectTasksLabel2=Selezionare i processi aggiuntivi che verranno eseguiti durante l'installazione di [name], poi premere Avanti. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Selezione della cartella nel Menu Avvio/Start +SelectStartMenuFolderDesc=Dove si vuole inserire i collegamenti al programma? +SelectStartMenuFolderLabel3=Saranno creati i collegamenti al programma nella seguente cartella del Menu Avvio/Start. +SelectStartMenuFolderBrowseLabel=Per continuare, premere Avanti. Per selezionare un'altra cartella, premere Sfoglia. +MustEnterGroupName=Si deve inserire il nome della cartella. +GroupNameTooLong=Il nome della cartella o il percorso sono troppo lunghi. +InvalidGroupName=Il nome della cartella non è valido. +BadGroupName=Il nome della cartella non può includere nessuno dei caratteri seguenti:%n%n%1 +NoProgramGroupCheck2=&Non creare una cartella nel Menu Avvio/Start + +; *** "Ready to Install" wizard page +WizardReady=Pronto per l'installazione +ReadyLabel1=Il programma di installazione è pronto per iniziare l'installazione di [name] sul computer. +ReadyLabel2a=Premere Installa per continuare con l'installazione, o Indietro per rivedere o modificare le impostazioni. +ReadyLabel2b=Premere Installa per procedere con l'installazione. +ReadyMemoUserInfo=Informazioni utente: +ReadyMemoDir=Cartella di installazione: +ReadyMemoType=Tipo di installazione: +ReadyMemoComponents=Componenti selezionati: +ReadyMemoGroup=Cartella del menu Avvio/Start: +ReadyMemoTasks=Processi addizionali: + +; *** "Preparing to Install" wizard page +WizardPreparing=Preparazione all'installazione +PreparingDesc=Preparazione all'installazione di [name] sul computer. +PreviousInstallNotCompleted=L'installazione/disinstallazione precedente del programma non è stata completata. È necessario riavviare il sistema per completare l'installazione.%n%nAl successivo riavvio del sistema eseguire di nuovo l'installazione di [name]. +CannotContinue=L'installazione non può continuare. Premere Annulla per uscire. + +; *** "Installing" wizard page +WizardInstalling=Installazione in corso +InstallingLabel=Attendere il completamento dell'installazione di [name] sul computer. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Completamento dell'installazione di [name] +FinishedLabelNoIcons=L'installazione di [name] è stata completata con successo. +FinishedLabel=L'installazione di [name] è stata completata con successo. L'applicazione può essere eseguita selezionando le relative icone. +ClickFinish=Premere Fine per uscire dall'installazione. +FinishedRestartLabel=Per completare l'installazione di [name], è necessario riavviare il sistema. Si desidera riavviare adesso? +FinishedRestartMessage=Per completare l'installazione di [name], è necessario riavviare il sistema.%n%nSi desidera riavviare adesso? +ShowReadmeCheck=Si, desidero vedere il file LEGGIMI adesso +YesRadio=&Si, riavvia il sistema adesso +NoRadio=&No, riavvia il sistema più tardi +; used for example as 'Run MyProg.exe' +RunEntryExec=Avvia %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Visualizza %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=L'installazione necessita del disco successivo +SelectDiskLabel2=Inserire il disco %1 e premere OK.%n%nSe i file su questo disco si trovano in una cartella diversa da quella visualizzata sotto, inserire il percorso corretto o premere Sfoglia. +PathLabel=&Percorso: +FileNotInDir2=Il file "%1" non è stato trovato in "%2". Inserire il disco corretto o selezionare un'altra cartella. +SelectDirectoryLabel=Specificare il percorso del prossimo disco. + +; *** Installation phase messages +SetupAborted=L'installazione non è stata completata.%n%nCorreggere il problema e rieseguire nuovamente l'installazione. +EntryAbortRetryIgnore=Premere Riprova per ritentare nuovamente, Ignora per procedere in ogni caso, o Interrompi per terminare l'installazione. + +; *** Installation status messages +StatusCreateDirs=Creazione cartelle... +StatusExtractFiles=Estrazione file... +StatusCreateIcons=Creazione icone... +StatusCreateIniEntries=Creazione voci nei file INI... +StatusCreateRegistryEntries=Creazione voci di registro... +StatusRegisterFiles=Registrazione file... +StatusSavingUninstall=Salvataggio delle informazioni di disinstallazione... +StatusRunProgram=Termine dell'installazione... +StatusRollback=Recupero delle modifiche... + +; *** Misc. errors +ErrorInternal2=Errore Interno %1 +ErrorFunctionFailedNoCode=%1 fallito +ErrorFunctionFailed=%1 fallito; codice %2 +ErrorFunctionFailedWithMessage=%1 fallito; codice %2.%n%3 +ErrorExecutingProgram=Impossibile eseguire il file:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Errore di apertura della chiave di registro:%n%1\%2 +ErrorRegCreateKey=Errore di creazione della chiave di registro:%n%1\%2 +ErrorRegWriteKey=Errore di scrittura della chiave di registro:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Errore nella creazione delle voci INI nel file "%1". + +; *** File copying errors +FileAbortRetryIgnore=Premere Riprova per tentare di nuovo, Ignora per saltare questo file (sconsigliato), o Interrompi per terminare l'installazione. +FileAbortRetryIgnore2=Premere Riprova per tentare di nuovo, Ignora per proseguire comunque (sconsigliato), o Interrompi per terminare l'installazione. +SourceIsCorrupted=Il file sorgente è danneggiato +SourceDoesntExist=Il file sorgente "%1" non esiste +ExistingFileReadOnly=Il file esistente ha l'attributo di sola lettura.%n%nPremere Riprova per rimuovere l'attributo di sola lettura e ritentare, Ignora per saltare questo file, o Interrompi per terminare l'installazione. +ErrorReadingExistingDest=Si è verificato un errore durante la lettura del file esistente: +FileExists=Il file esiste già.%n%nDesideri sovrascriverlo? +ExistingFileNewer=Il file esistente è più recente di quello che si stà installando. Si raccomanda di mantenere il file esistente.%n%nSi desidera mantenere il file esistente? +ErrorChangingAttr=Si è verificato un errore durante il tentativo di modifica dell'attributo del file esistente: +ErrorCreatingTemp=Si è verificato un errore durante la creazione di un file nella cartella di installazione: +ErrorReadingSource=Si è verificato un errore durante la lettura del file sorgente: +ErrorCopying=Si è verificato un errore durante la copia di un file: +ErrorReplacingExistingFile=Si è verificato un errore durante la sovrascrittura del file esistente: +ErrorRestartReplace=Errore durante Riavvio-Sostituzione: +ErrorRenamingTemp=Si è verificato un errore durante il tentativo di rinominare un file nella cartella di installazione: +ErrorRegisterServer=Impossibile registrare la DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 è fallito con codice di uscita %1 +ErrorRegisterTypeLib=Impossibile registrare la libreria di tipo: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Si è verificato un errore durante l'apertura del file LEGGIMI. +ErrorRestartingComputer=Impossibile riavviare il sistema. Riavviare manualmente. + +; *** Uninstaller messages +UninstallNotFound=Il file "%1" non esiste. Impossibile disinstallare. +UninstallOpenError=Il file "%1" non può essere aperto. Impossibile disinstallare +UninstallUnsupportedVer=Il file log di disinstallazione "%1" è in un formato non riconosciuto da questa versione del programma di disinstallazione. Impossibile disinstallare +UninstallUnknownEntry=Trovata una voce sconosciuta (%1) nel file di log della disinstallazione +ConfirmUninstall=Si desidera rimuovere completamente %1 e tutti i suoi componenti? +UninstallOnlyOnWin64=Questo programma può essere disinstallato solo su Windows a 64-bit. +OnlyAdminCanUninstall=Questa applicazione può essere disinstallata solo da un utente con privilegi di amministratore. +UninstallStatusLabel=Attendere fino a che %1 è stato rimosso dal computer. +UninstalledAll=%1 è stato rimosso con successo dal computer. +UninstalledMost=Disinstallazione di %1 completata.%n%nAlcuni elementi non possono essere rimossi. Dovranno essere rimossi manualmente. +UninstalledAndNeedsRestart=Per completare la disinstallazione di %1, è necessario riavviare il sistema.%n%nSi desidera riavviare adesso? +UninstallDataCorrupted=Il file "%1" è danneggiato. Impossibile disinstallare + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Rimuovere il file condiviso? +ConfirmDeleteSharedFile2=Il sistema indica che il seguente file condiviso non è più usato da nessun programma. Rimuovere questo file condiviso?%n%nSe qualche programma usasse questo file, potrebbe non funzionare più correttamente. Se non si è sicuri, scegliere No. Lasciare il file nel sistema non può causare danni. +SharedFileNameLabel=Nome del file: +SharedFileLocationLabel=Percorso: +WizardUninstalling=Stato della disinstallazione +StatusUninstalling=Disinstallazione di %1 in corso... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 versione %2 +AdditionalIcons=Icone aggiuntive: +CreateDesktopIcon=Crea un'icona sul &desktop +CreateQuickLaunchIcon=Crea un'icona nella barra &Avvio veloce +ProgramOnTheWeb=%1 sul Web +UninstallProgram=Disinstalla %1 +LaunchProgram=Avvia %1 +AssocFileExtension=&Associa l'estensione %2 a %1 +AssocingFileExtension=Associazione dell'estensione %2 a %1 in corso... \ No newline at end of file diff --git a/Files/Languages/Japanese.isl b/Files/Languages/Japanese.isl new file mode 100644 index 000000000..d3223b8a7 --- /dev/null +++ b/Files/Languages/Japanese.isl @@ -0,0 +1,303 @@ +; *** Inno Setup version 5.1.11+ Japanese messages *** +; +; Maintained by Koichi Shirasuka (shirasuka@eugrid.co.jp) +; +; Translation based on Ryou Minakami (ryou32jp@yahoo.co.jp) +; +; $jrsoftware: issrc/Files/Languages/Japanese.isl,v 1.7 2010/11/02 10:57:03 mlaan Exp $ + +[LangOptions] +LanguageName=<65E5><672C><8A9E> +LanguageID=$0411 +LanguageCodePage=932 + +[Messages] + +; *** Application titles +SetupAppTitle=ƒZƒbƒgƒAƒbƒv +SetupWindowTitle=%1 ƒZƒbƒgƒAƒbƒv +UninstallAppTitle=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ +UninstallAppFullTitle=%1 ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ + +; *** Misc. common +InformationTitle=î•ñ +ConfirmTitle=Šm”F +ErrorTitle=ƒGƒ‰[ + +; *** SetupLdr messages +SetupLdrStartupMessage=%1 ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·B‘±s‚µ‚Ü‚·‚©H +LdrCannotCreateTemp=ˆêŽžƒtƒ@ƒCƒ‹‚ð쬂ł«‚Ü‚¹‚ñBƒZƒbƒgƒAƒbƒv‚𒆎~‚µ‚Ü‚·B +LdrCannotExecTemp=ˆêŽžƒtƒHƒ‹ƒ_‚̃tƒ@ƒCƒ‹‚ðŽÀs‚Å‚«‚Ü‚¹‚ñBƒZƒbƒgƒAƒbƒv‚𒆎~‚µ‚Ü‚·B + +; *** Startup error messages +LastErrorMessage=%1.%n%nƒGƒ‰[ %2: %3 +SetupFileMissing=ƒtƒ@ƒCƒ‹ %1 ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB–â‘è‚ð‰ðŒˆ‚·‚é‚©V‚µ‚¢ƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€‚ð“üŽè‚µ‚Ä‚­‚¾‚³‚¢B +SetupFileCorrupt=ƒZƒbƒgƒAƒbƒvƒtƒ@ƒCƒ‹‚ª‰ó‚ê‚Ä‚¢‚Ü‚·BV‚µ‚¢ƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€‚ð“üŽè‚µ‚Ä‚­‚¾‚³‚¢B +SetupFileCorruptOrWrongVer=ƒZƒbƒgƒAƒbƒvƒtƒ@ƒCƒ‹‚ª‰ó‚ê‚Ä‚¢‚é‚©A‚±‚̃o[ƒWƒ‡ƒ“‚̃ZƒbƒgƒAƒbƒv‚ƌ݊·«‚ª‚ ‚è‚Ü‚¹‚ñB–â‘è‚ð‰ðŒˆ‚·‚é‚©V‚µ‚¢ƒZƒbƒgƒAƒbƒvƒvƒƒOƒ‰ƒ€‚ð“üŽè‚µ‚Ä‚­‚¾‚³‚¢B +NotOnThisPlatform=‚±‚̃vƒƒOƒ‰ƒ€‚Í %1 ‚Å‚Í“®ì‚µ‚Ü‚¹‚ñB +OnlyOnThisPlatform=‚±‚̃vƒƒOƒ‰ƒ€‚ÌŽÀs‚É‚Í %1 ‚ª•K—v‚Å‚·B +OnlyOnTheseArchitectures=‚±‚̃vƒƒOƒ‰ƒ€‚Í%n%n%1ƒvƒƒZƒbƒTŒü‚¯‚ÌWindows‚É‚µ‚©ƒCƒ“ƒXƒg[ƒ‹‚Å‚«‚Ü‚¹‚ñB +MissingWOW64APIs=‚²Žg—p’†‚Ì64-bit”ÅWindows‚É‚Í‚±‚̃vƒƒOƒ‰ƒ€‚ðƒCƒ“ƒXƒg[ƒ‹‚µA“®ì‚³‚¹‚éˆ×‚É•K—v‚È‹@”\‚ªŠÜ‚Ü‚ê‚Ä‚¢‚Ü‚¹‚ñB‚±‚Ì–â‘è‚ðC³‚·‚éˆ×‚ɂ̓T[ƒrƒXƒpƒbƒN%1‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚­‚¾‚³‚¢B +WinVersionTooLowError=‚±‚̃vƒƒOƒ‰ƒ€‚ÌŽÀs‚É‚Í %1 %2 ˆÈ~‚ª•K—v‚Å‚·B +WinVersionTooHighError=‚±‚̃vƒƒOƒ‰ƒ€‚Í %1 %2 ˆÈ~‚Å‚Í“®ì‚µ‚Ü‚¹‚ñB +AdminPrivilegesRequired=‚±‚̃vƒƒOƒ‰ƒ€‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚邽‚ß‚É‚ÍŠÇ—ŽÒ‚Æ‚µ‚ăƒOƒCƒ“‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B +PowerUserPrivilegesRequired=‚±‚̃vƒƒOƒ‰ƒ€‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚邽‚ß‚É‚ÍŠÇ—ŽÒ‚Ü‚½‚̓pƒ[ƒ†[ƒU[‚Æ‚µ‚ăƒOƒCƒ“‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B +SetupAppRunningError=ƒZƒbƒgƒAƒbƒv‚ÍŽÀs’†‚Ì %1 ‚ðŒŸo‚µ‚Ü‚µ‚½B%n%nŠJ‚¢‚Ä‚¢‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð‚·‚×‚Ä•Â‚¶‚Ä‚©‚çuOKv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢BuƒLƒƒƒ“ƒZƒ‹v‚ðƒNƒŠƒbƒN‚·‚é‚ÆAƒZƒbƒgƒAƒbƒv‚ðI—¹‚µ‚Ü‚·B +UninstallAppRunningError=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ÍŽÀs’†‚Ì %1 ‚ðŒŸo‚µ‚Ü‚µ‚½B%n%nŠJ‚¢‚Ä‚¢‚éƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ð‚·‚×‚Ä•Â‚¶‚Ä‚©‚çuOKv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢BuƒLƒƒƒ“ƒZƒ‹v‚ðƒNƒŠƒbƒN‚·‚é‚ÆAƒZƒbƒgƒAƒbƒv‚ðI—¹‚µ‚Ü‚·B + +; *** Misc. errors +ErrorCreatingDir=ƒfƒBƒŒƒNƒgƒŠ %1 ‚ð쬒†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B +ErrorTooManyFilesInDir=ƒfƒBƒŒƒNƒgƒŠ %1 ‚Ƀtƒ@ƒCƒ‹‚ð쬒†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½Bƒtƒ@ƒCƒ‹‚Ì”‚ª‘½‚·‚¬‚Ü‚·B + +; *** Setup common messages +ExitSetupTitle=ƒZƒbƒgƒAƒbƒvI—¹ +ExitSetupMessage=ƒZƒbƒgƒAƒbƒvì‹Æ‚ÍŠ®—¹‚µ‚Ä‚¢‚Ü‚¹‚ñB‚±‚±‚ŃZƒbƒgƒAƒbƒv‚𒆎~‚·‚é‚ƃvƒƒOƒ‰ƒ€‚̓Cƒ“ƒXƒg[ƒ‹‚³‚ê‚Ü‚¹‚ñB%n%n‰ü‚߂ăCƒ“ƒXƒg[ƒ‹‚·‚éꇂÍA‚à‚¤ˆê“xƒZƒbƒgƒAƒbƒv‚ðŽÀs‚µ‚Ä‚­‚¾‚³‚¢B%n%nƒZƒbƒgƒAƒbƒv‚ðI—¹‚µ‚Ü‚·‚©H +AboutSetupMenuItem=ƒZƒbƒgƒAƒbƒv‚ɂ‚¢‚Ä(&A)... +AboutSetupTitle=ƒZƒbƒgƒAƒbƒv‚ɂ‚¢‚Ä +AboutSetupMessage=%1 %2%n%3%n%n%1 ƒz[ƒ€ƒy[ƒW:%n%4 +AboutSetupNote= +TranslatorNote= + +; *** Buttons +ButtonBack=< –ß‚é(&B) +ButtonNext=ŽŸ‚Ö(&N) > +ButtonInstall=ƒCƒ“ƒXƒg[ƒ‹(&I) +ButtonOK=OK +ButtonCancel=ƒLƒƒƒ“ƒZƒ‹ +ButtonYes=‚Í‚¢(&Y) +ButtonYesToAll=‚·‚ׂĂ͂¢(&A) +ButtonNo=‚¢‚¢‚¦(&N) +ButtonNoToAll=‚·‚ׂĂ¢‚¢‚¦(&O) +ButtonFinish=Š®—¹(&F) +ButtonBrowse=ŽQÆ(&B)... +ButtonWizardBrowse=ŽQÆ(&R) +ButtonNewFolder=V‚µ‚¢ƒtƒHƒ‹ƒ_(&M) + +; *** "Select Language" dialog messages +SelectLanguageTitle=ƒZƒbƒgƒAƒbƒv‚ÉŽg—p‚·‚錾Œê‚Ì‘I‘ð +SelectLanguageLabel=ƒCƒ“ƒXƒg[ƒ‹’†‚É—˜—p‚·‚錾Œê‚ð‘I‚ñ‚Å‚­‚¾‚³‚¢: + +; *** Common wizard text +ClickNext=‘±s‚·‚é‚É‚ÍuŽŸ‚ÖvAƒZƒbƒgƒAƒbƒv‚ðI—¹‚·‚é‚É‚ÍuƒLƒƒƒ“ƒZƒ‹v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +BeveledLabel= +BrowseDialogTitle=ƒtƒHƒ‹ƒ_ŽQÆ +BrowseDialogLabel=ƒŠƒXƒg‚©‚çƒtƒHƒ‹ƒ_‚ð‘I‚ÑOK‚ð‰Ÿ‚µ‚Ä‚­‚¾‚³‚¢B +NewFolderName=V‚µ‚¢ƒtƒHƒ‹ƒ_ + +; *** "Welcome" wizard page +WelcomeLabel1=[name] ƒZƒbƒgƒAƒbƒvƒEƒBƒU[ƒh‚ÌŠJŽn +WelcomeLabel2=‚±‚̃vƒƒOƒ‰ƒ€‚Í‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚Ö [name/ver] ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·B%n%n‘±s‚·‚é‘O‚É‘¼‚̃AƒvƒŠƒP[ƒVƒ‡ƒ“‚ð‚·‚×‚ÄI—¹‚µ‚Ä‚­‚¾‚³‚¢B + +; *** "Password" wizard page +WizardPassword=ƒpƒXƒ[ƒh +PasswordLabel1=‚±‚̃Cƒ“ƒXƒg[ƒ‹ƒvƒƒOƒ‰ƒ€‚̓pƒXƒ[ƒh‚É‚æ‚Á‚ĕی삳‚ê‚Ä‚¢‚Ü‚·B +PasswordLabel3=ƒpƒXƒ[ƒh‚ð“ü—Í‚µ‚ÄuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢BƒpƒXƒ[ƒh‚͑啶Žš‚Ƭ•¶Žš‚ª‹æ•Ê‚³‚ê‚Ü‚·B +PasswordEditLabel=ƒpƒXƒ[ƒh(&P): +IncorrectPassword=“ü—Í‚³‚ꂽƒpƒXƒ[ƒh‚ª³‚µ‚­‚ ‚è‚Ü‚¹‚ñB‚à‚¤ˆê“x“ü—Í‚µ‚È‚¨‚µ‚Ä‚­‚¾‚³‚¢B + +; *** "License Agreement" wizard page +WizardLicense=Žg—p‹–‘øŒ_–ñ‘‚Ì“¯ˆÓ +LicenseLabel=‘±s‚·‚é‘O‚Ɉȉº‚Ìd—v‚Èî•ñ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B +LicenseLabel3=ˆÈ‰º‚ÌŽg—p‹–‘øŒ_–ñ‘‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢BƒCƒ“ƒXƒg[ƒ‹‚ð‘±s‚·‚é‚É‚Í‚±‚ÌŒ_–ñ‘‚É“¯ˆÓ‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B +LicenseAccepted=“¯ˆÓ‚·‚é(&A) +LicenseNotAccepted=“¯ˆÓ‚µ‚È‚¢(&D) + +; *** "Information" wizard pages +WizardInfoBefore=î•ñ +InfoBeforeLabel=‘±s‚·‚é‘O‚Ɉȉº‚Ìd—v‚Èî•ñ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B +InfoBeforeClickLabel=ƒZƒbƒgƒAƒbƒv‚ð‘±s‚·‚é‚É‚ÍuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +WizardInfoAfter=î•ñ +InfoAfterLabel=‘±s‚·‚é‘O‚Ɉȉº‚Ìd—v‚Èî•ñ‚ð‚¨“Ç‚Ý‚­‚¾‚³‚¢B +InfoAfterClickLabel=ƒZƒbƒgƒAƒbƒv‚ð‘±s‚·‚é‚É‚ÍuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B + +; *** "User Information" wizard page +WizardUserInfo=ƒ†[ƒU[î•ñ +UserInfoDesc=ƒ†[ƒU[î•ñ‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B +UserInfoName=ƒ†[ƒU[–¼(&U): +UserInfoOrg=‘gD(&O): +UserInfoSerial=ƒVƒŠƒAƒ‹”Ô†(&S): +UserInfoNameRequired=ƒ†[ƒU[–¼‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B + +; *** "Select Destination Location" wizard page +WizardSelectDir=ƒCƒ“ƒXƒg[ƒ‹æ‚ÌŽw’è +SelectDirDesc=[name] ‚̃Cƒ“ƒXƒg[ƒ‹æ‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B +SelectDirLabel3=[name] ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚éƒtƒHƒ‹ƒ_‚ðŽw’肵‚ÄAuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +SelectDirBrowseLabel=‘±‚¯‚é‚É‚ÍuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B•Ê‚̃tƒHƒ‹ƒ_‚ð‘I‘ð‚·‚é‚É‚ÍuŽQÆv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +DiskSpaceMBLabel=‚±‚̃vƒƒOƒ‰ƒ€‚ÍÅ’á [mb] MB‚̃fƒBƒXƒN‹ó‚«—̈æ‚ð•K—v‚Æ‚µ‚Ü‚·B +ToUNCPathname=ƒZƒbƒgƒAƒbƒv‚ÍUNCƒtƒHƒ‹ƒ_‚ɃCƒ“ƒXƒg[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñBƒlƒbƒgƒ[ƒN‚ɃCƒ“ƒXƒg[ƒ‹‚·‚éꇂ̓lƒbƒgƒ[ƒNƒhƒ‰ƒCƒu‚ÉŠ„‚è“–‚Ä‚Ä‚­‚¾‚³‚¢B +InvalidPath=ƒhƒ‰ƒCƒu•¶Žš‚ðŠÜ‚ÞŠ®‘S‚ȃpƒX‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B%n%n—áFC:\APP%n%n‚Ü‚½‚ÍUNCŒ`Ž®‚̃pƒX‚ð“ü—Í‚µ‚Ä‚­‚¾‚³‚¢B%n%n—áF\\server\share +InvalidDrive=Žw’肵‚½ƒhƒ‰ƒCƒu‚Ü‚½‚ÍUNCƒpƒX‚ªŒ©‚‚©‚ç‚È‚¢‚©ƒAƒNƒZƒX‚Å‚«‚Ü‚¹‚ñB•Ê‚̃pƒX‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B +DiskSpaceWarningTitle=ƒfƒBƒXƒN‹ó‚«—̈æ‚Ì•s‘« +DiskSpaceWarning=ƒCƒ“ƒXƒg[ƒ‹‚É‚ÍÅ’á %1 KB‚̃fƒBƒXƒN‹ó‚«—̈悪•K—v‚Å‚·‚ªAŽw’肳‚ꂽƒhƒ‰ƒCƒu‚É‚Í %2 KB‚̋󂫗̈悵‚©‚ ‚è‚Ü‚¹‚ñB%n%n‚±‚Ì‚Ü‚Ü‘±s‚µ‚Ü‚·‚©H +DirNameTooLong=ƒhƒ‰ƒCƒu–¼‚Ü‚½‚̓pƒX‚ª’·‰ß‚¬‚Ü‚·B +InvalidDirName=ƒtƒHƒ‹ƒ_–¼‚ª–³Œø‚Å‚·B +BadDirName32=ˆÈ‰º‚Ì•¶Žš‚ðŠÜ‚ÞƒtƒHƒ‹ƒ_–¼‚ÍŽw’è‚Å‚«‚Ü‚¹‚ñB:%n%n%1 +DirExistsTitle=Šù‘¶‚̃tƒHƒ‹ƒ_ +DirExists=ƒtƒHƒ‹ƒ_ %n%n%1%n%n‚ªŠù‚É‘¶Ý‚µ‚Ü‚·B‚±‚Ì‚Ü‚Ü‚±‚̃tƒHƒ‹ƒ_‚ÖƒCƒ“ƒXƒg[ƒ‹‚µ‚Ü‚·‚©H +DirDoesntExistTitle=ƒtƒHƒ‹ƒ_‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB +DirDoesntExist=ƒtƒHƒ‹ƒ_ %n%n%1%n%n‚ªŒ©‚‚©‚è‚Ü‚¹‚ñBV‚µ‚¢ƒtƒHƒ‹ƒ_‚ð쬂µ‚Ü‚·‚©H + +; *** "Select Components" wizard page +WizardSelectComponents=ƒRƒ“ƒ|[ƒlƒ“ƒg‚Ì‘I‘ð +SelectComponentsDesc=ƒCƒ“ƒXƒg[ƒ‹ƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B +SelectComponentsLabel2=ƒCƒ“ƒXƒg[ƒ‹‚·‚éƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢BƒCƒ“ƒXƒg[ƒ‹‚·‚é•K—v‚Ì‚È‚¢ƒRƒ“ƒ|[ƒlƒ“ƒg‚̓`ƒFƒbƒN‚ðŠO‚µ‚Ä‚­‚¾‚³‚¢B‘±s‚·‚é‚É‚ÍuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +FullInstallation=ƒtƒ‹ƒCƒ“ƒXƒg[ƒ‹ +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=ƒRƒ“ƒpƒNƒgƒCƒ“ƒXƒg[ƒ‹ +CustomInstallation=ƒJƒXƒ^ƒ€ƒCƒ“ƒXƒg[ƒ‹ +NoUninstallWarningTitle=Šù‘¶‚̃Rƒ“ƒ|[ƒlƒ“ƒg +NoUninstallWarning=ƒZƒbƒgƒAƒbƒv‚͈ȉº‚̃Rƒ“ƒ|[ƒlƒ“ƒg‚ªŠù‚ɃCƒ“ƒXƒg[ƒ‹‚³‚ê‚Ä‚¢‚邱‚Æ‚ðŒŸo‚µ‚Ü‚µ‚½B%n%n%1%n%n‚±‚ê‚ç‚̃Rƒ“ƒ|[ƒlƒ“ƒg‚Ì‘I‘ð‚ð‰ðœ‚µ‚Ä‚àƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚Í‚³‚ê‚Ü‚¹‚ñB%n%n‚±‚Ì‚Ü‚Ü‘±s‚µ‚Ü‚·‚©H +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Œ»Ý‚Ì‘I‘ð‚ÍÅ’á [mb] MB‚̃fƒBƒXƒN‹ó‚«—̈æ‚ð•K—v‚Æ‚µ‚Ü‚·B + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=’ljÁƒ^ƒXƒN‚Ì‘I‘ð +SelectTasksDesc=ŽÀs‚·‚é’ljÁƒ^ƒXƒN‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B +SelectTasksLabel2=[name] ƒCƒ“ƒXƒg[ƒ‹Žž‚ÉŽÀs‚·‚é’ljÁƒ^ƒXƒN‚ð‘I‘ð‚µ‚ÄAuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=ƒvƒƒOƒ‰ƒ€ƒOƒ‹[ƒv‚ÌŽw’è +SelectStartMenuFolderDesc=ƒvƒƒOƒ‰ƒ€ƒAƒCƒRƒ“‚ð쬂·‚éꊂðŽw’肵‚Ä‚­‚¾‚³‚¢B +SelectStartMenuFolderLabel3=ƒZƒbƒgƒAƒbƒv‚̓Xƒ^[ƒgƒƒjƒ…[‚ɃvƒƒOƒ‰ƒ€‚̃Vƒ‡[ƒgƒJƒbƒg‚ð쬂µ‚Ü‚·B +SelectStartMenuFolderBrowseLabel=‘±‚¯‚é‚É‚ÍuŽŸ‚Öv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢Bˆá‚¤ƒfƒBƒŒƒNƒgƒŠ‚ð‘I‘ð‚·‚é‚É‚ÍuŽQÆv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +MustEnterGroupName=ƒOƒ‹[ƒv–¼‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B +GroupNameTooLong=ƒtƒHƒ‹ƒ_–¼‚Ü‚½‚̓pƒX‚ª’·‰ß‚¬‚Ü‚·B +InvalidGroupName=ƒOƒ‹[ƒv–¼‚ª–³Œø‚Å‚·B +BadGroupName=ˆÈ‰º‚Ì•¶Žš‚ðŠÜ‚ÞƒOƒ‹[ƒv–¼‚ÍŽw’è‚Å‚«‚Ü‚¹‚ñB:%n%n%1 +NoProgramGroupCheck2=ƒvƒƒOƒ‰ƒ€ƒOƒ‹[ƒv‚ð쬂µ‚È‚¢(&D) + +; *** "Ready to Install" wizard page +WizardReady=ƒCƒ“ƒXƒg[ƒ‹€”õŠ®—¹ +ReadyLabel1=‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚Ö [name] ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚途õ‚ª‚Å‚«‚Ü‚µ‚½B +ReadyLabel2a=ƒCƒ“ƒXƒg[ƒ‹‚ð‘±s‚·‚é‚É‚ÍuƒCƒ“ƒXƒg[ƒ‹v‚ðAÝ’è‚ÌŠm”F‚â•ÏX‚ðs‚¤‚É‚Íu–ß‚év‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +ReadyLabel2b=ƒCƒ“ƒXƒg[ƒ‹‚ð‘±s‚·‚é‚É‚ÍuƒCƒ“ƒXƒg[ƒ‹v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +ReadyMemoUserInfo=ƒ†[ƒU[î•ñ: +ReadyMemoDir=ƒCƒ“ƒXƒg[ƒ‹æ: +ReadyMemoType=ƒZƒbƒgƒAƒbƒv‚ÌŽí—Þ: +ReadyMemoComponents=‘I‘ðƒRƒ“ƒ|[ƒlƒ“ƒg: +ReadyMemoGroup=ƒvƒƒOƒ‰ƒ€ƒOƒ‹[ƒv: +ReadyMemoTasks=’ljÁƒ^ƒXƒNˆê——: + +; *** "Preparing to Install" wizard page +WizardPreparing=ƒCƒ“ƒXƒg[ƒ‹€”õ’† +PreparingDesc=‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚Ö [name] ‚ðƒCƒ“ƒXƒg[ƒ‹‚·‚途õ‚ð‚µ‚Ä‚¢‚Ü‚·B +PreviousInstallNotCompleted=‘O‰ñs‚Á‚½ƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚̃Cƒ“ƒXƒg[ƒ‹‚Ü‚½‚Í휂ªŠ®—¹‚µ‚Ä‚¢‚Ü‚¹‚ñBŠ®—¹‚·‚é‚ɂ̓Rƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B%n%n[name] ‚̃Cƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚邽‚ß‚É‚ÍAÄ‹N“®Œã‚É‚à‚¤ˆê“xƒZƒbƒgƒAƒbƒv‚ðŽÀs‚µ‚Ä‚­‚¾‚³‚¢B +CannotContinue=ƒZƒbƒgƒAƒbƒv‚ð‘±s‚Å‚«‚Ü‚¹‚ñBuƒLƒƒƒ“ƒZƒ‹v‚ðƒNƒŠƒbƒN‚µ‚ăZƒbƒgƒAƒbƒv‚ðI—¹‚µ‚Ä‚­‚¾‚³‚¢B + +; *** "Installing" wizard page +WizardInstalling=ƒCƒ“ƒXƒg[ƒ‹ó‹µ +InstallingLabel=‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚É [name] ‚ðƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚¢‚Ü‚·B‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=[name] ƒZƒbƒgƒAƒbƒvƒEƒBƒU[ƒh‚ÌŠ®—¹ +FinishedLabelNoIcons=‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚É [name] ‚ªƒZƒbƒgƒAƒbƒv‚³‚ê‚Ü‚µ‚½B +FinishedLabel=‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚É [name] ‚ªƒZƒbƒgƒAƒbƒv‚³‚ê‚Ü‚µ‚½BƒAƒvƒŠƒP[ƒVƒ‡ƒ“‚ðŽÀs‚·‚é‚ɂ̓Cƒ“ƒXƒg[ƒ‹‚³‚ꂽƒAƒCƒRƒ“‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢B +ClickFinish=ƒZƒbƒgƒAƒbƒv‚ðI—¹‚·‚é‚É‚ÍuŠ®—¹v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +FinishedRestartLabel=[name] ‚̃Cƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚邽‚ß‚É‚ÍAƒRƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚·‚®‚ÉÄ‹N“®‚µ‚Ü‚·‚©H +FinishedRestartMessage=[name] ‚̃Cƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚·‚邽‚ß‚É‚ÍAƒRƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B%n%n‚·‚®‚ÉÄ‹N“®‚µ‚Ü‚·‚©H +ShowReadmeCheck=READMEƒtƒ@ƒCƒ‹‚ð•\Ž¦‚·‚éB +YesRadio=‚·‚®Ä‹N“®(&Y) +NoRadio=Œã‚ÅŽè“®‚ÅÄ‹N“®(&N) +; used for example as 'Run MyProg.exe' +RunEntryExec=%1 ‚ÌŽÀs +; used for example as 'View Readme.txt' +RunEntryShellExec=%1 ‚Ì•\Ž¦ + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=ƒfƒBƒXƒN‚Ì‘}“ü +SelectDiskLabel2=ƒfƒBƒXƒN %1 ‚ð‘}“ü‚µAuOKv‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B%n%n‚±‚̃fƒBƒXƒN‚̃tƒ@ƒCƒ‹‚ª‰º‚É•\Ž¦‚³‚ê‚Ä‚¢‚éƒtƒHƒ‹ƒ_ˆÈŠO‚Ìꊂɂ ‚éꇂÍA³‚µ‚¢ƒpƒX‚ð“ü—Í‚·‚é‚©uŽQÆvƒ{ƒ^ƒ“‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +PathLabel=ƒpƒX(&P): +FileNotInDir2=ƒtƒ@ƒCƒ‹ %1 ‚ª %2 ‚ÉŒ©‚‚©‚è‚Ü‚¹‚ñB³‚µ‚¢ƒfƒBƒXƒN‚ð‘}“ü‚·‚é‚©A•Ê‚̃tƒHƒ‹ƒ_‚ðŽw’肵‚Ä‚­‚¾‚³‚¢B +SelectDirectoryLabel=ŽŸ‚̃fƒBƒXƒN‚Ì‚ ‚éꊂðŽw’肵‚Ä‚­‚¾‚³‚¢B + +; *** Installation phase messages +SetupAborted=ƒZƒbƒgƒAƒbƒv‚ÍŠ®—¹‚µ‚Ä‚¢‚Ü‚¹‚ñB%n%n–â‘è‚ð‰ðŒˆ‚µ‚Ä‚©‚çA‚à‚¤ˆê“xƒZƒbƒgƒAƒbƒv‚ðŽÀs‚µ‚Ä‚­‚¾‚³‚¢B +EntryAbortRetryIgnore=‚à‚¤ˆê“x‚â‚è‚È‚¨‚·‚É‚ÍuÄŽŽsvAƒGƒ‰[‚𖳎‹‚µ‚Ä‘±s‚·‚é‚É‚Íu–³Ž‹vAƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚É‚Íu’†Ž~v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B + +; *** Installation status messages +StatusCreateDirs=ƒtƒHƒ‹ƒ_‚ð쬂µ‚Ä‚¢‚Ü‚·... +StatusExtractFiles=ƒtƒ@ƒCƒ‹‚ð“WŠJ‚µ‚Ä‚¢‚Ü‚·... +StatusCreateIcons=ƒVƒ‡|ƒgƒJƒbƒg‚ð쬂µ‚Ä‚¢‚Ü‚·... +StatusCreateIniEntries=INIƒtƒ@ƒCƒ‹‚ðݒ肵‚Ä‚¢‚Ü‚·... +StatusCreateRegistryEntries=ƒŒƒWƒXƒgƒŠ‚ðݒ肵‚Ä‚¢‚Ü‚·... +StatusRegisterFiles=ƒtƒ@ƒCƒ‹‚ð“o˜^‚µ‚Ä‚¢‚Ü‚·... +StatusSavingUninstall=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹î•ñ‚ð•Û‘¶‚µ‚Ä‚¢‚Ü‚·... +StatusRunProgram=ƒCƒ“ƒXƒg[ƒ‹‚ðŠ®—¹‚µ‚Ä‚¢‚Ü‚·... +StatusRollback=•ÏX‚ðŒ³‚É–ß‚µ‚Ä‚¢‚Ü‚·... + +; *** Misc. errors +ErrorInternal2=“à•”ƒGƒ‰[: %1 +ErrorFunctionFailedNoCode=%1 ƒGƒ‰[ +ErrorFunctionFailed=%1 ƒGƒ‰[: ƒR[ƒh %2 +ErrorFunctionFailedWithMessage=%1 ƒGƒ‰[: ƒR[ƒh %2.%n%3 +ErrorExecutingProgram=ƒtƒ@ƒCƒ‹ŽÀsƒGƒ‰[:%n%1 + +; *** Registry errors +ErrorRegOpenKey=ƒŒƒWƒXƒgƒŠƒL[ƒI[ƒvƒ“ƒGƒ‰[:%n%1\%2 +ErrorRegCreateKey=ƒŒƒWƒXƒgƒŠƒL[쬃Gƒ‰[:%n%1\%2 +ErrorRegWriteKey=ƒŒƒWƒXƒgƒŠƒL[‘‚«ž‚݃Gƒ‰[:%n%1\%2 + +; *** INI errors +ErrorIniEntry=INIƒtƒ@ƒCƒ‹ƒGƒ“ƒgƒŠì¬ƒGƒ‰[: ƒtƒ@ƒCƒ‹ %1 + +; *** File copying errors +FileAbortRetryIgnore=‚à‚¤ˆê“x‚â‚è‚È‚¨‚·‚É‚ÍuÄŽŽsvA‚±‚̃tƒ@ƒCƒ‹‚ðƒXƒLƒbƒv‚µ‚Ä‘±s‚·‚é‚É‚Íu–³Ž‹vi„§‚³‚ê‚Ü‚¹‚ñjAƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚É‚Íu’†Ž~v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +FileAbortRetryIgnore2=‚à‚¤ˆê“x‚â‚è‚È‚¨‚·‚É‚ÍuÄŽŽsvA‚±‚̃tƒ@ƒCƒ‹‚ðƒXƒLƒbƒv‚µ‚Ä‘±s‚·‚é‚É‚Íu–³Ž‹vi„§‚³‚ê‚Ü‚¹‚ñjAƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚É‚Íu’†Ž~v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +SourceIsCorrupted=ƒRƒs[Œ³‚̃tƒ@ƒCƒ‹‚ª‰ó‚ê‚Ä‚¢‚Ü‚·B +SourceDoesntExist=ƒRƒs[Œ³‚̃tƒ@ƒCƒ‹ %1 ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñB +ExistingFileReadOnly=Šù‘¶‚̃tƒ@ƒCƒ‹‚Í“Ç‚ÝŽæ‚èê—p‚Å‚·B%n%n“Ç‚ÝŽæ‚èê—p‘®«‚ð‰ðœ‚µ‚Ä‚à‚¤ˆê“x‚â‚è‚È‚¨‚·‚É‚ÍuÄŽŽsvA‚±‚̃tƒ@ƒCƒ‹‚ðƒXƒLƒbƒv‚µ‚Ä‘±s‚·‚é‚É‚Íu–³Ž‹vAƒCƒ“ƒXƒg[ƒ‹‚𒆎~‚·‚é‚É‚Íu’†Ž~v‚ðƒNƒŠƒbƒN‚µ‚Ä‚­‚¾‚³‚¢B +ErrorReadingExistingDest=Šù‘¶‚̃tƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Ý’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +FileExists=ƒtƒ@ƒCƒ‹‚ÍŠù‚É‘¶Ý‚µ‚Ü‚·B%n%nã‘‚«‚µ‚Ü‚·‚©H +ExistingFileNewer=ƒCƒ“ƒXƒg[ƒ‹‚µ‚悤‚Æ‚µ‚Ä‚¢‚éƒtƒ@ƒCƒ‹‚æ‚è‚àV‚µ‚¢ƒtƒ@ƒCƒ‹‚ª‘¶Ý‚µ‚Ü‚·BŠù‘¶‚̃tƒ@ƒCƒ‹‚ðŽc‚·‚±‚Æ‚ð‚¨§‚ß‚µ‚Ü‚·B%n%nŠù‘¶‚̃tƒ@ƒCƒ‹‚ðŽc‚µ‚Ü‚·‚©B +ErrorChangingAttr=Šù‘¶ƒtƒ@ƒCƒ‹‚Ì‘®«‚ð•ÏX’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorCreatingTemp=ƒRƒs[æ‚̃tƒHƒ‹ƒ_‚Ƀtƒ@ƒCƒ‹‚ð쬒†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorReadingSource=ƒRƒs[Œ³‚̃tƒ@ƒCƒ‹‚ð“Ç‚Ýž‚Ý’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorCopying=ƒtƒ@ƒCƒ‹‚ðƒRƒs[’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorReplacingExistingFile=Šù‘¶ƒtƒ@ƒCƒ‹‚ð’u‚«Š·‚¦’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorRestartReplace=’u‚«Š·‚¦ÄŠJ’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorRenamingTemp=ƒRƒs[æƒtƒHƒ‹ƒ_‚̃tƒ@ƒCƒ‹–¼‚ð•ÏX’†‚ɃGƒ‰[‚ª”­¶‚µ‚Ü‚µ‚½B: +ErrorRegisterServer=DLL/OCX‚Ì“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½B: %1 +ErrorRegSvr32Failed=RegSvr32‚̓Gƒ‰[ƒR[ƒh %1 ‚É‚æ‚莸”s‚µ‚Ü‚µ‚½B +ErrorRegisterTypeLib=ƒ^ƒCƒvƒ‰ƒCƒuƒ‰ƒŠ‚Ö‚Ì“o˜^‚ÉŽ¸”s‚µ‚Ü‚µ‚½B: %1 + +; *** Post-installation errors +ErrorOpeningReadme=READMEƒtƒ@ƒCƒ‹‚̃I[ƒvƒ“‚ÉŽ¸”s‚µ‚Ü‚µ‚½B +ErrorRestartingComputer=ƒRƒ“ƒsƒ…[ƒ^‚ÌÄ‹N“®‚ÉŽ¸”s‚µ‚Ü‚µ‚½BŽè“®‚ÅÄ‹N“®‚µ‚Ä‚­‚¾‚³‚¢B + +; *** Uninstaller messages +UninstallNotFound=ƒtƒ@ƒCƒ‹ %1 ‚ªŒ©‚‚©‚è‚Ü‚¹‚ñBƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŽÀs‚Å‚«‚Ü‚¹‚ñB +UninstallOpenError=ƒtƒ@ƒCƒ‹ %1 ‚ðŠJ‚¯‚邱‚Æ‚ª‚Å‚«‚Ü‚¹‚ñBƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŽÀs‚Å‚«‚Ü‚¹‚ñB +UninstallUnsupportedVer=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ƒƒOƒtƒ@ƒCƒ‹ %1 ‚ÍA‚±‚̃o[ƒWƒ‡ƒ“‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹ƒvƒƒOƒ‰ƒ€‚ª”FŽ¯‚Å‚«‚È‚¢Œ`Ž®‚Å‚·BƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŽÀs‚Å‚«‚Ü‚¹‚ñB +UninstallUnknownEntry=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ƒƒO‚É•s–¾‚̃Gƒ“ƒgƒŠ %1 ‚ªŒ©‚‚©‚è‚Ü‚µ‚½B +ConfirmUninstall=%1 ‚Æ‚»‚ÌŠÖ˜AƒRƒ“ƒ|[ƒlƒ“ƒg‚ð‚·‚×‚Ä휂µ‚Ü‚·B‚æ‚낵‚¢‚Å‚·‚©H +UninstallOnlyOnWin64=‚±‚̃vƒƒOƒ‰ƒ€‚Í64-bit”ÅWindowsã‚ł̂݃Aƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚邱‚Æ‚ª‚Å‚«‚Ü‚·B +OnlyAdminCanUninstall=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚邽‚ß‚É‚ÍŠÇ—ŽÒŒ ŒÀ‚ª•K—v‚Å‚·B +UninstallStatusLabel=‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚©‚ç %1 ‚ð휂µ‚Ä‚¢‚Ü‚·B‚µ‚΂炭‚¨‘Ò‚¿‚­‚¾‚³‚¢B +UninstalledAll=%1 ‚Í‚²Žg—p‚̃Rƒ“ƒsƒ…[ƒ^‚©‚ç³í‚É휂³‚ê‚Ü‚µ‚½B +UninstalledMost=%1 ‚̃Aƒ“ƒCƒ“ƒXƒg[ƒ‹‚ªŠ®—¹‚µ‚Ü‚µ‚½B%n%n‚¢‚­‚‚©‚Ì€–Ú‚ªíœ‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½BŽè“®‚Å휂µ‚Ä‚­‚¾‚³‚¢B +UninstalledAndNeedsRestart=%1 ‚Ìíœ‚ðŠ®—¹‚·‚邽‚ß‚É‚ÍAƒRƒ“ƒsƒ…[ƒ^‚ðÄ‹N“®‚·‚é•K—v‚ª‚ ‚è‚Ü‚·B‚·‚®‚ÉÄ‹N“®‚µ‚Ü‚·‚©H +UninstallDataCorrupted=ƒtƒ@ƒCƒ‹ "%1" ‚ª‰ó‚ê‚Ä‚¢‚Ü‚·BƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚ðŽÀs‚Å‚«‚Ü‚¹‚ñB + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=‹¤—Lƒtƒ@ƒCƒ‹‚Ìíœ +ConfirmDeleteSharedFile2=ƒVƒXƒeƒ€ã‚ÅAŽŸ‚Ì‹¤—Lƒtƒ@ƒCƒ‹‚͂ǂ̃vƒƒOƒ‰ƒ€‚Å‚àŽg—p‚³‚ê‚Ä‚¢‚Ü‚¹‚ñB‚±‚Ì‹¤—Lƒtƒ@ƒCƒ‹‚ð휂µ‚Ü‚·‚©H%n%n‘¼‚̃vƒƒOƒ‰ƒ€‚ª‚Ü‚¾‚±‚̃tƒ@ƒCƒ‹‚ðŽg—p‚·‚éê‡A휂·‚é‚ƃvƒƒOƒ‰ƒ€‚ª“®ì‚µ‚È‚­‚È‚é‹°‚ꂪ‚ ‚è‚Ü‚·B‚ ‚Ü‚èŠmŽÀ‚Å‚È‚¢ê‡‚Íu‚¢‚¢‚¦v‚ð‘I‘ð‚µ‚Ä‚­‚¾‚³‚¢BƒVƒXƒeƒ€‚Ƀtƒ@ƒCƒ‹‚ðŽc‚µ‚Ä‚à–â‘è‚ðˆø‚«‹N‚±‚·‚±‚Æ‚Í‚ ‚è‚Ü‚¹‚ñB +SharedFileNameLabel=ƒtƒ@ƒCƒ‹–¼: +SharedFileLocationLabel=êŠ: +WizardUninstalling=ƒAƒ“ƒCƒ“ƒXƒg[ƒ‹ó‹µ +StatusUninstalling=%1 ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚µ‚Ä‚¢‚Ü‚·... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 ƒo[ƒWƒ‡ƒ“ %2 +AdditionalIcons=ƒAƒCƒRƒ“‚ð’ljÁ‚·‚é: +CreateDesktopIcon=ƒfƒXƒNƒgƒbƒvã‚ɃAƒCƒRƒ“‚ð쬂·‚é(&D) +CreateQuickLaunchIcon=ƒNƒCƒbƒN‹N“®ƒAƒCƒRƒ“‚ð쬂·‚é(&Q) +ProgramOnTheWeb=%1 on the Web +UninstallProgram=%1 ‚ðƒAƒ“ƒCƒ“ƒXƒg[ƒ‹‚·‚é +LaunchProgram=%1 ‚ðŽÀs‚·‚é +AssocFileExtension=%2 ƒtƒ@ƒCƒ‹Šg’£‚É %1‚ðŠÖ˜A•t‚¯‚Ü‚·B +AssocingFileExtension=%2 ‚É %1‚ðŠÖ˜A•t‚¯‚Ü‚·B diff --git a/Files/Languages/Norwegian.isl b/Files/Languages/Norwegian.isl new file mode 100644 index 000000000..304935506 --- /dev/null +++ b/Files/Languages/Norwegian.isl @@ -0,0 +1,312 @@ +; *** Inno Setup version 5.1.11+ Norwegian messages *** +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; Norwegian translation by Jostein Christoffer Andersen +; E-mail: jostein@josander.net +; E-mail: thomas.kelso@gmail.com +; Many thanks to the following people for language improvements and comments: +; +; Harald Habberstad, Frode Weum, Eivind Bakkestuen, Morten Johnsen, +; Tore Ottinsen, Kristian Hyllestad, Thomas Kelso +; +; $jrsoftware: issrc/Files/Languages/Norwegian.isl,v 1.15 2007/04/24 09:15:31 mlaan Exp $ + +[LangOptions] +LanguageName=Norsk +LanguageID=$0414 +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Installasjon +SetupWindowTitle=Installere - %1 +UninstallAppTitle=Avinstaller +UninstallAppFullTitle=%1 Avinstallere + +; *** Misc. common +InformationTitle=Informasjon +ConfirmTitle=Bekreft +ErrorTitle=Feil + +; *** SetupLdr messages +SetupLdrStartupMessage=Dette vil installere %1. Vil du fortsette? +LdrCannotCreateTemp=Kan ikke lage midlertidig fil, installasjonen er avbrutt +LdrCannotExecTemp=Kan ikke kjøre fil i den midlertidige mappen, installasjonen er avbrutt + +; *** Startup error messages +LastErrorMessage=%1.%n%nFeil %2: %3 +SetupFileMissing=Filen %1 mangler i installasjonskatalogen. Vennligst korriger problemet eller skaff deg en ny kopi av programmet. +SetupFileCorrupt=Installasjonsfilene er ødelagte. Vennligst skaff deg en ny kopi av programmet. +SetupFileCorruptOrWrongVer=Installasjonsfilene er ødelagte eller ikke kompatible med dette installasjonsprogrammet. Vennligst korriger problemet eller skaff deg en ny kopi av programmet. +NotOnThisPlatform=Dette programmet kjører ikke på %1. +OnlyOnThisPlatform=Dette programmet kjører kun på %1. +OnlyOnTheseArchitectures=Dette programmet kan kun installeres i Windows-versjoner som er beregnet på følgende prossessorarkitekturer:%n%n%1 +MissingWOW64APIs=Din Windows-versjon mangler funksjonalitet for at installasjonsprogrammet skal gjøre en 64-bits-installasjon. Installer Service Pack %1 for å rette på dette. +WinVersionTooLowError=Dette programmet krever %1 versjon %2 eller senere. +WinVersionTooHighError=Dette programmet kan ikke installeres på %1 versjon %2 eller senere. +AdminPrivilegesRequired=Administrator-rettigheter kreves for å installere dette programmet. +PowerUserPrivilegesRequired=Du må være logget inn som administrator eller ha administrator-rettigheter når du installerer dette programmet. +SetupAppRunningError=Installasjonsprogrammet har funnet ut at %1 kjører.%n%nVennligst avslutt det nå og klikk deretter OK for å fortsette, eller Avbryt for å avslutte. +UninstallAppRunningError=Avinstallasjonsprogrammet har funnet ut at %1 kjører.%n%nVennligst avslutt det nå og klikk deretter OK for å fortsette, eller Avbryt for å avslutte. + +; *** Misc. errors +ErrorCreatingDir=Installasjonsprogrammet kunne ikke lage mappen "%1" +ErrorTooManyFilesInDir=Kunne ikke lage en fil i mappen "%1" fordi den inneholder for mange filer + +; *** Setup common messages +ExitSetupTitle=Avslutt installasjonen +ExitSetupMessage=Installasjonen er ikke ferdig. Programmet installeres ikke hvis du avslutter nå.%n%nDu kan installere programmet igjen senere hvis du vil.%n%nVil du avslutte? +AboutSetupMenuItem=&Om installasjonsprogrammet... +AboutSetupTitle=Om installasjonsprogrammet +AboutSetupMessage=%1 versjon %2%n%3%n%n%1 hjemmeside:%n%4 +AboutSetupNote= +TranslatorNote=Norwegian translation maintained by Jostein Chr. Andersen (jostein@josander.net) + +; *** Buttons +ButtonBack=< &Tilbake +ButtonNext=&Neste > +ButtonInstall=&Installér +ButtonOK=OK +ButtonCancel=Avbryt +ButtonYes=&Ja +ButtonYesToAll=Ja til &alle +ButtonNo=&Nei +ButtonNoToAll=N&ei til alle +ButtonFinish=&Ferdig +ButtonBrowse=&Bla gjennom... +ButtonWizardBrowse=&Bla gjennom... +ButtonNewFolder=&Lag ny mappe + +; *** "Select Language" dialog messages +SelectLanguageTitle=Velg installasjonsspråk +SelectLanguageLabel=Velg språket som skal brukes under installasjonen: + +; *** Common wizard text +ClickNext=Klikk på Neste for å fortsette, eller Avbryt for å avslutte installasjonen. +BeveledLabel= +BrowseDialogTitle=Bla etter mappe +BrowseDialogLabel=Velg en mappe fra listen nedenfor, klikk deretter OK. +NewFolderName=Ny mappe + +; *** "Welcome" wizard page +WelcomeLabel1=Velkommen til installasjonsprogrammet for [name]. +WelcomeLabel2=Dette vil installere [name/ver] på din maskin.%n%nDet anbefales at du avslutter alle programmer som kjører før du fortsetter. + +; *** "Password" wizard page +WizardPassword=Passord +PasswordLabel1=Denne installasjonen er passordbeskyttet. +PasswordLabel3=Vennligst oppgi ditt passord og klikk på Neste for å fortsette. Små og store bokstaver behandles ulikt. +PasswordEditLabel=&Passord: +IncorrectPassword=Det angitte passordet er feil, vennligst prøv igjen. + +; *** "License Agreement" wizard page +WizardLicense=Lisensbetingelser +LicenseLabel=Vennligst les følgende lisensinformasjon før du fortsetter. +LicenseLabel3=Vennligst les følgende lisensbetingelser. Du må godta innholdet i lisensbetingelsene før du fortsetter med installasjonen. +LicenseAccepted=Jeg &aksepterer lisensbetingelsene +LicenseNotAccepted=Jeg aksepterer &ikke lisensbetingelsene + +; *** "Information" wizard pages +WizardInfoBefore=Informasjon +InfoBeforeLabel=Vennligst les følgende viktige informasjon før du fortsetter. +InfoBeforeClickLabel=Klikk på Neste når du er klar til å fortsette. +WizardInfoAfter=Informasjon +InfoAfterLabel=Vennligst les følgende viktige informasjon før du fortsetter. +InfoAfterClickLabel=Klikk på Neste når du er klar til å fortsette. + +; *** "User Information" wizard page +WizardUserInfo=Brukerinformasjon +UserInfoDesc=Vennligst angi informasjon. +UserInfoName=&Brukernavn: +UserInfoOrg=&Organisasjon: +UserInfoSerial=&Serienummer: +UserInfoNameRequired=Du må angi et navn. + +; *** "Select Destination Directory" wizard page +WizardSelectDir=Velg mappen hvor filene skal installeres: +SelectDirDesc=Hvor skal [name] installeres? +SelectDirLabel3=Installasjonsprogrammet vil installere [name] i følgende mappe. +SelectDirBrowseLabel=Klikk på Neste for å fortsette. Klikk på Bla gjennom hvis du vil velge en annen mappe. +DiskSpaceMBLabel=Programmet krever minst [mb] MB med diskplass. +ToUNCPathname=Kan ikke installere på en UNC-bane. Du må tilordne nettverksstasjonen hvis du vil installere i et nettverk. +InvalidPath=Du må angi en full bane med stasjonsbokstav, for eksempel:%n%nC:\APP%n%Du kan ikke bruke formen:%n%n\\server\share +InvalidDrive=Den valgte stasjonen eller UNC-delingen finnes ikke, eller er ikke tilgjengelig. Vennligst velg en annen +DiskSpaceWarningTitle=For lite diskplass +DiskSpaceWarning=Installasjonprogrammet krever minst %1 KB med ledig diskplass, men det er bare %2 KB ledig på den valgte stasjonen.%n%nvil du fortsette likevel? +DirNameTooLong=Det er for langt navn på mappen eller banen. +InvalidDirName=Navnet på mappen er ugyldig. +BadDirName32=Mappenavn må ikke inneholde noen av følgende tegn:%n%n%1 +DirExistsTitle=Eksisterende mappe +DirExists=Mappen:%n%n%1%n%nfinnes allerede. Vil du likevel installere der? +DirDoesntExistTitle=Mappen eksisterer ikke +DirDoesntExist=Mappen:%n%n%1%n%nfinnes ikke. Vil du at den skal lages? + +; *** "Select Components" wizard page +WizardSelectComponents=Velg komponenter +SelectComponentsDesc=Hvilke komponenter skal installeres? +SelectComponentsLabel2=Velg komponentene du vil installere; velg bort de komponentene du ikke vil installere. Når du er klar, klikker du på Neste for å fortsette. +FullInstallation=Full installasjon +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Kompakt installasjon +CustomInstallation=Egendefinert installasjon +NoUninstallWarningTitle=Komponenter eksisterer +NoUninstallWarning=Installasjonsprogrammet har funnet ut at følgende komponenter allerede er på din maskin:%n%n%1%n%nDisse komponentene avinstalleres ikke selv om du ikke velger dem.%n%nVil du likevel fortsette? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Valgte alternativer krever minst [mb] MB med diskplass. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Velg tilleggsoppgaver +SelectTasksDesc=Hvilke tilleggsoppgaver skal utføres? +SelectTasksLabel2=Velg tilleggsoppgavene som skal utføres mens [name] installeres, klikk deretter på Neste. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Velg mappe på start-menyen +SelectStartMenuFolderDesc=Hvor skal installasjonsprogrammet plassere snarveiene? +SelectStartMenuFolderLabel3=Installasjonsprogrammet vil opprette snarveier på følgende startmeny-mappe. +SelectStartMenuFolderBrowseLabel=Klikk på Neste for å fortsette. Klikk på Bla igjennom hvis du vil velge en annen mappe. +MustEnterGroupName=Du må skrive inn et mappenavn. +GroupNameTooLong=Det er for langt navn på mappen eller banen. +InvalidGroupName=Navnet på mappen er ugyldig. +BadGroupName=Mappenavnet må ikke inneholde følgende tegn:%n%n%1 +NoProgramGroupCheck2=&Ikke legg til mappe på start-menyen + +; *** "Ready to Install" wizard page +WizardReady=Klar til å installere +ReadyLabel1=Installasjonsprogrammet er nå klar til å installere [name] på din maskin. +ReadyLabel2a=Klikk Installér for å fortsette, eller Tilbake for å se på eller forandre instillingene. +ReadyLabel2b=Klikk Installér for å fortsette. +ReadyMemoUserInfo=Brukerinformasjon: +ReadyMemoDir=Installer i mappen: +ReadyMemoType=Installasjonstype: +ReadyMemoComponents=Valgte komponenter: +ReadyMemoGroup=Programgruppe: +ReadyMemoTasks=Tilleggsoppgaver: + +; *** "Preparing to Install" wizard page +WizardPreparing=Forbereder installasjonen +PreparingDesc=Installasjonsprogrammet forbereder installasjon av [name] på den maskin. +PreviousInstallNotCompleted=Installasjonen/fjerningen av et tidligere program ble ikke ferdig. Du må starte maskinen på nytt.%n%nEtter omstarten må du kjøre installasjonsprogrammet på nytt for å fullføre installasjonen av [name]. +CannotContinue=Installasjonsprogrammet kan ikke fortsette. Klikk på Avbryt for å avslutte. + +; *** "Installing" wizard page +WizardInstalling=Installerer +InstallingLabel=Vennligst vent mens [name] installeres på din maskin. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Fullfører installasjonsprogrammet for [name] +FinishedLabelNoIcons=[name] er installert på din maskin. +FinishedLabel=[name] er installert på din maskin. Programmet kan kjøres ved at du klikker på et av de installerte ikonene. +ClickFinish=Klikk Ferdig for å avslutte installasjonen. +FinishedRestartLabel=Maskinen må startes på nytt for at installasjonen skal fullføres. Vil du starte på nytt nå? +FinishedRestartMessage=Maskinen må startes på nytt for at installasjonen skal fullføres.%n%nVil du starte på nytt nå? +ShowReadmeCheck=Ja, jeg vil se på LESMEG-filen +YesRadio=&Ja, start maskinen på nytt nå +NoRadio=&Nei, jeg vil starte maskinen på nytt senere +; used for example as 'Run MyProg.exe' +RunEntryExec=Kjør %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Se på %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Trenger neste diskett +SelectDiskLabel2=Vennligst sett inn diskett %1 og klikk OK.%n%nHvis filene på finnes et annet sted enn det som er angitt nedenfor, kan du skrive inn korrekt bane eller klikke på Bla Gjennom. +PathLabel=&Bane: +FileNotInDir2=Finner ikke filen "%1" i "%2". Vennligst sett inn riktig diskett eller velg en annen mappe. +SelectDirectoryLabel=Vennligst angi hvor den neste disketten er. + +; *** Installation phase messages +SetupAborted=Installasjonen ble avbrutt.%n%nVennligst korriger problemet og prøv igjen. +EntryAbortRetryIgnore=Klikk Prøv igjen for å forsøke på nytt, Ignorér for å fortsette eller Avslutt for å avslutte installasjonen. + +; *** Installation status messages +StatusCreateDirs=Lager mapper... +StatusExtractFiles=Pakker ut filer... +StatusCreateIcons=Lager programikoner... +StatusCreateIniEntries=Lager INI-instillinger... +StatusCreateRegistryEntries=Lager innstillinger i registeret... +StatusRegisterFiles=Registrerer filer... +StatusSavingUninstall=Lagrer info for avinstallering... +StatusRunProgram=Gjør ferdig installasjonen... +StatusRollback=Tilbakestiller forandringer... + +; *** Misc. errors +ErrorInternal2=Intern feil %1 +ErrorFunctionFailedNoCode=%1 gikk galt +ErrorFunctionFailed=%1 gikk galt; kode %2 +ErrorFunctionFailedWithMessage=%1 gikk galt; kode %2.%n%3 +ErrorExecutingProgram=Kan ikke kjøre filen:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Feil under åpning av registernøkkel:%n%1\%2 +ErrorRegCreateKey=Feil under laging av registernøkkel:%n%1\%2 +ErrorRegWriteKey=Feil under skriving til registernøkkel:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Feil under laging av innstilling i filen "%1". + +; *** File copying errors +FileAbortRetryIgnore=Klikk Prøv igjen for å forsøke på nytt, Ignorer for å overse denne filen (anbefales ikke) eller Avslutt for å stoppe installasjonen. +FileAbortRetryIgnore2=Klikk Prøv igjen for å forsøke på nytt, Ignorer for å fortsette uansett (anbefales ikke) eller Avslutt for å stoppe installasjonen. +SourceIsCorrupted=Kildefilen er ødelagt +SourceDoesntExist=Kildefilen "%1" finnes ikke +ExistingFileReadOnly=Den eksisterende filen er skrivebeskyttet.%n%nKlikk Prøv igjen for å fjerne skrivebeskyttelsen og prøve på nytt, Ignorer for å hoppe over denne filen, eller Avslutt for å stoppe installasjonen. +ErrorReadingExistingDest=En feil oppsto under lesing av den eksisterende filen: +FileExists=Filen eksisterer allerede.%n%nVil du overskrive den? +ExistingFileNewer=Den eksisterende filen er nyere enn den som blir forsøkt installert. Det anbefales at du beholder den eksisterende filen.%n%nVil du beholde den eksisterende filen? +ErrorChangingAttr=En feil oppsto da attributtene ble forsøkt forandret på den eksisterende filen: +ErrorCreatingTemp=En feil oppsto under forsøket på å lage en fil i mål-mappen: +ErrorReadingSource=En feil oppsto under forsøket på å lese kildefilen: +ErrorCopying=En feil oppsto under forsøk på å kopiere en fil: +ErrorReplacingExistingFile=En feil oppsto under forsøket på å erstatte den eksisterende filen: +ErrorRestartReplace=RestartReplace gikk galt: +ErrorRenamingTemp=En feil oppsto under omdøping av fil i mål-mappen: +ErrorRegisterServer=Kan ikke registrere DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 gikk galt med avslutte kode %1 +ErrorRegisterTypeLib=Kan ikke registrere typebiblioteket: %1 + +; *** Post-installation errors +ErrorOpeningReadme=En feil oppsto under forsøket på å åpne LESMEG-filen. +ErrorRestartingComputer=Installasjonsprogrammet kunne ikke starte maskinen på nytt. Vennligst gjør dette manuelt. + +; *** Uninstaller messages +UninstallNotFound=Filen "%1" finnes ikke. Kan ikke avinstallere. +UninstallOpenError=Filen "%1" kunne ikke åpnes. Kan ikke avinstallere. +UninstallUnsupportedVer=Kan ikke avinstallere. Avinstallasjons-loggfilen "%1" har et format som ikke gjenkjennes av denne versjonen av avinstallasjons-programmet +UninstallUnknownEntry=Et ukjent parameter (%1) ble funnet i Avinstallasjons-loggfilen +ConfirmUninstall=Er du sikker på at du helt vil fjerne %1 og alle tilhørende komponenter? +UninstallOnlyOnWin64=Denne installasjonen kan bare uføres på 64-bit Windows. +OnlyAdminCanUninstall=Denne installasjonen kan bare avinstalleres av en bruker med Administrator-rettigheter. +UninstallStatusLabel=Vennligst vent mens %1 fjernes fra maskinen. +UninstalledAll=Avinstallasjonen av %1 var vellykket +UninstalledMost=Avinstallasjonen av %1 er ferdig.%n%nEnkelte elementer kunne ikke fjernes. Disse kan fjernes manuelt. +UninstalledAndNeedsRestart=Du må starte maskinen på nytt for å fullføre installasjonen av %1.%n%nVil du starte på nytt nå? +UninstallDataCorrupted="%1"-filen er ødelagt. Kan ikke avinstallere. + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Fjerne delte filer? +ConfirmDeleteSharedFile2=Systemet indikerer at den følgende filen ikke lengre brukes av andre programmer. Vil du at avinstalleringsprogrammet skal fjerne den delte filen?%n%nHvis andre programmer bruker denne filen, kan du risikere at de ikke lengre vil virke som de skal. Velg Nei hvis du er usikker. Det vil ikke gjøre noen skade hvis denne filen ligger på din maskin. +SharedFileNameLabel=Filnavn: +SharedFileLocationLabel=Plassering: +WizardUninstalling=Avinstallerings-status: +StatusUninstalling=Avinstallerer %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 versjon %2 +AdditionalIcons=Ekstra-ikoner: +CreateDesktopIcon=Lag ikon på &skrivebordet +CreateQuickLaunchIcon=Lag et &Hurtigstarts-ikon +ProgramOnTheWeb=%1 på nettet +UninstallProgram=Avinstaller %1 +LaunchProgram=Kjør %1 +AssocFileExtension=&Koble %1 med filetternavnet %2 +AssocingFileExtension=Kobler %1 med filetternavnet %2... diff --git a/Files/Languages/Polish.isl b/Files/Languages/Polish.isl new file mode 100644 index 000000000..08391e511 --- /dev/null +++ b/Files/Languages/Polish.isl @@ -0,0 +1,309 @@ +; *** Inno Setup version 5.1.11+ Polish messages *** +; Krzysztof Cynarski +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; $jrsoftware: issrc/Files/Languages/Polish.isl,v 1.16 2007/03/09 16:56:52 jr Exp $ + +[LangOptions] +LanguageName=Polski +LanguageID=$0415 +LanguageCodePage=1250 + +[Messages] + +; *** Application titles +SetupAppTitle=Instalator +SetupWindowTitle=Instalacja - %1 +UninstallAppTitle=Deinstalacja +UninstallAppFullTitle=Odinstaluj %1 + +; *** Misc. common +InformationTitle=Informacja +ConfirmTitle=PotwierdŸ +ErrorTitle=B³¹d + +; *** SetupLdr messages +SetupLdrStartupMessage=Ten program zainstaluje aplikacjê %1. Czy chcesz kontynuowaæ? +LdrCannotCreateTemp=Nie mo¿na utworzyæ pliku tymczasowego. Instalacja przerwana +LdrCannotExecTemp=Nie mo¿na uruchomiæ pliku w folderze tymczasowym. Instalacja przerwana + +; *** Startup error messages +LastErrorMessage=%1.%n%nB³¹d %2: %3 +SetupFileMissing=W folderze instalacyjnym brak pliku %1.%nProszê usun¹æ problem lub uzyskaæ now¹ kopiê programu instalacyjnego. +SetupFileCorrupt=Pliki sk³adowe Instalatora s¹ uszkodzone. Proszê uzyskaæ now¹ kopiê Instalatora od producenta. +SetupFileCorruptOrWrongVer=Pliki sk³adowe instalatora s¹ uszkodzone lub niezgodne z t¹ wersj¹ Instalatora. Proszê rozwi¹zaæ ten problem lub uzyskaæ now¹ kopiê Instalatora od producenta. +NotOnThisPlatform=Tego programu nie mo¿na uruchomiæ w systemie %1. +OnlyOnThisPlatform=Ten program wymaga systemu %1. +OnlyOnTheseArchitectures=Ten program mo¿e byæ uruchomiony tylko w systemie Windows zaprojektowanym na procesory o architekturach:%n%n%1 +MissingWOW64APIs=Ta wersja systemu Windows nie zawiera komponentów niezbêdnych do przeprowadzenia 64 bitowej instalacji. Aby usun¹æ ten problem, proszê zainstalowaæ Service Pack %1. +WinVersionTooLowError=Ten program wymaga %1 w wersji %2 lub póŸniejszej. +WinVersionTooHighError=Ten program nie mo¿e byæ zainstalowany w wersji %2 lub póŸniejszej systemu %1. +AdminPrivilegesRequired=Aby przeprowadziæ instalacjê tego programu, U¿ytkownik musi byæ zalogowany z uprawnieniami administratora. +PowerUserPrivilegesRequired=Aby przeprowadziæ instalacjê tego programu, U¿ytkownik musi byæ zalogowany z uprawnieniami administratora lub u¿ytkownika zaawansowanego. +SetupAppRunningError=Instalator wykry³, ¿e %1 jest aktualnie uruchomiony.%n%nZamknij wszystkie okienka tej aplikacji, a potem wybierz przycisk OK, aby kontynuowaæ, lub Anuluj, aby przerwaæ instalacjê. +UninstallAppRunningError=Deinstalator wykry³, ¿e %1 jest aktualnie uruchomiony.%n%nZamknij teraz wszystkie okna tej aplikacji, a nastêpnie wybierz przycisk OK, aby kontynuowaæ, lub Anuluj, aby przerwaæ deinstalacje. + +; *** Misc. errors +ErrorCreatingDir=Instalator nie móg³ utworzyæ foldera "%1" +ErrorTooManyFilesInDir=Nie mo¿na utworzyæ pliku w folderze %1, poniewa¿ zawiera on za du¿o plików + +; *** Setup common messages +ExitSetupTitle=Zakoñcz instalacjê +ExitSetupMessage=Instalacja nie jest zakoñczona. Je¿eli przerwiesz j¹ teraz, program nie zostanie zainstalowany. Mo¿na ponowiæ instalacjê póŸniej, uruchamiaj¹c pakiet Instalatora.%n%nCzy chcesz przerwaæ instalacjê ? +AboutSetupMenuItem=&O Instalatorze... +AboutSetupTitle=O Instalatorze +AboutSetupMessage=%1 wersja %2%n%3%n%n Strona domowa %1:%n%4 +AboutSetupNote= +TranslatorNote=Wersja Polska: Krzysztof Cynarski%n + +; *** Buttons +ButtonBack=< &Wstecz +ButtonNext=&Dalej > +ButtonInstall=&Instaluj +ButtonOK=OK +ButtonCancel=Anuluj +ButtonYes=&Tak +ButtonYesToAll=Tak na &wszystkie +ButtonNo=&Nie +ButtonNoToAll=N&ie na wszystkie +ButtonFinish=&Zakoñcz +ButtonBrowse=&Przegl¹daj... +ButtonWizardBrowse=P&rzegl¹daj... +ButtonNewFolder=&Utwórz nowy folder + +; *** "Select Language" dialog messages +SelectLanguageTitle=Wybierz jêzyk instalacji +SelectLanguageLabel=Wybierz jêzyk u¿ywany podczas instalacji: + +; *** Common wizard text +ClickNext=Wybierz przycisk Dalej, aby kontynuowaæ, lub Anuluj, aby zakoñczyæ instalacjê. +BeveledLabel= +BrowseDialogTitle=Wska¿ folder +BrowseDialogLabel=Wybierz folder z poni¿szej listy, a nastêpnie wybierz przycisk OK. +NewFolderName=Nowy folder + +; *** "Welcome" wizard page +WelcomeLabel1=Witamy w Kreatorze instalacji programu [name]. +WelcomeLabel2=Instalator zainstaluje teraz program [name/ver] na Twoim komputerze.%n%nZalecane jest zamkniêcie wszystkich innych uruchomionych programów przed rozpoczêciem procesu instalacji. + +; *** "Password" wizard page +WizardPassword=Has³o +PasswordLabel1=Ta instalacja jest zabezpieczona has³em. +PasswordLabel3=Podaj has³o, potem wybierz przycisk Dalej, aby kontynuowaæ. W has³ach rozró¿niane s¹ du¿e i ma³e litery. +PasswordEditLabel=&Has³o: +IncorrectPassword=Wprowadzone has³o nie jest poprawne. Spróbuj ponownie. + +; *** "License Agreement" wizard page +WizardLicense=Umowa Licencyjna +LicenseLabel=Przed kontynuacj¹ proszê przeczytaæ poni¿sze wa¿ne informacje. +LicenseLabel3=Proszê przeczytaæ tekst Umowy Licencyjnej. Musisz zgodziæ siê na warunki tej umowy przed kontynuacj¹ instalacji. +LicenseAccepted=&Akceptujê warunki umowy +LicenseNotAccepted=&Nie akceptujê warunków umowy + +; *** "Information" wizard pages +WizardInfoBefore=Informacja +InfoBeforeLabel=Przed przejœciem do dalszego etapu instalacji, proszê przeczytaæ poni¿sz¹ informacjê. +InfoBeforeClickLabel=Kiedy bêdziesz gotowy do instalacji, kliknij przycisk Dalej. +WizardInfoAfter=Informacja +InfoAfterLabel=Przed przejœciem do dalszego etapu instalacji, proszê przeczytaæ poni¿sz¹ informacjê. +InfoAfterClickLabel=Gdy bêdziesz gotowy do zakoñczenia instalacji, kliknij przycisk Dalej. + +; *** "User Information" wizard page +WizardUserInfo=Dane U¿ytkownika +UserInfoDesc=Proszê podaæ swoje dane. +UserInfoName=&Nazwisko: +UserInfoOrg=&Organizacja: +UserInfoSerial=Numer &seryjny: +UserInfoNameRequired=Musisz podaæ nazwisko. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Wybierz docelow¹ lokalizacjê +SelectDirDesc=Gdzie ma byæ zainstalowany program [name]? +SelectDirLabel3=Instalator zainstaluje program [name] do poni¿szego folderu. +SelectDirBrowseLabel=Kliknij przycisk Dalej, aby kontynuowaæ. Jeœli chcesz okreœliæ inny folder, kliknij przycisk Przegl¹daj. +DiskSpaceMBLabel=Potrzeba przynajmniej [mb] MB wolnego miejsca na dysku. +ToUNCPathname=Instalator nie mo¿e instalowaæ do œcie¿ki UNC. Jeœli próbujesz zainstalowaæ program na dysku sieciowym, najpierw zmapuj ten dysk. +InvalidPath=Musisz wprowadziæ pe³n¹ œcie¿kê wraz z liter¹ dysku, np.:%n%nC:\PROGRAM%n%nlub scie¿kê sieciow¹ (UNC) w formacie:%n%n\\serwer\udzia³ +InvalidDrive=Wybrany dysk lub udostêpniony folder sieciowy nie istnieje. Proszê wybraæ inny. +DiskSpaceWarningTitle=Niewystarczaj¹ca iloœæ wolnego miejsca na dysku +DiskSpaceWarning=Instalator wymaga co najmniej %1 KB wolnego miejsca na dysku. Wybrany dysk posiada tylko %2 KB dostêpnego miejsca.%n%nCzy pomimo to chcesz kontynuowaæ? +DirNameTooLong=Nazwa folderu lub œcie¿ki jest za d³uga. +InvalidDirName=Niepoprawna nazwa folderu. +BadDirName32=Nazwa folderu nie mo¿e zawieraæ ¿adnego z nastêpuj¹cych znaków:%n%n%1 +DirExistsTitle=Ten folder ju¿ istnieje +DirExists=Folder%n%n%1%n%nju¿ istnieje. Czy pomimo to chcesz zainstalowaæ program w tym folderze? +DirDoesntExistTitle=Nie ma takiego folderu +DirDoesntExist=Folder:%n%n%1%n%nnie istnieje. Czy chcesz, aby zosta³ utworzony? + +; *** "Select Components" wizard page +WizardSelectComponents=Zaznacz komponenty +SelectComponentsDesc=Które komponenty maj¹ byæ zainstalowane? +SelectComponentsLabel2=Zaznacz komponenty, które chcesz zainstalowaæ, odznacz te, których nie chcesz zainstalowaæ. Kliknij przycisk Dalej, aby kontynuowaæ. +FullInstallation=Instalacja pe³na +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Instalacja podstawowa +CustomInstallation=Instalacja u¿ytkownika +NoUninstallWarningTitle=Zainstalowane komponenty +NoUninstallWarning=Instalator wykry³, ¿e w twoim komputerze s¹ ju¿ zainstalowane nastêpuj¹ce komponenty:%n%n%1%n%nOdznaczenie któregokolwiek z nich nie spowoduje ich deinstalacji.%n%nCzy pomimo tego chcesz kontynuowaæ? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Wybrane komponenty wymagaj¹ co najmniej [mb] MB na dysku. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Zaznacz dodatkowe zadania +SelectTasksDesc=Które dodatkowe zadania maj¹ byæ wykonane? +SelectTasksLabel2=Zaznacz dodatkowe zadania, które Instalator ma wykonaæ podczas instalacji programu [name], a nastêpnie kliknij przycisk Dalej, aby kontynuowaæ. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Wybierz folder Menu Start +SelectStartMenuFolderDesc=Gdzie maj¹ byæ umieszczone skróty do programu? +SelectStartMenuFolderLabel3=Instalator stworzy skróty do programu w poni¿szym folderze Menu Start. +SelectStartMenuFolderBrowseLabel=Kliknij przycisk Dalej, aby kontynuowaæ. Jeœli chcesz okreœliæ inny folder, kliknij przycisk Przegl¹daj. +MustEnterGroupName=Musisz wprowadziæ nazwê folderu. +GroupNameTooLong=Nazwa folderu lub œcie¿ki jest za d³uga. +InvalidGroupName=Niepoprawna nazwa folderu. +BadGroupName=Nazwa folderu nie mo¿e zawieraæ ¿adnego z nastêpuj¹cych znaków:%n%n%1 +NoProgramGroupCheck2=Nie twórz folderu w &Menu Start + +; *** "Ready to Install" wizard page +WizardReady=Gotowy do rozpoczêcia instalacji +ReadyLabel1=Instalator jest ju¿ gotowy do rozpoczêcia instalacji programu [name] na twoim komputerze. +ReadyLabel2a=Kliknij przycisk Instaluj, aby rozpocz¹æ instalacjê lub Wstecz, jeœli chcesz przejrzeæ lub zmieniæ ustawienia. +ReadyLabel2b=Kliknij przycisk Instaluj, aby kontynuowaæ instalacjê. +ReadyMemoUserInfo=Informacje u¿ytkownika: +ReadyMemoDir=Lokalizacja docelowa: +ReadyMemoType=Rodzaj instalacji: +ReadyMemoComponents=Wybrane komponenty: +ReadyMemoGroup=Folder w Menu Start: +ReadyMemoTasks=Dodatkowe zadania: + +; *** "Preparing to Install" wizard page +WizardPreparing=Przygotowanie do instalacji +PreparingDesc=Instalator przygotowuje instalacjê programu [name] na Twoim komputerze. +PreviousInstallNotCompleted=Instalacja (usuniêcie) poprzedniej wersji programu nie zosta³a zakoñczona. Bêdziesz musia³ ponownie uruchomiæ komputer, aby zakoñczyæ instalacjê. %n%nPo ponownym uruchomieniu komputera uruchom ponownie instalatora, aby zakoñczyæ instalacjê aplikacji [name]. +CannotContinue=Instalator nie mo¿e kontynuowaæ. Kliknij przycisk Anuluj, aby przerwaæ instalacjê. + + +; *** "Installing" wizard page +WizardInstalling=Instalacja +InstallingLabel=Poczekaj, a¿ instalator zainstaluje aplikacjê [name] na Twoim komputerze. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Zakoñczono instalacjê programu [name] +FinishedLabelNoIcons=Instalator zakoñczy³ instalacjê programu [name] na Twoim komputerze. +FinishedLabel=Instalator zakoñczy³ instalacjê programu [name] na Twoim komputerze. Aplikacja mo¿e byæ uruchomiona poprzez u¿ycie zainstalowanych skrótów. +ClickFinish=Kliknij przycisk Zakoñcz, aby zakoñczyæ instalacjê. +FinishedRestartLabel=Aby zakoñczyæ instalacjê programu [name], Instalator musi ponownie uruchomiæ Twój komputer. Czy chcesz teraz wykonaæ restart komputera? +FinishedRestartMessage=Aby zakoñczyæ instalacjê programu [name], Instalator musi ponownie uruchomiæ Twój komputer.%n%nCzy chcesz teraz wykonaæ restart komputera? +ShowReadmeCheck=Tak, chcê przeczytaæ dodatkowe informacje +YesRadio=&Tak, teraz uruchom ponownie +NoRadio=&Nie, sam zrestartujê póŸniej +; used for example as 'Run MyProg.exe' +RunEntryExec=Uruchom %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Poka¿ %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Instalator potrzebuje nastêpnej dyskietki +SelectDiskLabel2=Proszê w³o¿yæ dyskietkê %1 i klikn¹æ przycisk OK.%n%nJeœli pokazany poni¿ej folder nie okreœla po³o¿enia plików z tej dyskietki, wprowadŸ poprawn¹ œcie¿kê lub kliknij przycisk Przegl¹daj. +PathLabel=Œ&cie¿ka: +FileNotInDir2=Plik "%1" nie zosta³ znaleziony na dyskietce "%2". Proszê w³o¿yæ w³aœciw¹ dyskietkê lub wybraæ inny folder. +SelectDirectoryLabel=Proszê okreœliæ lokalizacjê nastêpnej dyskietki. + +; *** Installation phase messages +SetupAborted=Instalacja nie zosta³a zakoñczona.%n%nProszê rozwi¹zaæ problem i ponownie rozpocz¹æ instalacjê. +EntryAbortRetryIgnore=Mo¿esz ponowiæ nieudan¹ czynnoœæ, zignorowaæ j¹ (nie zalecane) lub przerwaæ instalacjê. + +; *** Installation status messages +StatusCreateDirs=Tworzenie folderów... +StatusExtractFiles=Dekompresja plików... +StatusCreateIcons=Tworzenie ikon aplikacji... +StatusCreateIniEntries=Tworzenie zapisów w plikach INI... +StatusCreateRegistryEntries=Tworzenie zapisów w rejestrze... +StatusRegisterFiles=Rejestracja plików... +StatusSavingUninstall=Zachowanie informacji deinstalatora... +StatusRunProgram=Koñczenie instalacji... +StatusRollback=Cofanie zmian... + +; *** Misc. errors +ErrorInternal2=Wewnêtrzny b³¹d: %1 +ErrorFunctionFailedNoCode=B³¹d podczas wykonywania %1 +ErrorFunctionFailed=B³¹d podczas wykonywania %1; kod %2 +ErrorFunctionFailedWithMessage=B³¹d podczas wykonywania %1; code %2.%n%3 +ErrorExecutingProgram=Nie mo¿na uruchomiæ:%n%1 + +; *** Registry errors +ErrorRegOpenKey=B³¹d podczas otwierania klucza rejestru:%n%1\%2 +ErrorRegCreateKey=B³¹d podczas tworzenia klucza rejestru:%n%1\%2 +ErrorRegWriteKey=B³¹d podczas zapisu do klucza rejestru:%n%1\%2 + +; *** INI errors +ErrorIniEntry=B³¹d podczas tworzenia pozycji w pliku INI: "%1". + +; *** File copying errors +FileAbortRetryIgnore=Mo¿esz ponowiæ nieudan¹ czynnoœæ, zignorowaæ j¹, aby omin¹æ ten plik (nie zalecane), lub przerwaæ instalacjê. +FileAbortRetryIgnore2=Mo¿esz ponowiæ nieudan¹ czynnoœæ, zignorowaæ j¹ (nie zalecane) lub przerwaæ instalacjê. +SourceIsCorrupted=Plik Ÿród³owy jest uszkodzony +SourceDoesntExist=Plik Ÿród³owy "%1" nie istnieje +ExistingFileReadOnly=Istniej¹cy plik jest oznaczony jako tylko-do-odczytu.%n%nMo¿esz ponowiæ (aby usun¹æ oznaczenie) zignorowaæ (aby omin¹æ ten plik) lub przerwaæ instalacjê. +ErrorReadingExistingDest=Wyst¹pi³ b³¹d podczas próby odczytu istniej¹cego pliku: +FileExists=Plik ju¿ istnieje.%n%nCzy chcesz, aby Instalator zamieni³ go na nowy? +ExistingFileNewer=Istniej¹cy plik jest nowszy ni¿ ten, który Instalator próbuje skopiowaæ. Zalecanym jest zachowanie istniej¹cego pliku.%n%nCzy chcesz zachowaæ istniej¹cy plik? +ErrorChangingAttr=Wyst¹pi³ b³¹d podczas próby zmiany atrybutów docelowego pliku: +ErrorCreatingTemp=Wyst¹pi³ b³¹d podczas próby utworzenia pliku w folderze docelowym: +ErrorReadingSource=Wyst¹pi³ b³¹d podczas próby odczytu pliku Ÿród³owego: +ErrorCopying=Wyst¹pi³ b³¹d podczas próby kopiowania pliku: +ErrorReplacingExistingFile=Wyst¹pi³ b³¹d podczas próby zamiany istniej¹cego pliku: +ErrorRestartReplace=Próba zast¹pienia plików podczas restartu komputera nie powiod³a siê. +ErrorRenamingTemp=Wyst¹pi³ b³¹d podczas próby zmiany nazwy pliku w folderze docelowym: +ErrorRegisterServer=Nie mo¿na zarejestrowaæ DLL/OCX: %1 +ErrorRegSvr32Failed=Funkcja RegSvr32 zakoñczy³a sie z kodem b³êdu %1 +ErrorRegisterTypeLib=Nie mogê zarejestrowaæ biblioteki typów: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Wyst¹pi³ b³¹d podczas próby otwarcia pliku README. +ErrorRestartingComputer=Instalator nie móg³ zrestartowaæ tego komputera. Proszê zrobiæ to samodzielnie. + +; *** Uninstaller messages +UninstallNotFound=Plik "%1" nie istnieje. Nie mo¿na go odinstalowaæ. +UninstallOpenError=Plik "%1" nie móg³ byæ otwarty. Nie mo¿na odinstalowaæ +UninstallUnsupportedVer=Ta wersja programu deinstalacyjnego nie rozpoznaje formatu logu deinstalacji. Nie mo¿na odinstalowaæ +UninstallUnknownEntry=W logu deinstalacji wyst¹pi³a nieznana pozycja (%1) +ConfirmUninstall=Czy na pewno chcesz usun¹æ program %1 i wszystkie jego sk³adniki? +UninstallOnlyOnWin64=Ten program moze byæ odinstalowany tylo w 64 bitowej wersji systemu Windows. +OnlyAdminCanUninstall=Ta instalacja mo¿e byæ odinstalowana tylko przez u¿ytkownika z prawami administratora. +UninstallStatusLabel=Poczekaj a¿ program %1 zostanie usuniêty z Twojego komputera. +UninstalledAll=%1 zosta³ usuniêty z Twojego komputera. +UninstalledMost=Odinstalowywanie programu %1 zakoñczone.%n%nNiektóre elementy nie mog³y byæ usuniête. Mo¿esz je usun¹æ rêcznie. +UninstalledAndNeedsRestart=Twój komputer musi byæ ponownie uruchomiony, aby zakoñczyæ odinstalowywanie %1.%n%nCzy chcesz teraz ponownie uruchomiæ komputer? +UninstallDataCorrupted=Plik "%1" jest uszkodzony. Nie mo¿na odinstalowaæ + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Usun¹æ plik wspó³dzielony? +ConfirmDeleteSharedFile2=System wykry³, ¿e nastêpuj¹cy plik nie jest ju¿ u¿ywany przez ¿aden program. Czy chcesz odinstalowaæ ten plik wspó³dzielony?%n%nJeœli inne programy nadal u¿ywaj¹ tego pliku, a zostanie on usuniêty, mog¹ one przestaæ dzia³aæ prawid³owo. Jeœli nie jesteœ pewny, wybierz przycisk Nie. Pozostawienie tego pliku w Twoim systemie nie spowoduje ¿adnych szkód. +SharedFileNameLabel=Nazwa pliku: +SharedFileLocationLabel=Po³o¿enie: +WizardUninstalling=Stan deinstalacji +StatusUninstalling=Deinstalacja %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 wersja %2 +AdditionalIcons=Dodatkowe ikony: +CreateDesktopIcon=Utwórz ikonê na &pulpicie +CreateQuickLaunchIcon=Utwórz ikonê na pasku &szybkiego uruchamiania +ProgramOnTheWeb=Strona WWW programu %1 +UninstallProgram=Deinstalacja programu %1 +LaunchProgram=Uruchom program %1 +AssocFileExtension=&Przypisz program %1 do rozszerzenia pliku %2 +AssocingFileExtension=Przypisywanie programu %1 do rozszerzenia pliku %2... diff --git a/Files/Languages/Portuguese.isl b/Files/Languages/Portuguese.isl new file mode 100644 index 000000000..8179dfabc --- /dev/null +++ b/Files/Languages/Portuguese.isl @@ -0,0 +1,301 @@ +; *** Inno Setup version 5.1.11+ Portuguese (Portugal) messages *** +; +; Maintained by NARS (nars AT gmx.net) +; +; $jrsoftware: issrc/Files/Languages/Portuguese.isl,v 1.5 2008/02/21 22:56:57 nars Exp $ + +[LangOptions] +LanguageName=Portugu<00EA>s (Portugal) +LanguageID=$0816 +LanguageCodePage=1252 + +[Messages] + +; *** Application titles +SetupAppTitle=Instalação +SetupWindowTitle=%1 - Instalação +UninstallAppTitle=Desinstalação +UninstallAppFullTitle=%1 - Desinstalação + +; *** Misc. common +InformationTitle=Informação +ConfirmTitle=Confirmação +ErrorTitle=Erro + +; *** SetupLdr messages +SetupLdrStartupMessage=Irá ser instalado o %1. Deseja continuar? +LdrCannotCreateTemp=Não foi possível criar um ficheiro temporário. Instalação cancelada +LdrCannotExecTemp=Não foi possível executar um ficheiro na directoria temporária. Instalação cancelada + +; *** Startup error messages +LastErrorMessage=%1.%n%nErro %2: %3 +SetupFileMissing=O ficheiro %1 não foi encontrado na pasta de instalação. Corrija o problema ou obtenha uma nova cópia do programa. +SetupFileCorrupt=Os ficheiros de instalação estão corrompidos. Obtenha uma nova cópia do programa. +SetupFileCorruptOrWrongVer=Os ficheiros de instalação estão corrompidos, ou são incompatíveis com esta versão do Assistente de Instalação. Corrija o problema ou obtenha uma nova cópia do programa. +NotOnThisPlatform=Este programa não pode ser executado no %1. +OnlyOnThisPlatform=Este programa deve ser executado no %1. +OnlyOnTheseArchitectures=Este programa só pode ser instalado em versões do Windows preparadas para as seguintes arquitecturas:%n%n%1 +MissingWOW64APIs=A versão do Windows que está a utilizar não dispõe das funcionalidades necessárias para o Assistente de Instalação poder realizar uma instalação de 64-bit's. Para corrigir este problema, por favor instale o Service Pack %1. +WinVersionTooLowError=Este programa necessita do %1 versão %2 ou mais recente. +WinVersionTooHighError=Este programa não pode ser instalado no %1 versão %2 ou mais recente. +AdminPrivilegesRequired=Deve iniciar sessão como administrador para instalar este programa. +PowerUserPrivilegesRequired=Deve iniciar sessão como administrador ou membro do grupo de Super Utilizadores para instalar este programa. +SetupAppRunningError=O Assistente de Instalação detectou que o %1 está em execução. Feche-o e de seguida clique em OK para continuar, ou clique em Cancelar para cancelar a instalação. +UninstallAppRunningError=O Assistente de Desinstalação detectou que o %1 está em execução. Feche-o e de seguida clique em OK para continuar, ou clique em Cancelar para cancelar a desinstalação. + +; *** Misc. errors +ErrorCreatingDir=O Assistente de Instalação não consegue criar a directoria "%1" +ErrorTooManyFilesInDir=Não é possível criar um ficheiro na directoria "%1" porque esta contém demasiados ficheiros + +; *** Setup common messages +ExitSetupTitle=Terminar a instalação +ExitSetupMessage=A instalação não está completa. Se terminar agora, o programa não será instalado.%n%nMais tarde poderá executar novamente este Assistente de Instalação e concluir a instalação.%n%nDeseja terminar a instalação? +AboutSetupMenuItem=&Acerca de... +AboutSetupTitle=Acerca do Assistente de Instalação +AboutSetupMessage=%1 versão %2%n%3%n%n%1 home page:%n%4 +AboutSetupNote= +TranslatorNote=Portuguese translation maintained by NARS (nars@gmx.net) + +; *** Buttons +ButtonBack=< &Anterior +ButtonNext=&Seguinte > +ButtonInstall=&Instalar +ButtonOK=OK +ButtonCancel=Cancelar +ButtonYes=&Sim +ButtonYesToAll=Sim para &todos +ButtonNo=&Não +ButtonNoToAll=Nã&o para todos +ButtonFinish=&Concluir +ButtonBrowse=&Procurar... +ButtonWizardBrowse=P&rocurar... +ButtonNewFolder=&Criar Nova Pasta + +; *** "Select Language" dialog messages +SelectLanguageTitle=Seleccione o Idioma do Assistente de Instalação +SelectLanguageLabel=Seleccione o idioma para usar durante a Instalação: + +; *** Common wizard text +ClickNext=Clique em Seguinte para continuar ou em Cancelar para cancelar a instalação. +BeveledLabel= +BrowseDialogTitle=Procurar Pasta +BrowseDialogLabel=Seleccione uma pasta na lista abaixo e clique em OK. +NewFolderName=Nova Pasta + +; *** "Welcome" wizard page +WelcomeLabel1=Bem-vindo ao Assistente de Instalação do [name] +WelcomeLabel2=O Assistente de Instalação irá instalar o [name/ver] no seu computador.%n%nÉ recomendado que feche todas as outras aplicações antes de continuar. + +; *** "Password" wizard page +WizardPassword=Palavra-passe +PasswordLabel1=Esta instalação está protegida por palavra-passe. +PasswordLabel3=Insira a palavra-passe e de seguida clique em Seguinte para continuar. Na palavra-passe existe diferença entre maiúsculas e minúsculas. +PasswordEditLabel=&Palavra-passe: +IncorrectPassword=A palavra-passe que introduziu não está correcta. Tente novamente. + +; *** "License Agreement" wizard page +WizardLicense=Contrato de licença +LicenseLabel=É importante que leia as seguintes informações antes de continuar. +LicenseLabel3=Leia atentamente o seguinte contrato de licença. Deve aceitar os termos do contrato antes de continuar a instalação. +LicenseAccepted=A&ceito o contrato +LicenseNotAccepted=&Não aceito o contrato + +; *** "Information" wizard pages +WizardInfoBefore=Informação +InfoBeforeLabel=É importante que leia as seguintes informações antes de continuar. +InfoBeforeClickLabel=Quando estiver pronto para continuar clique em Seguinte. +WizardInfoAfter=Informação +InfoAfterLabel=É importante que leia as seguintes informações antes de continuar. +InfoAfterClickLabel=Quando estiver pronto para continuar clique em Seguinte. + +; *** "User Information" wizard page +WizardUserInfo=Informações do utilizador +UserInfoDesc=Introduza as suas informações. +UserInfoName=Nome do &utilizador: +UserInfoOrg=&Organização: +UserInfoSerial=&Número de série: +UserInfoNameRequired=Deve introduzir um nome. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Seleccione a localização de destino +SelectDirDesc=Onde deverá ser instalado o [name]? +SelectDirLabel3=O [name] será instalado na seguinte pasta. +SelectDirBrowseLabel=Para continuar, clique em Seguinte. Se desejar seleccionar uma pasta diferente, clique em Procurar. +DiskSpaceMBLabel=É necessário pelo menos [mb] MB de espaço livre em disco. +ToUNCPathname=O Assistente de Instalação não pode instalar num caminho do tipo UNC. Se está a tentar fazer a instalação numa rede, precisa de mapear a unidade de rede. +InvalidPath=É necessário indicar o caminho completo com a letra de unidade; por exemplo:%n%nC:\APP%n%nou um caminho UNC no formato:%n%n\\servidor\partilha +InvalidDrive=A unidade ou partilha UNC seleccionada não existe ou não está acessível. Seleccione outra. +DiskSpaceWarningTitle=Não há espaço suficiente no disco +DiskSpaceWarning=O Assistente de Instalação necessita de pelo menos %1 KB de espaço livre, mas a unidade seleccionada tem apenas %2 KB disponíveis.%n%nDeseja continuar de qualquer forma? +DirNameTooLong=O nome ou caminho para a pasta é demasiado longo. +InvalidDirName=O nome da pasta não é válido. +BadDirName32=O nome da pasta não pode conter nenhum dos seguintes caracteres:%n%n%1 +DirExistsTitle=A pasta já existe +DirExists=A pasta:%n%n%1%n%njá existe. Pretende instalar nesta pasta? +DirDoesntExistTitle=A pasta não existe +DirDoesntExist=A pasta:%n%n%1%n%nnão existe. Pretende que esta pasta seja criada? + +; *** "Select Components" wizard page +WizardSelectComponents=Seleccione os componentes +SelectComponentsDesc=Que componentes deverão ser instalados? +SelectComponentsLabel2=Seleccione os componentes que quer instalar e desseleccione os componentes que não quer instalar. Clique em Seguinte quando estiver pronto para continuar. +FullInstallation=Instalação Completa +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Instalação Compacta +CustomInstallation=Instalação Personalizada +NoUninstallWarningTitle=Componentes Encontrados +NoUninstallWarning=O Assistente de Instalação detectou que os seguintes componentes estão instalados no seu computador:%n%n%1%n%nSe desseleccionar estes componentes eles não serão desinstalados.%n%nDeseja continuar? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=A selecção actual necessita de pelo menos [mb] MB de espaço em disco. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Seleccione tarefas adicionais +SelectTasksDesc=Que tarefas adicionais deverão ser executadas? +SelectTasksLabel2=Seleccione as tarefas adicionais que deseja que o Assistente de Instalação execute na instalação do [name] e em seguida clique em Seguinte. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Seleccione a pasta do Menu Iniciar +SelectStartMenuFolderDesc=Onde deverão ser colocados os ícones de atalho do programa? +SelectStartMenuFolderLabel3=Os ícones de atalho do programa serão criados na seguinte pasta do Menu Iniciar. +SelectStartMenuFolderBrowseLabel=Para continuar, clique em Seguinte. Se desejar seleccionar uma pasta diferente, clique em Procurar. +MustEnterGroupName=É necessário introduzir um nome para a pasta. +GroupNameTooLong=O nome ou caminho para a pasta é demasiado longo. +InvalidGroupName=O nome da pasta não é válido. +BadGroupName=O nome da pasta não pode conter nenhum dos seguintes caracteres:%n%n%1 +NoProgramGroupCheck2=&Não criar nenhuma pasta no Menu Iniciar + +; *** "Ready to Install" wizard page +WizardReady=Pronto para Instalar +ReadyLabel1=O Assistente de Instalação está pronto para instalar o [name] no seu computador. +ReadyLabel2a=Clique em Instalar para continuar a instalação, ou clique em Anterior se desejar rever ou alterar alguma das configurações. +ReadyLabel2b=Clique em Instalar para continuar a instalação. +ReadyMemoUserInfo=Informações do utilizador: +ReadyMemoDir=Localização de destino: +ReadyMemoType=Tipo de instalação: +ReadyMemoComponents=Componentes seleccionados: +ReadyMemoGroup=Pasta do Menu Iniciar: +ReadyMemoTasks=Tarefas adicionais: + +; *** "Preparing to Install" wizard page +WizardPreparing=Preparando-se para instalar +PreparingDesc=Preparando-se para instalar o [name] no seu computador. +PreviousInstallNotCompleted=A instalação/remoção de um programa anterior não foi completada. Necessitará de reiniciar o computador para completar essa instalação.%n%nDepois de reiniciar o computador, execute novamente este Assistente de Instalação para completar a instalação do [name]. +CannotContinue=A Instalação não pode continuar. Clique em Cancelar para sair. + +; *** "Installing" wizard page +WizardInstalling=A instalar +InstallingLabel=Aguarde enquanto o Assistente de Instalação instala o [name] no seu computador. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Instalação do [name] concluída +FinishedLabelNoIcons=O Assistente de Instalação concluiu a instalação do [name] no seu computador. +FinishedLabel=O Assistente de Instalação concluiu a instalação do [name] no seu computador. A aplicação pode ser iniciada através dos ícones instalados. +ClickFinish=Clique em Concluir para finalizar o Assistente de Instalação. +FinishedRestartLabel=Para completar a instalação do [name], o Assistente de Instalação deverá reiniciar o seu computador. Deseja reiniciar agora? +FinishedRestartMessage=Para completar a instalação do [name], o Assistente de Instalação deverá reiniciar o seu computador.%n%nDeseja reiniciar agora? +ShowReadmeCheck=Sim, desejo ver o ficheiro LEIAME +YesRadio=&Sim, desejo reiniciar o computador agora +NoRadio=&Não, desejo reiniciar o computador mais tarde +; used for example as 'Run MyProg.exe' +RunEntryExec=Executar %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Visualizar %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=O Assistente de Instalação precisa do disco seguinte +SelectDiskLabel2=Introduza o disco %1 e clique em OK.%n%nSe os ficheiros deste disco estiverem num local diferente do mostrado abaixo, indique o caminho correcto ou clique em Procurar. +PathLabel=&Caminho: +FileNotInDir2=O ficheiro "%1" não foi encontrado em "%2". Introduza o disco correcto ou seleccione outra pasta. +SelectDirectoryLabel=Indique a localização do disco seguinte. + +; *** Installation phase messages +SetupAborted=A instalação não está completa.%n%nCorrija o problema e execute o Assistente de Instalação novamente. +EntryAbortRetryIgnore=Clique em Repetir para tentar novamente, Ignorar para continuar de qualquer forma, ou Abortar para cancelar a instalação. + +; *** Installation status messages +StatusCreateDirs=A criar directorias... +StatusExtractFiles=A extrair ficheiros... +StatusCreateIcons=A criar atalhos... +StatusCreateIniEntries=A criar entradas em INI... +StatusCreateRegistryEntries=A criar entradas no registo... +StatusRegisterFiles=A registar ficheiros... +StatusSavingUninstall=A guardar informações para desinstalação... +StatusRunProgram=A concluir a instalação... +StatusRollback=A anular as alterações... + +; *** Misc. errors +ErrorInternal2=Erro interno: %1 +ErrorFunctionFailedNoCode=%1 falhou +ErrorFunctionFailed=%1 falhou; código %2 +ErrorFunctionFailedWithMessage=%1 falhou; código %2.%n%3 +ErrorExecutingProgram=Não é possível executar o ficheiro:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Erro ao abrir a chave de registo:%n%1\%2 +ErrorRegCreateKey=Erro ao criar a chave de registo:%n%1\%2 +ErrorRegWriteKey=Erro ao escrever na chave de registo:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Erro ao criar entradas em INI no ficheiro "%1". + +; *** File copying errors +FileAbortRetryIgnore=Clique em Repetir para tentar novamente, Ignorar para ignorar este ficheiro (não recomendado), ou Abortar para cancelar a instalação. +FileAbortRetryIgnore2=Clique em Repetir para tentar novamente, Ignorar para continuar de qualquer forma (não recomendado), ou Abortar para cancelar a instalação. +SourceIsCorrupted=O ficheiro de origem está corrompido +SourceDoesntExist=O ficheiro de origem "%1" não existe +ExistingFileReadOnly=O ficheiro existente tem o atributo "só de leitura".%n%nClique em Repetir para remover o atributo "só de leitura" e tentar novamente, Ignorar para ignorar este ficheiro, ou Abortar para cancelar a instalação. +ErrorReadingExistingDest=Ocorreu um erro ao tentar ler o ficheiro existente: +FileExists=O ficheiro já existe.%n%nDeseja substituí-lo? +ExistingFileNewer=O ficheiro existente é mais recente que o que está a ser instalado. É recomendado que mantenha o ficheiro existente.%n%nDeseja manter o ficheiro existente? +ErrorChangingAttr=Ocorreu um erro ao tentar alterar os atributos do ficheiro existente: +ErrorCreatingTemp=Ocorreu um erro ao tentar criar um ficheiro na directoria de destino: +ErrorReadingSource=Ocorreu um erro ao tentar ler o ficheiro de origem: +ErrorCopying=Ocorreu um erro ao tentar copiar um ficheiro: +ErrorReplacingExistingFile=Ocorreu um erro ao tentar substituir o ficheiro existente: +ErrorRestartReplace=RestartReplace falhou: +ErrorRenamingTemp=Ocorreu um erro ao tentar mudar o nome de um ficheiro na directoria de destino: +ErrorRegisterServer=Não é possível registar o DLL/OCX: %1 +ErrorRegSvr32Failed=O RegSvr32 falhou com o código de saída %1 +ErrorRegisterTypeLib=Não foi possível registar a livraria de tipos: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Ocorreu um erro ao tentar abrir o ficheiro LEIAME. +ErrorRestartingComputer=O Assistente de Instalação não consegue reiniciar o computador. Por favor reinicie manualmente. + +; *** Uninstaller messages +UninstallNotFound=O ficheiro "%1" não existe. Não é possível desinstalar. +UninstallOpenError=Não foi possível abrir o ficheiro "%1". Não é possível desinstalar. +UninstallUnsupportedVer=O ficheiro log de desinstalação "%1" está num formato que não é reconhecido por esta versão do desinstalador. Não é possível desinstalar +UninstallUnknownEntry=Foi encontrada uma entrada desconhecida (%1) no ficheiro log de desinstalação +ConfirmUninstall=Tem a certeza que deseja remover completamente o %1 e todos os seus componentes? +UninstallOnlyOnWin64=Esta desinstalação só pode ser realizada na versão de 64-bit's do Windows. +OnlyAdminCanUninstall=Esta desinstalação só pode ser realizada por um utilizador com privilégios administrativos. +UninstallStatusLabel=Por favor aguarde enquanto o %1 está a ser removido do seu computador. +UninstalledAll=O %1 foi removido do seu computador com sucesso. +UninstalledMost=A desinstalação do %1 está concluída.%n%nAlguns elementos não puderam ser removidos. Estes elementos podem ser removidos manualmente. +UninstalledAndNeedsRestart=Para completar a desinstalação do %1, o computador deve ser reiniciado.%n%nDeseja reiniciar agora? +UninstallDataCorrupted=O ficheiro "%1" está corrompido. Não é possível desinstalar + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Remover ficheiro partilhado? +ConfirmDeleteSharedFile2=O sistema indica que o seguinte ficheiro partilhado já não está a ser utilizado por nenhum programa. Deseja removê-lo?%n%nSe algum programa ainda necessitar deste ficheiro, poderá não funcionar correctamente depois de o remover. Se não tiver a certeza, seleccione Não. Manter o ficheiro não causará nenhum problema. +SharedFileNameLabel=Nome do ficheiro: +SharedFileLocationLabel=Localização: +WizardUninstalling=Estado da desinstalação +StatusUninstalling=A desinstalar o %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 versão %2 +AdditionalIcons=Ícones adicionais: +CreateDesktopIcon=Criar ícone no Ambiente de &Trabalho +CreateQuickLaunchIcon=&Criar ícone na barra de Iniciação Rápida +ProgramOnTheWeb=%1 na Web +UninstallProgram=Desinstalar o %1 +LaunchProgram=Executar o %1 +AssocFileExtension=Associa&r o %1 aos ficheiros com a extensão %2 +AssocingFileExtension=A associar o %1 aos ficheiros com a extensão %2... diff --git a/Files/Languages/Russian.isl b/Files/Languages/Russian.isl new file mode 100644 index 000000000..0e0fc52b9 --- /dev/null +++ b/Files/Languages/Russian.isl @@ -0,0 +1,307 @@ +; *** Inno Setup version 5.1.11+ Russian messages *** +; +; Translation was made by Dmitry Kann, http://www.dk-soft.org/ +; The highest accuracy was the first priority. +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; $jrsoftware: issrc/Files/Languages/Russian.isl,v 1.10 2007/02/28 04:38:21 jr Exp $ + +[LangOptions] +LanguageName=<0420><0443><0441><0441><043A><0438><0439> +LanguageID=$0419 +LanguageCodePage=1251 + +[Messages] + +; *** Application titles +SetupAppTitle=Óñòàíîâêà +SetupWindowTitle=Óñòàíîâêà — %1 +UninstallAppTitle=Äåèíñòàëëÿöèÿ +UninstallAppFullTitle=Äåèíñòàëëÿöèÿ — %1 + +; *** Misc. common +InformationTitle=Èíôîðìàöèÿ +ConfirmTitle=Ïîäòâåðæäåíèå +ErrorTitle=Îøèáêà + +; *** SetupLdr messages +SetupLdrStartupMessage=Äàííàÿ ïðîãðàììà óñòàíîâèò %1 íà Âàø êîìïüþòåð, ïðîäîëæèòü? +LdrCannotCreateTemp=Íåâîçìîæíî ñîçäàòü âðåìåííûé ôàéë. Óñòàíîâêà ïðåðâàíà +LdrCannotExecTemp=Íåâîçìîæíî âûïîëíèòü ôàéë âî âðåìåííîì êàòàëîãå. Óñòàíîâêà ïðåðâàíà + +; *** Startup error messages +LastErrorMessage=%1.%n%nÎøèáêà %2: %3 +SetupFileMissing=Ôàéë %1 îòñóòñòâóåò â ïàïêå óñòàíîâêè. Ïîæàëóéñòà, óñòðàíèòå ïðîáëåìó èëè ïîëó÷èòå íîâóþ âåðñèþ ïðîãðàììû. +SetupFileCorrupt=Óñòàíîâî÷íûå ôàéëû ïîâðåæäåíû. Ïîæàëóéñòà, ïîëó÷èòå íîâóþ êîïèþ ïðîãðàììû. +SetupFileCorruptOrWrongVer=Ýòè óñòàíîâî÷íûå ôàéëû ïîâðåæäåíû èëè íåñîâìåñòèìû ñ äàííîé âåðñèåé ïðîãðàììû óñòàíîâêè. Ïîæàëóéñòà, óñòðàíèòå ïðîáëåìó èëè ïîëó÷èòå íîâóþ êîïèþ ïðîãðàììû. +NotOnThisPlatform=Ýòà ïðîãðàììà íå áóäåò ðàáîòàòü â %1. +OnlyOnThisPlatform=Ýòó ïðîãðàììó ìîæíî çàïóñêàòü òîëüêî â %1. +OnlyOnTheseArchitectures=Óñòàíîâêà ýòîé ïðîãðàììû âîçìîæíà òîëüêî â âåðñèÿõ Windows äëÿ ñëåäóþùèõ àðõèòåêòóð ïðîöåññîðîâ:%n%n%1 +MissingWOW64APIs= âåðñèè Windows, â êîòîðîé Âû ðàáîòàåòå, îòñóòñòâóþò ôóíêöèè, íåîáõîäèìûå äëÿ âûïîëíåíèÿ 64-áèòíîé óñòàíîâêè. ×òîáû óñòðàíèòü ýòó ïðîáëåìó, Âàì íåîáõîäèìî óñòàíîâèòü ïàêåò îáíîâëåíèÿ (Service Pack) %1. +WinVersionTooLowError=Ýòà ïðîãðàììà òðåáóåò %1 âåðñèè %2 èëè âûøå. +WinVersionTooHighError=Ïðîãðàììà íå ìîæåò áûòü óñòàíîâëåíà â %1 âåðñèè %2 èëè âûøå. +AdminPrivilegesRequired=×òîáû óñòàíîâèòü äàííóþ ïðîãðàììó, Âû äîëæíû âûïîëíèòü âõîä â ñèñòåìó êàê Àäìèíèñòðàòîð. +PowerUserPrivilegesRequired=×òîáû óñòàíîâèòü ýòó ïðîãðàììó, Âû äîëæíû âûïîëíèòü âõîä â ñèñòåìó êàê Àäìèíèñòðàòîð èëè ÷ëåí ãðóïïû «Îïûòíûå ïîëüçîâàòåëè» (Power Users). +SetupAppRunningError=Îáíàðóæåí çàïóùåííûé ýêçåìïëÿð %1.%n%nÏîæàëóéñòà, çàêðîéòå âñå ýêçåìïëÿðû ïðèëîæåíèÿ, çàòåì íàæìèòå «OK», ÷òîáû ïðîäîëæèòü, èëè «Îòìåíà», ÷òîáû âûéòè. +UninstallAppRunningError=Äåèíñòàëëÿòîð îáíàðóæèë çàïóùåííûé ýêçåìïëÿð %1.%n%nÏîæàëóéñòà, çàêðîéòå âñå ýêçåìïëÿðû ïðèëîæåíèÿ, çàòåì íàæìèòå «OK», ÷òîáû ïðîäîëæèòü, èëè «Îòìåíà», ÷òîáû âûéòè. + +; *** Misc. errors +ErrorCreatingDir=Íåâîçìîæíî ñîçäàòü ïàïêó "%1" +ErrorTooManyFilesInDir=Íåâîçìîæíî ñîçäàòü ôàéë â êàòàëîãå "%1", òàê êàê â í¸ì ñëèøêîì ìíîãî ôàéëîâ + +; *** Setup common messages +ExitSetupTitle=Âûõîä èç ïðîãðàììû óñòàíîâêè +ExitSetupMessage=Óñòàíîâêà íå çàâåðøåíà. Åñëè Âû âûéäåòå, ïðîãðàììà íå áóäåò óñòàíîâëåíà.%n%nÂû ñìîæåòå çàâåðøèòü óñòàíîâêó, çàïóñòèâ ïðîãðàììó óñòàíîâêè ïîçæå.%n%nÂûéòè èç ïðîãðàììû óñòàíîâêè? +AboutSetupMenuItem=&Î ïðîãðàììå... +AboutSetupTitle=Î ïðîãðàììå +AboutSetupMessage=%1, âåðñèÿ %2%n%3%n%nÑàéò %1:%n%4 +AboutSetupNote= +TranslatorNote=Russian translation by Dmitry Kann, http://www.dk-soft.org/ + +; *** Buttons +ButtonBack=< &Íàçàä +ButtonNext=&Äàëåå > +ButtonInstall=&Óñòàíîâèòü +ButtonOK=OK +ButtonCancel=Îòìåíà +ButtonYes=&Äà +ButtonYesToAll=Äà äëÿ &Âñåõ +ButtonNo=&Íåò +ButtonNoToAll=Í&åò äëÿ Âñåõ +ButtonFinish=&Çàâåðøèòü +ButtonBrowse=&Îáçîð... +ButtonWizardBrowse=&Îáçîð... +ButtonNewFolder=&Ñîçäàòü ïàïêó + +; *** "Select Language" dialog messages +SelectLanguageTitle=Âûáåðèòå ÿçûê óñòàíîâêè +SelectLanguageLabel=Âûáåðèòå ÿçûê, êîòîðûé áóäåò èñïîëüçîâàí â ïðîöåññå óñòàíîâêè: + +; *** Common wizard text +ClickNext=Íàæìèòå «Äàëåå», ÷òîáû ïðîäîëæèòü, èëè «Îòìåíà», ÷òîáû âûéòè èç ïðîãðàììû óñòàíîâêè. +BeveledLabel= +BrowseDialogTitle=Îáçîð ïàïîê +BrowseDialogLabel=Âûáåðèòå ïàïêó èç ñïèñêà è íàæìèòå «ÎÊ». +NewFolderName=Íîâàÿ ïàïêà + +; *** "Welcome" wizard page +WelcomeLabel1=Âàñ ïðèâåòñòâóåò Ìàñòåð óñòàíîâêè [name] +WelcomeLabel2=Ïðîãðàììà óñòàíîâèò [name/ver] íà Âàø êîìïüþòåð.%n%nÐåêîìåíäóåòñÿ çàêðûòü âñå ïðî÷èå ïðèëîæåíèÿ ïåðåä òåì, êàê ïðîäîëæèòü. + +; *** "Password" wizard page +WizardPassword=Ïàðîëü +PasswordLabel1=Ýòà ïðîãðàììà çàùèùåíà ïàðîëåì. +PasswordLabel3=Ïîæàëóéñòà, íàáåðèòå ïàðîëü, ïîòîì íàæìèòå «Äàëåå». Ïàðîëè íåîáõîäèìî ââîäèòü ñ ó÷¸òîì ðåãèñòðà. +PasswordEditLabel=&Ïàðîëü: +IncorrectPassword=Ââåäåííûé Âàìè ïàðîëü íåâåðåí. Ïîæàëóéñòà, ïîïðîáóéòå ñíîâà. + +; *** "License Agreement" wizard page +WizardLicense=Ëèöåíçèîííîå Ñîãëàøåíèå +LicenseLabel=Ïîæàëóéñòà, ïðî÷òèòå ñëåäóþùóþ âàæíóþ èíôîðìàöèþ ïåðåä òåì, êàê ïðîäîëæèòü. +LicenseLabel3=Ïîæàëóéñòà, ïðî÷òèòå ñëåäóþùåå Ëèöåíçèîííîå Ñîãëàøåíèå. Âû äîëæíû ïðèíÿòü óñëîâèÿ ýòîãî ñîãëàøåíèÿ ïåðåä òåì, êàê ïðîäîëæèòü. +LicenseAccepted=ß &ïðèíèìàþ óñëîâèÿ ñîãëàøåíèÿ +LicenseNotAccepted=ß &íå ïðèíèìàþ óñëîâèÿ ñîãëàøåíèÿ + +; *** "Information" wizard pages +WizardInfoBefore=Èíôîðìàöèÿ +InfoBeforeLabel=Ïîæàëóéñòà, ïðî÷èòàéòå ñëåäóþùóþ âàæíóþ èíôîðìàöèþ ïåðåä òåì, êàê ïðîäîëæèòü. +InfoBeforeClickLabel=Êîãäà Âû áóäåòå ãîòîâû ïðîäîëæèòü óñòàíîâêó, íàæìèòå «Äàëåå». +WizardInfoAfter=Èíôîðìàöèÿ +InfoAfterLabel=Ïîæàëóéñòà ïðî÷èòàéòå ñëåäóþùóþ âàæíóþ èíôîðìàöèþ ïåðåä òåì, êàê ïðîäîëæèòü. +InfoAfterClickLabel=Êîãäà Âû áóäåòå ãîòîâû ïðîäîëæèòü óñòàíîâêó, íàæìèòå «Äàëåå». + +; *** "User Information" wizard page +WizardUserInfo=Èíôîðìàöèÿ î ïîëüçîâàòåëå +UserInfoDesc=Ïîæàëóéñòà, ââåäèòå äàííûå î ñåáå. +UserInfoName=&Èìÿ è ôàìèëèÿ ïîëüçîâàòåëÿ: +UserInfoOrg=&Îðãàíèçàöèÿ: +UserInfoSerial=&Ñåðèéíûé íîìåð: +UserInfoNameRequired=Âû äîëæíû ââåñòè èìÿ. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Âûáîð ïàïêè óñòàíîâêè +SelectDirDesc= êàêóþ ïàïêó Âû õîòèòå óñòàíîâèòü [name]? +SelectDirLabel3=Ïðîãðàììà óñòàíîâèò [name] â ñëåäóþùóþ ïàïêó. +SelectDirBrowseLabel=Íàæìèòå «Äàëåå», ÷òîáû ïðîäîëæèòü. Åñëè Âû õîòèòå âûáðàòü äðóãóþ ïàïêó, íàæìèòå «Îáçîð». +DiskSpaceMBLabel=Òðåáóåòñÿ êàê ìèíèìóì [mb] Ìá ñâîáîäíîãî äèñêîâîãî ïðîñòðàíñòâà. +ToUNCPathname=Óñòàíîâêà íå ìîæåò âûïîëíÿòüñÿ â ïàïêó ïî å¸ ñåòåâîìó èìåíè. Åñëè Âû óñòàíàâëèâàåòå â ñåòåâóþ ïàïêó, Âû äîëæíû ïîäêëþ÷èòü å¸ â âèäå ñåòåâîãî äèñêà. +InvalidPath=Âû äîëæíû óêàçàòü ïîëíûé ïóòü ñ áóêâîé äèñêà; íàïðèìåð:%n%nC:\APP%n%nèëè â ôîðìå UNC:%n%n\\èìÿ_ñåðâåðà\èìÿ_ðåñóðñà +InvalidDrive=Âûáðàííûé Âàìè äèñê èëè ñåòåâîé ïóòü íå ñóùåñòâóþò èëè íåäîñòóïíû. Ïîæàëóéñòà, âûáåðèòå äðóãîé. +DiskSpaceWarningTitle=Íåäîñòàòî÷íî ìåñòà íà äèñêå +DiskSpaceWarning=Óñòàíîâêà òðåáóåò íå ìåíåå %1 Êá ñâîáîäíîãî ìåñòà, à íà âûáðàííîì Âàìè äèñêå äîñòóïíî òîëüêî %2 Êá.%n%nÂû æåëàåòå òåì íå ìåíåå ïðîäîëæèòü óñòàíîâêó? +DirNameTooLong=Èìÿ ïàïêè èëè ïóòü ê íåé ïðåâûøàþò äîïóñòèìóþ äëèíó. +InvalidDirName=Óêàçàííîå èìÿ ïàïêè íåäîïóñòèìî. +BadDirName32=Èìÿ ïàïêè íå ìîæåò ñîäåðæàòü ñèìâîëîâ: %n%n%1 +DirExistsTitle=Ïàïêà ñóùåñòâóåò +DirExists=Ïàïêà%n%n%1%n%nóæå ñóùåñòâóåò. Âñ¸ ðàâíî óñòàíîâèòü â ýòó ïàïêó? +DirDoesntExistTitle=Ïàïêà íå ñóùåñòâóåò +DirDoesntExist=Ïàïêà%n%n%1%n%níå ñóùåñòâóåò. Âû õîòèòå ñîçäàòü å¸? + +; *** "Select Components" wizard page +WizardSelectComponents=Âûáîð êîìïîíåíòîâ +SelectComponentsDesc=Êàêèå êîìïîíåíòû äîëæíû áûòü óñòàíîâëåíû? +SelectComponentsLabel2=Âûáåðèòå êîìïîíåíòû, êîòîðûå Âû õîòèòå óñòàíîâèòü; ñíèìèòå ôëàæêè ñ êîìïîíåíòîâ, óñòàíàâëèâàòü êîòîðûå íå òðåáóåòñÿ. Íàæìèòå «Äàëåå», êîãäà Âû áóäåòå ãîòîâû ïðîäîëæèòü. +FullInstallation=Ïîëíàÿ óñòàíîâêà +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Êîìïàêòíàÿ óñòàíîâêà +CustomInstallation=Âûáîðî÷íàÿ óñòàíîâêà +NoUninstallWarningTitle=Óñòàíîâëåííûå êîìïîíåíòû +NoUninstallWarning=Ïðîãðàììà óñòàíîâêè îáíàðóæèëà, ÷òî ñëåäóþùèå êîìïîíåíòû óæå óñòàíîâëåíû íà Âàøåì êîìïüþòåðå:%n%n%1%n%nÎòìåíà âûáîðà ýòèõ êîìïîíåíò íå óäàëèò èõ.%n%nÏðîäîëæèòü? +ComponentSize1=%1 Êá +ComponentSize2=%1 Ìá +ComponentsDiskSpaceMBLabel=Òåêóùèé âûáîð òðåáóåò íå ìåíåå [mb] Ìá íà äèñêå. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Âûáåðèòå äîïîëíèòåëüíûå çàäà÷è +SelectTasksDesc=Êàêèå äîïîëíèòåëüíûå çàäà÷è íåîáõîäèìî âûïîëíèòü? +SelectTasksLabel2=Âûáåðèòå äîïîëíèòåëüíûå çàäà÷è, êîòîðûå äîëæíû âûïîëíèòüñÿ ïðè óñòàíîâêå [name], ïîñëå ýòîãî íàæìèòå «Äàëåå»: + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Âûáåðèòå ïàïêó â ìåíþ «Ïóñê» +SelectStartMenuFolderDesc=Ãäå ïðîãðàììà óñòàíîâêè äîëæíà ñîçäàòü ÿðëûêè? +SelectStartMenuFolderLabel3=Ïðîãðàììà ñîçäàñò ÿðëûêè â ñëåäóþùåé ïàïêå ìåíþ «Ïóñê». +SelectStartMenuFolderBrowseLabel=Íàæìèòå «Äàëåå», ÷òîáû ïðîäîëæèòü. Åñëè Âû õîòèòå âûáðàòü äðóãóþ ïàïêó, íàæìèòå «Îáçîð». +MustEnterGroupName=Âû äîëæíû ââåñòè èìÿ ïàïêè. +GroupNameTooLong=Èìÿ ïàïêè ãðóïïû èëè ïóòü ê íåé ïðåâûøàþò äîïóñòèìóþ äëèíó. +InvalidGroupName=Óêàçàííîå èìÿ ïàïêè íåäîïóñòèìî. +BadGroupName=Èìÿ ïàïêè íå ìîæåò ñîäåðæàòü ñèìâîëîâ:%n%n%1 +NoProgramGroupCheck2=&Íå ñîçäàâàòü ïàïêó â ìåíþ «Ïóñê» + +; *** "Ready to Install" wizard page +WizardReady=Âñ¸ ãîòîâî ê óñòàíîâêå +ReadyLabel1=Ïðîãðàììà óñòàíîâêè ãîòîâà íà÷àòü óñòàíîâêó [name] íà Âàø êîìïüþòåð. +ReadyLabel2a=Íàæìèòå «Óñòàíîâèòü», ÷òîáû ïðîäîëæèòü, èëè «Íàçàä», åñëè Âû õîòèòå ïðîñìîòðåòü èëè èçìåíèòü îïöèè óñòàíîâêè. +ReadyLabel2b=Íàæìèòå «Óñòàíîâèòü», ÷òîáû ïðîäîëæèòü. +ReadyMemoUserInfo=Èíôîðìàöèÿ î ïîëüçîâàòåëå: +ReadyMemoDir=Ïàïêà óñòàíîâêè: +ReadyMemoType=Òèï óñòàíîâêè: +ReadyMemoComponents=Âûáðàííûå êîìïîíåíòû: +ReadyMemoGroup=Ïàïêà â ìåíþ «Ïóñê»: +ReadyMemoTasks=Äîïîëíèòåëüíûå çàäà÷è: + +; *** "Preparing to Install" wizard page +WizardPreparing=Ïîäãîòîâêà ê óñòàíîâêå +PreparingDesc=Ïðîãðàììà óñòàíîâêè ïîäãîòàâëèâàåòñÿ ê óñòàíîâêå [name] íà Âàø êîìïüþòåð. +PreviousInstallNotCompleted=Óñòàíîâêà èëè óäàëåíèå ïðåäûäóùåé ïðîãðàììû íå áûëè çàâåðøåíû. Âàì ïîòðåáóåòñÿ ïåðåçàãðóçèòü Âàø êîìïüþòåð, ÷òîáû çàâåðøèòü òó óñòàíîâêó.%n%nÏîñëå ïåðåçàãðóçêè çàïóñòèòå âíîâü Ïðîãðàììó óñòàíîâêè, ÷òîáû çàâåðøèòü óñòàíîâêó [name]. +CannotContinue=Íåâîçìîæíî ïðîäîëæèòü óñòàíîâêó. Íàæìèòå «Îòìåíà» äëÿ âûõîäà èç ïðîãðàììû. + +; *** "Installing" wizard page +WizardInstalling=Óñòàíîâêà... +InstallingLabel=Ïîæàëóéñòà, ïîäîæäèòå, ïîêà [name] óñòàíîâèòñÿ íà Âàø êîìïüþòåð. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Çàâåðøåíèå Ìàñòåðà óñòàíîâêè [name] +FinishedLabelNoIcons=Ïðîãðàììà [name] óñòàíîâëåíà íà Âàø êîìïüþòåð. +FinishedLabel=Ïðîãðàììà [name] óñòàíîâëåíà íà Âàø êîìïüþòåð. Ïðèëîæåíèå ìîæíî çàïóñòèòü ñ ïîìîùüþ ñîîòâåòñòâóþùåãî çíà÷êà. +ClickFinish=Íàæìèòå «Çàâåðøèòü», ÷òîáû âûéòè èç ïðîãðàììû óñòàíîâêè. +FinishedRestartLabel=Äëÿ çàâåðøåíèÿ óñòàíîâêè [name] òðåáóåòñÿ ïåðåçàãðóçèòü êîìïüþòåð. Ïðîèçâåñòè ïåðåçàãðóçêó ñåé÷àñ? +FinishedRestartMessage=Äëÿ çàâåðøåíèÿ óñòàíîâêè [name] òðåáóåòñÿ ïåðåçàãðóçèòü êîìïüþòåð.%n%nÏðîèçâåñòè ïåðåçàãðóçêó ñåé÷àñ? +ShowReadmeCheck=ß õî÷ó ïðîñìîòðåòü ôàéë README +YesRadio=&Äà, ïåðåçàãðóçèòü êîìïüþòåð ñåé÷àñ +NoRadio=&Íåò, ÿ ïðîèçâåäó ïåðåçàãðóçêó ïîçæå +; used for example as 'Run MyProg.exe' +RunEntryExec=Çàïóñòèòü %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Ïðîñìîòðåòü %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Íåîáõîäèìî âñòàâèòü ñëåäóþùèé äèñê +SelectDiskLabel2=Ïîæàëóéñòà, âñòàâüòå äèñê %1 è íàæìèòå «OK».%n%nÅñëè ôàéëû ýòîãî äèñêà ìîãóò áûòü íàéäåíû â ïàïêå, îòëè÷àþùåéñÿ îò ïîêàçàííîé íèæå, ââåäèòå ïðàâèëüíûé ïóòü èëè íàæìèòå «Îáçîð». +PathLabel=&Ïóòü: +FileNotInDir2=Ôàéë "%1" íå íàéäåí â "%2". Ïîæàëóéñòà, âñòàâüòå ïðàâèëüíûé äèñê èëè âûáåðèòå äðóãóþ ïàïêó. +SelectDirectoryLabel=Ïîæàëóéñòà, óêàæèòå ïóòü ê ñëåäóþùåìó äèñêó. + +; *** Installation phase messages +SetupAborted=Óñòàíîâêà íå áûëà çàâåðøåíà.%n%nÏîæàëóéñòà, óñòðàíèòå ïðîáëåìó è çàïóñòèòå óñòàíîâêó ñíîâà. +EntryAbortRetryIgnore=Íàæìèòå «Ïîâòîð», ÷òîáû ïîâòîðèòü ïîïûòêó, «Ïðîïóñòèòü», ÷òîáû ïðîïóñòèòü ôàéë, èëè «Îòêàç» äëÿ îòìåíû óñòàíîâêè. + +; *** Installation status messages +StatusCreateDirs=Ñîçäàíèå ïàïîê... +StatusExtractFiles=Ðàñïàêîâêà ôàéëîâ... +StatusCreateIcons=Ñîçäàíèå ÿðëûêîâ ïðîãðàììû... +StatusCreateIniEntries=Ñîçäàíèå INI-ôàéëîâ... +StatusCreateRegistryEntries=Ñîçäàíèå çàïèñåé ðååñòðà... +StatusRegisterFiles=Ðåãèñòðàöèÿ ôàéëîâ... +StatusSavingUninstall=Ñîõðàíåíèå èíôîðìàöèè äëÿ äåèíñòàëëÿöèè... +StatusRunProgram=Çàâåðøåíèå óñòàíîâêè... +StatusRollback=Îòêàò èçìåíåíèé... + +; *** Misc. errors +ErrorInternal2=Âíóòðåííÿÿ îøèáêà: %1 +ErrorFunctionFailedNoCode=%1: ñáîé +ErrorFunctionFailed=%1: ñáîé; êîä %2 +ErrorFunctionFailedWithMessage=%1: ñáîé; êîä %2.%n%3 +ErrorExecutingProgram=Íåâîçìîæíî âûïîëíèòü ôàéë:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Îøèáêà îòêðûòèÿ êëþ÷à ðååñòðà:%n%1\%2 +ErrorRegCreateKey=Îøèáêà ñîçäàíèÿ êëþ÷à ðååñòðà:%n%1\%2 +ErrorRegWriteKey=Îøèáêà çàïèñè â êëþ÷ ðååñòðà:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Îøèáêà ñîçäàíèÿ çàïèñè â INI-ôàéëå "%1". + +; *** File copying errors +FileAbortRetryIgnore=Íàæìèòå «Ïîâòîð», ÷òîáû ïîâòîðèòü, «Ïðîïóñòèòü», ÷òîáû ïðîïóñòèòü ôàéë (íå ðåêîìåíäóåòñÿ) èëè «Îòêàç» äëÿ âûõîäà. +FileAbortRetryIgnore2=Íàæìèòå «Ïîâòîð», ÷òîáû ïîâòîðèòü, «Ïðîïóñòèòü», ÷òîáû èãíîðèðîâàòü îøèáêó (íå ðåêîìåíäóåòñÿ) èëè «Îòêàç» äëÿ âûõîäà. +SourceIsCorrupted=Èñõîäíûé ôàéë ïîâðåæäåí +SourceDoesntExist=Èñõîäíûé ôàéë "%1" íå ñóùåñòâóåò +ExistingFileReadOnly=Ñóùåñòâóþùèé ôàéë ïîìå÷åí êàê «ôàéë òîëüêî äëÿ ÷òåíèÿ».%n%nÍàæìèòå «Ïîâòîð» äëÿ óäàëåíèÿ àòðèáóòà «òîëüêî äëÿ ÷òåíèÿ», «Ïðîïóñòèòü», ÷òîáû ïðîïóñòèòü ôàéë èëè «Îòêàç» äëÿ âûõîäà. +ErrorReadingExistingDest=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå ÷òåíèÿ ñóùåñòâóþùåãî ôàéëà: +FileExists=Ôàéë óæå ñóùåñòâóåò.%n%nÏåðåçàïèñàòü åãî? +ExistingFileNewer=Ñóùåñòâóþùèé ôàéë áîëåå íîâûé, ÷åì óñòàíàâëèâàåìûé. Ðåêîìåíäóåòñÿ ñîõðàíèòü ñóùåñòâóþùèé ôàéë.%n%nÂû õîòèòå ñîõðàíèòü ñóùåñòâóþùèé ôàéë? +ErrorChangingAttr=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå èçìåíåíèÿ àòðèáóòîâ ñóùåñòâóþùåãî ôàéëà: +ErrorCreatingTemp=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå ñîçäàíèÿ ôàéëà â ïàïêå íàçíà÷åíèÿ: +ErrorReadingSource=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå ÷òåíèÿ èñõîäíîãî ôàéëà: +ErrorCopying=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå êîïèðîâàíèÿ ôàéëà: +ErrorReplacingExistingFile=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå çàìåíû ñóùåñòâóþùåãî ôàéëà: +ErrorRestartReplace=Îøèáêà RestartReplace: +ErrorRenamingTemp=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå ïåðåèìåíîâàíèÿ ôàéëà â ïàïêå íàçíà÷åíèÿ: +ErrorRegisterServer=Íåâîçìîæíî çàðåãèñòðèðîâàòü DLL/OCX: %1 +ErrorRegSvr32Failed=Îøèáêà ïðè âûïîëíåíèè RegSvr32, êîä âîçâðàòà %1 +ErrorRegisterTypeLib=Íåâîçìîæíî çàðåãèñòðèðîâàòü áèáëèîòåêó òèïîâ (Type Library): %1 + +; *** Post-installation errors +ErrorOpeningReadme=Ïðîèçîøëà îøèáêà ïðè ïîïûòêå îòêðûòèÿ ôàéëà README. +ErrorRestartingComputer=Ïðîãðàììå óñòàíîâêè íå óäàëîñü ïåðåçàïóñòèòü êîìïüþòåð. Ïîæàëóéñòà, âûïîëíèòå ýòî ñàìîñòîÿòåëüíî. + +; *** Uninstaller messages +UninstallNotFound=Ôàéë "%1" íå ñóùåñòâóåò, äåèíñòàëëÿöèÿ íåâîçìîæíà. +UninstallOpenError=Íåâîçìîæíî îòêðûòü ôàéë "%1". Äåèíñòàëëÿöèÿ íåâîçìîæíà +UninstallUnsupportedVer=Ôàéë ïðîòîêîëà äëÿ äåèíñòàëëÿöèè "%1" íå ðàñïîçíàí äàííîé âåðñèåé ïðîãðàììû-äåèíñòàëëÿòîðà. Äåèíñòàëëÿöèÿ íåâîçìîæíà +UninstallUnknownEntry=Âñòðåòèëñÿ íåèçâåñòíûé ïóíêò (%1) â ôàéëå ïðîòîêîëà äëÿ äåèíñòàëëÿöèè +ConfirmUninstall=Âû äåéñòâèòåëüíî õîòèòå óäàëèòü %1 è âñå êîìïîíåíòû ïðîãðàììû? +UninstallOnlyOnWin64=Äàííóþ ïðîãðàììó âîçìîæíî äåèíñòàëëèðîâàòü òîëüêî â ñðåäå 64-áèòíîé Windows. +OnlyAdminCanUninstall=Ýòà ïðîãðàììà ìîæåò áûòü äåèíñòàëëèðîâàíà òîëüêî ïîëüçîâàòåëåì ñ àäìèíèñòðàòèâíûìè ïðèâèëåãèÿìè. +UninstallStatusLabel=Ïîæàëóéñòà, ïîäîæäèòå, ïîêà %1 áóäåò óäàëåíà ñ Âàøåãî êîìïüþòåðà. +UninstalledAll=Ïðîãðàììà %1 áûëà ïîëíîñòüþ óäàëåíà ñ Âàøåãî êîìïüþòåðà. +UninstalledMost=Äåèíñòàëëÿöèÿ %1 çàâåðøåíà.%n%n×àñòü ýëåìåíòîâ íå óäàëîñü óäàëèòü. Âû ìîæåòå óäàëèòü èõ ñàìîñòîÿòåëüíî. +UninstalledAndNeedsRestart=Äëÿ çàâåðøåíèÿ äåèíñòàëëÿöèè %1 íåîáõîäèìî ïðîèçâåñòè ïåðåçàãðóçêó Âàøåãî êîìïüþòåðà.%n%nÂûïîëíèòü ïåðåçàãðóçêó ñåé÷àñ? +UninstallDataCorrupted=Ôàéë "%1" ïîâðåæäåí. Äåèíñòàëëÿöèÿ íåâîçìîæíà + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Óäàëèòü ñîâìåñòíî èñïîëüçóåìûé ôàéë? +ConfirmDeleteSharedFile2=Ñèñòåìà óêàçûâàåò, ÷òî ñëåäóþùèé ñîâìåñòíî èñïîëüçóåìûé ôàéë áîëüøå íå èñïîëüçóåòñÿ íèêàêèìè äðóãèìè ïðèëîæåíèÿìè. Ïîäòâåðæäàåòå óäàëåíèå ôàéëà?%n%nÅñëè êàêèå-ëèáî ïðîãðàììû âñ¸ åùå èñïîëüçóþò ýòîò ôàéë, è îí áóäåò óäàë¸í, îíè íå ñìîãóò ðàáîòàòü ïðàâèëüíî. Åñëè Âû íå óâåðåíû, âûáåðèòå «Íåò». Îñòàâëåííûé ôàéë íå íàâðåäèò Âàøåé ñèñòåìå. +SharedFileNameLabel=Èìÿ ôàéëà: +SharedFileLocationLabel=Ðàñïîëîæåíèå: +WizardUninstalling=Ñîñòîÿíèå äåèíñòàëëÿöèè +StatusUninstalling=Äåèíñòàëëÿöèÿ %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1, âåðñèÿ %2 +AdditionalIcons=Äîïîëíèòåëüíûå çíà÷êè: +CreateDesktopIcon=Ñîçäàòü çíà÷îê íà &Ðàáî÷åì ñòîëå +CreateQuickLaunchIcon=Ñîçäàòü çíà÷îê â &Ïàíåëè áûñòðîãî çàïóñêà +ProgramOnTheWeb=Ñàéò %1 â Èíòåðíåòå +UninstallProgram=Äåèíñòàëëèðîâàòü %1 +LaunchProgram=Çàïóñòèòü %1 +AssocFileExtension=Ñâ&ÿçàòü %1 ñ ôàéëàìè, èìåþùèìè ðàñøèðåíèå %2 +AssocingFileExtension=Ñâÿçûâàíèå %1 ñ ôàéëàìè %2... diff --git a/Files/Languages/Slovak.isl b/Files/Languages/Slovak.isl new file mode 100644 index 000000000..3febdc45d --- /dev/null +++ b/Files/Languages/Slovak.isl @@ -0,0 +1,244 @@ +; ****************************************************** +; *** *** +; *** Inno Setup version 5.1.11+ Slovak messages *** +; *** *** +; *** Original Author: *** +; *** *** +; *** Milan Potancok (milan.potancok AT gmail.com) *** +; *** *** +; *** Contributors: *** +; *** *** +; *** Ivo Bauer (bauer AT ozm.cz) *** +; *** *** +; *** Tomas Falb (tomasf AT pobox.sk) *** +; *** *** +; *** Update: 19.3.2007 *** +; *** *** +; ****************************************************** +; +; + +[LangOptions] +LanguageName=Sloven<010D>ina +LanguageID=$041b +LanguageCodePage=1250 + +[Messages] +SetupAppTitle=Sprievodca inštaláciou +SetupWindowTitle=Sprievodca inštaláciou - %1 +UninstallAppTitle=Sprievodca odinštaláciou +UninstallAppFullTitle=Sprievodca odinštaláciou - %1 +InformationTitle=Informácie +ConfirmTitle=Potvrdenie +ErrorTitle=Chyba +SetupLdrStartupMessage=Toto je sprievodca inštaláciou produktu %1. Prajete si pokraèova? +LdrCannotCreateTemp=Nie je možné vytvori doèasný súbor. Sprievodca inštaláciou bude ukonèený +LdrCannotExecTemp=Nie je možné spusti súbor v doèasnom adresári. Sprievodca inštaláciou bude ukonèený +LastErrorMessage=%1.%n%nChyba %2: %3 +SetupFileMissing=Inštalaèný adresár neobsahuje súbor %1. Opravte, prosím, túto chybu alebo si zaobstarajte novú kópiu tohto produktu. +SetupFileCorrupt=Súbory sprievodcu inštaláciou sú poškodené. Zaobstarajte si, prosím, novú kópiu tohto produktu. +SetupFileCorruptOrWrongVer=Súbory sprievodcu inštaláciou sú poškodené alebo sa nezhodujú s touto verziou sprievodcu instaláciou. Opravte, prosím, túto chybu alebo si zaobstarajte novú kópiu tohto produktu. +NotOnThisPlatform=Tento produkt sa nedá spusti v %1. +OnlyOnThisPlatform=Tento produkt musí by spustený v %1. +OnlyOnTheseArchitectures=Tento produkt je možné nainštalova iba vo verziách MS Windows s podporou architektúry procesorov:%n%n%1 +MissingWOW64APIs=Aktuálna verzia MS Windows neobsahuje funkcie, ktoré vyžaduje sprievodca inštaláciou pre 64-bitovú inštaláciu. Opravte prosím túto chybu nainštalovaním aktualizácie Service Pack %1. +WinVersionTooLowError=Tento produkt vyžaduje %1 verzie %2 alebo vyššej. +WinVersionTooHighError=Tento produkt sa nedá nainštalova vo %1 verzie %2 alebo vyššej. +AdminPrivilegesRequired=Na inštaláciu tohto produktu musíte by prihlásený s právami administrátora. +PowerUserPrivilegesRequired=Na inštaláciu tohto produktu musíte by prihlásený s právami administrátora alebo èlena skupiny Power Users. +SetupAppRunningError=Sprievodca inštaláciou zistil, že produkt %1 je teraz spustený.%n%nUkonèite, prosím, všetky spustené inštancie tohto produktu a pokraèujte kliknutím na tlaèidlo OK alebo ukonèite inštaláciu tlaèidlom Zruši. +UninstallAppRunningError=Sprievodca odinštaláciou zistil, že produkt %1 je teraz spustený.%n%nUkonèite, prosím, všetky spustené inštancie tohto produktu a pokraèujte kliknutím na tlaèidlo OK alebo ukonèite inštaláciu tlaèidlom Zruši. +ErrorCreatingDir=Sprievodca inštaláciou nemohol vytvori adresár "%1" +ErrorTooManyFilesInDir=Nedá sa vytvori súbor v adresári "%1", pretože tento adresár už obsahuje príliš ve¾a súborov +ExitSetupTitle=Ukonèi sprievodcu inštaláciou +ExitSetupMessage=Inštalácia nebola celkom dokonèená. Ak teraz ukonèíte sprievodcu inštaláciou, produkt nebude nainštalovaný.%n%nSprievodcu inštaláciou môžete znovu spusti neskôr a dokonèi tak inštaláciu.%n%nUkonèi sprievodcu inštaláciou? +AboutSetupMenuItem=&O sprievodcovi inštalácie... +AboutSetupTitle=O sprievodcovi inštalácie +AboutSetupMessage=%1 verzia %2%n%3%n%n%1 domovská stránka:%n%4 +AboutSetupNote= +TranslatorNote=Slovak translation maintained by Milan Potancok (milan.potancok AT gmail.com), Ivo Bauer (bauer AT ozm.cz) and Tomas Falb (tomasf AT pobox.sk) +ButtonBack=< &Spä +ButtonNext=&Ïalej > +ButtonInstall=&Inštalova +ButtonOK=OK +ButtonCancel=Zruši +ButtonYes=&Áno +ButtonYesToAll=Áno &všetkým +ButtonNo=&Nie +ButtonNoToAll=Ni&e všetkým +ButtonFinish=&Dokonèi +ButtonBrowse=&Prechádza... +ButtonWizardBrowse=&Prechádza... +ButtonNewFolder=&Vytvori nový adresár +SelectLanguageTitle=Výber jazyka sprievodcu inštaláciou +SelectLanguageLabel=Zvo¾te jazyk, ktorý sa má použi pri inštalácii: +ClickNext=Pokraèujte kliknutím na tlaèidlo Ïalej alebo ukonèite sprievodcu inštaláciou tlaèidlom Zruši. +BeveledLabel= +BrowseDialogTitle=Nájs adresár +BrowseDialogLabel=Z dole uvedeného zoznamu vyberte adresár a kliknite na OK. +NewFolderName=Nový adresár +WelcomeLabel1=Vítá Vás sprievodca inštaláciou produktu [name]. +WelcomeLabel2=Produkt [name/ver] bude nainštalovaný na Váš poèítaè.%n%nSkôr, ako budete pokraèova, odporúèame Vám ukonèi všetky spustené aplikácie. +WizardPassword=Heslo +PasswordLabel1=Táto inštalácia je chránená heslom. +PasswordLabel3=Zadajte, prosím, heslo a pokraèujte kliknutím na tlaèidlo Ïalej. Pri zadávání hesla rozlišujte malé a ve¾ké písmená. +PasswordEditLabel=&Heslo: +IncorrectPassword=Zadané heslo nie je správne. Zkúste to, prosím, ešte raz. +WizardLicense=Licenèná zmluva +LicenseLabel=Skôr, ako budete pokraèova, preèítajte si, prosím, tieto dôležité informácie. +LicenseLabel3=Preèítajte si, prosím, túto Licenènú zmluvu. Aby mohla inštalácia pokraèova, musíte súhlasi s podmienkami tejto zmluvy. +LicenseAccepted=&Súhlasím s podmienkami Licenènej zmluvy +LicenseNotAccepted=&Nesúhlasím s podmienkami Licenènej zmluvy +WizardInfoBefore=Informácie +InfoBeforeLabel=Skôr, ako budete pokraèova, preèítajte si, prosím, tieto dôležité informácie. +InfoBeforeClickLabel=Pokraèujte v inštalácii kliknutím na tlaèidlo Ïalej. +WizardInfoAfter=Informácie +InfoAfterLabel=Skôr, ako budete pokraèova, preèítajte si, prosím, tieto dôležité informácie. +InfoAfterClickLabel=Pokraèujte v inštalácii kliknutím na tlaèidlo Ïalej. +WizardUserInfo=Informácie o používate¾ovi +UserInfoDesc=Zadajte, prosím, požadované informácie. +UserInfoName=&Používate¾ské meno: +UserInfoOrg=&Organizácia: +UserInfoSerial=&Sériove èíslo: +UserInfoNameRequired=Používate¾ské meno musí by zadané. +WizardSelectDir=Vyberte cie¾ový adresár +SelectDirDesc=Kam má by produkt [name] nainštalovaný? +SelectDirLabel3=Sprievodca nainštaluje produkt [name] do nasledujúceho adresára. +SelectDirBrowseLabel=Pokraèujte kliknutím na tlaèidlo Ïalej. Ak chcete vybra iný adresár, kliknite na tlaèidlo Prechádza. +DiskSpaceMBLabel=Inštalácia vyžaduje najmenej [mb] MB miesta na disku. +ToUNCPathname=Sprevodca inštaláciou nemôže inštalova do cesty UNC. Ak sa pokúšate inštalova po sieti, musíte použi niektorú z dostupných sieových jednotiek. +InvalidPath=Musíte zadat úplnú cestu vrátane písmena jednotky; napríklad:%n%nC:\Aplikácia%n%nalebo cestu UNC v tvare:%n%n\\server\zdie¾aný adresár +InvalidDrive=Vami vybraná jednotka alebo cesta UNC neexistuje alebo nie je dostupná. Vyberte, prosím, iné umiestnenie. +DiskSpaceWarningTitle=Nedostatok miesta na disku +DiskSpaceWarning=Sprievodca inštaláciou vyžaduje najmenej %1 KB vo¾ného miesta na inštaláciu produktu, ale na vybranej jednotke je dostupných len %2 KB.%n%nPrajete si napriek tomu pokraèova? +DirNameTooLong=Názov adresára alebo cesta sú príliš dlhé. +InvalidDirName=Názov adresára nie je platný. +BadDirName32=Názvy adresárov nesmú obsahova žiadny z nasledujúcich znakov:%n%n%1 +DirExistsTitle=Adresár existuje +DirExists=Adresár:%n%n%1%n%nuž existuje. Má sa napriek tomu inštalova do tohto adresára? +DirDoesntExistTitle=Adresár neexistuje +DirDoesntExist=Adresár:%n%n%1%n%nešte neexistuje. Má sa tento adresár vytvori? +WizardSelectComponents=Vyberte komponenty +SelectComponentsDesc=Aké komponenty majú by nainštalované? +SelectComponentsLabel2=Zaškrtnite komponenty, ktoré majú by nainštalované; komponenty, ktoré se nemajú inštalova, nechajte nezaškrtnuté. Pokraèujte kliknutím na tlaèidlo Ïalej. +FullInstallation=Úplná inštalácia +CompactInstallation=Kompaktná inštalácia +CustomInstallation=Volite¾ná inštalácia +NoUninstallWarningTitle=Komponenty existujú +NoUninstallWarning=Sprievodca inštaláciou zistil, že nasledujúce komponenty sú už na Vašom poèítaèi nainštalované:%n%n%1%n%nAk ich teraz nezahrniete do výberu, nebudú neskôr odinštalované.%n%nPrajete si napriek tomu pokraèova? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Vybrané komponenty vyžadujú najmenej [mb] MB miesta na disku. +WizardSelectTasks=Vyberte ïalšie úlohy +SelectTasksDesc=Ktoré ïalšie úlohy majú by vykonané? +SelectTasksLabel2=Vyberte ïalšie úlohy, ktoré majú by vykonané v priebehu inštalácie produktu [name] a pokraèujte kliknutím na tlaèidlo Ïalej. +WizardSelectProgramGroup=Vyberte skupinu v ponuke Štart +SelectStartMenuFolderDesc=Kam má sprievodca inštalácie umiestni zástupcov aplikácie? +SelectStartMenuFolderLabel3=Sprievodca inštaláciou vytvorí zástupcov aplikácie v nasledujúcom adresári ponuky Štart. +SelectStartMenuFolderBrowseLabel=Pokraèujte kliknutím na tlaèidlo Ïalej. Ak chcete zvoli iný adresár, kliknite na tlaèidlo Prechádza. +MustEnterGroupName=Musíte zada názov skupiny. +GroupNameTooLong=Názov adresára alebo cesta sú príliš dlhé. +InvalidGroupName=Názov adresára nie je platný. +BadGroupName=Názov skupiny nesmie obsahova žiadny z nasledujúcich znakov:%n%n%1 +NoProgramGroupCheck2=&Nevytvára skupinu v ponuke Štart +WizardReady=Inštalácia je pripravená +ReadyLabel1=Sprievodca inštaláciou je teraz pripravený nainštalova produkt [name] na Váš poèítaè. +ReadyLabel2a=Pokraèujte v inštalácii kliknutím na tlaèidlo Inštalova. Ak si prajete zmeni niektoré nastavenia inštalácie, kliknite na tlaèidlo Spä. +ReadyLabel2b=Pokraèujte v inštalácii kliknutím na tlaèidlo Inštalova. +ReadyMemoUserInfo=Informácie o používate¾ovi: +ReadyMemoDir=Cie¾ový adresár: +ReadyMemoType=Typ inštalácie: +ReadyMemoComponents=Vybrané komponenty: +ReadyMemoGroup=Skupina v ponuke Štart: +ReadyMemoTasks=Ïalšie úlohy: +WizardPreparing=Príprava inštalácie +PreparingDesc=Sprievodca inštaláciou pripravuje inštaláciu produktu [name] na Váš poèítaè. +PreviousInstallNotCompleted=Inštalácia/odinštalácia predošlého produktu nebola úplne dokonèená. Dokonèenie tohto procesu vyžaduje reštart poèítaèa.%n%nPo reštartovaní poèítaèa spustite znovu sprievodcu inštaláciou, aby bolo možné dokonèi inštaláciu produktu [name]. +CannotContinue=Sprievodca inštaláciou nemôže pokraèova. Ukonèite, prosím, sprievodcu inštaláciou kliknutím na tlaèidlo Zruši. +WizardInstalling=Inštalujem +InstallingLabel=Poèkajte prosím, kým sprievodca inštaláciou nedokonèí inštaláciu produktu [name] na Váš poèítaè. +FinishedHeadingLabel=Dokonèuje sa inštalácia produktu [name] +FinishedLabelNoIcons=Sprievodca inštaláciou dokonèil inštaláciu produktu [name] na Váš poèítaè. +FinishedLabel=Sprievodca inštaláciou dokonèil inštaláciu produktu [name] na Váš poèítaè. Produkt je možné spusti pomocou nainštalovaných ikon a zástupcov. +ClickFinish=Ukonèite sprievodcu inštaláciou kliknutím na tlaèidlo Dokonèi. +FinishedRestartLabel=Na dokonèenie inštalácie produktu [name] je nutné reštartova Váš poèítaè. Prajete si teraz reštartova Váš poèítaè? +FinishedRestartMessage=Na dokonèenie inštalácie produktu [name] je nutné reštartova Váš poèítaè.%n%nPrajete si teraz reštartova Váš poèítaè? +ShowReadmeCheck=Áno, chcem zobrazi dokument "ÈITAJMA" +YesRadio=&Áno, chcem teraz reštartova poèítaè +NoRadio=&Nie, poèítaè reštartujem neskôr +RunEntryExec=Spusti %1 +RunEntryShellExec=Zobrazi %1 +ChangeDiskTitle=Sprievodca inštaláciou vyžaduje ïalší disk +SelectDiskLabel2=Vložte, prosím, disk %1 a kliknite na tlaèidlo OK.%n%nAk sa súbory na tomto disku nachádzajú v inom adresári, ako v tom, ktorý je zobrazený nižšie, zadejte správnu cestu alebo kliknite na tlaèidlo Prechádza. +PathLabel=&Cesta: +FileNotInDir2=Súbor "%1" sa nedá nájs v "%2". Vložte, prosím, správny disk alebo zvo¾te iný adresár. +SelectDirectoryLabel=Špecifikujte,prosím, umiestnenie ïalšieho disku. +SetupAborted=Inštalácia nebola úplne dokonèená.%n%nOpravte, prosím, chybu a spustite sprievodcu inštaláciou znova. +EntryAbortRetryIgnore=Akciu zopakujete kliknutím na tlaèidlo Opakova. Akciu vynecháte kliknutím na tlaèidlo Preskoèi. Inštaláciu prerušíte kliknutím na tlaèidlo Preruši. +StatusCreateDirs=Vytvárajú sa adresáre... +StatusExtractFiles=Rozba¾ujú sa súbory... +StatusCreateIcons=Vytvárajú sa ikony a zástupcovia... +StatusCreateIniEntries=Vytvárajú sa záznamy v konfiguraèných súboroch... +StatusCreateRegistryEntries=Vytvárajú sa záznamy v systémovom registri... +StatusRegisterFiles=Registrujú sa súbory... +StatusSavingUninstall=Ukladajú sa informácie potrebné pre neskoršie odinštalovanie produktu... +StatusRunProgram=Dokonèuje sa inštalácia... +StatusRollback=Vykonané zmeny sa vracajú spä... +ErrorInternal2=Interná chyba: %1 +ErrorFunctionFailedNoCode=%1 zlyhala +ErrorFunctionFailed=%1 zlyhala; kód %2 +ErrorFunctionFailedWithMessage=%1 zlyhala; kód %2.%n%3 +ErrorExecutingProgram=Nedá sa spusti súbor:%n%1 +ErrorRegOpenKey=Došlo k chybe pri otváraní k¾úèa systémového registra:%n%1\%2 +ErrorRegCreateKey=Došlo k chybe pri vytváraní k¾úèa systémového registra:%n%1\%2 +ErrorRegWriteKey=Došlo k chybe pri zápise do k¾úèa systémového registra:%n%1\%2 +ErrorIniEntry=Došlo k chybe pri vytváraní záznamu v konfiguraènom súbore "%1". +FileAbortRetryIgnore=Akciu zopakujete kliknutím na tlaèidlo Opakova. Tento súbor preskoèíte kliknutím na tlaèidlo Preskoèi (neodporúèa sa). Inštaláciu prerušíte tlaèidlom Preruši. +FileAbortRetryIgnore2=Akciu zopakujete kliknutím na tlaèidlo Opakova. Pokraèujete kliknutím na tlaèidlo Preskoèi (neodporúèa sa). Inštaláciu prerušíte tlaèidlom Preruši. +SourceIsCorrupted=Zdrojový súbor je poškodený +SourceDoesntExist=Zdrojový súbor "%1" neexistuje +ExistingFileReadOnly=Existujúci súbor je urèený len na èítanie.%n%nAtribút "Iba na èítanie" odstránite a akciu zopakujete kliknutím na tlaèidlo Opakova. Súbor preskoèíte kliknutím na tlaèidlo Preskoèi. Inštaláciu prerušíte kliknutím na tlaèidlo Preruši. +ErrorReadingExistingDest=Došlo k chybe pri pokuse o èítanie existujúceho súboru: +FileExists=Súbor už existuje.%n%nMá ho sprievodca inštalácie prepísa? +ExistingFileNewer=Existujúci súbor je novší ako ten, ktorý sa sprievodca inštaláciou pokúša nainštalova. Odporúèa sa ponecha existujúci súbor.%n%nPrajete si ponechat existujúci súbor? +ErrorChangingAttr=Došlo k chybe pri pokuse o modifikáciu atribútov existujúceho súboru: +ErrorCreatingTemp=Došlo k chybe pri pokuse o vytvorenie súboru v cie¾ovom adresári: +ErrorReadingSource=Došlo k chybe pri pokuse o èítanie zdrojového súboru: +ErrorCopying=Došlo k chybe pri pokuse o skopírovanie súboru: +ErrorReplacingExistingFile=Došlo k chybe pri pokuse o nahradenie existujúceho súboru: +ErrorRestartReplace=Zlyhala funkcia "RestartReplace" sprievodcu inštaláciou: +ErrorRenamingTemp=Došlo k chybe pri pokuse o premenovanie súboru v cie¾ovom adresári: +ErrorRegisterServer=Nedá sa vykona registrácia DLL/OCX: %1 +ErrorRegSvr32Failed=Volanie RegSvr32 zlyhalo s návratovým kódom %1 +ErrorRegisterTypeLib=Nedá sa vykona registrácia typovej knižnice: %1 +ErrorOpeningReadme=Došlo k chybe pri pokuse o otvorenie dokumentu "ÈITAJMA". +ErrorRestartingComputer=Sprievodcovi inštaláciou sa nepodarilo reštartova Váš poèítaè. Reštartujte ho, prosím, manuálne. +UninstallNotFound=Súbor "%1" neexistuje. Produkt sa nedá odinštalova. +UninstallOpenError=Súbor "%1" nie je možné otvori. Produkt nie je možné odinštalova. +UninstallUnsupportedVer=Sprievodcovi odinštaláciou sa nepodarilo rozpozna formát súboru obsahujúceho informácie na odinštalovanie produktu "%1". Produkt sa nedá odinštalova +UninstallUnknownEntry=V súbore obsahujúcom informácie na odinštalovanie produktu bola zistená neznáma položka (%1) +ConfirmUninstall=Ste si naozaj istý, že chcete odinštalova %1 a všetky jeho komponenty? +UninstallOnlyOnWin64=Tento produkt je možné odinštalova iba v 64-bitových verziách MS Windows. +OnlyAdminCanUninstall=K odinštalovaniu tohto produktu musíte by prihlásený s právami administrátora. +UninstallStatusLabel=Poèkajte prosím, kým produkt %1 nebude odinštalovaný z Vášho poèítaèa. +UninstalledAll=%1 bol úspešne odinštalovaný z Vášho poèítaèa. +UninstalledMost=%1 bol odinštalovaný z Vášho poèítaèa.%n%nNiektoré jeho komponenty sa však nepodarilo odinštalova. Môžete ich odinštalova manuálne. +UninstalledAndNeedsRestart=Na dokonèenie odinštalácie produktu %1 je potrebné reštartova Váš poèítaè.%n%nPrajete si teraz reštartova Váš poèítaè? +UninstallDataCorrupted=Súbor "%1" je poškodený. Produkt sa nedá odinštalova +ConfirmDeleteSharedFileTitle=Odinštalova zdie¾aný súbor? +ConfirmDeleteSharedFile2=Systém indikuje, že následujúci zdie¾aný súbor nie je používaný žiadnymi inými aplikáciami. Má sprievodca odinštalácie tento zdie¾aný súbor odstráni?%n%nAk niektoré aplikácie tento súbor používajú, nemusia po jeho odinštalovaní pracova správne. Ak si nie ste istý, zvo¾te Nie. Ponechanie tohoto súboru vo Vašom systéme nespôsobí žiadnu škodu. +SharedFileNameLabel=Názov súboru: +SharedFileLocationLabel=Umiestnenie: +WizardUninstalling=Stav odinštalovania +StatusUninstalling=Odinštalujem %1... + +[CustomMessages] +NameAndVersion=%1 verzia %2 +AdditionalIcons=Ïalší zástupcovia: +CreateDesktopIcon=Vytvori zástupcu na &ploche +CreateQuickLaunchIcon=Vytvori zástupcu na paneli &Rýchle spustenie +ProgramOnTheWeb=Aplikácia %1 na internete +UninstallProgram=Odinštalova aplikáciu %1 +LaunchProgram=Spusti aplikáciu %1 +AssocFileExtension=Vytvori &asociáciu medzi súbormi typu %2 a aplikáciou %1 +AssocingFileExtension=Vytvára sa asociácia medzi súbormi typu %2 a aplikáciou %1... diff --git a/Files/Languages/Slovenian.isl b/Files/Languages/Slovenian.isl new file mode 100644 index 000000000..9aebc0c9d --- /dev/null +++ b/Files/Languages/Slovenian.isl @@ -0,0 +1,307 @@ +; *** Inno Setup version 5.1.11+ Slovenian messages *** +; +; To download user-contributed translations of this file, go to: +; http://www.jrsoftware.org/is3rdparty.php +; +; Note: When translating this text, do not add periods (.) to the end of +; messages that didn't have them already, because on those messages Inno +; Setup adds the periods automatically (appending a period would result in +; two periods being displayed). +; +; Maintained by Miha Remec (mremec@gmail.com) +; +; $jrsoftware: issrc/Files/Languages/Slovenian.isl,v 1.14 2007/02/27 18:22:41 jr Exp $ + +[LangOptions] +LanguageName=Slovenski +LanguageID=$0424 +LanguageCodePage=1250 + +[Messages] + +; *** Application titles +SetupAppTitle=Namestitev +SetupWindowTitle=Namestitev - %1 +UninstallAppTitle=Odstranitev +UninstallAppFullTitle=Odstranitev programa %1 + +; *** Misc. common +InformationTitle=Informacija +ConfirmTitle=Potrditev +ErrorTitle=Napaka + +; *** SetupLdr messages +SetupLdrStartupMessage=V raèunalnik boste namestili program %1. Želite nadaljevati? +LdrCannotCreateTemp=Ne morem ustvariti zaèasne datoteke. Namestitev je prekinjena +LdrCannotExecTemp=Ne morem zagnati datoteke v zaèasni mapi. Namestitev je prekinjena + +; *** Startup error messages +LastErrorMessage=%1.%n%nNapaka %2: %3 +SetupFileMissing=Manjka datoteka %1. Odpravite napako ali si priskrbite drugo kopijo programa. +SetupFileCorrupt=Datoteke namestitvenega programa so okvarjene. Priskrbite si drugo kopijo programa. +SetupFileCorruptOrWrongVer=Datoteke so okvarjene ali nezdružljive s to razlièico namestitvenega programa. Odpravite napako ali si priskrbite drugo kopijo programa. +NotOnThisPlatform=Program ni namenjen za uporabo v %1. +OnlyOnThisPlatform=Program je namenjen za uporabo v %1. +OnlyOnTheseArchitectures=Program lahko namestite le na razlièicah MS Windows sistemov, ki so naèrtovani za naslednje tipe procesorjev:%n%n%1 +MissingWOW64APIs=Razlièica MS Windows, ki jo uporabljate, ne vsebuje okolja, ki ga zahteva namestitveni program za izvedbo 64-bitne namestitve. Problem odpravite z namestitvijo servisnega paketa %1. +WinVersionTooLowError=Ta program zahteva %1 razlièico %2 ali novejšo. +WinVersionTooHighError=Tega programa ne morete namestiti v %1 razlièice %2 ali novejše. +AdminPrivilegesRequired=Namestitev programa lahko opravi le administrator. +PowerUserPrivilegesRequired=Namestitev programa lahko opravi le administrator ali zahtevni uporabnik. +SetupAppRunningError=Program %1 je trenutno odprt.%n%nZaprite program, nato kliknite V redu za nadaljevanje ali Prekini za izhod. +UninstallAppRunningError=Program %1 je trenutno odprt.%n%nZaprite program, nato kliknite V redu za nadaljevanje ali Prekini za izhod. + +; *** Misc. errors +ErrorCreatingDir=Namestitveni program ni mogel ustvariti mape "%1" +ErrorTooManyFilesInDir=Namestitveni program ne more ustvariti nove datoteke v mapi "%1", ker vsebuje mapa preveè datotek + +; *** Setup common messages +ExitSetupTitle=Prekini namestitev +ExitSetupMessage=Namestitev ni konèana. Èe jo boste prekinili, program ne bo namešèen.%n%nPonovno namestitev lahko izvedete kasneje.%n%nŽelite prekiniti namestitev? +AboutSetupMenuItem=&O namestitvenem programu... +AboutSetupTitle=O namestitvenem programu +AboutSetupMessage=%1 razlièica %2%n%3%n%n%1 domaèa stran:%n%4 +AboutSetupNote= +TranslatorNote=Slovenski prevod: Miha Remec%n(innosetup@miharemec.com) + +; *** Buttons +ButtonBack=< Na&zaj +ButtonNext=&Naprej > +ButtonInstall=&Namesti +ButtonOK=V redu +ButtonCancel=Prekini +ButtonYes=&Da +ButtonYesToAll=Da za &vse +ButtonNo=&Ne +ButtonNoToAll=N&e za vse +ButtonFinish=&Konèaj +ButtonBrowse=&Prebrskaj... +ButtonWizardBrowse=P&rebrskaj... +ButtonNewFolder=&Ustvari novo mapo + +; *** "Select Language" dialog messages +SelectLanguageTitle=Izbira jezika namestitve +SelectLanguageLabel=Izberite jezik, ki ga želite uporabljati med namestitvijo: + +; *** Common wizard text +ClickNext=Kliknite Naprej za nadaljevanje namestitve ali Prekini za prekinitev namestitve. +BeveledLabel= +BrowseDialogTitle=Izbira mape +BrowseDialogLabel=Izberite mapo s spiska, nato kliknite V redu. +NewFolderName=Nova mapa + +; *** "Welcome" wizard page +WelcomeLabel1=Dobrodošli v namestitev programa [name]. +WelcomeLabel2=V raèunalnik boste namestili program [name/ver].%n%nPriporoèljivo je, da pred zaèetkom namestitve zaprete vse odprte programe. + +; *** "Password" wizard page +WizardPassword=Geslo +PasswordLabel1=Namestitev je zašèitena z geslom. +PasswordLabel3=Vpišite geslo, nato kliknite Naprej za nadaljevanje. Pri vpisu pazite na male in velike èrke. +PasswordEditLabel=&Geslo: +IncorrectPassword=Geslo, ki ste ga vpisali, ni pravilno. Vpišite pravilno geslo. + +; *** "License Agreement" wizard page +WizardLicense=Licenèna pogodba za uporabo programa +LicenseLabel=Pred nadaljevanjem preberite licenèno pogodbo za uporabo programa. +LicenseLabel3=Preberite licenèno pogodbo za uporabo programa. Program lahko namestite le, èe se s pogodbo v celoti strinjate. +LicenseAccepted=&Da, sprejemam vse pogoje licenène pogodbe +LicenseNotAccepted=N&e, pogojev licenène pogodbe ne sprejmem + +; *** "Information" wizard pages +WizardInfoBefore=Informacije +InfoBeforeLabel=Pred nadaljevanjem preberite naslednje pomembne informacije. +InfoBeforeClickLabel=Ko boste pripravljeni za nadaljevanje namestitve, kliknite Naprej. +WizardInfoAfter=Informacije +InfoAfterLabel=Pred nadaljevanjem preberite naslednje pomembne informacije. +InfoAfterClickLabel=Ko boste pripravljeni za nadaljevanje namestitve, kliknite Naprej. + +; *** "User Information" wizard page +WizardUserInfo=Podatki o uporabniku +UserInfoDesc=Vpišite svoje podatke. +UserInfoName=&Ime: +UserInfoOrg=&Podjetje: +UserInfoSerial=&Serijska številka: +UserInfoNameRequired=Vpis imena je obvezen. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Izbira ciljnega mesta +SelectDirDesc=Kam želite namestiti program [name]? +SelectDirLabel3=Program [name] bo namešèen v naslednjo mapo. +SelectDirBrowseLabel=Za nadaljevanje kliknite Naprej. Èe želite izbrati drugo mapo, kliknite Prebrskaj. +DiskSpaceMBLabel=Na disku mora biti vsaj [mb] MB prostora. +ToUNCPathname=Programa ne morete namestiti v UNC pot. Èe želite namestiti v omrežje, se morate povezati z omrežnim pogonom. +InvalidPath=Vpisati morate polno pot vkljuèno z oznako pogona. Primer:%n%nC:\PROGRAM%n%nali UNC pot v obliki:%n%n\\strežnik\mapa_skupne_rabe +InvalidDrive=Izbrani pogon ali UNC skupna raba ne obstaja ali ni dostopna. Izberite drugega. +DiskSpaceWarningTitle=Na disku ni dovolj prostora +DiskSpaceWarning=Namestitev potrebuje vsaj %1 KB prostora, toda na izbranem pogonu je na voljo le %2 KB.%n%nŽelite kljub temu nadaljevati? +DirNameTooLong=Ime mape ali poti je predolgo. +InvalidDirName=Ime mape ni veljavno. +BadDirName32=Ime mape ne sme vsebovati naslednjih znakov:%n%n%1 +DirExistsTitle=Mapa že obstaja +DirExists=Mapa%n%n%1%n%nže obstaja. Želite program vseeno namestiti v to mapo? +DirDoesntExistTitle=Mapa ne obstaja +DirDoesntExist=Mapa %n%n%1%n%nne obstaja. Želite ustvariti to mapo? + +; *** "Select Components" wizard page +WizardSelectComponents=Izbira komponent +SelectComponentsDesc=Katere komponente želite namestiti? +SelectComponentsLabel2=Oznaèite komponente, ki jih želite namestiti; odznaèite komponente, ki jih ne želite namestiti. Kliknite Naprej, ko boste pripravljeni za nadaljevanje. +FullInstallation=Polna namestitev +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Osnovna namestitev +CustomInstallation=Nastavljiva namestitev +NoUninstallWarningTitle=Komponente že obstajajo +NoUninstallWarning=Namestitveni program je ugotovil, da so naslednje komponente že namešèene v raèunalniku:%n%n%1%n%nOdznaèitev teh komponent še ne pomeni tudi njihove odstranitve.%n%nŽelite vseeno nadaljevati? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=Za izbrano namestitev potrebujete vsaj [mb] MB prostora na disku. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Izbira dodatnih opravil +SelectTasksDesc=Katera dodatna opravila želite izvesti? +SelectTasksLabel2=Izberite dodatna opravila, ki jih bo namestitveni program opravil med namestitvijo programa [name], nato kliknite Naprej. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Izbira mape v meniju »Start« +SelectStartMenuFolderDesc=Kje naj namestitveni program ustvari programske ikone? +SelectStartMenuFolderLabel3=Namestitveni program bo ustvaril programske ikone v naslednji mapi v meniju »Start«. +SelectStartMenuFolderBrowseLabel=Za nadaljevanje kliknite Naprej. Èe želite izbrati drugo mapo, kliknite Prebrskaj. +MustEnterGroupName=Ime skupine mora biti vpisano. +GroupNameTooLong=Ime mape ali poti je predolgo. +InvalidGroupName=Ime mape ni veljavno. +BadGroupName=Ime skupine ne sme vsebovati naslednjih znakov:%n%n%1 +NoProgramGroupCheck2=&Ne ustvari mape v meniju »Start« + +; *** "Ready to Install" wizard page +WizardReady=Pripravljen za namestitev +ReadyLabel1=Namestitveni program je pripravljen za namestitev programa [name] v vaš raèunalnik. +ReadyLabel2a=Kliknite Namesti za zaèetek namešèanja. Kliknite Nazaj, èe želite pregledati ali spremeniti katerokoli nastavitev. +ReadyLabel2b=Kliknite Namesti za zaèetek namešèanja. +ReadyMemoUserInfo=Podatki o uporabniku: +ReadyMemoDir=Ciljno mesto: +ReadyMemoType=Tip namestitve: +ReadyMemoComponents=Izbrane komponente: +ReadyMemoGroup=Mapa v meniju »Start«: +ReadyMemoTasks=Dodatna opravila: + +; *** "Preparing to Install" wizard page +WizardPreparing=Pripravljam za namestitev +PreparingDesc=Namestitveni program je pripravljen za namestitev programa [name] v vaš raèunalnik. +PreviousInstallNotCompleted=Namestitev/odstranitev prejšnjega programa ni bila konèana. Da bi jo dokonèali, morate raèunalnik ponovno zagnati.%n%nPo ponovnem zagonu raèunalnika ponovno odprite namestitveni program, da boste konèali namestitev programa [name]. +CannotContinue=Namestitveni program ne more nadaljevati. Pritisnite Prekini za izhod. + +; *** "Installing" wizard page +WizardInstalling=Namešèanje +InstallingLabel=Poèakajte, da bo program [name] namešèen v vaš raèunalnik. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Zakljuèek namestitve programa [name] +FinishedLabelNoIcons=Program [name] je namešèen v vaš raèunalnik. +FinishedLabel=Program [name] je namešèen v vaš raèunalnik. Program zaženete tako, da odprete pravkar ustvarjene programske ikone. +ClickFinish=Kliknite tipko Konèaj za zakljuèek namestitve. +FinishedRestartLabel=Za dokonèanje namestitve programa [name] morate raèunalnik znova zagnati. Ali ga želite znova zagnati zdaj? +FinishedRestartMessage=Za dokonèanje namestitve programa [name] morate raèunalnik znova zagnati. %n%nAli ga želite znova zagnati zdaj? +ShowReadmeCheck=Želim prebrati datoteko z navodili +YesRadio=&Da, raèunalnik znova zaženi zdaj +NoRadio=&Ne, raèunalnik bom znova zagnal pozneje + +; used for example as 'Run MyProg.exe' +RunEntryExec=Odpri %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Preberi %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=Namestitveni program potrebuje naslednjo disketo +SelectDiskLabel2=Vstavite disketo %1 and kliknite V redu.%n%nÈe se datoteke s te diskete nahajajo v drugi mapi, kot je navedena spodaj, vpišite pravilno pot ali kliknite Prebrskaj. +PathLabel=&Pot: +FileNotInDir2=Datoteke "%1" ni v mapi "%2". Vstavite pravilno disketo ali izberite drugo mapo. +SelectDirectoryLabel=Vpišite lokacijo naslednje diskete. + +; *** Installation phase messages +SetupAborted=Namestitev ni bila konèana.%n%nOdpravite težavo in znova odprite namestitveni program. +EntryAbortRetryIgnore=Kliknite Ponovi za ponovitev, Prezri za nadaljevanje kljub problemu, ali Prekini za prekinitev namestitve. + +; *** Installation status messages +StatusCreateDirs=Ustvarjam mape... +StatusExtractFiles=Razširjam datoteke... +StatusCreateIcons=Ustvarjam bližnjice... +StatusCreateIniEntries=Vpisujem v INI datoteke... +StatusCreateRegistryEntries=Vpisujem v register... +StatusRegisterFiles=Registriram datoteke... +StatusSavingUninstall=Zapisujem podatke za odstranitev programa... +StatusRunProgram=Zakljuèujem namestitev... +StatusRollback=Obnavljam prvotno stanje... + +; *** Misc. errors +ErrorInternal2=Interna napaka: %1 +ErrorFunctionFailedNoCode=%1 ni uspel(a) +ErrorFunctionFailed=%1 ni uspel(a); koda %2 +ErrorFunctionFailedWithMessage=%1 ni uspela; koda %2.%n%3 +ErrorExecutingProgram=Ne morem odpreti programa:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Napaka pri odpiranju kljuèa v registru:%n%1\%2 +ErrorRegCreateKey=Napaka pri ustvarjanju kljuèa v registru:%n%1\%2 +ErrorRegWriteKey=Napaka pri pisanju kljuèa v registru:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Napaka pri vpisu v INI datoteko "%1". + +; *** File copying errors +FileAbortRetryIgnore=Kliknite Ponovi za ponovitev, Prezri za preskok datoteke (ni priporoèljivo) ali Prekini za prekinitev namestitve. +FileAbortRetryIgnore2=Kliknite Ponovi za ponovitev, Prezri za nadaljevanje (ni priporoèljivo) ali Prekini za prekinitev namestitve. +SourceIsCorrupted=Izvorna datoteka je okvarjena +SourceDoesntExist=Izvorna datoteka "%1" ne obstaja +ExistingFileReadOnly=Obstojeèa datoteka je oznaèena samo za branje.%n%nPritisnite Ponovi za odstranitev te lastnosti in ponovni poskus, Prezri za preskok te datoteke, ali Prekini za prekinitev namestitve. +ErrorReadingExistingDest=Pri branju obstojeèe datoteke je prišlo do napake: +FileExists=Datoteka že obstaja.%n%nŽelite, da jo namestitveni program prepiše? +ExistingFileNewer=V raèunalniku že imate namešèeno novejšo datoteko. Priporoèljivo je, da obstojeèo (novejšo) datoteko obdržite.%n%nŽelite obdržati obstojeèo (novejšo) datoteko? +ErrorChangingAttr=Pri poskusu spremembe lastnosti datoteke je prišlo do napake: +ErrorCreatingTemp=Pri ustvarjanju datoteke v ciljni mapi je prišlo do napake: +ErrorReadingSource=Pri branju izvorne datoteke je prišlo do napake: +ErrorCopying=Pri kopiranju datoteke je prišlo do napake: +ErrorReplacingExistingFile=Pri poskusu zamenjave obstojeèe datoteke je prišlo do napake: +ErrorRestartReplace=RestartReplace failed: +ErrorRenamingTemp=Pri poskusu preimenovanja datoteke v ciljni mapi je prišlo do napake: +ErrorRegisterServer=Registracija DLL/OCX ni možna: %1 +ErrorRegSvr32Failed=RegSvr32 ni uspel s kodo napake %1 +ErrorRegisterTypeLib=Prijava vrste knjižnice ni mogoèa: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Pri odpiranju datoteke README je prišlo do napake. +ErrorRestartingComputer=Namestitveni program ni uspel znova zagnati raèunalnika. Ponovni zagon opravite roèno. + +; *** Uninstaller messages +UninstallNotFound=Datoteka "%1" ne obstaja. Odstranitev ni mogoèa. +UninstallOpenError=Datoteke "%1" ne morem odpreti. Ne morem odstraniti +UninstallUnsupportedVer=Dnevniška datoteka "%1" je v obliki, ki je ta razlièica odstranitvenega programa ne razume. Programa ni mogoèe odstraniti +UninstallUnknownEntry=V dnevniški datoteki je bil najden neznani vpis (%1) +ConfirmUninstall=Ste preprièani, da želite v celoti odstraniti program %1 in pripadajoèe komponente? +UninstallOnlyOnWin64=To namestitev je mogoèe odstraniti le v 64-bitni razlièici MS Windows. +OnlyAdminCanUninstall=Ta program lahko odstrani le administrator. +UninstallStatusLabel=Poèakajte, da odstranim program %1 iz vašega raèunalnika. +UninstalledAll=Program %1 je bil uspešno odstranjen iz vašega raèunalnika. +UninstalledMost=Odstranjevanje programa %1 je konèano.%n%nNekateri deli niso bili odstranjeni in jih lahko odstranite roèno. +UninstalledAndNeedsRestart=Za dokonèanje odstranitve programa %1 morate raèunalnik znova zagnati.%n%nAli ga želite znova zagnati zdaj? +UninstallDataCorrupted=Datoteka "%1" je okvarjena. Odstranitev ni možna + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=Želite odstraniti datoteko v skupni rabi? +ConfirmDeleteSharedFile2=Spodaj izpisane datoteke v skupni rabi ne uporablja veè noben program. Želite odstraniti to datoteko?%n%nÈe jo uporablja katerikoli program in jo boste odstranili, tak program verjetno ne bo veè deloval pravilno. Èe niste preprièani, kliknite Ne. Èe boste datoteko ohranili v raèunalniku, ne bo niè narobe. +SharedFileNameLabel=Ime datoteke: +SharedFileLocationLabel=Lokacija: +WizardUninstalling=Odstranjevanje programa +StatusUninstalling=Odstranjujem %1... + +[CustomMessages] + +NameAndVersion=%1 razlièica %2 +AdditionalIcons=Dodatne ikone: +CreateDesktopIcon=Ustvari ikono na &namizju +CreateQuickLaunchIcon=Ustvari ikono za &hitri zagon +ProgramOnTheWeb=%1 na spletu +UninstallProgram=Odstrani %1 +LaunchProgram=Odpri %1 +AssocFileExtension=&Poveži %1 s pripono %2 +AssocingFileExtension=Povezujem %1 s pripono %2... diff --git a/Files/Languages/Spanish.isl b/Files/Languages/Spanish.isl new file mode 100644 index 000000000..71d37e2eb --- /dev/null +++ b/Files/Languages/Spanish.isl @@ -0,0 +1,316 @@ +; *** Inno Setup version 5.1.11+ Spanish messages *** +; +; Maintained by Jorge Andres Brugger (jbrugger@gmx.net) +; Spanish.isl version 0.9 (20100922) +; Default.isl version 1.72 +; +; Thanks to Germán Giraldo, Jordi Latorre, Ximo Tamarit, Emiliano Llano, +; Ramón Verduzco, Graciela García and Carles Millan + +[LangOptions] +; The following three entries are very important. Be sure to read and +; understand the '[LangOptions] section' topic in the help file. +LanguageName=Espa<00F1>ol +LanguageID=$0c0a +LanguageCodePage=1252 +; If the language you are translating to requires special font faces or +; sizes, uncomment any of the following entries and change them accordingly. +;DialogFontName= +;DialogFontSize=8 +;WelcomeFontName=Verdana +;WelcomeFontSize=12 +;TitleFontName=Arial +;TitleFontSize=29 +;CopyrightFontName=Arial +;CopyrightFontSize=8 + +[Messages] + +; *** Application titles +SetupAppTitle=Instalar +SetupWindowTitle=Instalar - %1 +UninstallAppTitle=Desinstalar +UninstallAppFullTitle=Desinstalar - %1 + +; *** Misc. common +InformationTitle=Información +ConfirmTitle=Confirmar +ErrorTitle=Error + +; *** SetupLdr messages +SetupLdrStartupMessage=Este programa instalará %1. ¿Desea continuar? +LdrCannotCreateTemp=Imposible crear archivo temporal. Instalación interrumpida +LdrCannotExecTemp=Imposible ejecutar archivo en la carpeta temporal. Instalación interrumpida + +; *** Startup error messages +LastErrorMessage=%1.%n%nError %2: %3 +SetupFileMissing=El archivo %1 no se encuentra en la carpeta de instalación. Por favor, solucione el problema u obtenga una copia nueva del programa. +SetupFileCorrupt=Los archivos de instalación están dañados. Por favor, obtenga una copia nueva del programa. +SetupFileCorruptOrWrongVer=Los archivos de instalación están dañados, o son incompatibles con esta versión del programa de instalación. Por favor, solucione el problema u obtenga una copia nueva del programa. +NotOnThisPlatform=Este programa no se ejecutará en %1. +OnlyOnThisPlatform=Este programa debe ejecutarse en %1. +OnlyOnTheseArchitectures=Este programa sólo puede instalarse en versiones de Windows diseñadas para las siguientes arquitecturas de procesadores:%n%n%1 +MissingWOW64APIs=La versión de Windows que está utilizando no cuenta con la funcionalidad requerida por el instalador para realizar una instalación de 64-bits. Para solucionar este problema, por favor instale el Service Pack %1. +WinVersionTooLowError=Este programa requiere %1 versión %2 o posterior. +WinVersionTooHighError=Este programa no puede instalarse en %1 versión %2 o posterior. +AdminPrivilegesRequired=Debe iniciar la sesión como administrador para instalar este programa. +PowerUserPrivilegesRequired=Debe iniciar la sesión como administrador o como un miembro del grupo Usuarios Avanzados para instalar este programa. +SetupAppRunningError=El programa de instalación ha detectado que %1 está ejecutándose.%n%nPor favor, ciérrelo ahora, luego haga clic en Aceptar para continuar, o en Cancelar para salir. +UninstallAppRunningError=El desinstalador ha detectado que %1 está ejecutándose.%n%nPor favor, ciérrelo ahora, luego haga clic en Aceptar para continuar, o en Cancelar para salir. + +; *** Misc. errors +ErrorCreatingDir=El programa de instalación no pudo crear la carpeta "%1" +ErrorTooManyFilesInDir=Imposible crear un archivo en la carpeta "%1" porque contiene demasiados archivos + +; *** Setup common messages +ExitSetupTitle=Salir de la Instalación +ExitSetupMessage=La instalación no se ha completado aún. Si cancela ahora, el programa no será instalado.%n%nPuede ejecutar nuevamente el programa de instalación en otra ocasión para completarla.%n%n¿Salir de la instalación? +AboutSetupMenuItem=&Acerca de Instalar... +AboutSetupTitle=Acerca de Instalar +AboutSetupMessage=%1 versión %2%n%3%n%n%1 sitio Web:%n%4 +AboutSetupNote= +TranslatorNote=Spanish translation maintained by Jorge Andres Brugger (jbrugger@gmx.net) + +; *** Buttons +ButtonBack=< &Atrás +ButtonNext=&Siguiente > +ButtonInstall=&Instalar +ButtonOK=Aceptar +ButtonCancel=Cancelar +ButtonYes=&Sí +ButtonYesToAll=Sí a &Todo +ButtonNo=&No +ButtonNoToAll=N&o a Todo +ButtonFinish=&Finalizar +ButtonBrowse=&Examinar... +ButtonWizardBrowse=&Examinar... +ButtonNewFolder=&Crear Nueva Carpeta + +; *** "Select Language" dialog messages +SelectLanguageTitle=Seleccione el Idioma de la Instalación +SelectLanguageLabel=Seleccione el idioma a utilizar durante la instalación: + +; *** Common wizard text +ClickNext=Haga clic en Siguiente para continuar, o en Cancelar para salir de la instalación. +BeveledLabel= +BrowseDialogTitle=Buscar Carpeta +BrowseDialogLabel=Seleccione una carpeta, y luego haga clic en Aceptar. +NewFolderName=Nueva Carpeta + +; *** "Welcome" wizard page +WelcomeLabel1=Bienvenido al asistente de instalación de [name] +WelcomeLabel2=Este programa instalará [name/ver] en su sistema.%n%nSe recomienda que cierre todas las demás aplicaciones antes de continuar. + +; *** "Password" wizard page +WizardPassword=Contraseña +PasswordLabel1=Esta instalación está protegida por contraseña. +PasswordLabel3=Por favor, ingrese la contraseña, y haga clic en Siguiente para continuar. En las contraseñas se hace diferencia entre mayúsculas y minúsculas. +PasswordEditLabel=&Contraseña: +IncorrectPassword=La contraseña ingresada no es correcta. Por favor, inténtelo nuevamente. + +; *** "License Agreement" wizard page +WizardLicense=Acuerdo de Licencia +LicenseLabel=Por favor, lea la siguiente información de importancia antes de continuar. +LicenseLabel3=Por favor, lea el siguiente acuerdo de licencia. Debe aceptar los términos de este acuerdo antes de continuar con la instalación. +LicenseAccepted=A&cepto el acuerdo +LicenseNotAccepted=&No acepto el acuerdo + +; *** "Information" wizard pages +WizardInfoBefore=Información +InfoBeforeLabel=Por favor, lea la siguiente información de importancia antes de continuar. +InfoBeforeClickLabel=Cuando esté listo para continuar con la instalación, haga clic en Siguiente. +WizardInfoAfter=Información +InfoAfterLabel=Por favor, lea la siguiente información de importancia antes de continuar. +InfoAfterClickLabel=Cuando esté listo para continuar, haga clic en Siguiente. + +; *** "User Information" wizard page +WizardUserInfo=Información de Usuario +UserInfoDesc=Por favor, introduzca su información. +UserInfoName=Nombre de &Usuario: +UserInfoOrg=&Organización: +UserInfoSerial=Número de &Serie: +UserInfoNameRequired=Debe ingresar un nombre. + +; *** "Select Destination Location" wizard page +WizardSelectDir=Seleccione la Carpeta de Destino +SelectDirDesc=¿Dónde debe instalarse [name]? +SelectDirLabel3=El programa instalará [name] en la siguiente carpeta. +SelectDirBrowseLabel=Para continuar, haga clic en Siguiente. Si desea seleccionar una carpeta diferente, haga clic en Examinar. +DiskSpaceMBLabel=Se requieren al menos [mb] MB de espacio libre en el disco. +ToUNCPathname=No es posible realizar la instalación en una ruta de acceso UNC. Si está intentando instalar en una red, necesitará mapear una unidad de la red. +InvalidPath=Debe ingresar una ruta completa con la letra de la unidad; por ejemplo:%n%nC:\APP%n%no una ruta de acceso UNC de la siguiente forma:%n%n\\servidor\compartido +InvalidDrive=La unidad o ruta de acceso UNC que seleccionó no existe o no es accesible. Por favor, seleccione otra. +DiskSpaceWarningTitle=Espacio Insuficiente en Disco +DiskSpaceWarning=La instalación requiere al menos %1 KB de espacio libre, pero la unidad seleccionada sólo cuenta con %2 KB disponibles.%n%n¿Desea continuar de todas formas? +DirNameTooLong=El nombre de la carpeta o la ruta son demasiado largos. +InvalidDirName=El nombre de la carpeta no es válido. +BadDirName32=Los nombres de carpetas no pueden incluir los siguientes caracteres:%n%n%1 +DirExistsTitle=La Carpeta Ya Existe +DirExists=La carpeta:%n%n%1%n%nya existe. ¿Desea realizar la instalación en esa carpeta de todas formas? +DirDoesntExistTitle=La Carpeta No Existe +DirDoesntExist=La carpeta:%n%n%1%n%nno existe. ¿Desea crear esa carpeta? + +; *** "Select Components" wizard page +WizardSelectComponents=Seleccione los Componentes +SelectComponentsDesc=¿Qué componentes deben instalarse? +SelectComponentsLabel2=Seleccione los componentes que desea instalar; desactive los componentes que no desea instalar. Haga clic en Siguiente cuando esté listo para continuar. +FullInstallation=Instalación Completa +; if possible don't translate 'Compact' as 'Minimal' (I mean 'Minimal' in your language) +CompactInstallation=Instalación Compacta +CustomInstallation=Instalación Personalizada +NoUninstallWarningTitle=Componentes Existentes +NoUninstallWarning=El programa de instalación ha detectado que los siguientes componentes ya están instalados en su sistema:%n%n%1%n%nQuitar la selección a estos componentes no los desinstalará.%n%n¿Desea continuar de todos modos? +ComponentSize1=%1 KB +ComponentSize2=%1 MB +ComponentsDiskSpaceMBLabel=La selección actual requiere al menos [mb] MB de espacio en disco. + +; *** "Select Additional Tasks" wizard page +WizardSelectTasks=Seleccione las Tareas Adicionales +SelectTasksDesc=¿Qué tareas adicionales deben realizarse? +SelectTasksLabel2=Seleccione las tareas adicionales que desea que se realicen durante la instalación de [name] y haga clic en Siguiente. + +; *** "Select Start Menu Folder" wizard page +WizardSelectProgramGroup=Seleccione la Carpeta del Menú Inicio +SelectStartMenuFolderDesc=¿Dónde deben colocarse los accesos directos del programa? +SelectStartMenuFolderLabel3=El programa de instalación creará los accesos directos del programa en la siguiente carpeta del Menú Inicio. +SelectStartMenuFolderBrowseLabel=Para continuar, haga clic en Siguiente. Si desea seleccionar una carpeta distinta, haga clic en Examinar. +MustEnterGroupName=Debe proporcionar un nombre de carpeta. +GroupNameTooLong=El nombre de la carpeta o la ruta son demasiado largos. +InvalidGroupName=El nombre de la carpeta no es válido. +BadGroupName=El nombre de la carpeta no puede incluir ninguno de los siguientes caracteres:%n%n%1 +NoProgramGroupCheck2=&No crear una carpeta en el Menú Inicio + +; *** "Ready to Install" wizard page +WizardReady=Listo para Instalar +ReadyLabel1=Ahora el programa está listo para iniciar la instalación de [name] en su sistema. +ReadyLabel2a=Haga clic en Instalar para continuar con el proceso, o haga clic en Atrás si desea revisar o cambiar alguna configuración. +ReadyLabel2b=Haga clic en Instalar para continuar con el proceso. +ReadyMemoUserInfo=Información del usuario: +ReadyMemoDir=Carpeta de Destino: +ReadyMemoType=Tipo de Instalación: +ReadyMemoComponents=Componentes Seleccionados: +ReadyMemoGroup=Carpeta del Menú Inicio: +ReadyMemoTasks=Tareas Adicionales: + +; *** "Preparing to Install" wizard page +WizardPreparing=Preparándose para Instalar +PreparingDesc=El programa de instalación está preparándose para instalar [name] en su sistema. +PreviousInstallNotCompleted=La instalación/desinstalación previa de un programa no se completó. Deberá reiniciar el sistema para completar esa instalación.%n%nUna vez reiniciado el sistema, ejecute el programa de instalación nuevamente para completar la instalación de [name]. +CannotContinue=El programa de instalación no puede continuar. Por favor, presione Cancelar para salir. + +; *** "Installing" wizard page +WizardInstalling=Instalando +InstallingLabel=Por favor, espere mientras se instala [name] en su sistema. + +; *** "Setup Completed" wizard page +FinishedHeadingLabel=Completando la instalación de [name] +FinishedLabelNoIcons=El programa completó la instalación de [name] en su sistema. +FinishedLabel=El programa completó la instalación de [name] en su sistema. Puede ejecutar la aplicación haciendo clic sobre el icono instalado. +ClickFinish=Haga clic en Finalizar para salir del programa de instalación. +FinishedRestartLabel=Para completar la instalación de [name], su sistema debe reiniciarse. ¿Desea reiniciarlo ahora? +FinishedRestartMessage=Para completar la instalación de [name], su sistema debe reiniciarse.%n%n¿Desea reiniciarlo ahora? +ShowReadmeCheck=Sí, deseo ver el archivo LÉAME +YesRadio=&Sí, deseo reiniciar el sistema ahora +NoRadio=&No, reiniciaré el sistema más tarde +; used for example as 'Run MyProg.exe' +RunEntryExec=Ejecutar %1 +; used for example as 'View Readme.txt' +RunEntryShellExec=Ver %1 + +; *** "Setup Needs the Next Disk" stuff +ChangeDiskTitle=El Programa de Instalación Necesita el Siguiente Disco +SelectDiskLabel2=Por favor, inserte el Disco %1 y haga clic en Aceptar.%n%nSi los archivos pueden ser hallados en una carpeta diferente a la indicada abajo, introduzca la ruta correcta o haga clic en Examinar. +PathLabel=&Ruta: +FileNotInDir2=El archivo "%1" no se ha podido hallar en "%2". Por favor, inserte el disco correcto o seleccione otra carpeta. +SelectDirectoryLabel=Por favor, especifique la ubicación del siguiente disco. + +; *** Installation phase messages +SetupAborted=La instalación no se ha completado.%n%nPor favor solucione el problema y ejecute nuevamente el programa de instalación. +EntryAbortRetryIgnore=Haga clic en Reintentar para intentarlo de nuevo, en Omitir para continuar de todas formas, o en Anular para cancelar la instalación. + +; *** Installation status messages +StatusCreateDirs=Creando carpetas... +StatusExtractFiles=Extrayendo archivos... +StatusCreateIcons=Creando accesos directos... +StatusCreateIniEntries=Creando entradas INI... +StatusCreateRegistryEntries=Creando entradas de registro... +StatusRegisterFiles=Registrando archivos... +StatusSavingUninstall=Guardando información para desinstalar... +StatusRunProgram=Terminando la instalación... +StatusRollback=Deshaciendo cambios... + +; *** Misc. errors +ErrorInternal2=Error interno: %1 +ErrorFunctionFailedNoCode=%1 falló +ErrorFunctionFailed=%1 falló; código %2 +ErrorFunctionFailedWithMessage=%1 falló; código %2.%n%3 +ErrorExecutingProgram=Imposible ejecutar el archivo:%n%1 + +; *** Registry errors +ErrorRegOpenKey=Error al abrir la clave del registro:%n%1\%2 +ErrorRegCreateKey=Error al crear la clave del registro:%n%1\%2 +ErrorRegWriteKey=Error al escribir la clave del registro:%n%1\%2 + +; *** INI errors +ErrorIniEntry=Error al crear entrada INI en el archivo "%1". + +; *** File copying errors +FileAbortRetryIgnore=Haga clic en Reintentar para intentarlo de nuevo, en Omitir para excluir este archivo (no recomendado), o en Anular para cancelar la instalación. +FileAbortRetryIgnore2=Haga clic en Reintentar para intentarlo de nuevo, en Omitir para continuar de todas formas (no recomendado), o en Anular para cancelar la instalación. +SourceIsCorrupted=El archivo de origen está dañado +SourceDoesntExist=El archivo de origen "%1" no existe +ExistingFileReadOnly=El archivo existente está marcado como sólo-lectura.%n%nHaga clic en Reintentar para quitar el atributo de sólo-lectura e intentarlo de nuevo, en Omitir para excluir este archivo, o en Anular para cancelar la instalación. +ErrorReadingExistingDest=Ocurrió un error mientras se intentaba leer el archivo: +FileExists=El archivo ya existe.%n%n¿Desea sobreescribirlo? +ExistingFileNewer=El archivo existente es más reciente que el que está tratando de instalar. Se recomienda que mantenga el archivo existente.%n%n¿Desea mantener el archivo existente? +ErrorChangingAttr=Ocurrió un error al intentar cambiar los atributos del archivo: +ErrorCreatingTemp=Ocurrió un error al intentar crear un archivo en la carpeta de destino: +ErrorReadingSource=Ocurrió un error al intentar leer el archivo de origen: +ErrorCopying=Ocurrió un error al intentar copiar el archivo: +ErrorReplacingExistingFile=Ocurrió un error al intentar reemplazar el archivo existente: +ErrorRestartReplace=Falló reintento de reemplazar: +ErrorRenamingTemp=Ocurrió un error al intentar renombrar un archivo en la carpeta de destino: +ErrorRegisterServer=Imposible registrar el DLL/OCX: %1 +ErrorRegSvr32Failed=RegSvr32 falló con el código de salida %1 +ErrorRegisterTypeLib=Imposible registrar la librería de tipos: %1 + +; *** Post-installation errors +ErrorOpeningReadme=Ocurrió un error al intentar abrir el archivo LÉAME. +ErrorRestartingComputer=El programa de instalación no pudo reiniciar el equipo. Por favor, hágalo manualmente. + +; *** Uninstaller messages +UninstallNotFound=El archivo "%1" no existe. Imposible desinstalar. +UninstallOpenError=El archivo "%1" no pudo ser abierto. Imposible desinstalar +UninstallUnsupportedVer=El archivo de registro para desinstalar "%1" está en un formato no reconocido por esta versión del desinstalador. Imposible desinstalar +UninstallUnknownEntry=Una entrada desconocida (%1) fue encontrada en el registro de desinstalación +ConfirmUninstall=¿Está seguro que desea desinstalar completamente %1 y todos sus componentes? +UninstallOnlyOnWin64=Este programa sólo puede ser desinstalado en Windows de 64-bits. +OnlyAdminCanUninstall=Este programa sólo puede ser desinstalado por un usuario con privilegios administrativos. +UninstallStatusLabel=Por favor, espere mientras %1 es desinstalado de su sistema. +UninstalledAll=%1 fue desinstalado satisfactoriamente de su sistema. +UninstalledMost=La desinstalación de %1 ha sido completada.%n%nAlgunos elementos no pudieron eliminarse. Estos pueden ser eliminados manualmente. +UninstalledAndNeedsRestart=Para completar la desinstalación de %1, su sistema debe reiniciarse.%n%n¿Desea reiniciarlo ahora? +UninstallDataCorrupted=El archivo "%1" está dañado. No puede desinstalarse + +; *** Uninstallation phase messages +ConfirmDeleteSharedFileTitle=¿Eliminar Archivo Compartido? +ConfirmDeleteSharedFile2=El sistema indica que el siguiente archivo compartido no es usado por ningún otro programa. ¿Desea eliminar este archivo compartido?%n%nSi hay programas que usan este archivo y el mismo es eliminado, esos programas pueden dejar de funcionar correctamente. Si no está seguro, elija No. Dejar el archivo en su sistema no producirá ningún daño. +SharedFileNameLabel=Archivo: +SharedFileLocationLabel=Ubicación: +WizardUninstalling=Estado de la Desinstalación +StatusUninstalling=Desinstalando %1... + +; The custom messages below aren't used by Setup itself, but if you make +; use of them in your scripts, you'll want to translate them. + +[CustomMessages] + +NameAndVersion=%1 versión %2 +AdditionalIcons=Iconos adicionales: +CreateDesktopIcon=Crear un icono en el &escritorio +CreateQuickLaunchIcon=Crear un icono de &Inicio Rápido +ProgramOnTheWeb=%1 en la Web +UninstallProgram=Desinstalar %1 +LaunchProgram=Ejecutar %1 +AssocFileExtension=&Asociar %1 con la extensión de archivo %2 +AssocingFileExtension=Asociando %1 con la extensión de archivo %2... diff --git a/Files/WizModernImage-IS.bmp b/Files/WizModernImage-IS.bmp new file mode 100644 index 000000000..cf844e093 Binary files /dev/null and b/Files/WizModernImage-IS.bmp differ diff --git a/Files/WizModernImage.bmp b/Files/WizModernImage.bmp new file mode 100644 index 000000000..cb05a0632 Binary files /dev/null and b/Files/WizModernImage.bmp differ diff --git a/Files/WizModernSmallImage-IS.bmp b/Files/WizModernSmallImage-IS.bmp new file mode 100644 index 000000000..1e8e49792 Binary files /dev/null and b/Files/WizModernSmallImage-IS.bmp differ diff --git a/Files/WizModernSmallImage.bmp b/Files/WizModernSmallImage.bmp new file mode 100644 index 000000000..63f421040 Binary files /dev/null and b/Files/WizModernSmallImage.bmp differ diff --git a/Files/isbunzip.dll b/Files/isbunzip.dll new file mode 100644 index 000000000..2128bd218 Binary files /dev/null and b/Files/isbunzip.dll differ diff --git a/Files/isbzip.dll b/Files/isbzip.dll new file mode 100644 index 000000000..49b183f8d Binary files /dev/null and b/Files/isbzip.dll differ diff --git a/Files/islzma.dll b/Files/islzma.dll new file mode 100644 index 000000000..49395ada5 Binary files /dev/null and b/Files/islzma.dll differ diff --git a/Files/islzma32.exe b/Files/islzma32.exe new file mode 100644 index 000000000..1c52e778c Binary files /dev/null and b/Files/islzma32.exe differ diff --git a/Files/islzma64.exe b/Files/islzma64.exe new file mode 100644 index 000000000..2c9f30578 Binary files /dev/null and b/Files/islzma64.exe differ diff --git a/Files/isscint.dll b/Files/isscint.dll new file mode 100644 index 000000000..ac5707ea3 Binary files /dev/null and b/Files/isscint.dll differ diff --git a/Files/isunzlib.dll b/Files/isunzlib.dll new file mode 100644 index 000000000..49929d3c8 Binary files /dev/null and b/Files/isunzlib.dll differ diff --git a/Files/iszlib.dll b/Files/iszlib.dll new file mode 100644 index 000000000..841834f28 Binary files /dev/null and b/Files/iszlib.dll differ diff --git a/Projects/.gitignore b/Projects/.gitignore new file mode 100644 index 000000000..743e9ae7c --- /dev/null +++ b/Projects/.gitignore @@ -0,0 +1,5 @@ +*.dcu +*.dll +*.exe +buildtag.inc +setup-*.bin diff --git a/Projects/ArcFour.pas b/Projects/ArcFour.pas new file mode 100644 index 000000000..dbd70f48d --- /dev/null +++ b/Projects/ArcFour.pas @@ -0,0 +1,76 @@ +unit ArcFour; + +{ + Inno Setup + Copyright (C) 1997-2004 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Interface to ISCrypt.dll (ARCFOUR encryption/decryption) + + $jrsoftware: issrc/Projects/ArcFour.pas,v 1.2 2004/04/26 19:11:23 jr Exp $ +} + +interface + +uses + Windows; + +type + TArcFourContext = record + state: array[0..255] of Byte; + x, y: Byte; + end; + +function ArcFourInitFunctions(Module: HMODULE): Boolean; +procedure ArcFourInit(var Context: TArcFourContext; const Key; + KeyLength: Cardinal); +procedure ArcFourCrypt(var Context: TArcFourContext; const InBuffer; + var OutBuffer; Length: Cardinal); +procedure ArcFourDiscard(var Context: TArcFourContext; Bytes: Cardinal); + +implementation + +var + _ISCryptGetVersion: function: Integer; stdcall; + _ArcFourInit: procedure(var context: TArcFourContext; const key; + key_length: Cardinal); stdcall; + _ArcFourCrypt: procedure(var context: TArcFourContext; const in_buffer; + var out_buffer; length: Cardinal); stdcall; + +function ArcFourInitFunctions(Module: HMODULE): Boolean; +begin + _ISCryptGetVersion := GetProcAddress(Module, 'ISCryptGetVersion'); + _ArcFourInit := GetProcAddress(Module, 'ArcFourInit'); + _ArcFourCrypt := GetProcAddress(Module, 'ArcFourCrypt'); + if Assigned(_ISCryptGetVersion) and Assigned(_ArcFourInit) and + Assigned(_ArcFourCrypt) then begin + { Verify that the DLL's version is what we expect } + Result := (_ISCryptGetVersion = 1); + end + else begin + Result := False; + _ISCryptGetVersion := nil; + _ArcFourInit := nil; + _ArcFourCrypt := nil; + end +end; + +procedure ArcFourInit(var Context: TArcFourContext; const Key; + KeyLength: Cardinal); +begin + _ArcFourInit(Context, Key, KeyLength); +end; + +procedure ArcFourCrypt(var Context: TArcFourContext; const InBuffer; + var OutBuffer; Length: Cardinal); +begin + _ArcFourCrypt(Context, InBuffer, OutBuffer, Length); +end; + +procedure ArcFourDiscard(var Context: TArcFourContext; Bytes: Cardinal); +begin + _ArcFourCrypt(Context, Pointer(nil)^, Pointer(nil)^, Bytes); +end; + +end. diff --git a/Projects/BrowseFunc.pas b/Projects/BrowseFunc.pas new file mode 100644 index 000000000..cc62097d2 --- /dev/null +++ b/Projects/BrowseFunc.pas @@ -0,0 +1,268 @@ +unit BrowseFunc; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Functions for browsing for folders/files + + $jrsoftware: issrc/Projects/BrowseFunc.pas,v 1.9 2010/09/10 01:08:44 jr Exp $ +} + +interface + +{$I VERSION.INC} + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms; + +function BrowseForFolder(const Prompt: String; var Directory: String; + const ParentWnd: HWND; const NewFolderButton: Boolean): Boolean; +function NewGetOpenFileName(const Prompt: String; var FileName: String; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND): Boolean; +function NewGetOpenFileNameMulti(const Prompt: String; const FileNameList: TStrings; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND): Boolean; +function NewGetSaveFileName(const Prompt: String; var FileName: String; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND): Boolean; + +implementation + +uses + CommDlg, ShlObj, {$IFNDEF Delphi3orHigher} Ole2, {$ELSE} ActiveX, {$ENDIF} + PathFunc; + +function BrowseCallback(Wnd: HWND; uMsg: UINT; lParam, lpData: LPARAM): Integer; stdcall; +var + ShouldEnable: Boolean; + Path: array[0..MAX_PATH-1] of Char; +begin + case uMsg of + BFFM_INITIALIZED: + begin + if lpData <> 0 then + SendMessage(Wnd, BFFM_SETSELECTION, 1, lpData); + end; + BFFM_SELCHANGED: + begin + { In a BIF_NEWDIALOGSTYLE dialog, BIF_RETURNONLYFSDIRS does not cause + the OK button to be disabled automatically when the user clicks a + non-FS item (e.g. My Computer), so do that ourself. } + ShouldEnable := SHGetPathFromIDList(PItemIDList(lParam), Path); + SendMessage(Wnd, BFFM_ENABLEOK, 0, Ord(ShouldEnable)); + end; + end; + Result := 0; +end; + +function BrowseForFolder(const Prompt: String; var Directory: String; + const ParentWnd: HWND; const NewFolderButton: Boolean): Boolean; +const + BIF_NONEWFOLDERBUTTON = $200; + BIF_NEWDIALOGSTYLE = $0040; +var + InitialDir: String; + Malloc: IMalloc; + BrowseInfo: TBrowseInfo; + DisplayName, Path: array[0..MAX_PATH-1] of Char; + ActiveWindow: HWND; + WindowList: Pointer; + IDList: PItemIDList; +begin + Result := False; + InitialDir := RemoveBackslashUnlessRoot(Directory); { Win95 doesn't allow trailing backslash } + if FAILED(SHGetMalloc(Malloc)) then + Malloc := nil; + FillChar(BrowseInfo, SizeOf(BrowseInfo), 0); + with BrowseInfo do begin + hwndOwner := ParentWnd; + pszDisplayName := @DisplayName; + lpszTitle := PChar(Prompt); + ulFlags := BIF_RETURNONLYFSDIRS or BIF_NEWDIALOGSTYLE; + if not NewFolderButton then + ulFlags := ulFlags or BIF_NONEWFOLDERBUTTON; + lpfn := BrowseCallback; + if InitialDir <> '' then + Pointer(lParam) := PChar(InitialDir); + end; + ActiveWindow := GetActiveWindow; + WindowList := DisableTaskWindows(0); + CoInitialize(nil); + try + IDList := SHBrowseForFolder(BrowseInfo); + finally + CoUninitialize(); + EnableTaskWindows(WindowList); + { SetActiveWindow(Application.Handle) is needed or else the focus doesn't + properly return to ActiveWindow } + SetActiveWindow(Application.Handle); + SetActiveWindow(ActiveWindow); + end; + try + if (IDList = nil) or not SHGetPathFromIDList(IDList, Path) then + Exit; + Directory := Path; + finally + if Assigned(Malloc) then + Malloc.Free(IDList); + end; + Result := True; +end; + +type + TGetOpenOrSaveFileNameFunc = function(var OpenFile: TOpenFilename): Bool; stdcall; + +function NewGetOpenOrSaveFileName(const Prompt: String; var FileName: String; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND; const GetOpenOrSaveFileNameFunc: TGetOpenOrSaveFileNameFunc; + const Flags: DWORD): Boolean; + + function AllocFilterStr(const S: string): string; + var + P: PChar; + begin + Result := ''; + if S <> '' then + begin + Result := S + #0; // double null terminators + P := PathStrScan(PChar(Result), '|'); + while P <> nil do + begin + P^ := #0; + Inc(P); + P := PathStrScan(P, '|'); + end; + end; + end; + + function GetMultiSelectString(const P: PChar): String; + var + E: PChar; + begin + E := P; + while E^ <> #0 do + Inc(E, StrLen(E) + 1); + SetString(Result, P, E - P); + end; + +var + ofn: TOpenFileName; + lpstrFile: array[0..8191] of Char; + TempFilter: String; + SaveCurDir: String; + ActiveWindow: HWND; + WindowList: Pointer; + FPUControlWord: Word; +begin + StrPLCopy(lpstrFile, FileName, (SizeOf(lpstrFile) div SizeOf(lpstrFile[0])) - 1); + + FillChar(ofn, SizeOf(ofn), 0); + ofn.lStructSize := SizeOf(ofn); + ofn.hwndOwner := ParentWnd; + TempFilter := AllocFilterStr(Filter); + ofn.lpstrFilter := PChar(TempFilter); + ofn.lpstrFile := lpstrFile; + ofn.nMaxFile := SizeOf(lpstrFile) div SizeOf(lpstrFile[0]); + ofn.lpstrInitialDir := PChar(InitialDirectory); + ofn.lpstrTitle := PChar(Prompt); + ofn.Flags := Flags or OFN_NOCHANGEDIR; + ofn.lpstrDefExt := Pointer(DefaultExtension); + + ActiveWindow := GetActiveWindow; + WindowList := DisableTaskWindows(0); + try + asm + // Avoid FPU control word change in NETRAP.dll, NETAPI32.dll, etc + FNSTCW FPUControlWord + end; + try + SaveCurDir := GetCurrentDir; + if GetOpenOrSaveFileNameFunc(ofn) then begin + if Flags and OFN_ALLOWMULTISELECT <> 0 then + FileName := GetMultiSelectString(lpstrFile) + else + FileName := lpstrFile; + Result := True; + end else + Result := False; + { Restore current directory. The OFN_NOCHANGEDIR flag we pass is + supposed to do that, but the MSDN docs claim: "This flag is + ineffective for GetOpenFileName." I see no such problem on + Windows 2000 or XP, but to be safe... } + SetCurrentDir(SaveCurDir); + finally + asm + FNCLEX + FLDCW FPUControlWord + end; + end; + finally + EnableTaskWindows(WindowList); + { SetActiveWindow(Application.Handle) is needed or else the focus doesn't + properly return to ActiveWindow } + SetActiveWindow(Application.Handle); + SetActiveWindow(ActiveWindow); + end; +end; + +function NewGetOpenFileName(const Prompt: String; var FileName: String; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND): Boolean; +begin + Result := NewGetOpenOrSaveFileName(Prompt, FileName, InitialDirectory, Filter, DefaultExtension, + ParentWnd, GetOpenFileName, OFN_HIDEREADONLY or OFN_PATHMUSTEXIST or OFN_FILEMUSTEXIST); +end; + +function NewGetOpenFileNameMulti(const Prompt: String; const FileNameList: TStrings; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND): Boolean; + + function ExtractStr(var P: PChar): String; + var + L: Integer; + begin + L := StrLen(P); + SetString(Result, P, L); + if L > 0 then + Inc(P, L + 1); + end; + +var + Files, Dir, FileName: String; + P: PChar; +begin + Result := NewGetOpenOrSaveFileName(Prompt, Files, InitialDirectory, Filter, DefaultExtension, + ParentWnd, GetOpenFileName, OFN_HIDEREADONLY or OFN_PATHMUSTEXIST or OFN_FILEMUSTEXIST or + OFN_ALLOWMULTISELECT or OFN_EXPLORER); + if Result then begin + FileNameList.Clear; + P := PChar(Files); + Dir := ExtractStr(P); + FileName := ExtractStr(P); + if FileName = '' then begin + { When only one file is selected, the list contains just a file name } + FileNameList.Add(Dir); + end + else begin + repeat + { The filenames can include paths if the user typed them in manually } + FileNameList.Add(PathCombine(Dir, FileName)); + FileName := ExtractStr(P); + until FileName = ''; + end; + end; +end; + +function NewGetSaveFileName(const Prompt: String; var FileName: String; + const InitialDirectory, Filter, DefaultExtension: String; + const ParentWnd: HWND): Boolean; +begin + Result := NewGetOpenOrSaveFileName(Prompt, FileName, InitialDirectory, Filter, DefaultExtension, + ParentWnd, GetSaveFileName, OFN_OVERWRITEPROMPT or OFN_HIDEREADONLY or OFN_PATHMUSTEXIST); +end; + +end. diff --git a/Projects/CmnFunc.pas b/Projects/CmnFunc.pas new file mode 100644 index 000000000..e04fd82c2 --- /dev/null +++ b/Projects/CmnFunc.pas @@ -0,0 +1,473 @@ +unit CmnFunc; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Common VCL functions + + $jrsoftware: issrc/Projects/CmnFunc.pas,v 1.24 2010/05/24 19:17:21 jr Exp $ +} + +{$B-} + +interface + +{$I VERSION.INC} + +uses + Windows, Messages, SysUtils, Forms, Graphics, Controls, StdCtrls, Classes; + +type + TWindowDisabler = class + private + FFallbackWnd, FOwnerWnd: HWND; + FPreviousActiveWnd, FPreviousFocusWnd: HWND; + FWindowList: Pointer; + public + constructor Create; + destructor Destroy; override; + end; + + { Note: This type is also present in ScriptFunc_C.pas } + TMsgBoxType = (mbInformation, mbConfirmation, mbError, mbCriticalError); + + TMsgBoxCallbackFunc = procedure(const Flags: LongInt; const After: Boolean; + const Param: LongInt); + +{ Useful constant } +const + EnableColor: array[Boolean] of TColor = (clBtnFace, clWindow); + +procedure UpdateHorizontalExtent(const ListBox: TCustomListBox); +function MinimizePathName(const Filename: String; const Font: TFont; + MaxLen: Integer): String; +function AppMessageBox(const Text, Caption: PChar; Flags: Longint): Integer; +function MsgBoxP(const Text, Caption: PChar; const Typ: TMsgBoxType; + const Buttons: Cardinal): Integer; +function MsgBox(const Text, Caption: String; const Typ: TMsgBoxType; + const Buttons: Cardinal): Integer; +function MsgBoxFmt(const Text: String; const Args: array of const; + const Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal): Integer; +procedure ReactivateTopWindow; +procedure SetMessageBoxCaption(const Typ: TMsgBoxType; const NewCaption: PChar); +procedure SetMessageBoxRightToLeft(const ARightToLeft: Boolean); +procedure SetMessageBoxCallbackFunc(const AFunc: TMsgBoxCallbackFunc; const AParam: LongInt); + +implementation + +uses + Consts, PathFunc, CmnFunc2; + +var + MessageBoxCaptions: array[TMsgBoxType] of PChar; + MessageBoxRightToLeft: Boolean; + MessageBoxCallbackFunc: TMsgBoxCallbackFunc; + MessageBoxCallbackParam: LongInt; + MessageBoxCallbackActive: Boolean; + +type + TListBoxAccess = class(TCustomListBox); + +procedure UpdateHorizontalExtent(const ListBox: TCustomListBox); +var + I: Integer; + Extent, MaxExtent: Longint; + DC: HDC; + Size: TSize; + TextMetrics: TTextMetric; +begin + DC := GetDC(0); + try + SelectObject(DC, TListBoxAccess(ListBox).Font.Handle); + + //Q66370 says tmAveCharWidth should be added to extent + GetTextMetrics(DC, TextMetrics); + + MaxExtent := 0; + for I := 0 to ListBox.Items.Count-1 do begin + GetTextExtentPoint32(DC, PChar(ListBox.Items[I]), Length(ListBox.Items[I]), Size); + Extent := Size.cx + TextMetrics.tmAveCharWidth; + if Extent > MaxExtent then + MaxExtent := Extent; + end; + + finally + ReleaseDC(0, DC); + end; + + if MaxExtent > SendMessage(ListBox.Handle, LB_GETHORIZONTALEXTENT, 0, 0) then + SendMessage(ListBox.Handle, LB_SETHORIZONTALEXTENT, MaxExtent, 0); +end; + +function MinimizePathName(const Filename: String; const Font: TFont; + MaxLen: Integer): String; + + procedure CutFirstDirectory(var S: String); + var + P: Integer; + begin + if Copy(S, 1, 4) = '...\' then + Delete(S, 1, 4); + P := PathPos('\', S); + if P <> 0 then + begin + Delete(S, 1, P); + S := '...\' + S; + end + else + S := ''; + end; + +var + DC: HDC; + Drive, Dir, Name: String; + DriveLen: Integer; +begin + DC := GetDC(0); + try + SelectObject(DC, Font.Handle); + + Result := FileName; + Dir := PathExtractPath(Result); + Name := PathExtractName(Result); + + DriveLen := PathDrivePartLength(Dir); + { Include any slash following drive part, or a leading slash if DriveLen=0 } + if (DriveLen < Length(Dir)) and PathCharIsSlash(Dir[DriveLen+1]) then + Inc(DriveLen); + Drive := Copy(Dir, 1, DriveLen); + Delete(Dir, 1, DriveLen); + + while ((Dir <> '') or (Drive <> '')) and (GetTextWidth(DC, Result, False) > MaxLen) do + begin + if Dir <> '' then + CutFirstDirectory(Dir); + { If there's no directory left, minimize the drive part. + 'C:\...\filename' -> '...\filename' } + if (Dir = '') and (Drive <> '') then + begin + Drive := ''; + Dir := '...\'; + end; + Result := Drive + Dir + Name; + end; + finally + ReleaseDC(0, DC); + end; +end; + +procedure SetMessageBoxCaption(const Typ: TMsgBoxType; const NewCaption: PChar); +begin + StrDispose(MessageBoxCaptions[Typ]); + MessageBoxCaptions[Typ] := nil; + if Assigned(NewCaption) then + MessageBoxCaptions[Typ] := StrNew(NewCaption); +end; + +procedure SetMessageBoxRightToLeft(const ARightToLeft: Boolean); +begin + MessageBoxRightToLeft := ARightToLeft; +end; + +procedure SetMessageBoxCallbackFunc(const AFunc: TMsgBoxCallbackFunc; const AParam: LongInt); +begin + MessageBoxCallbackFunc := AFunc; + MessageBoxCallbackParam := AParam; +end; + +procedure TriggerMessageBoxCallbackFunc(const Flags: LongInt; const After: Boolean); +begin + if Assigned(MessageBoxCallbackFunc) and not MessageBoxCallbackActive then begin + MessageBoxCallbackActive := True; + try + MessageBoxCallbackFunc(Flags, After, MessageBoxCallbackParam); + finally + MessageBoxCallbackActive := False; + end; + end; +end; + +{$IFNDEF IS_D4} +function MoveAppWindowToActiveWindowMonitor(var OldRect: TRect): Boolean; +{ This moves the application window (Application.Handle) to the same monitor + as the active window, so that a subsequent call to Application.MessageBox + displays the message box on that monitor. Based on code from D4+'s + TApplication.MessageBox. } +type + HMONITOR = type THandle; + TMonitorInfo = record + cbSize: DWORD; + rcMonitor: TRect; + rcWork: TRect; + dwFlags: DWORD; + end; +const + MONITOR_DEFAULTTONEAREST = $00000002; +var + ActiveWindow: HWND; + Module: HMODULE; + MonitorFromWindow: function(hwnd: HWND; dwFlags: DWORD): HMONITOR; stdcall; + GetMonitorInfo: function(hMonitor: HMONITOR; var lpmi: TMonitorInfo): BOOL; stdcall; + MBMonitor, AppMonitor: HMONITOR; + Info: TMonitorInfo; +begin + Result := False; + ActiveWindow := GetActiveWindow; + if ActiveWindow = 0 then Exit; + Module := GetModuleHandle(user32); + MonitorFromWindow := GetProcAddress(Module, 'MonitorFromWindow'); + GetMonitorInfo := GetProcAddress(Module, 'GetMonitorInfoA'); + if Assigned(MonitorFromWindow) and Assigned(GetMonitorInfo) then begin + MBMonitor := MonitorFromWindow(ActiveWindow, MONITOR_DEFAULTTONEAREST); + AppMonitor := MonitorFromWindow(Application.Handle, MONITOR_DEFAULTTONEAREST); + if MBMonitor <> AppMonitor then begin + Info.cbSize := SizeOf(Info); + if GetMonitorInfo(MBMonitor, Info) then begin + GetWindowRect(Application.Handle, OldRect); + SetWindowPos(Application.Handle, 0, + Info.rcMonitor.Left + ((Info.rcMonitor.Right - Info.rcMonitor.Left) div 2), + Info.rcMonitor.Top + ((Info.rcMonitor.Bottom - Info.rcMonitor.Top) div 2), + 0, 0, SWP_NOACTIVATE or SWP_NOREDRAW or SWP_NOSIZE or SWP_NOZORDER); + Result := True; + end; + end; + end; +end; +{$ENDIF} + +function AppMessageBox(const Text, Caption: PChar; Flags: Longint): Integer; +var + ActiveWindow: HWND; + WindowList: Pointer; +{$IFNDEF IS_D4} + DidMove: Boolean; + OldRect: TRect; +{$ENDIF} +begin + if MessageBoxRightToLeft then + Flags := Flags or (MB_RTLREADING or MB_RIGHT); + + { If the application window isn't currently visible, show the message box + with no owner window so it'll get a taskbar button } + if (GetWindowLong(Application.Handle, GWL_STYLE) and WS_VISIBLE = 0) or + (GetWindowLong(Application.Handle, GWL_EXSTYLE) and WS_EX_TOOLWINDOW <> 0) then begin + ActiveWindow := GetActiveWindow; + WindowList := DisableTaskWindows(0); + try + { Note: DisableTaskWindows doesn't disable invisible windows. + MB_TASKMODAL will ensure that Application.Handle gets disabled too. } + Result := MessageBox(0, Text, Caption, Flags or MB_TASKMODAL); + finally + EnableTaskWindows(WindowList); + SetActiveWindow(ActiveWindow); + end; + Exit; + end; + + TriggerMessageBoxCallbackFunc(Flags, False); + try +{$IFDEF IS_D4} + { On Delphi 4+, simply call Application.MessageBox } + Result := Application.MessageBox(Text, Caption, Flags); +{$ELSE} + { Use custom implementation on Delphi 2 and 3. The Flags parameter is + incorrectly declared as a Word on Delphi 2's Application.MessageBox, and + there is no support for multiple monitors. } + DidMove := MoveAppWindowToActiveWindowMonitor(OldRect); + try + ActiveWindow := GetActiveWindow; + WindowList := DisableTaskWindows(0); + try + Result := MessageBox(Application.Handle, Text, Caption, Flags); + finally + EnableTaskWindows(WindowList); + SetActiveWindow(ActiveWindow); + end; + finally + if DidMove then + SetWindowPos(Application.Handle, 0, + OldRect.Left + ((OldRect.Right - OldRect.Left) div 2), + OldRect.Top + ((OldRect.Bottom - OldRect.Top) div 2), + 0, 0, SWP_NOACTIVATE or SWP_NOREDRAW or SWP_NOSIZE or SWP_NOZORDER); + end; +{$ENDIF} + finally + TriggerMessageBoxCallbackFunc(Flags, True); + end; +end; + +function MsgBoxP(const Text, Caption: PChar; const Typ: TMsgBoxType; + const Buttons: Cardinal): Integer; +const + IconFlags: array[TMsgBoxType] of Cardinal = + (MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONEXCLAMATION, MB_ICONSTOP); + {$IFNDEF Delphi3orHigher} + DefaultCaptions: array[TMsgBoxType] of Word = + (SMsgDlgInformation, SMsgDlgConfirm, SMsgDlgError, SMsgDlgError); + {$ELSE} + DefaultCaptions: array[TMsgBoxType] of Pointer = + (@SMsgDlgInformation, @SMsgDlgConfirm, @SMsgDlgError, @SMsgDlgError); + {$ENDIF} +var + C: PChar; + NewCaption: String; +begin + C := Caption; + if (C = nil) or (C[0] = #0) then begin + C := MessageBoxCaptions[Typ]; + if C = nil then begin + {$IFNDEF Delphi3orHigher} + NewCaption := LoadStr(DefaultCaptions[Typ]); + {$ELSE} + NewCaption := LoadResString(DefaultCaptions[Typ]); + {$ENDIF} + C := PChar(NewCaption); + end; + end; + Result := AppMessageBox(Text, C, Buttons or IconFlags[Typ]); +end; + +function MsgBox(const Text, Caption: String; const Typ: TMsgBoxType; + const Buttons: Cardinal): Integer; +begin + Result := MsgBoxP(PChar(Text), PChar(Caption), Typ, Buttons); +end; + +function MsgBoxFmt(const Text: String; const Args: array of const; + const Caption: String; const Typ: TMsgBoxType; const Buttons: Cardinal): Integer; +begin + Result := MsgBox(Format(Text, Args), Caption, Typ, Buttons); +end; + +function ReactivateTopWindowEnumProc(Wnd: HWND; LParam: LPARAM): BOOL; stdcall; +begin + { Stop if we encounter the application window; don't consider it or any + windows below it } + if Wnd = Application.Handle then + Result := False + else + if IsWindowVisible(Wnd) and IsWindowEnabled(Wnd) and + (GetWindowLong(Wnd, GWL_EXSTYLE) and (WS_EX_TOPMOST or WS_EX_TOOLWINDOW) = 0) then begin + SetActiveWindow(Wnd); + Result := False; + end + else + Result := True; +end; + +procedure ReactivateTopWindow; +{ If the application window is active, reactivates the top window owned by the + current thread. Tool windows and windows that are invisible, disabled, or + topmost are not considered. } +begin + if GetActiveWindow = Application.Handle then + EnumThreadWindows(GetCurrentThreadId, @ReactivateTopWindowEnumProc, 0); +end; + +procedure FreeCaptions; far; +var + T: TMsgBoxType; +begin + for T := Low(T) to High(T) do begin + StrDispose(MessageBoxCaptions[T]); + MessageBoxCaptions[T] := nil; + end; +end; + +{ TWindowDisabler } + +const + WindowDisablerWndClassName = 'TWindowDisabler-Window'; +var + WindowDisablerWndClassAtom: TAtom; + +function WindowDisablerWndProc(Wnd: HWND; Msg: UINT; WParam: WPARAM; + LParam: LPARAM): LRESULT; stdcall; +begin + if Msg = WM_CLOSE then + { If the fallback window becomes focused (e.g. by Alt+Tabbing onto it) and + Alt+F4 is pressed, we must not pass the message to DefWindowProc because + it would destroy the window } + Result := 0 + else + Result := DefWindowProc(Wnd, Msg, WParam, LParam); +end; + +constructor TWindowDisabler.Create; +const + WndClass: TWndClass = ( + style: 0; + lpfnWndProc: @WindowDisablerWndProc; + cbClsExtra: 0; + cbWndExtra: 0; + hInstance: 0; + hIcon: 0; + hCursor: 0; + hbrBackground: COLOR_WINDOW + 1; + lpszMenuName: nil; + lpszClassName: WindowDisablerWndClassName); +begin + inherited Create; + FPreviousActiveWnd := GetActiveWindow; + FPreviousFocusWnd := GetFocus; + FWindowList := DisableTaskWindows(0); + + { Create the "fallback" window. + When a child process hides its last window, Windows will try to activate + the top-most enabled window on the desktop. If all of our windows were + disabled, it would end up bringing some other application to the + foreground. This gives Windows an enabled window to re-activate, which + is invisible to the user. } + if WindowDisablerWndClassAtom = 0 then + WindowDisablerWndClassAtom := Windows.RegisterClass(WndClass); + if WindowDisablerWndClassAtom <> 0 then begin + { Create an invisible owner window for the fallback window so that it + doesn't display a taskbar button. (We can't just give it the + WS_EX_TOOLWINDOW style because Windows skips tool windows when searching + for a new window to activate.) } + FOwnerWnd := CreateWindowEx(0, WindowDisablerWndClassName, '', + WS_POPUP or WS_DISABLED, 0, 0, 0, 0, HWND_DESKTOP, 0, HInstance, nil); + if FOwnerWnd <> 0 then begin + { Note: We give the window a valid title since the user can see it in the + Alt+Tab list (on 2000 and XP, but not Vista, which appears to exclude + zero-width/height windows). } + FFallbackWnd := CreateWindowEx(0, WindowDisablerWndClassName, + PChar(Application.Title), WS_POPUP, 0, 0, 0, 0, FOwnerWnd, 0, + HInstance, nil); + if FFallbackWnd <> 0 then + ShowWindow(FFallbackWnd, SW_SHOWNA); + end; + end; + + { Take the focus away from whatever has it. While you can't click controls + inside a disabled window, keystrokes will still reach the focused control + (e.g. you can press Space to re-click a focused button). } + SetFocus(0); +end; + +destructor TWindowDisabler.Destroy; +begin + EnableTaskWindows(FWindowList); + { Re-activate the previous window. But don't do this if GetActiveWindow + returns zero, because that means another application is in the foreground + (possibly a child process spawned by us that is still running). } + if GetActiveWindow <> 0 then begin + if FPreviousActiveWnd <> 0 then + SetActiveWindow(FPreviousActiveWnd); + { If the active window never changed, then the above SetActiveWindow call + won't have an effect. Explicitly restore the focus. } + if FPreviousFocusWnd <> 0 then + SetFocus(FPreviousFocusWnd); + end; + if FOwnerWnd <> 0 then + DestroyWindow(FOwnerWnd); { will destroy FFallbackWnd too } + inherited; +end; + +initialization +finalization + FreeCaptions; +end. diff --git a/Projects/CmnFunc2.pas b/Projects/CmnFunc2.pas new file mode 100644 index 000000000..754f891bd --- /dev/null +++ b/Projects/CmnFunc2.pas @@ -0,0 +1,1672 @@ +unit CmnFunc2; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Common non-VCL functions + + $jrsoftware: issrc/Projects/CmnFunc2.pas,v 1.111 2010/10/22 10:33:26 mlaan Exp $ +} + +{$B-,R-} + +interface + +{$I VERSION.INC} + +uses + Windows, SysUtils; + +{ Delphi 2.01's RegStr unit should never be used because it contains many + wrong declarations. Delphi 3's RegStr unit doesn't have this problem, but + for backward compatibility, it defines a few of the correct registry key + constants here. } +const + { Do NOT localize any of these } + NEWREGSTR_PATH_SETUP = 'Software\Microsoft\Windows\CurrentVersion'; + NEWREGSTR_PATH_EXPLORER = NEWREGSTR_PATH_SETUP + '\Explorer'; + NEWREGSTR_PATH_SPECIAL_FOLDERS = NEWREGSTR_PATH_EXPLORER + '\Shell Folders'; + NEWREGSTR_PATH_UNINSTALL = NEWREGSTR_PATH_SETUP + '\Uninstall'; + NEWREGSTR_VAL_UNINSTALLER_DISPLAYNAME = 'DisplayName'; + NEWREGSTR_VAL_UNINSTALLER_COMMANDLINE = 'UninstallString'; + + KEY_WOW64_64KEY = $0100; + +type +{$IFNDEF UNICODE} + PLeadByteSet = ^TLeadByteSet; + TLeadByteSet = set of AnsiChar; +{$ENDIF} + + TOneShotTimer = {$IFDEF UNICODE} record {$ELSE} object {$ENDIF} + private + FLastElapsed: Cardinal; + FStartTick: DWORD; + FTimeout: Cardinal; + public + function Expired: Boolean; + procedure SleepUntilExpired; + procedure Start(const Timeout: Cardinal); + function TimeElapsed: Cardinal; + function TimeRemaining: Cardinal; + end; + + TRegView = (rvDefault, rv32Bit, rv64Bit); +const + RegViews64Bit = [rv64Bit]; + +function NewFileExists(const Name: String): Boolean; +function DirExists(const Name: String): Boolean; +function FileOrDirExists(const Name: String): Boolean; +function IsDirectoryAndNotReparsePoint(const Name: String): Boolean; +function GetIniString(const Section, Key: String; Default: String; const Filename: String): String; +function GetIniInt(const Section, Key: String; const Default, Min, Max: Longint; const Filename: String): Longint; +function GetIniBool(const Section, Key: String; const Default: Boolean; const Filename: String): Boolean; +function IniKeyExists(const Section, Key, Filename: String): Boolean; +function IsIniSectionEmpty(const Section, Filename: String): Boolean; +function SetIniString(const Section, Key, Value, Filename: String): Boolean; +function SetIniInt(const Section, Key: String; const Value: Longint; const Filename: String): Boolean; +function SetIniBool(const Section, Key: String; const Value: Boolean; const Filename: String): Boolean; +procedure DeleteIniEntry(const Section, Key, Filename: String); +procedure DeleteIniSection(const Section, Filename: String); +function GetEnv(const EnvVar: String): String; +function GetCmdTail: String; +function GetCmdTailEx(StartIndex: Integer): String; +function NewParamCount: Integer; +function NewParamStr(Index: Integer): string; +function AddQuotes(const S: String): String; +function RemoveQuotes(const S: String): String; +function GetShortName(const LongName: String): String; +function GetWinDir: String; +function GetSystemDir: String; +function GetSysWow64Dir: String; +function GetTempDir: String; +function StringChange(var S: String; const FromStr, ToStr: String): Integer; +function StringChangeEx(var S: String; const FromStr, ToStr: String; + const SupportDBCS: Boolean): Integer; +function AdjustLength(var S: String; const Res: Cardinal): Boolean; +function UsingWinNT: Boolean; +function ConvertConstPercentStr(var S: String): Boolean; +function ConvertPercentStr(var S: String): Boolean; +function ConstPos(const Ch: Char; const S: String): Integer; +function SkipPastConst(const S: String; const Start: Integer): Integer; +function RegQueryStringValue(H: HKEY; Name: PChar; var ResultStr: String): Boolean; +function RegQueryMultiStringValue(H: HKEY; Name: PChar; var ResultStr: String): Boolean; +function RegValueExists(H: HKEY; Name: PChar): Boolean; +function RegCreateKeyExView(const RegView: TRegView; hKey: HKEY; lpSubKey: PChar; + Reserved: DWORD; lpClass: PChar; dwOptions: DWORD; samDesired: REGSAM; + lpSecurityAttributes: PSecurityAttributes; var phkResult: HKEY; + lpdwDisposition: PDWORD): Longint; +function RegOpenKeyExView(const RegView: TRegView; hKey: HKEY; lpSubKey: PChar; + ulOptions: DWORD; samDesired: REGSAM; var phkResult: HKEY): Longint; +function RegDeleteKeyView(const RegView: TRegView; const Key: HKEY; const Name: PChar): Longint; +function RegDeleteKeyIncludingSubkeys(const RegView: TRegView; const Key: HKEY; const Name: PChar): Longint; +function RegDeleteKeyIfEmpty(const RegView: TRegView; const RootKey: HKEY; const SubkeyName: PChar): Longint; +function GetShellFolderPath(const FolderID: Integer): String; +function IsAdminLoggedOn: Boolean; +function IsPowerUserLoggedOn: Boolean; +function IsMultiByteString(const S: AnsiString): Boolean; +function FontExists(const FaceName: String): Boolean; +{$IFNDEF IS_D5} +procedure FreeAndNil(var Obj); +function SafeLoadLibrary(const Filename: String; ErrorMode: UINT): HMODULE; +{$ENDIF} +function GetUILanguage: LANGID; +function RemoveAccelChar(const S: String): String; +function GetTextWidth(const DC: HDC; S: String; const Prefix: Boolean): Integer; +function AddPeriod(const S: String): String; +function GetExceptMessage: String; +function GetPreferredUIFont: String; +function IsWildcard(const Pattern: String): Boolean; +function WildcardMatch(const Text, Pattern: PChar): Boolean; +function IntMax(const A, B: Integer): Integer; +function Win32ErrorString(ErrorCode: Integer): String; +{$IFNDEF UNICODE} +procedure GetLeadBytes(var ALeadBytes: TLeadByteSet); +{$ENDIF} +{$IFNDEF IS_D3} +function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; +{$ENDIF} +function DeleteDirTree(const Dir: String): Boolean; +function SetNTFSCompression(const FileOrDir: String; Compress: Boolean): Boolean; +procedure AddToWindowMessageFilterEx(const Wnd: HWND; const Msg: UINT); +{$IFNDEF UNICODE} +type + TSysCharSet = set of AnsiChar; +function CharInSet(C: AnsiChar; const CharSet: TSysCharSet): Boolean; +{$ENDIF} +function ShutdownBlockReasonCreate(Wnd: HWND; const Reason: String): Boolean; +function ShutdownBlockReasonDestroy(Wnd: HWND): Boolean; +function TryStrToBoolean(const S: String; var BoolResult: Boolean): Boolean; +procedure WaitMessageWithTimeout(const Milliseconds: DWORD); +function MoveFileReplace(const ExistingFileName, NewFileName: String): Boolean; +procedure TryEnableAutoCompleteFileSystem(Wnd: HWND); + +{$IFNDEF UNICODE} +var + ConstLeadBytes: PLeadByteSet = nil; +{$ENDIF} + +implementation + +uses + {$IFNDEF Delphi3orHigher} OLE2, {$ELSE} ActiveX, {$ENDIF} ShlObj, PathFunc; + +function InternalGetFileAttr(const Name: String): Integer; +begin + Result := GetFileAttributes(PChar(RemoveBackslashUnlessRoot(Name))); +end; + +function NewFileExists(const Name: String): Boolean; +{ Returns True if the specified file exists. + This function is better than Delphi's FileExists function because it works + on files in directories that don't have "list" permission. There is, however, + one other difference: FileExists allows wildcards, but this function does + not. } +var + Attr: Integer; +begin + Attr := GetFileAttributes(PChar(Name)); + Result := (Attr <> -1) and (Attr and faDirectory = 0); +end; + +function DirExists(const Name: String): Boolean; +{ Returns True if the specified directory name exists. The specified name + may include a trailing backslash. + NOTE: Delphi's FileCtrl unit has a similar function called DirectoryExists. + However, the implementation is different between Delphi 1 and 2. (Delphi 1 + does not count hidden or system directories as existing.) } +var + Attr: Integer; +begin + Attr := InternalGetFileAttr(Name); + Result := (Attr <> -1) and (Attr and faDirectory <> 0); +end; + +function FileOrDirExists(const Name: String): Boolean; +{ Returns True if the specified directory or file name exists. The specified + name may include a trailing backslash. } +begin + Result := InternalGetFileAttr(Name) <> -1; +end; + +function IsDirectoryAndNotReparsePoint(const Name: String): Boolean; +{ Returns True if the specified directory exists and is NOT a reparse point. } +const + FILE_ATTRIBUTE_REPARSE_POINT = $00000400; +var + Attr: DWORD; +begin + Attr := GetFileAttributes(PChar(Name)); + Result := (Attr <> $FFFFFFFF) and + (Attr and FILE_ATTRIBUTE_DIRECTORY <> 0) and + (Attr and FILE_ATTRIBUTE_REPARSE_POINT = 0); +end; + +function GetIniString(const Section, Key: String; Default: String; + const Filename: String): String; +var + BufSize, Len: Integer; +begin + { On Windows 9x, Get*ProfileString can modify the lpDefault parameter, so + make sure it's unique and not read-only } + UniqueString(Default); + BufSize := 256; + while True do begin + SetString(Result, nil, BufSize); + if Filename <> '' then + Len := GetPrivateProfileString(PChar(Section), PChar(Key), PChar(Default), + @Result[1], BufSize, PChar(Filename)) + else + Len := GetProfileString(PChar(Section), PChar(Key), PChar(Default), + @Result[1], BufSize); + { Work around bug present on Windows NT/2000 (not 95): When lpDefault is + too long to fit in the buffer, nSize is returned (null terminator + counted) instead of nSize-1 (what it's supposed to return). So don't + trust the returned length; calculate it ourself. + Note: This also ensures the string can never include embedded nulls. } + if Len <> 0 then + Len := StrLen(PChar(Result)); + { Break if the string fits, or if it's apparently 64 KB or longer. + No point in increasing buffer size past 64 KB because the length + returned by Windows 2000 seems to be mod 65536. And Windows 95 returns + 0 on values longer than ~32 KB. + Note: The docs say the function returns "nSize minus one" if the buffer + is too small, but I'm willing to bet it can be "minus two" if the last + character is double-byte. Let's just be extremely paranoid and check for + BufSize-8. } + if (Len < BufSize-8) or (BufSize >= 65536) then begin + SetLength(Result, Len); + Break; + end; + { Otherwise double the buffer size and try again } + BufSize := BufSize * 2; + end; +end; + +function GetIniInt(const Section, Key: String; + const Default, Min, Max: Longint; const Filename: String): Longint; +{ Reads a Longint from an INI file. If the Longint read is not between Min/Max + then it returns Default. If Min=Max then Min/Max are ignored } +var + S: String; + E: Integer; +begin + S := GetIniString(Section, Key, '', Filename); + if S = '' then + Result := Default + else begin + Val(S, Result, E); + if (E <> 0) or ((Min <> Max) and ((Result < Min) or (Result > Max))) then + Result := Default; + end; +end; + +function GetIniBool(const Section, Key: String; const Default: Boolean; + const Filename: String): Boolean; +begin + Result := GetIniInt(Section, Key, Ord(Default), 0, 0, Filename) <> 0; +end; + +function IniKeyExists(const Section, Key, Filename: String): Boolean; + function Equals(const Default: PChar): Boolean; + var + Test: array[0..7] of Char; + begin + Test[0] := #0; + if Filename <> '' then + GetPrivateProfileString(PChar(Section), PChar(Key), Default, + Test, SizeOf(Test) div SizeOf(Test[0]), PChar(Filename)) + else + GetProfileString(PChar(Section), PChar(Key), Default, + Test, SizeOf(Test) div SizeOf(Test[0])); + Result := lstrcmp(Test, Default) = 0; + end; +begin + { If the key does not exist, a default string is returned both times. } + Result := not Equals('x1234x') or not Equals('x5678x'); { <- don't change } +end; + +function IsIniSectionEmpty(const Section, Filename: String): Boolean; +var + Test: array[0..255] of Char; +begin + Test[0] := #0; + if Filename <> '' then + GetPrivateProfileString(PChar(Section), nil, '', Test, + SizeOf(Test) div SizeOf(Test[0]), PChar(Filename)) + else + GetProfileString(PChar(Section), nil, '', Test, + SizeOf(Test) div SizeOf(Test[0])); + Result := Test[0] = #0; +end; + +function SetIniString(const Section, Key, Value, Filename: String): Boolean; +begin + if Filename <> '' then + Result := WritePrivateProfileString(PChar(Section), PChar(Key), + PChar(Value), PChar(Filename)) + else + Result := WriteProfileString(PChar(Section), PChar(Key), + PChar(Value)); +end; + +function SetIniInt(const Section, Key: String; const Value: Longint; + const Filename: String): Boolean; +begin + Result := SetIniString(Section, Key, IntToStr(Value), Filename); +end; + +function SetIniBool(const Section, Key: String; const Value: Boolean; + const Filename: String): Boolean; +begin + Result := SetIniInt(Section, Key, Ord(Value), Filename); +end; + +procedure DeleteIniEntry(const Section, Key, Filename: String); +begin + if Filename <> '' then + WritePrivateProfileString(PChar(Section), PChar(Key), + nil, PChar(Filename)) + else + WriteProfileString(PChar(Section), PChar(Key), + nil); +end; + +procedure DeleteIniSection(const Section, Filename: String); +begin + if Filename <> '' then + WritePrivateProfileString(PChar(Section), nil, nil, + PChar(Filename)) + else + WriteProfileString(PChar(Section), nil, nil); +end; + +function GetEnv(const EnvVar: String): String; +{ Gets the value of the specified environment variable. (Just like TP's GetEnv) } +var + Res: DWORD; +begin + SetLength(Result, 255); + repeat + Res := GetEnvironmentVariable(PChar(EnvVar), PChar(Result), Length(Result)); + if Res = 0 then begin + Result := ''; + Break; + end; + until AdjustLength(Result, Res); +end; + +function GetParamStr(const P: PChar; var Param: String): PChar; + + function Extract(P: PChar; const Buffer: PChar; var Len: Integer): PChar; + var + InQuote: Boolean; + begin + Len := 0; + InQuote := False; + while (P^ <> #0) and ((P^ > ' ') or InQuote) do begin + if P^ = '"' then + InQuote := not InQuote + else begin + if Assigned(Buffer) then + Buffer[Len] := P^; + Inc(Len); + end; + Inc(P); + end; + Result := P; + end; + +var + Len: Integer; + Buffer: String; +begin + Extract(P, nil, Len); + SetString(Buffer, nil, Len); + Result := Extract(P, @Buffer[1], Len); + Param := Buffer; + while (Result^ <> #0) and (Result^ <= ' ') do + Inc(Result); +end; + +function GetCmdTail: String; +{ Returns all command line parameters passed to the process as a single + string. } +var + S: String; +begin + Result := GetParamStr(GetCommandLine, S); +end; + +function GetCmdTailEx(StartIndex: Integer): String; +{ Returns all command line parameters passed to the process as a single + string, starting with StartIndex (one-based). } +var + P: PChar; + S: String; +begin + P := GetParamStr(GetCommandLine, S); + while (StartIndex > 1) and (P^ <> #0) do begin + P := GetParamStr(P, S); + Dec(StartIndex); + end; + Result := P; +end; + +function NewParamCount: Integer; +var + P: PChar; + S: String; +begin + P := GetParamStr(GetCommandLine, S); + Result := 0; + while P^ <> #0 do begin + Inc(Result); + P := GetParamStr(P, S); + end; +end; + +function NewParamStr(Index: Integer): string; +{ Returns the Indexth command line parameter, or an empty string if Index is + out of range. + Differences from Delphi's ParamStr: + - No limits on parameter length + - Doesn't ignore empty parameters ("") + - Handles the empty argv[0] case like MSVC: if GetCommandLine() returns + " a b" then NewParamStr(1) should return "a", not "b" } +var + Buffer: array[0..MAX_PATH-1] of Char; + S: String; + P: PChar; +begin + if Index = 0 then begin + SetString(Result, Buffer, GetModuleFileName(0, Buffer, SizeOf(Buffer) div SizeOf(Buffer[0]))); + end + else begin + P := GetCommandLine; + while True do begin + if P^ = #0 then begin + S := ''; + Break; + end; + P := GetParamStr(P, S); + if Index = 0 then Break; + Dec(Index); + end; + Result := S; + end; +end; + +function AddQuotes(const S: String): String; +{ Adds a quote (") character to the left and right sides of the string if + the string contains a space and it didn't have quotes already. This is + primarily used when spawning another process with a long filename as one of + the parameters. } +begin + Result := Trim(S); + if (PathPos(' ', Result) <> 0) and + ((Result[1] <> '"') or (PathLastChar(Result)^ <> '"')) then + Result := '"' + Result + '"'; +end; + +function RemoveQuotes(const S: String): String; +{ Opposite of AddQuotes; removes any quotes around the string. } +begin + Result := S; + while (Result <> '') and (Result[1] = '"') do + Delete(Result, 1, 1); + while (Result <> '') and (PathLastChar(Result)^ = '"') do + SetLength(Result, Length(Result)-1); +end; + +function ConvertPercentStr(var S: String): Boolean; +{ Expands all %-encoded characters in the string (see RFC 2396). Returns True + if all were successfully expanded. } +var + I, C, E: Integer; + N: String; +begin + Result := True; + I := 1; + while I <= Length(S) do begin + if S[I] = '%' then begin + N := Copy(S, I, 3); + if Length(N) <> 3 then begin + Result := False; + Break; + end; + N[1] := '$'; + Val(N, C, E); + if E <> 0 then begin + Result := False; + Break; + end; + { delete the two numbers following '%', and replace '%' with the character } + Delete(S, I+1, 2); + S[I] := Chr(C); + end; + Inc(I); + end; +end; + +function SkipPastConst(const S: String; const Start: Integer): Integer; +{ Returns the character index following the Inno Setup constant embedded + into the string S at index Start. + If the constant is not closed (missing a closing brace), it returns zero. } +var + L, BraceLevel, LastOpenBrace: Integer; +begin + Result := Start; + L := Length(S); + if Result < L then begin + Inc(Result); + if S[Result] = '{' then begin + Inc(Result); + Exit; + end + else begin + BraceLevel := 1; + LastOpenBrace := -1; + while Result <= L do begin + case S[Result] of + '{': begin + if LastOpenBrace <> Result-1 then begin + Inc(BraceLevel); + LastOpenBrace := Result; + end + else + { Skip over '{{' when in an embedded constant } + Dec(BraceLevel); + end; + '}': begin + Dec(BraceLevel); + if BraceLevel = 0 then begin + Inc(Result); + Exit; + end; + end; + else + {$IFNDEF UNICODE} + if S[Result] in ConstLeadBytes^ then + Inc(Result); + {$ENDIF} + end; + Inc(Result); + end; + end; + end; + Result := 0; +end; + +function ConvertConstPercentStr(var S: String): Boolean; +{ Same as ConvertPercentStr, but is designed to ignore embedded Inno Setup + constants. Any '%' characters between braces are not translated. Two + consecutive braces are ignored. } +var + I, C, E: Integer; + N: String; +begin + Result := True; + I := 1; + while I <= Length(S) do begin + case S[I] of + '{': begin + I := SkipPastConst(S, I); + if I = 0 then begin + Result := False; + Break; + end; + Dec(I); { ...since there's an Inc below } + end; + '%': begin + N := Copy(S, I, 3); + if Length(N) <> 3 then begin + Result := False; + Break; + end; + N[1] := '$'; + Val(N, C, E); + if E <> 0 then begin + Result := False; + Break; + end; + { delete the two numbers following '%', and replace '%' with the character } + Delete(S, I+1, 2); + S[I] := Chr(C); + end; + else + {$IFNDEF UNICODE} + if S[I] in ConstLeadBytes^ then + Inc(I); + {$ENDIF} + end; + Inc(I); + end; +end; + +function ConstPos(const Ch: Char; const S: String): Integer; +{ Like the standard Pos function, but skips over any Inno Setup constants + embedded in S } +var + I, L: Integer; +begin + Result := 0; + I := 1; + L := Length(S); + while I <= L do begin + if S[I] = Ch then begin + Result := I; + Break; + end + else if S[I] = '{' then begin + I := SkipPastConst(S, I); + if I = 0 then + Break; + end + else begin + {$IFNDEF UNICODE} + if S[I] in ConstLeadBytes^ then + Inc(I); + {$ENDIF} + Inc(I); + end; + end; +end; + +function GetShortName(const LongName: String): String; +{ Gets the short version of the specified long filename. If the file does not + exist, or some other error occurs, it returns LongName. } +var + Res: DWORD; +begin + SetLength(Result, MAX_PATH); + repeat + Res := GetShortPathName(PChar(LongName), PChar(Result), Length(Result)); + if Res = 0 then begin + Result := LongName; + Break; + end; + until AdjustLength(Result, Res); +end; + +function GetWinDir: String; +{ Returns fully qualified path of the Windows directory. Only includes a + trailing backslash if the Windows directory is the root directory. } +var + Buf: array[0..MAX_PATH-1] of Char; +begin + GetWindowsDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0])); + Result := StrPas(Buf); +end; + +function GetSystemDir: String; +{ Returns fully qualified path of the Windows System directory. Only includes a + trailing backslash if the Windows System directory is the root directory. } +var + Buf: array[0..MAX_PATH-1] of Char; +begin + GetSystemDirectory(Buf, SizeOf(Buf) div SizeOf(Buf[0])); + Result := StrPas(Buf); +end; + +function GetSysWow64Dir: String; +{ Returns fully qualified path of the SysWow64 directory on 64-bit Windows. + Returns '' if there is no SysWow64 directory (e.g. running 32-bit Windows). } +var + GetSystemWow64DirectoryFunc: function( + lpBuffer: {$IFDEF UNICODE} PWideChar {$ELSE} PAnsiChar {$ENDIF}; + uSize: UINT): UINT; stdcall; + Res: Integer; + Buf: array[0..MAX_PATH] of Char; +begin + Result := ''; + GetSystemWow64DirectoryFunc := GetProcAddress(GetModuleHandle(kernel32), + {$IFDEF UNICODE} + 'GetSystemWow64DirectoryW' + {$ELSE} + 'GetSystemWow64DirectoryA' + {$ENDIF} ); + { Note: This function does exist on 32-bit XP, but always returns 0 } + if Assigned(GetSystemWow64DirectoryFunc) then begin + Res := GetSystemWow64DirectoryFunc(Buf, SizeOf(Buf) div SizeOf(Buf[0])); + if (Res > 0) and (Res < SizeOf(Buf) div SizeOf(Buf[0])) then + Result := Buf; + end; +end; + +function GetTempDir: String; +{ Returns fully qualified path of the temporary directory, with trailing + backslash. This does not use the Win32 function GetTempPath, due to platform + differences. } +label 1; +begin + Result := GetEnv('TMP'); + if (Result <> '') and DirExists(Result) then + goto 1; + Result := GetEnv('TEMP'); + if (Result <> '') and DirExists(Result) then + goto 1; + if Win32Platform = VER_PLATFORM_WIN32_NT then begin + { Like Windows 2000's GetTempPath, return USERPROFILE when TMP and TEMP + are not set } + Result := GetEnv('USERPROFILE'); + if (Result <> '') and DirExists(Result) then + goto 1; + end; + Result := GetWinDir; +1:Result := AddBackslash(PathExpand(Result)); +end; + +function StringChangeEx(var S: String; const FromStr, ToStr: String; + const SupportDBCS: Boolean): Integer; +{ Changes all occurrences in S of FromStr to ToStr. If SupportDBCS is True + (recommended), double-byte character sequences in S are recognized and + handled properly. Otherwise, the function behaves in a binary-safe manner. + Returns the number of times FromStr was matched and changed. } +var + FromStrLen, I, EndPos, J: Integer; + IsMatch: Boolean; +label 1; +begin + Result := 0; + if FromStr = '' then Exit; + FromStrLen := Length(FromStr); + I := 1; +1:EndPos := Length(S) - FromStrLen + 1; + while I <= EndPos do begin + IsMatch := True; + J := 0; + while J < FromStrLen do begin + if S[J+I] <> FromStr[J+1] then begin + IsMatch := False; + Break; + end; + Inc(J); + end; + if IsMatch then begin + Inc(Result); + Delete(S, I, FromStrLen); + Insert(ToStr, S, I); + Inc(I, Length(ToStr)); + goto 1; + end; + if SupportDBCS then + Inc(I, PathCharLength(S, I)) + else + Inc(I); + end; +end; + +function StringChange(var S: String; const FromStr, ToStr: String): Integer; +{ Same as calling StringChangeEx with SupportDBCS=False } +begin + Result := StringChangeEx(S, FromStr, ToStr, False); +end; + +function AdjustLength(var S: String; const Res: Cardinal): Boolean; +{ Returns True if successful. Returns False if buffer wasn't large enough, + and called AdjustLength to resize it. } +begin + Result := Integer(Res) < Length(S); + SetLength(S, Res); +end; + +function UsingWinNT: Boolean; +{ Returns True if system is running any version of Windows NT. Never returns + True on Windows 95 or 3.1. } +begin + Result := Win32Platform = VER_PLATFORM_WIN32_NT; +end; + +function InternalRegQueryStringValue(H: HKEY; Name: PChar; var ResultStr: String; + Type1, Type2: DWORD): Boolean; +var + Typ, Size: DWORD; + Len: Integer; + S: String; + ErrorCode: Longint; +label 1; +begin + Result := False; +1:Size := 0; + if (RegQueryValueEx(H, Name, nil, @Typ, nil, @Size) = ERROR_SUCCESS) and + ((Typ = Type1) or (Typ = Type2)) then begin + if Size = 0 then begin + { It's an empty string with no null terminator. + (Must handle those here since we can't pass a nil lpData pointer on + the second RegQueryValueEx call.) } + ResultStr := ''; + Result := True; + end + else begin + { Paranoia: Impose reasonable upper limit on Size to avoid potential + integer overflows below } + if Cardinal(Size) >= Cardinal($70000000) then + OutOfMemoryError; + { Note: If Size isn't a multiple of SizeOf(S[1]), we have to round up + here so that RegQueryValueEx doesn't overflow the buffer } + Len := (Size + (SizeOf(S[1]) - 1)) div SizeOf(S[1]); + SetString(S, nil, Len); + ErrorCode := RegQueryValueEx(H, Name, nil, @Typ, @S[1], @Size); + if ErrorCode = ERROR_MORE_DATA then begin + { The data must've increased in size since the first RegQueryValueEx + call. Start over. } + goto 1; + end; + if (ErrorCode = ERROR_SUCCESS) and + ((Typ = Type1) or (Typ = Type2)) then begin + { If Size isn't a multiple of SizeOf(S[1]), we disregard the partial + character, like RegGetValue } + Len := Size div SizeOf(S[1]); + { Remove any null terminators from the end and trim the string to the + returned length. + Note: We *should* find 1 null terminator, but it's possible for + there to be more or none if the value was written that way. } + while (Len <> 0) and (S[Len] = #0) do + Dec(Len); + { In a REG_MULTI_SZ value, each individual string is null-terminated, + so add 1 null (back) to the end, unless there are no strings (Len=0) } + if (Typ = REG_MULTI_SZ) and (Len <> 0) then + Inc(Len); + SetLength(S, Len); + if (Typ = REG_MULTI_SZ) and (Len <> 0) then + S[Len] := #0; + ResultStr := S; + Result := True; + end; + end; + end; +end; + +function RegQueryStringValue(H: HKEY; Name: PChar; var ResultStr: String): Boolean; +{ Queries the specified REG_SZ or REG_EXPAND_SZ registry key/value, and returns + the value in ResultStr. Returns True if successful. When False is returned, + ResultStr is unmodified. } +begin + Result := InternalRegQueryStringValue(H, Name, ResultStr, REG_SZ, + REG_EXPAND_SZ); +end; + +function RegQueryMultiStringValue(H: HKEY; Name: PChar; var ResultStr: String): Boolean; +{ Queries the specified REG_MULTI_SZ registry key/value, and returns the value + in ResultStr. Returns True if successful. When False is returned, ResultStr + is unmodified. } +begin + Result := InternalRegQueryStringValue(H, Name, ResultStr, REG_MULTI_SZ, + REG_MULTI_SZ); +end; + +function RegValueExists(H: HKEY; Name: PChar): Boolean; +{ Returns True if the specified value exists. Requires KEY_QUERY_VALUE access + to the key. } +var + I: Integer; + EnumName: array[0..1] of Char; + Count: DWORD; + ErrorCode: Longint; +begin + Result := RegQueryValueEx(H, Name, nil, nil, nil, nil) = ERROR_SUCCESS; + if Result and ((Name = nil) or (Name^ = #0)) and + (Win32Platform <> VER_PLATFORM_WIN32_NT) then begin + { On Win9x/Me a default value always exists according to RegQueryValueEx, + so it must use RegEnumValue instead to check if a default value + really exists } + Result := False; + I := 0; + while True do begin + Count := SizeOf(EnumName) div SizeOf(EnumName[0]); + ErrorCode := RegEnumValue(H, I, EnumName, Count, nil, nil, nil, nil); + if (ErrorCode <> ERROR_SUCCESS) and (ErrorCode <> ERROR_MORE_DATA) then + Break; + { is it the default value? } + if (ErrorCode = ERROR_SUCCESS) and (EnumName[0] = #0) then begin + Result := True; + Break; + end; + Inc(I); + end; + end; +end; + +function RegCreateKeyExView(const RegView: TRegView; hKey: HKEY; lpSubKey: PChar; + Reserved: DWORD; lpClass: PChar; dwOptions: DWORD; samDesired: REGSAM; + lpSecurityAttributes: PSecurityAttributes; var phkResult: HKEY; + lpdwDisposition: PDWORD): Longint; +begin + if RegView = rv64Bit then + samDesired := samDesired or KEY_WOW64_64KEY; + Result := RegCreateKeyEx(hKey, lpSubKey, Reserved, lpClass, dwOptions, + samDesired, lpSecurityAttributes, phkResult, lpdwDisposition); +end; + +function RegOpenKeyExView(const RegView: TRegView; hKey: HKEY; lpSubKey: PChar; + ulOptions: DWORD; samDesired: REGSAM; var phkResult: HKEY): Longint; +begin + if RegView = rv64Bit then + samDesired := samDesired or KEY_WOW64_64KEY; + Result := RegOpenKeyEx(hKey, lpSubKey, ulOptions, samDesired, phkResult); +end; + +var + RegDeleteKeyExFunc: function(hKey: HKEY; + lpSubKey: {$IFDEF UNICODE} PWideChar {$ELSE} PAnsiChar {$ENDIF}; + samDesired: REGSAM; Reserved: DWORD): Longint; stdcall; + +function RegDeleteKeyView(const RegView: TRegView; const Key: HKEY; + const Name: PChar): Longint; +begin + if RegView <> rv64Bit then + Result := RegDeleteKey(Key, Name) + else begin + if @RegDeleteKeyExFunc = nil then + RegDeleteKeyExFunc := GetProcAddress(GetModuleHandle(advapi32), + {$IFDEF UNICODE} + 'RegDeleteKeyExW' + {$ELSE} + 'RegDeleteKeyExA' + {$ENDIF} ); + if Assigned(RegDeleteKeyExFunc) then + Result := RegDeleteKeyExFunc(Key, Name, KEY_WOW64_64KEY, 0) + else + Result := ERROR_PROC_NOT_FOUND; + end; +end; + +function RegDeleteKeyIncludingSubkeys(const RegView: TRegView; const Key: HKEY; + const Name: PChar): Longint; +{ Deletes the specified key and all subkeys. + Returns ERROR_SUCCESS if the key was successful deleted. } +var + H: HKEY; + KeyName: String; + I, KeyNameCount: DWORD; + ErrorCode: Longint; +begin + if (Name = nil) or (Name[0] = #0) then begin + Result := ERROR_INVALID_PARAMETER; + Exit; + end; + if Win32Platform = VER_PLATFORM_WIN32_NT then begin + if RegOpenKeyExView(RegView, Key, Name, 0, KEY_ENUMERATE_SUB_KEYS, H) = ERROR_SUCCESS then begin + try + SetString(KeyName, nil, 256); + I := 0; + while True do begin + KeyNameCount := Length(KeyName); + ErrorCode := RegEnumKeyEx(H, I, @KeyName[1], KeyNameCount, nil, nil, nil, nil); + if ErrorCode = ERROR_MORE_DATA then begin + { Double the size of the buffer and try again } + if Length(KeyName) >= 65536 then begin + { Sanity check: If we tried a 64 KB buffer and it's still saying + there's more data, something must be seriously wrong. Bail. } + Break; + end; + SetString(KeyName, nil, Length(KeyName) * 2); + Continue; + end; + if ErrorCode <> ERROR_SUCCESS then + Break; + if RegDeleteKeyIncludingSubkeys(RegView, H, PChar(KeyName)) <> ERROR_SUCCESS then + Inc(I); + end; + finally + RegCloseKey(H); + end; + end; + end; + Result := RegDeleteKeyView(RegView, Key, Name); +end; + +function RegDeleteKeyIfEmpty(const RegView: TRegView; const RootKey: HKEY; + const SubkeyName: PChar): Longint; +{ Deletes the specified subkey if it has no subkeys or values. + Returns ERROR_SUCCESS if the key was successful deleted, ERROR_DIR_NOT_EMPTY + if it was not deleted because it contained subkeys or values, or possibly + some other Win32 error code. } +var + K: HKEY; + NumSubkeys, NumValues: DWORD; +begin + Result := RegOpenKeyExView(RegView, RootKey, SubkeyName, 0, KEY_QUERY_VALUE, K); + if Result <> ERROR_SUCCESS then + Exit; + Result := RegQueryInfoKey(K, nil, nil, nil, @NumSubkeys, nil, nil, + @NumValues, nil, nil, nil, nil); + RegCloseKey(K); + if Result <> ERROR_SUCCESS then + Exit; + if (NumSubkeys = 0) and (NumValues = 0) then + Result := RegDeleteKeyView(RegView, RootKey, SubkeyName) + else + Result := ERROR_DIR_NOT_EMPTY; +end; + +function GetShellFolderPath(const FolderID: Integer): String; +var + pidl: PItemIDList; + Buffer: array[0..MAX_PATH-1] of Char; + Malloc: IMalloc; +begin + Result := ''; + if FAILED(SHGetMalloc(Malloc)) then + Malloc := nil; + if SUCCEEDED(SHGetSpecialFolderLocation(0, FolderID, pidl)) then begin + if SHGetPathFromIDList(pidl, Buffer) then + Result := Buffer; + if Assigned(Malloc) then + Malloc.Free(pidl); + end; +end; + +function IsMemberOfGroup(const DomainAliasRid: DWORD): Boolean; +{ Returns True if the logged-on user is a member of the specified local + group. Always returns True on Windows 9x/Me. } +const + SECURITY_NT_AUTHORITY: TSIDIdentifierAuthority = + (Value: (0, 0, 0, 0, 0, 5)); + SECURITY_BUILTIN_DOMAIN_RID = $00000020; + SE_GROUP_ENABLED = $00000004; + SE_GROUP_USE_FOR_DENY_ONLY = $00000010; +var + Sid: PSID; + CheckTokenMembership: function(TokenHandle: THandle; SidToCheck: PSID; + var IsMember: BOOL): BOOL; stdcall; + IsMember: BOOL; + Token: THandle; + GroupInfoSize: DWORD; + GroupInfo: PTokenGroups; + I: Integer; +begin + if Win32Platform <> VER_PLATFORM_WIN32_NT then begin + Result := True; + Exit; + end; + + Result := False; + + if not AllocateAndInitializeSid(SECURITY_NT_AUTHORITY, 2, + SECURITY_BUILTIN_DOMAIN_RID, DomainAliasRid, + 0, 0, 0, 0, 0, 0, Sid) then + Exit; + try + { Use CheckTokenMembership if available. MSDN states: + "The CheckTokenMembership function should be used with Windows 2000 and + later to determine whether a specified SID is present and enabled in an + access token. This function eliminates potential misinterpretations of + the active group membership if changes to access tokens are made in + future releases." } + CheckTokenMembership := nil; + if Lo(GetVersion) >= 5 then + CheckTokenMembership := GetProcAddress(GetModuleHandle(advapi32), + 'CheckTokenMembership'); + if Assigned(CheckTokenMembership) then begin + if CheckTokenMembership(0, Sid, IsMember) then + Result := IsMember; + end + else begin + GroupInfo := nil; + if not OpenThreadToken(GetCurrentThread, TOKEN_QUERY, True, + {$IFDEF Delphi3orHigher} Token {$ELSE} @Token {$ENDIF}) then begin + if GetLastError <> ERROR_NO_TOKEN then + Exit; + if not OpenProcessToken(GetCurrentProcess, TOKEN_QUERY, + {$IFDEF Delphi3orHigher} Token {$ELSE} @Token {$ENDIF}) then + Exit; + end; + try + GroupInfoSize := 0; + if not GetTokenInformation(Token, TokenGroups, nil, 0, GroupInfoSize) and + (GetLastError <> ERROR_INSUFFICIENT_BUFFER) then + Exit; + + GetMem(GroupInfo, GroupInfoSize); + if not GetTokenInformation(Token, TokenGroups, GroupInfo, + GroupInfoSize, GroupInfoSize) then + Exit; + + for I := 0 to GroupInfo.GroupCount-1 do begin + if EqualSid(Sid, GroupInfo.Groups[I].Sid) and + (GroupInfo.Groups[I].Attributes and (SE_GROUP_ENABLED or + SE_GROUP_USE_FOR_DENY_ONLY) = SE_GROUP_ENABLED) then begin + Result := True; + Break; + end; + end; + finally + FreeMem(GroupInfo); + CloseHandle(Token); + end; + end; + finally + FreeSid(Sid); + end; +end; + +function IsAdminLoggedOn: Boolean; +{ Returns True if the logged-on user is a member of the Administrators local + group. Always returns True on Windows 9x/Me. } +const + DOMAIN_ALIAS_RID_ADMINS = $00000220; +begin + Result := IsMemberOfGroup(DOMAIN_ALIAS_RID_ADMINS); +end; + +function IsPowerUserLoggedOn: Boolean; +{ Returns True if the logged-on user is a member of the Power Users local + group. Always returns True on Windows 9x/Me. } +const + DOMAIN_ALIAS_RID_POWER_USERS = $00000223; +begin + Result := IsMemberOfGroup(DOMAIN_ALIAS_RID_POWER_USERS); +end; + +function IsMultiByteString(const S: AnsiString): Boolean; +var + I: Integer; +begin + Result := False; + for I := 1 to Length(S) do + if IsDBCSLeadByte(Ord(S[I])) then begin + Result := True; + Break; + end; +end; + +function FontExistsCallback(const lplf: TLogFont; const lptm: TTextMetric; + dwType: DWORD; lpData: LPARAM): Integer; stdcall; +begin + Boolean(Pointer(lpData)^) := True; + Result := 1; +end; + +function FontExists(const FaceName: String): Boolean; +var + DC: HDC; +begin + Result := False; + DC := GetDC(0); + try + EnumFonts(DC, PChar(FaceName), @FontExistsCallback, @Result); + finally + ReleaseDC(0, DC); + end; +end; + +{$IFNDEF IS_D5} +procedure FreeAndNil(var Obj); +var + Temp: TObject; +begin + Temp := TObject(Obj); + Pointer(Obj) := nil; + Temp.Free; +end; +{$ENDIF} + +{$IFNDEF IS_D5} +function SafeLoadLibrary(const Filename: String; ErrorMode: UINT): HMODULE; +var + SaveErrorMode: UINT; + SaveFPUControlWord: Word; +begin + SaveErrorMode := SetErrorMode(ErrorMode); + try + asm + FNSTCW SaveFPUControlWord + end; + try + Result := LoadLibrary(PChar(Filename)); + finally + asm + FNCLEX + FLDCW SaveFPUControlWord + end; + end; + finally + SetErrorMode(SaveErrorMode); + end; +end; +{$ENDIF} + +function GetUILanguage: LANGID; +{ Platform-independent version of GetUserDefaultUILanguage. May return 0 in + case of failure. } +var + GetUserDefaultUILanguage: function: LANGID; stdcall; + K: HKEY; + S: String; + E: Integer; +begin + GetUserDefaultUILanguage := GetProcAddress(GetModuleHandle(kernel32), + 'GetUserDefaultUILanguage'); + if Assigned(GetUserDefaultUILanguage) then + { This function is available on Windows 2000, Me, and later } + Result := GetUserDefaultUILanguage + else begin + if Win32Platform = VER_PLATFORM_WIN32_NT then begin + { Windows NT 4.0 } + if RegOpenKeyExView(rvDefault, HKEY_USERS, '.DEFAULT\Control Panel\International', + 0, KEY_QUERY_VALUE, K) = ERROR_SUCCESS then begin + RegQueryStringValue(K, 'Locale', S); + RegCloseKey(K); + end; + end + else begin + { Windows 95/98 } + if RegOpenKeyExView(rvDefault, HKEY_CURRENT_USER, 'Control Panel\Desktop\ResourceLocale', + 0, KEY_QUERY_VALUE, K) = ERROR_SUCCESS then begin + RegQueryStringValue(K, '', S); + RegCloseKey(K); + end; + end; + Val('$' + S, Result, E); + if E <> 0 then + Result := 0; + end; +end; + +function RemoveAccelChar(const S: String): String; +var + I: Integer; +begin + Result := S; + I := 1; + while I <= Length(Result) do begin + if Result[I] = '&' then begin + System.Delete(Result, I, 1); + if I > Length(Result) then + Break; + end; + Inc(I, PathCharLength(Result, I)); + end; +end; + +function GetTextWidth(const DC: HDC; S: String; const Prefix: Boolean): Integer; +{ Returns the width of the specified string using the font currently selected + into DC. If Prefix is True, it first removes "&" characters as necessary. } +var + Size: TSize; +begin + { This procedure is 10x faster than using DrawText with the DT_CALCRECT flag } + if Prefix then + S := RemoveAccelChar(S); + GetTextExtentPoint32(DC, PChar(S), Length(S), Size); + Result := Size.cx; +end; + +function AddPeriod(const S: String): String; +begin + Result := S; + if (Result <> '') and (PathLastChar(Result)^ > '.') then + Result := Result + '.'; +end; + +function GetExceptMessage: String; +var + E: TObject; +begin + E := ExceptObject; + if E = nil then + Result := '[ExceptObject=nil]' { should never get here } + else if E is Exception then + Result := AddPeriod(Exception(E).Message) { usual case } + else + Result := E.ClassName; { shouldn't get here under normal circumstances } +end; + +function GetPreferredUIFont: String; +{ Gets the preferred UI font. Returns Microsoft Sans Serif, or MS Sans Serif + if it doesn't exist. + Microsoft Sans Serif (which is available on Windows 2000 and later) has two + advantages over MS Sans Serif: + 1) On Windows XP, it can display password dots in edit boxes. + 2) In my tests on Japanese XP, Microsoft Sans Serif can display Japanese + characters (MS Sans Serif cannot). } +begin + if FontExists('Microsoft Sans Serif') then + Result := 'Microsoft Sans Serif' + else + Result := 'MS Sans Serif'; +end; + +function IsWildcard(const Pattern: String): Boolean; +begin + Result := (Pos('*', Pattern) <> 0) or (Pos('?', Pattern) <> 0); +end; + +function WildcardMatch(const Text, Pattern: PChar): Boolean; +{ General-purpose wildcard matching function based on the widely used wildcat() + code by Rich $alz. In this implementation, however, the only supported + pattern matching characters are ? and *. + Note that this function uses Unix shell semantics -- e.g. a dot always + matches a dot (so a pattern of '*.*' won't match 'file'), and ? always + matches exactly 1 character (so '?????' won't match 'file'). + Also note: The InternalWildcardMatch function can recursively call itself + for each non-consecutive * character in the pattern. With enough * + characters, the stack could overflow. So ideally the caller should impose a + limit on either the length of the pattern string or the number of * + characters in it. } +type + TWildcardMatchResult = (wmFalse, wmTrue, wmAbort); + + function InternalWildcardMatch(T, P: PChar): TWildcardMatchResult; + begin + while P^ <> #0 do begin + if (T^ = #0) and (P^ <> '*') then begin + Result := wmAbort; + Exit; + end; + case P^ of + '?': ; { Match any character } + '*': begin + Inc(P); + while P^ = '*' do begin + { Consecutive stars act just like one } + Inc(P); + end; + if P^ = #0 then begin + { Trailing star matches everything } + Result := wmTrue; + Exit; + end; + while T^ <> #0 do begin + Result := InternalWildcardMatch(T, P); + if Result <> wmFalse then + Exit; + T := PathStrNextChar(T); + end; + Result := wmAbort; + Exit; + end; + else + if not PathCharCompare(T, P) then begin + Result := wmFalse; + Exit; + end; + end; + T := PathStrNextChar(T); + P := PathStrNextChar(P); + end; + if T^ = #0 then + Result := wmTrue + else + Result := wmFalse; + end; + +begin + Result := (InternalWildcardMatch(Text, Pattern) = wmTrue); +end; + +function IntMax(const A, B: Integer): Integer; +begin + if A > B then + Result := A + else + Result := B; +end; + +function Win32ErrorString(ErrorCode: Integer): String; +{ Like SysErrorMessage but also passes the FORMAT_MESSAGE_IGNORE_INSERTS flag + which allows the function to succeed on errors like 129 } +var + Len: Integer; + Buffer: array[0..1023] of Char; +begin + Len := FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM or + FORMAT_MESSAGE_IGNORE_INSERTS or FORMAT_MESSAGE_ARGUMENT_ARRAY, nil, + ErrorCode, 0, Buffer, SizeOf(Buffer) div SizeOf(Buffer[0]), nil); + while (Len > 0) and ((Buffer[Len-1] <= ' ') or (Buffer[Len-1] = '.')) do + Dec(Len); + SetString(Result, Buffer, Len); +end; + +{$IFNDEF UNICODE} +procedure GetLeadBytes(var ALeadBytes: TLeadByteSet); +var + AnsiCPInfo: TCPInfo; + I: Integer; + J: Byte; +begin + ALeadBytes := []; + if GetCPInfo(CP_ACP, AnsiCPInfo) then + with AnsiCPInfo do begin + I := 0; + while (I < MAX_LEADBYTES) and ((LeadByte[I] or LeadByte[I+1]) <> 0) do begin + for J := LeadByte[I] to LeadByte[I+1] do + Include(ALeadBytes, AnsiChar(J)); + Inc(I, 2); + end; + end; +end; +{$ENDIF} + +{$IFNDEF IS_D3} +function CompareMem(P1, P2: Pointer; Length: Integer): Boolean; +asm + PUSH ESI + PUSH EDI + MOV ESI,P1 + MOV EDI,P2 + MOV EDX,ECX + XOR EAX,EAX + AND EDX,3 + SHR ECX,1 + SHR ECX,1 + REPE CMPSD + JNE @@2 + MOV ECX,EDX + REPE CMPSB + JNE @@2 +@@1: INC EAX +@@2: POP EDI + POP ESI +end; +{$ENDIF} + +function DeleteDirTree(const Dir: String): Boolean; +{ Removes the specified directory including any files/subdirectories inside + it. Returns True if successful. } +var + H: THandle; + FindData: TWin32FindData; + FN: String; +begin + if (Dir <> '') and (Pos(#0, Dir) = 0) and { sanity/safety checks } + IsDirectoryAndNotReparsePoint(Dir) then begin + H := FindFirstFile(PChar(AddBackslash(Dir) + '*'), FindData); + if H <> INVALID_HANDLE_VALUE then begin + try + repeat + if (StrComp(FindData.cFileName, '.') <> 0) and + (StrComp(FindData.cFileName, '..') <> 0) then begin + FN := AddBackslash(Dir) + FindData.cFileName; + if FindData.dwFileAttributes and FILE_ATTRIBUTE_READONLY <> 0 then + SetFileAttributes(PChar(FN), FindData.dwFileAttributes and not FILE_ATTRIBUTE_READONLY); + if FindData.dwFileAttributes and FILE_ATTRIBUTE_DIRECTORY = 0 then + Windows.DeleteFile(PChar(FN)) + else + DeleteDirTree(FN); + end; + until not FindNextFile(H, FindData); + finally + Windows.FindClose(H); + end; + end; + end; + Result := RemoveDirectory(PChar(Dir)); +end; + +function SetNTFSCompression(const FileOrDir: String; Compress: Boolean): Boolean; +{ Changes the NTFS compression state of a file or directory. If False is + returned, GetLastError can be called to get extended error information. } +const + COMPRESSION_FORMAT_NONE = 0; + COMPRESSION_FORMAT_DEFAULT = 1; + FSCTL_SET_COMPRESSION = $9C040; + Compressions: array[Boolean] of Word = (COMPRESSION_FORMAT_NONE, COMPRESSION_FORMAT_DEFAULT); +var + Handle: THandle; + BytesReturned, LastError: DWORD; +begin + Handle := CreateFile(PChar(FileOrDir), GENERIC_READ or GENERIC_WRITE, + FILE_SHARE_READ, nil, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0); + if Handle <> INVALID_HANDLE_VALUE then begin + Result := DeviceIoControl(Handle, FSCTL_SET_COMPRESSION, @Compressions[Compress], + SizeOf(Compressions[Compress]), nil, 0, BytesReturned, nil); + { Save the error code from DeviceIoControl as CloseHandle may overwrite it + (Windows 95's CloseHandle always sets it to zero) } + LastError := GetLastError; + CloseHandle(Handle); + SetLastError(LastError); + end else + Result := False; +end; + +var + ChangeWindowMessageFilterInited: BOOL; + ChangeWindowMessageFilterFunc: function(msg: UINT; dwFlag: DWORD): BOOL; stdcall; + ChangeWindowMessageFilterExInited: BOOL; + ChangeWindowMessageFilterExFunc: function(hWnd: HWND; msg: UINT; + action: DWORD; pChangeFilterStruct: Pointer): BOOL; stdcall; + +procedure AddToWindowMessageFilter(const Msg: UINT); +{ Adds a single message number to the process-wide message filter on Windows + Vista and later. Has no effect on prior Windows versions. } +const + MSGFLT_ADD = 1; +begin + if not ChangeWindowMessageFilterInited then begin + ChangeWindowMessageFilterFunc := GetProcAddress(GetModuleHandle(user32), + 'ChangeWindowMessageFilter'); + InterlockedExchange(Integer(ChangeWindowMessageFilterInited), Ord(True)); + end; + if Assigned(ChangeWindowMessageFilterFunc) then + ChangeWindowMessageFilterFunc(Msg, MSGFLT_ADD); +end; + +procedure AddToWindowMessageFilterEx(const Wnd: HWND; const Msg: UINT); +{ Adds a single message number to Wnd's window-specific message filter, which + is supported on Windows 7 and later. On Windows Vista, it falls back to + modifying the process-wide message filter. } +const + MSGFLT_ALLOW = 1; +begin + if not ChangeWindowMessageFilterExInited then begin + ChangeWindowMessageFilterExFunc := GetProcAddress(GetModuleHandle(user32), + 'ChangeWindowMessageFilterEx'); + InterlockedExchange(Integer(ChangeWindowMessageFilterExInited), Ord(True)); + end; + if Assigned(ChangeWindowMessageFilterExFunc) then + ChangeWindowMessageFilterExFunc(Wnd, Msg, MSGFLT_ALLOW, nil) + else + AddToWindowMessageFilter(Msg); +end; + +{$IFNDEF UNICODE} +function CharInSet(C: AnsiChar; const CharSet: TSysCharSet): Boolean; +begin + Result := C in CharSet; +end; +{$ENDIF} + +function ShutdownBlockReasonCreate(Wnd: HWND; const Reason: String): Boolean; +var + ShutdownBlockReasonCreateFunc: function(Wnd: HWND; pwszReason: LPCWSTR): Bool; stdcall; +{$IFNDEF UNICODE} + Buf: array[0..4095] of WideChar; +{$ENDIF} +begin + { MSDN doesn't say whether you must call Destroy before a second Create, but it does say a Destroy + without a previous Create is a no-op, so call Destroy for safety. } + ShutdownBlockReasonDestroy(Wnd); + + ShutdownBlockReasonCreateFunc := GetProcAddress(GetModuleHandle(user32), 'ShutdownBlockReasonCreate'); + if Assigned(ShutdownBlockReasonCreateFunc) then begin +{$IFDEF UNICODE} + Result := ShutdownBlockReasonCreateFunc(Wnd, PChar(Reason)); +{$ELSE} + Buf[MultiByteToWideChar(CP_ACP, 0, PChar(Reason), Length(Reason), Buf, + (SizeOf(Buf) div SizeOf(Buf[0])) - 1)] := #0; + Result := ShutdownBlockReasonCreateFunc(Wnd, Buf); +{$ENDIF} + end else + Result := False; +end; + +{ As MSDN says: if ShutdownBlockReasonCreate was not previously called, this function is a no-op. } +function ShutdownBlockReasonDestroy(Wnd: HWND): Boolean; +var + ShutdownBlockReasonDestroyFunc: function(Wnd: HWND): Bool; stdcall; +begin + ShutdownBlockReasonDestroyFunc := GetProcAddress(GetModuleHandle(user32), 'ShutdownBlockReasonDestroy'); + Result := Assigned(ShutdownBlockReasonDestroyFunc) and ShutdownBlockReasonDestroyFunc(Wnd); +end; + +function TryStrToBoolean(const S: String; var BoolResult: Boolean): Boolean; +begin + if (S = '0') or (CompareText(S, 'no') = 0) or (CompareText(S, 'false') = 0) then begin + BoolResult := False; + Result := True; + end + else if (S = '1') or (CompareText(S, 'yes') = 0) or (CompareText(S, 'true') = 0) then begin + BoolResult := True; + Result := True; + end + else + Result := False; +end; + +procedure WaitMessageWithTimeout(const Milliseconds: DWORD); +{ Like WaitMessage, but times out if a message isn't received before + Milliseconds ms have elapsed. } +begin + MsgWaitForMultipleObjects(0, THandle(nil^), False, Milliseconds, QS_ALLINPUT); +end; + +function MoveFileReplace(const ExistingFileName, NewFileName: String): Boolean; +begin + if Win32Platform = VER_PLATFORM_WIN32_NT then begin + Result := MoveFileEx(PChar(ExistingFileName), PChar(NewFileName), + MOVEFILE_REPLACE_EXISTING); + end + else begin + Result := DeleteFile(PChar(NewFileName)); + if Result or (GetLastError = ERROR_FILE_NOT_FOUND) then + Result := MoveFile(PChar(ExistingFileName), PChar(NewFileName)); + end; +end; + +var + SHAutoCompleteInitialized: Boolean; + SHAutoCompleteFunc: function(hwndEdit: HWND; dwFlags: dWord): LongInt; stdcall; + +procedure TryEnableAutoCompleteFileSystem(Wnd: HWND); +const + SHACF_FILESYSTEM = $1; +var + M: HMODULE; +begin + if not SHAutoCompleteInitialized then begin + M := SafeLoadLibrary(PChar(AddBackslash(GetSystemDir) + 'shlwapi.dll'), + SEM_NOOPENFILEERRORBOX); + if M <> 0 then + SHAutoCompleteFunc := GetProcAddress(M, 'SHAutoComplete'); + SHAutoCompleteInitialized := True; + end; + + if Assigned(SHAutoCompleteFunc) then + SHAutoCompleteFunc(Wnd, SHACF_FILESYSTEM); +end; + +{ TOneShotTimer } + +function TOneShotTimer.Expired: Boolean; +begin + Result := (TimeRemaining = 0); +end; + +procedure TOneShotTimer.SleepUntilExpired; +var + Remaining: Cardinal; +begin + while True do begin + Remaining := TimeRemaining; + if Remaining = 0 then + Break; + Sleep(Remaining); + end; +end; + +procedure TOneShotTimer.Start(const Timeout: Cardinal); +begin + FStartTick := GetTickCount; + FTimeout := Timeout; + FLastElapsed := 0; +end; + +function TOneShotTimer.TimeElapsed: Cardinal; +var + Elapsed: Cardinal; +begin + Elapsed := GetTickCount - FStartTick; + if Elapsed > FLastElapsed then + FLastElapsed := Elapsed; + Result := FLastElapsed; +end; + +function TOneShotTimer.TimeRemaining: Cardinal; +var + Elapsed: Cardinal; +begin + Elapsed := TimeElapsed; + if Elapsed < FTimeout then + Result := FTimeout - Elapsed + else + Result := 0; +end; + +end. diff --git a/Projects/CompDocIcon.res b/Projects/CompDocIcon.res new file mode 100644 index 000000000..853022bba Binary files /dev/null and b/Projects/CompDocIcon.res differ diff --git a/Projects/CompFileAssoc.pas b/Projects/CompFileAssoc.pas new file mode 100644 index 000000000..714e844d1 --- /dev/null +++ b/Projects/CompFileAssoc.pas @@ -0,0 +1,158 @@ +unit CompFileAssoc; + +{ + Inno Setup + Copyright (C) 1997-2005 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Functions for registering/unregistering the .iss file association + + $jrsoftware: issrc/Projects/CompFileAssoc.pas,v 1.13 2009/04/21 13:46:04 mlaan Exp $ +} + +interface + +procedure RegisterISSFileAssociation; +procedure UnregisterISSFileAssociation; + +implementation + +uses + Windows, SysUtils, PathFunc, ShlObj, CmnFunc2; + +procedure RegisterISSFileAssociation; + + procedure SetKeyValue(const Subkey, ValueName: PChar; const Data: String); + + procedure Check(const Res: Longint); + begin + if Res <> ERROR_SUCCESS then + raise Exception.CreateFmt('Error creating file association:'#13#10'%d - %s', + [Res, Win32ErrorString(Res)]); + end; + + var + K: HKEY; + Disp: DWORD; + begin + Check(RegCreateKeyExView(rvDefault, HKEY_CLASSES_ROOT, Subkey, 0, nil, 0, KEY_SET_VALUE, + nil, K, @Disp)); + try + Check(RegSetValueEx(K, ValueName, 0, REG_SZ, PChar(Data), (Length(Data)+1)*SizeOf(Data[1]))); + finally + RegCloseKey(K); + end; + end; + +var + SelfName: String; +begin + SelfName := NewParamStr(0); + + SetKeyValue('.iss', nil, 'InnoSetupScriptFile'); + SetKeyValue('.iss', 'Content Type', 'text/plain'); + + SetKeyValue('InnoSetupScriptFile', nil, 'Inno Setup Script'); + SetKeyValue('InnoSetupScriptFile\DefaultIcon', nil, SelfName + ',1'); + SetKeyValue('InnoSetupScriptFile\shell\open\command', nil, + '"' + SelfName + '" "%1"'); + SetKeyValue('InnoSetupScriptFile\shell\OpenWithInnoSetup', nil, + 'Open with &Inno Setup'); + SetKeyValue('InnoSetupScriptFile\shell\OpenWithInnoSetup\command', nil, + '"' + SelfName + '" "%1"'); + SetKeyValue('InnoSetupScriptFile\shell\Compile', nil, 'Compi&le'); + SetKeyValue('InnoSetupScriptFile\shell\Compile\command', nil, + '"' + SelfName + '" /cc "%1"'); + + SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil); +end; + +procedure UnregisterISSFileAssociation; + + function KeyValueEquals(const Subkey: PChar; const Data: String): Boolean; + var + K: HKEY; + S: String; + begin + Result := False; + if RegOpenKeyExView(rvDefault, HKEY_CLASSES_ROOT, Subkey, 0, KEY_QUERY_VALUE, K) = ERROR_SUCCESS then begin + if RegQueryStringValue(K, nil, S) and (PathCompare(Data, S) = 0) then + Result := True; + RegCloseKey(K); + end; + end; + + function KeyExists(const Subkey: PChar): Boolean; + var + K: HKEY; + begin + Result := (RegOpenKeyExView(rvDefault, HKEY_CLASSES_ROOT, Subkey, 0, KEY_QUERY_VALUE, + K) = ERROR_SUCCESS); + if Result then + RegCloseKey(K); + end; + + function GetKeyNumSubkeysValues(const Subkey: PChar; + var NumSubkeys, NumValues: DWORD): Boolean; + var + K: HKEY; + begin + Result := False; + if RegOpenKeyExView(rvDefault, HKEY_CLASSES_ROOT, Subkey, 0, KEY_QUERY_VALUE, K) = ERROR_SUCCESS then begin + Result := RegQueryInfoKey(K, nil, nil, nil, @NumSubkeys, nil, nil, + @NumValues, nil, nil, nil, nil) = ERROR_SUCCESS; + RegCloseKey(K); + end; + end; + + procedure DeleteValue(const Subkey, ValueName: PChar); + var + K: HKEY; + begin + if RegOpenKeyExView(rvDefault, HKEY_CLASSES_ROOT, Subkey, 0, KEY_SET_VALUE, K) = ERROR_SUCCESS then begin + RegDeleteValue(K, ValueName); + RegCloseKey(K); + end; + end; + +var + SelfName: String; + NumSubkeys, NumValues: DWORD; +begin + if not KeyExists('InnoSetupScriptFile') and not KeyExists('.iss') then + Exit; + + SelfName := NewParamStr(0); + + { NOTE: We can't just blindly delete the entire .iss & InnoSetupScriptFile + keys, otherwise we'd remove the association even if we weren't the one who + registered it in the first place. } + + { Clean up 'InnoSetupScriptFile' } + if KeyValueEquals('InnoSetupScriptFile\DefaultIcon', SelfName + ',1') then + RegDeleteKeyIncludingSubkeys(rvDefault, HKEY_CLASSES_ROOT, 'InnoSetupScriptFile\DefaultIcon'); + if KeyValueEquals('InnoSetupScriptFile\shell\open\command', '"' + SelfName + '" "%1"') then + RegDeleteKeyIncludingSubkeys(rvDefault, HKEY_CLASSES_ROOT, 'InnoSetupScriptFile\shell\open'); + if KeyValueEquals('InnoSetupScriptFile\shell\OpenWithInnoSetup\command', '"' + SelfName + '" "%1"') then + RegDeleteKeyIncludingSubkeys(rvDefault, HKEY_CLASSES_ROOT, 'InnoSetupScriptFile\shell\OpenWithInnoSetup'); + if KeyValueEquals('InnoSetupScriptFile\shell\Compile\command', '"' + SelfName + '" /cc "%1"') then + RegDeleteKeyIncludingSubkeys(rvDefault, HKEY_CLASSES_ROOT, 'InnoSetupScriptFile\shell\Compile'); + RegDeleteKeyIfEmpty(rvDefault, HKEY_CLASSES_ROOT, 'InnoSetupScriptFile\shell'); + if KeyValueEquals('InnoSetupScriptFile', 'Inno Setup Script') and + GetKeyNumSubkeysValues('InnoSetupScriptFile', NumSubkeys, NumValues) and + (NumSubkeys = 0) and (NumValues <= 1) then + RegDeleteKey(HKEY_CLASSES_ROOT, 'InnoSetupScriptFile'); + + { Clean up '.iss' } + if not KeyExists('InnoSetupScriptFile') and + KeyValueEquals('.iss', 'InnoSetupScriptFile') then begin + DeleteValue('.iss', nil); + DeleteValue('.iss', 'Content Type'); + end; + RegDeleteKeyIfEmpty(rvDefault, HKEY_CLASSES_ROOT, '.iss'); + + SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, nil, nil); +end; + +end. diff --git a/Projects/CompForm.dfm b/Projects/CompForm.dfm new file mode 100644 index 000000000..0eb9bcf86 Binary files /dev/null and b/Projects/CompForm.dfm differ diff --git a/Projects/CompForm.dfm.txt b/Projects/CompForm.dfm.txt new file mode 100644 index 000000000..55e50dfdc --- /dev/null +++ b/Projects/CompForm.dfm.txt @@ -0,0 +1,1124 @@ +object CompileForm: TCompileForm + Left = 206 + Top = 97 + AutoScroll = False + Caption = '*' + ClientHeight = 265 + ClientWidth = 361 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + KeyPreview = True + Menu = MainMenu1 + Position = poDefault + Scaled = False + OnCloseQuery = FormCloseQuery + OnKeyDown = FormKeyDown + OnResize = FormResize + PixelsPerInch = 96 + TextHeight = 13 + object ToolbarPanel: TPanel + Left = 0 + Top = 0 + Width = 361 + Height = 28 + Align = alTop + BevelOuter = bvNone + FullRepaint = False + ParentShowHint = False + ShowHint = True + TabOrder = 2 + object NewButton: TSpeedButton + Left = 6 + Top = 4 + Width = 23 + Height = 22 + Hint = 'New' + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360400002800000020000000100000000100 + 0800000000000002000000000000000000000001000000010000FF00FF008080 + 800081818100828282008D8D8D008F8F8F009797970099999900A1A1A100A2A2 + A200A8A8A800AAAAAA00AEAEAE00AFAFAF00B4B4B400B5B5B500B8B8B800BABA + BA00BBBBBB00BDBDBD00BEBEBE00BFBFBF00C0C0C000C1C1C100C6C6C600C7C7 + C700CBCBCB00CCCCCC00D0D0D000D1D1D100D4D4D400D5D5D500D7D7D700DADA + DA00DBDBDB00DCDCDC00DDDDDD00DEDEDE00DFDFDF00E0E0E000E2E2E200E5E5 + E500E6E6E600E7E7E700E8E8E800E9E9E900EAEAEA00EBEBEB00ECECEC00EDED + ED00EEEEEE00EFEFEF00F0F0F000F1F1F100F2F2F200F3F3F300F4F4F400F5F5 + F500F6F6F600F7F7F700F8F8F800F9F9F900FAFAFA00FBFBFB00FCFCFC00FDFD + FD00FEFEFE00FFFFFF0000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000303030202 + 02020201010101010000001717171616161616161616161600000005413D3D3D + 3D3D3D3C3C3C410400000019424040404040404040404218000000073D2B2C2C + 2C2C2B2B2A293C060000001B40373838383837373736401A000000093E2E2F2F + 2F2F2E2D2C2B3D080000001D41393939393939383837401C0000000B3E313132 + 323131302F2E3E0A0000001F413A3A3B3B3A3A3A3939411E0000000D3F333434 + 3434333332303E0C00000020413B3C3C3C3C3B3B3B3A41200000000F40353636 + 3636363534333F0E00000021423C3D3D3D3D3D3C3C3B41210000001040373839 + 3938383736353F1000000023423D3E3E3E3E3E3D3D3C41230000001240393A3A + 3A3A3A393836401100000024423E3F3F3F3F3F3E3E3D422400000013413B3C3C + 3C3C3B3A3938401300000025423F404040403F3F3E3E422500000014413C3D3D + 3D3D3D3C3A3940140000002642404040404040403F3E422600000015413D3E3E + 3F3E3E3D3C3A4115000000264240414141414140403F422600000016423E3F3F + 3F3F3E3D161A22150000002743414141414141402729312600000016423F3F40 + 40403F3E1A281600000000274341414242424141293527000000001643424242 + 4242423E22160000000000274343434343434341312700000000001616161616 + 1616161616000000000000272727272727272727270000000000} + NumGlyphs = 2 + OnClick = FNewClick + end + object Bevel1: TBevel + Left = 0 + Top = 0 + Width = 361 + Height = 2 + Align = alTop + Shape = bsTopLine + end + object OpenButton: TSpeedButton + Left = 29 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Open' + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360400002800000020000000100000000100 + 0800000000000002000000000000000000000001000000010000244556003748 + 5200345C720033637D0033657C00425D6D00476A7F00426F86004D738900527A + 8E00487D9600FF00FF0046819A00588093005F869800658797006D8C9B007D93 + 9800528BA600568EA9005796AF005992AC005D96AF005C9AB3006F94A4007897 + A5007198A8007F9DAA00619EB6006A9BB0007AA0AF0066A2B9006BA7BC004C9E + C50064A8C50070ABC00075B0C3007AB4C6007EB4CA007FB8C9006CB6D3006FBA + D60076B6D20072BED90075C2DC0078C6DF007BCAE2007ECFE50083979C0088A0 + AA008BA2AC008EA4AD0090A6AF0093A7B00091ABB600A3A3A300A4A4A400AFAF + AF00B3B3B300B6B6B600B8B8B800BABABA00BEBEBE00BFBFBF00EEAA8000E9D0 + BA0086B5C3008EB3C30084BDCD0088BAD00084C2D60088C1D0008DC5D30083CA + DC0091C0D40092C9D70099C6D90097CEDA009CD2DD00A1CBDD0081D3E80084D7 + EB0087DBEE008ADFF100A8CFE0008DE3F40090E7F80093EBFB00C0C0C000C1C1 + C100C3C3C300C4C4C400C6C6C600C8C8C800C9C9C900CACACA00CBCBCB00CCCC + CC00CDCDCD00CECECE00CFCFCF00D0D0D000D1D1D100D2D2D200D3D3D300D4D4 + D400D5D5D500D7D7D700D9D9D900DADADA00DBDBDB00DDDDDD00DEDEDE00DFDF + DF00E0E0E000E1E1E100E2E2E200E3E3E300E4E4E400E6E6E600E7E7E700E8E8 + E800EAEAEA00EBEBEB00EDEDED00EFEFEF00F1F1F100F2F2F200F3F3F3000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000000B0C0C0C0C0C + 0C0C00030402010B0B0B0B59595959595959373A3A39380B0B0B142828282828 + 28280421210740050B0B606E6E6E6E6E6E6E3A65653C67390B0B172929292929 + 29291061610A40060B0B626F6F6F6F6F6F6F5C77773F673B0B0B1C2B2B2B2B2B + 2B2B1976611276080B0B6471717171717171617F775C7F3D0B0B1F2C2C2C2C2C + 2C2C1141611376090B0B66727272727272725E77775D7F3E0B0B202D2D2D2D2D + 2D2D1B786115760D0B0B68747474747474746480775F7F580B0B232E2E2E2E2E + 2E2D30416116760E0B0B6A76767676767674607777607F5A0B0B242F2F2F2F2F + 2F2F184361221D0F0B0B6B777777777777775F6D7769635B0B0B255050505050 + 5050461E362A1A0B0B0B6C7979797979797972656A6E610B0B0B275151515151 + 5151514934261A0B0B0B6E7A7A7A7A7A7A7A7A76686D610B0B0B445252525252 + 5252525235451A0B0B0B707B7B7B7B7B7B7B7B7B696F610B0B0B475353535353 + 53535353314A1A0B0B0B717C7C7C7C7C7C7C7C7C6572610B0B0B485555555555 + 55555555324C1A0B0B0B737D7D7D7D7D7D7D7D7D6675610B0B0B4B5656565656 + 56565656334F1A0B0B0B757E7E7E7E7E7E7E7E7E6777610B0B0B4D5757575757 + 5757575731541A0B0B0B778080808080808080806579610B0B0B0B4E4E4E4E4E + 4E4E4E4E31420B0B0B0B0B787878787878787878656D0B0B0B0B} + NumGlyphs = 2 + OnClick = FOpenClick + end + object SaveButton: TSpeedButton + Left = 52 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Save' + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360400002800000020000000100000000100 + 08000000000000020000000000000000000000010000000100007F3F08004D1C + 74007B6141006E6E6E0074747400797979007E7E7E00853D260087410A008F45 + 0C009640040091440B009047090092450C0094470D0095480A00974B0B009548 + 0D0096490E00974B0E00974C0F00984C0E00994D10009A5314009C541400A054 + 1100A65B1700A95F1900AC631C00B6611F0084512100AF6B2800A8713400B274 + 3600C66C1C00C76C1D00CA711F00CB711F00CE762200CF772200D27C2700D37E + 2900975C4500B9764000B57D4500BB784300BC794300BD7A4500BF7C4600BC7B + 4900C27F4900D6883A00D78A3D00B8855200B1805D00BB8C5E00BC916700BD92 + 6800CA844400D19D6E00C1957300C2967300C3977400C4987400C5997500C69B + 7700CA9B7500C99F7C00D09F750042299200FF00FF0080808000838383008686 + 86008787870092929200949494009D9D9D00A6A6A600A9A9A900AAAAAA00ABAB + AB00ACACAC00ADADAD00AEAEAE00B0B0B000B1B1B100B3B3B300B4B4B400B5B5 + B500B6B6B600B7B7B700B8B8B800B9B9B900BABABA00BBBBBB00BCBCBC00BDBD + BD00BEBEBE00BFBFBF00CBA38100CDA58400CFA88700D4A98500D4AA8600D8AB + 8400D1AA8900DAB18E00C0C0C000C1C1C100C2C2C200C3C3C300C4C4C400C5C5 + C500C6C6C600C7C7C700C8C8C800C9C9C900CACACA00CBCBCB00CCCCCC00CDCD + CD00CECECE00CFCFCF00D0D0D000D1D1D100D3D3D300D4D4D400D5D5D500D6D6 + D600D7D7D700D8D8D800D9D9D900DADADA00DBDBDB00DCDCDC00DDDDDD00DEDE + DE00DFDFDF00E0E0E000E1E1E100E2E2E200E3E3E300E4E4E400E5E5E500E6E6 + E600E7E7E700E8E8E800E9E9E900EAEAEA00EBEBEB00ECECEC00EDEDED00EEEE + EE00EFEFEF00F0F0F000F1F1F100F2F2F200F3F3F300F4F4F400F5F5F500F6F6 + F600F7F7F700F9F9F900FAFAFA00FBFBFB00FCFCFC00FDFDFD00FEFEFE000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000461717170249 + 4A474C4A0603020A0000465555555B6F6F6D736F6D605B4F4F4F461822230248 + 0A0A5B604E4A020A0F0B46565C5C5B6E4F4F80837A6F5B4F5251461A24250206 + 0A0A727B594B020A0F0B46575D5D5B6D4F4F888D7F735B4F5351461B26270205 + 0A0A7E8E744D020A100D46585E5E5B634F4F8F9889765B4F5351461C28290204 + 040480A18651020A150E465960605B62626290A3947C5B4F5452461F33342002 + 0202020202021E0C1911465C636C5E5B5B5B5B5B5B5B5551555346213A6A6665 + 644341403F3E3D3C1D12465F6379787776757473737272725A53462C3B9B9894 + 908D8986828181812D13466174A19F9C9A9895949191919161544635448F8C89 + 8784817F7D7A78762B14466C74999795949291908E8C8B8A6054463769A8A6A3 + A09D9996928E8B872F14466E79A8A7A5A3A29F9D9B9897946154463967939393 + 92908D8B888583802E164670789C9C9C9B9A989795939290615446396BA8A8A8 + A8A8A7A4A29E9B97321646717CA8A8A8A8A8A8A6A4A2A19E6354463968939393 + 9393939393918F8C30154670799C9C9C9C9C9C9C9C9A99976254463942A8A8A8 + A8A8A8A8A8A8A8A53109467074A8A8A8A8A8A8A8A8A8A8A66251463942454545 + 454545454545454531094670745656565656565656565656625146362A010101 + 01010101010101010708466C5B51515151515151515151515250} + NumGlyphs = 2 + OnClick = FSaveClick + end + object Bevel2: TBevel + Left = 78 + Top = 4 + Width = 2 + Height = 22 + Shape = bsLeftLine + end + object CompileButton: TSpeedButton + Left = 83 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Compile' + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360000002800000020000000100000000100 + 1800000000000006000000000000000000000000000000000000FF00FFFF00FF + FF00FFFF00FF9933009933009933009933007326007326009933009933009933 + 00993300993300993300FF00FFFF00FFFF00FFFF00FF8B8B8B8B8B8B8B8B8B8B + 8B8B7F7F7F7F7F7F8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8BFF00FFFF00FF + FF00FFFF00FF993300FFFCF7FFF9F18F8B838F897FBFB5A5FFEED4FFECCDFFE9 + C6FFE6C0FFE4BB993300FF00FFFF00FFFF00FFFF00FF8B8B8BFCFCFCFAFAFAB3 + B3B3B1B1B1CDCDCDF1F1F1EFEFEFECECECEAEAEAE9E9E98B8B8BFF00FFFF00FF + FF00FFFF00FF993300FFFDF98F8D890D7F1A0D7F1A8F887E8F8779BFB29DFFEA + CAFFE8C3FFE5BD993300FF00FFFF00FFFF00FFFF00FF8B8B8BFDFDFDB5B5B587 + 8787878787B1B1B1AFAFAFCBCBCBEEEEEEECECECEAEAEA8B8B8BFF00FFFF00FF + FF00FFFF00FF9933000D7F1A0D7F1A46D47046DB770D7F1A0D7F1A8F8577BFB1 + 9AFFE9C6FFE6C0993300FF00FFFF00FFFF00FFFF00FF8B8B8B878787878787B5 + B5B5B7B7B7878787878787AFAFAFC9C9C9ECECECEAEAEA8B8B8BC27A7ABD7878 + B87575B373739933000D7F1A5EF69260F89455ED8949E17D0D7F1A8F8779BFB2 + 9DFFEACAFFE8C3993300C0C0C0BEBEBEBBBBBBB9B9B98B8B8B878787C8C8C8C9 + C9C9C2C2C2BABABA878787AFAFAFCBCBCBEEEEEEECECEC8B8B8BC87D7EFFEDD0 + FFEBCCFFEAC80D7F1A3DD16D41D06B0D7F1A0D7F1A43D26D44D9750D7F1A8F85 + 77BFB19AFFE9C6993300C3C3C3EFEFEFEEEEEEEDEDED878787B1B1B1B2B2B287 + 8787878787B3B3B3B6B6B6878787AFAFAFC9C9C9ECECEC8B8B8BCF8181FFEFD7 + FFEDD20D7F1A30C56135CD690D7F1ABFBFBFFFFFFF0D7F1A53EB8743D8740D7F + 1A561D00732600993300C7C7C7F2F2F2F0F0F0878787A9A9A9ADADAD878787D6 + D6D6FFFFFF878787C1C1C1B5B5B58787877676767F7F7F8B8B8BD68485FFF2DD + FFF0D80D7F1A33CB672AB9550D7F1A8F8F8FBFBFBF0D7F1A53EB8753EB870D7F + 1A29448F9A4F00993300CACACAF4F4F4F2F2F2878787ACACACA3A3A3878787B7 + B7B7D6D6D6878787C1C1C1C1C1C18787879696968C8C8C8B8B8BDC8788FFF4E3 + FFF2DFFFF1DA138B2533CB672AB9550D7F1A0D7F1A4EDD795DF5910D7F1A561D + 00732600993300FF00FFCDCDCDF6F6F6F5F5F5F3F3F38D8D8DACACACA3A3A387 + 8787878787BABABAC7C7C78787877676767F7F7F8B8B8BFF00FFE38B8BFFF6E9 + FFF5E5FFF3E1FFF1DC0D7F1A33CB6737CF6B45DD7954EC880D7F1AFF00FFFF00 + FFFF00FFFF00FFFF00FFD0D0D0F8F8F8F7F7F7F5F5F5F3F3F3878787ACACACAF + AFAFB8B8B8C2C2C2878787FF00FFFF00FFFF00FFFF00FFFF00FFE98E8FFFF9EE + FFF7EBFFF5E7FFF4E20D7F1A0D7F1A30C56134C9650D7F1A0D7F1AFF00FFFF00 + FFFF00FFFF00FFFF00FFD3D3D3F9F9F9F9F9F9F7F7F7F5F5F5878787878787A9 + A9A9ACACAC878787878787FF00FFFF00FFFF00FFFF00FFFF00FFEE9191FFFBF4 + FFF9F0FFF8ECFFF6E8FFF4E4FFF3E00D7F1A0D7F1AFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFD6D6D6FBFBFBFAFAFAF9F9F9F7F7F7F6F6F6F5F5F587 + 8787878787FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF39394FFFCF8 + FFFBF5FFFAF2FFF8EEDE8889D98686D48384CF8181FF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFD8D8D8FCFCFCFCFCFCFAFAFAF9F9F9CECECECBCBCBC9 + C9C9C7C7C7FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF89596FFFEFC + FFFDF9FFFCF6FFFAF3E48B8CDF993EDB8787FF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFDADADAFEFEFEFDFDFDFCFCFCFBFBFBD0D0D0B6B6B6CD + CDCDFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFC9798FFFFFF + FFFEFDFFFDFBFFFCF8EA8E8FE68C8DFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFDCDCDCFFFFFFFEFEFEFEFEFEFCFCFCD4D4D4D2D2D2FF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF999AFD9899 + FA9697F79596F39394F09192FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFDEDEDEDDDDDDDBDBDBDADADAD8D8D8D6D6D6FF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + NumGlyphs = 2 + OnClick = BCompileClick + end + object StopCompileButton: TSpeedButton + Left = 106 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Stop Compile' + Enabled = False + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360000002800000020000000100000000100 + 1800000000000006000000000000000000000000000000000000FF00FFFF00FF + FF00FFFF00FF9933009933009933009933009933009933009933009933009933 + 00993300993300993300FF00FFFF00FFFF00FFFF00FF8B8B8B8B8B8B8B8B8B8B + 8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8B8BFF00FFFF00FF + FF00FFFF00FF993300FFFCF7FFF9F1FFF7EAFFF4E3FFF1DCFFEED4FFECCDFFE9 + C6FFE6C0FFE4BB993300FF00FFFF00FFFF00FFFF00FF8B8B8BFCFCFCFAFAFAF8 + F8F8F6F6F6F3F3F3F1F1F1EFEFEFECECECEAEAEAE9E9E98B8B8BFF00FFFF00FF + FF00FFFF00FF00009A8F8E8CBFBCB7FFF8EE00009A8F887EBFB4A2FFEDD1FFEA + CAFFE8C3FFE5BD993300FF00FFFF00FFFF00FFFF00FF8C8C8CB5B5B5D3D3D3F9 + F9F98C8C8CB1B1B1CCCCCCF0F0F0EEEEEEECECECEAEAEA8B8B8BFF00FFFF00FF + FF00FF00009A1A66FF00009A8F8D8B00009A033AFF00009A8F877BFFEED4FFEC + CDFFE9C6FFE6C0993300FF00FFFF00FFFF00FF8C8C8CB5B5B58C8C8CB5B5B58C + 8C8CADADAD8C8C8CB0B0B0F1F1F1EFEFEFECECECEAEAEA8B8B8BC27A7ABD7878 + 00009A66CCFF2073FF1A66FF00009A0D4DFF0843FF033AFF00009AFFF0D8FFED + D1FFEACAFFE8C3993300C0C0C0BEBEBE8C8C8CCDCDCDB7B7B7B5B5B58C8C8CB1 + B1B1AFAFAFADADAD8C8C8CF2F2F2F0F0F0EEEEEEECECEC8B8B8BC87D7EFFEDD0 + FFEBCC00009A66CCFF2073FF1A66FF1459FF0D4DFF00009A8F897FBFB5A5FFEE + D4FFECCDFFE9C6993300C3C3C3EFEFEFEEEEEE8C8C8CCDCDCDB7B7B7B5B5B5B3 + B3B3B1B1B18C8C8CB1B1B1CDCDCDF1F1F1EFEFEFECECEC8B8B8BCF8181FFEFD7 + FFEDD2FFECCE00009A277FFF2073FF1A66FF00009A561D007326009933009933 + 00993300993300993300C7C7C7F2F2F2F0F0F0EFEFEF8C8C8CB9B9B9B7B7B7B5 + B5B58C8C8C7676767F7F7F8B8B8B8B8B8B8B8B8B8B8B8B8B8B8BD68485FFF2DD + FFF0D800009A3192FF2C8AFF277FFF2073FF1A66FF00009A804800BFA988D873 + 004A79FFCE6900993300CACACAF4F4F4F2F2F28C8C8CBCBCBCBABABAB9B9B9B7 + B7B7B5B5B58C8C8C838383C3C3C3A0A0A0C4C4C49D9D9D8B8B8BDC8788FFF4E3 + 00009A66CCFF3499FF3192FF00009A66CCFF2073FF1A66FF00009A561D009933 + 00993300993300FF00FFCDCDCDF6F6F68C8C8CCDCDCDBDBDBDBCBCBC8C8C8CCD + CDCDB7B7B7B5B5B58C8C8C7676768B8B8B8B8B8B8B8B8BFF00FFE38B8BFFF6E9 + FFF5E500009A66CCFF00009AFFEED300009A66CCFF00009AFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFD0D0D0F8F8F8F7F7F78C8C8CCDCDCD8C8C8CF1F1F18C + 8C8CCDCDCD8C8C8CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFE98E8FFFF9EE + FFF7EBFFF5E700009AFFF2DEFFF0DAFFEFD500009AFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFD3D3D3F9F9F9F9F9F9F7F7F78C8C8CF4F4F4F3F3F3F1 + F1F18C8C8CFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFEE9191FFFBF4 + FFF9F0FFF8ECFFF6E8FFF4E4FFF3E0FFF1DCC87D7EFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFD6D6D6FBFBFBFAFAFAF9F9F9F7F7F7F6F6F6F5F5F5F3 + F3F3C3C3C3FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF39394FFFCF8 + FFFBF5FFFAF2FFF8EEDE8889D98686D48384CF8181FF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFD8D8D8FCFCFCFCFCFCFAFAFAF9F9F9CECECECBCBCBC9 + C9C9C7C7C7FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFF89596FFFEFC + FFFDF9FFFCF6FFFAF3E48B8CDF993EDB8787FF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFDADADAFEFEFEFDFDFDFCFCFCFBFBFBD0D0D0B6B6B6CD + CDCDFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFC9798FFFFFF + FFFEFDFFFDFBFFFCF8EA8E8FE68C8DFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFDCDCDCFFFFFFFEFEFEFEFEFEFCFCFCD4D4D4D2D2D2FF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF999AFD9899 + FA9697F79596F39394F09192FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFDEDEDEDDDDDDDBDBDBDADADAD8D8D8D6D6D6FF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + NumGlyphs = 2 + OnClick = BStopCompileClick + end + object Bevel3: TBevel + Left = 131 + Top = 4 + Width = 2 + Height = 22 + Shape = bsLeftLine + end + object RunButton: TSpeedButton + Left = 136 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Run' + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360400002800000020000000100000000100 + 0800000000000002000000000000000000000001000000010000045708000467 + 0B0004690C00087110000B7C15006E6E6E00747474007C7C7C00078D12000D85 + 1A00108F1F0008A5160008AB170009A618000DA81F0009B118000CB21F000BB8 + 1D00129A280011AB270014A428000DB3200010BA270013B52D0015AF32001BAD + 3C0015BD31001AB03A001ABE3A001FBB460020B4450021B5480022BB480030BD + 440024BE510029BF530037BC5A001EC0450025C554002DC1630031C4640030C5 + 6A0034C46A0036C570003BC7740034C873003FC8760042C064004EC962004CC3 + 6B0042C8760048CA7A0052C57000FF00FF004FCD820051CC800059CF870059D0 + 890065D28F007CD78D006FD5970078D79D0077D89F0079D89900828282008B8B + 8B00959595009D9D9D00A1A1A100A9A9A900B6B6B600B9B9B90080DAA30087DD + AA008ADEAC0091DFAF0095E0B3009DE3B900A8E4B400A6E5BF00AAE5B900A9E6 + C200AEE8C500B1E9C800C4C4C400CDCDCD00D9D9D900D3F1D900DDF5E700EDED + ED00F2F2F200F1FBF300FEFEFE00FFFFFF000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000353535353535 + 3535353535353535353535353535353535353535353535353535353504040302 + 010101010101010035353535070707060606060606060605353535121B18130E + 0D0B0B0B0B0B0E08003535414242414141414141414141400535351926251C1A + 161111111111110C023535424443434342424242424242410635351E2823201C + 572110100F0F0F0C023535434444434259434241414142410635351F2E282322 + 5D5B3015100F110C01353543454444435C5C4542424142410635351F39332A23 + 5D5D5D3B1510100B02353543464544445C5C5C54424241410635351F3E372C2A + 5D5D5D5D4E17110E02353543544645445C5C5C5C564242410635351F4A39332A + 5D5D5D5D501C1A0E02353543554745455C5C5C5C564243410735351F4C3A332C + 5D5D5D3F201D1C1804353543554746455C5C5C54434342420735351F4D3C3737 + 5D5B392A2720261B09353543564746465C5C4644444343424035351F51483938 + 5837322C2A27271E0A353543565546465A464545444444434035351F524F4B48 + 3D3C37332A2B2920123535435656565454474645454444444135351F4C525351 + 4D493C362C2B2D27143535435556565656554746454545444235353524343434 + 312F24231F1F1F19353535354446464545454444434343423535353535353535 + 3535353535353535353535353535353535353535353535353535} + NumGlyphs = 2 + OnClick = RRunClick + end + object PauseButton: TSpeedButton + Left = 159 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Pause' + Enabled = False + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360000002800000020000000100000000100 + 1800000000000006000000000000000000000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + 2942D1253DCD2238C81F33C41C2EC01929BC1624B8131FB4111BB10E17AD0C14 + AA0A10A8FF00FFFF00FFFF00FFFF00FFABABABA8A8A8A6A6A6A3A3A3A1A1A19F + 9F9F9D9D9D9A9A9A999999969696959595949494FF00FFFF00FFFF00FF2F4DDA + 7DC3F84BABF543A5F43EA2F33A9EF2359BF13198F02D95EF2992EE268FED228D + ED208AEC0A11A8FF00FFFF00FFAFAFAFD2D2D2C2C2C2BEBEBEBCBCBCBBBBBBB9 + B9B9B7B7B7B6B6B6B4B4B4B3B3B3B1B1B1B1B1B1949494FF00FFFF00FF3353DF + 8CCBFA52AFF647A9F543A5F43EA2F33A9EF2359BF13198F02D95EF2992EE268F + ED228DED0D14ABFF00FFFF00FFB3B3B3D8D8D8C4C4C4C0C0C0BEBEBEBCBCBCBB + BBBBB9B9B9B7B7B7B6B6B6B4B4B4B3B3B3B1B1B1969696FF00FFFF00FF3658E4 + 9CD3FB5AB4F74CACF647A9F543A5F43EA2F33A9EF2359BF13198F02D95EF2992 + EE268FED0F18AEFF00FFFF00FFB5B5B5DDDDDDC7C7C7C2C2C2C0C0C0BEBEBEBC + BCBCBBBBBBB9B9B9B7B7B7B6B6B6B4B4B4B3B3B3979797FF00FFFF00FF395DE8 + A4D7FC62B9F950B0F7FFFFFFFFFFFF43A5F43EA2F3FFFFFFFFFFFF3198F02D95 + EF2992EE121DB2FF00FFFF00FFB7B7B7E1E1E1CACACAC3C3C3FFFFFFFFFFFFBE + BEBEBCBCBCFFFFFFFFFFFFB7B7B7B6B6B6B4B4B4999999FF00FFFF00FF3C62EC + ADDCFC6CBEFA55B3F8FFFFFFFFFFFF47A9F543A5F4FFFFFFFFFFFF359BF13198 + F02D95EF1521B6FF00FFFF00FFBABABAE3E3E3CECECEC5C5C5FFFFFFFFFFFFC0 + C0C0BEBEBEFFFFFFFFFFFFB9B9B9B7B7B7B6B6B69B9B9BFF00FFFF00FF3F67F0 + B8E1FD79C6FB59B6F9FFFFFFFFFFFF4CACF647A9F5FFFFFFFFFFFF3A9EF2359B + F13198F01826BAFF00FFFF00FFBCBCBCE7E7E7D2D2D2C7C7C7FFFFFFFFFFFFC2 + C2C2C0C0C0FFFFFFFFFFFFBBBBBBB9B9B9B7B7B79E9E9EFF00FFFF00FF426BF4 + C1E6FE8BCEFC5DBAFAFFFFFFFFFFFF50B0F74CACF6FFFFFFFFFFFF3EA2F33A9E + F2359BF11B2BBEFF00FFFF00FFBEBEBEEAEAEAD8D8D8C9C9C9FFFFFFFFFFFFC3 + C3C3C2C2C2FFFFFFFFFFFFBCBCBCBBBBBBB9B9B9A0A0A0FF00FFFF00FF4470F7 + C6E8FE8DD1FD62BDFBFFFFFFFFFFFF55B3F850B0F7FFFFFFFFFFFF43A5F43EA2 + F33A9EF21E31C3FF00FFFF00FFC0C0C0ECECECD9D9D9CBCBCBFFFFFFFFFFFFC5 + C5C5C3C3C3FFFFFFFFFFFFBEBEBEBCBCBCBBBBBBA2A2A2FF00FFFF00FF4673FA + C6E8FE84CDFD65C0FCFFFFFFFFFFFF59B6F955B3F8FFFFFFFFFFFF47A9F543A5 + F43EA2F32136C7FF00FFFF00FFC2C2C2ECECECD6D6D6CCCCCCFFFFFFFFFFFFC7 + C7C7C5C5C5FFFFFFFFFFFFC0C0C0BEBEBEBCBCBCA5A5A5FF00FFFF00FF4876FD + C9EAFF98D6FE69C2FD65C0FC62BDFB5DBAFA59B6F955B3F850B0F74CACF647A9 + F543A5F4253CCCFF00FFFF00FFC3C3C3EEEEEEDDDDDDCECECECCCCCCCBCBCBC9 + C9C9C7C7C7C5C5C5C3C3C3C2C2C2C0C0C0BEBEBEA8A8A8FF00FFFF00FF4A79FF + CCECFFBFE6FFA2DAFEA1D9FEAADCFDA2D8FD95D2FC8FCEFB85C8FA75C1F967B8 + F759B1F62842D1FF00FFFF00FFC4C4C4EEEEEEEAEAEAE1E1E1E0E0E0E3E3E3E0 + E0E0DBDBDBD9D9D9D6D6D6D0D0D0CBCBCBC6C6C6AAAAAAFF00FFFF00FF4A79FF + CEEDFFCCECFFCBEBFFCAEAFECAE9FEC7E8FEC5E7FEC3E5FDBDE2FDB2DCFCA2D5 + FB95CEFA2C48D6FF00FFFF00FFC4C4C4EFEFEFEEEEEEEEEEEEEEEEEEEEEEEEEC + ECECECECECEBEBEBE9E9E9E5E5E5DFDFDFDBDBDBADADADFF00FFFF00FFFF00FF + 4A79FF4A79FF4977FD4774FB4571F8436DF5416AF23E65EF3B61EB385CE73557 + E33252DFFF00FFFF00FFFF00FFFF00FFC4C4C4C4C4C4C3C3C3C2C2C2C0C0C0BF + BFBFBDBDBDBBBBBBB9B9B9B7B7B7B5B5B5B2B2B2FF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF + 00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF} + NumGlyphs = 2 + OnClick = RPauseClick + end + object Bevel4: TBevel + Left = 238 + Top = 4 + Width = 2 + Height = 22 + Shape = bsLeftLine + end + object HelpButton: TSpeedButton + Left = 243 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Help' + Flat = True + Glyph.Data = { + 36060000424D3606000000000000360000002800000020000000100000000100 + 1800000000000006000000000000000000000000000000000000FF00FFFF00FF + FF00FFFF00FFFF00FFE6CEC3E3CDC3DFCBC2DBC7BEDCC4B9E5C9BBFF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD4D4D4D3D3D3D0 + D0D0CCCCCCCACACAD0D0D0FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFE8CDC1ECE0DBEAEBECE4E7ECD9D4D4D1CCCDCBCBCEC7C0BFC8B7B1E5C9 + BBFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD4D4D4E3E3E3EBEBEBE8E8E8D6 + D6D6CECECECCCCCCC3C3C3BCBCBCD0D0D0FF00FFFF00FFFF00FFFF00FFFF00FF + EACFC3F4F1EEF4FAFDE6CDC2D79674D58C65D48B64D08F6ECEB0A4C2C0C2C4B7 + B4DCC3B7FF00FFFF00FFFF00FFFF00FFD6D6D6F1F1F1F8F8F8D4D4D4A5A5A59D + 9D9D9C9C9C9F9F9FB9B9B9C1C1C1BCBCBCC9C9C9FF00FFFF00FFFF00FFE8CCBF + F8F4F3FBFFFFDDA283CB6128CD652EF6E1D5F2D4C5CC6128CD642CCF9679C7C4 + C7C8BCB9E5C9BBFF00FFFF00FFD3D3D3F5F5F5FDFDFDB0B0B07979797D7D7DE5 + E5E5DBDBDB7A7A7A7C7C7CA4A4A4C5C5C5C0C0C0D0D0D0FF00FFFF00FFF4E8E2 + FFFFFFE3AF93C95B22CC662FCD6935E9BCA4E6B399CC6731CC6730CD6027D29B + 7FCDCCCFD8C5BEFF00FFFF00FFEBEBEBFFFFFFBBBBBB7575757D7D7D818181C6 + C6C6BEBEBE7E7E7E7E7E7E7A7A7AA8A8A8CDCDCDCBCBCBFF00FFEACFC3FDFDFD + F7E6DCD0703BCD6732CC6530D07240E6B398E0A281CC652ECD6933CD6731CD6A + 34D6C2B9D5D1D1E5C9BBD6D6D6FDFDFDE9E9E98484847E7E7E7E7E7E888888BE + BEBEB0B0B07D7D7D8080807E7E7E808080C7C7C7D3D3D3D0D0D0EFD9D0FFFFFF + E9BA9ED17239D27541CD6A33D37848FEFAF7FAF0EBCF6F3CCA6129CD6935CC60 + 28D7A085DFE1E5E4CBC0DEDEDEFFFFFFC3C3C38484848888888080808D8D8DFA + FAFAF2F2F28484847979798181817A7A7AAEAEAEE2E2E2D2D2D2F2E0D8FFFFFF + E4AC87D68046D6804AD47943CF6F39EDC7B3FFFFFFF0D5C7D07443CB642DCB62 + 2AD68E68E8ECF1E5D0C6E5E5E5FFFFFFB5B5B58E8E8E9090908A8A8A848484D0 + D0D0FFFFFFDBDBDB8888887C7C7C7A7A7A9F9F9FECECECD5D5D5F2E0D8FFFFFF + E8B68EDB8D53DA8B55D7834CD57D47D37741ECC6B0FFFFFFF7E7DFD17544C95C + 23D8916BF1F6FAE8D2C9E5E5E5FFFFFFBBBBBB9797979898989090908E8E8E8A + 8A8ACECECEFFFFFFEBEBEB8A8A8A767676A1A1A1F5F5F5D8D8D8EED8CEFFFFFF + F0CEB0DF965CE09B67E19E6FDA8B55D6804AD2753DECC5AEFFFFFFE4AF92C755 + 19E0AB8FF6FBFFE9D1C6DEDEDEFFFFFFD0D0D09D9D9DA3A3A3A8A8A897979790 + 9090878787CDCDCDFFFFFFBBBBBB707070B7B7B7FAFAFAD7D7D7EED8CEFDFBFB + FBF2E7E4A46AF5DCC7FFFFFEE8B690D98549D4793CE5AE8BFFFFFFE9BBA1CE68 + 30F2E2D9F6F4F3E9D1C6DEDEDEFCFCFCF1F1F1A7A7A7DEDEDEFEFEFEBCBCBC90 + 9090888888B8B8B8FFFFFFC5C5C57E7E7EE5E5E5F4F4F4D7D7D7FF00FFF4E7E0 + FFFFFFF2D2B3EEC39AFFFFFFFDF9F6EFCAB0EEC9ADFDF8F5FEFBF9DD9465E6B4 + 97FFFFFFEFDED6FF00FFFF00FFEAEAEAFFFFFFD2D2D2C4C4C4FFFFFFF9F9F9CF + CFCFCDCDCDF9F9F9FAFAFAA1A1A1BEBEBEFFFFFFE2E2E2FF00FFFF00FFECD4C9 + FAF2EFFFFFFFF1D0ADF0CEA8FAEEE2FDF8F5FDF8F3F8E7DAE8B28BEABD9CFFFF + FFF6EDE9EFDED6FF00FFFF00FFDADADAF4F4F4FFFFFFCFCFCFCCCCCCEEEEEEF9 + F9F9F8F8F8E9E9E9B9B9B9C3C3C3FFFFFFEEEEEEE2E2E2FF00FFFF00FFFF00FF + ECD4C9F9F1EEFFFFFFF9EADAF3D4B4F1D0AEEFCAA9EFC8A8F7E2D2FFFFFFF7EE + EAE9CFC2FF00FFFF00FFFF00FFFF00FFDADADAF2F2F2FFFFFFE9E9E9D3D3D3CF + CFCFCCCCCCCBCBCBE4E4E4FFFFFFF0F0F0D5D5D5FF00FFFF00FFFF00FFFF00FF + FF00FFECD4C9F6ECE7FAF6F5FEFDFCFFFEFDFEFDFCFDFCFCFAF6F5F4E7E0F4E7 + E0FF00FFFF00FFFF00FFFF00FFFF00FFFF00FFDADADAEEEEEEF7F7F7FDFDFDFE + FEFEFDFDFDFCFCFCF8F8F8EAEAEAEAEAEAFF00FFFF00FFFF00FFFF00FFFF00FF + FF00FFFF00FFFF00FFEBD3C8EBD3C8EED8CEEED7CDECD4C9ECD4C9FF00FFFF00 + FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFD8D8D8D8D8D8DE + DEDEDDDDDDDADADADADADAFF00FFFF00FFFF00FFFF00FFFF00FF} + NumGlyphs = 2 + OnClick = HDocClick + end + object TargetSetupButton: TSpeedButton + Left = 189 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Target Setup' + GroupIndex = 1 + Flat = True + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 1800000000000003000000000000000000000000000000000000808000000000 + 0000000000008080008080000000000000000000000000000000008080008080 + 00808000808000808000808000868686C0C0C0000000000000868686FFFFFFFF + FFFFC0C0C000FFFF00FF00000000808000808000808000808000808000868686 + C0C0C0000000868686C0C0C0C0C0C0FFFFFFC0C0C000FF00C0C0C0C0C0C00000 + 00808000808000808000808000868686C0C0C0000000868686C0C0C0C0C0C0C0 + C0C000000000FF00FFFF00FFFF00000000808000808000808000808000868686 + C0C0C0000000868686C0C0C0C0C0C0FFFF00000000000000C0C0C0C0C0C00000 + 00808000808000808000808000868686FFFFFF000000868686FFFF00C0C0C0FF + FF0000FFFFFFFFFFC0C0C0C0C0C0000000000000000000808000808000868686 + FFFFFF000000C0C0C0868686FFFF00FFFF0000FFFFFFFFFFFFFFFF000000C0C0 + C0C0C0C0C0C0C0000000808000868686FFFFFF000000C0C0C0C0C0C000000000 + 0000000000000000000000868686868686868686C0C0C0000000808000868686 + 868686000000C0C0C0C0C0C08686868686868686868686868686868686868686 + 86868686C0C0C0000000868686FFFFFFFFFFFF868686C0C0C0C0C0C0868686C0 + C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0C0868686000000808000868686 + 868686868686868686C0C0C0868686CC6666FFCC66CC9933CC9900FF6633CC66 + 33FFFFFF868686000000808000808000808000868686FFFFFFFFFFFF868686CC + 6666FFFF66FFCC66CC9933CC9900FF6633FFFFFF868686000000808000808000 + 808000808000868686868686868686CC6666FFFF66FFFF66FFCC66CC9933CC99 + 00FFFFFF868686000000808000808000808000808000808000808000868686CC + 6666FFCC66FFFF66FFFF66FFCC66CC9933FFFFFF868686000000808000808000 + 808000808000808000808000868686CC6666CC6633CC6633CC6633CC6633CC66 + 33FFFFFF868686000000808000808000808000808000808000808000868686D7 + D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7868686000000} + Margin = 1 + OnClick = RTargetClick + end + object TargetUninstallButton: TSpeedButton + Left = 212 + Top = 4 + Width = 23 + Height = 22 + Hint = 'Target Uninstall' + GroupIndex = 1 + Flat = True + Glyph.Data = { + 36030000424D3603000000000000360000002800000010000000100000000100 + 1800000000000003000000000000000000000000000000000000808000808000 + 8080008080008080008080008080008080008080008080008080008080008080 + 008080008080008080008080008080008080006B6B6B6B6B6B6B6B6B6666666B + 6B6B6B6B6B808000808000808000808000808000808000808000808000808000 + 6B6B6BD3D3B9D0C3A5D0C3A5D0C3A5A8A89770706F6B6B6B8080008080008080 + 008080008080008080008080006B6B6BFFF6D2FFE7BEF5D5B2DDB9B0E4BBBBEB + C5ADFFE8BFE2DEC36B6B6B646462808000808000808000808000808000EBC5AD + F9EFC4FBDFBBE2C4C4E7D0D0009900BFE4B5BFE4B5BFE4B5FFFCDAB8B8A46B6B + 6B808000808000808000808000E5C293F8C899EEDDDDE7D0D0E7D0D000990000 + 99000099000099009FD79EFFECC46B6B6B808000808000808000808000F9C48A + FDF5EBF6ECECEBD8D8DFB3B300990000990050B950CFE3CA40B340FAD19C7D7D + 7B808000808000808000ECD9CFFBDFBBFFFFFEFFFFFFD6ACABE4BBBB8FD28FBF + E4B540B340AFDDABAFDDABD1C09E9191856B6B6B808000808000EFDEB3FEF8DD + FFFFF5EBD8D8D0A2A2E4BBBB40B340FFFFF570C670009900009900FFE0B39191 + 856B6B6B808000808000FBDFBBFFFFE9FFFFEDECD9CFE7D0D0E5CAC5B8B8A410 + 9F1029A929009900009900FFEAC1D0C3A56B6B6B808000808000FBDFBBFFFFDE + FFFFE2FFFFE6FFFFEAE7F8FEF2E6E6AFDDAB9FD79E70C670009900FEF4DAD1CC + B06B6B6B808000808000FBDFBBFFFFDEFFFFDEFFFFE2E2FFF7E2FFF7DFFEFAFD + F9F9FDF9F9FFFFFDFFFFF3FFFFEFFFFFDE6B6B6B808000808000808000FBDFBB + FBDFBBDCEFD3DCEFD3DCEFD3DCEFD3DCEFD3DCEFD3E3F2F2FAE4B6FFFAD8FFFF + DE6B6B6B808000808000808000808000808000A3DDFAE6FFFFDBFFFFDBFFFFDB + FFFFE6FFFFA7DEF7F9C389FFCC99FFF4CF6B6B6B808000808000808000808000 + 808000808000A7DEF7A7DEF7A7DEF7C0FFFFC0FFFFA7DEF7FCC790FECA96FFD0 + 9E6B6B6B808000808000808000808000808000808000808000808000808000A7 + DEF7A7DEF7A7DEF7FECA96FDC892FDC892808000808000808000} + OnClick = RTargetClick + end + object Bevel5: TBevel + Left = 184 + Top = 4 + Width = 2 + Height = 22 + Shape = bsLeftLine + end + end + object BodyPanel: TPanel + Left = 0 + Top = 28 + Width = 361 + Height = 217 + Align = alClient + BevelOuter = bvNone + FullRepaint = False + TabOrder = 0 + object SplitPanel: TPanel + Left = 0 + Top = 109 + Width = 361 + Height = 4 + Cursor = crSizeNS + Align = alBottom + BevelOuter = bvNone + FullRepaint = False + TabOrder = 1 + Visible = False + OnMouseMove = SplitPanelMouseMove + end + object StatusPanel: TPanel + Left = 0 + Top = 113 + Width = 361 + Height = 104 + Align = alBottom + BevelOuter = bvNone + FullRepaint = False + TabOrder = 0 + Visible = False + object SpacerPaintBox: TPaintBox + Left = 0 + Top = 82 + Width = 361 + Height = 2 + Align = alBottom + end + object DebugOutputList: TListBox + Left = 0 + Top = 0 + Width = 361 + Height = 82 + Align = alClient + ItemHeight = 13 + PopupMenu = ListPopupMenu + Style = lbOwnerDrawFixed + TabOrder = 1 + Visible = False + OnDrawItem = DebugOutputListDrawItem + end + object CompilerOutputList: TListBox + Left = 0 + Top = 0 + Width = 361 + Height = 82 + Align = alClient + ItemHeight = 13 + PopupMenu = ListPopupMenu + TabOrder = 0 + end + object TabSet: TNewTabSet + Left = 0 + Top = 84 + Width = 361 + Height = 20 + Align = alBottom + TabIndex = 0 + Tabs.Strings = ( + 'Compiler Output' + 'Debug Output') + OnClick = TabSetClick + end + end + end + object StatusBar: TStatusBar + Left = 0 + Top = 245 + Width = 361 + Height = 20 + Panels = < + item + Alignment = taCenter + Text = ' 1: 1' + Width = 64 + end + item + Alignment = taCenter + Width = 64 + end + item + Alignment = taCenter + Text = 'Insert' + Width = 64 + end + item + Style = psOwnerDraw + Width = 23 + end + item + Style = psOwnerDraw + Width = 128 + end + item + Width = 50 + end> + SimplePanel = False + OnDrawPanel = StatusBarDrawPanel + OnResize = StatusBarResize + end + object MainMenu1: TMainMenu + Left = 8 + Top = 48 + object FMenu: TMenuItem + Caption = '&File' + OnClick = FMenuClick + object FNew: TMenuItem + Caption = '&New' + ShortCut = 16462 + OnClick = FNewClick + end + object FOpen: TMenuItem + Caption = '&Open...' + ShortCut = 16463 + OnClick = FOpenClick + end + object N19: TMenuItem + Caption = '-' + end + object FSave: TMenuItem + Caption = '&Save' + ShortCut = 16467 + OnClick = FSaveClick + end + object FSaveAs: TMenuItem + Caption = 'Save &As...' + OnClick = FSaveAsClick + end + object FSaveEncoding: TMenuItem + Caption = 'Save &Encoding' + object FSaveEncodingAuto: TMenuItem + Caption = '&Auto (ANSI or UTF-8)' + RadioItem = True + OnClick = FSaveEncodingItemClick + end + object FSaveEncodingUTF8: TMenuItem + Caption = '&UTF-8' + RadioItem = True + OnClick = FSaveEncodingItemClick + end + end + object N1: TMenuItem + Caption = '-' + end + object FMRUSep: TMenuItem + Caption = '-' + Visible = False + end + object FExit: TMenuItem + Caption = 'E&xit' + OnClick = FExitClick + end + end + object EMenu: TMenuItem + Caption = '&Edit' + OnClick = EMenuClick + object EUndo: TMenuItem + Caption = '&Undo' + OnClick = EUndoClick + end + object ERedo: TMenuItem + Caption = '&Redo' + OnClick = ERedoClick + end + object N3: TMenuItem + Caption = '-' + end + object ECut: TMenuItem + Caption = 'Cu&t' + OnClick = ECutClick + end + object ECopy: TMenuItem + Caption = '&Copy' + OnClick = ECopyClick + end + object EPaste: TMenuItem + Caption = '&Paste' + OnClick = EPasteClick + end + object EDelete: TMenuItem + Caption = 'De&lete' + OnClick = EDeleteClick + end + object ESelectAll: TMenuItem + Caption = 'Select &All' + OnClick = ESelectAllClick + end + object N4: TMenuItem + Caption = '-' + end + object EFind: TMenuItem + Caption = '&Find...' + ShortCut = 16454 + OnClick = EFindClick + end + object EFindNext: TMenuItem + Caption = 'Find &Next' + ShortCut = 114 + OnClick = EFindNextClick + end + object EReplace: TMenuItem + Caption = 'R&eplace...' + ShortCut = 16456 + OnClick = EReplaceClick + end + object N13: TMenuItem + Caption = '-' + end + object EGoto: TMenuItem + Caption = '&Go to Line...' + ShortCut = 16455 + OnClick = EGotoClick + end + object N18: TMenuItem + Caption = '-' + end + object ECompleteWord: TMenuItem + Caption = 'Complete &Word' + OnClick = ECompleteWordClick + end + end + object VMenu: TMenuItem + Caption = '&View' + OnClick = VMenuClick + object VZoom: TMenuItem + Caption = '&Zoom' + object VZoomIn: TMenuItem + Caption = 'Zoom &In' + OnClick = VZoomInClick + end + object VZoomOut: TMenuItem + Caption = 'Zoom &Out' + OnClick = VZoomOutClick + end + object N9: TMenuItem + Caption = '-' + end + object VZoomReset: TMenuItem + Caption = '&Reset' + OnClick = VZoomResetClick + end + end + object N8: TMenuItem + Caption = '-' + end + object VToolbar: TMenuItem + Caption = '&Toolbar' + OnClick = VToolbarClick + end + object VStatusBar: TMenuItem + Caption = 'St&atus Bar' + OnClick = VStatusBarClick + end + object N11: TMenuItem + Caption = '-' + end + object VCompilerOutput: TMenuItem + Caption = '&Compiler Output' + RadioItem = True + OnClick = VCompilerOutputClick + end + object VDebugOutput: TMenuItem + Caption = '&Debug Output' + RadioItem = True + OnClick = VDebugOutputClick + end + object VHide: TMenuItem + Caption = '&Hide Bottom Pane' + RadioItem = True + OnClick = VHideClick + end + end + object BMenu: TMenuItem + Caption = '&Build' + OnClick = BMenuClick + object BCompile: TMenuItem + Caption = '&Compile' + ShortCut = 16504 + OnClick = BCompileClick + end + object BStopCompile: TMenuItem + Caption = 'S&top Compile' + Enabled = False + OnClick = BStopCompileClick + end + object N2: TMenuItem + Caption = '-' + end + object BLowPriority: TMenuItem + Caption = '&Low Priority During Compile' + OnClick = BLowPriorityClick + end + object N17: TMenuItem + Caption = '-' + end + object BOpenOutputFolder: TMenuItem + Caption = '&Open Output Folder' + Enabled = False + OnClick = BOpenOutputFolderClick + end + end + object RMenu: TMenuItem + Caption = '&Run' + object RRun: TMenuItem + Caption = '&Run' + ShortCut = 120 + OnClick = RRunClick + end + object RParameters: TMenuItem + Caption = '&Parameters...' + OnClick = RParametersClick + end + object N5: TMenuItem + Caption = '-' + end + object RRunToCursor: TMenuItem + Caption = 'Run to &Cursor' + ShortCut = 115 + OnClick = RRunToCursorClick + end + object RStepInto: TMenuItem + Caption = 'Step &Into' + ShortCut = 118 + OnClick = RStepIntoClick + end + object RStepOver: TMenuItem + Caption = 'Step &Over' + ShortCut = 119 + OnClick = RStepOverClick + end + object RToggleBreakPoint: TMenuItem + Caption = 'Toggle &Breakpoint' + ShortCut = 116 + OnClick = RToggleBreakPointClick + end + object RPause: TMenuItem + Caption = 'P&ause' + Enabled = False + OnClick = RPauseClick + end + object RTerminate: TMenuItem + Caption = '&Terminate' + Enabled = False + ShortCut = 16497 + OnClick = RTerminateClick + end + object N10: TMenuItem + Caption = '-' + end + object REvaluate: TMenuItem + Caption = '&Evaluate Constant...' + Enabled = False + ShortCut = 16499 + OnClick = REvaluateClick + end + object N15: TMenuItem + Caption = '-' + end + object RTargetSetup: TMenuItem + Caption = 'Target &Setup' + GroupIndex = 1 + RadioItem = True + ShortCut = 16465 + OnClick = RTargetClick + end + object RTargetUninstall: TMenuItem + Caption = 'Target &Uninstall' + GroupIndex = 1 + RadioItem = True + ShortCut = 16471 + OnClick = RTargetClick + end + end + object TMenu: TMenuItem + Caption = '&Tools' + object TAddRemovePrograms: TMenuItem + Caption = '&Add/Remove Programs' + OnClick = TAddRemoveProgramsClick + end + object TGenerateGUID: TMenuItem + Caption = 'Generate &GUID' + ShortCut = 24647 + OnClick = TGenerateGUIDClick + end + object N7: TMenuItem + Caption = '-' + end + object TSignTools: TMenuItem + Caption = '&Configure Sign Tools...' + OnClick = TSignToolsClick + end + object N16: TMenuItem + Caption = '-' + end + object TOptions: TMenuItem + Caption = '&Options...' + OnClick = TOptionsClick + end + end + object HMenu: TMenuItem + Caption = '&Help' + OnClick = HMenuClick + object HDoc: TMenuItem + Caption = 'Inno Setup &Documentation' + OnClick = HDocClick + end + object HExamples: TMenuItem + Caption = 'Inno Setup &Example Scripts' + OnClick = HExamplesClick + end + object HFaq: TMenuItem + Caption = 'Inno Setup &FAQ' + OnClick = HFaqClick + end + object HWhatsNew: TMenuItem + Caption = 'Inno Setup &Revision History' + OnClick = HWhatsNewClick + end + object HWebsite: TMenuItem + Caption = 'Inno Setup &Web Site' + OnClick = HWebsiteClick + end + object N12: TMenuItem + Caption = '-' + end + object HISPPDoc: TMenuItem + Caption = 'Inno Setup &Preprocessor Documentation' + OnClick = HISPPDocClick + end + object HISPPSep: TMenuItem + Caption = '-' + end + object HPSWebsite: TMenuItem + Caption = 'RemObjects Pascal Script Web Site' + OnClick = HPSWebsiteClick + end + object N6: TMenuItem + Caption = '-' + end + object HDonate: TMenuItem + Caption = '&Support Inno Setup' + OnClick = HDonateClick + end + object N14: TMenuItem + Caption = '-' + end + object HAbout: TMenuItem + Caption = '&About Inno Setup' + OnClick = HAboutClick + end + end + end + object FindDialog: TFindDialog + OnFind = FindDialogFind + Left = 136 + Top = 48 + end + object ReplaceDialog: TReplaceDialog + OnFind = FindDialogFind + OnReplace = ReplaceDialogReplace + Left = 168 + Top = 48 + end + object CheckIfRunningTimer: TTimer + Enabled = False + Interval = 100 + OnTimer = CheckIfRunningTimerTimer + Left = 200 + Top = 48 + end + object ListPopupMenu: TPopupMenu + Left = 8 + Top = 168 + object PListCopy: TMenuItem + Caption = '&Copy' + OnClick = PListCopyClick + end + end +end diff --git a/Projects/CompForm.pas b/Projects/CompForm.pas new file mode 100644 index 000000000..5308c5805 --- /dev/null +++ b/Projects/CompForm.pas @@ -0,0 +1,4246 @@ +unit CompForm; + +{ + Inno Setup + Copyright (C) 1997-2011 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Compiler form + + $jrsoftware: issrc/Projects/CompForm.pas,v 1.251 2011/03/16 08:51:46 mlaan Exp $ +} + +{$DEFINE STATICCOMPILER} +{ For debugging purposes, remove the 'x' to have it link the compiler code + into this program and not depend on ISCmplr.dll. } + +{$I VERSION.INC} + +{$IFDEF IS_D6} +{$WARN SYMBOL_PLATFORM OFF} +{$ENDIF} + +interface + +uses + Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, + UIStateForm, StdCtrls, ExtCtrls, Menus, Buttons, ComCtrls, CommCtrl, + ScintInt, ScintEdit, ScintStylerInnoSetup, NewTabSet, + DebugStruct, CompInt, UxThemeISX; + +const + WM_StartCommandLineCompile = WM_USER + $1000; + WM_StartCommandLineWizard = WM_USER + $1001; + WM_StartNormally = WM_USER + $1002; + + MRUListMaxCount = 10; + +type + TLineState = (lnUnknown, lnHasEntry, lnEntryProcessed); + PLineStateArray = ^TLineStateArray; + TLineStateArray = array[0..0] of TLineState; + PDebugEntryArray = ^TDebugEntryArray; + TDebugEntryArray = array[0..0] of TDebugEntry; + PVariableDebugEntryArray = ^TVariableDebugEntryArray; + TVariableDebugEntryArray = array[0..0] of TVariableDebugEntry; + TStepMode = (smRun, smStepInto, smStepOver, smRunToCursor); + TDebugTarget = (dtSetup, dtUninstall); + +const + DebugTargetStrings: array[TDebugTarget] of String = ('Setup', 'Uninstall'); + +type + TISScintEdit = class; + + TCompileForm = class(TUIStateForm) + MainMenu1: TMainMenu; + FMenu: TMenuItem; + FNew: TMenuItem; + FOpen: TMenuItem; + FSave: TMenuItem; + FSaveAs: TMenuItem; + N1: TMenuItem; + BCompile: TMenuItem; + N2: TMenuItem; + FExit: TMenuItem; + EMenu: TMenuItem; + EUndo: TMenuItem; + N3: TMenuItem; + ECut: TMenuItem; + ECopy: TMenuItem; + EPaste: TMenuItem; + EDelete: TMenuItem; + N4: TMenuItem; + ESelectAll: TMenuItem; + VMenu: TMenuItem; + EFind: TMenuItem; + EFindNext: TMenuItem; + EReplace: TMenuItem; + HMenu: TMenuItem; + HDoc: TMenuItem; + N6: TMenuItem; + HAbout: TMenuItem; + FMRUSep: TMenuItem; + VCompilerOutput: TMenuItem; + FindDialog: TFindDialog; + ReplaceDialog: TReplaceDialog; + StatusPanel: TPanel; + CompilerOutputList: TListBox; + SplitPanel: TPanel; + ToolbarPanel: TPanel; + NewButton: TSpeedButton; + Bevel1: TBevel; + OpenButton: TSpeedButton; + SaveButton: TSpeedButton; + CompileButton: TSpeedButton; + HelpButton: TSpeedButton; + HWebsite: TMenuItem; + VToolbar: TMenuItem; + N7: TMenuItem; + TOptions: TMenuItem; + HFaq: TMenuItem; + Bevel2: TBevel; + Bevel3: TBevel; + StatusBar: TStatusBar; + BodyPanel: TPanel; + VStatusBar: TMenuItem; + ERedo: TMenuItem; + RMenu: TMenuItem; + RStepInto: TMenuItem; + RStepOver: TMenuItem; + N5: TMenuItem; + RRun: TMenuItem; + RRunToCursor: TMenuItem; + N10: TMenuItem; + REvaluate: TMenuItem; + CheckIfRunningTimer: TTimer; + RunButton: TSpeedButton; + Bevel4: TBevel; + PauseButton: TSpeedButton; + RPause: TMenuItem; + RParameters: TMenuItem; + ListPopupMenu: TPopupMenu; + PListCopy: TMenuItem; + HISPPSep: TMenuItem; + N12: TMenuItem; + BStopCompile: TMenuItem; + StopCompileButton: TSpeedButton; + HISPPDoc: TMenuItem; + N13: TMenuItem; + EGoto: TMenuItem; + RTerminate: TMenuItem; + BMenu: TMenuItem; + BLowPriority: TMenuItem; + HDonate: TMenuItem; + N14: TMenuItem; + HPSWebsite: TMenuItem; + N15: TMenuItem; + RTargetSetup: TMenuItem; + RTargetUninstall: TMenuItem; + TargetSetupButton: TSpeedButton; + TargetUninstallButton: TSpeedButton; + Bevel5: TBevel; + TabSet: TNewTabSet; + DebugOutputList: TListBox; + VDebugOutput: TMenuItem; + VHide: TMenuItem; + N11: TMenuItem; + SpacerPaintBox: TPaintBox; + TMenu: TMenuItem; + TAddRemovePrograms: TMenuItem; + RToggleBreakPoint: TMenuItem; + HWhatsNew: TMenuItem; + TGenerateGUID: TMenuItem; + TSignTools: TMenuItem; + N16: TMenuItem; + HExamples: TMenuItem; + N17: TMenuItem; + BOpenOutputFolder: TMenuItem; + N8: TMenuItem; + VZoom: TMenuItem; + VZoomIn: TMenuItem; + VZoomOut: TMenuItem; + N9: TMenuItem; + VZoomReset: TMenuItem; + N18: TMenuItem; + ECompleteWord: TMenuItem; + N19: TMenuItem; + FSaveEncoding: TMenuItem; + FSaveEncodingAuto: TMenuItem; + FSaveEncodingUTF8: TMenuItem; + procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); + procedure FExitClick(Sender: TObject); + procedure FOpenClick(Sender: TObject); + procedure EUndoClick(Sender: TObject); + procedure EMenuClick(Sender: TObject); + procedure ECutClick(Sender: TObject); + procedure ECopyClick(Sender: TObject); + procedure EPasteClick(Sender: TObject); + procedure EDeleteClick(Sender: TObject); + procedure FSaveClick(Sender: TObject); + procedure ESelectAllClick(Sender: TObject); + procedure FNewClick(Sender: TObject); + procedure FNewWizardClick(Sender: TObject); + procedure FSaveAsClick(Sender: TObject); + procedure HDocClick(Sender: TObject); + procedure BCompileClick(Sender: TObject); + procedure FMenuClick(Sender: TObject); + procedure FMRUClick(Sender: TObject); + procedure VCompilerOutputClick(Sender: TObject); + procedure HAboutClick(Sender: TObject); + procedure EFindClick(Sender: TObject); + procedure FindDialogFind(Sender: TObject); + procedure EReplaceClick(Sender: TObject); + procedure ReplaceDialogReplace(Sender: TObject); + procedure EFindNextClick(Sender: TObject); + procedure SplitPanelMouseMove(Sender: TObject; Shift: TShiftState; X, + Y: Integer); + procedure VMenuClick(Sender: TObject); + procedure HWebsiteClick(Sender: TObject); + procedure VToolbarClick(Sender: TObject); + procedure TOptionsClick(Sender: TObject); + procedure HFaqClick(Sender: TObject); + procedure HPSWebsiteClick(Sender: TObject); + procedure HISPPDocClick(Sender: TObject); + procedure VStatusBarClick(Sender: TObject); + procedure ERedoClick(Sender: TObject); + procedure StatusBarResize(Sender: TObject); + procedure RStepIntoClick(Sender: TObject); + procedure RStepOverClick(Sender: TObject); + procedure RRunToCursorClick(Sender: TObject); + procedure RRunClick(Sender: TObject); + procedure REvaluateClick(Sender: TObject); + procedure CheckIfRunningTimerTimer(Sender: TObject); + procedure RPauseClick(Sender: TObject); + procedure RParametersClick(Sender: TObject); + procedure PListCopyClick(Sender: TObject); + procedure BStopCompileClick(Sender: TObject); + procedure HMenuClick(Sender: TObject); + procedure EGotoClick(Sender: TObject); + procedure RTerminateClick(Sender: TObject); + procedure BMenuClick(Sender: TObject); + procedure BLowPriorityClick(Sender: TObject); + procedure StatusBarDrawPanel(StatusBar: TStatusBar; + Panel: TStatusPanel; const Rect: TRect); + procedure HDonateClick(Sender: TObject); + procedure RTargetClick(Sender: TObject); + procedure DebugOutputListDrawItem(Control: TWinControl; Index: Integer; + Rect: TRect; State: TOwnerDrawState); + procedure TabSetClick(Sender: TObject); + procedure VHideClick(Sender: TObject); + procedure VDebugOutputClick(Sender: TObject); + procedure FormResize(Sender: TObject); + procedure TAddRemoveProgramsClick(Sender: TObject); + procedure RToggleBreakPointClick(Sender: TObject); + procedure HWhatsNewClick(Sender: TObject); + procedure TGenerateGUIDClick(Sender: TObject); + procedure TSignToolsClick(Sender: TObject); + procedure HExamplesClick(Sender: TObject); + procedure BOpenOutputFolderClick(Sender: TObject); + procedure FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); + procedure VZoomInClick(Sender: TObject); + procedure VZoomOutClick(Sender: TObject); + procedure VZoomResetClick(Sender: TObject); + procedure ECompleteWordClick(Sender: TObject); + procedure FSaveEncodingItemClick(Sender: TObject); + private + { Private declarations } + FCompilerVersion: PCompilerVersionInfo; + FFilename: String; + FFileLastWriteTime: TFileTime; + FSaveInUTF8Encoding: Boolean; + FMRUMenuItems: array[0..MRUListMaxCount-1] of TMenuItem; + FMRUList: TStringList; + FOptions: record + ShowStartupForm: Boolean; + UseWizard: Boolean; + Autosave: Boolean; + MakeBackups: Boolean; + FullPathInTitleBar: Boolean; + UndoAfterSave: Boolean; + PauseOnDebuggerExceptions: Boolean; + RunAsDifferentUser: Boolean; + AutoComplete: Boolean; + UseSyntaxHighlighting: Boolean; + UnderlineErrors: Boolean; + CursorPastEOL: Boolean; + TabWidth: Integer; + UseTabCharacter: Boolean; + WordWrap: Boolean; + AutoIndent: Boolean; + IndentationGuides: Boolean; + LowPriorityDuringCompile: Boolean; + end; + FOptionsLoaded: Boolean; + FSignTools: TStringList; + FCompiling: Boolean; + FCompileWantAbort: Boolean; + FBecameIdle: Boolean; + FErrorLine, FStepLine: Integer; + FErrorCaretPosition: Integer; + FModifiedSinceLastCompile, FModifiedSinceLastCompileAndGo: Boolean; + FDebugEntries: PDebugEntryArray; + FDebugEntriesCount: Integer; + FVariableDebugEntries: PVariableDebugEntryArray; + FVariableDebugEntriesCount: Integer; + FCompiledCodeText: AnsiString; + FCompiledCodeDebugInfo: AnsiString; + FLineState: PLineStateArray; + FLineStateCapacity, FLineStateCount: Integer; + FDebugClientWnd: HWND; + FProcessHandle, FDebugClientProcessHandle: THandle; + FDebugTarget: TDebugTarget; + FCompiledExe, FUninstExe, FTempDir: String; + FDebugging: Boolean; + FStepMode: TStepMode; + FPaused: Boolean; + FRunToCursorPoint: TDebugEntry; + FReplyString: String; + FDebuggerException: String; + FRunParameters: String; + FLastFindOptions: TFindOptions; + FLastFindText: String; + FLastReplaceText: String; + FLastEvaluateConstantText: String; + FSavePriorityClass: DWORD; + FBuildImageList: HIMAGELIST; + FBuildAnimationFrame: Cardinal; + FLastAnimationTick: DWORD; + FProgress, FProgressMax: Cardinal; + FProgressThemeData: HTHEME; + FProgressChunkSize, FProgressSpaceSize: Integer; + FDebugLogListTimeWidth: Integer; + FBreakPoints: TList; + FOnPendingSquiggly: Boolean; + FPendingSquigglyCaretPos: Integer; + class procedure AppOnException(Sender: TObject; E: Exception); + procedure AppOnActivate(Sender: TObject); + procedure AppOnIdle(Sender: TObject; var Done: Boolean); + function AskToDetachDebugger: Boolean; + procedure BringToForeground; + procedure CheckIfTerminated; + procedure CompileFile(AFilename: String; const ReadFromFile: Boolean); + procedure CompileIfNecessary; + function ConfirmCloseFile(const PromptToSave: Boolean): Boolean; + procedure DebuggingStopped(const WaitForTermination: Boolean); + procedure DebugLogMessage(const S: String); + procedure DestroyDebugInfo; + procedure DetachDebugger; + function EvaluateConstant(const S: String; var Output: String): Integer; + function EvaluateVariableEntry(const DebugEntry: PVariableDebugEntry; + var Output: String): Integer; + procedure FindNext; + procedure Go(AStepMode: TStepMode); + procedure HideError; + procedure InitializeFindText(Dlg: TFindDialog); + procedure InitiateAutoComplete(const Key: AnsiChar); + procedure InvalidateStatusPanel(const Index: Integer); + procedure MemoChange(Sender: TObject; const Info: TScintEditChangeInfo); + procedure MemoCharAdded(Sender: TObject; Ch: AnsiChar); + procedure MemoDropFiles(Sender: TObject; X, Y: Integer; AFiles: TStrings); + procedure MemoHintShow(Sender: TObject; var Info: TScintHintInfo); + procedure MemoKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); + procedure MemoKeyPress(Sender: TObject; var Key: Char); + procedure MemoLinesDeleted(FirstLine, Count, FirstAffectedLine: Integer); + procedure MemoLinesInserted(FirstLine, Count: integer); + procedure MemoMarginClick(Sender: TObject; MarginNumber: Integer; + Line: Integer); + procedure MemoModifiedChange(Sender: TObject); + procedure MemoUpdateUI(Sender: TObject); + procedure ModifyMRUList(const AFilename: String; const AddNewItem: Boolean); + procedure MoveCaret(const LineNumber: Integer; const AlwaysResetColumn: Boolean); + procedure NewFile; + procedure NewWizardFile; + procedure OpenFile(AFilename: String; const AddToRecentDocs: Boolean); + procedure OpenMRUFile(const AFilename: String); + procedure ParseDebugInfo(DebugInfo: Pointer); + procedure ReadMRUList; + procedure ResetLineState; + procedure StartProcess; + function SaveFile(const SaveAs: Boolean): Boolean; + class procedure SaveTextToFile(const Filename: String; const S: String; + const ForceUTF8Encoding: Boolean); + procedure SetErrorLine(ALine: Integer); + procedure SetLowPriority(ALowPriority: Boolean); + procedure SetStatusPanelVisible(const AVisible: Boolean); + procedure SetStepLine(ALine: Integer); + procedure ShowOpenDialog(const Examples: Boolean); + procedure StatusMessage(const S: String); + procedure SyncEditorOptions; + procedure ToggleBreakPoint(Line: Integer); + procedure UpdateAllLineMarkers; + procedure UpdateCaption; + procedure UpdateCompileStatusPanels(const AProgress, AProgressMax: Cardinal; + const ASecondsRemaining: Integer; const ABytesCompressedPerSecond: Cardinal); + procedure UpdateEditModePanel; + procedure UpdateLineMarkers(const Line: Integer); + procedure UpdateNewButtons; + procedure UpdateRunMenu; + procedure UpdateTargetMenu; + procedure UpdateThemeData(const Close, Open: Boolean); + procedure UpdateStatusPanelHeight(H: Integer); + procedure WMCopyData(var Message: TWMCopyData); message WM_COPYDATA; + procedure WMDebuggerHello(var Message: TMessage); message WM_Debugger_Hello; + procedure WMDebuggerGoodbye(var Message: TMessage); message WM_Debugger_Goodbye; + procedure WMDebuggerQueryVersion(var Message: TMessage); message WM_Debugger_QueryVersion; + function GetLineNumberFromEntry(Kind, Index: Integer): Integer; + procedure DebuggerStepped(var Message: TMessage; const Intermediate: Boolean); + procedure WMDebuggerStepped(var Message: TMessage); message WM_Debugger_Stepped; + procedure WMDebuggerSteppedIntermediate(var Message: TMessage); message WM_Debugger_SteppedIntermediate; + procedure WMDebuggerException(var Message: TMessage); message WM_Debugger_Exception; + procedure WMDebuggerSetForegroundWindow(var Message: TMessage); message WM_Debugger_SetForegroundWindow; + procedure WMStartCommandLineCompile(var Message: TMessage); message WM_StartCommandLineCompile; + procedure WMStartCommandLineWizard(var Message: TMessage); message WM_StartCommandLineWizard; + procedure WMStartNormally(var Message: TMessage); message WM_StartNormally; + procedure WMThemeChanged(var Message: TMessage); message WM_THEMECHANGED; +{$IFDEF IS_D4} + protected + procedure WndProc(var Message: TMessage); override; +{$ENDIF} + public + { Public declarations } + Memo: TISScintEdit; + MemoStyler: TInnoSetupStyler; + constructor Create(AOwner: TComponent); override; + destructor Destroy; override; +{$IFDEF IS_D5} + function IsShortCut(var Message: TWMKey): Boolean; override; +{$ENDIF} + end; + + TISScintEdit = class(TScintEdit) + protected + procedure CreateWnd; override; + end; + +var + CompileForm: TCompileForm; + + CommandLineFilename, CommandLineWizardName: String; + CommandLineCompile: Boolean; + CommandLineWizard: Boolean; + +function GenerateGuid: String; +procedure InitFormFont(Form: TForm); + +implementation + +uses + ActiveX, Clipbrd, ShellApi, ShlObj, IniFiles, Registry, CommDlg, Consts, + PathFunc, CmnFunc, CmnFunc2, FileClass, CompMsgs, TmSchemaISX, BrowseFunc, + HtmlHelpFunc, TaskbarProgressFunc, + {$IFDEF STATICCOMPILER} Compile, {$ENDIF} + CompOptions, CompStartup, CompWizard, CompSignTools; + +{$R *.DFM} +{$R CompImages.res} + +const + { Status bar panel indexes } + spCaretPos = 0; + spModified = 1; + spInsertMode = 2; + spCompileIcon = 3; + spCompileProgress = 4; + spExtraStatus = 5; + + { Tab set indexes } + tiCompilerOutput = 0; + tiDebugOutput = 1; + + { Memo marker numbers } + mmIconHasEntry = 0; { grey dot } + mmIconEntryProcessed = 1; { green dot } + mmIconBreakpoint = 2; { stop sign } + mmIconBreakpointGood = 3; { stop sign + check } + mmIconBreakpointBad = 4; { stop sign + X } + mmLineError = 10; { red line highlight } + mmLineBreakpoint = 11; { red line highlight } + mmLineBreakpointBad = 12; { ugly olive line highlight } + mmLineStep = 13; { blue line highlight } + + { Memo indicator numbers (also in ScintStylerInnoSetup) } + inSquiggly = 0; + inPendingSquiggly = 1; + + LineStateGrowAmount = 4000; + +procedure InitFormFont(Form: TForm); +var + FontName: String; + Metrics: TNonClientMetrics; +begin +{$IFNDEF UNICODE} + if Win32MajorVersion < 5 then begin + { On pre-2000 Windows, just use MS Sans Serif always, except on Japanese } + if DefFontData.Charset = SHIFTJIS_CHARSET then begin + { MS Sans Serif can't display Japanese characters, so revert to the + default Japanese font (requires D3+) } + Form.Font.Handle := 0; + Exit; + end; + FontName := GetPreferredUIFont; + end + else +{$ENDIF} + begin + Metrics.cbSize := SizeOf(Metrics); { <- won't work on Delphi 2010? } + if SystemParametersInfo(SPI_GETNONCLIENTMETRICS, SizeOf(Metrics), + @Metrics, 0) then + FontName := Metrics.lfMessageFont.lfFaceName; + { Only allow fonts that we know will fit the text correctly } + if CompareText(FontName, 'Microsoft Sans Serif') <> 0 then + FontName := 'Tahoma'; + end; + Form.Font.Name := FontName; + Form.Font.Size := 8; +end; + +function GetDisplayFilename(const Filename: String): String; +var + Buf: array[0..MAX_PATH-1] of Char; +begin + if GetFileTitle(PChar(Filename), Buf, SizeOf(Buf)) = 0 then + Result := Buf + else + Result := Filename; +end; + +function GetLastWriteTimeOfFile(const Filename: String; + var LastWriteTime: TFileTime): Boolean; +var + H: THandle; +begin + H := CreateFile(PChar(Filename), 0, FILE_SHARE_READ or FILE_SHARE_WRITE, + nil, OPEN_EXISTING, 0, 0); + if H <> INVALID_HANDLE_VALUE then begin + Result := GetFileTime(H, nil, nil, @LastWriteTime); + CloseHandle(H); + end + else + Result := False; +end; + +procedure AddFileToRecentDocs(const Filename: String); +{ Notifies the shell that a document has been opened. On Windows 7, this will + add the file to the Recent section of the app's Jump List. + It is only necessary to call this function when the shell is unaware that + a file is being opened. Files opened through Explorer or common dialogs get + added to the Jump List automatically. } +begin + SHAddToRecentDocs( + {$IFDEF UNICODE} SHARD_PATHW {$ELSE} SHARD_PATHA {$ENDIF}, + PChar(Filename)); +end; + +function GenerateGuid: String; +var + Guid: TGUID; + P: PWideChar; +begin + if CoCreateGuid(Guid) <> S_OK then + raise Exception.Create('CoCreateGuid failed'); + if StringFromCLSID(Guid, P) <> S_OK then + raise Exception.Create('StringFromCLSID failed'); + try + Result := P; + finally + CoTaskMemFree(P); + end; +end; + +{ TConfigIniFile } + +type + TConfigIniFile = class(TRegIniFile) + private + FMutex: THandle; + FAcquiredMutex: Boolean; + public + constructor Create; + destructor Destroy; override; + end; + +constructor TConfigIniFile.Create; +begin + inherited Create('Software\Jordan Russell\Inno Setup'); + { Paranoia: Use a mutex to prevent multiple instances from reading/writing + to the registry simultaneously } + FMutex := CreateMutex(nil, False, 'Inno-Setup-IDE-Config-Mutex'); + if FMutex <> 0 then + if WaitForSingleObject(FMutex, INFINITE) <> WAIT_FAILED then + FAcquiredMutex := True; +end; + +destructor TConfigIniFile.Destroy; +begin + if FMutex <> 0 then begin + if FAcquiredMutex then + ReleaseMutex(FMutex); + CloseHandle(FMutex); + end; + inherited; +end; + +{ TISScintEdit } + +procedure TISScintEdit.CreateWnd; +const + PixmapHasEntry: array[0..8] of PAnsiChar = ( + '5 5 2 1', + 'o c #808080', + '. c #c0c0c0', + 'ooooo', + 'o...o', + 'o...o', + 'o...o', + 'ooooo', + nil); + PixmapEntryProcessed: array[0..8] of PAnsiChar = ( + '5 5 2 1', + 'o c #008000', + '. c #00ff00', + 'ooooo', + 'o...o', + 'o...o', + 'o...o', + 'ooooo', + nil); + PixmapBreakpoint: array[0..14] of PAnsiChar = ( + '9 10 3 1', + '= c none', + 'o c #000000', + '. c #ff0000', + '=========', + '==ooooo==', + '=o.....o=', + 'o.......o', + 'o.......o', + 'o.......o', + 'o.......o', + 'o.......o', + '=o.....o=', + '==ooooo==', + nil); + PixmapBreakpointGood: array[0..15] of PAnsiChar = ( + '9 10 4 1', + '= c none', + 'o c #000000', + '. c #ff0000', + '* c #00ff00', + '======oo=', + '==oooo**o', + '=o....*o=', + 'o....**.o', + 'o....*..o', + 'o...**..o', + 'o**.*...o', + 'o.***...o', + '=o.*...o=', + '==ooooo==', + nil); + PixmapBreakpointBad: array[0..15] of PAnsiChar = ( + '9 10 4 1', + '= c none', + 'o c #000000', + '. c #ff0000', + '* c #ffff00', + '=========', + '==ooooo==', + '=o.....o=', + 'o.*...*.o', + 'o.**.**.o', + 'o..***..o', + 'o.**.**.o', + 'o.*...*.o', + '=o.....o=', + '==ooooo==', + nil); +const + SC_MARK_BACKFORE = 3030; { new marker type added in my Scintilla build } +begin + inherited; + + Call(SCI_SETCARETWIDTH, 2, 0); + Call(SCI_AUTOCSETAUTOHIDE, 0, 0); + Call(SCI_AUTOCSETCANCELATSTART, 0, 0); + Call(SCI_AUTOCSETDROPRESTOFWORD, 1, 0); + Call(SCI_AUTOCSETIGNORECASE, 1, 0); + Call(SCI_AUTOCSETMAXHEIGHT, 7, 0); + + Call(SCI_ASSIGNCMDKEY, Ord('Z') or ((SCMOD_SHIFT or SCMOD_CTRL) shl 16), SCI_REDO); + + Call(SCI_SETSCROLLWIDTH, 1024 * CallStr(SCI_TEXTWIDTH, 0, 'X'), 0); + + Call(SCI_INDICSETSTYLE, inSquiggly, INDIC_SQUIGGLE); + Call(SCI_INDICSETFORE, inSquiggly, clRed); + Call(SCI_INDICSETSTYLE, inPendingSquiggly, INDIC_HIDDEN); + + Call(SCI_SETMARGINTYPEN, 1, SC_MARGIN_SYMBOL); + Call(SCI_SETMARGINWIDTHN, 1, 21); + Call(SCI_SETMARGINSENSITIVEN, 1, 1); + Call(SCI_SETMARGINCURSORN, 1, SC_CURSORARROW); + Call(SCI_SETMARGINTYPEN, 2, SC_MARGIN_BACK); + Call(SCI_SETMARGINMASKN, 2, 0); + Call(SCI_SETMARGINWIDTHN, 2, 1); + Call(SCI_SETMARGINTYPEN, 3, SC_MARGIN_SYMBOL); + Call(SCI_SETMARGINMASKN, 3, 0); + Call(SCI_SETMARGINWIDTHN, 3, 1); + Call(SCI_SETMARGINLEFT, 0, 2); + + Call(SCI_MARKERDEFINEPIXMAP, mmIconHasEntry, LPARAM(@PixmapHasEntry)); + Call(SCI_MARKERDEFINEPIXMAP, mmIconEntryProcessed, LPARAM(@PixmapEntryProcessed)); + Call(SCI_MARKERDEFINEPIXMAP, mmIconBreakpoint, LPARAM(@PixmapBreakpoint)); + Call(SCI_MARKERDEFINEPIXMAP, mmIconBreakpointGood, LPARAM(@PixmapBreakpointGood)); + Call(SCI_MARKERDEFINEPIXMAP, mmIconBreakpointBad, LPARAM(@PixmapBreakpointBad)); + Call(SCI_MARKERDEFINE, mmLineError, SC_MARK_BACKFORE); + Call(SCI_MARKERSETFORE, mmLineError, clWhite); + Call(SCI_MARKERSETBACK, mmLineError, clMaroon); + Call(SCI_MARKERDEFINE, mmLineBreakpoint, SC_MARK_BACKFORE); + Call(SCI_MARKERSETFORE, mmLineBreakpoint, clWhite); + Call(SCI_MARKERSETBACK, mmLineBreakpoint, clRed); + Call(SCI_MARKERDEFINE, mmLineBreakpointBad, SC_MARK_BACKFORE); + Call(SCI_MARKERSETFORE, mmLineBreakpointBad, clLime); + Call(SCI_MARKERSETBACK, mmLineBreakpointBad, clOlive); + Call(SCI_MARKERDEFINE, mmLineStep, SC_MARK_BACKFORE); + Call(SCI_MARKERSETFORE, mmLineStep, clWhite); + Call(SCI_MARKERSETBACK, mmLineStep, clBlue); +end; + +{ TCompileFormMemoPopupMenu } + +type + TCompileFormMemoPopupMenu = class(TPopupMenu) + public + procedure Popup(X, Y: Integer); override; + end; + +procedure TCompileFormMemoPopupMenu.Popup(X, Y: Integer); +var + Form: TCompileForm; +begin + { Show the existing Edit menu } + Form := Owner as TCompileForm; + TrackPopupMenu(Form.EMenu.Handle, TPM_RIGHTBUTTON, X, Y, 0, Form.Handle, nil); +end; + +{ TCompileForm } + +constructor TCompileForm.Create(AOwner: TComponent); + + procedure ReadConfig; +{$IFNDEF UNICODE} + const + { "MS Gothic" in Japanese (CP 932) } + SMSGothicLocalized = #$82'l'#$82'r '#$83'S'#$83'V'#$83'b'#$83'N'; +{$ENDIF} + var + Ini: TConfigIniFile; + WindowPlacement: TWindowPlacement; + begin + Ini := TConfigIniFile.Create; + try + { Menu check boxes state } + ToolbarPanel.Visible := Ini.ReadBool('Options', 'ShowToolbar', True); + StatusBar.Visible := Ini.ReadBool('Options', 'ShowStatusBar', True); + FOptions.LowPriorityDuringCompile := Ini.ReadBool('Options', 'LowPriorityDuringCompile', False); + + { Configuration options } + FOptions.ShowStartupForm := Ini.ReadBool('Options', 'ShowStartupForm', True); + FOptions.UseWizard := Ini.ReadBool('Options', 'UseWizard', True); + FOptions.Autosave := Ini.ReadBool('Options', 'Autosave', False); + FOptions.MakeBackups := Ini.ReadBool('Options', 'MakeBackups', False); + FOptions.FullPathInTitleBar := Ini.ReadBool('Options', 'FullPathInTitleBar', False); + FOptions.UndoAfterSave := Ini.ReadBool('Options', 'UndoAfterSave', False); + FOptions.PauseOnDebuggerExceptions := Ini.ReadBool('Options', 'PauseOnDebuggerExceptions', True); + FOptions.RunAsDifferentUser := Ini.ReadBool('Options', 'RunAsDifferentUser', False); + FOptions.AutoComplete := Ini.ReadBool('Options', 'AutoComplete', True); + FOptions.UseSyntaxHighlighting := Ini.ReadBool('Options', 'UseSynHigh', True); + FOptions.UnderlineErrors := Ini.ReadBool('Options', 'UnderlineErrors', True); + FOptions.CursorPastEOL := Ini.ReadBool('Options', 'EditorCursorPastEOL', True); + FOptions.TabWidth := Ini.ReadInteger('Options', 'TabWidth', 2); + FOptions.UseTabCharacter := Ini.ReadBool('Options', 'UseTabCharacter', False); + FOptions.WordWrap := Ini.ReadBool('Options', 'WordWrap', False); + FOptions.AutoIndent := Ini.ReadBool('Options', 'AutoIndent', True); + FOptions.IndentationGuides := Ini.ReadBool('Options', 'IndentationGuides', False); + if GetACP = 932 then begin + { Default to MS Gothic font on CP 932 (Japanese), as Courier New is + only capable of displaying Japanese characters on XP and later. } +{$IFNDEF UNICODE} + { Use the English name if it's supported on this version of Windows + (I believe it was first added in Windows 2000), because the CP 932 + localized Japanese name will no longer be valid if the user later + switches out of CP 932. } + if FontExists('MS Gothic') then + Memo.Font.Name := 'MS Gothic' + else + Memo.Font.Name := SMSGothicLocalized; +{$ELSE} + { UNICODE requires 2000+, so we can just use the English name } + Memo.Font.Name := 'MS Gothic'; +{$ENDIF} + Memo.Font.Size := 9; + Memo.Font.Charset := SHIFTJIS_CHARSET; + end; + Memo.Font.Name := Ini.ReadString('Options', 'EditorFontName', Memo.Font.Name); + Memo.Font.Size := Ini.ReadInteger('Options', 'EditorFontSize', Memo.Font.Size); + Memo.Font.Charset := Ini.ReadInteger('Options', 'EditorFontCharset', Memo.Font.Charset); + Memo.Zoom := Ini.ReadInteger('Options', 'Zoom', 0); + SyncEditorOptions; + UpdateNewButtons; + + { Window state } + WindowPlacement.length := SizeOf(WindowPlacement); + GetWindowPlacement(Handle, @WindowPlacement); + WindowPlacement.showCmd := SW_HIDE; { the form isn't Visible yet } + WindowPlacement.rcNormalPosition.Left := Ini.ReadInteger('State', + 'WindowLeft', WindowPlacement.rcNormalPosition.Left); + WindowPlacement.rcNormalPosition.Top := Ini.ReadInteger('State', + 'WindowTop', WindowPlacement.rcNormalPosition.Top); + WindowPlacement.rcNormalPosition.Right := Ini.ReadInteger('State', + 'WindowRight', WindowPlacement.rcNormalPosition.Left + Width); + WindowPlacement.rcNormalPosition.Bottom := Ini.ReadInteger('State', + 'WindowBottom', WindowPlacement.rcNormalPosition.Top + Height); + SetWindowPlacement(Handle, @WindowPlacement); + { Note: Must set WindowState *after* calling SetWindowPlacement, since + TCustomForm.WMSize resets WindowState } + if Ini.ReadBool('State', 'WindowMaximized', False) then + WindowState := wsMaximized; + { Note: Don't call UpdateStatusPanelHeight here since it clips to the + current form height, which hasn't been finalized yet } + StatusPanel.Height := Ini.ReadInteger('State', 'StatusPanelHeight', + (10 * DebugOutputList.ItemHeight + 4) + SpacerPaintBox.Height + TabSet.Height); + finally + Ini.Free; + end; + FOptionsLoaded := True; + end; + + procedure ReadSignTools; + var + Ini: TConfigIniFile; + I: Integer; + S: String; + begin + Ini := TConfigIniFile.Create; + try + { Sign tools } + FSignTools.Clear(); + I := 0; + repeat + S := Ini.ReadString('SignTools', 'SignTool' + IntToStr(I), ''); + if S <> '' then + FSignTools.Add(S); + Inc(I); + until S = ''; + finally + Ini.Free; + end; + end; + + procedure SetFakeShortCutText(const MenuItem: TMenuItem; const S: String); + begin + MenuItem.Caption := MenuItem.Caption + #9 + S; + end; + + procedure SetFakeShortCut(const MenuItem: TMenuItem; const Key: Word; + const Shift: TShiftState); + begin + SetFakeShortCutText(MenuItem, ShortCutToText(ShortCut(Key, Shift))); + end; + +var + I: Integer; + NewItem: TMenuItem; +begin + inherited; + + {$IFNDEF STATICCOMPILER} + FCompilerVersion := ISDllGetVersion; + {$ELSE} + FCompilerVersion := ISGetVersion; + {$ENDIF} + + FErrorLine := -1; + FStepLine := -1; + FModifiedSinceLastCompile := True; + + InitFormFont(Self); + + FBuildImageList := ImageList_LoadBitmap(HInstance, 'BUILDIMAGES', 17, 0, clSilver); + + { For some reason, if AutoScroll=False is set on the form Delphi ignores the + 'poDefault' Position setting } + AutoScroll := False; + +{$IFNDEF UNICODE} + FSaveEncoding.Visible := False; +{$ENDIF} + + { Append the shortcut key text to the Edit items. Don't actually set the + ShortCut property because we don't want the key combinations having an + effect when Memo doesn't have the focus. } + SetFakeShortCut(EUndo, Ord('Z'), [ssCtrl]); + SetFakeShortCut(ERedo, Ord('Y'), [ssCtrl]); + SetFakeShortCut(ECut, Ord('X'), [ssCtrl]); + SetFakeShortCut(ECopy, Ord('C'), [ssCtrl]); + SetFakeShortCut(EPaste, Ord('V'), [ssCtrl]); + SetFakeShortCut(ESelectAll, Ord('A'), [ssCtrl]); + SetFakeShortCut(EDelete, VK_DELETE, []); + SetFakeShortCut(ECompleteWord, VK_RIGHT, [ssAlt]); + SetFakeShortCutText(VZoomIn, SmkcCtrl + 'Num +'); + SetFakeShortCutText(VZoomOut, SmkcCtrl + 'Num -'); + SetFakeShortCutText(VZoomReset, SmkcCtrl + 'Num /'); + { Use fake Esc shortcut for Stop Compile so it doesn't conflict with the + editor's autocompletion list } + SetFakeShortCut(BStopCompile, VK_ESCAPE, []); + + MemoStyler := TInnoSetupStyler.Create(Self); + + Memo := TISScintEdit.Create(Self); + Memo.AcceptDroppedFiles := True; + Memo.Align := alClient; + Memo.AutoCompleteFontName := Font.Name; + Memo.AutoCompleteFontSize := Font.Size; +{$IFDEF UNICODE} + Memo.CodePage := CP_UTF8; +{$ENDIF} + Memo.Font.Name := 'Courier New'; + Memo.Font.Size := 10; + Memo.ShowHint := True; + Memo.Styler := MemoStyler; + Memo.PopupMenu := TCompileFormMemoPopupMenu.Create(Self); + Memo.OnChange := MemoChange; + Memo.OnCharAdded := MemoCharAdded; + Memo.OnDropFiles := MemoDropFiles; + Memo.OnHintShow := MemoHintShow; + Memo.OnKeyDown := MemoKeyDown; + Memo.OnKeyPress := MemoKeyPress; + Memo.OnMarginClick := MemoMarginClick; + Memo.OnModifiedChange := MemoModifiedChange; + Memo.OnUpdateUI := MemoUpdateUI; + Memo.Parent := BodyPanel; + + FBreakPoints := TList.Create; + + DebugOutputList.Canvas.Font.Assign(DebugOutputList.Font); + FDebugLogListTimeWidth := DebugOutputList.Canvas.TextWidth(Format( + '[00%s00%s00%s000] ', [TimeSeparator, TimeSeparator, DecimalSeparator])); + DebugOutputList.ItemHeight := DebugOutputList.Canvas.TextHeight('0'); + + Application.HintShortPause := 0; + Application.OnException := AppOnException; + Application.OnActivate := AppOnActivate; + Application.OnIdle := AppOnIdle; + + FMRUList := TStringList.Create; + for I := 0 to High(FMRUMenuItems) do begin + NewItem := TMenuItem.Create(Self); + NewItem.OnClick := FMRUClick; + FMenu.Insert(FMenu.IndexOf(FMRUSep), NewItem); + FMRUMenuItems[I] := NewItem; + end; + + FSignTools := TStringList.Create; + + FDebugTarget := dtSetup; + UpdateTargetMenu; + + UpdateCaption; + + UpdateThemeData(False, True); + + if CommandLineCompile then begin + ReadSignTools; + PostMessage(Handle, WM_StartCommandLineCompile, 0, 0) + end else if CommandLineWizard then begin + { Stop Delphi from showing the compiler form } + Application.ShowMainForm := False; + { Show wizard form later } + PostMessage(Handle, WM_StartCommandLineWizard, 0, 0); + end else begin + ReadConfig; + ReadSignTools; + PostMessage(Handle, WM_StartNormally, 0, 0); + end; +end; + +destructor TCompileForm.Destroy; + + procedure SaveConfig; + var + Ini: TConfigIniFile; + WindowPlacement: TWindowPlacement; + begin + Ini := TConfigIniFile.Create; + try + { Menu check boxes state } + Ini.WriteBool('Options', 'ShowToolbar', ToolbarPanel.Visible); + Ini.WriteBool('Options', 'ShowStatusBar', StatusBar.Visible); + Ini.WriteBool('Options', 'LowPriorityDuringCompile', FOptions.LowPriorityDuringCompile); + + { Window state } + WindowPlacement.length := SizeOf(WindowPlacement); + GetWindowPlacement(Handle, @WindowPlacement); + Ini.WriteInteger('State', 'WindowLeft', WindowPlacement.rcNormalPosition.Left); + Ini.WriteInteger('State', 'WindowTop', WindowPlacement.rcNormalPosition.Top); + Ini.WriteInteger('State', 'WindowRight', WindowPlacement.rcNormalPosition.Right); + Ini.WriteInteger('State', 'WindowBottom', WindowPlacement.rcNormalPosition.Bottom); + Ini.WriteBool('State', 'WindowMaximized', WindowState = wsMaximized); + Ini.WriteInteger('State', 'StatusPanelHeight', StatusPanel.Height); + + { Zoom state } + Ini.WriteInteger('Options', 'Zoom', Memo.Zoom); + finally + Ini.Free; + end; + end; + +begin + UpdateThemeData(True, False); + + Application.OnActivate := nil; + Application.OnIdle := nil; + + if FOptionsLoaded and not (CommandLineCompile or CommandLineWizard) then + SaveConfig; + + FBreakPoints.Free; + DestroyDebugInfo; + FSignTools.Free; + FMRUList.Free; + if FBuildImageList <> 0 then begin + ImageList_Destroy(FBuildImageList); + FBuildImageList := 0; + end; + + inherited; +end; + +class procedure TCompileForm.AppOnException(Sender: TObject; E: Exception); +begin + AppMessageBox(PChar(AddPeriod(E.Message)), SCompilerFormCaption, + MB_OK or MB_ICONSTOP); +end; + +procedure TCompileForm.FormCloseQuery(Sender: TObject; + var CanClose: Boolean); +begin + if IsWindowEnabled(Application.Handle) then + CanClose := ConfirmCloseFile(True) + else + { CloseQuery is also called by the VCL when a WM_QUERYENDSESSION message + is received. Don't display message box if a modal dialog is already + displayed. } + CanClose := False; +end; + +procedure TCompileForm.FormKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +begin + if ShortCut(Key, Shift) = VK_ESCAPE then begin + if BStopCompile.Enabled then + BStopCompileClick(Self); + end + else if (Key = VK_F6) and not(ssAlt in Shift) then begin + { Toggle focus between panes } + Key := 0; + if ActiveControl <> Memo then + ActiveControl := Memo + else if StatusPanel.Visible then begin + case TabSet.TabIndex of + tiCompilerOutput: ActiveControl := CompilerOutputList; + tiDebugOutput: ActiveControl := DebugOutputList; + end; + end; + end; +end; + +procedure TCompileForm.FormResize(Sender: TObject); +begin + { Make sure the status panel's height is decreased if necessary in response + to the form's height decreasing } + if StatusPanel.Visible then + UpdateStatusPanelHeight(StatusPanel.Height); +end; + +{$IFDEF IS_D4} +procedure TCompileForm.WndProc(var Message: TMessage); +begin + { Without this, the status bar's owner drawn panels sometimes get corrupted and show + menu items instead. See: + http://groups.google.com/group/borland.public.delphi.vcl.components.using/browse_thread/thread/e4cb6c3444c70714 } + with Message do + case Msg of + WM_DRAWITEM: + with PDrawItemStruct(Message.LParam)^ do + if (CtlType = ODT_MENU) and not IsMenu(hwndItem) then + CtlType := ODT_STATIC; + end; + inherited +end; +{$ENDIF} + +{$IFDEF IS_D5} +function TCompileForm.IsShortCut(var Message: TWMKey): Boolean; +begin + { Key messages are forwarded by the VCL to the main form for ShortCut + processing. In Delphi 5+, however, this happens even when a TFindDialog + is active, causing Ctrl+V/Esc/etc. to be intercepted by the main form. + Work around this by always returning False when not Active. } + if Active then + Result := inherited IsShortCut(Message) + else + Result := False; +end; +{$ENDIF} + +procedure TCompileForm.UpdateCaption; +var + NewCaption: String; +begin + if FFilename = '' then + NewCaption := 'Untitled' + else begin + if FOptions.FullPathInTitleBar then + NewCaption := FFilename + else + NewCaption := GetDisplayFilename(FFilename); + end; + NewCaption := NewCaption + ' - ' + SCompilerFormCaption + ' ' + + String(FCompilerVersion.Version); + if FCompiling then + NewCaption := NewCaption + ' [Compiling]' + else if FDebugging then begin + if not FPaused then + NewCaption := NewCaption + ' [Running]' + else + NewCaption := NewCaption + ' [Paused]'; + end; + Caption := NewCaption; + if not CommandLineWizard then + Application.Title := NewCaption; +end; + +procedure TCompileForm.UpdateNewButtons; +begin + if FOptions.UseWizard then begin + FNew.OnClick := FNewWizardClick; + NewButton.OnClick := FNewWizardClick; + end else begin + FNew.OnClick := FNewClick; + NewButton.OnClick := FNewClick; + end; +end; + +procedure TCompileForm.NewFile; +begin + HideError; + FUninstExe := ''; + if FDebugTarget <> dtSetup then begin + FDebugTarget := dtSetup; + UpdateTargetMenu; + end; + FBreakPoints.Clear; + DestroyDebugInfo; + + FFilename := ''; + UpdateCaption; + FSaveInUTF8Encoding := False; + Memo.Lines.Clear; + FModifiedSinceLastCompile := True; + Memo.ClearUndo; +end; + +procedure TCompileForm.NewWizardFile; +var + WizardForm: TWizardForm; + SaveEnabled: Boolean; +begin + WizardForm := TWizardForm.Create(Application); + try + SaveEnabled := Enabled; + if CommandLineWizard then begin + WizardForm.WizardName := CommandLineWizardName; + { Must disable CompileForm even though it isn't shown, otherwise + menu keyboard shortcuts (such as Ctrl+O) still work } + Enabled := False; + end; + try + if WizardForm.ShowModal <> mrOk then + Exit; + finally + Enabled := SaveEnabled; + end; + + if CommandLineWizard then begin + SaveTextToFile(CommandLineFileName, WizardForm.ResultScript, False); + end else begin + NewFile; + Memo.Lines.Text := WizardForm.ResultScript; + Memo.ClearUndo; + if WizardForm.Result = wrComplete then begin + Memo.ForceModifiedState; + if MsgBox('Would you like to compile the new script now?', SCompilerFormCaption, mbConfirmation, MB_YESNO) = IDYES then + BCompileClick(Self); + end; + end; + finally + WizardForm.Free; + end; +end; + +procedure TCompileForm.OpenFile(AFilename: String; + const AddToRecentDocs: Boolean); + + function IsStreamUTF8Encoded(const Stream: TStream): Boolean; + var + Buf: array[0..2] of Byte; + begin + Result := False; + if Stream.Read(Buf, SizeOf(Buf)) = SizeOf(Buf) then + if (Buf[0] = $EF) and (Buf[1] = $BB) and (Buf[2] = $BF) then + Result := True; + end; + +var + Stream: TFileStream; +begin + AFilename := PathExpand(AFilename); + + Stream := TFileStream.Create(AFilename, fmOpenRead or fmShareDenyNone); + try + NewFile; + GetFileTime(Stream.Handle, nil, nil, @FFileLastWriteTime); + FSaveInUTF8Encoding := IsStreamUTF8Encoded(Stream); + Stream.Seek(0, soFromBeginning); + Memo.Lines.LoadFromStream(Stream); + finally + Stream.Free; + end; + Memo.ClearUndo; + FFilename := AFilename; + UpdateCaption; + ModifyMRUList(AFilename, True); + if AddToRecentDocs then + AddFileToRecentDocs(AFilename); +end; + +procedure TCompileForm.OpenMRUFile(const AFilename: String); +{ Same as OpenFile, but offers to remove the file from the MRU list if it + cannot be opened } +begin + try + OpenFile(AFilename, True); + except + Application.HandleException(Self); + if MsgBoxFmt('There was an error opening the file. Remove it from the list?', + [AFilename], SCompilerFormCaption, mbError, MB_YESNO) = IDYES then + ModifyMRUList(AFilename, False); + end; +end; + +class procedure TCompileForm.SaveTextToFile(const Filename: String; + const S: String; const ForceUTF8Encoding: Boolean); +var +{$IFDEF UNICODE} + AnsiMode: Boolean; + AnsiStr: AnsiString; +{$ENDIF} + F: TTextFileWriter; +begin +{$IFDEF UNICODE} + AnsiMode := False; + if not ForceUTF8Encoding then begin + AnsiStr := AnsiString(S); + if S = String(AnsiStr) then + AnsiMode := True; + end; +{$ENDIF} + + F := TTextFileWriter.Create(Filename, fdCreateAlways, faWrite, fsNone); + try +{$IFDEF UNICODE} + if AnsiMode then + F.WriteAnsi(AnsiStr) + else +{$ENDIF} + F.Write(S); + finally + F.Free; + end; +end; + +function TCompileForm.SaveFile(const SaveAs: Boolean): Boolean; + + procedure SaveTo(const FN: String); + var + TempFN, BackupFN: String; + Buf: array[0..4095] of Char; + begin + { Save to a temporary file; don't overwrite existing files in place. This + way, if the system crashes or the disk runs out of space during the save, + the existing file will still be intact. } + if GetTempFileName(PChar(PathExtractDir(FN)), 'iss', 0, Buf) = 0 then + raise Exception.CreateFmt('Error creating file (code %d). Could not save file', + [GetLastError]); + TempFN := Buf; + try + SaveTextToFile(TempFN, Memo.Lines.Text, FSaveInUTF8Encoding); + + { Back up existing file if needed } + if FOptions.MakeBackups and NewFileExists(FN) then begin + BackupFN := PathChangeExt(FN, '.~is'); + DeleteFile(BackupFN); + if not RenameFile(FN, BackupFN) then + raise Exception.Create('Error creating backup file. Could not save file'); + end; + + { Delete existing file } + if not DeleteFile(FN) and (GetLastError <> ERROR_FILE_NOT_FOUND) then + raise Exception.CreateFmt('Error removing existing file (code %d). Could not save file', + [GetLastError]); + except + DeleteFile(TempFN); + raise; + end; + { Rename temporary file. + Note: This is outside the try..except because we already deleted the + existing file, and don't want the temp file also deleted in the unlikely + event that the rename fails. } + if not RenameFile(TempFN, FN) then + raise Exception.CreateFmt('Error renaming temporary file (code %d). Could not save file', + [GetLastError]); + GetLastWriteTimeOfFile(FN, FFileLastWriteTime); + end; + +var + FN: String; +begin + Result := False; + if SaveAs or (FFilename = '') then begin + FN := FFilename; + if not NewGetSaveFileName('', FN, '', SCompilerOpenFilter, 'iss', Handle) then Exit; + FN := PathExpand(FN); + SaveTo(FN); + FFilename := FN; + UpdateCaption; + end + else + SaveTo(FFilename); + Memo.SetSavePoint; + if not FOptions.UndoAfterSave then + Memo.ClearUndo; + Result := True; + ModifyMRUList(FFilename, True); +end; + +function TCompileForm.ConfirmCloseFile(const PromptToSave: Boolean): Boolean; +var + FileTitle: String; +begin + Result := True; + if FCompiling then begin + MsgBox('Please stop the compile process before performing this command.', + SCompilerFormCaption, mbError, MB_OK); + Result := False; + Exit; + end; + if FDebugging and not AskToDetachDebugger then begin + Result := False; + Exit; + end; + if PromptToSave and Memo.Modified then begin + FileTitle := FFilename; + if FileTitle = '' then FileTitle := 'Untitled'; + case MsgBox('The text in the ' + FileTitle + ' file has changed.'#13#10#13#10 + + 'Do you want to save the changes?', SCompilerFormCaption, mbError, + MB_YESNOCANCEL) of + IDYES: Result := SaveFile(False); + IDNO: ; + else + Result := False; + end; + end; +end; + +procedure TCompileForm.ReadMRUList; +{ Loads the list of MRU items from the registry } +var + Ini: TConfigIniFile; + I: Integer; + S: String; +begin + try + Ini := TConfigIniFile.Create; + try + FMRUList.Clear; + for I := 0 to High(FMRUMenuItems) do begin + S := Ini.ReadString('ScriptFileHistoryNew', 'History' + IntToStr(I), ''); + if S <> '' then FMRUList.Add(S); + end; + finally + Ini.Free; + end; + except + { Ignore any exceptions; don't want to hold up the display of the + File menu. } + end; +end; + +procedure TCompileForm.ModifyMRUList(const AFilename: String; + const AddNewItem: Boolean); +var + I: Integer; + Ini: TConfigIniFile; + S: String; +begin + try + { Load most recent items first, just in case they've changed } + ReadMRUList; + + I := 0; + while I < FMRUList.Count do begin + if PathCompare(FMRUList[I], AFilename) = 0 then + FMRUList.Delete(I) + else + Inc(I); + end; + if AddNewItem then + FMRUList.Insert(0, AFilename); + while FMRUList.Count > High(FMRUMenuItems)+1 do + FMRUList.Delete(FMRUList.Count-1); + + { Save new MRU items } + Ini := TConfigIniFile.Create; + try + { MRU list } + for I := 0 to High(FMRUMenuItems) do begin + if I < FMRUList.Count then + S := FMRUList[I] + else + S := ''; + Ini.WriteString('ScriptFileHistoryNew', 'History' + IntToStr(I), S); + end; + finally + Ini.Free; + end; + except + { Handle exceptions locally; failure to save the MRU list should not be + a fatal error. } + Application.HandleException(Self); + end; +end; + +procedure TCompileForm.StatusMessage(const S: String); +var + DC: HDC; + Size: TSize; +begin + with CompilerOutputList do begin + try + TopIndex := Items.Add(S); + except + on EOutOfResources do begin + Clear; + SendMessage(Handle, LB_SETHORIZONTALEXTENT, 0, 0); + Items.Add(SCompilerStatusReset); + TopIndex := Items.Add(S); + end; + end; + DC := GetDC(0); + try + SelectObject(DC, Font.Handle); + GetTextExtentPoint(DC, PChar(S), Length(S), Size); + finally + ReleaseDC(0, DC); + end; + Inc(Size.cx, 5); + if Size.cx > SendMessage(Handle, LB_GETHORIZONTALEXTENT, 0, 0) then + SendMessage(Handle, LB_SETHORIZONTALEXTENT, Size.cx, 0); + Update; + end; +end; + +procedure TCompileForm.DebugLogMessage(const S: String); +var + ST: TSystemTime; + FirstLine: Boolean; + + procedure AddLine(S: String); + var + StartsWithTab: Boolean; + DC: HDC; + Size: TSize; + begin + if FirstLine then begin + FirstLine := False; + Insert(Format('[%.2u%s%.2u%s%.2u%s%.3u] ', [ST.wHour, TimeSeparator, + ST.wMinute, TimeSeparator, ST.wSecond, DecimalSeparator, + ST.wMilliseconds]), S, 1); + StartsWithTab := False; + end + else begin + Insert(#9, S, 1); + StartsWithTab := True; + end; + try + DebugOutputList.TopIndex := DebugOutputList.Items.Add(S); + except + on EOutOfResources do begin + DebugOutputList.Clear; + SendMessage(DebugOutputList.Handle, LB_SETHORIZONTALEXTENT, 0, 0); + DebugOutputList.Items.Add(SCompilerStatusReset); + DebugOutputList.TopIndex := DebugOutputList.Items.Add(S); + end; + end; + DC := GetDC(0); + try + SelectObject(DC, DebugOutputList.Font.Handle); + if StartsWithTab then + GetTextExtentPoint(DC, PChar(S)+1, Length(S)-1, Size) + else + GetTextExtentPoint(DC, PChar(S), Length(S), Size); + finally + ReleaseDC(0, DC); + end; + Inc(Size.cx, 5); + if StartsWithTab then + Inc(Size.cx, FDebugLogListTimeWidth); + if Size.cx > SendMessage(DebugOutputList.Handle, LB_GETHORIZONTALEXTENT, 0, 0) then + SendMessage(DebugOutputList.Handle, LB_SETHORIZONTALEXTENT, Size.cx, 0); + end; + +var + LineStart, I: Integer; + LastWasCR: Boolean; +begin + GetLocalTime(ST); + FirstLine := True; + LineStart := 1; + LastWasCR := False; + { Call AddLine for each line. CR, LF, and CRLF line breaks are supported. } + for I := 1 to Length(S) do begin + if S[I] = #13 then begin + AddLine(Copy(S, LineStart, I - LineStart)); + LineStart := I + 1; + LastWasCR := True; + end + else begin + if S[I] = #10 then begin + if not LastWasCR then + AddLine(Copy(S, LineStart, I - LineStart)); + LineStart := I + 1; + end; + LastWasCR := False; + end; + end; + AddLine(Copy(S, LineStart, Maxint)); + DebugOutputList.Update; +end; + +type + PAppData = ^TAppData; + TAppData = record + Form: TCompileForm; + Lines: TStringList; + CurLineNumber: Integer; + CurLine: String; + OutputExe: String; + ErrorMsg: String; + ErrorFilename: String; + ErrorLine: Integer; + Aborted: Boolean; + end; + +function CompilerCallbackProc(Code: Integer; var Data: TCompilerCallbackData; + AppData: Longint): Integer; stdcall; +begin + Result := iscrSuccess; + with PAppData(AppData)^ do + case Code of + iscbReadScript: + begin + if Data.Reset then + CurLineNumber := 0; + if CurLineNumber < Lines.Count then begin + CurLine := Lines[CurLineNumber]; + Data.LineRead := PChar(CurLine); + Inc(CurLineNumber); + end; + end; + iscbNotifyStatus: + Form.StatusMessage(Data.StatusMsg); + iscbNotifyIdle: + begin + Form.UpdateCompileStatusPanels(Data.CompressProgress, + Data.CompressProgressMax, Data.SecondsRemaining, + Data.BytesCompressedPerSecond); + { We have to use HandleMessage instead of ProcessMessages so that + Application.Idle is called. Otherwise, Flat TSpeedButton's don't + react to the mouse being moved over them. + Unfortunately, HandleMessage by default calls WaitMessage. To avoid + this we have an Application.OnIdle handler which sets Done to False + while compiling is in progress - see AppOnIdle. + The GetQueueStatus check below is just an optimization; calling + HandleMessage when there are no messages to process wastes CPU. } + if GetQueueStatus(QS_ALLINPUT) <> 0 then begin + Form.FBecameIdle := False; + repeat + Application.HandleMessage; + { AppOnIdle sets FBecameIdle to True when it's called, which + indicates HandleMessage didn't find any message to process } + until Form.FBecameIdle; + end; + if Form.FCompileWantAbort then + Result := iscrRequestAbort; + end; + iscbNotifySuccess: + begin + OutputExe := Data.OutputExeFilename; + if Form.FCompilerVersion.BinVersion >= $3000001 then + Form.ParseDebugInfo(Data.DebugInfo); + end; + iscbNotifyError: + begin + if Assigned(Data.ErrorMsg) then + ErrorMsg := Data.ErrorMsg + else + Aborted := True; + ErrorFilename := Data.ErrorFilename; + ErrorLine := Data.ErrorLine; + end; + end; +end; + +procedure TCompileForm.CompileFile(AFilename: String; + const ReadFromFile: Boolean); + + procedure ReadScriptLines(const ALines: TStringList); + + function ContainsNullChar(const S: String): Boolean; + var + I: Integer; + begin + Result := False; + for I := 1 to Length(S) do + if S[I] = #0 then begin + Result := True; + Break; + end; + end; + + var + F: TTextFileReader; + I: Integer; + begin + if ReadFromFile then begin + F := TTextFileReader.Create(AFilename, fdOpenExisting, faRead, fsRead); + try + while not F.Eof do + ALines.Add(F.ReadLine); + finally + F.Free; + end; + end + else begin + ALines.Capacity := Memo.Lines.Count; + ALines.Assign(Memo.Lines); + end; + + { Check for null characters } + for I := 0 to ALines.Count-1 do begin + if ContainsNullChar(ALines[I]) then begin + if not ReadFromFile then begin + MoveCaret(I, False); + SetErrorLine(I); + end; + raise Exception.CreateFmt(SCompilerIllegalNullChar, [I + 1]); + end; + end; + end; + +var + SourcePath, S, Options: String; + Params: TCompileScriptParamsEx; + AppData: TAppData; + StartTime, ElapsedTime, ElapsedSeconds: DWORD; + I: Integer; +begin + if FCompiling then begin + { Shouldn't get here, but just in case... } + MsgBox('A compile is already in progress.', SCompilerFormCaption, mbError, MB_OK); + Abort; + end; + + if not ReadFromFile then begin + if FOptions.Autosave and Memo.Modified then begin + if not SaveFile(False) then Abort; + end else if FFilename = '' then begin + case MsgBox('Would you like to save the script before compiling?' + + SNewLine2 + 'If you answer No, the compiled installation will be ' + + 'placed under your My Documents folder by default.', + SCompilerFormCaption, mbConfirmation, MB_YESNOCANCEL) of + IDYES: if not SaveFile(False) then Abort; + IDNO: ; + else + Abort; + end; + end; + AFilename := FFilename; + end; + + DestroyDebugInfo; + AppData.Lines := TStringList.Create; + try + FBuildAnimationFrame := 0; + FProgress := 0; + FProgressMax := 0; + + Memo.CancelAutoComplete; + Memo.Cursor := crAppStart; + Memo.SetCursorID(999); { hack to keep it from overriding Cursor } + CompilerOutputList.Cursor := crAppStart; + Memo.ReadOnly := True; + UpdateEditModePanel; + HideError; + CompilerOutputList.Clear; + SendMessage(CompilerOutputList.Handle, LB_SETHORIZONTALEXTENT, 0, 0); + DebugOutputList.Clear; + SendMessage(DebugOutputList.Handle, LB_SETHORIZONTALEXTENT, 0, 0); + TabSet.TabIndex := tiCompilerOutput; + SetStatusPanelVisible(True); + + if AFilename <> '' then + SourcePath := PathExtractPath(AFilename) + else begin + { If the script was not saved, default to My Documents } + SourcePath := GetShellFolderPath(CSIDL_PERSONAL); + if SourcePath = '' then + raise Exception.Create('GetShellFolderPath failed'); + end; + FillChar(Params, SizeOf(Params), 0); + Params.Size := SizeOf(Params); + Params.CompilerPath := nil; + Params.SourcePath := PChar(SourcePath); + Params.CallbackProc := CompilerCallbackProc; + Pointer(Params.AppData) := @AppData; + Options := ''; + for I := 0 to FSignTools.Count-1 do + Options := Options + 'SignTool-' + FSignTools[I] + #0; + Params.Options := PChar(Options); + + AppData.Form := Self; + AppData.CurLineNumber := 0; + AppData.Aborted := False; + ReadScriptLines(AppData.Lines); + + StartTime := GetTickCount; + StatusMessage(Format(SCompilerStatusStarting, [TimeToStr(Time)])); + StatusMessage(''); + FCompiling := True; + FCompileWantAbort := False; + UpdateRunMenu; + UpdateCaption; + SetLowPriority(FOptions.LowPriorityDuringCompile); + {$IFNDEF STATICCOMPILER} + if ISDllCompileScript(Params) <> isceNoError then begin + {$ELSE} + if ISCompileScript(Params, False) <> isceNoError then begin + {$ENDIF} + StatusMessage(SCompilerStatusErrorAborted); + if not ReadFromFile and (AppData.ErrorLine > 0) and + (AppData.ErrorFilename = '') then begin + { Move the caret to the line number the error occured on } + MoveCaret(AppData.ErrorLine - 1, False); + SetErrorLine(AppData.ErrorLine - 1); + end; + if not AppData.Aborted then begin + S := ''; + if AppData.ErrorFilename <> '' then + S := 'File: ' + AppData.ErrorFilename + SNewLine2; + if AppData.ErrorLine > 0 then + S := S + Format('Line %d:' + SNewLine, [AppData.ErrorLine]); + S := S + AppData.ErrorMsg; + SetAppTaskbarProgressState(tpsError); + MsgBox(S, 'Compiler Error', mbCriticalError, MB_OK) + end; + Abort; + end; + ElapsedTime := GetTickCount - StartTime; + ElapsedSeconds := ElapsedTime div 1000; + StatusMessage(Format(SCompilerStatusFinished, [TimeToStr(Time), + Format('%.2u%s%.2u%s%.3u', [ElapsedSeconds div 60, TimeSeparator, + ElapsedSeconds mod 60, DecimalSeparator, ElapsedTime mod 1000])])); + finally + AppData.Lines.Free; + FCompiling := False; + SetLowPriority(False); + Memo.Cursor := crDefault; + Memo.SetCursorID(SC_CURSORNORMAL); + CompilerOutputList.Cursor := crDefault; + Memo.ReadOnly := False; + UpdateEditModePanel; + UpdateRunMenu; + UpdateCaption; + InvalidateStatusPanel(spCompileIcon); + InvalidateStatusPanel(spCompileProgress); + SetAppTaskbarProgressState(tpsNoProgress); + StatusBar.Panels[spExtraStatus].Text := ''; + end; + FCompiledExe := AppData.OutputExe; + FModifiedSinceLastCompile := False; + FModifiedSinceLastCompileAndGo := False; +end; + +procedure TCompileForm.SetLowPriority(ALowPriority: Boolean); +begin + if ALowPriority then begin + { Save current priority and change to 'low' } + if FSavePriorityClass = 0 then + FSavePriorityClass := GetPriorityClass(GetCurrentProcess); + SetPriorityClass(GetCurrentProcess, IDLE_PRIORITY_CLASS); + end + else begin + { Restore original priority } + if FSavePriorityClass <> 0 then begin + SetPriorityClass(GetCurrentProcess, FSavePriorityClass); + FSavePriorityClass := 0; + end; + end; +end; + +function TranslateCharsetInfo(lpSrc: PDWORD; var lpCs: TCharsetInfo; + dwFlags: DWORD): BOOL; stdcall; external gdi32; + +procedure TCompileForm.SyncEditorOptions; +const + SquigglyStyles: array[Boolean] of Integer = (INDIC_HIDDEN, INDIC_SQUIGGLE); +{$IFNDEF UNICODE} +var + CharsetInfo: TCharsetInfo; +{$ENDIF} +begin + Memo.UseStyleAttributes := FOptions.UseSyntaxHighlighting; + Memo.Call(SCI_INDICSETSTYLE, inSquiggly, SquigglyStyles[FOptions.UnderlineErrors]); + + if FOptions.CursorPastEOL then + Memo.VirtualSpaceOptions := [svsRectangularSelection, svsUserAccessible] + else + Memo.VirtualSpaceOptions := []; + Memo.FillSelectionToEdge := FOptions.CursorPastEOL; + + Memo.TabWidth := FOptions.TabWidth; + Memo.UseTabCharacter := FOptions.UseTabCharacter; + + Memo.WordWrap := FOptions.WordWrap; + + if FOptions.IndentationGuides then + Memo.IndentationGuides := sigLookBoth + else + Memo.IndentationGuides := sigNone; + +{$IFNDEF UNICODE} + { Try to set the editor's code page to match the font's character set } + if (Memo.Font.Charset <> DEFAULT_CHARSET) and + TranslateCharsetInfo(PDWORD(Memo.Font.Charset), CharsetInfo, TCI_SRCCHARSET) then + Memo.CodePage := CharsetInfo.ciACP + else + Memo.CodePage := 0; +{$ENDIF} +end; + +procedure TCompileForm.FMenuClick(Sender: TObject); + + function DoubleAmp(const S: String): String; + var + I: Integer; + begin + Result := S; + I := 1; + while I <= Length(Result) do begin + if Result[I] = '&' then begin + Inc(I); + Insert('&', Result, I); + Inc(I); + end + else + Inc(I, PathCharLength(S, I)); + end; + end; + +var + I: Integer; +begin + FSaveEncodingAuto.Checked := not FSaveInUTF8Encoding; + FSaveEncodingUTF8.Checked := FSaveInUTF8Encoding; + ReadMRUList; + FMRUSep.Visible := FMRUList.Count <> 0; + for I := 0 to High(FMRUMenuItems) do + with FMRUMenuItems[I] do begin + if I < FMRUList.Count then begin + Visible := True; + Caption := '&' + IntToStr((I+1) mod 10) + ' ' + DoubleAmp(FMRUList[I]); + end + else + Visible := False; + end; +end; + +procedure TCompileForm.FNewClick(Sender: TObject); +begin + if ConfirmCloseFile(True) then + NewFile; +end; + +procedure TCompileForm.FNewWizardClick(Sender: TObject); +begin + if ConfirmCloseFile(True) then + NewWizardFile; +end; + +procedure TCompileForm.ShowOpenDialog(const Examples: Boolean); +var + InitialDir, FileName: String; +begin + if Examples then begin + InitialDir := PathExtractPath(NewParamStr(0)) + 'Examples'; + Filename := PathExtractPath(NewParamStr(0)) + 'Examples\Example1.iss'; + end + else begin + InitialDir := PathExtractDir(FFilename); + Filename := ''; + end; + if ConfirmCloseFile(True) then + if NewGetOpenFileName('', FileName, InitialDir, SCompilerOpenFilter, 'iss', Handle) then + OpenFile(Filename, False); +end; + +procedure TCompileForm.FOpenClick(Sender: TObject); +begin + ShowOpenDialog(False); +end; + +procedure TCompileForm.FSaveClick(Sender: TObject); +begin + SaveFile(False); +end; + +procedure TCompileForm.FSaveAsClick(Sender: TObject); +begin + SaveFile(True); +end; + +procedure TCompileForm.FSaveEncodingItemClick(Sender: TObject); +begin + FSaveInUTF8Encoding := (Sender = FSaveEncodingUTF8); +end; + +procedure TCompileForm.FMRUClick(Sender: TObject); +var + I: Integer; +begin + if ConfirmCloseFile(True) then + for I := 0 to High(FMRUMenuItems) do + if FMRUMenuItems[I] = Sender then begin + OpenMRUFile(FMRUList[I]); + Break; + end; +end; + +procedure TCompileForm.FExitClick(Sender: TObject); +begin + Close; +end; + +procedure TCompileForm.EMenuClick(Sender: TObject); +var + MemoHasFocus: Boolean; +begin + MemoHasFocus := Memo.Focused; + EUndo.Enabled := MemoHasFocus and Memo.CanUndo; + ERedo.Enabled := MemoHasFocus and Memo.CanRedo; + ECut.Enabled := MemoHasFocus and Memo.SelAvail; + ECopy.Enabled := MemoHasFocus and Memo.SelAvail; + EPaste.Enabled := MemoHasFocus and Clipboard.HasFormat(CF_TEXT); + EDelete.Enabled := MemoHasFocus and Memo.SelAvail; + ESelectAll.Enabled := MemoHasFocus; + EFind.Enabled := MemoHasFocus; + EFindNext.Enabled := MemoHasFocus; + EReplace.Enabled := MemoHasFocus; + EGoto.Enabled := MemoHasFocus; + ECompleteWord.Enabled := MemoHasFocus; +end; + +procedure TCompileForm.EUndoClick(Sender: TObject); +begin + Memo.Undo; +end; + +procedure TCompileForm.ERedoClick(Sender: TObject); +begin + Memo.Redo; +end; + +procedure TCompileForm.ECutClick(Sender: TObject); +begin + Memo.CutToClipboard; +end; + +procedure TCompileForm.ECopyClick(Sender: TObject); +begin + Memo.CopyToClipboard; +end; + +procedure TCompileForm.EPasteClick(Sender: TObject); +begin + Memo.PasteFromClipboard; +end; + +procedure TCompileForm.EDeleteClick(Sender: TObject); +begin + Memo.ClearSelection; +end; + +procedure TCompileForm.ESelectAllClick(Sender: TObject); +begin + Memo.SelectAll; +end; + +procedure TCompileForm.ECompleteWordClick(Sender: TObject); +begin + InitiateAutoComplete(#0); +end; + +procedure TCompileForm.VMenuClick(Sender: TObject); +begin + VZoomIn.Enabled := (Memo.Zoom < 20); + VZoomOut.Enabled := (Memo.Zoom > -10); + VZoomReset.Enabled := (Memo.Zoom <> 0); + VToolbar.Checked := ToolbarPanel.Visible; + VStatusBar.Checked := StatusBar.Visible; + VHide.Checked := not StatusPanel.Visible; + VCompilerOutput.Checked := StatusPanel.Visible and (TabSet.TabIndex = tiCompilerOutput); + VDebugOutput.Checked := StatusPanel.Visible and (TabSet.TabIndex = tiDebugOutput); +end; + +procedure TCompileForm.VZoomInClick(Sender: TObject); +begin + Memo.ZoomIn; +end; + +procedure TCompileForm.VZoomOutClick(Sender: TObject); +begin + Memo.ZoomOut; +end; + +procedure TCompileForm.VZoomResetClick(Sender: TObject); +begin + Memo.Zoom := 0; +end; + +procedure TCompileForm.VToolbarClick(Sender: TObject); +begin + ToolbarPanel.Visible := not ToolbarPanel.Visible; +end; + +procedure TCompileForm.VStatusBarClick(Sender: TObject); +begin + StatusBar.Visible := not StatusBar.Visible; +end; + +procedure TCompileForm.SetStatusPanelVisible(const AVisible: Boolean); +var + CaretWasInView: Boolean; +begin + if StatusPanel.Visible <> AVisible then begin + CaretWasInView := Memo.IsPositionInViewVertically(Memo.CaretPosition); + if AVisible then begin + { Ensure the status panel height isn't out of range before showing } + UpdateStatusPanelHeight(StatusPanel.Height); + SplitPanel.Top := ClientHeight; + StatusPanel.Top := ClientHeight; + end + else begin + if StatusPanel.ContainsControl(ActiveControl) then + ActiveControl := Memo; + end; + SplitPanel.Visible := AVisible; + StatusPanel.Visible := AVisible; + if AVisible and CaretWasInView then begin + { If the caret was in view, make sure it still is } + Memo.ScrollCaretIntoView; + end; + end; +end; + +procedure TCompileForm.VHideClick(Sender: TObject); +begin + SetStatusPanelVisible(False); +end; + +procedure TCompileForm.VCompilerOutputClick(Sender: TObject); +begin + TabSet.TabIndex := tiCompilerOutput; + SetStatusPanelVisible(True); +end; + +procedure TCompileForm.VDebugOutputClick(Sender: TObject); +begin + TabSet.TabIndex := tiDebugOutput; + SetStatusPanelVisible(True); +end; + +procedure TCompileForm.BMenuClick(Sender: TObject); +begin + BLowPriority.Checked := FOptions.LowPriorityDuringCompile; + BOpenOutputFolder.Enabled := (FCompiledExe <> ''); +end; + +procedure TCompileForm.BCompileClick(Sender: TObject); +begin + CompileFile('', False); +end; + +procedure TCompileForm.BStopCompileClick(Sender: TObject); +begin + SetAppTaskbarProgressState(tpsPaused); + try + if MsgBox('Are you sure you want to abort the compile?', SCompilerFormCaption, + mbConfirmation, MB_YESNO or MB_DEFBUTTON2) <> IDNO then + FCompileWantAbort := True; + finally + SetAppTaskbarProgressState(tpsNormal); + end; +end; + +procedure TCompileForm.BLowPriorityClick(Sender: TObject); +begin + FOptions.LowPriorityDuringCompile := not FOptions.LowPriorityDuringCompile; + { If a compile is already in progress, change the priority now } + if FCompiling then + SetLowPriority(FOptions.LowPriorityDuringCompile); +end; + +procedure TCompileForm.BOpenOutputFolderClick(Sender: TObject); +var + Dir: String; +begin + Dir := GetWinDir; + ShellExecute(Application.Handle, 'open', PChar(AddBackslash(Dir) + 'explorer.exe'), + PChar(Format('/select,"%s"', [FCompiledExe])), PChar(Dir), SW_SHOW); +end; + +procedure TCompileForm.HMenuClick(Sender: TObject); +begin + HISPPDoc.Visible := NewFileExists(PathExtractPath(NewParamStr(0)) + 'ispp.chm'); + HISPPSep.Visible := HISPPDoc.Visible; +end; + +function GetHelpFile: String; +begin + Result := PathExtractPath(NewParamStr(0)) + 'isetup.chm'; +end; + +procedure TCompileForm.HDocClick(Sender: TObject); +var + HelpFile: String; +begin + HelpFile := GetHelpFile; + if Assigned(HtmlHelp) then + HtmlHelp(GetDesktopWindow, PChar(HelpFile), HH_DISPLAY_TOPIC, 0); +end; + +procedure TCompileForm.MemoKeyDown(Sender: TObject; var Key: Word; + Shift: TShiftState); +var + S, HelpFile: String; + KLink: THH_AKLINK; +begin + if Key = VK_F1 then begin + HelpFile := GetHelpFile; + if Assigned(HtmlHelp) then begin + HtmlHelp(GetDesktopWindow, PChar(HelpFile), HH_DISPLAY_TOPIC, 0); + S := Memo.WordAtCursor; + if S <> '' then begin + FillChar(KLink, SizeOf(KLink), 0); + KLink.cbStruct := SizeOf(KLink); + KLink.pszKeywords := PChar(S); + KLink.fIndexOnFail := True; + HtmlHelp(GetDesktopWindow, PChar(HelpFile), HH_KEYWORD_LOOKUP, DWORD(@KLink)); + end; + end; + end + else if (Key = VK_RIGHT) and (Shift * [ssShift, ssAlt, ssCtrl] = [ssAlt]) then begin + InitiateAutoComplete(#0); + Key := 0; + end; +end; + +procedure TCompileForm.MemoKeyPress(Sender: TObject; var Key: Char); +begin + if (Key = ' ') and (GetKeyState(VK_CONTROL) < 0) then begin + InitiateAutoComplete(#0); + Key := #0; + end; +end; + +procedure TCompileForm.HExamplesClick(Sender: TObject); +begin + ShellExecute(Application.Handle, 'open', + PChar(PathExtractPath(NewParamStr(0)) + 'Examples'), nil, nil, SW_SHOW); +end; + +procedure TCompileForm.HFaqClick(Sender: TObject); +begin + ShellExecute(Application.Handle, 'open', + PChar(PathExtractPath(NewParamStr(0)) + 'isfaq.htm'), nil, nil, SW_SHOW); +end; + +procedure TCompileForm.HWhatsNewClick(Sender: TObject); +begin + ShellExecute(Application.Handle, 'open', + PChar(PathExtractPath(NewParamStr(0)) + 'whatsnew.htm'), nil, nil, SW_SHOW); +end; + +procedure TCompileForm.HWebsiteClick(Sender: TObject); +begin + ShellExecute(Application.Handle, 'open', 'http://www.innosetup.com/', nil, + nil, SW_SHOW); +end; + +procedure TCompileForm.HPSWebsiteClick(Sender: TObject); +begin + ShellExecute(Application.Handle, 'open', 'http://www.remobjects.com/ps', nil, + nil, SW_SHOW); +end; + +procedure TCompileForm.HISPPDocClick(Sender: TObject); +begin + if Assigned(HtmlHelp) then + HtmlHelp(GetDesktopWindow, PChar(GetHelpFile + '::/hh_isppredirect.xhtm'), HH_DISPLAY_TOPIC, 0); +end; + +procedure TCompileForm.HDonateClick(Sender: TObject); +begin + ShellExecute(Application.Handle, 'open', 'http://www.jrsoftware.org/isdonate.php', nil, + nil, SW_SHOW); +end; + +procedure TCompileForm.HAboutClick(Sender: TObject); +var + S: String; +begin + { Removing the About box or modifying any existing text inside it is a + violation of the Inno Setup license agreement; see LICENSE.TXT. + However, adding additional lines to the About box is permitted, as long as + they are placed below the original copyright notice. } + S := FCompilerVersion.Title + ' Compiler version ' + + String(FCompilerVersion.Version) + SNewLine; + if FCompilerVersion.Title <> 'Inno Setup' then + S := S + (SNewLine + 'Based on Inno Setup' + SNewLine); + S := S + ('Copyright (C) 1997-2011 Jordan Russell' + SNewLine + + 'Portions Copyright (C) 2000-2011 Martijn Laan' + SNewLine + + 'All rights reserved.' + SNewLine2 + + 'Inno Setup home page:' + SNewLine + + 'http://www.innosetup.com/' + SNewLine2 + + 'RemObjects Pascal Script home page:' + SNewLine + + 'http://www.remobjects.com/ps' + SNewLine2 + + 'Refer to LICENSE.TXT for conditions of distribution and use.'); + MsgBox(S, 'About ' + FCompilerVersion.Title, mbInformation, MB_OK); +end; + +procedure TCompileForm.WMStartCommandLineCompile(var Message: TMessage); +var + Code: Integer; +begin + UpdateStatusPanelHeight(ClientHeight); + Code := 0; + try + try + CompileFile(CommandLineFilename, True); + except + Code := 2; + Application.HandleException(Self); + end; + finally + Halt(Code); + end; +end; + +procedure TCompileForm.WMStartCommandLineWizard(var Message: TMessage); +var + Code: Integer; +begin + Code := 0; + try + try + NewWizardFile; + except + Code := 2; + Application.HandleException(Self); + end; + finally + Halt(Code); + end; +end; + +procedure TCompileForm.WMStartNormally(var Message: TMessage); + + procedure ShowStartupForm; + var + StartupForm: TStartupForm; + Ini: TConfigIniFile; + begin + ReadMRUList; + StartupForm := TStartupForm.Create(Application); + try + StartupForm.MRUList := FMRUList; + StartupForm.StartupCheck.Checked := not FOptions.ShowStartupForm; + if StartupForm.ShowModal = mrOK then begin + if FOptions.ShowStartupForm <> not StartupForm.StartupCheck.Checked then begin + FOptions.ShowStartupForm := not StartupForm.StartupCheck.Checked; + Ini := TConfigIniFile.Create; + try + Ini.WriteBool('Options', 'ShowStartupForm', FOptions.ShowStartupForm); + finally + Ini.Free; + end; + end; + case StartupForm.Result of + srEmpty: + FNewClick(Self); + srWizard: + FNewWizardClick(Self); + srOpenFile: + if ConfirmCloseFile(True) then + OpenMRUFile(StartupForm.ResultFileName); + srOpenDialog: + ShowOpenDialog(False); + srOpenDialogExamples: + ShowOpenDialog(True); + end; + end; + finally + StartupForm.Free; + end; + end; + +begin + if CommandLineFilename = '' then begin + if FOptions.ShowStartupForm then + ShowStartupForm; + end else + OpenFile(CommandLineFilename, False); +end; + +procedure TCompileForm.InitializeFindText(Dlg: TFindDialog); +var + S: String; +begin + S := Memo.SelText; + if (S <> '') and (Pos(#13, S) = 0) and (Pos(#10, S) = 0) then + Dlg.FindText := S + else + Dlg.FindText := FLastFindText; +end; + +procedure TCompileForm.EFindClick(Sender: TObject); +begin + ReplaceDialog.CloseDialog; + if FindDialog.Handle = 0 then + InitializeFindText(FindDialog); + FindDialog.Execute; +end; + +procedure TCompileForm.EFindNextClick(Sender: TObject); +begin + if FLastFindText = '' then + EFindClick(Sender) + else + FindNext; +end; + +function FindOptionsToSearchOptions(const FindOptions: TFindOptions): TScintFindOptions; +begin + Result := []; + if frMatchCase in FindOptions then + Include(Result, sfoMatchCase); + if frWholeWord in FindOptions then + Include(Result, sfoWholeWord); +end; + +procedure TCompileForm.FindNext; +var + StartPos, EndPos: Integer; + Range: TScintRange; +begin + if frDown in FLastFindOptions then begin + StartPos := Memo.Selection.EndPos; + EndPos := Memo.RawTextLength; + end + else begin + StartPos := Memo.Selection.StartPos; + EndPos := 0; + end; + if Memo.FindText(StartPos, EndPos, FLastFindText, + FindOptionsToSearchOptions(FLastFindOptions), Range) then + Memo.Selection := Range + else + MsgBoxFmt('Cannot find "%s"', [FLastFindText], SCompilerFormCaption, + mbInformation, MB_OK); +end; + +procedure TCompileForm.FindDialogFind(Sender: TObject); +begin + { this event handler is shared between FindDialog & ReplaceDialog } + with Sender as TFindDialog do begin + { Save a copy of the current text so that InitializeFindText doesn't + mess up the operation of Edit | Find Next } + FLastFindOptions := Options; + FLastFindText := FindText; + end; + FindNext; +end; + +procedure TCompileForm.EReplaceClick(Sender: TObject); +begin + FindDialog.CloseDialog; + if ReplaceDialog.Handle = 0 then begin + InitializeFindText(ReplaceDialog); + ReplaceDialog.ReplaceText := FLastReplaceText; + end; + ReplaceDialog.Execute; +end; + +procedure TCompileForm.ReplaceDialogReplace(Sender: TObject); +var + ReplaceCount, Pos: Integer; + Range, NewRange: TScintRange; +begin + FLastFindOptions := ReplaceDialog.Options; + FLastFindText := ReplaceDialog.FindText; + FLastReplaceText := ReplaceDialog.ReplaceText; + + if frReplaceAll in FLastFindOptions then begin + ReplaceCount := 0; + Memo.BeginUndoAction; + try + Pos := 0; + while Memo.FindText(Pos, Memo.RawTextLength, FLastFindText, + FindOptionsToSearchOptions(FLastFindOptions), Range) do begin + NewRange := Memo.ReplaceTextRange(Range.StartPos, Range.EndPos, FLastReplaceText); + Pos := NewRange.EndPos; + Inc(ReplaceCount); + end; + finally + Memo.EndUndoAction; + end; + if ReplaceCount = 0 then + MsgBoxFmt('Cannot find "%s"', [FLastFindText], SCompilerFormCaption, + mbInformation, MB_OK) + else + MsgBoxFmt('%d occurrence(s) replaced.', [ReplaceCount], SCompilerFormCaption, + mbInformation, MB_OK); + end + else begin + if Memo.SelTextEquals(FLastFindText, frMatchCase in FLastFindOptions) then + Memo.SelText := FLastReplaceText; + FindNext; + end; +end; + +procedure TCompileForm.UpdateStatusPanelHeight(H: Integer); +var + MinHeight, MaxHeight: Integer; +begin + MinHeight := (3 * DebugOutputList.ItemHeight + 4) + + SpacerPaintBox.Height + TabSet.Height; + MaxHeight := BodyPanel.ClientHeight - 48 - SplitPanel.Height; + if H > MaxHeight then H := MaxHeight; + if H < MinHeight then H := MinHeight; + StatusPanel.Height := H; +end; + +procedure TCompileForm.SplitPanelMouseMove(Sender: TObject; + Shift: TShiftState; X, Y: Integer); +begin + if (ssLeft in Shift) and StatusPanel.Visible then begin + UpdateStatusPanelHeight(BodyPanel.ClientToScreen(Point(0, 0)).Y - + SplitPanel.ClientToScreen(Point(0, Y)).Y + + BodyPanel.ClientHeight - (SplitPanel.Height div 2)); + end; +end; + +procedure TCompileForm.TAddRemoveProgramsClick(Sender: TObject); +var + Dir: String; + Wow64DisableWow64FsRedirectionFunc: function(var OldValue: Pointer): BOOL; stdcall; + Wow64RevertWow64FsRedirectionFunc: function(OldValue: Pointer): BOOL; stdcall; + RedirDisabled: Boolean; + RedirOldValue: Pointer; + StartupInfo: TStartupInfo; + ProcessInfo: TProcessInformation; +begin + if Win32Platform = VER_PLATFORM_WIN32_NT then + Dir := GetSystemDir + else + Dir := GetWinDir; + + FillChar(StartupInfo, SizeOf(StartupInfo), 0); + StartupInfo.cb := SizeOf(StartupInfo); + { Have to disable file system redirection because the 32-bit version of + appwiz.cpl is buggy on XP x64 RC2 -- it doesn't show any Change/Remove + buttons on 64-bit MSI entries, and it doesn't list non-MSI 64-bit apps + at all. } + Wow64DisableWow64FsRedirectionFunc := GetProcAddress(GetModuleHandle(kernel32), + 'Wow64DisableWow64FsRedirection'); + Wow64RevertWow64FsRedirectionFunc := GetProcAddress(GetModuleHandle(kernel32), + 'Wow64RevertWow64FsRedirection'); + RedirDisabled := Assigned(Wow64DisableWow64FsRedirectionFunc) and + Assigned(Wow64RevertWow64FsRedirectionFunc) and + Wow64DisableWow64FsRedirectionFunc(RedirOldValue); + try + Win32Check(CreateProcess(nil, PChar('"' + AddBackslash(Dir) + 'control.exe" appwiz.cpl'), + nil, nil, False, 0, nil, PChar(Dir), StartupInfo, ProcessInfo)); + finally + if RedirDisabled then + Wow64RevertWow64FsRedirectionFunc(RedirOldValue); + end; + CloseHandle(ProcessInfo.hProcess); + CloseHandle(ProcessInfo.hThread); +end; + +procedure TCompileForm.TGenerateGUIDClick(Sender: TObject); +begin + if MsgBox('The generated GUID will be inserted into the editor at the cursor position. Continue?', + SCompilerFormCaption, mbConfirmation, MB_YESNO) = IDYES then + Memo.SelText := GenerateGuid; +end; + +procedure TCompileForm.TSignToolsClick(Sender: TObject); +var + SignToolsForm: TSignToolsForm; + Ini: TConfigIniFile; + I: Integer; +begin + SignToolsForm := TSignToolsForm.Create(Application); + try + SignToolsForm.SignTools := FSignTools; + + if SignToolsForm.ShowModal <> mrOK then + Exit; + + FSignTools.Assign(SignToolsForm.SignTools); + + { Save new options } + Ini := TConfigIniFile.Create; + try + Ini.EraseSection('SignTools'); + for I := 0 to FSignTools.Count-1 do + Ini.WriteString('SignTools', 'SignTool' + IntToStr(I), FSignTools[I]); + finally + Ini.Free; + end; + finally + SignToolsForm.Free; + end; +end; + +procedure TCompileForm.TOptionsClick(Sender: TObject); +var + OptionsForm: TOptionsForm; + Ini: TConfigIniFile; +begin + OptionsForm := TOptionsForm.Create(Application); + try + OptionsForm.StartupCheck.Checked := FOptions.ShowStartupForm; + OptionsForm.WizardCheck.Checked := FOptions.UseWizard; + OptionsForm.AutosaveCheck.Checked := FOptions.Autosave; + OptionsForm.BackupCheck.Checked := FOptions.MakeBackups; + OptionsForm.FullPathCheck.Checked := FOptions.FullPathInTitleBar; + OptionsForm.UndoAfterSaveCheck.Checked := FOptions.UndoAfterSave; + OptionsForm.PauseOnDebuggerExceptionsCheck.Checked := FOptions.PauseOnDebuggerExceptions; + OptionsForm.RunAsDifferentUserCheck.Checked := FOptions.RunAsDifferentUser; + OptionsForm.AutoCompleteCheck.Checked := FOptions.AutoComplete; + OptionsForm.UseSynHighCheck.Checked := FOptions.UseSyntaxHighlighting; + OptionsForm.UnderlineErrorsCheck.Checked := FOptions.UnderlineErrors; + OptionsForm.CursorPastEOLCheck.Checked := FOptions.CursorPastEOL; + OptionsForm.TabWidthEdit.Text := IntToStr(FOptions.TabWidth); + OptionsForm.UseTabCharacterCheck.Checked := FOptions.UseTabCharacter; + OptionsForm.WordWrapCheck.Checked := FOptions.WordWrap; + OptionsForm.AutoIndentCheck.Checked := FOptions.AutoIndent; + OptionsForm.IndentationGuidesCheck.Checked := FOptions.IndentationGuides; + OptionsForm.FontPanel.Font.Assign(Memo.Font); + + if OptionsForm.ShowModal <> mrOK then + Exit; + + FOptions.ShowStartupForm := OptionsForm.StartupCheck.Checked; + FOptions.UseWizard := OptionsForm.WizardCheck.Checked; + FOptions.Autosave := OptionsForm.AutosaveCheck.Checked; + FOptions.MakeBackups := OptionsForm.BackupCheck.Checked; + FOptions.FullPathInTitleBar := OptionsForm.FullPathCheck.Checked; + FOptions.UndoAfterSave := OptionsForm.UndoAfterSaveCheck.Checked; + FOptions.PauseOnDebuggerExceptions := OptionsForm.PauseOnDebuggerExceptionsCheck.Checked; + FOptions.RunAsDifferentUser := OptionsForm.RunAsDifferentUserCheck.Checked; + FOptions.AutoComplete := OptionsForm.AutoCompleteCheck.Checked; + FOptions.UseSyntaxHighlighting := OptionsForm.UseSynHighCheck.Checked; + FOptions.UnderlineErrors := OptionsForm.UnderlineErrorsCheck.Checked; + FOptions.CursorPastEOL := OptionsForm.CursorPastEOLCheck.Checked; + FOptions.TabWidth := StrToInt(OptionsForm.TabWidthEdit.Text); + FOptions.UseTabCharacter := OptionsForm.UseTabCharacterCheck.Checked; + FOptions.WordWrap := OptionsForm.WordWrapCheck.Checked; + FOptions.AutoIndent := OptionsForm.AutoIndentCheck.Checked; + FOptions.IndentationGuides := OptionsForm.IndentationGuidesCheck.Checked; + UpdateCaption; + { Move caret to start of line to ensure it doesn't end up in the middle + of a double-byte character if the code page changes from SBCS to DBCS } + Memo.CaretLine := Memo.CaretLine; + Memo.Font.Assign(OptionsForm.FontPanel.Font); + SyncEditorOptions; + UpdateNewButtons; + + { Save new options } + Ini := TConfigIniFile.Create; + try + Ini.WriteBool('Options', 'ShowStartupForm', FOptions.ShowStartupForm); + Ini.WriteBool('Options', 'UseWizard', FOptions.UseWizard); + Ini.WriteBool('Options', 'Autosave', FOptions.Autosave); + Ini.WriteBool('Options', 'MakeBackups', FOptions.MakeBackups); + Ini.WriteBool('Options', 'FullPathInTitleBar', FOptions.FullPathInTitleBar); + Ini.WriteBool('Options', 'UndoAfterSave', FOptions.UndoAfterSave); + Ini.WriteBool('Options', 'PauseOnDebuggerExceptions', FOptions.PauseOnDebuggerExceptions); + Ini.WriteBool('Options', 'RunAsDifferentUser', FOptions.RunAsDifferentUser); + Ini.WriteBool('Options', 'AutoComplete', FOptions.AutoComplete); + Ini.WriteBool('Options', 'UseSynHigh', FOptions.UseSyntaxHighlighting); + Ini.WriteBool('Options', 'UnderlineErrors', FOptions.UnderlineErrors); + Ini.WriteBool('Options', 'EditorCursorPastEOL', FOptions.CursorPastEOL); + Ini.WriteInteger('Options', 'TabWidth', FOptions.TabWidth); + Ini.WriteBool('Options', 'UseTabCharacter', FOptions.UseTabCharacter); + Ini.WriteBool('Options', 'WordWrap', FOptions.WordWrap); + Ini.WriteBool('Options', 'AutoIndent', FOptions.AutoIndent); + Ini.WriteBool('Options', 'IndentationGuides', FOptions.IndentationGuides); + Ini.WriteString('Options', 'EditorFontName', Memo.Font.Name); + Ini.WriteInteger('Options', 'EditorFontSize', Memo.Font.Size); + Ini.WriteInteger('Options', 'EditorFontCharset', Memo.Font.Charset); + finally + Ini.Free; + end; + finally + OptionsForm.Free; + end; +end; + +procedure TCompileForm.MoveCaret(const LineNumber: Integer; + const AlwaysResetColumn: Boolean); +var + Pos: Integer; +begin + if AlwaysResetColumn or (Memo.CaretLine <> LineNumber) then + Pos := Memo.GetPositionFromLine(LineNumber) + else + Pos := Memo.CaretPosition; + + { If the line isn't in view, scroll so that it's in the center } + if not Memo.IsPositionInViewVertically(Pos) then + Memo.TopLine := Memo.GetVisibleLineFromDocLine(LineNumber) - + (Memo.LinesInWindow div 2); + + Memo.CaretPosition := Pos; + ActiveControl := Memo; +end; + +procedure TCompileForm.SetErrorLine(ALine: Integer); +var + OldLine: Integer; +begin + if FErrorLine <> ALine then begin + OldLine := FErrorLine; + FErrorLine := ALine; + if OldLine >= 0 then + UpdateLineMarkers(OldLine); + if FErrorLine >= 0 then begin + FErrorCaretPosition := Memo.CaretPosition; + UpdateLineMarkers(FErrorLine); + end; + end; +end; + +procedure TCompileForm.SetStepLine(ALine: Integer); +var + OldLine: Integer; +begin + if FStepLine <> ALine then begin + OldLine := FStepLine; + FStepLine := ALine; + if OldLine >= 0 then + UpdateLineMarkers(OldLine); + if FStepLine >= 0 then + UpdateLineMarkers(FStepLine); + end; +end; + +procedure TCompileForm.HideError; +begin + SetErrorLine(-1); + if not FCompiling then + StatusBar.Panels[spExtraStatus].Text := ''; +end; + +procedure TCompileForm.UpdateEditModePanel; +const + InsertText: array[Boolean] of String = ('Overwrite', 'Insert'); +begin + if Memo.ReadOnly then + StatusBar.Panels[spInsertMode].Text := 'Read only' + else + StatusBar.Panels[spInsertMode].Text := InsertText[Memo.InsertMode]; +end; + +procedure TCompileForm.MemoUpdateUI(Sender: TObject); + + procedure UpdatePendingSquiggly; + var + Pos: Integer; + Value: Boolean; + begin + { Check for the inPendingSquiggly indicator on either side of the caret } + Pos := Memo.CaretPosition; + Value := False; + if Memo.CaretVirtualSpace = 0 then begin + Value := (inPendingSquiggly in Memo.GetIndicatorsAtPosition(Pos)); + if not Value and (Pos > 0) then + Value := (inPendingSquiggly in Memo.GetIndicatorsAtPosition(Pos-1)); + end; + if FOnPendingSquiggly <> Value then begin + FOnPendingSquiggly := Value; + { If caret has left a pending squiggly, force restyle of the line } + if not Value then begin + { Stop reporting the caret position to the styler (until the next + Change event) so the token doesn't re-enter pending-squiggly state + if the caret comes back and something restyles the line } + Memo.ReportCaretPositionToStyler := False; + Memo.RestyleLine(Memo.GetLineFromPosition(FPendingSquigglyCaretPos)); + end; + end; + FPendingSquigglyCaretPos := Pos; + end; + + procedure UpdateBraceHighlighting; + var + Section: TInnoSetupStylerSection; + Pos, MatchPos: Integer; + C: AnsiChar; + begin + Section := MemoStyler.GetSectionFromLineState(Memo.Lines.State[Memo.CaretLine]); + if (Section <> scNone) and (Memo.CaretVirtualSpace = 0) then begin + Pos := Memo.CaretPosition; + C := Memo.GetCharAtPosition(Pos); + if C in ['(', '[', '{'] then begin + MatchPos := Memo.GetPositionOfMatchingBrace(Pos); + if MatchPos >= 0 then begin + Memo.SetBraceHighlighting(Pos, MatchPos); + Exit; + end; + end; + if Pos > 0 then begin + Pos := Memo.GetPositionBefore(Pos); + C := Memo.GetCharAtPosition(Pos); + if C in [')', ']', '}'] then begin + MatchPos := Memo.GetPositionOfMatchingBrace(Pos); + if MatchPos >= 0 then begin + Memo.SetBraceHighlighting(Pos, MatchPos); + Exit; + end; + end; + end; + end; + Memo.SetBraceHighlighting(-1, -1); + end; + +begin + if (FErrorLine < 0) or (Memo.CaretPosition <> FErrorCaretPosition) then + HideError; + StatusBar.Panels[spCaretPos].Text := Format('%4d:%4d', [Memo.CaretLine + 1, + Memo.CaretColumnExpanded + 1]); + UpdatePendingSquiggly; + UpdateBraceHighlighting; + UpdateEditModePanel; +end; + +procedure TCompileForm.MemoModifiedChange(Sender: TObject); +begin + if Memo.Modified then + StatusBar.Panels[spModified].Text := 'Modified' + else + StatusBar.Panels[spModified].Text := ''; +end; + +procedure TCompileForm.MemoChange(Sender: TObject; const Info: TScintEditChangeInfo); + + procedure LinesInsertedOrDeleted; + var + FirstAffectedLine, Line, LinePos: Integer; + begin + Line := Memo.GetLineFromPosition(Info.StartPos); + LinePos := Memo.GetPositionFromLine(Line); + FirstAffectedLine := Line; + { If the deletion/insertion does not start on the first character of Line, + then we consider the first deleted/inserted line to be the following + line (Line+1). This way, if you press Del at the end of line 1, the dot + on line 2 is removed, while line 1's dot stays intact. } + if Info.StartPos > LinePos then + Inc(Line); + if Info.LinesDelta > 0 then + MemoLinesInserted(Line, Info.LinesDelta) + else + MemoLinesDeleted(Line, -Info.LinesDelta, FirstAffectedLine); + end; + +begin + FModifiedSinceLastCompile := True; + if FDebugging then + FModifiedSinceLastCompileAndGo := True + else begin + { Modified while not debugging; free the debug info and clear the dots } + DestroyDebugInfo; + end; + + if Info.LinesDelta <> 0 then + LinesInsertedOrDeleted; + + { When the Delete key is pressed, the caret doesn't move, so reset + FErrorCaretPosition to ensure that OnUpdateUI calls HideError } + FErrorCaretPosition := -1; + + { The change should trigger restyling. Allow the styler to see the current + caret position in case it wants to set a pending squiggly indicator. } + Memo.ReportCaretPositionToStyler := True; +end; + +procedure TCompileForm.InitiateAutoComplete(const Key: AnsiChar); +var + CaretPos, Line, LinePos, WordStartPos, WordEndPos, CharsBefore, I, + LangNamePos: Integer; + Section: TInnoSetupStylerSection; + IsParamSection: Boolean; + WordList: AnsiString; + FoundSemicolon, FoundDot: Boolean; + C: AnsiChar; +begin + if Memo.AutoCompleteActive or Memo.ReadOnly then + Exit; + + Memo.CaretPosition := Memo.CaretPosition; { clear any selection } + CaretPos := Memo.CaretPosition; + Line := Memo.GetLineFromPosition(CaretPos); + Section := MemoStyler.GetSectionFromLineState(Memo.Lines.State[Line]); + + WordList := MemoStyler.KeywordList[Section]; + if WordList = '' then + Exit; + IsParamSection := MemoStyler.IsParamSection(Section); + + LinePos := Memo.GetPositionFromLine(Line); + WordStartPos := Memo.GetWordStartPosition(CaretPos, True); + WordEndPos := Memo.GetWordEndPosition(CaretPos, True); + CharsBefore := CaretPos - WordStartPos; + + { Don't start autocompletion after a character is typed if there are any + word characters adjacent to the character } + if Key <> #0 then begin + if CharsBefore > 1 then + Exit; + if WordEndPos > CaretPos then + Exit; + end; + + { Only allow autocompletion if no non-whitespace characters exist before + the current word on the line, or after the last ';' in parameterized + sections } + FoundSemicolon := False; + FoundDot := False; + I := WordStartPos; + while I > LinePos do begin + I := Memo.GetPositionBefore(I); + if I < LinePos then + Exit; { shouldn't get here } + C := Memo.GetCharAtPosition(I); + { Make sure it's an stSymbol ';' and not one inside a quoted string } + if IsParamSection and (C = ';') and + MemoStyler.IsSymbolStyle(Memo.GetStyleAtPosition(I)) then begin + FoundSemicolon := True; + Break; + end; + if (Section = scLangOptions) and (C = '.') and not FoundDot then begin + { Verify that a word (language name) precedes the '.', then check for + any non-whitespace characters before the word } + LangNamePos := Memo.GetWordStartPosition(I, True); + if LangNamePos >= I then + Exit; + I := LangNamePos; + FoundDot := True; + end + else begin + if C > ' ' then + Exit; + end; + end; + { Space can only initiate autocompletion after a semicolon in a + parameterized section } + if (Key = ' ') and not FoundSemicolon then + Exit; + + if IsParamSection then + Memo.SetAutoCompleteFillupChars(':') + else + Memo.SetAutoCompleteFillupChars('='); + Memo.ShowAutoComplete(CharsBefore, WordList); +end; + +procedure TCompileForm.MemoCharAdded(Sender: TObject; Ch: AnsiChar); + + function LineIsBlank(const Line: Integer): Boolean; + var + S: TScintRawString; + I: Integer; + begin + S := Memo.Lines.RawLines[Line]; + for I := 1 to Length(S) do + if not(S[I] in [#9, ' ']) then begin + Result := False; + Exit; + end; + Result := True; + end; + +var + NewLine, PreviousLine, NewIndent, PreviousIndent: Integer; + RestartAutoComplete: Boolean; +begin + if FOptions.AutoIndent and (Ch = Memo.LineEndingString[Length(Memo.LineEndingString)]) then begin + { Add to the new line any (remaining) indentation from the previous line } + NewLine := Memo.CaretLine; + PreviousLine := NewLine-1; + if PreviousLine >= 0 then begin + NewIndent := Memo.GetLineIndentation(NewLine); + { If no indentation was moved from the previous line to the new line + (i.e., there are no spaces/tabs directly to the right of the new + caret position), and the previous line is completely empty (0 length), + then use the indentation from the last line containing non-space + characters. } + if (NewIndent = 0) and (Memo.Lines.RawLineLengths[PreviousLine] = 0) then begin + Dec(PreviousLine); + while (PreviousLine >= 0) and LineIsBlank(PreviousLine) do + Dec(PreviousLine); + end; + if PreviousLine >= 0 then begin + PreviousIndent := Memo.GetLineIndentation(PreviousLine); + { If virtual space is enabled, and tabs are not being used for + indentation (typing in virtual space doesn't create tabs), then we + don't actually have to set any indentation if the new line is + empty; we can just move the caret out into virtual space. } + if (svsUserAccessible in Memo.VirtualSpaceOptions) and + not Memo.UseTabCharacter and + (Memo.Lines.RawLineLengths[NewLine] = 0) then begin + Memo.CaretVirtualSpace := PreviousIndent; + end + else begin + Memo.SetLineIndentation(NewLine, NewIndent + PreviousIndent); + Memo.CaretPosition := Memo.GetPositionFromLineExpandedColumn(NewLine, + PreviousIndent); + end; + end; + end; + end; + + case Ch of + 'A'..'Z', 'a'..'z', '_': + if FOptions.AutoComplete then + InitiateAutoComplete(Ch); + else + RestartAutoComplete := (Ch in [' ', '.']) and + (FOptions.AutoComplete or Memo.AutoCompleteActive); + Memo.CancelAutoComplete; + if RestartAutoComplete then + InitiateAutoComplete(Ch); + end; +end; + +procedure TCompileForm.MemoHintShow(Sender: TObject; var Info: TScintHintInfo); + + function GetCodeVariableDebugEntryFromLineCol(Line, Col: Integer): PVariableDebugEntry; + var + I: Integer; + begin + { FVariableDebugEntries uses 1-based line and column numbers } + Inc(Line); + Inc(Col); + Result := nil; + for I := 0 to FVariableDebugEntriesCount-1 do begin + if (FVariableDebugEntries[I].LineNumber = Line) and + (FVariableDebugEntries[I].Col = Col) then begin + Result := @FVariableDebugEntries[I]; + Break; + end; + end; + end; + + function GetCodeColumnFromPosition(const Pos: Integer): Integer; +{$IFDEF UNICODE} + var + LinePos: Integer; + S: TScintRawString; + U: String; + begin + { On the Unicode build, [Code] lines get converted from the editor's + UTF-8 to UTF-16 Strings when passed to the compiler. This can lead to + column number discrepancies between Scintilla and ROPS. This code + simulates the conversion to try to find out where ROPS thinks a Pos + resides. } + LinePos := Memo.GetPositionFromLine(Memo.GetLineFromPosition(Pos)); + S := Memo.GetRawTextRange(LinePos, Pos); + U := Memo.ConvertRawStringToString(S); + Result := Length(U); + end; +{$ELSE} + begin + Result := Memo.GetColumnFromPosition(Pos); + end; +{$ENDIF} + + function FindConstRange(const Pos: Integer): TScintRange; + var + BraceLevel, ConstStartPos, Line, LineEndPos, I: Integer; + C: AnsiChar; + begin + Result.StartPos := 0; + Result.EndPos := 0; + BraceLevel := 0; + ConstStartPos := -1; + Line := Memo.GetLineFromPosition(Pos); + LineEndPos := Memo.GetLineEndPosition(Line); + I := Memo.GetPositionFromLine(Line); + while I < LineEndPos do begin + if (I > Pos) and (BraceLevel = 0) then + Break; + C := Memo.GetCharAtPosition(I); + if C = '{' then begin + if Memo.GetCharAtPosition(I + 1) = '{' then + Inc(I) + else begin + if BraceLevel = 0 then + ConstStartPos := I; + Inc(BraceLevel); + end; + end + else if (C = '}') and (BraceLevel > 0) then begin + Dec(BraceLevel); + if (BraceLevel = 0) and (ConstStartPos <> -1) then begin + if (Pos >= ConstStartPos) and (Pos <= I) then begin + Result.StartPos := ConstStartPos; + Result.EndPos := I + 1; + Exit; + end; + ConstStartPos := -1; + end; + end; + I := Memo.GetPositionAfter(I); + end; + end; + +var + Pos, Line, I, J: Integer; + Output: String; + DebugEntry: PVariableDebugEntry; + ConstRange: TScintRange; +begin + if FDebugClientWnd = 0 then + Exit; + Pos := Memo.GetPositionFromPoint(Info.CursorPos, True, True); + if Pos < 0 then + Exit; + Line := Memo.GetLineFromPosition(Pos); + + { Check if cursor is over a [Code] variable } + if MemoStyler.GetSectionFromLineState(Memo.Lines.State[Line]) = scCode then begin + { Note: The '+ 1' is needed so that when the mouse is over a '.' + between two words, it won't match the word to the left of the '.' } + I := Memo.GetWordStartPosition(Pos + 1, True); + J := Memo.GetWordEndPosition(Pos, True); + if J > I then begin + DebugEntry := GetCodeVariableDebugEntryFromLineCol(Line, + GetCodeColumnFromPosition(I)); + if DebugEntry <> nil then begin + case EvaluateVariableEntry(DebugEntry, Output) of + 1: Info.HintStr := Output; + 2: Info.HintStr := Output; + else + Info.HintStr := 'Unknown error'; + end; + Info.CursorRect.TopLeft := Memo.GetPointFromPosition(I); + Info.CursorRect.BottomRight := Memo.GetPointFromPosition(J); + Info.CursorRect.Bottom := Info.CursorRect.Top + Memo.LineHeight; + Info.HideTimeout := High(Integer); { infinite } + Exit; + end; + end; + end; + + { Check if cursor is over a constant } + ConstRange := FindConstRange(Pos); + if ConstRange.EndPos > ConstRange.StartPos then begin + Info.HintStr := Memo.GetTextRange(ConstRange.StartPos, ConstRange.EndPos); + case EvaluateConstant(Info.HintStr, Output) of + 1: Info.HintStr := Info.HintStr + ' = "' + Output + '"'; + 2: Info.HintStr := Info.HintStr + ' = Exception: ' + Output; + else + Info.HintStr := Info.HintStr + ' = Unknown error'; + end; + Info.CursorRect.TopLeft := Memo.GetPointFromPosition(ConstRange.StartPos); + Info.CursorRect.BottomRight := Memo.GetPointFromPosition(ConstRange.EndPos); + Info.CursorRect.Bottom := Info.CursorRect.Top + Memo.LineHeight; + Info.HideTimeout := High(Integer); { infinite } + end; +end; + +procedure TCompileForm.MemoDropFiles(Sender: TObject; X, Y: Integer; + AFiles: TStrings); +begin + if (AFiles.Count > 0) and ConfirmCloseFile(True) then + OpenFile(AFiles[0], True); +end; + +procedure TCompileForm.StatusBarResize(Sender: TObject); +begin + { Without this, on Windows XP with themes, the status bar's size grip gets + corrupted as the form is resized } + if StatusBar.HandleAllocated then + InvalidateRect(StatusBar.Handle, nil, True); +end; + +procedure TCompileForm.WMDebuggerQueryVersion(var Message: TMessage); +begin + Message.Result := FCompilerVersion.BinVersion; +end; + +procedure TCompileForm.WMDebuggerHello(var Message: TMessage); +var + PID: DWORD; + WantCodeText: Boolean; +begin + FDebugClientWnd := HWND(Message.WParam); + + { Save debug client process handle } + if FDebugClientProcessHandle <> 0 then begin + { Shouldn't get here, but just in case, don't leak a handle } + CloseHandle(FDebugClientProcessHandle); + FDebugClientProcessHandle := 0; + end; + PID := 0; + if GetWindowThreadProcessId(FDebugClientWnd, @PID) <> 0 then + FDebugClientProcessHandle := OpenProcess(SYNCHRONIZE or PROCESS_TERMINATE, + False, PID); + + WantCodeText := Bool(Message.LParam); + if WantCodeText then + SendCopyDataMessageStr(FDebugClientWnd, Handle, CD_DebugClient_CompiledCodeTextA, FCompiledCodeText); + SendCopyDataMessageStr(FDebugClientWnd, Handle, CD_DebugClient_CompiledCodeDebugInfoA, FCompiledCodeDebugInfo); + + UpdateRunMenu; +end; + +procedure TCompileForm.WMDebuggerGoodbye(var Message: TMessage); +begin + ReplyMessage(0); + DebuggingStopped(True); +end; + +function TCompileForm.GetLineNumberFromEntry(Kind, Index: Integer): Integer; +var + I: Integer; +begin + Result := -1; + for I := 0 to FDebugEntriesCount-1 do begin + if (FDebugEntries[I].Kind = Kind) and + (FDebugEntries[I].Index = Index) then begin + Result := FDebugEntries[I].LineNumber; + Break; + end; + end; +end; + +procedure TCompileForm.BringToForeground; +{ Brings our top window to the foreground. Called when pausing while + debugging. } +var + TopWindow: HWND; +begin + TopWindow := GetThreadTopWindow; + if TopWindow <> 0 then begin + { First ask the debug client to call SetForegroundWindow() on our window. + If we don't do this then Windows (98/2000+) will prevent our window from + becoming activated if the debug client is currently in the foreground. } + SendMessage(FDebugClientWnd, WM_DebugClient_SetForegroundWindow, + WPARAM(TopWindow), 0); + { Now call SetForegroundWindow() ourself. Why? When a remote thread calls + SetForegroundWindow(), the request is queued; the window doesn't actually + become active until the next time the window's thread checks the message + queue. This call causes the window to become active immediately. } + SetForegroundWindow(TopWindow); + end; +end; + +procedure TCompileForm.DebuggerStepped(var Message: TMessage; const Intermediate: Boolean); +var + LineNumber: Integer; +begin + LineNumber := GetLineNumberFromEntry(Message.WParam, Message.LParam); + if LineNumber < 0 then + Exit; + + if (LineNumber < FLineStateCount) and + (FLineState[LineNumber] <> lnEntryProcessed) then begin + FLineState[LineNumber] := lnEntryProcessed; + UpdateLineMarkers(LineNumber); + end; + + if (FStepMode = smStepInto) or + ((FStepMode = smStepOver) and not Intermediate) or + ((FStepMode = smRunToCursor) and + (FRunToCursorPoint.Kind = Message.WParam) and + (FRunToCursorPoint.Index = Message.LParam)) or + (FBreakPoints.IndexOf(Pointer(LineNumber)) <> -1) then begin + MoveCaret(LineNumber, True); + HideError; + SetStepLine(LineNumber); + BringToForeground; + { Tell Setup to pause } + Message.Result := 1; + FPaused := True; + UpdateRunMenu; + UpdateCaption; + end; +end; + +procedure TCompileForm.WMDebuggerStepped(var Message: TMessage); +begin + DebuggerStepped(Message, False); +end; + +procedure TCompileForm.WMDebuggerSteppedIntermediate(var Message: TMessage); +begin + DebuggerStepped(Message, True); +end; + +procedure TCompileForm.WMDebuggerException(var Message: TMessage); +var + LineNumber: Integer; +begin + if FOptions.PauseOnDebuggerExceptions then begin + LineNumber := GetLineNumberFromEntry(Message.WParam, Message.LParam); + + if (LineNumber >= 0) then begin + MoveCaret(LineNumber, True); + SetStepLine(-1); + SetErrorLine(LineNumber); + end; + + BringToForeground; + { Tell Setup to pause } + Message.Result := 1; + FPaused := True; + UpdateRunMenu; + UpdateCaption; + + ReplyMessage(Message.Result); { so that Setup enters a paused state now } + if LineNumber >= 0 then + MsgBox(Format('Line %d:' + SNewLine + '%s.', [LineNumber + 1, FDebuggerException]), 'Runtime Error', mbCriticalError, mb_Ok) + else + MsgBox(FDebuggerException + '.', 'Runtime Error', mbCriticalError, mb_Ok); + end; +end; + +procedure TCompileForm.WMDebuggerSetForegroundWindow(var Message: TMessage); +begin + SetForegroundWindow(HWND(Message.WParam)); +end; + +procedure TCompileForm.WMCopyData(var Message: TWMCopyData); +var + S: String; +begin + case Message.CopyDataStruct.dwData of + CD_Debugger_ReplyW: begin + FReplyString := ''; + SetString(FReplyString, PChar(Message.CopyDataStruct.lpData), + Message.CopyDataStruct.cbData div SizeOf(Char)); + Message.Result := 1; + end; + CD_Debugger_ExceptionW: begin + SetString(FDebuggerException, PChar(Message.CopyDataStruct.lpData), + Message.CopyDataStruct.cbData div SizeOf(Char)); + Message.Result := 1; + end; + CD_Debugger_UninstExeW: begin + SetString(FUninstExe, PChar(Message.CopyDataStruct.lpData), + Message.CopyDataStruct.cbData div sizeOf(Char)); + Message.Result := 1; + end; + CD_Debugger_LogMessageW: begin + SetString(S, PChar(Message.CopyDataStruct.lpData), + Message.CopyDataStruct.cbData div SizeOf(Char)); + DebugLogMessage(S); + Message.Result := 1; + end; + CD_Debugger_TempDirW: begin + { Paranoia: Store it in a local variable first. That way, if there's + a problem reading the string FTempDir will be left unmodified. + Gotta be extra careful when storing a path we'll be deleting. } + SetString(S, PChar(Message.CopyDataStruct.lpData), + Message.CopyDataStruct.cbData div SizeOf(Char)); + { Extreme paranoia: If there are any embedded nulls, discard it. } + if Pos(#0, S) <> 0 then + S := ''; + FTempDir := S; + Message.Result := 1; + end; + end; +end; + +procedure TCompileForm.DestroyDebugInfo; +var + HadDebugInfo: Boolean; +begin + HadDebugInfo := Assigned(FLineState); + + FLineStateCapacity := 0; + FLineStateCount := 0; + FreeMem(FLineState); + FLineState := nil; + + FDebugEntriesCount := 0; + FreeMem(FDebugEntries); + FDebugEntries := nil; + + FVariableDebugEntriesCount := 0; + FreeMem(FVariableDebugEntries); + FVariableDebugEntries := nil; + + FCompiledCodeText := ''; + FCompiledCodeDebugInfo := ''; + + { Clear all dots and reset breakpoint icons (unless exiting; no point) } + if HadDebugInfo and not(csDestroying in ComponentState) then + UpdateAllLineMarkers; +end; + +procedure TCompileForm.ParseDebugInfo(DebugInfo: Pointer); +{ This creates and fills the DebugEntries and FLineState arrays } +var + Header: PDebugInfoHeader; + Size: Cardinal; + I: Integer; +begin + DestroyDebugInfo; + + Header := DebugInfo; + if (Header.ID <> DebugInfoHeaderID) or + (Header.Version <> DebugInfoHeaderVersion) then + raise Exception.Create('Unrecognized debug info format'); + + try + I := Memo.Lines.Count; + FLineState := AllocMem(SizeOf(TLineState) * (I + LineStateGrowAmount)); + FLineStateCapacity := I + LineStateGrowAmount; + FLineStateCount := I; + + Inc(Cardinal(DebugInfo), SizeOf(Header^)); + + FDebugEntriesCount := Header.DebugEntryCount; + Size := FDebugEntriesCount * SizeOf(TDebugEntry); + GetMem(FDebugEntries, Size); + Move(DebugInfo^, FDebugEntries^, Size); + for I := 0 to FDebugEntriesCount-1 do + Dec(FDebugEntries[I].LineNumber); + Inc(Cardinal(DebugInfo), Size); + + FVariableDebugEntriesCount := Header.VariableDebugEntryCount; + Size := FVariableDebugEntriesCount * SizeOf(TVariableDebugEntry); + GetMem(FVariableDebugEntries, Size); + Move(DebugInfo^, FVariableDebugEntries^, Size); + Inc(Cardinal(DebugInfo), Size); + + SetString(FCompiledCodeText, PAnsiChar(DebugInfo), Header.CompiledCodeTextLength); + Inc(Cardinal(DebugInfo), Header.CompiledCodeTextLength); + + SetString(FCompiledCodeDebugInfo, PAnsiChar(DebugInfo), Header.CompiledCodeDebugInfoLength); + + for I := 0 to FDebugEntriesCount-1 do begin + if (FDebugEntries[I].LineNumber >= 0) and + (FDebugEntries[I].LineNumber < FLineStateCount) then begin + if FLineState[FDebugEntries[I].LineNumber] = lnUnknown then + FLineState[FDebugEntries[I].LineNumber] := lnHasEntry; + end; + end; + UpdateAllLineMarkers; + except + DestroyDebugInfo; + raise; + end; +end; + +procedure TCompileForm.ResetLineState; +{ Changes green dots back to grey dots } +var + I: Integer; +begin + for I := 0 to FLineStateCount-1 do + if FLineState[I] = lnEntryProcessed then begin + FLineState[I] := lnHasEntry; + UpdateLineMarkers(I); + end; +end; + +procedure TCompileForm.CheckIfTerminated; +var + H: THandle; +begin + if FDebugging then begin + { Check if the process hosting the debug client (e.g. Setup or the + uninstaller second phase) has terminated. If the debug client hasn't + connected yet, check the initial process (e.g. SetupLdr or the + uninstaller first phase) instead. } + if FDebugClientWnd <> 0 then + H := FDebugClientProcessHandle + else + H := FProcessHandle; + if WaitForSingleObject(H, 0) <> WAIT_TIMEOUT then + DebuggingStopped(True); + end; +end; + +procedure TCompileForm.DebuggingStopped(const WaitForTermination: Boolean); + + function GetExitCodeText: String; + var + ExitCode: DWORD; + begin + { Note: When debugging an uninstall, this will get the exit code off of + the first phase process, since that's the exit code users will see when + running the uninstaller outside the debugger. } + case WaitForSingleObject(FProcessHandle, 0) of + WAIT_OBJECT_0: + begin + if GetExitCodeProcess(FProcessHandle, ExitCode) then begin + { If the high bit is set, the process was killed uncleanly (e.g. + by a debugger). Show the exit code as hex in that case. } + if ExitCode and $80000000 <> 0 then + Result := Format(DebugTargetStrings[FDebugTarget] + ' exit code: 0x%.8x', [ExitCode]) + else + Result := Format(DebugTargetStrings[FDebugTarget] + ' exit code: %u', [ExitCode]); + end + else + Result := 'Unable to get ' + DebugTargetStrings[FDebugTarget] + ' exit code (GetExitCodeProcess failed)'; + end; + WAIT_TIMEOUT: + Result := DebugTargetStrings[FDebugTarget] + ' is still running; can''t get exit code'; + else + Result := 'Unable to get ' + DebugTargetStrings[FDebugTarget] + ' exit code (WaitForSingleObject failed)'; + end; + end; + +var + ExitCodeText: String; +begin + if WaitForTermination then begin + { Give the initial process time to fully terminate so we can successfully + get its exit code } + WaitForSingleObject(FProcessHandle, 5000); + end; + FDebugging := False; + FDebugClientWnd := 0; + ExitCodeText := GetExitCodeText; + if FDebugClientProcessHandle <> 0 then begin + CloseHandle(FDebugClientProcessHandle); + FDebugClientProcessHandle := 0; + end; + CloseHandle(FProcessHandle); + FProcessHandle := 0; + FTempDir := ''; + CheckIfRunningTimer.Enabled := False; + HideError; + SetStepLine(-1); + UpdateRunMenu; + UpdateCaption; + DebugLogMessage('*** ' + ExitCodeText); + StatusBar.Panels[spExtraStatus].Text := ' ' + ExitCodeText; +end; + +procedure TCompileForm.DetachDebugger; +begin + CheckIfTerminated; + if not FDebugging then Exit; + SendNotifyMessage(FDebugClientWnd, WM_DebugClient_Detach, 0, 0); + DebuggingStopped(False); +end; + +function TCompileForm.AskToDetachDebugger: Boolean; +begin + if FDebugClientWnd = 0 then begin + MsgBox('Please stop the running ' + DebugTargetStrings[FDebugTarget] + ' process before performing this command.', + SCompilerFormCaption, mbError, MB_OK); + Result := False; + end else if MsgBox('This command will detach the debugger from the running ' + DebugTargetStrings[FDebugTarget] + ' process. Continue?', + SCompilerFormCaption, mbError, MB_OKCANCEL) = IDOK then begin + DetachDebugger; + Result := True; + end else + Result := False; +end; + +procedure TCompileForm.UpdateRunMenu; +begin + CheckIfTerminated; + BCompile.Enabled := not FCompiling and not FDebugging; + CompileButton.Enabled := BCompile.Enabled; + BStopCompile.Enabled := FCompiling; + StopCompileButton.Enabled := BStopCompile.Enabled; + RRun.Enabled := not FCompiling and (not FDebugging or FPaused); + RunButton.Enabled := RRun.Enabled; + RPause.Enabled := FDebugging and not FPaused; + PauseButton.Enabled := RPause.Enabled; + RRunToCursor.Enabled := RRun.Enabled; + RStepInto.Enabled := RRun.Enabled; + RStepOver.Enabled := RRun.Enabled; + RTerminate.Enabled := FDebugging and (FDebugClientWnd <> 0); + REvaluate.Enabled := FDebugging and (FDebugClientWnd <> 0); +end; + +procedure TCompileForm.UpdateTargetMenu; +begin + if FDebugTarget = dtSetup then begin + RTargetSetup.Checked := True; + TargetSetupButton.Down := True; + end else begin + RTargetUninstall.Checked := True; + TargetUninstallButton.Down := True; + end; +end; + +procedure TCompileForm.UpdateThemeData(const Close, Open: Boolean); +begin + if Close then begin + if FProgressThemeData <> 0 then begin + CloseThemeData(FProgressThemeData); + FProgressThemeData := 0; + end; + end; + + if Open then begin + if UseThemes then begin + FProgressThemeData := OpenThemeData(Handle, 'Progress'); + if (GetThemeInt(FProgressThemeData, 0, 0, TMT_PROGRESSCHUNKSIZE, FProgressChunkSize) <> S_OK) or + (FProgressChunkSize <= 0) then + FProgressChunkSize := 6; + if (GetThemeInt(FProgressThemeData, 0, 0, TMT_PROGRESSSPACESIZE, FProgressSpaceSize) <> S_OK) or + (FProgressSpaceSize < 0) then { ...since "OpusOS" theme returns a bogus -1 value } + FProgressSpaceSize := 2; + end else + FProgressThemeData := 0; + end; +end; + +procedure TCompileForm.StartProcess; +const + SEE_MASK_NOZONECHECKS = $00800000; +var + RunFilename, RunParameters, WorkingDir: String; + Info: TShellExecuteInfo; + SaveFocusWindow: HWND; + WindowList: Pointer; + ShellExecuteResult: BOOL; + ErrorCode: DWORD; +begin + if FDebugTarget = dtUninstall then begin + if FUninstExe = '' then + raise Exception.Create(SCompilerNeedUninstExe); + RunFilename := FUninstExe; + end else + RunFilename := FCompiledExe; + RunParameters := Format('/DEBUGWND=$%x ', [Handle]) + FRunParameters; + + ResetLineState; + DebugOutputList.Clear; + SendMessage(DebugOutputList.Handle, LB_SETHORIZONTALEXTENT, 0, 0); + TabSet.TabIndex := tiDebugOutput; + SetStatusPanelVisible(True); + + FillChar(Info, SizeOf(Info), 0); + Info.cbSize := SizeOf(Info); + Info.fMask := SEE_MASK_FLAG_NO_UI or SEE_MASK_FLAG_DDEWAIT or + SEE_MASK_NOCLOSEPROCESS or SEE_MASK_NOZONECHECKS; + Info.Wnd := Application.Handle; + if FOptions.RunAsDifferentUser and (Win32MajorVersion >= 5) then + Info.lpVerb := 'runas' + else + Info.lpVerb := 'open'; + Info.lpFile := PChar(RunFilename); + Info.lpParameters := PChar(RunParameters); + WorkingDir := PathExtractDir(RunFilename); + Info.lpDirectory := PChar(WorkingDir); + Info.nShow := SW_SHOWNORMAL; + { Disable windows so that the user can't click other things while a "Run as" + dialog is up on Windows 2000/XP (they aren't system modal like on Vista) } + SaveFocusWindow := GetFocus; + WindowList := DisableTaskWindows(0); + try + { Also temporarily remove the focus since a disabled window's children can + still receive keystrokes. This is needed on Vista if the UAC dialog + doesn't come to the foreground for some reason (e.g. if the following + SetActiveWindow call is removed). } + Windows.SetFocus(0); + { On Vista, when disabling windows, we have to make the application window + the active window, otherwise the UAC dialog doesn't come to the + foreground automatically. Note: This isn't done on older versions simply + to avoid unnecessary title bar flicker. } + if Win32MajorVersion >= 6 then + SetActiveWindow(Application.Handle); + ShellExecuteResult := ShellExecuteEx(@Info); + ErrorCode := GetLastError; + finally + EnableTaskWindows(WindowList); + Windows.SetFocus(SaveFocusWindow); + end; + if not ShellExecuteResult then begin + { Don't display error message if user clicked Cancel at UAC dialog } + if ErrorCode = ERROR_CANCELLED then + Abort; + raise Exception.CreateFmt(SCompilerExecuteSetupError2, [RunFilename, + ErrorCode, Win32ErrorString(ErrorCode)]); + end; + FDebugging := True; + FPaused := False; + FProcessHandle := Info.hProcess; + CheckIfRunningTimer.Enabled := True; + UpdateRunMenu; + UpdateCaption; + DebugLogMessage('*** ' + DebugTargetStrings[FDebugTarget] + ' started'); +end; + +procedure TCompileForm.CompileIfNecessary; +begin + CheckIfTerminated; + + { Display warning if the user modified the script while running } + if FDebugging and FModifiedSinceLastCompileAndGo then begin + if MsgBox('The changes you made will not take effect until you ' + + 're-compile.' + SNewLine2 + 'Continue running anyway?', + SCompilerFormCaption, mbError, MB_YESNO) <> IDYES then + Abort; + FModifiedSinceLastCompileAndGo := False; + { The process may have terminated while the message box was up; check, + and if it has, we want to recompile below } + CheckIfTerminated; + end; + + if not FDebugging and FModifiedSinceLastCompile then + CompileFile('', False); +end; + +procedure TCompileForm.Go(AStepMode: TStepMode); +begin + CompileIfNecessary; + FStepMode := AStepMode; + HideError; + SetStepLine(-1); + if FDebugging then begin + if FPaused then begin + FPaused := False; + UpdateRunMenu; + UpdateCaption; + { Tell it to continue } + SendNotifyMessage(FDebugClientWnd, WM_DebugClient_Continue, + Ord(AStepMode = smStepOver), 0); + end; + end + else + StartProcess; +end; + +function TCompileForm.EvaluateConstant(const S: String; + var Output: String): Integer; +begin + FReplyString := ''; + Result := SendCopyDataMessageStr(FDebugClientWnd, Handle, + CD_DebugClient_EvaluateConstantW, S); + if Result > 0 then + Output := FReplyString; +end; + +function TCompileForm.EvaluateVariableEntry(const DebugEntry: PVariableDebugEntry; + var Output: String): Integer; +begin + FReplyString := ''; + Result := SendCopyDataMessage(FDebugClientWnd, Handle, CD_DebugClient_EvaluateVariableEntry, + DebugEntry, SizeOf(DebugEntry^)); + if Result > 0 then + Output := FReplyString; +end; + +procedure TCompileForm.RRunClick(Sender: TObject); +begin + Go(smRun); +end; + +procedure TCompileForm.RParametersClick(Sender: TObject); +begin + InputQuery('Run Parameters', 'Command line parameters for ' + DebugTargetStrings[dtSetup] + + ' and ' + DebugTargetStrings[dtUninstall] + ':', FRunParameters); +end; + +procedure TCompileForm.RPauseClick(Sender: TObject); +begin + if FDebugging and not FPaused then begin + if FStepMode <> smStepInto then begin + FStepMode := smStepInto; + UpdateCaption; + end + else + MsgBox('A pause is already pending.', SCompilerFormCaption, mbError, + MB_OK); + end; +end; + +procedure TCompileForm.RRunToCursorClick(Sender: TObject); + + function GetDebugEntryFromLineNumber(LineNumber: Integer; + var DebugEntry: TDebugEntry): Boolean; + var + I: Integer; + begin + Result := False; + for I := 0 to FDebugEntriesCount-1 do begin + if FDebugEntries[I].LineNumber = LineNumber then begin + DebugEntry := FDebugEntries[I]; + Result := True; + Break; + end; + end; + end; + +begin + CompileIfNecessary; + if not GetDebugEntryFromLineNumber(Memo.CaretLine, FRunToCursorPoint) then begin + MsgBox('No code was generated for the current line.', SCompilerFormCaption, + mbError, MB_OK); + Exit; + end; + Go(smRunToCursor); +end; + +procedure TCompileForm.RStepIntoClick(Sender: TObject); +begin + Go(smStepInto); +end; + +procedure TCompileForm.RStepOverClick(Sender: TObject); +begin + Go(smStepOver); +end; + +procedure TCompileForm.RTerminateClick(Sender: TObject); +var + S, Dir: String; +begin + S := 'This will unconditionally terminate the running ' + + DebugTargetStrings[FDebugTarget] + ' process. Continue?'; + + if FDebugTarget = dtSetup then + S := S + #13#10#13#10'Note that if ' + DebugTargetStrings[FDebugTarget] + ' ' + + 'is currently in the installation phase, any changes made to the ' + + 'system thus far will not be undone, nor will uninstall data be written.'; + + if MsgBox(S, 'Terminate', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) <> IDYES then + Exit; + CheckIfTerminated; + if FDebugging then begin + DebugLogMessage('*** Terminating process'); + Win32Check(TerminateProcess(FDebugClientProcessHandle, 6)); + if (WaitForSingleObject(FDebugClientProcessHandle, 5000) <> WAIT_TIMEOUT) and + (FTempDir <> '') then begin + Dir := FTempDir; + FTempDir := ''; + DebugLogMessage('*** Removing left-over temporary directory: ' + Dir); + { Sleep for a bit to allow files to be unlocked by Windows, + otherwise it fails intermittently (with Hyper-Threading, at least) } + Sleep(50); + if not DeleteDirTree(Dir) and DirExists(Dir) then + DebugLogMessage('*** Failed to remove temporary directory'); + end; + DebuggingStopped(True); + end; +end; + +procedure TCompileForm.REvaluateClick(Sender: TObject); +var + Output: String; +begin + if InputQuery('Evaluate', 'Constant to evaluate (e.g., "{app}"):', + FLastEvaluateConstantText) then begin + case EvaluateConstant(FLastEvaluateConstantText, Output) of + 1: MsgBox(Output, 'Evaluate Result', mbInformation, MB_OK); + 2: MsgBox(Output, 'Evaluate Error', mbError, MB_OK); + else + MsgBox('An unknown error occurred.', 'Evaluate Error', mbError, MB_OK); + end; + end; +end; + +procedure TCompileForm.CheckIfRunningTimerTimer(Sender: TObject); +begin + { In cases of normal Setup termination, we receive a WM_Debugger_Goodbye + message. But in case we don't get that, use a timer to periodically check + if the process is no longer running. } + CheckIfTerminated; +end; + +procedure TCompileForm.PListCopyClick(Sender: TObject); +begin + Clipboard.AsText := (ListPopupMenu.PopupComponent as TListBox).Items.Text; +end; + +procedure TCompileForm.AppOnIdle(Sender: TObject; var Done: Boolean); +begin + { For an explanation of this, see the comment where HandleMessage is called } + if FCompiling then + Done := False; + + FBecameIdle := True; +end; + +procedure TCompileForm.EGotoClick(Sender: TObject); +var + S: String; + L: Integer; +begin + S := IntToStr(Memo.CaretLine + 1); + if InputQuery('Go to Line', 'Line number:', S) then begin + L := StrToIntDef(S, Low(L)); + if L <> Low(L) then + Memo.CaretLine := L - 1; + end; +end; + +procedure TCompileForm.StatusBarDrawPanel(StatusBar: TStatusBar; + Panel: TStatusPanel; const Rect: TRect); +var + R, BR: TRect; + W, ChunkCount: Integer; +begin + case Panel.Index of + spCompileIcon: + if FCompiling then begin + ImageList_Draw(FBuildImageList, FBuildAnimationFrame, StatusBar.Canvas.Handle, + Rect.Left + ((Rect.Right - Rect.Left) - 17) div 2, + Rect.Top + ((Rect.Bottom - Rect.Top) - 15) div 2, ILD_NORMAL); + end; + spCompileProgress: + if FCompiling and (FProgressMax > 0) then begin + R := Rect; + InflateRect(R, -2, -2); + if FProgressThemeData = 0 then begin + R.Right := R.Left + MulDiv(FProgress, R.Right - R.Left, + FProgressMax); + StatusBar.Canvas.Brush.Color := clHighlight; + StatusBar.Canvas.FillRect(R); + end else begin + DrawThemeBackground(FProgressThemeData, StatusBar.Canvas.Handle, PP_BAR, 0, R, nil); + BR := R; + GetThemeBackgroundContentRect(FProgressThemeData, StatusBar.Canvas.Handle, PP_BAR, 0, BR, @R); + IntersectClipRect(StatusBar.Canvas.Handle, R.Left, R.Top, R.Right, R.Bottom); + W := MulDiv(FProgress, R.Right - R.Left, FProgressMax); + ChunkCount := W div (FProgressChunkSize + FProgressSpaceSize); + if W mod (FProgressChunkSize + FProgressSpaceSize) > 0 then + Inc(ChunkCount); + R.Right := R.Left + FProgressChunkSize; + for W := 0 to ChunkCount - 1 do + begin + DrawThemeBackground(FProgressThemeData, StatusBar.Canvas.Handle, PP_CHUNK, 0, R, nil); + OffsetRect(R, FProgressChunkSize + FProgressSpaceSize, 0); + end; + end; + end; + end; +end; + +procedure TCompileForm.InvalidateStatusPanel(const Index: Integer); +var + R: TRect; +begin + { For some reason, the VCL doesn't offer a method for this... } + if SendMessage(StatusBar.Handle, SB_GETRECT, Index, LPARAM(@R)) <> 0 then begin + InflateRect(R, -1, -1); + InvalidateRect(StatusBar.Handle, @R, True); + end; +end; + +procedure TCompileForm.UpdateCompileStatusPanels(const AProgress, + AProgressMax: Cardinal; const ASecondsRemaining: Integer; + const ABytesCompressedPerSecond: Cardinal); +var + T: DWORD; +begin + { Icon panel } + T := GetTickCount; + if Cardinal(T - FLastAnimationTick) >= Cardinal(500) then begin + FLastAnimationTick := T; + InvalidateStatusPanel(spCompileIcon); + FBuildAnimationFrame := (FBuildAnimationFrame + 1) mod 4; + { Also update the status text twice a second } + if ASecondsRemaining >= 0 then + StatusBar.Panels[spExtraStatus].Text := Format( + ' Estimated time remaining: %.2d%s%.2d%s%.2d Average KB/sec: %.0n', + [(ASecondsRemaining div 60) div 60, TimeSeparator, + (ASecondsRemaining div 60) mod 60, TimeSeparator, + ASecondsRemaining mod 60, ABytesCompressedPerSecond / 1024]) + else + StatusBar.Panels[spExtraStatus].Text := ''; + end; + + { Progress panel and taskbar progress bar } + if (FProgress <> AProgress) or + (FProgressMax <> AProgressMax) then begin + FProgress := AProgress; + FProgressMax := AProgressMax; + InvalidateStatusPanel(spCompileProgress); + SetAppTaskbarProgressValue(AProgress, AProgressMax); + end; +end; + +procedure TCompileForm.WMThemeChanged(var Message: TMessage); +begin + { Don't Run to Cursor into this function, it will interrupt up the theme change } + UpdateThemeData(True, True); + inherited; +end; + +procedure TCompileForm.RTargetClick(Sender: TObject); +var + NewTarget: TDebugTarget; +begin + if (Sender = RTargetSetup) or (Sender = TargetSetupButton) then + NewTarget := dtSetup + else + NewTarget := dtUninstall; + if (FDebugTarget <> NewTarget) and (not FDebugging or AskToDetachDebugger) then + FDebugTarget := NewTarget; + + { Update always even if the user decided not to switch so the states are restored } + UpdateTargetMenu; +end; + +procedure TCompileForm.AppOnActivate(Sender: TObject); +const + ReloadMessages: array[Boolean] of String = ( + 'The file has been modified outside of the source editor.' + SNewLine2 + + 'Do you want to reload the file?', + 'The file has been modified outside of the source editor. Changes have ' + + 'also been made in the source editor.' + SNewLine2 + 'Do you want to ' + + 'reload the file and lose the changes made in the source editor?'); +var + NewTime: TFileTime; + Changed: Boolean; +begin + if FFilename = '' then + Exit; + + { See if the file has been modified outside the editor } + Changed := False; + if GetLastWriteTimeOfFile(FFilename, NewTime) then begin + if CompareFileTime(FFileLastWriteTime, NewTime) <> 0 then begin + FFileLastWriteTime := NewTime; + Changed := True; + end; + end; + + { If it has been, offer to reload it } + if Changed then begin + if IsWindowEnabled(Application.Handle) then begin + if MsgBox(FFilename + SNewLine2 + ReloadMessages[Memo.Modified], + SCompilerFormCaption, mbConfirmation, MB_YESNO) = IDYES then + if ConfirmCloseFile(False) then + OpenFile(FFilename, False); + end + else begin + { When a modal dialog is up, don't offer to reload the file. Probably + not a good idea since the dialog might be manipulating the file. } + MsgBox(FFilename + SNewLine2 + 'The file has been modified outside ' + + 'of the source editor. You might want to reload it.', + SCompilerFormCaption, mbInformation, MB_OK); + end; + end; +end; + +procedure TCompileForm.DebugOutputListDrawItem(Control: TWinControl; + Index: Integer; Rect: TRect; State: TOwnerDrawState); + + function SafeGetItem(const ListBoxHandle: HWND; const Index: Integer): String; + { Prior to Delphi 6, the VCL will incur a buffer overflow if you trying + reading an item from a TListBox longer than 4096 characters. } + var + Len: Integer; + begin + Len := SendMessage(ListBoxHandle, LB_GETTEXTLEN, Index, 0); + if Len <= 0 then + Result := '' { zero length or out of range? } + else begin + SetString(Result, nil, Len); + Len := SendMessage(ListBoxHandle, LB_GETTEXT, Index, LPARAM(Result)); + if Len <= 0 then + Result := '' { failed? } + else + SetLength(Result, Len); { since LB_GETTEXTLEN can overestimate } + end; + end; + +var + S: String; +begin + { An owner drawn list box is used for precise tab expansion } + S := SafeGetItem(DebugOutputList.Handle, Index); + DebugOutputList.Canvas.FillRect(Rect); + Inc(Rect.Left, 2); + if (S <> '') and (S[1] = #9) then + DebugOutputList.Canvas.TextOut(Rect.Left + FDebugLogListTimeWidth, + Rect.Top, Copy(S, 2, Maxint)) + else begin + if (Length(S) > 16) and (S[14] = '-') and (S[15] = '-') and (S[16] = ' ') then begin + { Draw lines that begin with '-- ' (like '-- File entry --') in bold } + DebugOutputList.Canvas.TextOut(Rect.Left, Rect.Top, Copy(S, 1, 13)); + DebugOutputList.Canvas.Font.Style := [fsBold]; + DebugOutputList.Canvas.TextOut(Rect.Left + FDebugLogListTimeWidth, + Rect.Top, Copy(S, 14, Maxint)); + end + else + DebugOutputList.Canvas.TextOut(Rect.Left, Rect.Top, S); + end; +end; + +procedure TCompileForm.TabSetClick(Sender: TObject); +begin + case TabSet.TabIndex of + tiCompilerOutput: + begin + CompilerOutputList.BringToFront; + CompilerOutputList.Visible := True; + DebugOutputList.Visible := False; + end; + tiDebugOutput: + begin + DebugOutputList.BringToFront; + DebugOutputList.Visible := True; + CompilerOutputList.Visible := False; + end; + end; +end; + +procedure TCompileForm.ToggleBreakPoint(Line: Integer); +var + I: Integer; +begin + I := FBreakPoints.IndexOf(Pointer(Line)); + if I = -1 then + FBreakPoints.Add(Pointer(Line)) + else + FBreakPoints.Delete(I); + UpdateLineMarkers(Line); +end; + +procedure TCompileForm.MemoMarginClick(Sender: TObject; MarginNumber: Integer; + Line: Integer); +begin + if MarginNumber = 1 then + ToggleBreakPoint(Line); +end; + +procedure TCompileForm.MemoLinesInserted(FirstLine, Count: integer); +var + I, Line: Integer; +begin + for I := 0 to FDebugEntriesCount-1 do + if FDebugEntries[I].LineNumber >= FirstLine then + Inc(FDebugEntries[I].LineNumber, Count); + + if Assigned(FLineState) and (FirstLine < FLineStateCount) then begin + { Grow FStateLine if necessary } + I := (FLineStateCount + Count) - FLineStateCapacity; + if I > 0 then begin + if I < LineStateGrowAmount then + I := LineStateGrowAmount; + ReallocMem(FLineState, SizeOf(TLineState) * (FLineStateCapacity + I)); + Inc(FLineStateCapacity, I); + end; + { Shift existing line states and clear the new ones } + for I := FLineStateCount-1 downto FirstLine do + FLineState[I + Count] := FLineState[I]; + for I := FirstLine to FirstLine + Count - 1 do + FLineState[I] := lnUnknown; + Inc(FLineStateCount, Count); + end; + + if FStepLine >= FirstLine then + Inc(FStepLine, Count); + if FErrorLine >= FirstLine then + Inc(FErrorLine, Count); + + for I := 0 to FBreakPoints.Count-1 do begin + Line := Integer(FBreakPoints[I]); + if Line >= FirstLine then + FBreakPoints[I] := Pointer(Line + Count); + end; +end; + +procedure TCompileForm.MemoLinesDeleted(FirstLine, Count, + FirstAffectedLine: Integer); +var + I, Line: Integer; + DebugEntry: PDebugEntry; +begin + for I := 0 to FDebugEntriesCount-1 do begin + DebugEntry := @FDebugEntries[I]; + if DebugEntry.LineNumber >= FirstLine then begin + if DebugEntry.LineNumber < FirstLine + Count then + DebugEntry.LineNumber := -1 + else + Dec(DebugEntry.LineNumber, Count); + end; + end; + + if Assigned(FLineState) then begin + { Shift existing line states } + if FirstLine < FLineStateCount - Count then begin + for I := FirstLine to FLineStateCount - Count - 1 do + FLineState[I] := FLineState[I + Count]; + Dec(FLineStateCount, Count); + end + else begin + { There's nothing to shift because the last line(s) were deleted, or + line(s) past FLineStateCount } + if FLineStateCount > FirstLine then + FLineStateCount := FirstLine; + end; + end; + + if FStepLine >= FirstLine then begin + if FStepLine < FirstLine + Count then + FStepLine := -1 + else + Dec(FStepLine, Count); + end; + if FErrorLine >= FirstLine then begin + if FErrorLine < FirstLine + Count then + FErrorLine := -1 + else + Dec(FErrorLine, Count); + end; + + for I := FBreakPoints.Count-1 downto 0 do begin + Line := Integer(FBreakPoints[I]); + if Line >= FirstLine then begin + if Line < FirstLine + Count then begin + FBreakPoints.Delete(I); + end else begin + Line := Line - Count; + FBreakPoints[I] := Pointer(Line); + end; + end; + end; + + { When lines are deleted, Scintilla insists on moving all of the deleted + lines' markers to the line on which the deletion started + (FirstAffectedLine). This is bad for us as e.g. it can result in the line + having two conflicting markers (or two of the same marker). There's no + way to stop it from doing that, or to easily tell which markers came from + which lines, so we simply delete and re-create all markers on the line. } + UpdateLineMarkers(FirstAffectedLine); +end; + +procedure TCompileForm.UpdateLineMarkers(const Line: Integer); +var + NewMarker: Integer; +begin + if Line >= Memo.Lines.Count then + Exit; + + NewMarker := -1; + if FBreakPoints.IndexOf(Pointer(Line)) <> -1 then begin + if FLineState = nil then + NewMarker := mmIconBreakpoint + else if (Line < FLineStateCount) and (FLineState[Line] <> lnUnknown) then + NewMarker := mmIconBreakpointGood + else + NewMarker := mmIconBreakpointBad; + end + else begin + if Line < FLineStateCount then begin + case FLineState[Line] of + lnHasEntry: NewMarker := mmIconHasEntry; + lnEntryProcessed: NewMarker := mmIconEntryProcessed; + end; + end; + end; + + { Delete all markers on the line. To flush out any possible duplicates, + even the markers we'll be adding next are deleted. } + if Memo.GetMarkers(Line) <> [] then + Memo.DeleteAllMarkersOnLine(Line); + + if NewMarker <> -1 then + Memo.AddMarker(Line, NewMarker); + + if FStepLine = Line then + Memo.AddMarker(Line, mmLineStep) + else if FErrorLine = Line then + Memo.AddMarker(Line, mmLineError) + else if NewMarker in [mmIconBreakpoint, mmIconBreakpointGood] then + Memo.AddMarker(Line, mmLineBreakpoint) + else if NewMarker = mmIconBreakpointBad then + Memo.AddMarker(Line, mmLineBreakpointBad); +end; + +procedure TCompileForm.UpdateAllLineMarkers; +var + Line: Integer; +begin + for Line := 0 to Memo.Lines.Count-1 do + UpdateLineMarkers(Line); +end; + +procedure TCompileForm.RToggleBreakPointClick(Sender: TObject); +begin + ToggleBreakPoint(Memo.CaretLine); +end; + +{$IFNDEF UNICODE} +var + Compil32LeadBytes: TLeadByteSet; +{$ENDIF} + +initialization +{$IFNDEF UNICODE} + GetLeadBytes(Compil32LeadBytes); + ConstLeadBytes := @Compil32LeadBytes; +{$ENDIF} + InitThemeLibrary; + InitHtmlHelpLibrary; + { For ClearType support, try to make the default font Microsoft Sans Serif } + if DefFontData.Name = 'MS Sans Serif' then + DefFontData.Name := AnsiString(GetPreferredUIFont); + CoInitialize(nil); +finalization + CoUninitialize(); +end. diff --git a/Projects/CompImages.res b/Projects/CompImages.res new file mode 100644 index 000000000..7627838df Binary files /dev/null and b/Projects/CompImages.res differ diff --git a/Projects/CompInt.pas b/Projects/CompInt.pas new file mode 100644 index 000000000..b71a1f2cc --- /dev/null +++ b/Projects/CompInt.pas @@ -0,0 +1,167 @@ +unit CompInt; + +{ + Inno Setup + Copyright (C) 1997-2007 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Compiler interface + + $jrsoftware: issrc/Projects/CompInt.pas,v 1.16 2011/06/15 14:37:46 mlaan Exp $ +} + +interface + +uses + Windows; + +const + { Constants passed in Code parameter of callback function } + iscbReadScript = 1; { Sent when compiler needs the next script line } + iscbNotifyStatus = 2; { Sent to notify the application of compiler status } + iscbNotifyIdle = 3; { Sent at various intervals during the compilation } + iscbNotifySuccess = 4; { Sent when compilation succeeds } + iscbNotifyError = 5; { Sent when compilation fails or is aborted by the + application } + + { Return values for callback function } + iscrSuccess = 0; { Return this for compiler to continue } + iscrRequestAbort = 1; { Return this to abort compilation immediately. + (When this value is returned, it is not necessary + to set any of the "out" fields in the + TCompilerCallbackData; the compiler will ignore + them.) } + + { Return values for ISDllCompileScript } + isceNoError = 0; { Successful } + isceInvalidParam = 1; { Bad parameters passed to function } + isceCompileFailure = 2; { There was an error compiling or it was aborted + by the application } + +type + { TCompilerCallbackData is a record passed to the callback function. The + fields which you may access vary depending on what Code was passed to the + callback function. } + TCompilerCallbackData = record + case Integer of + iscbReadScript: ( + Reset: BOOL; { [in] This field can be ignored in compiler + versions 3.0.1 and later. (Previous versions + of the compiler made multiple passes over the + script, and set Reset to True when it needed + to return to the beginning.) } + LineRead: PChar); { [out] Application returns pointer to the next + line it reads, or a NULL pointer if the end of + file is reached. Application is responsible for + allocating a buffer to hold the line; LineRead + is initially NULL when the callback function + is called. The pointer only needs to remain + valid until the next time the callback function + is called (i.e. the application may return the + same pointer each time). } + + iscbNotifyStatus: ( + StatusMsg: PChar); { [in] Contents of status message. } + + iscbNotifyIdle: ( + CompressProgress: Cardinal; { [in] Amount compressed so far + (new in 4.1.6) } + CompressProgressMax: Cardinal; { [in] Maximum value of CompressProgress + (new in 4.1.6) } + SecondsRemaining: Integer; { [in] Estimated time remaining, or -1 + if not known (new in 5.1.13) } + BytesCompressedPerSecond: Cardinal); { [in] Average bytes compressed + per second (new in 5.1.13) } + + iscbNotifySuccess: ( + OutputExeFilename: PChar; { [in] The name of the resulting setup.exe } + DebugInfo: Pointer; { [in] Debug info (new in 3.0.0.1) } + DebugInfoSize: Cardinal); { [in] Size of debug info (new in 3.0.0.1) } + + iscbNotifyError: ( + ErrorMsg: PChar; { [in] The error message, or NULL if compilation + was aborted by the application. } + ErrorFilename: PChar; { [in] Filename in which the error occured. This + is NULL if the file is the main script. } + ErrorLine: Integer); { [in] The line number the error occured on. + Zero if the error doesn't apply to any + particular line. } + end; + + TCompilerCallbackProc = function(Code: Integer; + var Data: TCompilerCallbackData; AppData: Longint): Integer; stdcall; + + PCompileScriptParamsEx = ^TCompileScriptParamsEx; + TCompileScriptParamsEx = record + Size: Cardinal; { [in] Set to SizeOf(TCompileScriptParamsEx). } + CompilerPath: PChar; { [in] The "compiler:" directory. This is the + directory which contains the *.e32 files. If this + is set to NULL, the compiler will use the directory + containing the compiler DLL/EXE. } + SourcePath: PChar; { [in] The default source directory, and directory to + look in for #include files. Normally, this is + the directory containing the script file. This + cannot be NULL. } + CallbackProc: TCompilerCallbackProc; + { [in] The callback procedure which the compiler calls + to read the script and for status notification. } + AppData: Longint; { [in] Application-defined. AppData is passed to the + callback function. } + Options: PChar; { [in] Additional options. Each option is a + null-terminated string, and the final option is + followed by an additional null character. + If you do not wish to specify any options, set this + field to NULL or to point to a single null + character. + + Currently supported options: + + OutputBaseFilename=[filename] + Overrides any OutputBaseFilename setting in the + script; causes the compiler to use [filename] + instead. + OutputDir=[path] + Overrides any output directory in the script; + causes the compiler to use [path] instead. + SignTool-[name]=[command] + Configures a SignTool with name [name] and command + [command]. + ISPP:[isppoption] + Configures an ISPP option. } + end; + + { The old TCompileScriptParams record. Use this in place of + TCompileScriptParamsEx if you need call ISCmplr.dll versions below + 5.0.5. It's the same except it lacks an Options field. } + TCompileScriptParams = record + Size: Cardinal; { [in] Set to SizeOf(TCompileScriptParams). } + CompilerPath: PChar; + SourcePath: PChar; + CallbackProc: TCompilerCallbackProc; + AppData: Longint; + end; + + PCompilerVersionInfo = ^TCompilerVersionInfo; + TCompilerVersionInfo = record + Title: PAnsiChar; { Name of compiler engine - 'Inno Setup' } + Version: PAnsiChar; { Version number text } + BinVersion: Cardinal; { Version number as an integer } + end; + +const + ISCmplrDLL = 'ISCmplr.dll'; + +{ The ISDllCompileScript function begins compilation of a script. See the above + description of the TCompileScriptParams record. Return value is one of the + isce* constants. } +function ISDllCompileScript(const Params: TCompileScriptParamsEx): Integer; + stdcall; external ISCmplrDLL{$IFDEF UNICODE} name 'ISDllCompileScriptW'{$ENDIF}; + +{ The ISDllGetVersion returns a pointer to a TCompilerVersionInfo record which + contains information about the compiler version. } +function ISDllGetVersion: PCompilerVersionInfo; stdcall; external ISCmplrDLL; + +implementation + +end. diff --git a/Projects/CompMsgs.pas b/Projects/CompMsgs.pas new file mode 100644 index 000000000..dfe5657f7 --- /dev/null +++ b/Projects/CompMsgs.pas @@ -0,0 +1,379 @@ +unit CompMsgs; + +{ + Inno Setup + Copyright (C) 1997-2010 Jordan Russell + Portions by Martijn Laan + For conditions of distribution and use, see LICENSE.TXT. + + Compiler Messages + + $jrsoftware: issrc/Projects/CompMsgs.pas,v 1.119 2010/12/27 12:25:42 mlaan Exp $ + + All language-specific text used by the compiler is in here. If you want to + translate it into another language, all you need to change is this unit. +} + +interface + +const + SNewLine = #13#10; { line break } + SNewLine2 = #13#10#13#10; { double line break } + + { Compiler form labels } + SCompilerFormCaption = 'Inno Setup Compiler'; + SCompilerScriptFileLabel = 'Script &File:'; + SCompilerStatusLabel = 'Status &Messages:'; + SCompilerScriptBrowseButton = '&Browse...'; + SCompilerStartButton = '&Start'; + SCompilerExitButton = 'E&xit'; + SCompilerOpenFilter = 'Inno Setup Scripts (*.iss)|*.iss|All Files|*.*'; + SCompilerExampleScripts = 'Example scripts...'; + SCompilerMoreFiles = 'More files...'; + + { Compiler Script Wizard } + SWizardDefaultName = 'Inno Setup Script Wizard'; + SWizardWelcome = 'Welcome'; + SWizardAppInfo = 'Application Information'; + SWizardAppInfo2 = 'Please specify some basic information about your application.'; + SWizardAppDir = 'Application Folder'; + SWizardAppDir2 = 'Please specify folder information about your application.'; + SWizardAppFiles = 'Application Files'; + SWizardAppFiles2 = 'Please specify the files that are part of your application.'; + SWizardAppFiles3 = 'Please specify the source folder.'; + SWizardAppFilesSubDirsMessage = 'Should files in subfolders of "%s" also be included?'; + SWizardAppExeFilter = 'Application files (*.exe)|*.exe|All Files|*.*'; + SWizardAppExeDefaultExt = 'exe'; + SWizardAppIcons = 'Application Icons'; + SWizardAppIcons2 = 'Please specify which icons should be created for your application.'; + SWizardAppDocs = 'Application Documentation'; + SWizardAppDocs2 = 'Please specify which documentation files should be shown by Setup during installation.'; + SWizardAppDocsFilter = 'Documentation files (*.rtf,*.txt)|*.rtf;*.txt|All Files|*.*'; + SWizardAppDocsDefaultExt = 'rtf'; + SWizardLanguages = 'Setup Languages'; + SWizardLanguages2 = 'Please specify which Setup languages should be included.'; + SWizardCompiler = 'Compiler Settings'; + SWizardCompiler2 = 'Please specify some basic compiler settings.'; + SWizardCompilerSetupIconFileFilter = 'Icon files (*.ico)|*.ico|All Files|*.*'; + SWizardCompilerSetupIconFileDefaultExt = 'ico'; + SWizardCompilerOutputDir = 'Please specify the folder.'; + SWizardISPP = 'Inno Setup Preprocessor'; + SWizardISPP2 = 'Please specify whether Inno Setup Preprocessor should be used.'; + SWizardISPPLabel = 'The [name] has detected the presence of Inno Setup Preprocessor (ISPP) and can therefore use #define compiler directives to simplify your script. Although this is not necessary, it will make it easier to manually change the script later.' + SNewLine2 + 'Do you want the [name] to use #define compiler directives?'; + SWizardISPPCheck = '&Yes, use #define compiler directives'; + SWizardFinished = 'Finished'; + + SWizardNextButton = '&Next >'; + SWizardFinishButton = '&Finish'; + SWizardCancelMessage = 'The [name] is not complete. If you quit now, the new script file will not be generated.'#13#13'Exit the [name]?'; + + SWizardAllFilesFilter = 'All Files|*.*'; + + SWizardAppNameError = 'Please specify the application name.'; + SWizardAppVersionError = 'Please specify the application version.'; + SWizardAppRootDirError = 'Please specify the application destination base folder.'; + SWizardAppDirNameError = 'Please specify the application folder name.'; + SWizardAppExeError = 'Please specify the application main executable file.'; + SWizardAppGroupNameError = 'Please specify the application Start Menu group name.'; + SWizardFileDestRootDirError = 'Please specify the destination base folder.'; + SWizardFileAppDestRootDirError = 'Please specify a destination base folder other than the application folder'; + SWizardLanguagesSelError = 'Please select at least one language.'; + + SWizardScriptHeader = '; Script generated by the [name].' + SNewLine + '; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!'; + + { Compiler-specific messages } + SCompilerVersion = 'version %s'; + + SCompilerNotOnWin32s = 'The 32-bit compiler will not run on Win32s.'; + SCompilerCommandLineHelp3 = 'Command line usage:' + SNewLine + + SNewLine + + 'compil32 /cc