Имя пользователя:
Пароль:  
Помощь | Регистрация | Забыли пароль?  

Показать сообщение отдельно

Новый участник


Сообщения: 38
Благодарности: 0

Профиль | Отправить PM | Цитировать


Подскажите в чем ошибка. Компилируется без ошибок, но при установке получаю "Could not call proc"
Код

Код: Выделить весь код
[Setup]
AppName=Notepad++ 5.9.3
AppVerName=Notepad++ 5.9.3
AppVersion=5.9.3
DefaultDirName={pf}\Notepad++
DefaultGroupName=Notepad++
OutputBaseFilename=Notepad++_5.9.3 RC_FullPlug
VersionInfoVersion=5.9.3.0
DirExistsWarning=no
ShowTasksTreeLines=yes
Uninstallable=yes
CreateUninstallRegKey=no
ChangesEnvironment=yes
ChangesAssociations=yes
Compression=lzma2/ultra
LZMAMatchFinder=BT
LZMAUseSeparateProcess=yes
InternalCompressLevel=ultra
SolidCompression=yes
MergeDuplicateFiles=yes
SetupIconFile=N.ico
WizardImageFile=embedded\Blue.bmp
WizardSmallImageFile=embedded\Blue.bmp

[Files]
Source: "{app}\*"; DestDir: "{app}"; AfterInstall: ExtLog(); Flags: replacesameversion createallsubdirs recursesubdirs

[Registry]

Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++; ValueType: string; ValueName: DisplayName; ValueData: Notepad++; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++; ValueType: string; ValueName: UninstallString; ValueData: {app}\uninstall.exe; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++; ValueType: string; ValueName: DisplayIcon; ValueData: {app}\notepad++.exe; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++; ValueType: string; ValueName: DisplayVersion; ValueData: 5.9.3.0; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKLM; SubKey: SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++; ValueType: string; ValueName: URLInfoAbout; ValueData: http://notepad-plus-plus.org/; Flags: uninsdeletevalue uninsdeletekeyifempty

[C*ode]
procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
Confirm:=False;
end;

Procedure InitializeWizard();

