From fc2676e40327fc0ac46c529430163a66367b2738 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 21 Jun 2019 23:19:29 -0400 Subject: [PATCH] add installer --- deploy.ps1 | 31 +++++++++++++++++++++++-------- installer.iss | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 8 deletions(-) create mode 100644 installer.iss diff --git a/deploy.ps1 b/deploy.ps1 index f6ddbf8..d0e8188 100644 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -32,11 +32,6 @@ foreach ($language in @{ "Textractor.exe", "TextractorCLI.exe", "texthook.dll", - "Qt5Core.dll", - "Qt5Gui.dll", - "Qt5Widgets.dll", - "LoaderDll.dll", - "LocaleEmulator.dll", "Bing Translate.dll", "Copy to Clipboard.dll", "Extra Newlines.dll", @@ -48,12 +43,32 @@ foreach ($language in @{ "Remove Repeated Phrases.dll", "Remove 30 Repeated Sentences.dll", "Replacer.dll", - "Thread Linker.dll", - "platforms", - "styles" + "Thread Linker.dll" )) { copy -Force -Recurse -Verbose -Destination "$folder/$arch" -Path "Release_$arch/$file"; } } } + +mkdir -Force -Verbose "Runtime"; +rm -Force -Recurse -Verbose "Runtime/*"; +foreach ($file in @( + "Qt5Core.dll", + "Qt5Gui.dll", + "Qt5Widgets.dll", + "LoaderDll.dll", + "LocaleEmulator.dll", + "platforms", + "styles" +)) +{ + foreach ($arch in @("x86", "x64")) + { + mkdir -Force -Verbose "Runtime/$arch"; + copy -Force -Recurse -Verbose -Destination "Runtime/$arch/$file" -Path "Release_$arch/$file"; + } +} + +cd .. +&"C:\Program Files (x86)\Inno Setup 6\iscc.exe" -DVERSION="$version" installer.iss diff --git a/installer.iss b/installer.iss new file mode 100644 index 0000000..6f6ba63 --- /dev/null +++ b/installer.iss @@ -0,0 +1,35 @@ +[Setup] +AllowNoIcons=yes +AppName=Textractor +ArchitecturesAllowed=x86 x64 +AppVersion={#VERSION} +CloseApplications=no +DefaultDirName={userdesktop}\Textractor +DirExistsWarning=no +DefaultGroupName=Textractor +MinVersion=6.1 +OutputBaseFilename=Textractor-{#VERSION}-Setup +OutputDir=Builds +PrivilegesRequired=lowest +SolidCompression=yes +Uninstallable=no + +[Languages] +Name: "en"; MessagesFile: "compiler:Default.isl" +Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl" +Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl" +Name: "tu"; MessagesFile: "compiler:Languages\Turkish.isl" +Name: "sc"; MessagesFile: "compiler:Languages\Unofficial\ChineseSimplified.isl" +Name: "id"; MessagesFile: "compiler:Languages\Unofficial\Indonesian.isl" +Name: "pt"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" + + +[Files] +Source: "Builds\Runtime\*"; DestDir: "{app}"; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor--{#VERSION}\*"; DestDir: "{app}"; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor-Spanish-{#VERSION}\*"; DestDir: "{app}"; Languages: es; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor-Russian-{#VERSION}\*"; DestDir: "{app}"; Languages: es; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor-Turkish-{#VERSION}\*"; DestDir: "{app}"; Languages: tu; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor-Simplified-Chinese-{#VERSION}\*"; DestDir: "{app}"; Languages: sc; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor-Indonesian-{#VERSION}\*"; DestDir: "{app}"; Languages: id; Flags: recursesubdirs ignoreversion +Source: "Builds\Textractor-Portuguese-{#VERSION}\*"; DestDir: "{app}"; Languages: pt; Flags: recursesubdirs ignoreversion