Add a new YAML release pipeline to replace the old CDPx one (#15039)
* lets move unneeded stuff out
* adding in direct installer yml
* forcing internal
* Create release.yml
* Update release.yml
* Try to use the right feed, scrub
* What if we don't do package ES...
* Update release.yml
* Update release.yml
* Update release.yml for Azure Pipelines
* Update release.yml
* Update release.yml
* seeing where we are in the world
* adjustment
* fixed a copy/paste
* think we're in root, having a dir command just to verify
* start copying over core files
* adding in tools + setup
* fixing telem
* ci: fix could not lock config file flakiness
* forcing root dir
* attempting to copy files again
* adding notes
* lets try this again
* trying a quicker way to figure out root
* maybe it is the slash not being there looking at docs deeper
* playing with slashes
* signing
* tewak
* fixing file path for signing. suprise, app driver and PT have different paths :)
* getting my sign on
* tweaking json
* Adjusting files and getting output from build
* fixing yml copy and paste oops
* fixing spacing ...
* getting bootstrapper added
* moving file and seeing if we can't get this pipeline goodness working
* trying my next oops at powershell ...
* shift in version location i bet this will fail, doing a parallel build to verify
* trying again for powershell passing in arg
* Dustin showed me the error
* forcing as string
* fdsfasd
* forcing as string
* getting sad panda
* trying to force array
* lets try this on single line ....
* i made a major oops
* Sync'ing naming, adding in signing for msi & boot
* breaking up signing into smaller bits
* grr, not everything committed
* Added a lot of comments
* fixing installer signing path
* fixing paths
* seeing if this fixes some of the signing quirks
* removing 3rd party double, removing the pipeline call
* centeralizing again
* more consolidation
* Going a bit more wide
* going very wide
* seeing if i can't do a dual but more targetted list
* think having leading slash caused a failure
* looks like the esrp does not verify paths don't exist
* fixing 3rd party
* reseting old stuff so old pipeline still works
* resetting version setting
* [PR INTO CRUTKAS BR] Fix the localization pipeline (#15026)
* Fix localization
This commit makes a few changes:
1. It introduces a couple scripts for moving localization files
around based on Touchdown's output shape. They are well-documented.
2. It rewrites portions of the RESX->RC converter to avoid resgen and
handle the new touchdown language types.
* I forgot the cardinal rule of using YAML: Don't
* Fix duplicate keys in Keyboard Editor!
* Up the timeout
* Update the language list in the wxs
* Use IsPipeline
* Special case SvgPreviewHandler >:{
* Push this down to Clint's branch: fix the publish profile
* Reinstate the call to publish.cmd
* Document it
* build the publishing rules
* Remove the GitSubmodules hack
* Restore CDPx move_uwp_resources
* Don't need this any more! spelling.
* adding spelling
* sorting alphabetical
* fix spelling
* shifint to new dll naming
* Move GcodePreviewHandler's Resources to follow the preferred C# format
* Revert "Move GcodePreviewHandler's Resources to follow the preferred C# format"
This reverts commit daf4c7ef3a
.
* remove SVG workaround - requires #15054!
* cleaning up commented code dustin said i could delete :)
* fixing tab vs space
* Update release.yml
Fixing Dustin comments
Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
Co-authored-by: Dustin Howett <duhowett@microsoft.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
Co-authored-by: Dustin L. Howett <dustin@howett.net>
This commit is contained in:
Родитель
239610f1cd
Коммит
d5a2bf16d9
|
@ -139,6 +139,7 @@ Bicubic
|
|||
bigbar
|
||||
bigobj
|
||||
binaryformatter
|
||||
binlog
|
||||
binskim
|
||||
bitmapimage
|
||||
BITMAPINFO
|
||||
|
@ -158,6 +159,7 @@ Bokm
|
|||
BOKMAL
|
||||
boolalpha
|
||||
Bools
|
||||
Boostrapper
|
||||
bootstrapper
|
||||
Bopomofo
|
||||
BOTTOMALIGN
|
||||
|
@ -417,6 +419,7 @@ diffing
|
|||
difftime
|
||||
DIIRFLAG
|
||||
dimm
|
||||
directshow
|
||||
dirs
|
||||
DISABLEASACTIONKEY
|
||||
dispid
|
||||
|
@ -456,6 +459,8 @@ dshow
|
|||
dst
|
||||
DSVG
|
||||
DText
|
||||
dupenv
|
||||
DUSTIN
|
||||
dutil
|
||||
DVASPECT
|
||||
DVASPECTINFO
|
||||
|
@ -493,6 +498,7 @@ editshortcutswindow
|
|||
efgh
|
||||
EFile
|
||||
egistry
|
||||
ekus
|
||||
elif
|
||||
elseif
|
||||
Emoji
|
||||
|
@ -520,6 +526,8 @@ ERRORMESSAGE
|
|||
ERRORTITLE
|
||||
ESettings
|
||||
esize
|
||||
esrp
|
||||
estdir
|
||||
etcore
|
||||
etl
|
||||
etw
|
||||
|
@ -611,6 +619,8 @@ FZE
|
|||
gabime
|
||||
GAC
|
||||
gacutil
|
||||
Gamebar
|
||||
GBarm
|
||||
GBs
|
||||
GCLP
|
||||
gcnew
|
||||
|
@ -635,6 +645,8 @@ globals
|
|||
GNumber
|
||||
google
|
||||
GPTR
|
||||
Grayscale
|
||||
gtm
|
||||
gui
|
||||
guiddef
|
||||
GUITHREADINFO
|
||||
|
@ -723,6 +735,7 @@ htcfreek
|
|||
HTHUMBNAIL
|
||||
Htmdid
|
||||
HTTRANSPARENT
|
||||
Hvci
|
||||
hwb
|
||||
HWINEVENTHOOK
|
||||
hwnd
|
||||
|
@ -1143,6 +1156,8 @@ MIIM
|
|||
millis
|
||||
mimetype
|
||||
mindaro
|
||||
Minimatch
|
||||
Minimizeallwindows
|
||||
MINIMIZEBOX
|
||||
miniz
|
||||
minlevel
|
||||
|
@ -1221,6 +1236,7 @@ MYICON
|
|||
NAMECHANGE
|
||||
nameof
|
||||
namespace
|
||||
namings
|
||||
NATIVEFNTCTL
|
||||
NCACTIVATE
|
||||
ncc
|
||||
|
@ -1312,6 +1328,8 @@ Noto
|
|||
NOTRACK
|
||||
NOUPDATE
|
||||
NOZORDER
|
||||
NPH
|
||||
npm
|
||||
npos
|
||||
NResize
|
||||
ntdll
|
||||
|
@ -1425,6 +1443,9 @@ PKBDLLHOOKSTRUCT
|
|||
PKEY
|
||||
plib
|
||||
PLK
|
||||
ploc
|
||||
ploca
|
||||
plocm
|
||||
plugin
|
||||
pluginsmodel
|
||||
PMSIHANDLE
|
||||
|
@ -1509,6 +1530,7 @@ pushd
|
|||
PVOID
|
||||
pwa
|
||||
pwcs
|
||||
pwsh
|
||||
PWSTR
|
||||
pwsz
|
||||
pwtd
|
||||
|
@ -1517,6 +1539,7 @@ Qin
|
|||
qit
|
||||
QITAB
|
||||
QITABENT
|
||||
qps
|
||||
Queryable
|
||||
QUERYENDSESSION
|
||||
QUERYOPEN
|
||||
|
@ -1604,6 +1627,7 @@ resw
|
|||
resx
|
||||
retval
|
||||
rexit
|
||||
rfc
|
||||
rfind
|
||||
RGBQUAD
|
||||
rgbs
|
||||
|
@ -1626,6 +1650,7 @@ roslyn
|
|||
royvou
|
||||
Rpc
|
||||
RRF
|
||||
rrr
|
||||
rshift
|
||||
Rsp
|
||||
rst
|
||||
|
@ -1695,6 +1720,8 @@ Setttings
|
|||
SETWORKAREA
|
||||
sfgao
|
||||
SFGAOF
|
||||
SFP
|
||||
SHAREIMAGELISTS
|
||||
sharpkeys
|
||||
SHCNE
|
||||
SHCNF
|
||||
|
@ -1740,10 +1767,12 @@ sid
|
|||
siex
|
||||
SIGABRT
|
||||
sigdn
|
||||
SIGNINGSCENARIO
|
||||
signtool
|
||||
SINGLEKEY
|
||||
singlekeyremapcontrol
|
||||
singletones
|
||||
sipolicy
|
||||
SIZEBOX
|
||||
sizeg
|
||||
Sizename
|
||||
|
@ -1767,11 +1796,14 @@ somil
|
|||
Soref
|
||||
SOURCECLIENTAREAONLY
|
||||
SOURCEHEADER
|
||||
sourcesdirectory
|
||||
spamming
|
||||
spdisp
|
||||
spdlog
|
||||
spdo
|
||||
spec'ing
|
||||
spdth
|
||||
specialfolder
|
||||
spec'ing
|
||||
spesi
|
||||
splitwstring
|
||||
sprintf
|
||||
|
@ -1898,6 +1930,7 @@ tcscpy
|
|||
TCustom
|
||||
tdbuild
|
||||
TDevice
|
||||
telem
|
||||
tellg
|
||||
Templated
|
||||
templatenamespace
|
||||
|
@ -2108,6 +2141,7 @@ webclient
|
|||
webpack
|
||||
webpage
|
||||
website
|
||||
We'd
|
||||
wekyb
|
||||
Wevtapi
|
||||
wgpocpl
|
||||
|
@ -2122,6 +2156,7 @@ wikipedia
|
|||
wil
|
||||
wildcards
|
||||
winapi
|
||||
winappdriver
|
||||
wincodec
|
||||
Wincodecsdk
|
||||
wincolor
|
||||
|
@ -2152,6 +2187,7 @@ Winhook
|
|||
winkey
|
||||
WINL
|
||||
winmd
|
||||
WINMSAPP
|
||||
winnt
|
||||
winres
|
||||
winrt
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SiPolicy xmlns="urn:schemas-microsoft-com:sipolicy">
|
||||
<VersionEx>10.0.0.0</VersionEx>
|
||||
<PlatformID>{2E07F7E4-194C-4D20-B7C9-6F44A6C5A234}</PlatformID>
|
||||
<Rules>
|
||||
<Rule>
|
||||
<Option>Enabled:Unsigned System Integrity Policy</Option>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Option>Enabled:Audit Mode</Option>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Option>Enabled:Advanced Boot Options Menu</Option>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Option>Required:Enforce Store Applications</Option>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Option>Disabled:Script Enforcement</Option>
|
||||
</Rule>
|
||||
</Rules>
|
||||
<!--EKUS-->
|
||||
<EKUs />
|
||||
<!--File Rules-->
|
||||
<FileRules />
|
||||
<!--Signers-->
|
||||
<Signers />
|
||||
<!--Driver Signing Scenarios-->
|
||||
<SigningScenarios>
|
||||
<SigningScenario Value="131" ID="ID_SIGNINGSCENARIO_DRIVERS_1" FriendlyName="Auto generated policy on 01-26-2021">
|
||||
<ProductSigners />
|
||||
</SigningScenario>
|
||||
<SigningScenario Value="12" ID="ID_SIGNINGSCENARIO_WINDOWS" FriendlyName="Auto generated policy on 01-26-2021">
|
||||
<ProductSigners />
|
||||
</SigningScenario>
|
||||
</SigningScenarios>
|
||||
<UpdatePolicySigners />
|
||||
<CiSigners />
|
||||
<HvciOptions>0</HvciOptions>
|
||||
<PolicyTypeID>{A244370E-44C9-4C06-B551-F6016E563076}</PolicyTypeID>
|
||||
</SiPolicy>
|
|
@ -0,0 +1,226 @@
|
|||
{
|
||||
"Version": "1.0.0",
|
||||
"UseMinimatch": false,
|
||||
"SignBatches": [
|
||||
{
|
||||
"MatchedPath": [
|
||||
"!(ModernWpf)*.resources.dll",
|
||||
|
||||
"PowerToysSetupCustomActions.dll",
|
||||
|
||||
|
||||
"PowerToys.ActionRunner.exe",
|
||||
"PowerToys.Update.exe",
|
||||
"PowerToys.BackgroundActivatorDLL.dll",
|
||||
"Notifications.dll",
|
||||
"os-detection.dll",
|
||||
"PowerToys.exe",
|
||||
"PowerToys.Interop.dll",
|
||||
"BugReportTool\\BugReportTool.exe",
|
||||
"WebcamReportTool\\WebcamReportTool.exe",
|
||||
"Telemetry.dll",
|
||||
"PowerToys.ManagedTelemetry.dll",
|
||||
"PowerToys.ManagedCommon.dll",
|
||||
"PowerToys.Common.UI.dll",
|
||||
"PowerToys.Settings.UI.Lib.dll",
|
||||
|
||||
"modules\\ColorPicker\\ColorPicker.dll",
|
||||
"modules\\ColorPicker\\ColorPickerUI.dll",
|
||||
"modules\\ColorPicker\\ColorPickerUI.exe",
|
||||
|
||||
"modules\\ColorPicker\\PowerToys.ColorPicker.dll",
|
||||
"modules\\ColorPicker\\PowerToys.ColorPickerUI.dll",
|
||||
"modules\\ColorPicker\\PowerToys.ColorPickerUI.exe",
|
||||
|
||||
"modules\\Awake\\PowerToys.AwakeModuleInterface.dll",
|
||||
"modules\\Awake\\PowerToys.Awake.exe",
|
||||
"modules\\Awake\\PowerToys.Awake.dll",
|
||||
|
||||
"modules\\FancyZones\\fancyzones.dll",
|
||||
"modules\\FancyZones\\PowerToys.FancyZonesEditor.exe",
|
||||
"modules\\FancyZones\\PowerToys.FancyZonesEditor.dll",
|
||||
"modules\\FancyZones\\PowerToys.FancyZonesModuleInterface.dll",
|
||||
"modules\\FancyZones\\PowerToys.FancyZones.exe",
|
||||
|
||||
"modules\\FileExplorerPreview\\PowerToys.GcodePreviewHandler.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.GcodePreviewHandler.comhost.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.GcodeThumbnailProvider.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.GcodeThumbnailProvider.comhost.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.ManagedTelemetry.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.MarkdownPreviewHandler.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.MarkdownPreviewHandler.comhost.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.PdfPreviewHandler.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.PdfPreviewHandler.comhost.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.PdfThumbnailProvider.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.PdfThumbnailProvider.comhost.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.powerpreview.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.PreviewHandlerCommon.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.SvgPreviewHandler.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.SvgPreviewHandler.comhost.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.SvgThumbnailProvider.dll",
|
||||
"modules\\FileExplorerPreview\\PowerToys.SvgThumbnailProvider.comhost.dll",
|
||||
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizer.exe",
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizer.dll",
|
||||
"modules\\ImageResizer\\PowerToys.ImageResizerExt.dll",
|
||||
|
||||
"modules\\KeyboardManager\\PowerToys.KeyboardManager.dll",
|
||||
"modules\\KeyboardManager\\KeyboardManagerEditor\\PowerToys.KeyboardManagerEditor.exe",
|
||||
"modules\\KeyboardManager\\KeyboardManagerEngine\\PowerToys.KeyboardManagerEngine.exe",
|
||||
|
||||
"modules\\launcher\\PowerToys.Launcher.dll",
|
||||
"modules\\launcher\\PowerToys.PowerLauncher.dll",
|
||||
"modules\\launcher\\PowerToys.PowerLauncher.exe",
|
||||
"modules\\launcher\\PowerToys.PowerLauncher.Telemetry.dll",
|
||||
"modules\\launcher\\Wox.dll",
|
||||
"modules\\launcher\\Wox.Infrastructure.dll",
|
||||
"modules\\launcher\\Wox.Plugin.dll",
|
||||
"modules\\launcher\\Plugins\\Calculator\\Microsoft.PowerToys.Run.Plugin.Calculator.dll",
|
||||
"modules\\launcher\\Plugins\\Folder\\Microsoft.Plugin.Folder.dll",
|
||||
"modules\\launcher\\Plugins\\Indexer\\Microsoft.Plugin.Indexer.dll",
|
||||
"modules\\launcher\\Plugins\\Program\\Microsoft.Plugin.Program.dll",
|
||||
"modules\\launcher\\Plugins\\Registry\\Microsoft.PowerToys.Run.Plugin.Registry.dll",
|
||||
"modules\\launcher\\Plugins\\WindowsSettings\\Microsoft.PowerToys.Run.Plugin.WindowsSettings.dll",
|
||||
"modules\\launcher\\Plugins\\Shell\\Microsoft.Plugin.Shell.dll",
|
||||
"modules\\launcher\\Plugins\\Uri\\Microsoft.Plugin.Uri.dll",
|
||||
"modules\\launcher\\Plugins\\WindowWalker\\Microsoft.Plugin.WindowWalker.dll",
|
||||
"modules\\launcher\\Plugins\\UnitConverter\\Community.PowerToys.Run.Plugin.UnitConverter.dll",
|
||||
"modules\\launcher\\Plugins\\VSCodeWorkspaces\\Community.PowerToys.Run.Plugin.VSCodeWorkspaces.dll",
|
||||
"modules\\launcher\\Plugins\\Service\\Microsoft.PowerToys.Run.Plugin.Service.dll",
|
||||
"modules\\launcher\\Plugins\\System\\Microsoft.PowerToys.Run.Plugin.System.dll",
|
||||
"modules\\launcher\\Plugins\\WindowsTerminal\\Microsoft.PowerToys.Run.Plugin.WindowsTerminal.dll",
|
||||
|
||||
"modules\\MouseUtils\\PowerToys.FindMyMouse.dll",
|
||||
"modules\\MouseUtils\\PowerToys.MouseHighlighter.dll",
|
||||
|
||||
"modules\\PowerRename\\PowerToys.PowerRenameExt.dll",
|
||||
"modules\\PowerRename\\PowerToys.PowerRenameUILib.dll",
|
||||
"modules\\PowerRename\\PowerToys.PowerRename.exe",
|
||||
|
||||
"modules\\ShortcutGuide\\ShortcutGuide\\PowerToys.ShortcutGuide.exe",
|
||||
"modules\\ShortcutGuide\\ShortcutGuideModuleInterface\\PowerToys.ShortcutGuideModuleInterface.dll",
|
||||
|
||||
"modules\\VideoConference\\PowerToys.VideoConferenceModule.dll",
|
||||
"modules\\VideoConference\\PowerToys.VideoConferenceProxyFilter_x86.dll",
|
||||
"modules\\VideoConference\\PowerToys.VideoConferenceProxyFilter_x64.dll",
|
||||
|
||||
"Settings\\PowerToys.Settings.UI.exe",
|
||||
"Settings\\PowerToys.Settings.dll",
|
||||
"Settings\\PowerToys.Settings.exe"
|
||||
],
|
||||
"SigningInfo": {
|
||||
"Operations": [
|
||||
{
|
||||
"KeyCode": "CP-230012",
|
||||
"OperationSetCode": "SigntoolSign",
|
||||
"Parameters": [
|
||||
{
|
||||
"parameterName": "OpusName",
|
||||
"parameterValue": "Microsoft"
|
||||
},
|
||||
{
|
||||
"parameterName": "OpusInfo",
|
||||
"parameterValue": "http://www.microsoft.com"
|
||||
},
|
||||
{
|
||||
"parameterName": "FileDigest",
|
||||
"parameterValue": "/fd \"SHA256\""
|
||||
},
|
||||
{
|
||||
"parameterName": "PageHash",
|
||||
"parameterValue": "/NPH"
|
||||
},
|
||||
{
|
||||
"parameterName": "TimeStamp",
|
||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||
}
|
||||
],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-230012",
|
||||
"OperationSetCode": "SigntoolVerify",
|
||||
"Parameters": [],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"MatchedPath": [
|
||||
"Microsoft.Search.Interop.dll",
|
||||
"ModernWpf.dll",
|
||||
"ModernWpf.Controls.dll",
|
||||
"System.IO.Abstractions.dll",
|
||||
"Mono.Cecil.dll",
|
||||
"Mono.Cecil.Mdb.dll",
|
||||
"Mono.Cecil.Pdb.dll",
|
||||
"Mono.Cecil.Rocks.dll",
|
||||
"NLog.dll",
|
||||
"HtmlAgilityPack.dll",
|
||||
"Markdig.Signed.dll",
|
||||
"Mages.Core.dll",
|
||||
"JetBrains.Annotations.dll",
|
||||
"ICSharpCode.SharpZipLib.dll",
|
||||
"NLog.Extensions.Logging.dll",
|
||||
"concrt140_app.dll",
|
||||
"msvcp140_1_app.dll",
|
||||
"msvcp140_2_app.dll",
|
||||
"msvcp140_app.dll",
|
||||
"vcamp140_app.dll",
|
||||
"vccorlib140_app.dll",
|
||||
"vcomp140_app.dll",
|
||||
"vcruntime140_1_app.dll",
|
||||
"vcruntime140_app.dll",
|
||||
"ColorCode.Core.dll",
|
||||
"ColorCode.UWP.dll",
|
||||
"UnitsNet.dll"
|
||||
],
|
||||
"SigningInfo": {
|
||||
"Operations": [
|
||||
{
|
||||
"KeyCode": "CP-231522",
|
||||
"OperationSetCode": "SigntoolSign",
|
||||
"Parameters": [
|
||||
{
|
||||
"parameterName": "OpusName",
|
||||
"parameterValue": "Microsoft"
|
||||
},
|
||||
{
|
||||
"parameterName": "OpusInfo",
|
||||
"parameterValue": "http://www.microsoft.com"
|
||||
},
|
||||
{
|
||||
"parameterName": "FileDigest",
|
||||
"parameterValue": "/fd \"SHA256\""
|
||||
},
|
||||
{
|
||||
"parameterName": "Append",
|
||||
"parameterValue": "/as"
|
||||
},
|
||||
{
|
||||
"parameterName": "PageHash",
|
||||
"parameterValue": "/NPH"
|
||||
},
|
||||
{
|
||||
"parameterName": "TimeStamp",
|
||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||
}
|
||||
],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-231522",
|
||||
"OperationSetCode": "SigntoolVerify",
|
||||
"Parameters": [],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
"Version": "1.0.0",
|
||||
"UseMinimatch": false,
|
||||
"SignBatches": [
|
||||
{
|
||||
"MatchedPath": [
|
||||
"PowerToysSetup-*.exe",
|
||||
"PowerToysSetup-*.msi"
|
||||
],
|
||||
"SigningInfo": {
|
||||
"Operations": [
|
||||
{
|
||||
"KeyCode": "CP-230012",
|
||||
"OperationSetCode": "SigntoolSign",
|
||||
"Parameters": [
|
||||
{
|
||||
"parameterName": "OpusName",
|
||||
"parameterValue": "Microsoft"
|
||||
},
|
||||
{
|
||||
"parameterName": "OpusInfo",
|
||||
"parameterValue": "http://www.microsoft.com"
|
||||
},
|
||||
{
|
||||
"parameterName": "FileDigest",
|
||||
"parameterValue": "/fd \"SHA256\""
|
||||
},
|
||||
{
|
||||
"parameterName": "PageHash",
|
||||
"parameterValue": "/NPH"
|
||||
},
|
||||
{
|
||||
"parameterName": "TimeStamp",
|
||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||
}
|
||||
],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-230012",
|
||||
"OperationSetCode": "SigntoolVerify",
|
||||
"Parameters": [],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
"Version": "1.0.0",
|
||||
"UseMinimatch": false,
|
||||
"SignBatches": [
|
||||
{
|
||||
"MatchedPath": [
|
||||
"modules\\VideoConference\\PowerToys.VideoConferenceProxyFilter_x86.dll"
|
||||
],
|
||||
"SigningInfo": {
|
||||
"Operations": [
|
||||
{
|
||||
"KeyCode": "CP-230012",
|
||||
"OperationSetCode": "SigntoolSign",
|
||||
"Parameters": [
|
||||
{
|
||||
"parameterName": "OpusName",
|
||||
"parameterValue": "Microsoft"
|
||||
},
|
||||
{
|
||||
"parameterName": "OpusInfo",
|
||||
"parameterValue": "http://www.microsoft.com"
|
||||
},
|
||||
{
|
||||
"parameterName": "FileDigest",
|
||||
"parameterValue": "/fd \"SHA256\""
|
||||
},
|
||||
{
|
||||
"parameterName": "PageHash",
|
||||
"parameterValue": "/NPH"
|
||||
},
|
||||
{
|
||||
"parameterName": "TimeStamp",
|
||||
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
|
||||
}
|
||||
],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
},
|
||||
{
|
||||
"KeyCode": "CP-230012",
|
||||
"OperationSetCode": "SigntoolVerify",
|
||||
"Parameters": [],
|
||||
"ToolName": "sign",
|
||||
"ToolVersion": "1.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
parameters:
|
||||
configuration: 'Release'
|
||||
platform: ''
|
||||
additionalBuildArguments: '-m'
|
||||
|
||||
jobs:
|
||||
- job: Build${{ parameters.platform }}${{ parameters.configuration }}
|
||||
displayName: Build ${{ parameters.platform }} ${{ parameters.configuration }}
|
||||
variables:
|
||||
BuildConfiguration: ${{ parameters.configuration }}
|
||||
BuildPlatform: ${{ parameters.platform }}
|
||||
pool:
|
||||
name: WinDevPool-L
|
||||
timeoutInMinutes: 120
|
||||
strategy:
|
||||
maxParallel: 10
|
||||
steps:
|
||||
- template: build-powertoys-steps.yml
|
||||
parameters:
|
||||
additionalBuildArguments: ${{ parameters.additionalBuildArguments }}
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<clear />
|
||||
<add key="PowerToysCDPX_Feed" value="https://github-private.pkgs.visualstudio.com/microsoft/_packaging/PowerToysCDPX_Feed/nuget/v3/index.json" />
|
||||
</packageSources>
|
||||
<disabledPackageSources>
|
||||
<clear />
|
||||
</disabledPackageSources>
|
||||
</configuration>
|
|
@ -0,0 +1,275 @@
|
|||
# This build should never run as CI or against a pull request.
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
pool:
|
||||
name: WinDevPool-L
|
||||
demands: ImageOverride -equals WinDevVS16-latest
|
||||
|
||||
parameters:
|
||||
- name: buildConfigurations
|
||||
type: object
|
||||
default:
|
||||
- Release
|
||||
- name: buildPlatforms
|
||||
type: object
|
||||
default:
|
||||
- x64
|
||||
- name: versionNumber
|
||||
type: string
|
||||
default: '0.0.1'
|
||||
|
||||
variables:
|
||||
IsPipeline: 1 # The installer uses this to detect whether it should pick up localizations
|
||||
|
||||
name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr)
|
||||
resources:
|
||||
repositories:
|
||||
- repository: self
|
||||
type: git
|
||||
ref: main
|
||||
jobs:
|
||||
- job: Build
|
||||
strategy:
|
||||
matrix:
|
||||
${{ each config in parameters.buildConfigurations }}:
|
||||
${{ each platform in parameters.buildPlatforms }}:
|
||||
${{ config }}_${{ platform }}:
|
||||
BuildConfiguration: ${{ config }}
|
||||
BuildPlatform: ${{ platform }}
|
||||
displayName: Build
|
||||
timeoutInMinutes: 120 # Some of the loc stuff adds quite a bit of time.
|
||||
cancelTimeoutInMinutes: 1
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
submodules: true
|
||||
persistCredentials: True
|
||||
|
||||
# Sets versions for all PowerToy created DLLs
|
||||
- task: PowerShell@1
|
||||
displayName: Set Versions.Prop
|
||||
inputs:
|
||||
scriptName: .pipelines/versionSetting.ps1
|
||||
arguments: -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment ''
|
||||
|
||||
- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@1
|
||||
displayName: 'Download Localization Files -- PowerToys 37400'
|
||||
inputs:
|
||||
teamId: 37400
|
||||
authId: '$(TouchdownApplicationID)'
|
||||
authKey: '$(TouchdownApplicationKey)'
|
||||
resourceFilePath: |
|
||||
**\Resources.resx
|
||||
**\Resource.resx
|
||||
**\Resources.resw
|
||||
appendRelativeDir: true
|
||||
localizationTarget: false
|
||||
pseudoSetting: Included
|
||||
- task: PowerShell@2
|
||||
displayName: Move Loc files into correct locations
|
||||
inputs:
|
||||
targetType: inline
|
||||
script: >-
|
||||
$VerbosePreference = "Continue"
|
||||
|
||||
./tools/build/move-and-rename-resx.ps1
|
||||
|
||||
./tools/build/move-uwp-resw.ps1
|
||||
pwsh: true
|
||||
- task: NuGetAuthenticate@0
|
||||
inputs:
|
||||
nuGetServiceConnections: PowerToysCDPxFeed
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Use NuGet 5.10
|
||||
inputs:
|
||||
versionSpec: 5.10
|
||||
# this will restore the following nugets:
|
||||
# - main solution
|
||||
# - Bug report tool
|
||||
# - Webcam report tool
|
||||
# - Installer
|
||||
# - Bootstrapper Installer
|
||||
- task: NuGetCommand@2
|
||||
displayName: NuGet restore solutions dependencies
|
||||
inputs:
|
||||
command: restore
|
||||
restoreSolution: '**/*.sln'
|
||||
selectOrConfig: config
|
||||
nugetConfigPath: .pipelines/release-nuget.config
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: Moving telem files
|
||||
inputs:
|
||||
script: |
|
||||
call nuget.exe restore -configFile .pipelines/release-nuget.config -PackagesDirectory . .pipelines/packages.config || exit /b 1
|
||||
move /Y "Microsoft.PowerToys.Telemetry.2.0.0\build\include\TraceLoggingDefines.h" "src\common\Telemetry\TraceLoggingDefines.h" || exit /b 1
|
||||
move /Y "Microsoft.PowerToys.Telemetry.2.0.0\build\include\TelemetryBase.cs" "src\common\Telemetry\TelemetryBase.cs" || exit /b 1
|
||||
|
||||
## ALL BUT INSTALLER BUILDING
|
||||
- task: VSBuild@1
|
||||
displayName: Build PowerToys main project
|
||||
inputs:
|
||||
solution: '**\PowerToys.sln'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Build BugReportTool
|
||||
inputs:
|
||||
solution: '**/tools/BugReportTool/BugReportTool.sln'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Build WebcamReportTool
|
||||
inputs:
|
||||
solution: '**/tools/WebcamReportTool/WebcamReportTool.sln'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Build PowerToysSetupCustomActions
|
||||
inputs:
|
||||
solution: '**/installer/PowerToysSetup.sln'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /target:PowerToysSetupCustomActions /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Publish Settings for Packaging
|
||||
inputs:
|
||||
solution: 'src/settings-ui/PowerToys.Settings/PowerToys.Settings.csproj'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: >-
|
||||
/target:Publish
|
||||
/p:Configuration=$(BuildConfiguration);Platform=$(BuildPlatform);AppxBundle=Never
|
||||
/p:VCRTForwarders-IncludeDebugCRT=false
|
||||
/p:PowerToysRoot=$(Build.SourcesDirectory)
|
||||
/p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: VSBuild@1
|
||||
displayName: Publish Launcher for Packaging
|
||||
inputs:
|
||||
solution: 'src/modules/launcher/PowerLauncher/PowerLauncher.csproj'
|
||||
vsVersion: 16.0
|
||||
# The arguments should be the same as the ones for Settings; make sure they are.
|
||||
msbuildArgs: >-
|
||||
/target:Publish
|
||||
/p:Configuration=$(BuildConfiguration);Platform=$(BuildPlatform);AppxBundle=Never
|
||||
/p:VCRTForwarders-IncludeDebugCRT=false
|
||||
/p:PowerToysRoot=$(Build.SourcesDirectory)
|
||||
/p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
maximumCpuCount: true
|
||||
|
||||
#### MAIN SIGNING AREA
|
||||
# reference https://dev.azure.com/microsoft/Dart/_git/AppDriver?path=/ESRPSigning.json&version=GBarm64-netcore&_a=contents for winappdriver
|
||||
# https://dev.azure.com/microsoft/Dart/_git/AppDriver?path=/CIPolicy.xml&version=GBarm64-netcore&_a=contents
|
||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||
displayName: Sign Core PT
|
||||
inputs:
|
||||
ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection'
|
||||
FolderPath: '$(BuildPlatform)/$(BuildConfiguration)' # Video conf uses x86 and x64. This path will also work for PowerToysSetupCustomActions which is in a different root dir
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_core.json'
|
||||
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
|
||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||
displayName: Sign x86 directshow VCM
|
||||
inputs:
|
||||
ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection'
|
||||
FolderPath: 'x86/$(BuildConfiguration)' # Video conf uses x86 and x64. This path will also work for PowerToysSetupCustomActions which is in a different root dir
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_vcm.json'
|
||||
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
|
||||
#### END SIGNING
|
||||
## END MAIN
|
||||
|
||||
## INSTALLER START
|
||||
#### MSI BUILDING AND SIGNING
|
||||
- task: VSBuild@1
|
||||
displayName: Build MSI
|
||||
inputs:
|
||||
solution: '**/installer/PowerToysSetup.sln'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||
displayName: Sign MSI
|
||||
inputs:
|
||||
ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection'
|
||||
FolderPath: 'installer/PowerToysSetup/$(BuildPlatform)\$(BuildConfiguration)'
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json'
|
||||
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
|
||||
#### END MSI
|
||||
|
||||
#### BOOTSTRAP BUILDING AND SIGNING
|
||||
- task: VSBuild@1
|
||||
displayName: Build Bootstrapper
|
||||
inputs:
|
||||
solution: '**/installer/PowerToysBootstrapper/PowerToysBootstrapper.sln'
|
||||
vsVersion: 16.0
|
||||
msbuildArgs: /p:CIBuild=true /bl:$(Build.SourcesDirectory)\msbuild.binlog
|
||||
platform: $(BuildPlatform)
|
||||
configuration: $(BuildConfiguration)
|
||||
clean: true
|
||||
maximumCpuCount: true
|
||||
|
||||
- task: SFP.build-tasks.custom-build-task-1.EsrpCodeSigning@1
|
||||
displayName: Sign Boostrapper
|
||||
inputs:
|
||||
ConnectedServiceName: 'Terminal/Console/WinAppDriver Team Code Signing Connection'
|
||||
FolderPath: 'installer/PowerToysBootstrapper/$(BuildPlatform)\$(BuildConfiguration)'
|
||||
signType: batchSigning
|
||||
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_installer.json'
|
||||
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
|
||||
#### END BOOTSTRAP
|
||||
## END INSTALLER
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: binlog'
|
||||
condition: failed()
|
||||
continueOnError: True
|
||||
inputs:
|
||||
PathtoPublish: $(Build.SourcesDirectory)\msbuild.binlog
|
||||
ArtifactName: binlog-$(BuildPlatform)
|
||||
|
||||
- task: ComponentGovernanceComponentDetection@0
|
||||
displayName: Component Detection
|
||||
|
||||
- task: CopyFiles@2
|
||||
inputs:
|
||||
contents: '**/PowerToysSetup-*.exe'
|
||||
flattenFolders: True
|
||||
targetFolder: $(Build.ArtifactStagingDirectory)
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: PowerToySetup'
|
||||
inputs:
|
||||
PathtoPublish: $(System.ArtifactsDirectory)
|
||||
ArtifactName: BuildArtifacts
|
||||
...
|
|
@ -1,5 +1,8 @@
|
|||
cd /D "%~dp0"
|
||||
|
||||
REM Just in case CDPx (Legacy) doesn't do it
|
||||
git submodule update --init --recursive
|
||||
|
||||
nuget restore ../PowerToys.sln || exit /b 1
|
||||
|
||||
powershell.exe -Command "Invoke-WebRequest -OutFile %tmp%\wdksetup.exe https://go.microsoft.com/fwlink/p/?linkid=2085767"
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$True,Position=1)]
|
||||
[string]$versionNumber = "0.0.1",
|
||||
|
||||
[Parameter(Mandatory=$True,Position=2)]
|
||||
[AllowEmptyString()]
|
||||
[string]$DevEnvironment = "Local"
|
||||
)
|
||||
|
||||
Write-Host $PSScriptRoot
|
||||
$versionRegex = "(\d+)\.(\d+)\.(\d+)"
|
||||
|
||||
if($versionNumber -match $versionRegEx)
|
||||
{
|
||||
#$buildDayOfYear = (Get-Date).DayofYear;
|
||||
#$buildTime = Get-Date -Format HH;
|
||||
#$buildTime = Get-Date -Format HHmmss;
|
||||
#$buildYear = Get-Date -Format yy;
|
||||
#$revision = [string]::Format("{0}{1}{2}", $buildYear, $buildDayOfYear, $buildTime )
|
||||
|
||||
# max UInt16, 65535
|
||||
#$revision = [string]::Format("{0}{1}", $buildDayOfYear, $buildTime )
|
||||
#Write-Host "Revision" $revision
|
||||
|
||||
$versionNumber = [int]::Parse($matches[1]).ToString() + "." + [int]::Parse($matches[2]).ToString() + "." + [int]::Parse($matches[3]).ToString() # + "." + $revision
|
||||
Write-Host "Version Number" $versionNumber
|
||||
}
|
||||
else
|
||||
{
|
||||
throw "Build format does not match the expected pattern (buildName_w.x.y.z)"
|
||||
}
|
||||
|
||||
$verPropWriteFileLocation = $PSScriptRoot + '/../src/Version.props';
|
||||
$verPropReadFileLocation = $verPropWriteFileLocation;
|
||||
|
||||
[XML]$verProps = Get-Content $verPropReadFileLocation
|
||||
$verProps.Project.PropertyGroup.Version = $versionNumber;
|
||||
$verProps.Project.PropertyGroup.DevEnvironment = $DevEnvironment;
|
||||
|
||||
Write-Host "xml" $verProps.Project.PropertyGroup.Version
|
||||
$verProps.Save($verPropWriteFileLocation);
|
|
@ -1,5 +1,4 @@
|
|||
<Project>
|
||||
<Import Project="restore_git_submodules.props" Condition="'$(RestoreGitSubmodulesImported)' == ''" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)cxxopts\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<Project>
|
||||
<Import Project="restore_git_submodules.props" Condition="'$(RestoreGitSubmodulesImported)' == ''" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)expected-lite\include\nonstd\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
<Project>
|
||||
<PropertyGroup>
|
||||
<RestoreGitSubmodulesImported>true</RestoreGitSubmodulesImported>
|
||||
</PropertyGroup>
|
||||
<Target Name="RestoreGitSubmodules" BeforeTargets="PrepareForBuild">
|
||||
<Exec IgnoreExitCode="true"
|
||||
EchoOff="true"
|
||||
StandardOutputImportance="low"
|
||||
StandardErrorImportance="low"
|
||||
Command="git submodule update --init" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,5 +1,4 @@
|
|||
<Project>
|
||||
<Import Project="restore_git_submodules.props" Condition="'$(RestoreGitSubmodulesImported)' == ''" />
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)spdlog\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<Import Project="..\packages\WiX.3.11.2\build\wix.props" Condition="Exists('..\packages\WiX.3.11.2\build\wix.props')" />
|
||||
<Import Project="..\..\src\Version.props" />
|
||||
<PropertyGroup>
|
||||
<DefineConstants>Version=$(Version)</DefineConstants>
|
||||
<DefineConstants>Version=$(Version)</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Release</Configuration>
|
||||
|
@ -73,6 +73,10 @@
|
|||
<Error Condition="!Exists('..\packages\WiX.3.11.2\build\wix.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\WiX.3.11.2\build\wix.props'))" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<!-- THIS IS AN INNER LOOP OPTIMIZATION
|
||||
The build pipeline builds the Settings and Launcher projects for Publication
|
||||
using a specific profile. If you're doing local installer builds, this will
|
||||
simulate the build pipeline doing that for you. -->
|
||||
<PreBuildEvent>IF NOT DEFINED IsPipeline (
|
||||
call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.18362.0
|
||||
SET PTRoot=..\..\..\..
|
||||
|
|
|
@ -1003,7 +1003,7 @@
|
|||
</Fragment>
|
||||
|
||||
<!-- Languages for localization on build farm -->
|
||||
<?define LocLanguageList = cs;de;es;fr;hu;it;ja;ko;nl;pl;pt-BR;pt-PT;ru;sv;tr;zh-Hans;zh-Hant?>
|
||||
<?define LocLanguageList = cs-CZ;de-DE;es-ES;fr-FR;hu-HU;it-IT;ja-JP;ko-KR;nl-NL;pl-PL;pt-BR;pt-PT;qps-ploc;qps-ploca;qps-plocm;ru-RU;sv-SE;tr-TR;zh-CN;zh-TW?>
|
||||
|
||||
<Fragment>
|
||||
<!-- Resource directories should be added only if the installer is built on the build farm -->
|
||||
|
@ -1013,16 +1013,48 @@
|
|||
<!-- Resource file directories -->
|
||||
<?foreach Language in $(var.LocLanguageList)?>
|
||||
<!--NB: Ids can't contain hyphens-->
|
||||
<?if $(var.Language) = pt-BR?>
|
||||
<?define IdSafeLanguage = pt_BR?>
|
||||
<?if $(var.Language) = cs-CZ?>
|
||||
<?define IdSafeLanguage = cs_CZ?>
|
||||
<?elseif $(var.Language) = de-DE?>
|
||||
<?define IdSafeLanguage = de_DE?>
|
||||
<?elseif $(var.Language) = es-ES?>
|
||||
<?define IdSafeLanguage = es_ES?>
|
||||
<?elseif $(var.Language) = fr-FR?>
|
||||
<?define IdSafeLanguage = fr_FR?>
|
||||
<?elseif $(var.Language) = hu-HU?>
|
||||
<?define IdSafeLanguage = hu_HU?>
|
||||
<?elseif $(var.Language) = it-IT?>
|
||||
<?define IdSafeLanguage = it_IT?>
|
||||
<?elseif $(var.Language) = ja-JP?>
|
||||
<?define IdSafeLanguage = ja_JP?>
|
||||
<?elseif $(var.Language) = ko-KR?>
|
||||
<?define IdSafeLanguage = ko_KR?>
|
||||
<?elseif $(var.Language) = nl-NL?>
|
||||
<?define IdSafeLanguage = nl_NL?>
|
||||
<?elseif $(var.Language) = pl-PL?>
|
||||
<?define IdSafeLanguage = pl_PL?>
|
||||
<?elseif $(var.Language) = pt-BR?>
|
||||
<?define IdSafeLanguage = pt_BR?>
|
||||
<?elseif $(var.Language) = pt-PT?>
|
||||
<?define IdSafeLanguage = pt_PT?>
|
||||
<?elseif $(var.Language) = zh-Hans?>
|
||||
<?define IdSafeLanguage = zh_Hans?>
|
||||
<?elseif $(var.Language) = zh-Hant?>
|
||||
<?define IdSafeLanguage = zh_Hant?>
|
||||
<?define IdSafeLanguage = pt_PT?>
|
||||
<?elseif $(var.Language) = qps-ploc?>
|
||||
<?define IdSafeLanguage = qps_ploc?>
|
||||
<?elseif $(var.Language) = qps-ploca?>
|
||||
<?define IdSafeLanguage = qps_ploca?>
|
||||
<?elseif $(var.Language) = qps-plocm?>
|
||||
<?define IdSafeLanguage = qps_plocm?>
|
||||
<?elseif $(var.Language) = ru-RU?>
|
||||
<?define IdSafeLanguage = ru_RU?>
|
||||
<?elseif $(var.Language) = sv-SE?>
|
||||
<?define IdSafeLanguage = sv_SE?>
|
||||
<?elseif $(var.Language) = tr-TR?>
|
||||
<?define IdSafeLanguage = tr_TR?>
|
||||
<?elseif $(var.Language) = zh-CN?>
|
||||
<?define IdSafeLanguage = zh_CN?>
|
||||
<?elseif $(var.Language) = zh-TW?>
|
||||
<?define IdSafeLanguage = zh_TW?>
|
||||
<?else?>
|
||||
<?define IdSafeLanguage = $(var.Language)?>
|
||||
<?define IdSafeLanguage = $(var.Language)?>
|
||||
<?endif?>
|
||||
<Directory Id="Resource$(var.IdSafeLanguage)$(var.ParentDirectory)" Name="$(var.Language)" />
|
||||
<?undef IdSafeLanguage?>
|
||||
|
@ -1036,14 +1068,46 @@
|
|||
<!-- Components for adding resource files -->
|
||||
<?foreach Language in $(var.LocLanguageList)?>
|
||||
<!--NB: Ids can't contain hyphens-->
|
||||
<?if $(var.Language) = pt-BR?>
|
||||
<?if $(var.Language) = cs-CZ?>
|
||||
<?define IdSafeLanguage = cs_CZ?>
|
||||
<?elseif $(var.Language) = de-DE?>
|
||||
<?define IdSafeLanguage = de_DE?>
|
||||
<?elseif $(var.Language) = es-ES?>
|
||||
<?define IdSafeLanguage = es_ES?>
|
||||
<?elseif $(var.Language) = fr-FR?>
|
||||
<?define IdSafeLanguage = fr_FR?>
|
||||
<?elseif $(var.Language) = hu-HU?>
|
||||
<?define IdSafeLanguage = hu_HU?>
|
||||
<?elseif $(var.Language) = it-IT?>
|
||||
<?define IdSafeLanguage = it_IT?>
|
||||
<?elseif $(var.Language) = ja-JP?>
|
||||
<?define IdSafeLanguage = ja_JP?>
|
||||
<?elseif $(var.Language) = ko-KR?>
|
||||
<?define IdSafeLanguage = ko_KR?>
|
||||
<?elseif $(var.Language) = nl-NL?>
|
||||
<?define IdSafeLanguage = nl_NL?>
|
||||
<?elseif $(var.Language) = pl-PL?>
|
||||
<?define IdSafeLanguage = pl_PL?>
|
||||
<?elseif $(var.Language) = pt-BR?>
|
||||
<?define IdSafeLanguage = pt_BR?>
|
||||
<?elseif $(var.Language) = pt-PT?>
|
||||
<?define IdSafeLanguage = pt_PT?>
|
||||
<?elseif $(var.Language) = zh-Hans?>
|
||||
<?define IdSafeLanguage = zh_Hans?>
|
||||
<?elseif $(var.Language) = zh-Hant?>
|
||||
<?define IdSafeLanguage = zh_Hant?>
|
||||
<?elseif $(var.Language) = qps-ploc?>
|
||||
<?define IdSafeLanguage = qps_ploc?>
|
||||
<?elseif $(var.Language) = qps-ploca?>
|
||||
<?define IdSafeLanguage = qps_ploca?>
|
||||
<?elseif $(var.Language) = qps-plocm?>
|
||||
<?define IdSafeLanguage = qps_plocm?>
|
||||
<?elseif $(var.Language) = ru-RU?>
|
||||
<?define IdSafeLanguage = ru_RU?>
|
||||
<?elseif $(var.Language) = sv-SE?>
|
||||
<?define IdSafeLanguage = sv_SE?>
|
||||
<?elseif $(var.Language) = tr-TR?>
|
||||
<?define IdSafeLanguage = tr_TR?>
|
||||
<?elseif $(var.Language) = zh-CN?>
|
||||
<?define IdSafeLanguage = zh_CN?>
|
||||
<?elseif $(var.Language) = zh-TW?>
|
||||
<?define IdSafeLanguage = zh_TW?>
|
||||
<?else?>
|
||||
<?define IdSafeLanguage = $(var.Language)?>
|
||||
<?endif?>
|
||||
|
|
|
@ -2,62 +2,8 @@ setlocal enableDelayedExpansion
|
|||
|
||||
IF NOT DEFINED PTRoot (SET PTRoot=..\..)
|
||||
|
||||
rem Publish Settings
|
||||
SET settingsProfileFolderName=!PTRoot!\src\settings-ui\PowerToys.Settings\Properties\PublishProfiles\
|
||||
rem Create the publish profile folder if it doesn't exist
|
||||
IF NOT EXIST !settingsProfileFolderName! (mkdir !settingsProfileFolderName!)
|
||||
SET settingsProfileFileName=SettingsProfile.pubxml
|
||||
SET settingsPublishProfile=!settingsProfileFolderName!!settingsProfileFileName!
|
||||
|
||||
rem Create the publish profile pubxml
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^> > !settingsPublishProfile!
|
||||
echo ^<^^!-- >> !settingsPublishProfile!
|
||||
echo https://go.microsoft.com/fwlink/?LinkID=208121. >> !settingsPublishProfile!
|
||||
echo --^> >> !settingsPublishProfile!
|
||||
echo ^<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"^> >> !settingsPublishProfile!
|
||||
echo ^<PropertyGroup^> >> !settingsPublishProfile!
|
||||
echo ^<PublishProtocol^>FileSystem^</PublishProtocol^> >> !settingsPublishProfile!
|
||||
echo ^<Configuration^>Release^</Configuration^> >> !settingsPublishProfile!
|
||||
echo ^<Platform^>x64^</Platform^> >> !settingsPublishProfile!
|
||||
echo ^<TargetFramework^>netcoreapp3.1^</TargetFramework^> >> !settingsPublishProfile!
|
||||
echo ^<PublishDir^>..\..\..\x64\Release\Settings^</PublishDir^> >> !settingsPublishProfile!
|
||||
echo ^<RuntimeIdentifier^>win-x64^</RuntimeIdentifier^> >> !settingsPublishProfile!
|
||||
echo ^<SelfContained^>false^</SelfContained^> >> !settingsPublishProfile!
|
||||
echo ^<PublishSingleFile^>False^</PublishSingleFile^> >> !settingsPublishProfile!
|
||||
echo ^<PublishReadyToRun^>False^</PublishReadyToRun^> >> !settingsPublishProfile!
|
||||
echo ^</PropertyGroup^> >> !settingsPublishProfile!
|
||||
echo ^</Project^> >> !settingsPublishProfile!
|
||||
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
||||
msbuild !PTRoot!\src\settings-ui\PowerToys.Settings\PowerToys.Settings.csproj -t:Publish -p:Configuration="Release" -p:Platform="x64" -p:PowerToysRoot=!PTRoot! -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
||||
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
||||
msbuild !PTRoot!\src\settings-ui\PowerToys.Settings\PowerToys.Settings.csproj -t:Publish -p:Configuration="Release" -p:Platform="x64" -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=!settingsProfileFileName!
|
||||
|
||||
|
||||
rem Publish Launcher
|
||||
SET launcherProfileFolderName=!PTRoot!\src\modules\launcher\PowerLauncher\Properties\PublishProfiles\
|
||||
|
||||
rem Create the publish profile folder if it doesn't exist
|
||||
IF NOT EXIST !launcherProfileFolderName! (mkdir !launcherProfileFolderName!)
|
||||
SET launcherProfileFileName=LauncherProfile.pubxml
|
||||
SET launcherPublishProfile=!launcherProfileFolderName!!launcherProfileFileName!
|
||||
|
||||
rem Create the publish profile pubxml
|
||||
echo ^<?xml version="1.0" encoding="utf-8"?^> > !launcherPublishProfile!
|
||||
echo ^<^^!-- >> !launcherPublishProfile!
|
||||
echo https://go.microsoft.com/fwlink/?LinkID=208121. >> !launcherPublishProfile!
|
||||
echo --^> >> !launcherPublishProfile!
|
||||
echo ^<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"^> >> !launcherPublishProfile!
|
||||
echo ^<PropertyGroup^> >> !launcherPublishProfile!
|
||||
echo ^<PublishProtocol^>FileSystem^</PublishProtocol^> >> !launcherPublishProfile!
|
||||
echo ^<Configuration^>Release^</Configuration^> >> !launcherPublishProfile!
|
||||
echo ^<Platform^>x64^</Platform^> >> !launcherPublishProfile!
|
||||
echo ^<TargetFramework^>netcoreapp3.1^</TargetFramework^> >> !launcherPublishProfile!
|
||||
echo ^<PublishDir^>..\..\..\..\x64\Release\modules\launcher^</PublishDir^> >> !launcherPublishProfile!
|
||||
echo ^<RuntimeIdentifier^>win-x64^</RuntimeIdentifier^> >> !launcherPublishProfile!
|
||||
echo ^<SelfContained^>false^</SelfContained^> >> !launcherPublishProfile!
|
||||
echo ^<PublishSingleFile^>False^</PublishSingleFile^> >> !launcherPublishProfile!
|
||||
echo ^<PublishReadyToRun^>False^</PublishReadyToRun^> >> !launcherPublishProfile!
|
||||
echo ^</PropertyGroup^> >> !launcherPublishProfile!
|
||||
echo ^</Project^> >> !launcherPublishProfile!
|
||||
|
||||
rem In case of Release we should not use Debug CRT in VCRT forwarders
|
||||
msbuild !PTRoot!\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="Release" -p:Platform="x64" -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=!launcherProfileFileName!
|
||||
msbuild !PTRoot!\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="Release" -p:Platform="x64" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
|
||||
|
|
|
@ -188,69 +188,6 @@
|
|||
<data name="EditShortcuts_InfoExample" xml:space="preserve">
|
||||
<value>For example, if you want to press "Ctrl+C" and get "Alt" only on Microsoft Edge, "Ctrl+C" would be your "Shortcut" column, the key "Alt" would be your "Mapped To" column, and "MSEdge" would be your "Target App" column. If no target app is entered, it will apply globally. The name must be the process name and not the app name.</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_RemapSuccessful" xml:space="preserve">
|
||||
<value>Remapping successful</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_RemapUnsuccessful" xml:space="preserve">
|
||||
<value>Some remappings were not applied</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_SameKeyPreviouslyMapped" xml:space="preserve">
|
||||
<value>Cannot remap a key more than once</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_MappedToSameKey" xml:space="preserve">
|
||||
<value>Cannot remap a key to itself</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_ConflictingModifierKey" xml:space="preserve">
|
||||
<value>Cannot remap this key as it conflicts with another remapped key</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_SameShortcutPreviouslyMapped" xml:space="preserve">
|
||||
<value>Cannot remap a shortcut more than once for the same target app</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_MapToSameShortcut" xml:space="preserve">
|
||||
<value>Cannot remap a shortcut to itself</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ConflictingModifierShortcut" xml:space="preserve">
|
||||
<value>Cannot remap this shortcut as it conflicts with another remapped shortcut</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_WinL" xml:space="preserve">
|
||||
<value>Cannot remap from/to Win L</value>
|
||||
<comment>Win refers to Windows as in the OS</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_CtrlAltDel" xml:space="preserve">
|
||||
<value>Cannot remap from/to Ctrl Alt Del</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_SaveFailed" xml:space="preserve">
|
||||
<value>Failed to save the remappings</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutStartWithModifier" xml:space="preserve">
|
||||
<value>Shortcut must start with a modifier key</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutNoRepeatedModifier" xml:space="preserve">
|
||||
<value>Shortcut cannot contain a repeated modifier</value>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutAtleast2Keys" xml:space="preserve">
|
||||
<value>Shortcut must have atleast 2 keys</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutOneActionKey" xml:space="preserve">
|
||||
<value>Shortcut must contain an action key</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_ShortcutMaxOneActionKey" xml:space="preserve">
|
||||
<value>Shortcut cannot have more than one action key</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_MaxShortcutSize" xml:space="preserve">
|
||||
<value>Shortcuts can only have up to 2 modifier keys</value>
|
||||
<comment>Key on a keyboard</comment>
|
||||
</data>
|
||||
<data name="ErrorMessage_Default" xml:space="preserve">
|
||||
<value>Unexpected error</value>
|
||||
</data>
|
||||
<data name="Type_Button" xml:space="preserve">
|
||||
<value>Type</value>
|
||||
<comment>As in type a key</comment>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>$(PowerToysRoot)\$(Platform)\$(Configuration)\modules\launcher</PublishDir>
|
||||
<RuntimeIdentifier>win-$(Platform)</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>$(PowerToysRoot)\$(Platform)\$(Configuration)\Settings</PublishDir>
|
||||
<RuntimeIdentifier>win-$(Platform)</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>False</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -25,9 +25,6 @@ else
|
|||
$initResourceID = 101
|
||||
}
|
||||
|
||||
# Temporary file created used for resgen
|
||||
$tempFile = "temporaryResourceFile.txt"
|
||||
|
||||
# Flags to check if the first updated has occurred
|
||||
$headerFileUpdated = $false
|
||||
$rcFileUpdated = $false
|
||||
|
@ -50,6 +47,7 @@ if (!(Test-Path -Path $generatedFilesFolder))
|
|||
# Hash table to get the language codes from the code used in the file name
|
||||
$languageHashTable = @{ "en" = @("ENU", "ENGLISH", "ENGLISH_US", "English (United States)");
|
||||
"zh-Hans" = @("CHS", "CHINESE", "NEUTRAL", "Chinese (Simplified)");
|
||||
"zh-CN" = @("CHS", "CHINESE", "NEUTRAL", "Chinese (Simplified)");
|
||||
"cs" = @("CSY", "CZECH", "NEUTRAL", "Czech");
|
||||
"hu" = @("HUN", "HUNGARIAN", "NEUTRAL", "Hungarian");
|
||||
"pl" = @("PLK", "POLISH", "NEUTRAL", "Polish");
|
||||
|
@ -74,6 +72,7 @@ $languageHashTable = @{ "en" = @("ENU", "ENGLISH", "ENGLISH_US", "English (Unite
|
|||
"sv" = @("SVE", "SWEDISH", "NEUTRAL", "Swedish");
|
||||
"pt-PT" = @("PTG", "PORTUGUESE", "PORTUGUESE", "Portuguese (Portugal)");
|
||||
"zh-Hant" = @("CHT", "CHINESE", "CHINESE_TRADITIONAL", "Chinese (Traditional)")
|
||||
"zh-TW" = @("CHT", "CHINESE", "CHINESE_TRADITIONAL", "Chinese (Traditional)")
|
||||
}
|
||||
|
||||
# Store the content to be written to a buffer
|
||||
|
@ -81,14 +80,15 @@ $headerFileContent = ""
|
|||
$rcFileContent = ""
|
||||
|
||||
# Iterate over all resx files in parent directory
|
||||
Get-ChildItem $parentDirectory -Filter *.resx |
|
||||
Get-ChildItem $parentDirectory -Recurse -Filter *.resx |
|
||||
Foreach-Object {
|
||||
# Use resgen to parse resx to txt. More details at https://docs.microsoft.com/en-us/dotnet/framework/tools/resgen-exe-resource-file-generator#converting-between-resource-file-types
|
||||
Write-Host "Processing $($_.FullName)"
|
||||
$xmlDocument = $null
|
||||
try {
|
||||
resgen $_.FullName $tempFile
|
||||
$xmlDocument = [xml](Get-Content $_.FullName -ErrorAction:Stop)
|
||||
}
|
||||
catch {
|
||||
echo "resgen failed to convert resx file"
|
||||
Write-Host "Failed to load $($_.FullName)"
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -97,39 +97,50 @@ Foreach-Object {
|
|||
$tokens = $_.Name -split "\."
|
||||
if ($tokens.Count -eq 3) {
|
||||
$lang = $tokens[1]
|
||||
} else {
|
||||
$d = $_.Directory.Name
|
||||
If ($d.Contains('-')) { # Looks like a language directory
|
||||
$lang = $d
|
||||
}
|
||||
}
|
||||
|
||||
$langData = $languageHashTable[$lang]
|
||||
if ($null -eq $langData -and $lang.Contains('-')) {
|
||||
# Modern Localization comes in with language + country tuples;
|
||||
# we want to detect the language alone if we don't support the language-country
|
||||
# version.
|
||||
$lang = ($lang -split "-")[0]
|
||||
$langData = $languageHashTable[$lang]
|
||||
}
|
||||
if ($null -eq $langData) {
|
||||
Write-Warning "Unknown language $lang"
|
||||
Return
|
||||
}
|
||||
|
||||
$newLinesForRCFile = ""
|
||||
$newLinesForHeaderFile = ""
|
||||
$count = $initResourceID
|
||||
|
||||
try {
|
||||
foreach ($line in (Get-Content $tempFile -Encoding unicode)) {
|
||||
# Each line of the resgen text file is of the form ResourceName=ResourceValue with no spaces.
|
||||
$content = $line -split "=", 2
|
||||
|
||||
foreach ($entry in $xmlDocument.root.data) {
|
||||
$culture = [System.Globalization.CultureInfo]::GetCultureInfo('en-US')
|
||||
# Each resource is named as IDS_ResxResourceName, in uppercase. Escape occurrences of double quotes in the string
|
||||
$lineInRCFormat = "IDS_" + $content[0].ToUpper($culture) + " L`"" + $content[1].Replace("`"", "`"`"") + "`""
|
||||
$lineInRCFormat = "IDS_" + $entry.name.ToUpper($culture) + " L`"" + $entry.value.Replace("`"", "`"`"") + "`""
|
||||
$newLinesForRCFile = $newLinesForRCFile + "`r`n " + $lineInRCFormat
|
||||
|
||||
# Resource header file needs to be updated only for one language
|
||||
if (!$headerFileUpdated) {
|
||||
$lineInHeaderFormat = "#define IDS_" + $content[0].ToUpper($culture) + " " + $count.ToString()
|
||||
$lineInHeaderFormat = "#define IDS_" + $entry.name.ToUpper($culture) + " " + $count.ToString()
|
||||
$newLinesForHeaderFile = $newLinesForHeaderFile + "`r`n" + $lineInHeaderFormat
|
||||
$count++
|
||||
}
|
||||
}
|
||||
}
|
||||
catch {
|
||||
echo "Failed to read temporary file."
|
||||
echo "Failed to read XML document."
|
||||
exit 0
|
||||
}
|
||||
|
||||
# Delete temporary text file used by resgen
|
||||
Remove-Item $tempFile
|
||||
|
||||
# Add string table syntax
|
||||
$newLinesForRCFile = "`r`nSTRINGTABLE`r`nBEGIN" + $newLinesForRCFile + "`r`nEND"
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
[CmdletBinding()]
|
||||
|
||||
# This script finds all C#/.NET resx files and renames them from
|
||||
# Folder/Language/x.resw to Folder/x.Language.resw, with language
|
||||
# mapping. This is required because Touchdown localization uses a
|
||||
# different directory structure.
|
||||
$Items = Get-ChildItem . -Recurse -Filter *.resx
|
||||
|
||||
# Each of the projects we care about stores its resources
|
||||
# in a Properties directory. We **DO NOT** want to move
|
||||
# resource files from other projects (since we use resx files
|
||||
# in standard Win32 projects as well.)
|
||||
$Items = $Items | Where-Object {
|
||||
$_.Directory.Parent.Name -Eq "Properties"
|
||||
}
|
||||
|
||||
If ($Items.Count -Le 0) {
|
||||
# Nothing to do.
|
||||
Write-Verbose "Nothing to do."
|
||||
Exit 0
|
||||
}
|
||||
|
||||
ForEach($Item in $Items) {
|
||||
$PropertiesRoot = $Item.Directory.Parent
|
||||
$Language = $Item.Directory.Name
|
||||
$Destination = Join-Path $PropertiesRoot.FullName ("{0}.{1}{2}" -F ($Item.BaseName, $Language, $Item.Extension))
|
||||
Write-Verbose "Renaming $($Item.FullName) to $Destination"
|
||||
Move-Item $Item.FullName $Destination
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
[CmdletBinding()]
|
||||
|
||||
# This script finds all UWP resw files that are emitted by Touchdown
|
||||
# with a bad path (en-us/lang-lang) and moves them to the correct
|
||||
# location.
|
||||
$Items = Get-ChildItem . -Recurse -Filter *.resw |
|
||||
Where-Object FullName -Like "*\en-US\*\*.resw"
|
||||
|
||||
If ($Items.Count -Le 0) {
|
||||
# Nothing to do.
|
||||
Write-Verbose "Nothing to do."
|
||||
Exit 0
|
||||
}
|
||||
|
||||
$Items | ForEach-Object {
|
||||
# Move each resw file's parent folder into its parent's parent's folder.
|
||||
Move-Item -Verbose $_.Directory.FullName $_.Directory.Parent.Parent.FullName -EA:Ignore
|
||||
}
|
Загрузка…
Ссылка в новой задаче