begin
with WizardForm do begin
  Position:=poScreenCenter
  ClientWidth:=690
  ClientHeight:=496
  Font.Color:=clWindow
  Font.Name:='MS Sans Serif'
  Font.Style:=[]
  with Bevel do begin
    Left:=0
    Top:=313
    Width:=497
    Height:=2
    Visible:=False
  end;
  with CancelButton do begin
    Left:=600
    Top:=462
    Width:=77
    Height:=25
    BringToFront
  end;
  with NextButton do begin
    Left:=375
    Top:=462
    Width:=77
    Height:=25
    BringToFront
  end;
  with BackButton do begin
    Left:=293
    Top:=462
    Width:=77
    Height:=25
    BringToFront
  end;
  with OuterNotebook do begin
    Left:=0
    Top:=0
    Width:=690
    Height:=496
    with WelcomePage do begin
      Color:=11232829
      with WizardBitmapImage do begin
        Left:=0
        Top:=0
        Width:=690
        Height:=496
      end;
      with WelcomeLabel2 do begin
        Left:=205
        Top:=230
        Width:=465
        Height:=200
      end;
      with WelcomeLabel1 do begin
        Left:=205
        Top:=190
        Width:=465
        Height:=28
        Font.Color:=clWindow
        Font.Size:=8
      end;
    end;
    with InnerPage do begin
      with Bevel1 do begin
        Left:=0
        Top:=58
        Width:=499
        Height:=3
        Visible:=False
      end;
      with InnerNotebook do begin
        Left:=205
        Top:=79
        Width:=465
        Height:=354
        BringToFront
        Color:=11232829
        with LicensePage do begin
          with LicenseNotAcceptedRadio do begin
            Left:=0
            Top:=338
            Width:=465
            Height:=17
            Checked:=True
          end;
          with LicenseAcceptedRadio do begin
            Left:=0
            Top:=318
            Width:=465
            Height:=17
          end;
          with LicenseMemo do begin
            Left:=0
            Top:=38
            Width:=465
            Height:=266
            ReadOnly:=True
            ScrollBars:=ssVertical
          end;
          with LicenseLabel1 do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end;
        end;
        with PasswordPage do begin
          with PasswordEdit do begin
            Left:=0
            Top:=50
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end;
          with PasswordEditLabel do begin
            Left:=0
            Top:=34
            Width:=465
            Height:=14
          end;
          with PasswordLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end;
        end;
        with InfoBeforePage do begin
          with InfoBeforeMemo do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=327
            ScrollBars:=ssVertical
          end;
          with InfoBeforeClickLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end;
        end;
        with UserInfoPage do begin
          with UserInfoSerialEdit do begin
            Left:=0
            Top:=120
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end;
          with UserInfoSerialLabel do begin
            Left:=0
            Top:=104
            Width:=465
            Height:=14
          end;
          with UserInfoOrgEdit do begin
            Left:=0
            Top:=68
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end;
          with UserInfoOrgLabel do begin
            Left:=0
            Top:=52
            Width:=465
            Height:=14
          end;
          with UserInfoNameEdit do begin
            Left:=0
            Top:=16
            Width:=465
            Height:=21
            Font.Color:=clWindowText
          end;
          with UserInfoNameLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end;
        end;
        with SelectDirPage do begin
          with SelectDirBitmapImage do begin
            Left:=0
            Top:=0
            Width:=32
            Height:=32
            Visible:=False
          end;
          with DiskSpaceLabel do begin
            Left:=0
            Top:=340
            Width:=465
            Height:=14
          end;
          with DirBrowseButton do begin
            Left:=388
            Top:=288
            Width:=77
            Height:=25
          end;
          with DirEdit do begin
            Left:=0
            Top:=290
            Width:=378
            Height:=21
            Font.Color:=clWindowText
          end;
          with SelectDirBrowseLabel do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=28
          end;
          with SelectDirLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end;
        end;
        with SelectComponentsPage do begin
          with ComponentsDiskSpaceLabel do begin
            Left:=0
            Top:=340
            Width:=417
            Height:=14
          end;
          with ComponentsList do begin
            Left:=0
            Top:=48
            Width:=465
            Height:=275
            Font.Color:=clWindow
            Color:=11232829
          end;
          with TypesCombo do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=21
            Font.Color:=clWindow
            Color:=11232829
           end;
          with SelectComponentsLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end;
        end;
        with SelectProgramGroupPage do begin
          with SelectGroupBitmapImage do begin
            Left:=0
            Top:=0
            Width:=32
            Height:=32
            Visible:=False
          end;
          with NoIconsCheck do begin
            Left:=0
            Top:=337
            Width:=465
            Height:=17
          end;
          with GroupBrowseButton do begin
            Left:=388
            Top:=288
            Width:=77
            Height:=25
          end;
          with GroupEdit do begin
            Left:=0
            Top:=290
            Width:=378
            Height:=21
            Font.Color:=clWindowText
          end;
          with SelectStartMenuFolderBrowseLabel do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=28
          end;
          with SelectStartMenuFolderLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end;
        end;
        with SelectTasksPage do begin
          with TasksList do begin
            Left:=0
            Top:=34
            Width:=465
            Height:=317
            Color:=11232829
          end;
          with SelectTasksLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end;
        end;
        with ReadyPage do begin
          with ReadyMemo do begin
            Left:=0
            Top:=34
            Width:=465
            Height:=317
            Color:=11232829
          end;
          with ReadyLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=28
          end;
        end;
        with PreparingPage do begin
          with PreparingErrorBitmapImage do begin
            Left:=0
            Top:=0
            Width:=16
            Height:=16
            Visible:=False
          end;
          with PreparingLabel do begin
            Left:=24
            Top:=0
            Width:=393
            Height:=14
            Visible:=False
          end;
        end;
        with InstallingPage do begin
          with FilenameLabel do begin
            Left:=0
            Top:=16
            Width:=465
            Height:=16
          end;
          with StatusLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=16
          end;
          with ProgressGauge do begin
            Left:=0
            Top:=42
            Width:=465
            Height:=21
            Min:=0
            Max:=100
          end;
        end;
        with InfoAfterPage do begin
          with InfoAfterMemo do begin
            Left:=0
            Top:=24
            Width:=465
            Height:=327
            ScrollBars:=ssVertical
          end;
          with InfoAfterClickLabel do begin
            Left:=0
            Top:=0
            Width:=465
            Height:=14
          end;
        end;
      end;
      with MainPanel do begin
        Left:=0
        Top:=0
        Width:=690
        Height:=496
        Color:=clWindow
        with WizardSmallBitmapImage do begin
          Left:=0
          Top:=0
          Width:=690
          Height:=496
          BackColor:=clWindow
        end;
        with PageDescriptionLabel do begin
          Left:=25
          Top:=25
          Width:=500
          Height:=14
          Color:=6697728
          Font.Color:=clWindow
        end;
        with PageNameLabel do begin
          Left:=15
          Top:=7
          Width:=500
          Height:=14
          Color:=6697728
          Font.Color:=clWindow
        end;
      end;
    end;
    with FinishedPage do begin
      Color:=11232829
      with WizardBitmapImage2 do begin
        Left:=0
        Top:=0
        Width:=690
        Height:=496
      end;
      with NoRadio do begin
        Left:=205
        Top:=227
        Width:=465
        Height:=17
      end;
      with YesRadio do begin
        Left:=205
        Top:=199
        Width:=465
        Height:=17
      end;
      with RunList do begin
        Left:=205
        Top:=199
        Width:=465
        Height:=149
        BorderStyle:=bsNone
      end;
      with FinishedLabel do begin
        Left:=205
        Top:=119
        Width:=465
        Height:=53
      end;
      with FinishedHeadingLabel do begin
        Left:=205
        Top:=79
        Width:=465
        Height:=24
        Font.Color:=clWindow
        Font.Size:=8
      end;
    end;
  end;
  with BeveledLabel do begin
    Left:=10
    Top:=468
    Width:=150
    Height:=14
    Enabled:=False
    Color:=14405068
  end;
