ZtupidTS / vcl-styles-plugins

1 stars 0 forks source link

Boot-time of installer highly increases!! #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Create a big sized and exhaustive compressed installer.
For example my uncompressed files sizes around 800 mb, and the compresseed 
installer sizes around 400 mb.

I've used this compression parameters:

Compression=lzma/ultra64
InternalCompressLevel=ultra64

2. Put the desired skin and the vcl-styles dll into the {tmp} folder, and 
expand this folder the last.

To understand what I mean with an example:

[Files]
; Files
Source: {app}\*; DestDir: {app}
; VCL Styles
Source: {tmp}\uninstall.dll; DestDir: {app}
Source: {tmp}\uninstall.vsf; DestDir: {app}

3. Build and run the installer, at this point the welcome page of the installer 
will be shown after 10, 20, or maybe 60 seconds, depending on the the files and 
the compression.

4. Comparission: Build the same installer but without using vcl-styles, the 
welcome page will be shown instantly, in 1 second.

5. Comparission: Build the same installer but expanding the vcl-styles the 
first, the welcome page will be shown more or less in 1-2 seconds.

Something like this:

[Files]
; VCL Styles
Source: {tmp}\uninstall.dll; DestDir: {app}
Source: {tmp}\uninstall.vsf; DestDir: {app}
; Files
Source: {app}\*; DestDir: {app}

What is the expected output? What do you see instead?

I just would like to know whether this is a vcl-styles internal problem or is 
an issue related to the design/structure of inno-setup and its compiler and 
then vcl-styles has nothing to do.

Thanks for read!

Please provide any additional information below.

This is the installer source code if needed:
--------------------------------------------

#define Version "1.0"
#define AppName "Photoshop Resource Pack"

