Skip to content

Commit 244f6b5

Browse files
committed
added legacy workload installer config and documentation
1 parent 0c493cb commit 244f6b5

File tree

8 files changed

+322
-13
lines changed

8 files changed

+322
-13
lines changed

Rubberduck.Deployment/InnoSetup/Includes/Czech.CustomMessages.iss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ Czech.WillInstallForCurrentUser=Rubberduck Add-In bude k dispozici pouze pro akt
2222
Czech.UninstallOldVersionPrompt=Vypadá to, že existuje předchozí verze Rubberducku instalována v %s módu a měla by být odinstalována. Pokračovat?
2323
Czech.UninstallOldVersionFail=Nelze odinstalovat předchozí verzi Rubberducku. Zkuste jej odinstalovat pomocí ovládacího panelu - programy a funkce - a poté spustit instalátor znovu.
2424
Czech.WarnInstallPerUserOverEveryone=Zdá se, že je nainstalována verze Rubberducku pro všechny uživatele. Pokud budete pokračovat s per-uživatel instalací, bude mít přednost před původní instalací. Přesto pokračovat?
25-
Czech.ElevationRequestFailMessage=Nelze odinstalovat předchozí verzi Rubberducku. Před instalací nové verze bude nejspíše nutné ji odinstalovat přímo.
25+
Czech.ElevationRequestFailMessage=Nelze odinstalovat předchozí verzi Rubberducku. Před instalací nové verze bude nejspíše nutné ji odinstalovat přímo.
26+
Czech.UseLegacyWorkloadCaption=Initial Configuration
27+
Czech.UseLegacyWorkloadMessage=Planning to use Rubberduck with a large existing project?
28+
Czech.UseLegacyWorkloadDescription=Using 'legacy workload' default initial configuration disables autocompletion features and a number of specific inspections to help performance and reduce memory pressure. Disabled features can be re-enabled any time from the Settings menu.
29+
Czech.UseLegacyWorkloadButtonCaption=Use legacy workload configuration

Rubberduck.Deployment/InnoSetup/Includes/English.CustomMessages.iss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,8 @@ English.UninstallOldVersionPrompt=There seems to be a previous version of Rubber
2323
English.UninstallOldVersionFail=Unable to uninstall the previous version of Rubberduck. Try and uninstall it via the Programs control panel and run the installer again.
2424
English.UninstallOldVersionNotFound=The uninstaller could not be found. Do you want to proceed and install anyway? This may potentially overwrite existing installation and may result in a duplicate entry in the Add & Remove Programs. Proceed anyway?
2525
English.WarnInstallPerUserOverEveryone=There seems to be a version of Rubberduck installed for all users. If you proceed with the per-user install, it will take precedence over the original install. Proceed anyway?
26-
English.ElevationRequestFailMessage=Unable to uninstall the previous version of Rubberduck. You may need to uninstall it directly before you can install the new version.
26+
English.ElevationRequestFailMessage=Unable to uninstall the previous version of Rubberduck. You may need to uninstall it directly before you can install the new version.
27+
English.UseLegacyWorkloadCaption=Initial Configuration
28+
English.UseLegacyWorkloadMessage=Planning to use Rubberduck with a large existing project?
29+
English.UseLegacyWorkloadDescription=Using 'legacy workload' default initial configuration disables autocompletion features and a number of specific inspections to help performance and reduce memory pressure. Disabled features can be re-enabled any time from the Settings menu.
30+
English.UseLegacyWorkloadButtonCaption=Use legacy workload configuration

Rubberduck.Deployment/InnoSetup/Includes/French.CustomMessages.iss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ French.WillInstallForCurrentUser=Le complément Rubberduck sera disponible seule
2222
French.UninstallOldVersionPrompt=Il semble y avoir une version antérieure de Rubberduck installée sur ce système pour %s, qui devra d'abord être désinstallée. Procéder à la désinstallation?
2323
French.UninstallOldVersionFail=Impossible de désinstaller la version antérieure. Essayez de désinstaller via Ajout/Suppression de Programmes dans le panneau de contrôle, puis recommencer l'installation.
2424
French.WarnInstallPerUserOverEveryone=Il semble y avoir une version de Rubberduck installée pour tous les utilisateurs. Procéder à une installation utilisateur simple modifiera l'enregistrement, sans affecter les autres utilisateurs. Procéder?
25-
French.ElevationRequestFailMessage=Impossible de désinstaller la version précédente de Rubberduck. Vous devrez d'abord désinstaller l'ancienne version avant de procéder à la mise à jour.
25+
French.ElevationRequestFailMessage=Impossible de désinstaller la version précédente de Rubberduck. Vous devrez d'abord désinstaller l'ancienne version avant de procéder à la mise à jour.
26+
French.UseLegacyWorkloadCaption=Configuration Initiale
27+
French.UseLegacyWorkloadMessage=Vous planifiez utiliser Rubberduck avec un projet existant?
28+
French.UseLegacyWorkloadDescription=La configuration initiale 'legacy workload' désactive auto-complétion et certaines inspections spécifiques pour réduire la pression sur la mémoire et améliorer la performance. Les fonctionnalités désactivées peuvent être réactivées manuellement à tout moment.
29+
French.UseLegacyWorkloadButtonCaption=Utiliser la configuration initiale 'legacy workload'

