-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup_debug.iss
More file actions
150 lines (134 loc) · 6.47 KB
/
Copy pathsetup_debug.iss
File metadata and controls
150 lines (134 loc) · 6.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "GLaSSIST"
#define MyAppVersion "1.1.3"
#define MyAppPublisher "Patryk Smoliński"
#define MyAppURL "https://github.com/SmolinskiP/GLaSSIST"
#define MyAppExeName "GLaSSIST.exe"
[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={{27F7CD5A-57D7-4619-B622-C4D05496FD82}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={localappdata}\{#MyAppName}
UninstallDisplayIcon={app}\{#MyAppExeName}
ArchitecturesAllowed=x64compatible
ArchitecturesInstallIn64BitMode=x64compatible
DisableProgramGroupPage=yes
LicenseFile=I:\GLaSSIST\LICENSE
InfoBeforeFile=I:\GLaSSIST\pre-install-info.txt
InfoAfterFile=I:\GLaSSIST\post-install-info.txt
PrivilegesRequired=lowest
OutputDir=I:\GLaSSIST\inno
OutputBaseFilename=GLaSSIST-Debug
SetupIconFile=I:\GLaSSIST\img\icon.ico
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "autostart"; Description: "Start GLaSSIST automatically when Windows starts"; GroupDescription: "Startup Options"
[Dirs]
Name: "{app}"; Permissions: users-modify
Name: "{userappdata}\GLaSSIST"; Permissions: users-modify
[Files]
Source: "I:\GLaSSIST\dist\GLaSSIST\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "I:\GLaSSIST\dist\GLaSSIST\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "I:\GLaSSIST\.env.example"; DestDir: "{userappdata}\GLaSSIST"; DestName: ".env.example"; Flags: ignoreversion
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Registry]
Root: HKCU; Subkey: "Software\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "GLaSSIST"; ValueData: "{app}\{#MyAppExeName}"; Tasks: autostart; Flags: uninsdeletevalue
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
Filename: "https://github.com/SmolinskiP/GLaSSIST"; Description: "🐙 Visit GitHub Repository"; Flags: shellexec skipifsilent postinstall unchecked
Filename: "https://buymeacoffee.com/smolinskip"; Description: "☕ Buy Developer a Coffee"; Flags: shellexec skipifsilent postinstall unchecked
[Code]
var
HAHostPage: TInputQueryWizardPage;
HATokenPage: TInputQueryWizardPage;
procedure InitializeWizard;
begin
HAHostPage := CreateInputQueryPage(wpSelectTasks,
'Home Assistant Configuration', 'Enter your Home Assistant server address',
'Please enter your Home Assistant server address without http:// or https://' + #13#10 + #13#10 +
'Examples:' + #13#10 +
'• Local: 192.168.1.100:8123 or homeassistant.local:8123' + #13#10 +
'• Nabu Casa: yourlonglink.ui.nabu.casa' + #13#10 +
'• Custom domain: my-home.domain.com' + #13#10 +
'• DuckDNS: myhome.duckdns.org:8123');
HAHostPage.Add('Server Address (no http/https):', False);
HATokenPage := CreateInputQueryPage(HAHostPage.ID,
'Access Token', 'Home Assistant Authentication',
'Enter your long-lived access token from Home Assistant:' + #13#10 + #13#10 +
'HOW TO GET ACCESS TOKEN:' + #13#10 +
'1. Open Home Assistant → Profile (your name, bottom left) → Security' + #13#10 +
'2. Scroll to "Long-Lived Access Tokens" section' + #13#10 +
'3. Click "CREATE TOKEN", name it "GLaSSIST Desktop"' + #13#10 +
'4. Copy the token and paste below' + #13#10 + #13#10 +
'⚠️ Keep this token secure - treat it like a password!');
HATokenPage.Add('Long-Lived Access Token:', True);
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
EnvContent: string;
EnvPath: string;
EnvDir: string;
begin
if CurStep = ssPostInstall then begin
EnvDir := ExpandConstant('{localappdata}\GLaSSIST\_internal');
EnvPath := EnvDir + '\.env';
// Create directory if it doesn't exist
if not DirExists(EnvDir) then
CreateDir(EnvDir);
// Create full .env file
EnvContent := '# === CONNECTION ===' + #13#10 +
'HA_HOST=' + HAHostPage.Values[0] + #13#10 +
'HA_TOKEN=' + HATokenPage.Values[0] + #13#10 +
'HA_PIPELINE_ID=' + #13#10 +
'' + #13#10 +
'# === ACTIVATION ===' + #13#10 +
'HA_HOTKEY=ctrl+shift+g' + #13#10 +
'' + #13#10 +
'# === AUDIO ===' + #13#10 +
'HA_SAMPLE_RATE=16000' + #13#10 +
'HA_CHANNELS=1' + #13#10 +
'HA_FRAME_DURATION_MS=30' + #13#10 +
'HA_PADDING_MS=300' + #13#10 +
'' + #13#10 +
'# === VOICE DETECTION (VAD) ===' + #13#10 +
'HA_VAD_MODE=3' + #13#10 +
'HA_SILENCE_THRESHOLD_SEC=1.5' + #13#10 +
'' + #13#10 +
'# === NETWORK ===' + #13#10 +
'ANIMATION_PORT=8765' + #13#10 +
'' + #13#10 +
'# === AUDIO FEEDBACK ===' + #13#10 +
'HA_SOUND_FEEDBACK=true' + #13#10 +
'HA_PROCESSING_SOUND=false' + #13#10 +
'HA_SOUND_ACTIVATION=activation.wav' + #13#10 +
'HA_SOUND_DEACTIVATION=deactivation.wav' + #13#10 +
'HA_SOUND_PROCESSING=processing.wav' + #13#10 +
'' + #13#10 +
'# === WAKE WORD DETECTION ===' + #13#10 +
'HA_WAKE_WORD_ENABLED=true' + #13#10 +
'HA_WAKE_WORD_MODELS=glados,computer_v2' + #13#10 +
'HA_WAKE_WORD_THRESHOLD=0.5' + #13#10 +
'HA_WAKE_WORD_VAD_THRESHOLD=0.3' + #13#10 +
'HA_WAKE_WORD_NOISE_SUPPRESSION=false' + #13#10 +
'' + #13#10 +
'# === DEBUG ===' + #13#10 +
'DEBUG=true';
// Save only if user provided connection details
if (HAHostPage.Values[0] <> '') and (HATokenPage.Values[0] <> '') then begin
SaveStringToFile(EnvPath, EnvContent, False);
end;
end;
end;