Skip to content

Commit 00f46e6

Browse files
authoredMar 11, 2024··
feat: support additionalLightArgs for msi target (#8120)
1 parent 25a2489 commit 00f46e6

File tree

5 files changed

+36
-1
lines changed

5 files changed

+36
-1
lines changed
 

‎.changeset/neat-bottles-wash.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"app-builder-lib": minor
3+
---
4+
5+
feat: support `additionalLightArgs` for msi target

‎docs/configuration/msi.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<li><code id="MsiOptions-upgradeCode">upgradeCode</code> String | “undefined” - The <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa372375(v=vs.85).aspx">upgrade code</a>. Optional, by default generated using app id.</li>
44
<li><code id="MsiOptions-warningsAsErrors">warningsAsErrors</code> = <code>true</code> Boolean - If <code>warningsAsErrors</code> is <code>true</code> (default): treat warnings as errors. If <code>warningsAsErrors</code> is <code>false</code>: allow warnings.</li>
55
<li><code id="MsiOptions-additionalWixArgs">additionalWixArgs</code> Array&lt;String&gt; | “undefined” - Any additional arguments to be passed to the WiX installer compiler, such as <code>[&quot;-ext&quot;, &quot;WixUtilExtension&quot;]</code></li>
6+
<li><code id="MsiOptions-additionalLightArgs">additionalLightArgs</code> Array&lt;String&gt; | “undefined” - Any additional arguments to be passed to the light.ext, such as <code>[&quot;-cultures:ja-jp&quot;]</code></li>
67
<li><code id="MsiOptions-perMachine">perMachine</code> = <code>false</code> Boolean - Whether to install per all users (per-machine).</li>
78
<li><code id="MsiOptions-runAfterFinish">runAfterFinish</code> = <code>true</code> Boolean - Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.</li>
89
</ul>

‎packages/app-builder-lib/scheme.json

+14
Original file line numberDiff line numberDiff line change
@@ -3597,6 +3597,20 @@
35973597
"MsiOptions": {
35983598
"additionalProperties": false,
35993599
"properties": {
3600+
"additionalLightArgs": {
3601+
"anyOf": [
3602+
{
3603+
"items": {
3604+
"type": "string"
3605+
},
3606+
"type": "array"
3607+
},
3608+
{
3609+
"type": "null"
3610+
}
3611+
],
3612+
"description": "Any additional arguments to be passed to the light.ext, such as `[\"-cultures:ja-jp\"]`"
3613+
},
36003614
"additionalWixArgs": {
36013615
"anyOf": [
36023616
{

‎packages/app-builder-lib/src/options/MsiOptions.ts

+5
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@ export interface MsiOptions extends CommonWindowsInstallerConfiguration, TargetS
2323
* Any additional arguments to be passed to the WiX installer compiler, such as `["-ext", "WixUtilExtension"]`
2424
*/
2525
readonly additionalWixArgs?: Array<string> | null
26+
27+
/**
28+
* Any additional arguments to be passed to the light.ext, such as `["-cultures:ja-jp"]`
29+
*/
30+
readonly additionalLightArgs?: Array<string> | null
2631
}

‎packages/app-builder-lib/src/targets/MsiTarget.ts

+11-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ export default class MsiTarget extends Target {
126126
"-sw1076",
127127
`-dappDir=${vm.toVmFile(appOutDir)}`,
128128
// "-dcl:high",
129-
].concat(this.getCommonWixArgs())
129+
]
130+
.concat(this.getCommonWixArgs())
131+
.concat(this.getAdditionalLightArgs())
130132

131133
// http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Build-3-5-2229-0-give-me-the-following-error-error-LGHT0216-An-unexpected-Win32-exception-with-errorn-td5707443.html
132134
if (process.platform !== "win32") {
@@ -145,6 +147,14 @@ export default class MsiTarget extends Target {
145147
})
146148
}
147149

150+
private getAdditionalLightArgs() {
151+
const args: Array<string> = []
152+
if (this.options.additionalLightArgs != null) {
153+
args.push(...this.options.additionalLightArgs)
154+
}
155+
return args
156+
}
157+
148158
private getCommonWixArgs() {
149159
const args: Array<string> = ["-pedantic"]
150160
if (this.options.warningsAsErrors !== false) {

0 commit comments

Comments
 (0)
Please sign in to comment.