Ask whether to check for updates in the installer

Gets rid of the last annoying modal dialog on first startup.
This commit is contained in:
Thomas Goyne 2014-05-15 11:54:34 -07:00
parent 1049b2d140
commit 796f26c008
5 changed files with 28 additions and 1 deletions

View File

@ -78,12 +78,24 @@ begin
end;
procedure CurStepChanged(CurStep: TSetupStep);
var
Updates: String;
begin
CurStepChangedMigration(CurStep);
if CurStep = ssPostInstall then
begin
SaveStringToFile(ExpandConstant('{app}\installer_config.json'), ExpandConstant('{{"App": {{"Language": "{language}"}}'), False);
if IsTaskSelected('checkforupdates') then
Updates := 'true'
else
Updates := 'false';
SaveStringToFile(
ExpandConstant('{app}\installer_config.json'),
FmtMessage('{"App": {"Auto": {"Check For Updates": %1}, "First Start": false, "Language": "%2"}}', [
Updates,
ExpandConstant('{language}')]),
False);
end;
end;

View File

@ -35,6 +35,7 @@
[Tasks]
Name: "startmenuicon"; Description: "{cm:StartMenuIcon}"; GroupDescription: "{cm:AdditionalIcons}"
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "checkforupdates"; Description: "{cm:CheckForUpdates}"; GroupDescription: "{cm:UpdatesGroup}"
[Files]
; main

View File

@ -1,6 +1,8 @@
[CustomMessages]
InstallRuntime=Installing runtime libraries...
StartMenuIcon=Create a start menu icon
CheckForUpdates=Automatically check for new versions of Aegisub
UpdatesGroup=Update Checker:
; Replacement for License page, no need to bother the user with legal mumbo-jumbo
[Messages]

View File

@ -1,6 +1,8 @@
[CustomMessages]
_InstallRuntime=Installing runtime libraries...
_StartMenuIcon=Create a start menu icon
_CheckForUpdates=Automatically check for new versions of Aegisub
_UpdatesGroup=Update Checker:
; Replacement for License page, no need to bother the user with legal mumbo-jumbo
[Messages]

View File

@ -6202,6 +6202,16 @@ msgid "Create a start menu icon"
msgstr ""
#: packages/win_installer/fragment_strings.iss:1
msgid "Automatically check for new versions of Aegisub"
msgstr ""
#: packages/win_installer/fragment_strings.iss:1
msgid "Update Checker:"
msgstr ""
#: packages/win_installer/fragment_strings.iss:1
msgid "This will install Aegisub {#BUILD_GIT_VERSION_STRING} on your computer.%n%nAegisub is covered by the GNU General Public License version 2. This means you may use the application for any purpose without charge, but that no warranties of any kind are given either.%n%nSee the Aegisub website for information on obtaining the source code."
msgstr ""