end;
end;

var
ProgressLabel: TLabel;

procedure ExtLog();
begin
with WizardForm.ProgressGauge do begin
ProgressLabel.Caption:=IntToStr((Position-Min)/((Max - Min)/100)) + '%'
begin
ProgressLabel:=TLabel.Create(WizardForm)
with WizardForm.ProgressGauge do
begin
ProgressLabel.Top:=4
ProgressLabel.Left:=200
ProgressLabel.Caption:='0%'
ProgressLabel.AutoSize:=True
ProgressLabel.Font.Color:=clWindowText
ProgressLabel.Font.Style:=[fsBold]
ProgressLabel.Transparent:=True
ProgressLabel.Parent:=WizardForm.ProgressGauge
end;
end;
end;
end;

procedure BackupData0(FileExt: String);
var
  OldValueData: string;
begin
  if RegKeyExists(HKCR, '.' + FileExt) then
    begin
      RegQueryStringValue(HKCR, '.' + FileExt, '', OldValueData);
      RegWriteStringValue(HKCR, '.' + FileExt + '(backup)', '', OldValueData);
    end;
end;

procedure RestoreData0(FileExt: String);
var
  OldValueData: string;
begin
  if RegKeyExists(HKCR, '.' + FileExt + '(backup)')then
    begin
      RegQueryStringValue(HKCR, '.' + FileExt + '(backup)', '', OldValueData);
      RegWriteStringValue(HKCR, '.' + FileExt, '', OldValueData);
      RegDeleteKeyIncludingSubkeys(HKCR, '.' + FileExt + '(backup)');
    end;
end;

procedure BackupData1(FileExt: String);
var
  OldValueData: string;
begin
  if RegKeyExists(HKLM, '.' + FileExt) then
    begin
      RegQueryStringValue(HKLM, '.' + FileExt, '', OldValueData);
      RegWriteStringValue(HKLM, '.' + FileExt + '(backup)', '', OldValueData);
    end;
end;

procedure RestoreData1(FileExt: String);
var
  OldValueData: string;
begin
  if RegKeyExists(HKLM, '.' + FileExt + '(backup)')then
    begin
      RegQueryStringValue(HKLM, '.' + FileExt + '(backup)', '', OldValueData);
      RegWriteStringValue(HKLM, '.' + FileExt, '', OldValueData);
      RegDeleteKeyIncludingSubkeys(HKLM, '.' + FileExt + '(backup)');
    end;
