Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 1.0.25

- Add option to the Windows Installer to remove all user data when uninstalling
- Improve Copilot Terminal Handling in Windows
- Add possibility to add default startup configuration

Expand Down
5 changes: 5 additions & 0 deletions studio/OneWare.Studio.Desktop.WindowsInstaller/Common.wxl
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,10 @@
<String Id="Keywords" Value="dotnet,core,application,installer,vhdplus"/>
<String Id="DowngradeErrorMessage" Value="A newer version of OneWare Studio is already installed."/>
<String Id="LaunchOnExit" Value="Launch OneWare Studio"/>
<String Id="RemoveUserDataDlg_Title" Value="[ProductName] Setup"/>
<String Id="RemoveUserDataDlgTitle" Value="{\WixUI_Font_Title}Remove User Data"/>
<String Id="RemoveUserDataDlgDescription" Value="Choose whether your settings and files should be removed."/>
<String Id="RemoveUserDataDlgText" Value="By default your settings, packages and projects are kept, so they are still available if you install OneWare Studio again. They are also always kept when updating OneWare Studio."/>
<String Id="RemoveUserDataDlgCheckBox" Value="Also remove all user data (settings, packages and projects)"/>
<String Id="Language" Value="1033"/>
</WixLocalization>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Fragment>
<UI>
<!-- Unchecked by default. Can also be set on the command line (REMOVEUSERDATA=1) -->
<Property Id="REMOVEUSERDATA" Secure="yes" />

<Dialog Id="RemoveUserDataDlg" Width="370" Height="270" Title="!(loc.RemoveUserDataDlg_Title)">
<Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no"
Text="WixUI_Bmp_Banner" />
<Control Id="BannerLine" Type="Line" X="0" Y="44" Width="370" Height="0" />
<Control Id="BottomLine" Type="Line" X="0" Y="234" Width="370" Height="0" />
<Control Id="Title" Type="Text" X="15" Y="6" Width="340" Height="15" Transparent="yes"
NoPrefix="yes" Text="!(loc.RemoveUserDataDlgTitle)" />
<Control Id="Description" Type="Text" X="25" Y="23" Width="340" Height="20" Transparent="yes"
NoPrefix="yes" Text="!(loc.RemoveUserDataDlgDescription)" />

<Control Id="Text" Type="Text" X="25" Y="60" Width="320" Height="60" NoPrefix="yes"
Text="!(loc.RemoveUserDataDlgText)" />
<Control Id="RemoveUserDataCheckBox" Type="CheckBox" X="25" Y="125" Width="320" Height="17"
Property="REMOVEUSERDATA" CheckBoxValue="1" Text="!(loc.RemoveUserDataDlgCheckBox)" />

<Control Id="Back" Type="PushButton" X="180" Y="243" Width="56" Height="17"
Text="!(loc.WixUIBack)" DisableCondition="Preselected">
<Publish Event="NewDialog" Value="MaintenanceTypeDlg" Condition="NOT Preselected" />
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes"
Text="!(loc.WixUINext)">
<Publish Event="NewDialog" Value="VerifyReadyDlg" Condition="NOT Preselected" />
<Publish Event="EndDialog" Value="Return" Condition="Preselected" />
</Control>
<Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56" Height="17" Cancel="yes"
Text="!(loc.WixUICancel)">
<Publish Event="SpawnDialog" Value="CancelDlg" />
</Control>
</Dialog>

<!-- Uninstall started from Apps and Features skips the maintenance dialogs,
so the dialog has to be sequenced manually in that case -->
<InstallUISequence>
<Show Dialog="RemoveUserDataDlg" Before="ProgressDlg"
Condition="Installed AND Preselected AND REMOVE~=&quot;ALL&quot; AND NOT PATCH AND NOT UPGRADINGPRODUCTCODE" />
</InstallUISequence>
</UI>
</Fragment>
</Wix>
Original file line number Diff line number Diff line change
@@ -1,7 +1,27 @@
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
<Fragment>
<!-- User data locations, see OneWare.Core Paths. The environment variables are expanded by
the RemoveFolderEx custom action -->
<Property Id="ONEWAREAPPDATAFOLDER" Value="%APPDATA%\OneWareStudio" />
<Property Id="ONEWAREDOCUMENTSFOLDER" Value="%USERPROFILE%\OneWareStudio" />

<ComponentGroup Id="StudioComponents" Directory="INSTALLFOLDER">

<!-- Removes settings and documents on uninstall, but only if the user opted in.
Never runs while updating, because UPGRADINGPRODUCTCODE is set in that case -->
<Component Id="UserDataCleanupComponent" Guid="{2c74addf-161c-49ef-a3a9-d828c5b3dc56}">
<RegistryValue Root="HKLM" Key="Software\!(loc.Company)\!(loc.ProductNameFolder)"
Name="InstallFolder" Value="[INSTALLFOLDER]" Type="string" KeyPath="yes" />

<util:RemoveFolderEx Id="RemoveAppDataFolder" On="uninstall"
Property="ONEWAREAPPDATAFOLDER"
Condition="REMOVEUSERDATA = &quot;1&quot; AND NOT UPGRADINGPRODUCTCODE" />

<util:RemoveFolderEx Id="RemoveDocumentsFolder" On="uninstall"
Property="ONEWAREDOCUMENTSFOLDER"
Condition="REMOVEUSERDATA = &quot;1&quot; AND NOT UPGRADINGPRODUCTCODE" />
</Component>

<Component Id="OneWareStudioExeComponent" Guid="{7a73a50a-c9e7-4511-af5d-642296257da6}">
<File Id="OneWareStudioExe" Source="!(bindpath.publish)\OneWareStudio.exe"
KeyPath="yes">
Expand Down
6 changes: 6 additions & 0 deletions studio/OneWare.Studio.Desktop.WindowsInstaller/UI.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
<UI Id="UI">
<ui:WixUI Id="WixUI_InstallDir" InstallDirectory="INSTALLFOLDER" />
<UIRef Id="WixUI_ErrorProgressText" />
<DialogRef Id="RemoveUserDataDlg" />

<!-- Ask whether user data should be removed before confirming the uninstall.
The higher order overrides the default navigation to VerifyReadyDlg. -->
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog"
Value="RemoveUserDataDlg" Order="2" Condition="NOT Preselected" />

<!-- Shows launch application on last screen -->
<Publish Dialog="ExitDialog"
Expand Down