Skip to content

Commit

Permalink
Changed installer's tessdata handling.
Browse files Browse the repository at this point in the history
  • Loading branch information
OneMoreGres committed Jun 25, 2017
1 parent 0bab1d6 commit f3732c9
Show file tree
Hide file tree
Showing 6 changed files with 735 additions and 347 deletions.
2 changes: 2 additions & 0 deletions distr/Changelog_en.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Changes.
2.0.1:
* Fixed installer.
2.0.0:
* Added a version for linux.
* Added support for multiple monitors.
Expand Down
2 changes: 2 additions & 0 deletions distr/Changelog_ru.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
���������.
2.0.1:
* ��������� ����������.
2.0.0:
* ��������� ������ ��� linux.
* ��������� ��������� ���������� ���������.
Expand Down
11 changes: 7 additions & 4 deletions distr/iss/InnoSetup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Screen Translator"
#define MyAppVersion "2.0.0"
#define MyAppVersion "2.0.1"
#define MyAppPublisher "Gres"
#define MyAppURL "http://gres.biz/screen-translator/"
#define MyAppExeName "ScreenTranslator.exe"
Expand Down Expand Up @@ -64,10 +64,13 @@ Source: "content\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: Lib
Source: "content\platforms\*"; DestDir: "{app}\platforms"; Flags: ignoreversion; Components: Libraries
Source: "content\translators\*"; DestDir: "{app}\translators"; Flags: ignoreversion; Components: Translators

[Types]
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: "Executable"; Description: "{cm:Executables}"; Types: compact custom full; Flags: fixed;
Name: "Libraries"; Description: "{cm:Libraries}"; Types: compact custom full; Flags: fixed;
Name: "Translators"; Description: "{cm:Translators}"; Types: compact custom full; Flags: fixed;
Name: "Executable"; Description: "{cm:Executables}"; Types: custom; Flags: fixed;
Name: "Libraries"; Description: "{cm:Libraries}"; Types: custom; Flags: fixed;
Name: "Translators"; Description: "{cm:Translators}"; Types: custom; Flags: fixed;

[CustomMessages]
en.CreateStartupIcon=Create autostart icon
Expand Down
148 changes: 148 additions & 0 deletions distr/iss/InnoSetupWithTessdata.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Screen Translator"
#define MyAppVersion "2.0.1"
#define MyAppPublisher "Gres"
#define MyAppURL "http://gres.biz/screen-translator/"
#define MyAppExeName "ScreenTranslator.exe"
#define MyAppDescription "Screen capture and translation tool"

[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={{016F399E-0EED-476C-AB00-8AD0FF5BFD77}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
PrivilegesRequired=admin
CloseApplications=yes
OutputDir=..
OutputBaseFilename=screen-translator-with-tessdata-{#MyAppVersion}
SetupIconFile=icon.ico
RestartIfNeededByRun=False
ShowLanguageDialog=auto
VersionInfoCompany={#MyAppPublisher}
VersionInfoDescription={#MyAppDescription}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
Compression=lzma2/ultra64
InternalCompressLevel=ultra
SolidCompression=yes

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"; LicenseFile: "LICENSE_en.md"; InfoBeforeFile: "Changelog_en.txt"
Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"; LicenseFile: "LICENSE_ru.md"; InfoBeforeFile: "Changelog_ru.txt"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "startupicon"; Description: "{cm:CreateStartupIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
Name: "{commonstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: startupicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

[Files]
Source: "content\ScreenTranslator.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: Executable
Source: "content\*.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: Libraries
Source: "content\platforms\*"; DestDir: "{app}\platforms"; Flags: ignoreversion; Components: Libraries
Source: "content\translators\*"; DestDir: "{app}\translators"; Flags: ignoreversion; Components: Translators

[Types]
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: "Executable"; Description: "{cm:Executables}"; Types: custom; Flags: fixed;
Name: "Libraries"; Description: "{cm:Libraries}"; Types: custom; Flags: fixed;
Name: "Translators"; Description: "{cm:Translators}"; Types: custom; Flags: fixed;

[CustomMessages]
en.CreateStartupIcon=Create autostart icon
en.Executables=Executables
en.Libraries=Libraries
en.Translators=Translators

ru.CreateStartupIcon=Äîáàâèòü â àâòîçàïóñê
ru.Executables=Èñïîëíÿåìûå ôàéëû
ru.Libraries=Áèáëèîòåêè
ru.Translators=Ïåðåâîä÷èêè

#include "tessdataBuiltin.iss"

[UninstallDelete]
Type: files; Name: "{app}\updates.json"
Type: files; Name: "{app}\st_subs.csv"

[UninstallRun]
Filename: "taskkill.exe"; Parameters: "/IM ScreenTranslator.exe /T /F"


[Code]
#define DwinsHs_Use_Predefined_Downloading_WizardPage
#define DwinsHs_Auto_Continue
#include "dwinshs.iss"

procedure InitializeWizard();
begin
DwinsHs_InitializeWizard(wpPreparing);
end;

procedure CurPageChanged(CurPageID: Integer);
begin
DwinsHs_CurPageChanged(CurPageID, nil, nil);
end;

function ShouldSkipPage(CurPageId: Integer): Boolean;
begin
Result := False;
DwinsHs_ShouldSkipPage(CurPageId, Result);
end;

function BackButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
DwinsHs_BackButtonClick(CurPageID);
end;

function NextButtonClick(CurPageID: Integer): Boolean;
begin
Result := True;
DwinsHs_NextButtonClick(CurPageID, Result);
end;

procedure CancelButtonClick(CurPageID: Integer; var Cancel, Confirm: Boolean);
begin
DwinsHs_CancelButtonClick(CurPageID, Cancel, Confirm);
end;

[CustomMessages]
ru.DwinsHs_PageCaption =Çàãðóçêà ôàéëîâ
ru.DwinsHs_PageDescription =Ïîæàëóéñòà, äîæäèòåñü îêîí÷àíèÿ çàãðóçêè...
ru.DwinsHs_TotalProgress =Îáùèé ïðîãðåññ:
ru.DwinsHs_CurrentFile =Òåêóùèé ôàéë:
ru.DwinsHs_File =Ôàéë:
ru.DwinsHs_Speed =Ñêîðîñòü:
ru.DwinsHs_Status =Ñòàòóñ:
ru.DwinsHs_ElapsedTime =Çàòðà÷åííîå âðåìÿ:
ru.DwinsHs_RemainingTime =Îñòàâøååñÿ âðåìÿ:

ru.DwinsHs_Status_GetFileInformation =Ïîëó÷åíèÿ ðàçìåðà ôàéëà
ru.DwinsHs_Status_StartingDownload =Íà÷àëî çàãðóçêè
ru.DwinsHs_Status_Downloading =Çàãðóçêà
ru.DwinsHs_Status_DownlaodComplete =Çàãðóçêà çàâåðøåíà
Loading

0 comments on commit f3732c9

Please sign in to comment.