Проблема Проблема отображения надписей

KARB10

Новичок
Привет всем.У меня на Label , Азербайджанский шрифт показывает как " ? "

Unicode версия.Шрифт нормальный показывает на кнопка



Код:
#define MyAppName "Opera 11.51"
#define AppName "Opera"
#define MyAppVersion "11.51"
#define MyAppPublisher "Opera, Inc."
#define MyAppURL "http://www.opera.com/"
#define MyAppExeName "opera.exe"

[Setup]
AppName={#AppName}
//AppVersion={#MyAppVersion}
AppVerName={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
SetupIconFile=Include\Design\icon.ico
LicenseFile=Include\License\license.txt
UninstallFilesDir={app}\Uninstall
UninstallDisplayIcon={app}\Uninstall\icon.ico
Uninstallable=yes
UninstallIconFile=Include\Design\icon.ico

[Languages]
Name: "russian"; MessagesFile: "compiler:Languages\Azerbaijani.islu"

[Files]
Source: "Include\Design\Fon.bmp"; DestDir: "{tmp}"; Flags: ignoreversion
Source: "Include\DLL\ISTask.dll"; DestDir: "{tmp}"; Flags: Dontcopy
Source: "Include\Design\icon.ico"; DestDir: "{app}\Uninstall"; Flags: ignoreversion


[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:groupicon
Name: "{userdesktop}\{#AppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}"; Filename: "{app}\opera.exe";  WorkingDir: {app}; Tasks:quickicon;

[Tasks]
Name: "desktopicon"; Description:"İş masası"; Flags: unchecked;
Name: "groupicon"; Description:"в меню «Пуск»"; Flags: unchecked;
Name: "quickicon"; Description:"в Панели быстрого запуска"; Flags: unchecked;

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, "&", "&&")}}"; Flags: nowait postinstall skipifsilent

[Types]
Name: "full"; Description: "Русский (по умолчанию)"; Flags:iscustom;
Name: "compact"; Description: "English"

[Registry]
Root: HKLM; SubKey: SOFTWARE\Opera Software; ValueType: string; ValueName: Plugin path; ValueData: E:\Program Files\Opera\program\plugins; Flags:uninsdeletekey;

[Custommessages]

[Code]
const
  BColor = clred;
  EColor = clblack;
  BM_CLICK=$00F5;

var
fon:TBitmapimage;
Parameters, ParametersBack, Button1, Button2:TButton;
Label1,label2,Label3,Label4,Label5,Label6,Label7,Label8,Label9,Label10:TLabel;
Combo:TComboBox;
Bevel,Bevel1,Bevel2:TBevel;

#include "TextureProgressBar.iss"

function KillTask(ExeFileName: string): Integer;
external 'KillTask@files:ISTask.dll stdcall delayload';
function RunTask(FileName: string; bFullpath: Boolean): Boolean;
external 'RunTask@files:ISTask.dll stdcall delayload';

procedure ParametersOnClick(Snder:TObject);
begin
Parameters.Hide;
Fon.Hide;
Label2.Hide;
WizardForm.TypesCombo.Show;
//Combo.Show;
WizardForm.DirEdit.Show;
WizardForm.DirBrowseButton.Show;
WizardForm.TasksList.Show;
ParametersBack.Show;
Label5.Show;
//Label6.Show;
Label7.Show;
Label8.Show;
Label9.Show;
Bevel.Show;
Bevel1.Show;
end;

procedure ParametersbackOnclick(Sender:TObject);
begin
WizardForm.TypesCombo.Hide;
//Combo.Hide;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
WizardForm.TasksList.Hide;
Parametersback.Hide;
Parameters.Show;
Label1.Show;
label2.Show;
Label3.Show;
Label4.Show;
Label5.Hide;
//Label6.Hide;
Label7.Hide;
Label8.Hide;
Label9.Hide;
Bevel.Hide;
Bevel1.Hide;
fon.Show;
end;


procedure Label2OnClick(Sender:TObject);
begin
Fon.Hide;
WizardForm.LicenseMemo.Show;
Label4.Hide;
Label2.Cursor:=crDefault;
Label2.Font.Color:=clBlack;
Label2.Font.Style:=[];
Label2.OnClick:=nil;
Button1.Show;
end;

