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

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

Ветеран


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

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


Nightwishh, тут оно?

---------------------------------------------------------------------------------------------------------------------
neorom, в чем сложность? Скрипт покажите.

Ну и, если хочется проценты через внешнюю библиотеку, пожалуйста:
читать дальше »
Код: Выделить весь код
[Files]
Source: InnoCallback.dll; Flags: dontcopy noencryption nocompression deleteafterinstall;

[Code]

type
  TTimerProc = procedure(HandleW, Msg, idEvent, TimeSys: LongWord);


function WrapTimerProc(callback: TTimerProc; Paramcount: Integer): longword; external 'wrapcallback@{tmp}\InnoCallback.dll stdcall delayload';
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): longword; external 'SetTimer@user32';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord; external 'KillTimer@user32 stdcall delayload';

var
  pLabel: TLabel;
  pTimer: LongWord;

function InitializeSetup(): Boolean;
begin
  if not FileExists(ExpandConstant('{tmp}\InnoCallback.dll')) then ExtractTemporaryFile('InnoCallback.dll');
  Result := True;
end;

function pStr(Float: Extended): String;
begin
  Result:= Format('%.1n', [Float]); StringChange(Result, ',', '.');
  while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
  SetLength(Result, Length(Result)-1);
end;

procedure pInstall(h, msg, idevent, dwTime: Longword);
begin
  with WizardForm.ProgressGauge do
  begin
    pLabel.Caption:= pStr((Position*100)/Max) + '%';
  end;
end;

procedure CurStepChanged(CurStep: TSetupStep);
begin
  case CurStep of
    ssInstall:
    begin
      pLabel := TLabel.Create(nil);
      with pLabel do
      begin
        Parent := WizardForm.ProgressGauge;
        SetBounds(WizardForm.ProgressGauge.Left, WizardForm.ProgressGauge.Top + 2, WizardForm.ProgressGauge.Width, WizardForm.ProgressGauge.Height);
        Alignment := taCenter;
        Align := alNone;
        AutoSize := False;
        Font.Color := clBlack;
        Font.Height := -12;
        Font.Name := 'Tahoma';
        Font.Style := [fsBold];
        Transparent := True;
      end;

      pTimer:= SetTimer(0, 0, 100, WrapTimerProc(@pInstall, 4));
    end;

    ssPostInstall:
    begin
      KillTimer(0, pTimer);
      pLabel.Free;
    end;
  end;
end;

procedure DeinitializeSetup();
begin
  KillTimer(0, pTimer);
end;


---------------------------------------------------------------------------------------------------------------------
Tima182

читать дальше »
Код: Выделить весь код
#define MyAppName "Minecraft"
#define MyAppVersion "1.4.7"
#define MyAppExeName "Minecraft.exe"
#define MultiMinecrafter "MultiMinecrafter.exe"
#define XRAM Launcher "XRAM Launcher.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{30F4D7A3-7C27-4A82-9977-F785B48D23FE}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={userappdata}\.minecraft\
DisableDirPage=true
DefaultGroupName={#MyAppName}
OutputDir=C:\Users\Тима\Desktop
OutputBaseFilename=Minecraft
Compression=lzma/ultra
SolidCompression=true
PrivilegesRequired=none

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

[Files]
;Зачем здесь эта строка, если во второй строке из этой же папки все файлы копируются по маске?
;Source: C:\Users\Тима\AppData\Roaming\.minecraft\Лаунчеры\Minecraft.exe; DestDir: {app}; Flags: ignoreversion

Source: C:\Users\Тима\AppData\Roaming\.minecraft\*; DestDir: {app}; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Icons]
Name: {group}\Minecraft;                          Filename: {app}\Лаунчеры\{#MyAppExeName};     WorkingDir: {app}\Лаунчеры;
Name: {group}\MultiMinecrafter;                   Filename: {app}\Лаунчеры\{#MultiMinecrafter}; WorkingDir: {app}\Лаунчеры;
Name: {group}\XRAM Launcher;                      Filename: {app}\Лаунчеры\{#XRAM Launcher};    WorkingDir: {app}\Лаунчеры;
Name: {group}\{cm:UninstallProgram,{#MyAppName}}; Filename: {uninstallexe};

Name: {commondesktop}\Minecraft;        Filename: {app}\Лаунчеры\{#MyAppExeName};     WorkingDir: {app}\Лаунчеры; Tasks: desktopicon;
Name: {commondesktop}\MultiMinecrafter; Filename: {app}\Лаунчеры\{#MultiMinecrafter}; WorkingDir: {app}\Лаунчеры; Tasks: desktopicon;
Name: {commondesktop}\XRAM Launcher;    Filename: {app}\Лаунчеры\{#XRAM Launcher};    WorkingDir: {app}\Лаунчеры; Tasks: desktopicon;

[Run]
Filename: {app}\Лаунчеры\{#MyAppExeName};     Description: Запустить Minecraft;        Flags: nowait postinstall skipifsilent
Filename: {app}\Лаунчеры\{#MultiMinecrafter}; Description: Запустить MultiMinecrafter; Flags: nowait postinstall skipifsilent unchecked
Filename: {app}\Лаунчеры\{#XRAM Launcher};    Description: Запустить XRAM Launcher;    Flags: nowait postinstall skipifsilent unchecked

Последний раз редактировалось saurn, 08-04-2013 в 05:41.

Это сообщение посчитали полезным следующие участники:

Отправлено: 04:32, 08-04-2013 | #109