mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-30 05:34:06 +02:00
Add dev tools to the installer as an optional component
This commit is contained in:
parent
988fae75c3
commit
22d0a372d8
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<Import Project="packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props')" />
|
<Import Project="packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props" Condition="Exists('packages\CefSharp.WinForms.64.0.0-CI2508\build\CefSharp.WinForms.props')" />
|
||||||
<Import Project="packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props')" />
|
<Import Project="packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props" Condition="Exists('packages\CefSharp.Common.64.0.0-CI2508\build\CefSharp.Common.props')" />
|
||||||
@ -419,7 +419,6 @@ powershell -ExecutionPolicy Unrestricted -File "$(ProjectDir)Resources\PostBuild
|
|||||||
<Exec Command="del "$(TargetDir)*.pdb"" />
|
<Exec Command="del "$(TargetDir)*.pdb"" />
|
||||||
<Exec Command="del "$(TargetDir)*.xml"" />
|
<Exec Command="del "$(TargetDir)*.xml"" />
|
||||||
<Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" />
|
<Delete Files="$(TargetDir)CefSharp.BrowserSubprocess.exe" />
|
||||||
<Delete Files="$(TargetDir)devtools_resources.pak" />
|
|
||||||
<Delete Files="$(TargetDir)widevinecdmadapter.dll" />
|
<Delete Files="$(TargetDir)widevinecdmadapter.dll" />
|
||||||
</Target>
|
</Target>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
@ -38,11 +38,13 @@ MinVersion=0,6.1
|
|||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
[Tasks]
|
[Tasks]
|
||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalTasks}"; Flags: unchecked
|
||||||
|
Name: "devtools"; Description: "{cm:TaskDevTools}"; GroupDescription: "{cm:AdditionalTasks}"; Flags: unchecked
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,CefSharp.BrowserSubprocess.exe,devtools_resources.pak,widevinecdmadapter.dll"
|
Source: "..\bin\x86\Release\devtools_resources.pak"; DestDir: "{app}"; Flags: ignoreversion; Tasks: devtools
|
||||||
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "devtools_resources.pak"
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Check: TDIsUninstallable
|
||||||
@ -58,9 +60,14 @@ Type: filesandordirs; Name: "{app}\scripts"
|
|||||||
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Cache"
|
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Cache"
|
||||||
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\GPUCache"
|
||||||
|
|
||||||
|
[CustomMessages]
|
||||||
|
AdditionalTasks=Additional shortcuts and components:
|
||||||
|
TaskDevTools=Install dev tools
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
var ForceRedistPrompt: String;
|
var ForceRedistPrompt: String;
|
||||||
|
var VisitedTasksPage: Boolean;
|
||||||
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
function TDGetNetFrameworkVersion: Cardinal; forward;
|
||||||
function TDIsVCMissing: Boolean; forward;
|
function TDIsVCMissing: Boolean; forward;
|
||||||
@ -71,6 +78,7 @@ function InitializeSetup: Boolean;
|
|||||||
begin
|
begin
|
||||||
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
||||||
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
||||||
|
VisitedTasksPage := False
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
||||||
begin
|
begin
|
||||||
@ -106,12 +114,14 @@ begin
|
|||||||
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Check the desktop icon task if not updating. }
|
{ Check the desktop icon task if not updating, and dev tools task if already installed. }
|
||||||
procedure CurPageChanged(CurPageID: Integer);
|
procedure CurPageChanged(CurPageID: Integer);
|
||||||
begin
|
begin
|
||||||
if CurPageID = wpSelectTasks then
|
if (CurPageID = wpSelectTasks) and (not VisitedTasksPage) then
|
||||||
begin
|
begin
|
||||||
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-1] := (UpdatePath = '');
|
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-2] := (UpdatePath = '')
|
||||||
|
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-1] := FileExists(ExpandConstant('{app}\devtools_resources.pak'))
|
||||||
|
VisitedTasksPage := True
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -37,16 +37,25 @@ MinVersion=0,6.1
|
|||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "devtools"; Description: "{cm:TaskDevTools}"; GroupDescription: "{cm:AdditionalTasks}"; Flags: unchecked
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "..\bin\x86\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.xml,*.pdb,CefSharp.BrowserSubprocess.exe,devtools_resources.pak,widevinecdmadapter.dll"
|
Source: "..\bin\x86\Release\devtools_resources.pak"; DestDir: "{app}"; Flags: ignoreversion; Tasks: devtools
|
||||||
|
Source: "..\bin\x86\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "devtools_resources.pak"
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec skipifsilent
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall shellexec skipifsilent
|
||||||
|
|
||||||
|
[CustomMessages]
|
||||||
|
AdditionalTasks=Additional components:
|
||||||
|
TaskDevTools=Install dev tools
|
||||||
|
|
||||||
[Code]
|
[Code]
|
||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
var ForceRedistPrompt: String;
|
var ForceRedistPrompt: String;
|
||||||
|
var VisitedTasksPage: Boolean;
|
||||||
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
function TDGetNetFrameworkVersion: Cardinal; forward;
|
||||||
function TDIsVCMissing: Boolean; forward;
|
function TDIsVCMissing: Boolean; forward;
|
||||||
@ -57,6 +66,7 @@ function InitializeSetup: Boolean;
|
|||||||
begin
|
begin
|
||||||
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
||||||
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
ForceRedistPrompt := ExpandConstant('{param:PROMPTREDIST}')
|
||||||
|
VisitedTasksPage := False
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
if (TDGetNetFrameworkVersion() < 379893) and (MsgBox('{#MyAppName} requires .NET Framework 4.5.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
||||||
begin
|
begin
|
||||||
@ -92,6 +102,16 @@ begin
|
|||||||
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
Result := (PageID = wpSelectDir) and (UpdatePath <> '')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ Check the dev tools task if already installed. }
|
||||||
|
procedure CurPageChanged(CurPageID: Integer);
|
||||||
|
begin
|
||||||
|
if (CurPageID = wpSelectTasks) and (not VisitedTasksPage) then
|
||||||
|
begin
|
||||||
|
WizardForm.TasksList.Checked[WizardForm.TasksList.Items.Count-1] := FileExists(ExpandConstant('{app}\devtools_resources.pak'))
|
||||||
|
VisitedTasksPage := True
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
{ Install VC++ if downloaded, and create a 'makeportable' file for portable installs. }
|
{ Install VC++ if downloaded, and create a 'makeportable' file for portable installs. }
|
||||||
procedure CurStepChanged(CurStep: TSetupStep);
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user