Skip to content

Commit 7acfad1

Browse files
committed
added offline installer
1 parent eb7e3bd commit 7acfad1

File tree

4 files changed

+79
-7
lines changed

4 files changed

+79
-7
lines changed

deployment/deploy_windows.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ IF "%~1"=="" (
3030
exit /b 1
3131
)
3232
mkdir installer
33-
iscc /J"%~1" ./deployment/windows_installer/tip_setup.iss
33+
iscc /J"%~1" ./deployment/windows_installer/tip_setup_online.iss
34+
iscc /J"%~1" ./deployment/windows_installer/tip_setup_offline.iss
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
; "Text Insertion Program (TIP)" is a software
2+
; for client management and generating unique images for each client.
3+
; Copyright (C) 2024 Pavel Remdenok
4+
;
5+
; This program is free software: you can redistribute it and/or modify
6+
; it under the terms of the GNU General Public License as published by
7+
; the Free Software Foundation, either version 3 of the License, or
8+
; (at your option) any later version.
9+
;
10+
; This program is distributed in the hope that it will be useful,
11+
; but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
; GNU General Public License for more details.
14+
;
15+
; You should have received a copy of the GNU General Public License
16+
; along with this program. If not, see <https://www.gnu.org/licenses/>.
17+
18+
#define MyAppName "TIP"
19+
#define MyAppVersion "8.0"
20+
#define MyAppPublisher "Pavel Remdenok"
21+
#define MyAppURL "https://github.com/pavel-cpp"
22+
#define MyAppExeName "TIP.exe"
23+
24+
[Setup]
25+
AppId={{FEE4A6CD-D4BE-4A0C-A7C7-2E64173A3160}
26+
AppName={#MyAppName}
27+
AppVersion={#MyAppVersion}
28+
AppPublisher={#MyAppPublisher}
29+
AppPublisherURL={#MyAppURL}
30+
AppSupportURL={#MyAppURL}
31+
AppUpdatesURL={#MyAppURL}
32+
DefaultDirName={autopf}\{#MyAppName}
33+
DefaultGroupName={#MyAppName}
34+
AllowNoIcons=yes
35+
;PrivilegesRequired=lowest
36+
PrivilegesRequiredOverridesAllowed=commandline
37+
OutputDir=..\..\installer
38+
OutputBaseFilename=tip_setup_offline
39+
SetupIconFile=..\..\source\resources\icon.ico
40+
Compression=lzma
41+
SolidCompression=yes
42+
WizardStyle=modern
43+
44+
[Languages]
45+
Name: "english"; MessagesFile: "compiler:Default.isl"
46+
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
47+
48+
[Tasks]
49+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
50+
51+
[Files]
52+
Source: "..\..\build\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
53+
54+
[Icons]
55+
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
56+
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
57+
58+
[Run]
59+
; Filename: "{tmp}\vcredist_x86.exe"; Parameters: "/S"; StatusMsg: "Installing vcredist_x86..."; Flags: waituntilterminated
60+
; Filename: "{tmp}\vcredist_x64.exe"; Parameters: "/S"; StatusMsg: "Installing vcredist_x64..."; Flags: waituntilterminated
61+
; Filename: "{tmp}\Win64OpenSSL-1_1_1w.exe"; Parameters: "/S"; StatusMsg: "Installing OpenSSL..."; Flags: waituntilterminated
62+
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
63+
64+
; [Code]
65+
; procedure InitializeWizard();
66+
; begin
67+
; idpAddFile('https://aka.ms/vs/17/release/vc_redist.x86.exe', ExpandConstant('{tmp}\vcredist_x86.exe'));
68+
; idpAddFile('https://aka.ms/vs/17/release/vc_redist.x64.exe', ExpandConstant('{tmp}\vcredist_x64.exe'));
69+
; idpAddFile('https://slproweb.com/download/Win64OpenSSL-1_1_1w.exe', ExpandConstant('{tmp}\Win64OpenSSL-1_1_1w.exe'));
70+
; idpDownloadAfter(wpReady);
71+
; end;

deployment/windows_installer/tip_setup.iss renamed to deployment/windows_installer/tip_setup_online.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ AllowNoIcons=yes
3535
;PrivilegesRequired=lowest
3636
PrivilegesRequiredOverridesAllowed=commandline
3737
OutputDir=..\..\installer
38-
OutputBaseFilename=tip_setup
38+
OutputBaseFilename=tip_setup_online
3939
SetupIconFile=..\..\source\resources\icon.ico
4040
Compression=lzma
4141
SolidCompression=yes

source/interfaces/options/options.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void Options::on_theme_combo_box_currentIndexChanged(int) {
9292
}
9393

9494
void Options::on_change_button_ex_1_clicked() {
95-
if(FontEditor(settings_buffer_.font_settings[0], this).exec() != QDialog::Accepted){
95+
if (FontEditor(settings_buffer_.font_settings[0], this).exec() != QDialog::Accepted) {
9696
return;
9797
}
9898
ui->example_1->setFont(settings_buffer_.font_settings[0].font);
@@ -103,7 +103,7 @@ void Options::on_change_button_ex_1_clicked() {
103103
}
104104

105105
void Options::on_change_button_ex_2_clicked() {
106-
if(FontEditor(settings_buffer_.font_settings[1], this).exec() != QDialog::Accepted){
106+
if (FontEditor(settings_buffer_.font_settings[1], this).exec() != QDialog::Accepted) {
107107
return;
108108
}
109109
ui->example_2->setFont(settings_buffer_.font_settings[1].font);
@@ -114,7 +114,7 @@ void Options::on_change_button_ex_2_clicked() {
114114
}
115115

116116
void Options::on_change_button_ex_3_clicked() {
117-
if(FontEditor(settings_buffer_.font_settings[2], this).exec() != QDialog::Accepted){
117+
if (FontEditor(settings_buffer_.font_settings[2], this).exec() != QDialog::Accepted) {
118118
return;
119119
}
120120
ui->example_3->setFont(settings_buffer_.font_settings[2].font);
@@ -125,13 +125,13 @@ void Options::on_change_button_ex_3_clicked() {
125125
}
126126

127127
void Options::on_change_text_position_button_clicked() {
128-
if(TextPositionSelector(settings_buffer_.font_settings, this).exec()){
128+
if (TextPositionSelector(settings_buffer_.font_settings, this).exec()) {
129129
save_type_ |= SettingsManager::SaveType::SAVE_SYNCING;
130130
}
131131
}
132132

133133
void Options::on_database_edit_button_clicked() {
134-
if(DatabaseSettings(settings_buffer_.database, this).exec() == QDialog::Accepted){
134+
if (DatabaseSettings(settings_buffer_.database, this).exec() == QDialog::Accepted) {
135135
save_type_ |= SettingsManager::SaveType::SAVE_DATABASE;
136136
}
137137
}

0 commit comments

Comments
 (0)