Skip to content

Commit

Permalink
Language Cloud PowerShell Toolkit 1.0.1.0 - SDLCOM-6295: Updated the …
Browse files Browse the repository at this point in the history
…Wix Installer
  • Loading branch information
aflorescu579774 committed Nov 18, 2024
1 parent 039ffbf commit fe173f0
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 109 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ For a quicker and more streamlined installation, you can use the MSI installer.
3. **Verify Installation**
- After the installation is complete, verify that the toolkit has been correctly installed by checking the installation path.

### **2. Manual Instalation**
### **2. Manual Installation**
If you prefer to manually install the toolkit, follow these steps:

1. Download the Files
Expand Down
47 changes: 27 additions & 20 deletions Setup/wix.Setup/Directories.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,36 @@
<Fragment>
<!-- Install Directory -->
<Directory Id="TARGETDIR" Name="SourceDir">

<Directory Id="PersonalFolder">
<Directory Id="INSTALLDIR" Name="PowerShell">
<!-- Modules Directory -->
<Directory Id="ModulesFolder" Name="Modules">
<Directory Id="AuthenticationHelper" Name="AuthenticationHelper" />
<Directory Id="ProjectHelper" Name="ProjectHelper" />
<Directory Id="ResourcesHelper" Name="ResourcesHelper" />
<Directory Id="TerminologyHelper" Name="TerminologyHelper" />
<Directory Id="UsersHelper" Name="UsersHelper" />
</Directory>

<!-- Documentation Directory -->
<Directory Id="DocumentationFolder" Name="Documentation" />
<Directory Id="INSTALLDIR" Name="PowerShell">
<Component Id="c_RemoveINSTALLDIR">
<RemoveFolder Id="INSTALLDIR" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="Installed" Type="integer" Value="1" KeyPath="yes" />
</Component>

<!-- Modules Directory -->
<Directory Id="ModulesFolder" Name="Modules">
<Component Id="c_RemoveModulesFolder">
<RemoveFolder Id="ModulesFolder" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit\ModulesFolder" Name="Installed" Type="integer" Value="1" KeyPath="yes" />
</Component>

<Directory Id="AuthenticationHelper" Name="AuthenticationHelper" />
<Directory Id="ProjectHelper" Name="ProjectHelper" />
<Directory Id="ResourcesHelper" Name="ResourcesHelper" />
<Directory Id="TerminologyHelper" Name="TerminologyHelper" />
<Directory Id="UsersHelper" Name="UsersHelper" />
</Directory>

<!-- Desktop Directory -->
<Directory Id="DesktopFolder" Name="Desktop" />
<!-- Documentation Directory -->
<Directory Id="DocumentationFolder" Name="Documentation" />
</Directory>

<!-- Start Menu Directory -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Language Cloud PowerShell Toolkit" />
</Directory>
<!-- Desktop Directory -->
<Directory Id="DesktopFolder" Name="Desktop" />

