Skip to content

Commit

Permalink
* Refactoring (Installer)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy Penkov committed May 23, 2023
1 parent 16c0202 commit ed0b9ee
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 75 deletions.
37 changes: 37 additions & 0 deletions Installer/Common.iss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,45 @@ AllowNoIcons=yes
Compression=lzma/ultra
SolidCompression=yes
LicenseFile=Common\License.txt
VersionInfoVersion = {#AppVersion}
AppName = {#MyAppName}
DefaultDirName = {commonpf}\{#MyAppName}\
DefaultGroupName = {#MyAppName}
AppVerName = {#MyAppName + " v. " + ShortVersion}
UninstallDisplayIcon = {app}\{#AppExeName}
AppPublisherURL = {#AppURL + MyAppName + '/'}
AppSupportURL = {#AppURL + MyAppName + '/'}
AppUpdatesURL = {#AppURL + MyAppName + '/'}

[Dirs]
Name: "{userappdata}\{#MyAppName}"; Permissions: everyone-modify

[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#AppExeName}; WorkingDir: {app}; IconFilename: {app}\{#AppExeName}; IconIndex: 0; Comment: {#MyAppName}
Name: {group}\Довідка {#MyAppName}; Filename: {app}\{#MyAppName}.chm; WorkingDir: {app}; IconFilename: {sys}\ieframe.dll; IconIndex: 36; Comment: {#MyAppName} Help
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#AppExeName}; WorkingDir: {app}; IconFilename: {app}\{#AppExeName}; IconIndex: 0; Comment: {#MyAppName}; Tasks: desktopicon
Name: {group}\{#MyAppName} website; Filename: {app}\{#MyAppName}.url; IconFilename: {sys}\ieframe.dll; IconIndex: 36
Name: {group}\{cm:UninstallProgram, My Home Library}; Filename: {uninstallexe}
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#AppExeName}"; Tasks: quicklaunchicon

[UninstallDelete]
Name: {userappdata}\{#MyAppName}\Data; Type: filesandordirs
Name: {userappdata}\{#MyAppName}\Presets; Type: filesandordirs
Name: {userappdata}\{#MyAppName}\*.*; Type: files
Name: {userappdata}\{#MyAppName}; Type: dirifempty
Name: {app}; Type: files

[Run]
Filename: {app}\{#AppExeName}; WorkingDir: {app}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent; Check: ; Tasks:

[Files]
Source: {#FullSourcePath}; DestDir: {app}; DestName: {#AppExeName}; Flags: replacesameversion

[Files]
Source: {#LibFolder + 'sqlite3.dll'}; DestDir: {app}; Flags: replacesameversion
Source: {#LibFolder + 'libeay32.dll'}; DestDir: {app}; Flags: replacesameversion
Source: {#LibFolder + 'ssleay32.dll'}; DestDir: {app}; Flags: replacesameversion

Source: Common\AlReader\*.*; DestDir: {app}\AlReader
Source: Common\AlReader\AlReader2\*.*; DestDir: {app}\AlReader\AlReader2\
Source: Common\converters\fb2lrf\*.*; DestDir: {app}\converters\fb2lrf\
Expand Down
44 changes: 5 additions & 39 deletions Installer/Setup_Script_MyHomeLib.iss
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
;
;*****************************************************************************

#include "common.iss"

[Setup]
#define SourceFolder = '..\Program\Out\Bin\'
#define AppURL = 'https://github.com/OleksiyPenkov/'
#define AppURL = 'https://github.com/OleksiyPenkov/MyHomeLib'
#define protected Major
#define protected Minor
#define protected Revision
Expand All @@ -26,42 +24,10 @@
#define protected FullSourcePath = SourceFolder + AppExeName

#define AppVersion GetVersionComponents(FullSourcePath, Major, Minor, Revision, Build)
#define protected ShortVersion = Str(Major) +'.' + Str(Minor) +'.' + Str(Revision)
#define protected ShortVersion = Str(Major) +'.' + Str(Minor) +'.' + Str(Revision)
#define LibFolder = 'x86\'

OutputBaseFilename = {#'Setup_' + MyAppName + '_' + ShortVersion}

VersionInfoVersion = {#AppVersion}
AppName = {#MyAppName}
DefaultDirName = {commonpf}\{#MyAppName}\
DefaultGroupName = {#MyAppName}
AppVerName = {#MyAppName + " v. " + ShortVersion}
UninstallDisplayIcon = {app}\{#AppExeName}
AppPublisherURL = {#AppURL + MyAppName + '/'}
AppSupportURL = {#AppURL + MyAppName + '/'}
AppUpdatesURL = {#AppURL + MyAppName + '/'}

[Files]
Source: x86\sqlite3.dll; DestDir: {app}; Flags: replacesameversion
Source: x86\libeay32.dll; DestDir: {app}; Flags: replacesameversion
Source: x86\ssleay32.dll; DestDir: {app}; Flags: replacesameversion
Source: {#FullSourcePath}; DestDir: {app}; DestName: {#AppExeName}; Flags: replacesameversion

[Dirs]
Name: "{userappdata}\{#MyAppName}"; Permissions: everyone-modify
[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#AppExeName}; WorkingDir: {app}; IconFilename: {app}\{#AppExeName}; IconIndex: 0; Comment: {#MyAppName}
Name: {group}\Довідка {#MyAppName}; Filename: {app}\{#MyAppName}.chm; WorkingDir: {app}; IconFilename: {sys}\ieframe.dll; IconIndex: 36; Comment: {#MyAppName} Help
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#AppExeName}; WorkingDir: {app}; IconFilename: {app}\{#AppExeName}; IconIndex: 0; Comment: {#MyAppName}; Tasks: desktopicon
Name: {group}\{#MyAppName} website; Filename: {app}\{#MyAppName}.url; IconFilename: {sys}\ieframe.dll; IconIndex: 36
Name: {group}\{cm:UninstallProgram, My Home Library}; Filename: {uninstallexe}
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#AppExeName}"; Tasks: quicklaunchicon

[UninstallDelete]
Name: {userappdata}\{#MyAppName}\Data; Type: filesandordirs
Name: {userappdata}\{#MyAppName}\Presets; Type: filesandordirs
Name: {userappdata}\{#MyAppName}\*.*; Type: files
Name: {userappdata}\{#MyAppName}; Type: dirifempty
Name: {app}; Type: files

[Run]
Filename: {app}\{#AppExeName}; WorkingDir: {app}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent; Check: ; Tasks:

#include "common.iss"
38 changes: 2 additions & 36 deletions Installer/Setup_Script_MyHomeLib_x64.iss
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@
;
;
;*****************************************************************************

#include "common.iss"

[Setup]
#define SourceFolder = '..\Program\Out\Bin64\'
#define AppURL = 'https://github.com/OleksiyPenkov/'
Expand All @@ -27,43 +24,12 @@

#define AppVersion GetVersionComponents(FullSourcePath, Major, Minor, Revision, Build)
#define protected ShortVersion = Str(Major) +'.' + Str(Minor) +'.' + Str(Revision)
#define LibFolder = 'x64\'

OutputBaseFilename = {#'Setup_' + MyAppName + '_' + ShortVersion + '_x64'}
ArchitecturesInstallIn64BitMode = x64

VersionInfoVersion = {#AppVersion}
AppName = {#MyAppName}
DefaultDirName = {commonpf}\{#MyAppName}\
DefaultGroupName = {#MyAppName}
AppVerName = {#MyAppName + " v. " + ShortVersion}
UninstallDisplayIcon = {app}\{#AppExeName}
AppPublisherURL = {#AppURL + MyAppName + '/'}
AppSupportURL = {#AppURL + MyAppName + '/'}
AppUpdatesURL = {#AppURL + MyAppName + '/'}

[Files]
Source: x64\sqlite3.dll; DestDir: {app}; Flags: replacesameversion
Source: x64\libeay32.dll; DestDir: {app}; Flags: replacesameversion
Source: x64\ssleay32.dll; DestDir: {app}; Flags: replacesameversion
Source: {#FullSourcePath}; DestDir: {app}; DestName: {#AppExeName}; Flags: replacesameversion

[Dirs]
Name: "{userappdata}\{#MyAppName}"; Permissions: everyone-modify
[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#AppExeName}; WorkingDir: {app}; IconFilename: {app}\{#AppExeName}; IconIndex: 0; Comment: {#MyAppName}
Name: {group}\Довідка {#MyAppName}; Filename: {app}\{#MyAppName}.chm; WorkingDir: {app}; IconFilename: {sys}\ieframe.dll; IconIndex: 36; Comment: {#MyAppName} Help
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#AppExeName}; WorkingDir: {app}; IconFilename: {app}\{#AppExeName}; IconIndex: 0; Comment: {#MyAppName}; Tasks: desktopicon
Name: {group}\{#MyAppName} website; Filename: {app}\{#MyAppName}.url; IconFilename: {sys}\ieframe.dll; IconIndex: 36
Name: {group}\{cm:UninstallProgram, My Home Library}; Filename: {uninstallexe}
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#AppExeName}"; Tasks: quicklaunchicon
#include "common.iss"

[UninstallDelete]
Name: {userappdata}\{#MyAppName}\Data; Type: filesandordirs
Name: {userappdata}\{#MyAppName}\Presets; Type: filesandordirs
Name: {userappdata}\{#MyAppName}\*.*; Type: files
Name: {userappdata}\{#MyAppName}; Type: dirifempty
Name: {app}; Type: files

[Run]
Filename: {app}\{#AppExeName}; WorkingDir: {app}; Description: {cm:LaunchProgram,{#MyAppName}}; Flags: nowait postinstall skipifsilent; Check: ; Tasks:

Binary file modified Program/MyhomeLib.identcache
Binary file not shown.

0 comments on commit ed0b9ee

Please sign in to comment.