end;

procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin
  if CurUninstallStep = usPostUninstall then
    begin
      RestoreData0('asp');
      RestoreData0('bsh');
      RestoreData0('cc');
      RestoreData0('cs');
      RestoreData0('css');
      RestoreData0('inc');
      RestoreData0('ini');
      RestoreData0('java');
      RestoreData0('js');
      RestoreData0('jsp');
      RestoreData0('log');
      RestoreData0('lst');
      RestoreData0('lua');
      RestoreData0('mx');
      RestoreData0('nfo');
      RestoreData0('pas');
      RestoreData0('php');
      RestoreData0('pl');
      RestoreData0('rc');
      RestoreData0('sh');
      RestoreData0('sql');
      RestoreData0('tex');
      RestoreData0('txt');
      RestoreData0('vb');
      RestoreData0('vbs');
      RestoreData0('xml');
      RestoreData1('asp');
      RestoreData1('bsh');
      RestoreData1('cc');
      RestoreData1('cs');
      RestoreData1('css');
      RestoreData1('inc');
      RestoreData1('ini');
      RestoreData1('java');
      RestoreData1('js');
      RestoreData1('jsp');
      RestoreData1('log');
      RestoreData1('lst');
      RestoreData1('lua');
      RestoreData1('mx');
      RestoreData1('nfo');
      RestoreData1('pas');
      RestoreData1('php');
      RestoreData1('pl');
      RestoreData1('rc');
      RestoreData1('sh');
      RestoreData1('sql');
      RestoreData1('tex');
      RestoreData1('txt');
      RestoreData1('vb');
      RestoreData1('vbs');
      RestoreData1('xml');
    end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
var
S: TArrayOfString;
F: string;
i: Integer;
  begin
    If CurStep=ssPostInstall then

    RenameFile(ExpandConstant('{app}\unins000.exe'), ExpandConstant('{app}\uninstall.exe'));
    RenameFile(ExpandConstant('{app}\unins000.dat'), ExpandConstant('{app}\uninstall.dat'));

      F:= ExpandConstant('{app}\config.xml');
        if not FileExists(F) then Exit; // если файла нет, выходим
        LoadStringsFromFile(F, S); // загружаем файл
          for i:= 0 to GetArrayLength(S)-1 do
          if Pos('        <GUIConfig name="stylerTheme" path= />', S[i]) > 0 then
          S[i]:= ExpandConstant('        <GUIConfig name="stylerTheme" path="{app}\stylers.xml" />'); // записываем параметры командной строки
          SaveStringsToFile(F, S, False); // сохраняем файл
  end;

[Run]
Filename: "RegSvr32"; Parameters: "/s NppShell_04.dll"; WorkingDir: "{app}"; Description: "Интегрировать контекстную панель 'Notepad++' в MS Explorer";

[INI]
Filename: "{app}\plugins\Config\SpellChecker.ini"; Section: "Spell-Checker"; Key: "Current Language"; String: "ru"
Filename: "{app}\plugins\Config\SpellChecker.ini"; Section: "Spell-Checker"; Key: "Relative Path"; String: "{app}\plugins\Spell Checker\bin\"

[Icons]
Name: "{userdesktop}\Notepad++"; Filename: "{app}\notepad++.exe"; WorkingDir: "{app}"; Comment: "Notepad++ 5.9.3 RC";
Name: "{group}\Notepad++"; Filename: "{app}\notepad++.exe"; WorkingDir: "{app}"; Comment: "Notepad++ 5.9.3 RC";
Name: "{group}\Help"; Filename: "{app}\NppHelp.chm"; WorkingDir: "{app}"; Comment: "Notepad++ 5.9.3 RC";
Name: "{group}\Uninstall"; Filename: "{uninstallexe}"; WorkingDir: "{app}"; Comment: "Uninstall Notepad++ from your PC"; 

[Languages]
Name: "Russian"; MessagesFile: "embedded\Russian.isl";

Отправлено: 18:25, 19-07-2011 | #2368