fix(msi): update shortcuts and context menus

This commit is contained in:
Baptiste Augrain 2022-09-28 12:32:19 +02:00
parent 8d74a04beb
commit d91dc90a71
3 changed files with 31 additions and 32 deletions

View File

@ -12,12 +12,14 @@ WIN_SDK_FULL_VERSION="10.0.17763.0"
if [[ "${VSCODE_QUALITY}" == "insider" ]]; then
PRODUCT_NAME="VSCodium - Insiders"
PRODUCT_SKU="vscodium-insiders"
PRODUCT_CODE="VSCodiumInsiders"
PRODUCT_UPGRADE_CODE="1C9B7195-5A9A-43B3-B4BD-583E20498467"
ICON_DIR="..\\..\\..\\src\\insider\\resources\\win32"
SETUP_RESOURCES_DIR=".\\resources\\insider"
else
PRODUCT_NAME="VSCodium"
PRODUCT_SKU="vscodium"
PRODUCT_CODE="VSCodium"
PRODUCT_UPGRADE_CODE="965370CD-253C-4720-82FC-2E6B02A53808"
ICON_DIR="..\\..\\..\\src\\stable\\resources\\win32"
SETUP_RESOURCES_DIR=".\\resources\\stable"
@ -73,8 +75,8 @@ BuildSetupTranslationTransform() {
rm -f "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.${CULTURE}.mst"
}
"${WIX}bin\\heat.exe" dir "${BINARY_DIR}" -out "Files-${OUTPUT_BASE_FILENAME}.wxs" -t vscodium.xsl -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.AppName -var var.ProductVersion -var var.IconDir -var var.LicenseDir -var var.BinaryDir -dr APPLICATIONFOLDER -platform "${PLATFORM}"
"${WIX}bin\\candle.exe" -arch "${PLATFORM}" vscodium.wxs "Files-${OUTPUT_BASE_FILENAME}.wxs" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -dAppName="${PRODUCT_NAME}" -dProductVersion="${RELEASE_VERSION%-insider}" -dProductId="${PRODUCT_ID}" -dBinaryDir="${BINARY_DIR}" -dIconDir="${ICON_DIR}" -dLicenseDir="${LICENSE_DIR}" -dSetupResourcesDir="${SETUP_RESOURCES_DIR}" -dCulture="${CULTURE}"
"${WIX}bin\\heat.exe" dir "${BINARY_DIR}" -out "Files-${OUTPUT_BASE_FILENAME}.wxs" -t vscodium.xsl -gg -sfrag -scom -sreg -srd -ke -cg "AppFiles" -var var.ManufacturerName -var var.AppName -var var.AppCodeName -var var.ProductVersion -var var.IconDir -var var.LicenseDir -var var.BinaryDir -dr APPLICATIONFOLDER -platform "${PLATFORM}"
"${WIX}bin\\candle.exe" -arch "${PLATFORM}" vscodium.wxs "Files-${OUTPUT_BASE_FILENAME}.wxs" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -dManufacturerName="VSCodium" -dAppCodeName="${PRODUCT_CODE}" -dAppName="${PRODUCT_NAME}" -dProductVersion="${RELEASE_VERSION%-insider}" -dProductId="${PRODUCT_ID}" -dBinaryDir="${BINARY_DIR}" -dIconDir="${ICON_DIR}" -dLicenseDir="${LICENSE_DIR}" -dSetupResourcesDir="${SETUP_RESOURCES_DIR}" -dCulture="${CULTURE}"
"${WIX}bin\\light.exe" vscodium.wixobj "Files-${OUTPUT_BASE_FILENAME}.wixobj" -ext WixUIExtension -ext WixUtilExtension -ext WixNetFxExtension -spdb -cc "${TEMP}\\vscodium-cab-cache\\${PLATFORM}" -out "${SETUP_RELEASE_DIR}\\${OUTPUT_BASE_FILENAME}.msi" -loc "i18n\\vscodium.${CULTURE}.wxl" -cultures:"${CULTURE}" -sice:ICE60 -sice:ICE69
BuildSetupTranslationTransform de-de 1031

View File