<!-- Start Menu Directory -->
<Directory Id="ProgramMenuFolder">
<Directory Id="ApplicationProgramsFolder" Name="Language Cloud PowerShell Toolkit" />
</Directory>
</Directory>
</Fragment>
Expand Down
1 change: 0 additions & 1 deletion Setup/wix.Setup/DocumentationComponent.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Component Id="README" Directory="DocumentationFolder" Guid="d46e71ea-8893-440c-9bc1-a7936cb18936">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Documentation" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\README.md" />
</Component>
</Fragment>
Expand Down
28 changes: 15 additions & 13 deletions Setup/wix.Setup/Features.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,39 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<FeatureGroup Id="ToolkitFeatures">
<Feature Id="DocumentationFeature" Title="Language Cloud PowerShell Toolkit Documentation" Level="1" Absent="disallow">
<Feature Id="DocumentationFeature" Level="1" Absent="disallow">
<ComponentRef Id="README" />
</Feature>
<Feature Id="EnvironmentSetFeature" Title="Language Cloud PowerShell Toolkit Environment Set" Level="1" Absent="disallow">
<Feature Id="EnvironmentSetFeature" Level="1" Absent="disallow">
<ComponentRef Id="AddPSModulePath" />
</Feature>
<Feature Id="InstallerLaunchCondition" Title="Language Cloud PowerShell Toolkit Launch Condition" Level="1" Absent="disallow">
<Feature Id="InstallerLaunchCondition" Level="1" Absent="disallow">
<ComponentGroupRef Id="LaunchConditions" />
</Feature>
<Feature Id="ModulesFeature" Title="Language Cloud PowerShell Toolkit Modules" Level="1" Absent="disallow">
<Feature Id="ModulesFeature" Level="1" Absent="disallow">
<ComponentGroupRef Id="ModulesComponentGroup" />
</Feature>
<Feature Id="RemoveFolderFeature" Title="Language Cloud PowerShell Toolkit Remove Folders" Level="1" Absent="disallow">
<ComponentRef Id="c_RemoveUsersFolders" />
</Feature>
<Feature Id="RoundtripComponent" Title="Language Cloud PowerShell Toolkit Roundtrip Feature" Level="1" Absent="disallow">
<Feature Id="RoundtripComponent" Level="1" Absent="disallow">
<ComponentRef Id="c_Sample_Roundtrip.ps1" />
</Feature>
<Feature Id="f_PowerShell64StartMenuShortcut" Title="Language Cloud PowerShell Toolkit 64 Start Menu Shortcut" Level="1" Absent="disallow">
<Feature Id="f_PowerShell64StartMenuShortcut" Level="1" Absent="disallow">
<ComponentRef Id="PowerShell64StartMenuShortcut" />
</Feature>
<Feature Id="f_PowerShell32StartMenuShortcut" Title="Language Cloud PowerShell Toolkit 32 Start Menu Shortcut" Level="1" Absent="disallow">
<Feature Id="f_PowerShell32StartMenuShortcut" Level="1" Absent="disallow">
<ComponentRef Id="PowerShell32StartMenuShortcut" />
</Feature>
<Feature Id="f_PowerShell64DesktopShortcut" Title="Language Cloud PowerShell Toolkit 64 Desktop Shortcut" Level="1" Absent="disallow">
<Feature Id="f_PowerShell64DesktopShortcut" Level="1">
<ComponentRef Id="PowerShell64DesktopShortcut" />
</Feature>
<Feature Id="f_PowerShell32DesktopShortcut" Title="Language Cloud PowerShell Toolkit 32 Desktop Shortcut" Level="1" Absent="disallow">
<Feature Id="f_PowerShell32DesktopShortcut" Level="1" Absent="disallow">
<ComponentRef Id="PowerShell32DesktopShortcut" />
</Feature>

<Feature Id="f_RemoveInstallDIR" Level="1">
<ComponentRef Id="c_RemoveINSTALLDIR"/>
</Feature>
<Feature Id="f_ModulesFolder" Level="1">
<ComponentRef Id="c_RemoveModulesFolder"/>
</Feature>
</FeatureGroup>
</Fragment>
</Wix>
10 changes: 0 additions & 10 deletions Setup/wix.Setup/ModulesComponent.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,42 @@

<!-- AuthenticationHelper -->
<Component Id="c_AuthenticationHelper.psd1" Directory="AuthenticationHelper" Guid="b7897957-770d-4ad7-814f-f92799ee548d">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\AuthenticationHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\AuthenticationHelper\AuthenticationHelper.psd1"/>
</Component>
<Component Id="c_AuthenticationHelper.psm1" Directory="AuthenticationHelper" Guid="2d151b5b-9b4d-4c27-8864-c81ec354814b">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\AuthenticationHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\AuthenticationHelper\AuthenticationHelper.psm1"/>
</Component>

<!-- ProjectHelper -->
<Component Id="c_ProjectHelper.psd1" Directory="ProjectHelper" Guid="25342b70-6442-42e4-a361-cea55a1fe301">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\ProjectHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\ProjectHelper\ProjectHelper.psd1"/>
</Component>
<Component Id="c_ProjectHelper.psm1" Directory="ProjectHelper" Guid="392ab9c6-96db-47e9-9e16-a1a1c4e7e173">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\ProjectHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\ProjectHelper\ProjectHelper.psm1"/>
</Component>

<!-- ResourcesHelper -->
<Component Id="c_ResourcesHelper.psd1" Directory="ResourcesHelper" Guid="631cbc2f-f94c-48e7-9a7c-0cf8f48c921a">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\ResourcesHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\ResourcesHelper\ResourcesHelper.psd1"/>
</Component>
<Component Id="c_ResourcesHelper.psm1" Directory="ResourcesHelper" Guid="52bc55e5-e2f6-412f-9eb9-210324a1b9f6">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\ResourcesHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\ResourcesHelper\ResourcesHelper.psm1"/>
</Component>