[Setup]
AppName={#AppName}
AppID={#AppName}
AppVerName={#AppName} {#Version}
AppVersion={#Version}
DefaultDirName={reg:HKCU\Software\Adobe\Photoshop\80.0,SettingsFilePath}
DefaultGroupName={#AppName}
UninstallDisplayIcon={reg:HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninsta
ll\Photoshop_is1,DisplayIcon}
OutputBaseFilename={#AppName}
Compression=lzma/ultra64
InternalCompressLevel=ultra64
SolidCompression=true
AlwaysShowComponentsList=False
DisableDirPage=True
DisableProgramGroupPage=True
DisableReadyPage=True
DisableStartupPrompt=True
FlatComponentsList=False
LanguageDetectionMethod=None
RestartIfNeededByRun=False
ShowLanguageDialog=NO
ShowTasksTreeLines=True
SetupIconFile=Icon.ico
Uninstallable=True
ArchitecturesAllowed=x86 x64
ArchitecturesInstallIn64BitMode=x64
WizardImageFile=embedded\WizardImage.bmp
WizardSmallImageFile=embedded\WizardSmallImage.bmp
InfoBeforeFile=embedded\InfoBefore.rtf

[Files]
; Files
Source: {app}\Actions Palette.psp; DestDir: {app}; Flags: ignoreversion; Tasks: 
actions
Source: {app}\Brushes.psp; DestDir: {app}; Flags: ignoreversion; Tasks: brushes
Source: {app}\CustomShapes.psp; DestDir: {app}; Flags: ignoreversion; Tasks: 
shapes
Source: {app}\Gradients.psp; DestDir: {app}; Flags: ignoreversion; Tasks: 
gradients
Source: {app}\Patterns.psp; DestDir: {app}; Flags: ignoreversion; Tasks: 
patterns
Source: {app}\Styles.psp; DestDir: {app}; Flags: ignoreversion; Tasks: styles
Source: {app}\Swatches.psp; DestDir: {app}; Flags: ignoreversion; Tasks: 
swatches
Source: {tmp}\*; DestDir: {tmp}; Flags: deleteafterinstall
; VCL Styles
Source: {tmp}\uninstall.dll; DestDir: {app}; Flags: ignoreversion 
uninsneveruninstall
Source: {tmp}\uninstall.vsf; DestDir: {app}; Flags: ignoreversion

[Tasks]
Name: actions; Description: Actions
Name: brushes; Description: Brushes
Name: gradients; Description: Gradients
Name: patterns; Description: Patterns
Name: shapes; Description: Shapes
Name: styles; Description: Styles
Name: swatches; Description: Swatches

[Code]

// ************************
// Uninstallation Variables
// ************************

Var
  UninstallIsDemanded: Boolean; // Determines whether the user accepted or denied the uninstallation prompt.
  UninstallSuccess   : Boolean; // Determines whether the uninstallation succeeded.

// *****************
// VCL Style Imports
// *****************

//+ Installer
// Import the ANSI LoadVCLStyle function from VclStylesInno.DLL
procedure LoadVCLStyle(VClStyleFile: String); external 
'LoadVCLStyleA@files:uninstall.dll stdcall setuponly';
procedure LoadVCLStyle_UnInstall(VClStyleFile: String); external 
'LoadVCLStyleA@{app}\uninstall.dll stdcall uninstallonly';

//+ Uninstaller
// Import the ANSI UnLoadVCLStyles function from VclStylesInno.DLL
procedure UnLoadVCLStyles; external 'UnLoadVCLStyles@files:uninstall.dll 
stdcall setuponly';
procedure UnLoadVCLStyles_UnInstall; external 
'UnLoadVCLStyles@{app}\uninstall.dll stdcall uninstallonly';

// **********
// Procedures
// **********

// Deletes the VCL skin dll file after uninstall.
procedure DeleteSkin(dll: String);
begin
  If FileExists(dll) then begin
    DeleteFile(dll);
  end;
end;

// ****************
// Installer Events
// ****************

//E: Occurs when the installer initializes.
function InitializeSetup(): Boolean;
begin

    // Initialize the VCL skin style.
    ExtractTemporaryFile('uninstall.vsf');
    LoadVCLStyle(ExpandConstant('{tmp}\uninstall.vsf'));

    Result := True;

end;

//E: Occurs when the installer deinitializes.
procedure DeinitializeSetup();
begin
    // Deinitialize the VCL skin style.
    UnLoadVCLStyles;
end;

// ******************
// Uninstaller Events
// ******************

//E: Occurs when the uninstaller current page changes.
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
begin

  if CurUninstallStep = usUninstall then begin
      UninstallIsDemanded:= True;
  end;

  if CurUninstallStep = usDone then begin
      UninstallSuccess:= True;
  end;

end;

//E: Occurs when the uninstaller initializes.
function InitializeUninstall: Boolean;
begin

  Result := True;

  // Initialize the VCL skin style.
  If FileExists(ExpandConstant('{app}\uninstall.vsf')) then begin
    LoadVCLStyle_UnInstall(ExpandConstant('{app}\uninstall.vsf'));
  end;

end;

//E: Occurs when the uninstaller deinitializes.
procedure DeinitializeUninstall();
begin

  // Deinitialize the VCL skin style.
  If FileExists(ExpandConstant('{app}\uninstall.dll')) then begin
    UnLoadVCLStyles_UnInstall;
    UnloadDll(ExpandConstant('{app}\uninstall.dll'));
  end;

  if UninstallSuccess = True then begin

    // Delete the VCL skin dll file.
    DeleteSkin(ExpandConstant('{app}\uninstall.dll'));

  end;

end;

Original issue reported on code.google.com by ElektroS...@elhacker.net on 25 Nov 2014 at 6:57

GoogleCodeExporter commented 9 years ago
In case of this is an inno-setup issue and vcl-styles is not involved, or maybe 
if just its an end-user ignorance (like mine) of expanding the vcl-styles the 
last then I highly recommend the author to note this information in the "How to 
use" page maybe in a FAQ: 
http://code.google.com/p/vcl-styles-plugins/wiki/VCLStylesInnoSetup

Original comment by ElektroS...@elhacker.net on 25 Nov 2014 at 7:01

GoogleCodeExporter commented 9 years ago
This behavior is documented on the inno docs 
http://www.jrsoftware.org/ishelp/index.php?topic=scriptdll

"...If you use a 'files:' prefix and solid compression is enabled, be sure to 
list your DLLs at (or near) the top of the [Files] section. In order to extract 
an arbitrary file in a solid-compressed installation, Setup must first 
decompress all prior files (to a temporary buffer in memory). This can result 
in a substantial delay if a number of other files are listed above the 
specified file in the [Files] section."

Original comment by Rodrigo.Ruz.V@gmail.com on 25 Nov 2014 at 7:52

GoogleCodeExporter commented 9 years ago
Thanks a lot for the useful documentation, just as what I was thinked this is 
just a wrong end-user usage due to a missunderstanding of innosetup internals.

But this tip could be very useful to know for new users that tries vcl-styles, 
maybe they encounter the same issue and thinks its a bug or something else, I 
just suggest to note the proper usage in the "How to use" section :P

Thanks again.

Original comment by ElektroS...@elhacker.net on 25 Nov 2014 at 8:06

GoogleCodeExporter commented 9 years ago
No problem, I will update the inno setup documentation soon ;)

Original comment by Rodrigo.Ruz.V@gmail.com on 25 Nov 2014 at 8:08