Rubberduck.Deployment/InnoSetup/Includes/German.CustomMessages.iss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ German.WillInstallForCurrentUser=Das Rubberduck VBE-AddIn wird für den aktuelle
2222
German.UninstallOldVersionPrompt=Es scheint eine vorige Version von Rubberduck, als Anwendung für %s, installiert zu sein, die Deinstalliert werden sollte. Fortfahren?
2323
German.UninstallOldVersionFail=Konnte vorige Version nicht deinstallieren. Versuchen Sie, diese über die Systemsteuerung zu deinstallieren und starten Sie den Installer erneut.
2424
German.WarnInstallPerUserOverEveryone=Es scheint eine für alle Benutzer installierte Version von Rubberduck vorzuliegen. Eine installation nur für diesen Benutzer wird Vorrang vor der originalen Installation haben. Trotzdem fortfahren?
25-
German.ElevationRequestFailMessage=Konnte vorige Version von Rubberduck nicht deinstallieren. Es kann sein, dass Sie diese manuell deinstallieren müssen, bevor Sie die neue Version installieren können.
25+
German.ElevationRequestFailMessage=Konnte vorige Version von Rubberduck nicht deinstallieren. Es kann sein, dass Sie diese manuell deinstallieren müssen, bevor Sie die neue Version installieren können.
26+
German.UseLegacyWorkloadCaption=Initial Configuration
27+
German.UseLegacyWorkloadMessage=Planning to use Rubberduck with a large existing project?
28+
German.UseLegacyWorkloadDescription=Using 'legacy workload' default initial configuration disables autocompletion features and a number of specific inspections to help performance and reduce memory pressure. Disabled features can be re-enabled any time from the Settings menu.
29+
German.UseLegacyWorkloadButtonCaption=Use legacy workload configuration

Rubberduck.Deployment/InnoSetup/Includes/Spanish.CustomMessages.iss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ Spanish.WillInstallForCurrentUser=El complemento Rubberduck estará disponible s
2222
Spanish.UninstallOldVersionPrompt=Parece que hay una versión anterior de Rubberduck, instalada, %s y debería ser desinstalada. ¿Proceder?
2323
Spanish.UninstallOldVersionFail=No se puede desinstalar la versión anterior de Rubberduck. Inténtelo y desinstálelo a través del panel de control de Programas y vuelva a ejecutar el instalador.
2424
Spanish.WarnInstallPerUserOverEveryone=Parece que hay una versión de Rubberduck instalada para todos los usuarios. Si continúa con la instalación por usuario, tendrá prioridad sobre la instalación original. ¿Procede de todas maneras?
25-
Spanish.ElevationRequestFailMessage=No se puede desinstalar la versión anterior de Rubberduck. Es posible que deba desinstalarlo directamente antes de poder instalar la nueva versión.
25+
Spanish.ElevationRequestFailMessage=No se puede desinstalar la versión anterior de Rubberduck. Es posible que deba desinstalarlo directamente antes de poder instalar la nueva versión.
26+
Spanish.UseLegacyWorkloadCaption=Initial Configuration
27+
Spanish.UseLegacyWorkloadMessage=Planning to use Rubberduck with a large existing project?
28+
Spanish.UseLegacyWorkloadDescription=Using 'legacy workload' default initial configuration disables autocompletion features and a number of specific inspections to help performance and reduce memory pressure. Disabled features can be re-enabled any time from the Settings menu.
29+
Spanish.UseLegacyWorkloadButtonCaption=Use legacy workload configuration

Rubberduck.Deployment/InnoSetup/Rubberduck.Installer.Build.iss

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ Source: "{#GraphicsDir}Ducky.ico"; DestDir: "{group}"; Attribs: hidden system; F
104104
Source: "{#IncludesDir}Rubberduck.RegisterAddIn.bat"; DestDir: "{app}"; Flags: ignoreversion replacesameversion;
105105
Source: "{#IncludesDir}Rubberduck.RegisterAddIn.reg"; DestDir: "{app}"; Flags: ignoreversion replacesameversion;
106106