<!-- TerminologyHelper -->
<Component Id="c_TerminologyHelper.psd1" Directory="TerminologyHelper" Guid="1ad78143-4f2a-4cfc-a8cf-661e28e43acd">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\TerminologyHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\TerminologyHelper\TerminologyHelper.psd1"/>
</Component>
<Component Id="c_TerminologyHelper.psm1" Directory="TerminologyHelper" Guid="d22a60c1-bdee-4882-aa2a-1e27e571f0ff">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\TerminologyHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\TerminologyHelper\TerminologyHelper.psm1"/>
</Component>


<!-- UsersHelper -->
<Component Id="c_UsersHelper.psd1" Directory="UsersHelper" Guid="6351824f-865c-4a3c-82ba-5852ff701c4d">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\UsersHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\UsersHelper\UsersHelper.psd1"/>
</Component>
<Component Id="c_UsersHelper.psm1" Directory="TerminologyHelper" Guid="2cb90c41-681f-4f44-93d3-4105e9f8057d">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit\Modules\UsersHelper" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Modules\UsersHelper\UsersHelper.psm1"/>
</Component>
</ComponentGroup>
Expand Down
5 changes: 5 additions & 0 deletions Setup/wix.Setup/Product.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<Property Id="ARPPRODUCTICON" Value="Trados_LC_Toolkit.ico" />

<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
<SetProperty Id="INSTALLDIR"
Value="[PersonalFolder]PowerShell"
Before="CostFinalize"
Sequence="first"/>

<UIRef Id="WixUI_MyInstallDir" />

<FeatureGroupRef Id="ToolkitFeatures" />
Expand Down
18 changes: 0 additions & 18 deletions Setup/wix.Setup/RemoveComponent.wxs

This file was deleted.

1 change: 0 additions & 1 deletion Setup/wix.Setup/RoundtripComponent.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Component Id="c_Sample_Roundtrip.ps1" Directory="INSTALLDIR" Guid="1a77ee85-ef66-4058-94ff-adfe2ce8fbbc">
<RegistryValue KeyPath="yes" Root="HKCU" Key="SOFTWARE\Language Cloud PowerShell Toolkit" Name="Installed" Type="integer" Value="1" Action="write" />
<File Source="..\..\Sample_Roundtrip.ps1" />
</Component>
</Fragment>
Expand Down
89 changes: 45 additions & 44 deletions Setup/wix.Setup/ShortcutsComponent.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,52 @@
<Fragment>
<!-- Define the Program Menu Directory Reference -->
<DirectoryRef Id="ApplicationProgramsFolder">

<!-- 64-bit PowerShell 7 Start Menu Shortcut -->
<Component Id="PowerShell64StartMenuShortcut" Guid="2CBB655B-448C-49F1-A682-65635BF62872">
<!-- Only create this if 64-bit PowerShell 7 is installed -->
<Condition><![CDATA[POWERSHELL7_64_PATH]]></Condition>
<Shortcut Id="StartPowerShell64StartMenuShortcut"
Name="Language Cloud PowerShell Toolkit"
Directory="ApplicationProgramsFolder"
Target="[ProgramFiles64Folder]PowerShell\7\pwsh.exe"
WorkingDirectory="INSTALLDIR"
Arguments="-NoExit -ExecutionPolicy Bypass"
Icon="Trados_LC_Toolkit.ico" />

<!-- Remove the folder when uninstalled, will only work if no other files are in the folder -->
<RemoveFolder Id="RemoveStartMenuShortcuts" On="uninstall" />

<!-- Add registry value for tracking the shortcut -->
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell64ShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
</Component>


<!-- 32-bit PowerShell 7 Start Menu Shortcut -->
<Component Id="PowerShell32StartMenuShortcut" Guid="3D456E4A-7890-45F4-A4D5-F5F3D5476C5A">
<!-- Only create this if 32-bit PowerShell 7 is installed -->
<Condition><![CDATA[POWERSHELL7_32_PATH]]></Condition>
<Shortcut Id="StartPowerShell32StartMenuShortcut"
Name="Language Cloud PowerShell Toolkit (x86)"
Directory="ApplicationProgramsFolder"
Target="[ProgramFilesFolder]PowerShell\7\pwsh.exe"
WorkingDirectory="INSTALLDIR"
Arguments="-NoExit -ExecutionPolicy Bypass"
Icon="Trados_LC_Toolkit.ico" />

<!-- Add registry value for tracking the shortcut -->
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell32ShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
</Component>

<!-- 64-bit PowerShell 7 Start Menu Shortcut -->
<Component Id="PowerShell64StartMenuShortcut" Guid="d737ba68-9e7b-41d2-badb-589b78a3378a">
<!-- Only create this if 64-bit PowerShell 7 is installed -->
<Condition><![CDATA[Installed OR POWERSHELL7_64_PATH]]></Condition>

