-
Notifications
You must be signed in to change notification settings - Fork 170
Update Wix v3.14 to Wix v6 (Setup and SetupBundle) #1378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Nguyen12345tt
wants to merge
1
commit into
SafeExamBrowser:master
Choose a base branch
from
Nguyen12345tt:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,49 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"> | ||
| <xsl:output method="xml" indent="yes"/> | ||
| <xsl:template match="@*|node()"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="@*|node()" /> | ||
| </xsl:copy> | ||
| </xsl:template> | ||
| <xsl:template match="wix:File[substring(@Source, string-length(@Source) - string-length('SafeExamBrowser.exe') + 1) = 'SafeExamBrowser.exe']"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="@*|node()" /> | ||
| <xsl:attribute name="Id"> | ||
| <xsl:text>MainExecutable</xsl:text> | ||
| </xsl:attribute> | ||
| </xsl:copy> | ||
| <wix:File Id="ApplicationIconFile" Source="Resources\Application.ico" /> | ||
| <wix:File Id="ConfigurationIconFile" Source="Resources\ConfigurationFile.ico" /> | ||
| <wix:ProgId Id="ConfigurationFileExtension" Description="SEB Configuration File" Icon="ConfigurationIconFile" Advertise="no"> | ||
| <wix:Extension Id="seb" ContentType="application/seb" Advertise="no"> | ||
| <wix:Verb Id="open" Command="Open" Argument=""%1"" TargetFile="MainExecutable" /> | ||
| </wix:Extension> | ||
| </wix:ProgId> | ||
| <wix:RegistryKey Root="HKCR" Key="seb"> | ||
| <wix:RegistryValue Value="URL:Safe Exam Browser Protocol" Type="string" /> | ||
| <wix:RegistryValue Name="URL Protocol" Value="" Type="string" /> | ||
| <wix:RegistryValue Key="DefaultIcon" Value="[#ApplicationIconFile]" Type="string" /> | ||
| <wix:RegistryValue Key="shell\open\command" Value=""[ApplicationDirectory]$(var.SafeExamBrowser.Runtime.TargetFileName)" "%1"" Type="string" /> | ||
| </wix:RegistryKey> | ||
| <wix:RegistryKey Root="HKCR" Key="sebs"> | ||
| <wix:RegistryValue Value="URL:Safe Exam Browser Secure Protocol" Type="string" /> | ||
| <wix:RegistryValue Name="URL Protocol" Value="" Type="string" /> | ||
| <wix:RegistryValue Key="DefaultIcon" Value="[#ApplicationIconFile]" Type="string" /> | ||
| <wix:RegistryValue Key="shell\open\command" Value=""[ApplicationDirectory]$(var.SafeExamBrowser.Runtime.TargetFileName)" "%1"" Type="string" /> | ||
| </wix:RegistryKey> | ||
| </xsl:template> | ||
| <xsl:stylesheet version="1.0" | ||
| xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
| xmlns:wix="http://wixtoolset.org/schemas/v4/wxs" | ||
| xmlns="http://wixtoolset.org/schemas/v4/wxs" | ||
| exclude-result-prefixes="xsl wix"> | ||
|
|
||
| <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" /> | ||
|
|
||
| <xsl:template match="@*|node()"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="@*|node()" /> | ||
| </xsl:copy> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template match="wix:File[substring(@Source, string-length(@Source) - string-length('SafeExamBrowser.exe') + 1) = 'SafeExamBrowser.exe']"> | ||
| <xsl:copy> | ||
| <xsl:apply-templates select="@*"/> | ||
|
|
||
| <xsl:attribute name="Id">MainExecutable</xsl:attribute> | ||
| <xsl:attribute name="KeyPath">yes</xsl:attribute> | ||
|
|
||
| <xsl:apply-templates select="node()"/> | ||
| </xsl:copy> | ||
|
|
||
| <wix:File Id="ApplicationIconFile" Source="Resources\Application.ico" /> | ||
| <wix:File Id="ConfigurationIconFile" Source="Resources\ConfigurationFile.ico" /> | ||
|
|
||
| <wix:ProgId Id="ConfigurationFileExtension" Description="SEB Configuration File" Icon="ConfigurationIconFile" Advertise="no"> | ||
| <wix:Extension Id="seb" ContentType="application/seb" Advertise="no"> | ||
| <wix:Verb Id="open" Command="Open" Argument=""%1"" TargetFile="MainExecutable" /> | ||
| </wix:Extension> | ||
| </wix:ProgId> | ||
|
|
||
| <wix:RegistryKey Root="HKCR" Key="seb"> | ||
| <wix:RegistryValue Value="URL:Safe Exam Browser Protocol" Type="string" /> | ||
| <wix:RegistryValue Name="URL Protocol" Value="" Type="string" /> | ||
| <wix:RegistryValue Key="DefaultIcon" Value="[#ApplicationIconFile]" Type="string" /> | ||
| <wix:RegistryValue Key="shell\open\command" Value=""[#MainExecutable]" "%1"" Type="string" /> | ||
| </wix:RegistryKey> | ||
|
|
||
| <wix:RegistryKey Root="HKCR" Key="sebs"> | ||
| <wix:RegistryValue Value="URL:Safe Exam Browser Secure Protocol" Type="string" /> | ||
| <wix:RegistryValue Name="URL Protocol" Value="" Type="string" /> | ||
| <wix:RegistryValue Key="DefaultIcon" Value="[#ApplicationIconFile]" Type="string" /> | ||
| <wix:RegistryValue Key="shell\open\command" Value=""[#MainExecutable]" "%1"" Type="string" /> | ||
| </wix:RegistryKey> | ||
|
|
||
| </xsl:template> | ||
| </xsl:stylesheet> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,23 +1,24 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
| <?if $(var.Platform) = x64 ?> | ||
| <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?> | ||
| <?else ?> | ||
| <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?> | ||
| <?endif ?> | ||
| <Fragment> | ||
| <Directory Id="TARGETDIR" Name="SourceDir"> | ||
| <Directory Id="$(var.PlatformProgramFilesFolder)"> | ||
| <Directory Id="InstallFolder" Name="SafeExamBrowser"> | ||
| <Directory Id="ApplicationDirectory" Name="Application" /> | ||
| <Directory Id="ConfigurationDirectory" Name="Configuration" /> | ||
| <Directory Id="ResetDirectory" Name="Reset" /> | ||
| <Directory Id="ServiceDirectory" Name="Service" /> | ||
| </Directory> | ||
| </Directory> | ||
| <Directory Id="ProgramMenuFolder"> | ||
| <Directory Id="StartMenuDirectory" Name="SafeExamBrowser" /> | ||
| </Directory> | ||
| </Directory> | ||
| </Fragment> | ||
| </Wix> | ||
| <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| <?if $(var.Platform) = x64 ?> | ||
| <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?> | ||
| <?else?> | ||
| <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?> | ||
| <?endif?> | ||
|
|
||
| <Fragment> | ||
| <StandardDirectory Id="$(var.PlatformProgramFilesFolder)"> | ||
|
|
||
| <Directory Id="InstallFolder" Name="SafeExamBrowser"> | ||
| <Directory Id="ApplicationDirectory" Name="Application" /> | ||
| <Directory Id="ConfigurationDirectory" Name="Configuration" /> | ||
| <Directory Id="ResetDirectory" Name="Reset" /> | ||
| <Directory Id="ServiceDirectory" Name="Service" /> | ||
| </Directory> | ||
|
|
||
| </StandardDirectory> | ||
|
|
||
| <StandardDirectory Id="ProgramMenuFolder"> | ||
| <Directory Id="StartMenuDirectory" Name="SafeExamBrowser" /> | ||
| </StandardDirectory> | ||
| </Fragment> | ||
| </Wix> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | ||
| <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | ||
| <Fragment> | ||
| <CustomAction Id="LegacyCleanupAction" Execute="deferred" Impersonate="no" Return="ignore" | ||
| Directory="InstallFolder" ExeCommand="cmd.exe /C "rd /S /Q SebWindowsServiceWCF"" /> | ||
| <CustomAction Id="LegacyCleanupAction" Execute="deferred" Impersonate="no" Return="ignore" Directory="InstallFolder" ExeCommand="cmd.exe /C "rd /S /Q SebWindowsServiceWCF"" /> | ||
| </Fragment> | ||
| </Wix> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The registry value was changed from
[ApplicationDirectory]$(var.SafeExamBrowser.Runtime.TargetFileName)to[#MainExecutable]. While[#MainExecutable]is a valid file reference in WiX v4, this change alters the path resolution. The original used a directory property plus filename variable, while the new version uses a file identifier. Verify this produces the correct full path, as the file identifier syntax may expand differently than the directory + filename approach.