107+
; 'LegacyWorkload' initial configuration (disables autocompletion and inspections that could spawn too many results in legacy code)
108+
Source: "\WorkloadConfigs\Legacy\rubberduck.config"; DestDir: "{userappdata}\{#AppName}"; Check: UseLegacyWorkloadConfig;
109+
107110
[Registry]
108111
; DO NOT attempt to register VBE Add-In with this section. It doesn't work
109112
; Use [Code] section (RegisterAddIn procedure) to register the entries instead.
@@ -189,6 +192,13 @@ var
189192
///</remakrs>
190193
RegisterAddInOptionPage: TInputOptionWizardPage;
191194
195+
///<remarks>
196+
///Custom page to indicate whether the installer should copy the 'legacy workload'
197+
///initial configuration file to disable certain features and inspections.
198+
///<see cref="RegisterAddIn" />
199+
///</remakrs>
200+
WorkloadOptionPage: TInputOptionWizardPage;
201+
192202
///<remarks>
193203
///Set by the <see cref="RegisterAddInOptionPage" />; should be
194204
///read-only normally. When set to true, it is used to check if
@@ -215,6 +225,11 @@ var
215225
///</remarks>
216226
PerUserOnly : Boolean;
217227
228+
///<remarks>
229+
///Indicates that the installer should copy the 'legacy workload' initial configuration file.
230+
///</remarks>
231+
UseLegacyWorkloadConfig : Boolean;
232+
218233
// External functions section
219234
220235
///<remarks>
@@ -547,10 +562,9 @@ begin
547562
end;
548563
549564
///<remarks>
550-
///Called after successfully installing, including via the elevated installer
551-
///to register the VBE addin.
565+
///Called after successfully installing, including via the elevated installer to register the VBE addin.
552566
///</remarks>
553-
procedure RegisterAddin();
567+
procedure RegisterAddIn();
554568
begin
555569
if IsWin64() then
556570
begin
@@ -566,7 +580,7 @@ begin
566580
end;
567581
568582
///<remarks>
569-
///Delete registry keys created by <see cref="RegisterAddin" />
583+
///Delete registry keys created by <see cref="RegisterAddIn" />
570584
///</remarks>
571585
procedure UnregisterAddin();
572586
begin
@@ -837,10 +851,9 @@ end;
837851
///The second event of installer allow us to customize the wizard by
838852
///assessing whether we were launched in elevated context from an
839853
///non-elevated installer; <see cref="HasElevateSwitch" />. We then
840-
///set up the <see cref="InstallForWhoOptionPage" /> and
841-
///<see cref="RegisterAddInOptionPage" /> pages. In both cases, their
842-
///behavior differs depending on whether we are elevated, and need to be
843-
///configured accordingly.
854+
///set up the custom installer pages. In the case of <see cref="InstallForWhoOptionPage" /> and
855+
///<see cref="RegisterAddInOptionPage" />, their behavior differs depending on whether we are elevated,
856+
///and need to be configured accordingly.
844857
///</remarks>
845858
procedure InitializeWizard();
846859
begin
@@ -888,6 +901,20 @@ begin
888901
889902
RegisterAddInOptionPage.Add(ExpandConstant('{cm:RegisterAddInButtonCaption}'));
890903
RegisterAddInOptionPage.Values[0] := true;
904+
905+
WorkloadOptionPage :=
906+
CreateInputOptionPage(
907+
wpInstalling,
908+
ExpandConstant('{cm:UseLegacyWorkloadCaption}'),
909+
ExpandConstant('{cm:UseLegacyWorkloadMessage}'),
910+
ExpandConstant('{cm:UseLegacyWorkloadDescription}'),
911+
false, false);
912+
913+
WorkloadOptionPage.Add(ExpandConstant('{cm:UseLegacyWorkloadButtonCaption}'))
914+
WorkloadOptionPage.Values[0] := false;
915+
916+
917+
891918
end;
892919
893920
///<remarks>
@@ -983,6 +1010,7 @@ begin
9831010
Log(Format('AppSuffix: %s', [GetAppSuffix()]));
9841011
Log(Format('ShouldCreateUninstaller: %d', [ShouldCreateUninstaller()]));
9851012
Log(Format('ShouldInstallAllUsers variable: %d', [ShouldInstallAllUsers]));
1013+
Log(Format('UseLegacyWorkloadConfig variable: %d', [UseLegacyWorkloadConfig]));
9861014
9871015
if not IsElevated() and ShouldInstallAllUsers then
9881016
begin
@@ -1066,7 +1094,16 @@ begin
10661094
begin
10671095
Log('Addin registration was declined because the user unchecked the checkbox');
10681096
end;
1097+
end
1098+
else if CurPageID = WorkloadOptionPage.ID then
1099+
begin
1100+
Log('Legacy workload initial config was requested and will be copied to the destination folder.');
1101+
end
1102+
else
1103+
begin
1104+
Log('Skipping legacy workload config because the option was left unchecked.');
10691105
end;
1106+
;
10701107
10711108
// Re-enable the button disabled at start of procedure
10721109
Wizardform.NextButton.Enabled := True;

0 commit comments

Comments
 (0)