<Shortcut Id="StartPowerShell64StartMenuShortcut"
Name="Language Cloud PowerShell Toolkit"
Directory="ApplicationProgramsFolder"
Target="[ProgramFiles64Folder]PowerShell\7\pwsh.exe"
WorkingDirectory="INSTALLDIR"
Arguments="-NoExit -ExecutionPolicy Bypass"
Icon="Trados_LC_Toolkit.ico" />

<!-- Remove the folder when uninstalled, will only work if no other files are in the folder -->
<RemoveFolder Id="RemoveStartMenuShortcuts" On="uninstall"/>

<!-- Add registry value for tracking the shortcut -->
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell64ShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
</Component>

<!-- 32-bit PowerShell 7 Start Menu Shortcut -->
<Component Id="PowerShell32StartMenuShortcut" Guid="0bc56b54-3763-4718-8a53-c2d1f88b5ab4">
<!-- Only create this if 32-bit PowerShell 7 is installed -->
<Condition><![CDATA[POWERSHELL7_32_PATH]]></Condition>

<Shortcut Id="StartPowerShell32StartMenuShortcut"
Name="Language Cloud PowerShell Toolkit (x86)"
Directory="ApplicationProgramsFolder"
Target="[ProgramFilesFolder]PowerShell\7\pwsh.exe"
WorkingDirectory="INSTALLDIR"
Arguments="-NoExit -ExecutionPolicy Bypass"
Icon="Trados_LC_Toolkit.ico" />

<!-- Add registry value for tracking the shortcut -->
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell32ShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
</Component>
</DirectoryRef>
</Fragment>

<Fragment>
<DirectoryRef Id="DesktopFolder">

<!-- 64-bit PowerShell 7 Desktop Shortcut -->
<Component Id="PowerShell64DesktopShortcut" Guid="A1234567-1234-1234-1234-1234567890AB">
<Component Id="PowerShell64DesktopShortcut" Guid="ae056472-b521-41a1-9cf5-e382c4889794">
<!-- Only create this if 64-bit PowerShell 7 is installed -->
<Condition><![CDATA[POWERSHELL7_64_PATH]]></Condition>
<Condition><![CDATA[Installed OR POWERSHELL7_64_PATH]]></Condition>

<Shortcut Id="StartPowerShell64DesktopShortcut"
Name="Language Cloud PowerShell Toolkit"
Expand All @@ -60,13 +59,15 @@
Icon="Trados_LC_Toolkit.ico" />

<!-- Remove the folder when uninstalled, will only work if no other files are in the folder -->
<RemoveFolder Id="RemoveDesktopShortcuts" On="uninstall"/>
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell64ShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
<!--<RemoveFolder Id="RemoveDesktopFolder" On="uninstall"/>-->
<RemoveFolder Id="RemoveApplicationProgramFolder" Directory="ApplicationProgramsFolder" On="uninstall"/> <!-- Change this later -->
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell64StartMenuShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
</Component>

<!-- 32-bit PowerShell 7 Desktop Shortcut -->
<Component Id="PowerShell32DesktopShortcut" Guid="B2345678-2345-2345-2345-2345678901CD">
<!-- Only create this if 32-bit PowerShell 7 is installed -->
<Component Id="PowerShell32DesktopShortcut" Guid="9c8559cb-e1cb-473b-bc9b-7e13e3339c05">

<!--Only create this if 32-bit PowerShell 7 is installed-->
<Condition><![CDATA[POWERSHELL7_32_PATH]]></Condition>

<Shortcut Id="StartPowerShell32DesktopShortcut"
Expand All @@ -77,7 +78,7 @@
Arguments="-NoExit -ExecutionPolicy Bypass"
Icon="Trados_LC_Toolkit.ico" />

<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell32ShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
<RegistryValue Root="HKCU" Key="Software\Language Cloud PowerShell Toolkit" Name="PowerShell32StartMenuShortcutCreated" Type="integer" Value="1" KeyPath="yes" />
</Component>

</DirectoryRef>
Expand Down
1 change: 0 additions & 1 deletion Setup/wix.Setup/wix.Setup.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<Compile Include="LaunchCondition.wxs" />
<Compile Include="ModulesComponent.wxs" />
<Compile Include="Product.wxs" />
<Compile Include="RemoveComponent.wxs" />
<Compile Include="RoundtripComponent.wxs" />
<Compile Include="ShortcutsComponent.wxs" />
<Compile Include="UI.wxs" />
Expand Down

0 comments on commit fe173f0

Please sign in to comment.