ISDone

DLL ISDone 0.6 final

Нет прав для скачивания

Artag

Мимокрокодил
i can confirm that
SrepInit('',128,0)
writes 128 on cls.ini
but also writes 128b on arc.ini
yes, it puts the b after the number, so i'm using 128 bytes for srep
maybe a bug?
does anyone has an older version to make a test?
 

Artag

Мимокрокодил
i can't use srep+ini because isdone will replace -mem512mb with -mem512b
I'm using cls-srep for now, but yes, it's a bug on isdone
Thanks
 

vint56

Ветеран
Проверенный
nizcoz,
Winst@n
В: Можно ли сделать свою форму запроса следующего диска.
О: Можно вот так. (Адаптация под isDone, под модуль Shegorat'a не делалось)
[Setup]
AppName=My Program
AppVersion=1.5
AppPublisher=Winst@n, Inc.
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
OutputDir=.
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

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


[Files]
Source: {win}\help\*; DestDir: {app}\files1\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files2\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files3\; Flags: external recursesubdirs;
Source: {win}\help\*; DestDir: {app}\files4\; Flags: external recursesubdirs;

Код:
var
  TNewDiskForm :TSetupForm;
  DiskBitmapImage: TBitmapImage;
  SelectDiskLabel,PathLabel: TLabel;
  PathEdit: TEdit;
  BrowseButton: TButton;
  OKButton: TButton;
  CancelButton: TButton;
  Filename: String;
  Path: String;
  Dir: String;
  ModalResult: Longint;


//Пути поиска файла
function GetSanitizedPath: String;
begin
  Result := Trim(PathEdit.Text);
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
  Cancel :=True;
  Confirm :=False;
end;

//Кнопки Обзор
procedure BrowseButtonClick(Sender: TObject);
begin
  Dir := GetSanitizedPath;
  if BrowseForFolder(SetupMessage (msgSelectDirectoryLabel), Dir, False) then
    PathEdit.Text := Dir + '\';
  TNewDiskForm.Show;
end;

// Форма зыкрытия (работает mrOK)
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
  Path := PathEdit.Text;
  Filename:= ExpandConstant ('data_2.arc');

  case TNewDiskForm.ModalResult of
    mrOK:
    begin
      if (Path = '') or not FileExists(Path + Filename) then
      begin
        CanClose := false
        MsgBox(FmtMessage(SetupMessage(msgFileNotInDir2), [Filename, Path]), mbError, MB_OK);
      end;
    end;
    mrCancel:
    begin
      CanClose := True;
    end;
  end;
end;

// запрос диска
procedure SelectDisk(const DiskNumber: Integer; const Filename, Path: String);
var
  ExitFlag:Boolean;
begin
  repeat
    TNewDiskForm:= CreateCustomForm();
    TNewDiskForm.SetBounds(ScaleX(0), ScaleY(0), ScaleX(377), ScaleY(200));
    TNewDiskForm.CenterInsideControl(WizardForm, False);
    TNewDiskForm.Caption:=SetupMessage(msgChangeDiskTitle);
    TNewDiskForm.Font.Color:= clWindowText
    TNewDiskForm.Font.Height:= -11
    TNewDiskForm.Font.Name:= 'MS Sans Serif'
    TNewDiskForm.Font.Style:= []
    TNewDiskForm.OnCloseQuery:=@FormCloseQuery;

    SelectDiskLabel:=TLabel.Create(TNewDiskForm)
    SelectDiskLabel.SetBounds(ScaleX(72),ScaleY(8), ScaleX(297), ScaleY(72));
    SelectDiskLabel.AutoSize:=False
    SelectDiskLabel.WordWrap:=True
    SelectDiskLabel.Transparent:=True
    SelectDiskLabel.Font.Color:=clBlack
    SelectDiskLabel.Font.Size:=8
    SelectDiskLabel.Caption:=FmtMessage(SetupMessage(msgSelectDiskLabel2), [IntToStr(DiskNumber)]);
    SelectDiskLabel.Parent:=TNewDiskForm
    SelectDiskLabel.ShowAccelChar:= False

    PathEdit:=TEdit.Create(TNewDiskForm)
    PathEdit.SetBounds(ScaleX(8), ScaleY(96), ScaleX(281), ScaleY(21));
    PathEdit.TabOrder:=2
    PathEdit.Text := ExpandConstant('{src}\');
    PathEdit.Parent := TNewDiskForm;

    PathLabel:= TLabel.Create(TNewDiskForm);
    PathLabel.SetBounds(ScaleX(8),ScaleY(80), ScaleX(5), ScaleY(14));
    PathLabel.Font.Color:=clBlack
    PathLabel.FocusControl:= PathEdit
    PathLabel.Caption := SetupMessage(msgPathLabel);
    PathLabel.Parent:=TNewDiskForm

    BrowseButton := TNewButton.Create(TNewDiskForm);
    BrowseButton.SetBounds(ScaleX(296), ScaleY(95), ScaleX(73), ScaleY(23));
    BrowseButton.Parent := TNewDiskForm;
    BrowseButton.OnClick:=@BrowseButtonClick;
    BrowseButton.Caption := SetupMessage(msgButtonBrowse);

    CancelButton := TNewButton.Create(TNewDiskForm);
    CancelButton.SetBounds(ScaleX(296), ScaleY(137), ScaleX(73), ScaleY(23));
    CancelButton.ModalResult := mrCancel;
    CancelButton.Parent := TNewDiskForm;
    CancelButton.Caption := SetupMessage (msgButtonCancel);

    OkButton := TNewButton.Create(TNewDiskForm);
    OkButton.SetBounds(ScaleX(216), ScaleY(137), ScaleX(73), ScaleY(23));
    OkButton.ModalResult := mrOk;
    OkButton.Parent := TNewDiskForm;
    OKButton.Caption := SetupMessage(msgButtonOK);

    TNewDiskForm.ShowModal;

    //закрытие формы (работает mrCancel)
    case TNewDiskForm.ModalResult of
      mrCancel:
      begin
        MsgBox('Вы не смогли найти путь до архива или правильно указать место расположения диска. Произошла ошибка, установка будет прервона.',mbError, MB_OK);
        TNewDiskForm.Free;
        ExitFlag := ExitSetupMsgBox;

        case ExitFlag of
          True: WizardForm.Close;
          False: SelectDisk (DiskNumber,Filename,Path);
          True: TNewDiskForm.free;
        end;
    end;
  end;
  until ((TNewDiskForm.ModalResult=mrOk) or (TNewDiskForm.ModalResult = mrCancel));
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  // Запуск формы распаковки            № диска          место поиска
  //                                       |                |
  if CurStep = ssInstall then  SelectDisk (2, 'Filename','{src}');
end;
[/SPOILER]
 

Nemko

Дилетант
Модератор
nizcoz, sort of its normal. If you do not specify the second disk, a message is displayed indicating that the program will be closed (the text changes in the code) and then the program closes. Plus an error is shown that there is no archive ISDone.
 

nizcoz

Участник
@Nemko

Edit:

First, thanks for your answer. If I use this code, the form is always displayed, regardless of whether the file is present or not. And now, if the file is not present, and i indicate the location of the file, the setup is not continuing. I want to show this Form only if the file (.arc) is not found and that works fine if i indicate the correct location of the file. How to fix this?
 
Последнее редактирование:

nizcoz

Участник
@Nemko @vint56 Finally, I modified the code to work as I want (it only starts when the file is not present, I indicate where it is and the process continues). The only problem is that ISDone does not detect this new location I have indicated and the error appears. How to fix this?

Error: ISDone.dll It is not found any file specified for ISArcExtract

Edit: Is it possible to automatically edit this line:
Код:
if not ISArcExtract ( 0, 0, ExpandConstant('{src}\data.bin'), ExpandConstant('{app}'), '', false, '', '', ExpandConstant('{app}'), notPCFonFLY {PCFonFLY}) then break;
if the path of the file is change?


 
Последнее редактирование:

nizcoz

Участник
At the 2 minutes of installation, the seconds are not longer displayed. How to solve this?
 
Последнее редактирование:
Сверху