procedure Button1OnClick(Sender:TObject);
begin
Button1.Hide;
WizardForm.LicenseMemo.Hide;
Fon.Show;
Label4.Show;
Label2.Cursor:=crHand;
Label2.Font.Color:=clBlue;
Label2.Font.Style:=[fsUnderline];
Label2.OnClick:=@Label2OnClick;
end;

procedure Label9OnClick(Sender:TObject);
begin
WizardForm.TypesCombo.Hide;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
WizardForm.TasksList.Hide;
Label4.Hide;
Label5.Hide;
Label7.Hide;
Label8.Hide;
Bevel.Hide;
Bevel1.Hide;
Label9.Cursor:=crDefault;
Label9.Font.Color:=clBlack;
Label9.Font.Style:=[];
Label9.OnClick:=nil;
WizardForm.LicenseMemo.Show;
Button2.Show;
end;

procedure Button2OnClick(Sender:TObject);
begin
WizardForm.LicenseMemo.Hide;
Button2.Hide;
Label4.Show;
Label9.Cursor:=crHand;
Label9.Font.Color:=clBlue;
Label9.Font.Style:=[fsUnderline];
Label9.OnClick:=@Label9OnClick;
Label4.Show;
Label5.Show;
Label7.Show;
Label8.Show;
Bevel.Show;
Bevel1.Show;
WizardForm.TypesCombo.Show;
WizardForm.DirEdit.Show;
WizardForm.DirBrowseButton.Show;
WizardForm.TasksList.Show;
end;

procedure Labels;
begin
Label1:=TLabel.Create(WizardForm);
with Label1 do begin
Left:=ScaleX(26);
Top:=ScaleY(280);
Parent:=WizardForm;
Caption:='Yükləmə'
Font.Size:=8;
end;

Label2:=TLabel.Create(WizardForm);
with Label2 do begin
Left:=ScaleX(230);
Top:=ScaleY(280);
Parent:=WizardForm;
Caption:='Условия использования'
Font.Color:=clBlue;
Font.Style:=[fsUnderline];
Cursor:=crHand;
Font.Size:=8;
OnClick:=@Label2OnClick;
end;

Label3:=TLabel.Create(WizardForm);
with Label3 do begin
Left:=ScaleX(355);
Top:=ScaleY(280);
Parent:=WizardForm;
Caption:='Opera ».'
Font.Size:=8;
end;

Label4:=TLabel.Create(WizardForm);
with Label4 do begin
Left:=ScaleX(26);
Top:=ScaleY(310);
Parent:=WizardForm;
Caption:='Ваша текущая версия {#AppName} будет обновлена.'
Font.Size:=8;
Font.Style:=[fsbold];
end;

Label5:=TLabel.Create(WizardForm);
with Label5 do begin
Left:=ScaleX(26);
Top:=ScaleY(40);
Parent:=WizardForm;
Caption:='Язык:'
Font.Size:=8;
Font.Style:=[fsbold];
hide;
end;

Label6:=TLabel.Create(WizardForm);
with Label6 do begin
Left:=ScaleX(26);
Top:=ScaleY(65);
Parent:=WizardForm;
Caption:='Установить:'
Font.Size:=8;
Font.Style:=[fsbold];
Hide;
end;

Label7:=TLabel.Create(WizardForm);
with Label7 do begin
Left:=ScaleX(26);
Top:=ScaleY(90);
Parent:=WizardForm;
Caption:='Папка установки:'
Font.Size:=8;
Font.Style:=[fsbold];
Hide;
end;

Label8:=TLabel.Create(WizardForm);
with Label8 do begin
Left:=ScaleX(26);
Top:=ScaleY(150);
Parent:=WizardForm;
Caption:='Ярлыки:'
Font.Size:=8;
Font.Style:=[fsbold];
Hide;
end;

Label9:=TLabel.Create(WizardForm);
with Label9 do begin
Left:=ScaleX(230);
Top:=ScaleY(280);
Parent:=WizardForm;
Caption:='Условия использования'
Font.Color:=clBlue;
Font.Style:=[fsUnderline];
Cursor:=crHand;
Font.Size:=8;
OnClick:=@Label9OnClick;
hide;
end;
end;