@ -11,15 +11,12 @@
<?define Arch="(x64)" ?>
<?endif?>
<!-- <?define ProductVersion="$(var.ProductVersion)" ?> -->
<?define ProductName="!(loc.ProductName)" ?>
<?define ProductNameWithVersion="!(loc.ProductName) $(var.ProductVersion) $(var.Arch)" ?>
<?define ProductLanguage="!(loc.ProductLanguage)" ?>
<?define AppCodeName="$(var.AppName)" ?>
<!-- <?define AppName="$(var.AppName)" ?> -->
<?define AppFolderName="$(var.AppName)" ?>
<?define ProductManufacturerShort="$(var.AppName)" ?>
<?define ProductManufacturerLong="$(var.AppName)" ?>
<?define ProductManufacturerShort="$(var.ManufacturerName)" ?>
<?define ProductManufacturerLong="$(var.ManufacturerName)" ?>
<!-- Static settings, DO NOT TOUCH or upgrades will break! -->
<?define ProductUpgradeCode="{@@PRODUCT_UPGRADE_CODE@@}" ?>

View File

@ -1045,32 +1045,32 @@
</Extension>
</ProgId>
</Component>
<Component Id="AddFileTypeAssociationVSCodiumSourceFile" Guid="*">
<RegistryValue Root="HKCR" Key="VSCodiumSourceFile" Value="VSCodium" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="VSCodiumSourceFile\DefaultIcon" Value="[#DEFAULT.ICO]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="VSCodiumSourceFile\shell\open\command" Value="&quot;[APPLICATIONFOLDER]VSCodium.exe&quot; &quot;%1&quot;" Type="string" Action="write" />
<Component Id="AddFileTypeAssociation$(var.AppCodeName)SourceFile" Guid="*">
<RegistryValue Root="HKCR" Key="$(var.AppCodeName)SourceFile" Value="$(var.AppName)" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="$(var.AppCodeName)SourceFile\DefaultIcon" Value="[#DEFAULT.ICO]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="$(var.AppCodeName)SourceFile\shell\open\command" Value="&quot;[APPLICATIONFOLDER]$(var.AppName).exe&quot; &quot;%1&quot;" Type="string" Action="write" />
</Component>
<Component Id="AddFileTypeAssociationApplicationsVSCodium" Guid="*">
<RegistryValue Root="HKCR" Key="Applications\VSCodium.exe\DefaultIcon" Value="[#DEFAULT.ICO]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Applications\VSCodium.exe\shell\open\command" Value="&quot;[APPLICATIONFOLDER]VSCodium.exe&quot; &quot;%1&quot;" Type="string" Action="write" />
<Component Id="AddFileTypeAssociationApplications$(var.AppCodeName)" Guid="*">
<RegistryValue Root="HKCR" Key="Applications\$(var.AppName).exe\DefaultIcon" Value="[#DEFAULT.ICO]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Applications\$(var.AppName).exe\shell\open\command" Value="&quot;[APPLICATIONFOLDER]$(var.AppName).exe&quot; &quot;%1&quot;" Type="string" Action="write" />
</Component>
<Component Id="AddContextMenuFiles" Guid="*">
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\*\shell\$(var.AppCodeName)" Value="Open with VSCodium" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\*\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]VSCodium.exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\*\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]VSCodium.exe&quot; &quot;%1&quot;" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\*\shell\$(var.AppCodeName)" Value="Open with $(var.AppName)" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\*\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]$(var.AppName).exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\*\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]$(var.AppName).exe&quot; &quot;%1&quot;" Type="string" Action="write" />
</Component>
<Component Id="AddContextMenuFolders" Guid="*">
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\shell\$(var.AppCodeName)" Value="Open with VSCodium" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]VSCodium.exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]VSCodium.exe&quot; &quot;%V&quot;" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\background\shell\$(var.AppCodeName)" Value="Open with VSCodium" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\background\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]VSCodium.exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\background\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]VSCodium.exe&quot; &quot;%V&quot;" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Drive\shell\$(var.AppCodeName)" Value="Open with VSCodium" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Drive\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]VSCodium.exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Drive\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]VSCodium.exe&quot; &quot;%V&quot;" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\shell\$(var.AppCodeName)" Value="Open with $(var.AppName)" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]$(var.AppName).exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]$(var.AppName).exe&quot; &quot;%V&quot;" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\background\shell\$(var.AppCodeName)" Value="Open with $(var.AppName)" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\background\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]$(var.AppName).exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\directory\background\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]$(var.AppName).exe&quot; &quot;%V&quot;" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Drive\shell\$(var.AppCodeName)" Value="Open with $(var.AppName)" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Drive\shell\$(var.AppCodeName)" Name="Icon" Value="[APPLICATIONFOLDER]$(var.AppName).exe" Type="string" Action="write" />
<RegistryValue Root="HKLM" Key="SOFTWARE\Classes\Drive\shell\$(var.AppCodeName)\command" Value="&quot;[APPLICATIONFOLDER]$(var.AppName).exe&quot; &quot;%V&quot;" Type="string" Action="write" />
</Component>
<Component Id="AddToEnvironmentPath" Guid="{A75E4C99-6713-45B9-8EC2-B9391592984C}">
@ -1080,17 +1080,17 @@
</Directory>
</Directory>
<Directory Id="ProgramMenuFolder">
<Directory Id="VSCodiumProgramMenuFolder" Name="$(var.AppName)">
<Directory Id="$(var.AppCodeName)ProgramMenuFolder" Name="$(var.AppName)">
<Component Id="StartMenuShortcut" Guid="*">
<Shortcut Id="VSCodiumStartMenuShortcut" Advertise="no" Name="$(var.AppName)" Directory="VSCodiumProgramMenuFolder" Target="[APPLICATIONFOLDER]VSCodium.exe" WorkingDirectory="APPLICATIONFOLDER" />
<RemoveFolder Id="VSCodiumProgramMenuFolder" On="uninstall" />
<Shortcut Id="$(var.AppCodeName)StartMenuShortcut" Advertise="no" Name="$(var.AppName)" Directory="$(var.AppCodeName)ProgramMenuFolder" Target="[APPLICATIONFOLDER]$(var.AppName).exe" WorkingDirectory="APPLICATIONFOLDER" />
<RemoveFolder Id="$(var.AppCodeName)ProgramMenuFolder" On="uninstall" />
<RegistryValue Root="HKCU" Key="Software\$(var.ProductManufacturerShort)\$(var.AppName)\Components" Name="StartMenuShortcutInstalled" Type="integer" Value="1" KeyPath="yes" />
</Component>
</Directory>
</Directory>
<Directory Id="DesktopFolder">
<Component Id="DesktopShortcut" Guid="*">
<Shortcut Id="VSCodiumDesktopShortcut" Advertise="no" Name="$(var.AppName)" Directory="DesktopFolder" Target="[APPLICATIONFOLDER]VSCodium.exe" WorkingDirectory="APPLICATIONFOLDER" />
<Shortcut Id="$(var.AppCodeName)DesktopShortcut" Advertise="no" Name="$(var.AppName)" Directory="DesktopFolder" Target="[APPLICATIONFOLDER]$(var.AppName).exe" WorkingDirectory="APPLICATIONFOLDER" />
<RegistryValue Root="HKCU" Key="Software\$(var.ProductManufacturerShort)\$(var.AppName)\Components" Name="DesktopShortcutInstalled" Type="integer" Value="1" KeyPath="yes" />
</Component>
</Directory>
@ -1108,8 +1108,8 @@
<ComponentRef Id="DesktopShortcut" />
</Feature>
<Feature Id="FeatureFileTypeAssociations" Title="!(loc.FeatureFileTypeAssociationsTitle)" Description="!(loc.FeatureFileTypeAssociationsDescription)" Level="2" Absent="allow" AllowAdvertise="no" InstallDefault="followParent">
<ComponentRef Id="AddFileTypeAssociationVSCodiumSourceFile" />
<ComponentRef Id="AddFileTypeAssociationApplicationsVSCodium" />
<ComponentRef Id="AddFileTypeAssociation$(var.AppCodeName)SourceFile" />
<ComponentRef Id="AddFileTypeAssociationApplications$(var.AppCodeName)" />
<Feature Id="FeatureFileTypeAssocASCX" Title=".ascx" Description="ASCX" Level="2" Absent="allow" AllowAdvertise="no" InstallDefault="followParent">
<ComponentRef Id="AddFileTypeAssociationASCX" />