procedure Buttons;
begin

WizardForm.NextButton.Left:=ScaleX(279);
WizardForm.NextButton.Top:=ScaleY(338);
WizardForm.NextButton.Width:=ScaleX(179);
WizardForm.NextButton.Height:=ScaleY(25);
WizardForm.CancelButton.Left:=ScaleX(465);
WizardForm.CancelButton.Top:=ScaleY(338);
WizardForm.CancelButton.Width:=ScaleX(119);
WizardForm.CancelButton.Height:=ScaleY(25);

with WizardForm.DirBrowseButton do begin
Left:=ScaleX(434);
Top:=ScaleY(86);
Width:=ScaleX(124);
Height:=ScaleY(23);
Parent:=WizardForm;
Caption:='Изменить...';
Hide;
end;

Parameters:=TButton.Create(WizardForm);
with Parameters do begin
Left:=ScaleX(20);
Top:=ScaleY(338);
Width:=ScaleX(119);
Height:=ScaleY(25);
Caption:='Параметры';
Parent:=WizardForm;
OnClick:=@ParametersOnClick
end;

Parametersback:=TButton.Create(WizardForm);
with Parametersback do begin
Left:=ScaleX(20);
Top:=ScaleY(338);
Width:=ScaleX(119);
Height:=ScaleY(25);
Caption:='Назад';
Parent:=WizardForm;
OnClick:=@ParametersbackOnclick
Hide;
end;

Button1:=TButton.Create(WizardForm);
with Button1 do begin
Left:=ScaleX(20);
Top:=ScaleY(338);
Width:=ScaleX(119);
Height:=ScaleY(25);
Caption:='Назад';
Parent:=WizardForm;
OnClick:=@Button1OnClick;
Hide;
end;


Button2:=TButton.Create(WizardForm);
with Button2 do begin
Left:=ScaleX(20);
Top:=ScaleY(338);
Width:=ScaleX(119);
Height:=ScaleY(25);
Caption:='Назад';
Parent:=WizardForm;
OnClick:=@Button2OnClick;
Hide;
end;
end;

procedure form;
begin
ExtractTemporaryFile('fon.bmp');

WizardForm.Position:=poScreenCenter;
WizardForm.InnerNotebook.Hide;
WizardForm.OuterNotebook.Hide;
WizardForm.Center;
WizardForm.Width:=ScaleX(600);
WizardForm.Height:=ScaleY(404);
WizardForm.ReadyMemo.Hide;
WizardForm.PageNameLabel.Hide;
WizardForm.PageDescriptionLabel.Hide;
WizardForm.Bevel.Hide;
MainForm.Hide;
WizardForm.ReadyLabel.Hide;
Wizardform.WizardSmallBitmapImage.Hide;

WizardForm.Caption:='Установка {#MyAppName}'

fon:=TBitmapImage.Create(WizardForm);
with fon do begin
Parent:=WizardForm;
Left:=ScaleX(0);
Top:=ScaleY(0);
Width:=ScaleX(613);
Height:=ScaleY(225);
Bitmap.LoadFromFile(ExpandConstant('{tmp}\Fon.bmp'));
end;

with WizardForm.TypesCombo do begin
Left:=ScaleX(162);
Top:=ScaleY(35);
Width:=ScaleX(265);
Height:=ScaleY(45);
Parent:=WizardForm;
Color:=clWhite;
Style:=csOwnerDrawVariable;
Hide;
end;

Combo:=TComboBox.Create(WizardForm);
with Combo do begin
Left:=ScaleX(162);
Top:=ScaleY(60);
Width:=ScaleX(265);
Height:=ScaleY(45);
Parent:=WizardForm;
Color:=clWhite;
Style:=csOwnerDrawVariable;
Color:=clWhite;
Enabled:=false;
Hide;
end;

with WizardForm.TypesCombo do begin
Left:=ScaleX(162);
Top:=ScaleY(35);
Width:=ScaleX(265);
Height:=ScaleY(45);
Parent:=WizardForm;
Color:=clWhite;
Style:=csOwnerDrawVariable;
Hide;
end;

with WizardForm.DirEdit do begin
Left:=ScaleX(162);
Top:=ScaleY(87);
Width:=ScaleX(265);
Height:=ScaleY(50);
Parent:=WizardForm;
Color:=clWhite;
Hide;
end;


Bevel:=TBevel.Create(WizardForm);
with Bevel do begin
Left:=ScaleX(24);
Top:=ScaleY(130);
Width:=ScaleX(542);
Height:=ScaleY(2);
Parent:=WizardForm
Hide;
end;


with WizardForm.TasksList do begin
Left:=ScaleX(162);
Top:=ScaleY(145);
Width:=ScaleX(389);
Height:=ScaleY(70);
Parent:=WizardForm;
Hide;
end;

Bevel1:=TBevel.Create(WizardForm);
with Bevel1 do begin
Left:=ScaleX(24);
Top:=ScaleY(223);
Width:=ScaleX(542);
Height:=ScaleY(2);
Parent:=WizardForm;
Hide;
end;

with WizardForm.LicenseMemo do begin
Left:=ScaleX(20);
Top:=ScaleY(20);
Width:=ScaleX(536);
Height:=ScaleY(240);
Parent:=WizardForm;
Hide;
end;

with WizardForm.ProgressGauge do begin
Parent:=WizardForm;
Left:=ScaleX(145);
Top:=ScaleY(245);
Width:=ScaleX(311);
Height:=ScaleY(1);
Hide;
end;
end;


procedure InitializeWizard;
begin
Form;
Buttons;
Labels;
if not RegValueExists(HKLM, 'SOFTWARE\Opera Software\', 'Plugin Path') then begin
Label4.Caption:='{#AppName} будет установлена';
end;
TextureProgressBar(WizardForm.ProgressGauge, $898987, cllime, false);
end;

function InitializeSetup(): Boolean;
begin
Result:=True;
If RunTask('opera.exe', false) then
  begin
  case MsgBox('Завершить процесс opera.exe принудительно?', mbInformation, mb_OkCancel) of
  IDOK:
  KillTask('opera.exe');
  IDCANCEL:
  Result:=False;
end;
end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
ProgressTimer(CurStep);

if CurStep = ssInstall then begin
fon.Show;
WizardForm.ProgressGauge.Show;
Label1.Hide;
label2.Hide;
Label3.Hide;
Label4.Hide;
Label5.Hide;
Label6.Hide;
Label7.Hide;
Label8.Hide;
Label9.Hide;
WizardForm.TypesCombo.Hide;
WizardForm.LicenseMemo.Hide;
WizardForm.TasksList.Hide;
WizardForm.DirEdit.Hide;
WizardForm.DirBrowseButton.Hide;
Bevel.Hide;
Bevel1.Hide;
Button1.Hide;
Button2.Hide;
Parameters.hide;
ParametersBack.Hide;
end;
end;

Procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID=wpFinished then begin
WizardForm.ProgressGauge.Hide;
SendMessage(WizardForm.NextButton.Handle,BM_CLICK,0,0);
end;
end;

function ShouldSkipPage(PageID: Integer): Boolean;
begin
  Result := PageIndexFromID(PageID) < PageIndexFromID(wpReady);
end;
 
Последнее редактирование:

sergey3695

Ветеран
Модератор
http://www.wylek.ru/forum/31-153-5#5718
Сообщение: Leserg Дата: Воскресенье, 01.07.2012, 21:10:28 | Сообщение # 67
З.ы. ух влом мне сюда переносить то сообщение, уж извиняйте. Там полный развернутый ответ на ваш вопрос.
 

KARB10

Новичок
http://www.wylek.ru/forum/31-153-5#5718
Сообщение: Leserg Дата: Воскресенье, 01.07.2012, 21:10:28 | Сообщение # 67
З.ы. ух влом мне сюда переносить то сообщение, уж извиняйте. Там полный развернутый ответ на ваш вопрос.
Все работает.Но это очень долго и на скрипт не могу понять слова.Можна сделат автоматические конверт на Hex?
 

sergey3695

Ветеран
Модератор
KARB10, сорян, не проверил. тогда только переводить в Unicode HEX.
 
Сверху