diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index f0c224abd..155b52d17 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -11,9 +11,9 @@ assignees: ''
* Windows version: (`winver`)
* Does the bug reproduce also in WPF for .NET Framework 4.8?: Yes/No
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the issue via the instructions [here](https://docs.microsoft.com/visualstudio/ide/how-to-report-a-problem-with-visual-studio?view=vs-2019).
-* Security issues and bugs should be reported privately, learn more via our [responsible disclosure guidelines](https://github.com/dotnet/wpf/blob/master/README.md#reporting-security-issues-and-security-bugs).
+* Security issues and bugs should be reported privately, learn more via our [responsible disclosure guidelines](https://github.com/dotnet/wpf/blob/main/README.md#reporting-security-issues-and-security-bugs).
-
+
**Problem description:**
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index b42039c16..204fb16c4 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -9,4 +9,4 @@ assignees: SamBent
Is this feature request related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? If yes, please file the request via the instructions here: https://docs.microsoft.com/visualstudio/ide/suggest-a-feature?view=vs-2019
-
+
diff --git a/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE.md
similarity index 94%
rename from PULL_REQUEST_TEMPLATE
rename to .github/PULL_REQUEST_TEMPLATE.md
index 244d1da72..bf4967265 100644
--- a/PULL_REQUEST_TEMPLATE
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,4 +1,4 @@
-Fixes Issue
+Fixes #
Main PR
diff --git a/.github/fabricbot.json b/.github/fabricbot.json
new file mode 100644
index 000000000..310f6e348
--- /dev/null
+++ b/.github/fabricbot.json
@@ -0,0 +1,2125 @@
+[
+ {
+ "taskType": "trigger",
+ "capabilityId": "CodeFlowLink",
+ "subCapability": "CodeFlowLink",
+ "version": "1.0",
+ "config": {
+ "taskName": "Add a CodeFlow link to new pull requests"
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestReviewResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Add needs author feedback label to pull requests when changes are requested",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "submitted"
+ }
+ },
+ {
+ "name": "isReviewState",
+ "parameters": {
+ "state": "changes_requested"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request_review"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove needs author feedback label when the author responds to a pull request",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": {
+ "type": "author"
+ }
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove needs author feedback label when the author comments on a pull request",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": {
+ "type": "author"
+ }
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "issue_comment"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestReviewResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove needs author feedback label when the author responds to a pull request review comment",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": {
+ "type": "author"
+ }
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request_review"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove no recent activity label from pull requests",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove no recent activity label when a pull request is commented on",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "issue_comment"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestReviewResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove no recent activity label when a pull request is reviewed",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ],
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request_review"
+ ]
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "taskName": "Close stale issues and pull requests",
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isPr",
+ "parameters": {}
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ },
+ {
+ "name": "noActivitySince",
+ "parameters": {
+ "days": 7
+ }
+ },
+ {
+ "name": "isIssue",
+ "parameters": {}
+ }
+ ],
+ "actions": [
+ {
+ "name": "closeIssue",
+ "parameters": {}
+ },
+ {
+ "name": "removeMilestone",
+ "parameters": {}
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "taskName": "Add no recent activity label to issues and pull requests",
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": 10
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isPr",
+ "parameters": {}
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ },
+ {
+ "name": "noActivitySince",
+ "parameters": {
+ "days": 14
+ }
+ },
+ {
+ "name": "noLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ },
+ {
+ "name": "isIssue",
+ "parameters": {}
+ }
+ ],
+ "actions": [
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ },
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **14 days**. \n\nIt will be closed if no further activity occurs **within 7 days of this comment**."
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "AutoMerge",
+ "subCapability": "AutoMerge",
+ "version": "1.0",
+ "config": {
+ "taskName": "Automatically merge pull requests",
+ "label": ":octocat: automerge",
+ "silentMode": false,
+ "minMinutesOpen": "60",
+ "mergeType": "squash",
+ "deleteBranches": true,
+ "requireAllStatuses": false,
+ "removeLabelOnPush": true,
+ "allowAutoMergeInstructionsWithoutLabel": true,
+ "conditionalMergeTypes": [
+ {
+ "mergeType": "squash",
+ "condition": {
+ "placeholder": ""
+ }
+ }
+ ],
+ "usePrDescriptionAsCommitMessage": true
+ },
+ "disabled": false
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "ReleaseAnnouncement",
+ "subCapability": "ReleaseAnnouncement",
+ "version": "1.0",
+ "config": {
+ "taskName": "Release announcement",
+ "prReply": "The fix is included in ${pkgName} ${version}.",
+ "issueReply": "Fixed in ${pkgName} ${version}."
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "InPrLabel",
+ "subCapability": "InPrLabel",
+ "version": "1.0",
+ "config": {
+ "taskName": "In-PR label",
+ "label_inPr": ":construction: work in progress",
+ "fixedLabelEnabled": false,
+ "label_fixed": "tell-mode"
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "prTargetsBranch",
+ "parameters": {
+ "branchName": "main"
+ }
+ },
+ {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "merged"
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "titleContains",
+ "parameters": {
+ "titlePattern": "[main] Update dependencies"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "actions": [
+ {
+ "name": "addMilestone",
+ "parameters": {
+ "milestoneName": "7.0 Preview4"
+ }
+ }
+ ],
+ "taskName": "Apply milestone '7.0' to PRs on the main branch",
+ "dangerZone": {
+ "respondToBotActions": true,
+ "acceptRespondToBotActions": true
+ }
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "dotnet-maestro[bot]"
+ }
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Auto-approve maestro PRs",
+ "actions": [
+ {
+ "name": "approvePullRequest",
+ "parameters": {
+ "comment": "Go, you big red fire engine!"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": ":octocat: automerge"
+ }
+ },
+ {
+ "operator": "or",
+ "operands": [
+ {
+ "name": "activitySenderHasPermissions",
+ "parameters": {
+ "permissions": "admin"
+ }
+ },
+ {
+ "name": "activitySenderHasPermissions",
+ "parameters": {
+ "permissions": "write"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Auto-approve auto-merge PRs",
+ "actions": [
+ {
+ "name": "approvePullRequest",
+ "parameters": {
+ "comment": "Happy to oblige"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "EmailCleanser",
+ "subCapability": "EmailCleanser",
+ "version": "1.0",
+ "config": {
+ "taskName": "Cleanse emails"
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": []
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "actions": [
+ {
+ "name": "assignToUser",
+ "parameters": {
+ "user": {
+ "type": "prAuthor"
+ }
+ }
+ }
+ ],
+ "taskName": "Assign PRs to authors"
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": {
+ "type": "author"
+ }
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ]
+ },
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "taskName": "Remove needs author feedback label when the author comments on an issue",
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":mailbox_with_no_mail: waiting-author-feedback"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ },
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "taskName": "Remove no recent activity label when an issue is commented on",
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ },
+ "eventType": "issue",
+ "eventNames": [
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Remove no recent activity label from issue",
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": ":zzz: no-recent-activity"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ },
+ "eventType": "issue",
+ "eventNames": [
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Remove closed issues from milestones",
+ "actions": [
+ {
+ "name": "removeMilestone",
+ "parameters": {}
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAssignedToUser",
+ "parameters": {
+ "user": "dotnet-bot"
+ }
+ },
+ {
+ "name": "titleContains",
+ "parameters": {
+ "titlePattern": "OneLocBuild"
+ }
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Auto-approve OneLocBuild PRs",
+ "actions": [
+ {
+ "name": "approvePullRequest",
+ "parameters": {
+ "comment": "Go, you big red fire engine!"
+ }
+ },
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": ":octocat: automerge"
+ }
+ }
+ ],
+ "dangerZone": {
+ "respondToBotActions": true,
+ "acceptRespondToBotActions": true
+ }
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isDraftPr",
+ "parameters": {
+ "value": "true"
+ }
+ }
+ ],
+ "actions": [
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": "draft"
+ }
+ }
+ ],
+ "taskName": "Add draft label"
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 1,
+ 5,
+ 9,
+ 13,
+ 17,
+ 21
+ ],
+ "timezoneOffset": -7
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isDraftPr",
+ "parameters": {
+ "value": "false"
+ }
+ }
+ ],
+ "taskName": "Remove draft label",
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": "draft"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "created"
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isCloseAndComment",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "activitySenderHasPermissions",
+ "parameters": {
+ "permissions": "write"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "actions": [
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "Hi @${contextualAuthor}, it looks like you just commented on a closed issue. The team will most probably miss it. \nIf you have a question - consider opening a new discussion thread. Alternatively, you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context."
+ }
+ }
+ ],
+ "taskName": "Respond to a comment on closed issue"
+ },
+ "disabled": true
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestCommentResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "created"
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isCloseAndComment",
+ "parameters": {}
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "activitySenderHasPermissions",
+ "parameters": {
+ "permissions": "write"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "issue_comment"
+ ],
+ "taskName": "Respond to a comment on closed PR",
+ "actions": [
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "Hi @${contextualAuthor}, it looks like you just commented on a closed PR. The team will most probably miss it. \nIf you have a question - consider opening a new discussion thread. Alternatively, you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context."
+ }
+ }
+ ]
+ },
+ "disabled": true
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 1,
+ 7,
+ 13,
+ 19
+ ],
+ "timezoneOffset": 0
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isClosed",
+ "parameters": {}
+ },
+ {
+ "name": "noActivitySince",
+ "parameters": {
+ "days": 30
+ }
+ },
+ {
+ "name": "isUnlocked",
+ "parameters": {}
+ }
+ ],
+ "actions": [
+ {
+ "name": "lockIssue",
+ "parameters": {
+ "reason": "resolved",
+ "label": "will_lock_this"
+ }
+ }
+ ],
+ "taskName": "Lock stale issues and PRs"
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ }
+ ]
+ },
+ "taskName": "Add PR Label to new Pull Requests",
+ "actions": [
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": "PR"
+ }
+ },
+ {
+ "name": "requestReviewer",
+ "parameters": {
+ "reviewer": "dipeshmsft"
+ }
+ },
+ {
+ "name": "requestReviewer",
+ "parameters": {
+ "reviewer": "singhashish-wpf"
+ }
+ },
+ {
+ "name": "requestReviewer",
+ "parameters": {
+ "reviewer": "dotnet/wpf-developers"
+ }
+ },
+ {
+ "name": "requestReviewer",
+ "parameters": {
+ "reviewer": "SamBent"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "eventType": "issue",
+ "eventNames": [
+ "issues",
+ "project_card"
+ ],
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "declined"
+ }
+ }
+ ]
+ },
+ "taskName": "When \"declined\" label is added, close and respond",
+ "actions": [
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "We appreciate the feedback, however this doesn’t currently align to the project’s goals and [roadmap](https://github.com/dotnet/wpf/blob/master/roadmap.md) and so will be automatically closed. Thank you for your contributions!"
+ }
+ },
+ {
+ "name": "closeIssue",
+ "parameters": {}
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssuesOnlyResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove no recent activity label from issues",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "closed"
+ }
+ }
+ ]
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issues",
+ "project_card"
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "IssueCommentResponder",
+ "version": "1.0",
+ "config": {
+ "taskName": "Remove no recent activity label when an issue is commented on",
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ },
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "edited"
+ }
+ }
+ ]
+ },
+ "actions": [
+ {
+ "name": "removeLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ }
+ ],
+ "eventType": "issue",
+ "eventNames": [
+ "issue_comment"
+ ]
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "taskName": "Close stale issues",
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 1,
+ 4,
+ 7,
+ 10,
+ 13,
+ 16,
+ 19,
+ 22
+ ],
+ "timezoneOffset": -8
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isIssue",
+ "parameters": {}
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-feedback"
+ }
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ },
+ {
+ "name": "noActivitySince",
+ "parameters": {
+ "days": 3
+ }
+ }
+ ],
+ "actions": [
+ {
+ "name": "closeIssue",
+ "parameters": {}
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "taskName": "Add no recent activity label to issues",
+ "frequency": [
+ {
+ "weekDay": 0,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 1,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 2,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 3,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 4,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 5,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ },
+ {
+ "weekDay": 6,
+ "hours": [
+ 2,
+ 5,
+ 8,
+ 11,
+ 14,
+ 17,
+ 20,
+ 23
+ ],
+ "timezoneOffset": -8
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isIssue",
+ "parameters": {}
+ },
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "needs-author-feedback"
+ }
+ },
+ {
+ "name": "noActivitySince",
+ "parameters": {
+ "days": 4
+ }
+ },
+ {
+ "name": "noLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ }
+ ],
+ "actions": [
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": "no-recent-activity"
+ }
+ },
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**. Thank you for your contributions!"
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "AutoMerge",
+ "subCapability": "AutoMerge",
+ "version": "1.0",
+ "config": {
+ "taskName": "Auto merge PR's marked auto_merge when all checks have passed",
+ "label": "auto_merge",
+ "allowAutoMergeInstructionsWithoutLabel": true,
+ "mergeType": "squash",
+ "deleteBranches": true,
+ "requireAllStatuses": false,
+ "removeLabelOnPush": true,
+ "conditionalMergeTypes": [],
+ "minMinutesOpen": "30",
+ "enforceDMPAsStatus": true
+ }
+ },
+ {
+ "taskType": "scheduled",
+ "capabilityId": "ScheduledSearch",
+ "subCapability": "ScheduledSearch",
+ "version": "1.1",
+ "config": {
+ "frequency": [
+ {
+ "weekDay": 1,
+ "hours": [
+ 8,
+ 17
+ ],
+ "timezoneOffset": -8,
+ "restrictions": [
+ {
+ "name": "isLastInMonth",
+ "parameters": {}
+ }
+ ]
+ }
+ ],
+ "searchTerms": [
+ {
+ "name": "isOpen",
+ "parameters": {}
+ },
+ {
+ "name": "hasLabel",
+ "parameters": {
+ "label": "netfx-servicing-approved"
+ }
+ }
+ ],
+ "taskName": "Move 'open' area-servicing-approved bugs back to Triage (milestone = empty) every month(30 days) for status update to community",
+ "actions": [
+ {
+ "name": "removeMilestone",
+ "parameters": {}
+ },
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "@dotnet/wpf-developers, It's time to give an update to the community. "
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "labelAdded",
+ "parameters": {
+ "label": "Servicing-consider"
+ }
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Use servicing template for `servicing-consider` issues",
+ "actions": [
+ {
+ "name": "addReply",
+ "parameters": {
+ "comment": "Hi @${issueAuthor}. Please make sure you've updated the PR description to use the [Shiproom Template](https://dev.azure.com/devdiv/DevDiv/_wiki/wikis/DevDiv.wiki/545/NET-Servicing#pr-template). Also, make sure this PR is not marked as a draft and is ready-to-merge.\n\nTo learn more about how to prepare a servicing PR [click here](https://aka.ms/aspnet/servicing)."
+ }
+ }
+ ]
+ }
+ },
+ {
+ "taskType": "trigger",
+ "capabilityId": "IssueResponder",
+ "subCapability": "PullRequestResponder",
+ "version": "1.0",
+ "config": {
+ "conditions": {
+ "operator": "and",
+ "operands": [
+ {
+ "name": "isAction",
+ "parameters": {
+ "action": "opened"
+ }
+ },
+ {
+ "name": "activitySenderHasPermissions",
+ "parameters": {
+ "permissions": "read"
+ }
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "dotnet-maestro"
+ }
+ }
+ ]
+ },
+ {
+ "operator": "not",
+ "operands": [
+ {
+ "name": "isActivitySender",
+ "parameters": {
+ "user": "dotnet-maestro-bot"
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "eventType": "pull_request",
+ "eventNames": [
+ "pull_request",
+ "issues",
+ "project_card"
+ ],
+ "taskName": "Label community PRs with `community contribution` label",
+ "actions": [
+ {
+ "name": "addLabel",
+ "parameters": {
+ "label": "Community Contribution"
+ }
+ }
+ ]
+ }
+ }
+]
\ No newline at end of file
diff --git a/.github/workflows/Build.yml b/.github/workflows/Build.yml
new file mode 100644
index 000000000..06633f6fc
--- /dev/null
+++ b/.github/workflows/Build.yml
@@ -0,0 +1,38 @@
+name: Build WPF
+
+on: [push]
+
+jobs:
+ BuildDebug:
+
+ runs-on: [self-hosted, VSPreview]
+
+ steps:
+ - uses: actions/checkout@v3
+ - name: Build WPF
+ run: .\build.cmd -pack -ci -configuration Release -prepareMachine /p:Platform=x86
+ - name: Push
+ uses: actions/upload-artifact@v1
+ with:
+ name: WPF_Debug
+ path: ./artifacts/packages
+
+ # BuildRelease:
+
+ # runs-on: windows-latest
+
+ # steps:
+ # - uses: actions/checkout@v3
+ # - name: Setup .NET
+ # uses: actions/setup-dotnet@v3
+ # with:
+ # dotnet-version: |
+ # 8.0.x
+ # dotnet-quality: 'preview'
+ # - name: Build WPF
+ # run: .\build.cmd -pack -ci -configuration Release -prepareMachine /p:Platform=x86
+ # - name: Push
+ # uses: actions/upload-artifact@v1
+ # with:
+ # name: WPF_Release
+ # path: ./artifacts/packages/Release/NonShipping
\ No newline at end of file
diff --git a/Directory.Build.props b/Directory.Build.props
index e011dfe2e..683daa4e9 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -2,8 +2,9 @@
wpf
true
+ net7.0
+ 7.0
-
$(TestWpfArcadeSdkPath)
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 1394a2067..4d75fdd84 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -6,4 +6,12 @@
+
+
+
+
+
+
+
diff --git a/Documentation/api-compat.md b/Documentation/api-compat.md
index 8cccac74a..b2d6129f0 100644
--- a/Documentation/api-compat.md
+++ b/Documentation/api-compat.md
@@ -5,7 +5,7 @@ For `WPF on .NET Core`, this means the following:
* All `WPF on .NET Core` reference assemblies contain **at least** the API surface area contained by `WPF on .NET Framework 4.8` reference assemblies.
* All hand-crafted reference assemblies for `WPF on .NET Core` contain **exactly** the needed API surface area defined by their corresponding runtime assemblies. (If you're adding new API surface area, you will need to update the hand-crafted reference assemblies, following [these instructions](https://github.com/dotnet/wpf/blob/main/Documentation/gen-api.md).)
-This is accomplished by the use of the [Arcade API Compatibility tool](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.ApiCompat) with some modifications to fit our specific needs.
+This is accomplished by the use of the [Arcade API Compatibility tool](https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.ApiCompat) with some modifications to fit our specific needs.
## [ApiCompat.props](/eng/WpfArcadeSdk/tools/ApiCompat.props)
This props file implements necessary elements to trigger and control the usage of API Compatibility checks.
diff --git a/Documentation/c++-private-tools.md b/Documentation/c++-private-tools.md
index ca537a033..849802d25 100644
--- a/Documentation/c++-private-tools.md
+++ b/Documentation/c++-private-tools.md
@@ -8,7 +8,7 @@ A fix was available in mid Mar, 2019, but this change could not make it into Dev
In collaboration with the C++ team, we decided to build our repo using private (but signed) copies of `c1xx.dll` and `msvcurt(d)_netcore.dll`.
-We have uploaded these private DLL's to an Azure blob at this location using Arcade's [_Native Toolset Bootstrapping_](https://github.com/dotnet/arcade/blob/master/Documentation/NativeToolBootstrapping.md) process.
+We have uploaded these private DLL's to an Azure blob at this location using Arcade's [_Native Toolset Bootstrapping_](https://github.com/dotnet/arcade/blob/main/Documentation/NativeToolBootstrapping.md) process.
This results in the the packages being uploaded to locations like these:
@@ -36,7 +36,7 @@ In Azure Storage Explorer, the blobs can be found at this location:
- msvcurt-c1xx-0.0.0.3-win32-x86.zip
```
-Writing to this storage account requires special permissions and is only available to Microsoft Employees - please work with DncEng if you need to do this. Also refer to [Native Toolset Bootstrapping documentation](https://github.com/dotnet/arcade/blob/master/Documentation/NativeToolBootstrapping.md).
+Writing to this storage account requires special permissions and is only available to Microsoft Employees - please work with DncEng if you need to do this. Also refer to [Native Toolset Bootstrapping documentation](https://github.com/dotnet/arcade/blob/main/Documentation/NativeToolBootstrapping.md).
#### How does msvcurt-c1xx work?
diff --git a/Documentation/developer-guide.md b/Documentation/developer-guide.md
index e62d6244a..16ac192b5 100644
--- a/Documentation/developer-guide.md
+++ b/Documentation/developer-guide.md
@@ -47,6 +47,24 @@ If there were any failures, you can cd into $(RepoRoot)\artifacts\test\$(Configu
*NOTE: This requires being run from an admin window at the moment. Removing this restriction is tracked by https://github.com/dotnet/wpf/issues/816.*
+### Debugging locally built WPF assemblies with WPF Application
+This section is intended to simplify the steps needed to be able to debug the locally built WPF Assemblies, with any sample app.
+Configure the project to build x86 or x64, as per the platform architecture you have selected while performing the build for WPF assemblies.
+Go to the csproj file and append this line at the bottom of it. ``. The resultant csproj will look like this:
+```xml
+
+ WinExe
+ net6.0-windows
+ true
+
+
+
+ C:\wpf
+
+
+```
+
+
### Testing Locally built WPF assemblies (excluding PresentationBuildTasks)
This section of guide is intended to discuss the different approaches for ad-hoc testing of WPF assemblies,
and not automated testing. For automated testing, see the [Running DRTs locally](#Running-DRTs-locally) section above. There are a few different ways this can be done, and for the most part, it depends on what you are trying to accomplish. This section tries to lay out which scenarios require which workflow.
@@ -176,7 +194,7 @@ If you don't have the ability to build from source, you can update the *.runtime
```
#### Finding a specific version of Microsoft.WindowsDesktop.App that interests you
-Follow the steps defined [here](https://github.com/dotnet/arcade/blob/master/Documentation/SeePackagesLatestVersion.md) to get setup for [swagger API](https://maestro-prod.westus2.cloudapp.azure.com/swagger/ui/index.html). Note that you need to authorize each time you login, so keep note of your token or you'll have to generate a new one. Assuming you have a commit (and therefore an Azure DevOps build id) that you are interested in, you can enter the build id into your query.
+Follow the steps defined [here](https://github.com/dotnet/arcade/blob/main/Documentation/SeePackagesLatestVersion.md) to get setup for [swagger API](https://maestro-prod.westus2.cloudapp.azure.com/swagger/ui/index.html). Note that you need to authorize each time you login, so keep note of your token or you'll have to generate a new one. Assuming you have a commit (and therefore an Azure DevOps build id) that you are interested in, you can enter the build id into your query.
### Testing PresentationBuildTasks
-- add more content here --
diff --git a/Documentation/gen-api.md b/Documentation/gen-api.md
index 366ca5d68..fc8824362 100644
--- a/Documentation/gen-api.md
+++ b/Documentation/gen-api.md
@@ -1,5 +1,5 @@
# GenApi Usage in WPF on .NET Core
-In WPF on .NET Core, C# reference assemblies are created via the use of [GenAPI](https://github.com/dotnet/arcade/tree/master/src/Microsoft.DotNet.GenAPI) and a separate reference assembly project located in the `ref` directory under a particular assemblies source directory.
+In WPF on .NET Core, C# reference assemblies are created via the use of [GenAPI](https://github.com/dotnet/arcade/tree/main/src/Microsoft.DotNet.GenAPI) and a separate reference assembly project located in the `ref` directory under a particular assemblies source directory.
WPF assemblies make extensive use of the [InternalsVisibleToAttribute](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.internalsvisibletoattribute?view=netcore-3.0) which precludes the use of [ProduceReferenceAssembly](https://docs.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties?view=vs-2019) or [ProduceOnlyReferenceAssembly](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/refonly-compiler-option). This is because these compiler options will include internal types and members in the reference assembly. In WPF, this creates dangling references to assemblies that do not exist in the `WindowsDesktop` reference pack.
diff --git a/Documentation/getting-started.md b/Documentation/getting-started.md
index 67947c62b..75d9977a0 100644
--- a/Documentation/getting-started.md
+++ b/Documentation/getting-started.md
@@ -1,13 +1,13 @@
-# Getting started with WPF for .NET Core
+# Getting started with WPF for .NET
-This document describes the experience of using WPF on .NET Core. The [Developer Guide](developer-guide.md) describes how to develop features and fixes for WPF.
+This document describes the experience of using WPF on .NET. The [Developer Guide](developer-guide.md) describes how to develop features and fixes for WPF.
## Installation
Choose one of these options:
-1. [.NET Core 3.1 SDK (recommended)](https://www.microsoft.com/net/download)
-2. [.NET Core 3.1 daily build (latest changes, but less stable)](https://github.com/dotnet/core/blob/master/daily-builds.md)
+1. [.NET 6.0 SDK (recommended)](https://www.microsoft.com/net/download)
+2. [.NET 7.0 daily build (latest changes, but less stable)](https://github.com/dotnet/core/blob/main/daily-builds.md)
## Creating new applications
@@ -23,19 +23,16 @@ dotnet run
## Samples
-Check out the [WPF for .NET Core 3 samples](https://github.com/dotnet/samples/tree/master/wpf) for HelloWorld example. The existing [WPF for .NET Framework samples](https://github.com/Microsoft/WPF-Samples) have also been updated to dual-target .NET Framework and .NET Core 3.
+Check out the [WPF for .NET samples](https://github.com/dotnet/samples/tree/main/wpf) for HelloWorld example. The existing [WPF for .NET samples](https://github.com/Microsoft/WPF-Samples) have also been updated to target .NET.
## Documentation
For WPF API documentation, see the [.NET API Browser](https://docs.microsoft.com/en-us/dotnet/api/?view=netcore-3.0).
-For conceptual documentation (architecture, how-tos, etc.) most of the [documentation for WPF for .NET Framework](https://docs.microsoft.com/en-us/visualstudio/designers/getting-started-with-wpf) applies equally well to WPF for .NET Core 3. The main differences are around project structure and lack of Designer support.
+For conceptual documentation (architecture, how-tos, etc.) most of the [documentation for WPF for .NET Framework](https://docs.microsoft.com/en-us/visualstudio/designers/getting-started-with-wpf) applies equally well to WPF for .NET. The main differences are around project structure and lack of Designer support.
## Missing features
-* To use the XAML Designer for WPF on .NET Core 3.1 you will need VS 2019 16.4.
-* [XAML Browser applications (XBAPs)](https://docs.microsoft.com/en-us/dotnet/framework/wpf/app-development/wpf-xaml-browser-applications-overview) are not supported for .NET Core 3.
-* Not all .NET Framework features are supported for .NET Core 3. You can use the [.NET API Portability Analyzer](https://github.com/microsoft/dotnet-apiport) to see if your existing code can run on .NET Core 3.
-
-A full list of supported / unsupported features will be available in a future update.
+* [XAML Browser applications (XBAPs)](https://docs.microsoft.com/en-us/dotnet/framework/wpf/app-development/wpf-xaml-browser-applications-overview) are not supported for .NET.
+* Not all .NET Framework features are supported for .NET. You can use the [.NET API Portability Analyzer](https://github.com/microsoft/dotnet-apiport) to see if your existing code can run on .NET.
diff --git a/Documentation/intellisense.md b/Documentation/intellisense.md
deleted file mode 100644
index 16593c62a..000000000
--- a/Documentation/intellisense.md
+++ /dev/null
@@ -1,40 +0,0 @@
-# Intellisense XML Incorporation into Ref-Pack
-
-
-Intellisense XML's are produced in the `dotnet/dotnet-api-docs` repo. They are currently **not** published to a NuGet package or another easily consumable artifact. Thus, the process of ingestion of these XML files is a manual one at this time.
-
-1. Go to OPS build site at https://ops.microsoft.com/#/sites/Docs/docsets/dotnet-api-docs?tabName=builds and obtain the latest build artifacts
- - Filter by `Build Type = Intellisense`
- - Download latest package (it's a `zip` file)
-2. Extract the zip contents and retain only the contents of `_intellisense\netcore-3.0` subfolder
- - Copy these contents over to a new folder hierarchy that looks like this:
-
- ```
- DOTNET-API-DOCS_NETCOREAPP3.0-0.0.0.1-WIN32-X86
- \---_intellisense
- \---netcore-3.0
- ```
-
- - Create `version.txt` directly under the top-level folder, and save the commit-sha of the build obtained from the OPS site.
-
- 3. Repeat the process (using the same files) and create `dotnet-api-docs_netcoreapp3.0-0.0.0.1-win64-x64\` folder.
-
-*FUTURE NOTE:
- The version number `0.0.0.1` would change for each subsequent update to a new value, like `0.0.0.2`, etc.*
-
-
-4. Compress each of the above folders like this:
-
- ```PowerShell
- Compress-Archive -Path .\dotnet-api-docs_netcoreapp3.0-0.0.0.1-win32-x86\* -DestinationPath .\dotnet-api-docs_netcoreapp3.0-0.0.0.1-win32-x86.zip
- Compress-Archive -path .\dotnet-api-docs_netcoreapp3.0-0.0.0.1-win64-x64\* -DestinationPath .\dotnet-api-docs_netcoreapp3.0-0.0.0.1-win64-x64.zip
- ```
-
- - It's very important to use Powershell, and no other tools, to create these zip files.
-
-5. Upload the zip files using Azure Storage Explorer to `netcorenativeassets` blob store under this path:
- - `resource-packages -> external -> windows -> dotnet-api-docs_netcoreapp3.0`
-6. Update the versions
- - `global.json` for `native-tools.dotnet-api-docs_netcoreapp3.0`
- - `ReferenceAssembly.targets` for `DotNetApiDocsNetCoreApp30` property
- - Also update `global.json` in `dotnet-wpf-int` repository (if applicable).
diff --git a/Documentation/report-on-adding-new-property.md b/Documentation/report-on-adding-new-property.md
new file mode 100644
index 000000000..3228d7338
--- /dev/null
+++ b/Documentation/report-on-adding-new-property.md
@@ -0,0 +1,123 @@
+# Adding HeadingLevel and IsDialog properties report
+
+In this report, will be the steps executed to the complete implementations of these two properties in WPF, including all the files modified in the proccess.
+
+## Workflow
+
+The workflow for working in WPF consisted on editing the code (used VS Code for this), building it, copying the generated ref files to the correct location inside dotnet folder, and testing it in Visual Studio.
+
+Usually, the command uses to build was `Build /p:Platform=x64 /p:BaselineAllAPICompatError=true -pack`, using the `-pack` flag to generate the files and `/p:BaselineAllAPICompatError=true` to recreate the APICompat baseline files for the new property. More info about it [here](https://github.com/dotnet/wpf/blob/main/Documentation/api-compat.md).
+
+The generated files to be copied are the following: `.\artifacts\packaging\Debug\x64\Microsoft.DotNet.Wpf.GitHub.Debug\lib\net6.0\*` to `..\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.0-preview.6.21317.5\`; and `.\artifacts\packaging\Debug\x64\Microsoft.DotNet.Wpf.GitHub.Debug\ref\net6.0\*` to `..\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\6.0.0-preview.6.21317.5\ref\net6.0\` . I suggest to have a script to copy them and gain some time.
+
+After copying the references, the files can be open in Visual Studio to set breakpoints for debugging.
+
+# Files Changed
+
+In this section, will be listed all the changes on the [Pull Request](https://github.com/dotnet/wpf/pull/4751) and some of the reasoning about them, in the order they were made (or the more logical order).
+## OSVersionHelper.cs
+
+Before everything, changes in this file were needed. The [support for RS4 was added](https://github.com/dotnet/wpf/pull/4751/files#diff-05f25cf93ed154b760ffd1f31b96af6ccf131f28b9f10c3cb4fac7fe19bb2d5bR53-R100) for HeadingLevel property, creagint the extern method [here](https://github.com/dotnet/wpf/pull/4751/files#diff-05f25cf93ed154b760ffd1f31b96af6ccf131f28b9f10c3cb4fac7fe19bb2d5bR146-R148).
+
+## UIAutomationTypes
+### AutomationIdentifierConstants.cs
+
+This is the file where we declare the new porperties to be added. The two [if statements](https://github.com/dotnet/wpf/pull/4751/files#diff-326f5b75e658648db183d6a96e204cc6ed23e922ab94f7c54fe8cfaef8c3989fR34-R50) were added to set up the last supported events and properties according to the OS version. The HeadingLevel property is supported on RS4, and IsDialog on RS5.
+
+Also, we add them in the [enum Properties](https://github.com/dotnet/wpf/pull/4751/files#diff-326f5b75e658648db183d6a96e204cc6ed23e922ab94f7c54fe8cfaef8c3989fR289-R296). We need to add the other 5 properties because the numeric values of the enum should match the [properties ids](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids). The last one implemented was `Size`, which id is 30167. And the `HeadingLevel` id is 30173, because there was five other properties in between. `IsDialog` comes just after with the id 30174.
+
+These are the five properties missing:
+```
+const long UIA_IsSelectionPattern2AvailablePropertyId = 30168;
+const long UIA_Selection2FirstSelectedItemPropertyId = 30169;
+const long UIA_Selection2LastSelectedItemPropertyId = 30170;
+const long UIA_Selection2CurrentSelectedItemPropertyId = 30171;
+const long UIA_Selection2ItemCountPropertyId = 30172;
+```
+
+### AutomationElementIdentifiers.cs
+
+In this file, we [create the two properties](https://github.com/dotnet/wpf/pull/4751/files#diff-ea7f693cded819529c9149156deee9a7bbbcbeddfd2806100c983de3a6ff56b3R119-R124) of the class AutomationProperty, using the static method Register, receiving the id from the enum Properties.
+
+### ref/UIAutomationTypes.cs
+
+And in this one, [create the same properties](https://github.com/dotnet/wpf/pull/4751/files#diff-278bf69eb7c4b9176c567f08f1105b6b2bdd12afc10aeb10ba74ea340a8af31aR31-R35) in the reference file.
+## UIAutomationClient
+### AutomationElement.cs
+
+Next, the AutomationElement class needs to [declare the properties](https://github.com/dotnet/wpf/pull/4751/files#diff-e86a5f335181123dd6804ccc6d309cef3f2c0ba24d35044225b055bcc24ca628R201-R210) getting them from AutomationElementIdentifiers.
+
+### Schema.cs
+
+The change was in the Schema.cs, where the two new property infos were [declared](https://github.com/dotnet/wpf/pull/4751/files#diff-06492e0436d0881739aa3bfa3052625528df07c8aefd87f86c51eab3683f7ac2R291-R292). In the consturctor, there are 4 arguments. The first is the converter, second is the AutomationProperty, got from AutomationElement class, the third is the type of the value (an enum [declared afterwards](https://github.com/dotnet/wpf/pull/4751/files#diff-06492e0436d0881739aa3bfa3052625528df07c8aefd87f86c51eab3683f7ac2R212-R225) for HeadingLevel and bool for IsDialog), and the default value comes last.
+
+### ref/UIAutomationClient.cs
+
+Finally, we [declare them in the reference file](https://github.com/dotnet/wpf/pull/4751/files#diff-08711d7b7f1b4b33e619ddd31b96005ca59095264e5c8edddc011f8574e45dc2R43-R47) inside AutomationElement class.
+
+## PresentationCore
+
+This is the part of project where most of the changes were made. We will change the AutomationProperties class and the AutomationPeer class to support the new properties, also change some of the main AutomationPeers to implement them.
+
+### Adding AutomationHeadingLevel.cs enum
+
+As HeadingLevel value is an enum, we need to [create it](https://github.com/dotnet/wpf/pull/4751/files#diff-302f99ca8bfc90091a2b7495d342b1b9dca89787033e5a290d1ea5cf6e534133R1-R68) and add it [to be compiled](https://github.com/dotnet/wpf/pull/4751/files#diff-2602bc5513a33eef826d95d5cba966d84e8e143bcb5e28fb8a7398fd6090ef3fR395) with the project.
+
+### AutomationProperties.cs
+
+Here, we will implement the properties to be set with the AutomationProperties class. The implementation for HeadingLevel is [here](https://github.com/dotnet/wpf/pull/4751/files#diff-292f16ac8e53da579b25b8c732224931dd04271f8eff5af074edd6f6efb46bd7R597-R630), and similiar was done for IsDialog [here](https://github.com/dotnet/wpf/pull/4751/files#diff-292f16ac8e53da579b25b8c732224931dd04271f8eff5af074edd6f6efb46bd7R632-R664). This is what allow the properties to be set in the DependencyObject.
+
+### AutomationPeer.cs
+
+Here we implement the base methods for all other peers. [GetHeadingLevel](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR1279-R1304) returns the HeadingLevel of the DependencyObject owner of this peers, trying to get it from the method [GetHeadingLevelCore](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR712-R717), which in this class, just returns the default value.
+
+As HeadingLevel is an enum value, in the docs we set its values to range from 0 (None) to 9 (Level9). But, [UIA intentifies](https://docs.microsoft.com/en-us/windows/win32/winauto/uiauto-heading-level-identifiers) are from 80050 (None) to 80059 (Level9). So, before handling the result to UIA, we [map them](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR2174-R2177) to the correct values, using the [private enum](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR1307-R1319), and a [converter method](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR1320-R1346).
+
+IsDialog is a bit simpler as it returns just a boolean value. [IsDialogCore](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR655-R659) return false and the implementation of [IsDialog](https://github.com/dotnet/wpf/pull/4751/files#diff-2c34ffc37749fc235998a14c9a74dd042c2a413c18880a29c4ba842654c4217dR1354-R1375) is also simple. *Note that as IsDialog is a boolean property, I followed the pattern and choose for IsDialog instead of GetIsDialog, as other boolean properties.*
+
+### ContentElementAutomationPeer.cs, UIElementAutomationPeer.cs and UiElement3DAutomationPeer.cs
+
+These are the classes in the PresentationCore that are parents of almost every other peer in PresentationFramework. There are some exceptions that we will see later.
+
+So, these classes need to implement the IsDialogCore and GetHeadingLevelCore methods, or elset they would always return the default value. Here will be the contact between the automation peer and the AutomationProperties class, which is the one that actually gets the value of the property for us, and the peer returns it to UIA.
+
+All the three implementations for these classes are the same, and are very simple, just calling automation properties and getting the value returned.
+
+In ContenteElementAutomation peer are [here](https://github.com/dotnet/wpf/pull/4751/files#diff-04a0d1f88fbc6dc1f41662373c8ba94fcd2a51eebf7ae92c4bbd54064f9dc39dR216-R223) and [here](https://github.com/dotnet/wpf/pull/4751/files#diff-04a0d1f88fbc6dc1f41662373c8ba94fcd2a51eebf7ae92c4bbd54064f9dc39dR298-R306).
+For UIElementAutomationPeer: [here](https://github.com/dotnet/wpf/pull/4751/files#diff-04a0d1f88fbc6dc1f41662373c8ba94fcd2a51eebf7ae92c4bbd54064f9dc39dR298-R306) and [here](https://github.com/dotnet/wpf/pull/4751/files#diff-46438e614debbc732b78f97523dec6218fcc790318cea23e5ebc27a6a47f0ac5R496-R504). And for UIElement3DAutomationPeer: [here](https://github.com/dotnet/wpf/pull/4751/files#diff-eea3a381ce717788d178965244e67012e68e1b88169a9d7539ca82c022b5225aR320-R325) and [here](https://github.com/dotnet/wpf/pull/4751/files#diff-eea3a381ce717788d178965244e67012e68e1b88169a9d7539ca82c022b5225aR395-R403).
+
+### ref/PresentationCore.cs
+
+Finally, we need to declare everything added in the reference file. We redeclare the [AutomationHeadingLevel enum](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2129-R2143). Declare the [properties](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2149-R2152) from AutomationProperties.cs, with the [Get and Set methods](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2166-R2186) for both.
+
+Now we declare the [methods created](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2301-R2337) in AutomationPeer.
+
+And the methods from the three classes of peers mentioned above: [ContentElement](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2372-R2386), [UIElement3D](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2444-R2458) and [UIElement](https://github.com/dotnet/wpf/pull/4751/files#diff-8e9f502efcdba2ed9b2e62342a20040d8c846ef2f77586310f09449bccbb6280R2480-R2494).
+
+## PresentationFramework
+
+After changing the classes in PresentationCore, we need to change some of the peers in PresentationFramework. Here is where the behaviour of the peers for the controls are actually implemented.
+
+As said above, almost all of them inherit from `ContentElementAutomationPeer`, `UIElement3DAutomationPeer` and `UIElementAutomationPeer`.
+
+There are three of them that do not inherit from them, so the `IsDialogCore` and `GetHeadingLevelCore` for them would always return the default value as implemented in `AutomationPeer.cs`.
+
+So, we need to create the behavior for them, which are [DataGridCellItemAutomationPeer](https://github.com/dotnet/wpf/pull/4751/files#diff-0139b9e223f77e31f3bb35e27f4f292be36b70e32a43e0bfe273ecec50ebb336R366-R437), [DateTimeAutomationPeer](https://github.com/dotnet/wpf/pull/4751/files#diff-9ae60429705ff9904cee36c08798523093563fbf4d1deb7b92f0bbd3445ac9cbR462-R545) and [ItemAutomationPeer](https://github.com/dotnet/wpf/pull/4751/files#diff-45edde82c5a382f0229e7094b77478a5f6c08b9f919159a747e03d9c116eb536R235-R468).
+
+### WindowAutomationPeer.cs
+
+The WindowAutomationPeer is an example of peer that the behaviour for one of the new properties (IsDialog) should have a different implementation.
+
+Here, the owner of this peer could be showing as a dialog depending of how it was instantiated, and whe should get this information from the property `IsShowingAsDialog` from the owner.
+
+Therefore, we implement this in the owner class [Window.cs](https://github.com/dotnet/wpf/pull/4751/files#diff-30ce94d35c72b94385aa439cafead5bd0677f7b4037f0fefcfc7a03d3730a681R1282-R1292), and after we [get the value if possible](https://github.com/dotnet/wpf/pull/4751/files#diff-53c3d38740b19f10d386f48fe04225d8a602b466b8a260d8cdd2a64a386f5b88R91-R103), or else we get the information from AutomationProperties class.
+
+### ref/PresentationFramework.cs
+
+Finally, we need to declare everything created above in the reference file.
+
+ Starting with the peers changed: [DataGridCellItem](https://github.com/dotnet/wpf/pull/4751/files#diff-8c5e1efe3927fbf477c421d45b1896e23bbedbd69d8770ce9e994c223bff0414R2406-R2421), [DateTime](https://github.com/dotnet/wpf/pull/4751/files#diff-8c5e1efe3927fbf477c421d45b1896e23bbedbd69d8770ce9e994c223bff0414R2545-R2560) and [Item](https://github.com/dotnet/wpf/pull/4751/files#diff-8c5e1efe3927fbf477c421d45b1896e23bbedbd69d8770ce9e994c223bff0414R2802-R2816) automation peers. And the new method in WindowAutomationPeer.
+
+## Testing
+
+After that, the new properties should be now possible to be set in a WPF project. Also, will be seen in AccessibilityInsights.
\ No newline at end of file
diff --git a/Documentation/testing-in-helix.md b/Documentation/testing-in-helix.md
index cdb6b85f0..530cc6f86 100644
--- a/Documentation/testing-in-helix.md
+++ b/Documentation/testing-in-helix.md
@@ -1,6 +1,6 @@
# Testing in Helix
-I'd recommend seeing the official Helix [readme](https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Helix/Sdk/Readme.md) if you are interested in some of the general Helix concepts. I'll briefly outline what we are doing that is a bit unique:
+I'd recommend seeing the official Helix [readme](https://github.com/dotnet/arcade/blob/main/src/Microsoft.DotNet.Helix/Sdk/Readme.md) if you are interested in some of the general Helix concepts. I'll briefly outline what we are doing that is a bit unique:
1. Helix has built-in support for running xUnit tests. Since we are not using xUnit, we have to manually setup our machines so that they work with QualityVault and STI. During the build, we create a payload directory that contains the infrastructure we need. A single project (in our case `DrtXaml`) is responsible for creating this directory (see instances of the MSBuild property `CreateTestPayload`).
2. After the build is done, we utilize Arcade's `AfterSolutionBuild.targets` extension point to finish creating the rest of the payload if the `-test` parameter is passed to the build. Here we add the just built DRTs and if `-ci` was **not** passed into to the build, run the tests.
diff --git a/Microsoft.Dotnet.Wpf.sln b/Microsoft.Dotnet.Wpf.sln
index a63f0206b..24fd50bad 100644
--- a/Microsoft.Dotnet.Wpf.sln
+++ b/Microsoft.Dotnet.Wpf.sln
@@ -1259,7 +1259,6 @@ Global
{60E8E057-79E1-4860-A015-23C9587434F7}.Debug|Any CPU.Build.0 = Debug|Win32
{60E8E057-79E1-4860-A015-23C9587434F7}.Debug|Any CPU.Deploy.0 = Debug|Win32
{60E8E057-79E1-4860-A015-23C9587434F7}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {60E8E057-79E1-4860-A015-23C9587434F7}.Debug|ARM64.Build.0 = Debug|ARM64
{60E8E057-79E1-4860-A015-23C9587434F7}.Debug|x64.ActiveCfg = Debug|x64
{60E8E057-79E1-4860-A015-23C9587434F7}.Debug|x64.Build.0 = Debug|x64
{60E8E057-79E1-4860-A015-23C9587434F7}.Debug|x64.Deploy.0 = Debug|x64
@@ -1270,7 +1269,6 @@ Global
{60E8E057-79E1-4860-A015-23C9587434F7}.Release|Any CPU.Build.0 = Release|Win32
{60E8E057-79E1-4860-A015-23C9587434F7}.Release|Any CPU.Deploy.0 = Release|Win32
{60E8E057-79E1-4860-A015-23C9587434F7}.Release|ARM64.ActiveCfg = Release|ARM64
- {60E8E057-79E1-4860-A015-23C9587434F7}.Release|ARM64.Build.0 = Release|ARM64
{60E8E057-79E1-4860-A015-23C9587434F7}.Release|x64.ActiveCfg = Release|x64
{60E8E057-79E1-4860-A015-23C9587434F7}.Release|x64.Build.0 = Release|x64
{60E8E057-79E1-4860-A015-23C9587434F7}.Release|x64.Deploy.0 = Release|x64
diff --git a/NuGet.config b/NuGet.config
index 2a0f97c3e..02764fe3b 100644
--- a/NuGet.config
+++ b/NuGet.config
@@ -3,6 +3,11 @@
+
+
+
+
+
@@ -10,6 +15,14 @@
+
+
-
+
+
+
+
+
+
+
diff --git a/README.md b/README.md
index abfa3e03b..4936d3aa8 100644
--- a/README.md
+++ b/README.md
@@ -1,37 +1,37 @@
# Windows Presentation Foundation (WPF)
[![.NET Foundation](https://img.shields.io/badge/.NET%20Foundation-blueviolet.svg)](https://www.dotnetfoundation.org/)
[![Build Status](https://dnceng.visualstudio.com/public/_apis/build/status/dotnet/wpf/dotnet-wpf%20CI)](https://dnceng.visualstudio.com/public/_build/latest?definitionId=270)
-[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/dotnet/wpf/blob/master/LICENSE.TXT)
+[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/dotnet/wpf/blob/main/LICENSE.TXT)
Windows Presentation Foundation (WPF) is a UI framework for building Windows desktop applications. WPF supports a broad set of application development features, including an application model, resources, controls, graphics, layout, data binding and documents. WPF uses the Extensible Application Markup Language (XAML) to provide a declarative model for application programming.
WPF applications are based on a vector graphics architecture. This enables applications to look great on high DPI monitors, as they can be infinitely scaled. WPF also includes a flexible hosting model, which makes it straightforward to host a video in a button, for example. The visual designer provided in Visual Studio makes it easy to build WPF application, with drag-in-drop and/or direct editing of XAML markup.
+As of .NET 6.0 WPF supports ARM64.
+
See the [WPF Roadmap](roadmap.md) to learn about project priorities, status and ship dates.
[WinForms](https://github.com/dotnet/winforms) is another UI framework for building Windows desktop applications that is supported on .NET (6.0.x/5.0.x/3.1.x). WPF and WinForms applications only run on Windows. They are part of the `Microsoft.NET.Sdk.WindowsDesktop` SDK. You are recommended to use the most recent version of [Visual Studio](https://visualstudio.microsoft.com/downloads/) to develop WPF and WinForms applications for .NET.
-WPF for ARM64 is new for .NET 6.0 and is supported by NET 6.0 Preview 1 and later.
-
-To build the WPF repo and contribute features and fixes for .NET 6.0, the most recent [Visual Studio Preview](https://visualstudio.microsoft.com/vs/preview/) is required.
+To build the WPF repo and contribute features and fixes for .NET 7.0, [Visual Studio 2022 Preview](https://visualstudio.microsoft.com/vs/preview/) is required.
## Getting started
-* [.NET 5.0 SDK](https://dotnet.microsoft.com/download/dotnet/5.0)
-* [.NET Preview SDKs (6.0 Preview 1, 5.0 servicing, and 3.1 servicing)](https://github.com/dotnet/installer)
+* [.NET 6.0 SDK](https://dotnet.microsoft.com/download/dotnet/6.0)
+* [.NET Preview SDKs (7.0 daily, 6.0 servicing, and 3.1 servicing)](https://github.com/dotnet/installer)
* [Getting started instructions](Documentation/getting-started.md)
* [Contributing guide](Documentation/contributing.md)
* [Migrating .NET Framework WPF Apps to .NET Core](https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework)
## Status
-- We are currently developing WPF for .NET 6.
+- We are currently developing WPF for .NET 7.
- We have completed publishing WPF sources. You can learn more about this at https://github.com/dotnet/wpf/issues/2554.
- We have completed porting WPF to .NET Core as part of .NET Core 3.0, you can learn more about what was done [here](https://github.com/dotnet/wpf/issues/1936).
See the [WPF roadmap](roadmap.md) to learn about the schedule for specific WPF components.
-We have published few tests and have limited coverage for PRs at this time as a result. We will add more tests in 2021, however, it will be a progressive process.
+Test published at [separate repo](https://github.com/dotnet/wpf-test) Tests and have limited coverage at this time. We will add more tests, however, it will be a progressive process.
The Visual Studio WPF designer is now available as part of Visual Studio 2019.
@@ -39,7 +39,7 @@ The Visual Studio WPF designer is now available as part of Visual Studio 2019.
Some of the best ways to contribute are to try things out, file bugs, join in design conversations, and fix issues.
-* This repo defines [contributing guidelines](Documentation/contributing.md) and also follows the more general [.NET Core contributing guide](https://github.com/dotnet/runtime/blob/master/CONTRIBUTING.md).
+* This repo defines [contributing guidelines](Documentation/contributing.md) and also follows the more general [.NET Core contributing guide](https://github.com/dotnet/runtime/blob/main/CONTRIBUTING.md).
* If you have a question or have found a bug, [file an issue](https://github.com/dotnet/wpf/issues/new).
* Use [daily builds](Documentation/getting-started.md#installation) if you want to contribute and stay up to date with the team.
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
index 435a62595..52d37d5eb 100644
--- a/azure-pipelines.yml
+++ b/azure-pipelines.yml
@@ -9,14 +9,12 @@ variables:
# clean the local repo on the build agents
- name: Build.Repository.Clean
value: true
- - name: _PublishUsingPipelines
- value: true
- - name: _DotNetArtifactsCategory
- value: WINDOWSDESKTOP
- - name: _DotNetValidationArtifactsCategory
- value: WINDOWSDESKTOP
- - name: PostBuildSign
- value: true
+ - ${{ if or(startswith(variables['Build.SourceBranch'], 'refs/heads/release/'), startswith(variables['Build.SourceBranch'], 'refs/heads/internal/release/')) }}:
+ - name: PostBuildSign
+ value: false
+ - ${{ else }}:
+ - name: PostBuildSign
+ value: true
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- group: DotNet-Wpf-SDLValidation-Params
@@ -40,8 +38,10 @@ trigger:
- release/3.*
- release/5.*
- release/6.*
+ - release/7.*
- internal/release/5.*
- internal/release/6.*
+ - internal/release/7.*
- experimental/*
paths:
exclude:
@@ -56,6 +56,7 @@ pr:
- internal/release/3.*
- release/5.*
- release/6.*
+ - release/7.*
- experimental/*
paths:
exclude:
@@ -68,13 +69,7 @@ stages:
jobs:
- template: /eng/pipeline.yml
parameters:
- enablePublishUsingPipelines: $(_PublishUsingPipelines)
${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
- # agent pool can't be read from a user-defined variable (Azure DevOps limitation)
- pool:
- name: NetCoreInternal-Pool
- queue: buildpool.windows.10.amd64.vs2019.pre
- # runAsPublic is used in expressions, which can't read from user-defined variables
runAsPublic: false
- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
diff --git a/azure-pipelines1.yml b/azure-pipelines1.yml
new file mode 100644
index 000000000..66d9095e0
--- /dev/null
+++ b/azure-pipelines1.yml
@@ -0,0 +1,116 @@
+# This is a simple wrapper for eng/pipeline.yml to get around the limitation of
+# user-defined variables not being available in yaml template expressions.
+
+# Parameters ARE available in template expressions, and parameters can have default values,
+# so they can be used to control yaml flow.
+#
+
+variables:
+ # clean the local repo on the build agents
+ - name: Build.Repository.Clean
+ value: true
+ - name: _PublishUsingPipelines
+ value: true
+ - name: PostBuildSign
+ value: true
+
+ - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - group: DotNet-Wpf-SDLValidation-Params
+
+
+# This is set in the pipeline directly
+# When set to false, CI tests will not be enabled in builds.
+#
+# _ContinuousIntegrationTestsEnabled: false
+
+# Setting batch to true, triggers one build at a time.
+# if there is a push while a build in progress, it will wait,
+# until the running build finishes, and produce a build with all the changes
+#
+# only trigger ci builds for the master and release branches
+trigger:
+ batch: true
+ branches:
+ include:
+ - main
+ - release/3.*
+ - release/5.*
+ - release/6.*
+ - release/7.*
+ - internal/release/5.*
+ - internal/release/6.*
+ - experimental/*
+ paths:
+ exclude:
+ - Documentation/*
+
+pr:
+ autoCancel: true
+ branches:
+ include:
+ - drttesting
+ paths:
+ exclude:
+ - Documentation/*
+
+# Call the pipeline.yml template, which does the real work
+stages:
+- stage: build
+ displayName: Build
+ jobs:
+ - template: /eng/pipeline.yml
+ parameters:
+ enablePublishUsingPipelines: $(_PublishUsingPipelines)
+ ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ # agent pool can't be read from a user-defined variable (Azure DevOps limitation)
+ pool:
+ name: NetCore-Svc-Internal
+ demands: ImageOverride -equals windows.vs2022preview.amd64
+ # runAsPublic is used in expressions, which can't read from user-defined variables
+ runAsPublic: false
+
+- ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
+ - template: eng\common\templates\post-build\post-build.yml
+ parameters:
+ publishingInfraVersion: 3
+ enableSymbolValidation: false
+ enableSigningValidation: false
+ enableNugetValidation: false
+ enableSourceLinkValidation: false
+ # This is to enable SDL runs part of Post-Build Validation Stage
+ SDLValidationParameters:
+ enable: false
+ params: ' -SourceToolsList @("policheck","credscan")
+ -TsaInstanceURL $(_TsaInstanceURL)
+ -TsaProjectName $(_TsaProjectName)
+ -TsaNotificationEmail $(_TsaNotificationEmail)
+ -TsaCodebaseAdmin $(_TsaCodebaseAdmin)
+ -TsaBugAreaPath $(_TsaBugAreaPath)
+ -TsaIterationPath $(_TsaIterationPath)
+ -TsaRepositoryName "wpf"
+ -TsaCodebaseName "wpf"
+ -TsaPublish $True'
+
+- stage: DrtTesting
+ displayName: DrtTesting
+ jobs:
+ - job: DownloadTestsZip
+ steps:
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ buildType: 'specific'
+ project: '7ea9116e-9fac-403d-b258-b31fcf1bb293'
+ definition: '479'
+ buildVersionToDownload: 'specific'
+ pipelineId: '1702475'
+ artifactName: 'Tests.Release.x64.zip'
+ targetPath: '$(Pipeline.Workspace)\testszip\'
+ - task: DownloadPipelineArtifact@2
+ inputs:
+ buildType: 'specific'
+ project: '7ea9116e-9fac-403d-b258-b31fcf1bb293'
+ definition: '479'
+ buildVersionToDownload: 'specific'
+ pipelineId: '1702475'
+ artifactName: 'Tests.Release.x86.zip'
+ targetPath: '$(Pipeline.Workspace)\testszip\'
\ No newline at end of file
diff --git a/build.sh b/build.sh
old mode 100644
new mode 100755
diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml
index 676c799dc..b85ca3453 100644
--- a/eng/Version.Details.xml
+++ b/eng/Version.Details.xml
@@ -1,107 +1,99 @@
-
- https://github.com/dotnet/winforms
- 02ef8f0eba399925a34aeeb55642871511378e9e
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-winforms
+ 75eafed7999075bca879940ad0b1a0794061ddb0
-
- https://github.com/dotnet/winforms
- 02ef8f0eba399925a34aeeb55642871511378e9e
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-winforms
+ 75eafed7999075bca879940ad0b1a0794061ddb0
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 0a2bda10e81d901396c3cff95533529e3a93ad47
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d037e070ebe5c83838443f869d5800752b0fcb13
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 8e9a17b2216f51a5788f8b1c467a4cf3b769e7d7
-
+
https://dev.azure.com/dnceng/internal/_git/dotnet-wpf-int
- 552adb9a860d3e46354669315bbf72aa421ccdc1
+ 62999eb1848d22a5271ae178aa2b92383e1df544
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ d099f075e45d2aa6007a22b71b45a08758559f80
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 4a824ef37caa51072221584c64cbf15455f406ca
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 4a824ef37caa51072221584c64cbf15455f406ca
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
-
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
-
-
- https://github.com/dotnet/runtime
- 14b34eb02bc8969b77c0d3a1e39fb38f450625cf
+
+ https://dev.azure.com/dnceng/internal/_git/dotnet-runtime
+ 4a824ef37caa51072221584c64cbf15455f406ca
-
+
https://github.com/dotnet/arcade
- 9b7027ba718462aa6410cef61a8be5a4283e7528
+ 3b8f3de4606c338f99e8ce85cfb6f960f6a428c8
-
+
https://github.com/dotnet/arcade
- 9b7027ba718462aa6410cef61a8be5a4283e7528
+ 3b8f3de4606c338f99e8ce85cfb6f960f6a428c8
-
+
https://github.com/dotnet/arcade
- 9b7027ba718462aa6410cef61a8be5a4283e7528
+ 3b8f3de4606c338f99e8ce85cfb6f960f6a428c8
-
+
https://github.com/dotnet/arcade
- 9b7027ba718462aa6410cef61a8be5a4283e7528
+ 3b8f3de4606c338f99e8ce85cfb6f960f6a428c8
-
+
https://github.com/dotnet/arcade
- 9b7027ba718462aa6410cef61a8be5a4283e7528
+ 3b8f3de4606c338f99e8ce85cfb6f960f6a428c8
diff --git a/eng/Versions.props b/eng/Versions.props
index a4ad24140..c0275dcf2 100644
--- a/eng/Versions.props
+++ b/eng/Versions.props
@@ -1,47 +1,56 @@
- 6.0.0
- rc
- 1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
-
-
-
- 6.0.0-rc.1.21417.4
+ 7
+ 0
+ 12
+ servicing
+
+
+ $(MajorVersion).$(MinorVersion).$(PatchVersion)
+
+ $(MajorVersion).$(MinorVersion).0.0
-
+
- 5.0.0-alpha1.19562.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
+ 7.0.12-servicing.23478.3
-
+
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
+ 7.0.12-servicing.23477.20
+ 7.0.12
+ 7.0.12
+ 7.0.4
+ 7.0.0
+ 7.0.0
+ 7.0.0
+ 7.0.0
+ 7.0.1
+ 7.0.0
+ 7.0.0
+ 4.6.0-preview4.19176.11
+ 7.0.0
+ 7.0.1
+ 7.0.0
+ 7.0.0
-
+
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 4.6.0-preview4.19176.11
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
- 6.0.0-rc.1.21417.1
+ 7.0.0-preview-20220915.1
- 6.0.0-beta.21413.4
- 6.0.0-beta.21413.4
- 6.0.0-beta.21413.4
+ 7.0.0-beta.23408.3
+ 7.0.0-beta.23408.3
@@ -80,6 +89,6 @@
System.Reflection.MetadataLoadContext
- 6.0.0-rc.1.21417.2
+ 7.0.0-rtm.23409.5
diff --git a/eng/WpfArcadeSdk/Sdk/Sdk.props b/eng/WpfArcadeSdk/Sdk/Sdk.props
index f4bd71bf1..124954cbc 100644
--- a/eng/WpfArcadeSdk/Sdk/Sdk.props
+++ b/eng/WpfArcadeSdk/Sdk/Sdk.props
@@ -5,7 +5,7 @@
- $([System.IO.Directory]::GetParent("$(MSBuildThisFileDirectory.TrimEnd('\'))"))\
+ $([System.IO.Directory]::GetParent("$(MSBuildThisFileDirectory.TrimEnd('\').TrimEnd('/'))"))\
$(WpfArcadeSdkRoot)tools\
@@ -14,7 +14,7 @@
$(WpfArcadeSdkToolsDir)GenXmlStringTable.pl
- preview
+ preview
10
true
true
diff --git a/eng/WpfArcadeSdk/Sdk/Sdk.targets b/eng/WpfArcadeSdk/Sdk/Sdk.targets
index db8530fd1..8ed9fd97e 100644
--- a/eng/WpfArcadeSdk/Sdk/Sdk.targets
+++ b/eng/WpfArcadeSdk/Sdk/Sdk.targets
@@ -23,7 +23,7 @@
-
+
diff --git a/eng/WpfArcadeSdk/tools/CodeAnalysis.targets b/eng/WpfArcadeSdk/tools/CodeAnalysis.targets
index 17ff34f4b..dcd84e745 100644
--- a/eng/WpfArcadeSdk/tools/CodeAnalysis.targets
+++ b/eng/WpfArcadeSdk/tools/CodeAnalysis.targets
@@ -6,8 +6,7 @@
-
-
+
diff --git a/eng/WpfArcadeSdk/tools/ExtendedAssemblyInfo.targets b/eng/WpfArcadeSdk/tools/ExtendedAssemblyInfo.targets
index b53d297ab..d5488497c 100644
--- a/eng/WpfArcadeSdk/tools/ExtendedAssemblyInfo.targets
+++ b/eng/WpfArcadeSdk/tools/ExtendedAssemblyInfo.targets
@@ -119,8 +119,8 @@
ItemGroup of fully resolved C# Attribute definitions that are ready to be used in a source file.
-->
+ TaskFactory="RoslynCodeTaskFactory"
+ AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
@@ -132,8 +132,6 @@
-
-
0)
diff --git a/eng/WpfArcadeSdk/tools/GenApi.props b/eng/WpfArcadeSdk/tools/GenApi.props
index 508ea82ad..e32dacd3d 100644
--- a/eng/WpfArcadeSdk/tools/GenApi.props
+++ b/eng/WpfArcadeSdk/tools/GenApi.props
@@ -26,9 +26,9 @@
$(WpfArcadeSdkRoot)tools\GenApi\GlobalApiExclusions.txt
$(WpfArcadeSdkRoot)tools\GenApi\GlobalAttrExclusions.txt
- --exclude-members
- $(GenAPIAdditionalParameters) --exclude-api-list "$(GlobalApiExclusionsFile)"
- $(GenAPIAdditionalParameters) --exclude-attributes-list "$(GlobalAttrExclusionsFile)"
+ true
+ $(GlobalApiExclusionsFile)
+ $(GlobalAttrExclusionsFile)
- 0.0.0.3
-
-
- $(CommonLibrary_NativeInstallDir)\bin\dotnet-api-docs_net5.0\$(DotNetApiDocsNet50)\_intellisense\net-5.0\
+
+ $([MSBuild]::NormalizePath('$(_DotnetApiDocsFilesRoot)', '$(AssemblyName).xml'))
+
+
+ $([System.IO.Path]::ChangeExtension('$(TargetRefPath)', '.xml'))
+ $([System.IO.Path]::ChangeExtension('$(TargetPath)', '.xml'))
+ $([System.IO.Path]::GetDirectoryName('$(IntellisenseXmlDest)'))
-
-
-
diff --git a/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.props b/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.props
index 4d5eae3f4..cfd681c5a 100644
--- a/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.props
+++ b/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.props
@@ -2,8 +2,8 @@
$(MicrosoftNETCoreAppRuntimewinx64Version)
+ '$(TargetFrameworkIdentifier)' == '.NETCoreApp' And
+ $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))">$(MicrosoftNETCoreAppRuntimewinx64Version)
diff --git a/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets b/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets
index b5d2f5cc7..6508da794 100644
--- a/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets
+++ b/eng/WpfArcadeSdk/tools/RuntimeFrameworkReference.targets
@@ -16,7 +16,7 @@
Condition="'$(MicrosoftNETCoreAppRefVersion)'!=''
And '$(NoTargets)'!='true'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
- And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')
+ And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
And '$(MSBuildProjectExtension)'!='.vcxproj'">
$(MicrosoftNETCoreAppRefVersion)
@@ -30,6 +30,6 @@
-
+
diff --git a/eng/WpfArcadeSdk/tools/SdkReferences.targets b/eng/WpfArcadeSdk/tools/SdkReferences.targets
index fdfda7ac3..0102a23c2 100644
--- a/eng/WpfArcadeSdk/tools/SdkReferences.targets
+++ b/eng/WpfArcadeSdk/tools/SdkReferences.targets
@@ -6,7 +6,7 @@
GeneratePathProperty="True"
Condition="'$(MSBuildProjectExtension)'!='.vcxproj'
And '$(TargetFrameworkIdentifier)' == '.NETCoreApp'
- And ('$(TargetFrameworkVersion)' == 'v3.0' Or '$(TargetFrameworkVersion)' == 'v3.1' Or '$(TargetFrameworkVersion)' == 'v6.0')
+ And $([MSBuild]::VersionGreaterThanOrEquals('$(TargetFrameworkVersion)', '3.0'))
And '$(NoAutoMicrosoftPrivateWinformsReference)'!='true'"/>
true
+
+ <_GenerateResourcesCodeAsConstants>true
+
+
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='UIAutomationClient'">false
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='UIAutomationClientSideProviders'">false
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='UIAutomationProvider'">false
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='System.Windows.Controls.Ribbon' or '$(AssemblyName)'=='System.Windows.Controls.Ribbon'">false
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='System.Xaml'">false
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='WindowsBase'">false
+ <_GenerateResourcesCodeAsConstants Condition="'$(MSBuildProjectName)'=='WindowsFormsIntegration'">false
+
+ $(DefineConstants);GENERATE_RESOURCES_CODE_AS_CONSTANTS
+
+
+ true
true
FxResources.$(AssemblyName).SR
- true
+ $(_GenerateResourcesCodeAsConstants)
MS.Utility.SRID
- System.SR
+ System.SR
+ System.SR
+ MS.Internal.Automation.SR
System.SR
- MS.Internal.WindowsBase.SRID
- Microsoft.Windows.Controls.SRID
+ MS.Internal.WindowsBase.SR
+ Microsoft.Windows.Controls.SR
System.SR
System.Windows.Xps.SRID
System.Windows.SRID
System.Windows.TrustUI.SRID
- System.Windows.SRID
+ System.Windows.SR
MS.Internal.PresentationCore.SRID
+ System.SR
System.SRID
diff --git a/eng/WpfArcadeSdk/tools/WPF_Generated_Files.txt b/eng/WpfArcadeSdk/tools/WPF_Generated_Files.txt
index a2b823ef2..fabfcfc0e 100644
--- a/eng/WpfArcadeSdk/tools/WPF_Generated_Files.txt
+++ b/eng/WpfArcadeSdk/tools/WPF_Generated_Files.txt
@@ -187,9 +187,9 @@ src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Ima
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/ImageSource.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32Collection.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/Int32CollectionConverter.cs
+src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineGeometry.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LineSegment.cs
-src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/LinearGradientBrush.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MatrixTransform.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/MediaTimeline.cs
src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Media/Generated/PathFigure.cs
@@ -345,9 +345,9 @@ src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextDecorationUnitVali
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextHintingModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TextRenderingModeValidation.cs
src/Microsoft.DotNet.Wpf/src/Shared/MS/Internal/Generated/TileModeValidation.cs
-src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/PropertyHelper.cs
src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/Microsoft/Windows/Controls/Generated/TreeHelper.cs
+src/Microsoft.DotNet.Wpf/src/System.Windows.Controls.Ribbon/MS/Internal/Generated/DoubleUtil.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/Int32RectValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/PointValueSerializer.cs
src/Microsoft.DotNet.Wpf/src/WindowsBase/System/Windows/Converters/Generated/RectValueSerializer.cs
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.props b/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
index 1db2f6814..e489910ea 100644
--- a/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.props
@@ -3,8 +3,8 @@
15.0
Unicode
-
- v142
+
+ v143
10.0.19041.0
@@ -247,7 +247,7 @@
- %(AdditionalOptions) /clr:netcore
+ %(AdditionalOptions) /clr:netcore /wd4956
true
diff --git a/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets b/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets
index f1a7de9a9..ad973b351 100644
--- a/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets
+++ b/eng/WpfArcadeSdk/tools/Wpf.Cpp.targets
@@ -353,6 +353,16 @@ using namespace System::Runtime::Versioning;
+
+
+
+
+
+
diff --git a/eng/WpfArcadeSdk/tools/pre-commit.githook b/eng/WpfArcadeSdk/tools/pre-commit.githook
index b5dd329cb..c276291fa 100644
--- a/eng/WpfArcadeSdk/tools/pre-commit.githook
+++ b/eng/WpfArcadeSdk/tools/pre-commit.githook
@@ -28,7 +28,7 @@ REPO_ROOT=$(git rev-parse --show-toplevel | sort)
TEMP_FILE_FULL_PATH=$REPO_ROOT/$TEMP_FILE_NAME
# Create the temporary file containing a list of staged files(always overwrite)
-echo "$STAGED_FILES" > "$TEMP_FILE_FULL_PATH"
+echo "$STAGED_FILES" | sort > "$TEMP_FILE_FULL_PATH"
# Find any staged files that intersect with the generated file list
STAGED_GENERATED_FILES=$(comm -12 $TEMP_FILE_FULL_PATH $GENERATED_FILE_LIST)
@@ -40,8 +40,9 @@ STAGED_GENERATED_FILES=$(comm -12 $TEMP_FILE_FULL_PATH $GENERATED_FILE_LIST)
# the user from committing their change locally.
if test -n "$STAGED_GENERATED_FILES"
then
- echo "Error: WPF generated staged files detected. These files must not be modified."
+ echo "*** Commit aborted because it includes the following WPF generated staged files: "
echo "$STAGED_GENERATED_FILES"
+ echo "*** If you have generated them properly, use the '--no-verify' to override this check."
exit 1
fi
diff --git a/eng/common/SetupNugetSources.ps1 b/eng/common/SetupNugetSources.ps1
index 18823840b..6e9972394 100644
--- a/eng/common/SetupNugetSources.ps1
+++ b/eng/common/SetupNugetSources.ps1
@@ -146,22 +146,22 @@ $userName = "dn-bot"
# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Username $userName -Password $Password
+# 3.1 uses a different feed url format so it's handled differently here
$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
if ($dotnet31Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
}
-$dotnet5Source = $sources.SelectSingleNode("add[@key='dotnet5']")
-if ($dotnet5Source -ne $null) {
- AddPackageSource -Sources $sources -SourceName "dotnet5-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
- AddPackageSource -Sources $sources -SourceName "dotnet5-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet5-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
-}
+$dotnetVersions = @('5','6','7')
-$dotnet6Source = $sources.SelectSingleNode("add[@key='dotnet6']")
-if ($dotnet6Source -ne $null) {
- AddPackageSource -Sources $sources -SourceName "dotnet6-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
- AddPackageSource -Sources $sources -SourceName "dotnet6-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/dotnet6-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
+foreach ($dotnetVersion in $dotnetVersions) {
+ $feedPrefix = "dotnet" + $dotnetVersion;
+ $dotnetSource = $sources.SelectSingleNode("add[@key='$feedPrefix']")
+ if ($dotnetSource -ne $null) {
+ AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal/nuget/v2" -Creds $creds -Username $userName -Password $Password
+ AddPackageSource -Sources $sources -SourceName "$feedPrefix-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/internal/_packaging/$feedPrefix-internal-transport/nuget/v2" -Creds $creds -Username $userName -Password $Password
+ }
}
$doc.Save($filename)
diff --git a/eng/common/SetupNugetSources.sh b/eng/common/SetupNugetSources.sh
index ad3fb74fd..8af7d899d 100644
--- a/eng/common/SetupNugetSources.sh
+++ b/eng/common/SetupNugetSources.sh
@@ -105,53 +105,33 @@ if [ "$?" == "0" ]; then
PackageSources+=('dotnet3.1-internal-transport')
fi
-# Ensure dotnet5-internal and dotnet5-internal-transport are in the packageSources if the public dotnet5 feeds are present
-grep -i ""
-
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
- fi
- PackageSources+=('dotnet5-internal')
-
- grep -i "" $ConfigFile
- if [ "$?" != "0" ]; then
- echo "Adding dotnet5-internal-transport to the packageSources."
- PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
-
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
- fi
- PackageSources+=('dotnet5-internal-transport')
-fi
-
-# Ensure dotnet6-internal and dotnet6-internal-transport are in the packageSources if the public dotnet6 feeds are present
-grep -i ""
+DotNetVersions=('5' '6' '7')
+
+for DotNetVersion in ${DotNetVersions[@]} ; do
+ FeedPrefix="dotnet${DotNetVersion}";
+ grep -i ""
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=("$FeedPrefix-internal")
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
- fi
- PackageSources+=('dotnet6-internal')
+ grep -i "" $ConfigFile
+ if [ "$?" != "0" ]; then
+ echo "Adding $FeedPrefix-internal-transport to the packageSources."
+ PackageSourcesNodeFooter=""
+ PackageSourceTemplate="${TB}"
- grep -i "" $ConfigFile
- if [ "$?" != "0" ]; then
- echo "Adding dotnet6-internal-transport to the packageSources."
- PackageSourcesNodeFooter=""
- PackageSourceTemplate="${TB}"
-
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=("$FeedPrefix-internal-transport")
fi
- PackageSources+=('dotnet6-internal-transport')
-fi
+done
# I want things split line by line
PrevIFS=$IFS
diff --git a/eng/common/build.ps1 b/eng/common/build.ps1
index 8943da242..e0420a642 100644
--- a/eng/common/build.ps1
+++ b/eng/common/build.ps1
@@ -26,6 +26,7 @@ Param(
[string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '',
[switch] $excludePrereleaseVS,
+ [switch] $nativeToolsOnMachine,
[switch] $help,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$properties
)
@@ -66,6 +67,7 @@ function Print-Usage() {
Write-Host " -prepareMachine Prepare machine for CI run, clean up processes after build"
Write-Host " -warnAsError Sets warnaserror msbuild parameter ('true' or 'false')"
Write-Host " -msbuildEngine Msbuild engine to use to run build ('dotnet', 'vs', or unspecified)."
+ Write-Host " -nativeToolsOnMachine Sets the native tools on machine environment variable (indicating that the script should use native tools on machine)"
Write-Host " -excludePrereleaseVS Set to exclude build engines in prerelease versions of Visual Studio"
Write-Host ""
@@ -146,6 +148,9 @@ try {
$nodeReuse = $false
}
+ if ($nativeToolsOnMachine) {
+ $env:NativeToolsOnMachine = $true
+ }
if ($restore) {
InitializeNativeTools
}
diff --git a/eng/common/build.sh b/eng/common/build.sh
index 55b298f16..50af40cdd 100755
--- a/eng/common/build.sh
+++ b/eng/common/build.sh
@@ -19,6 +19,9 @@ usage()
echo "Actions:"
echo " --restore Restore dependencies (short: -r)"
echo " --build Build solution (short: -b)"
+ echo " --sourceBuild Source-build the solution (short: -sb)"
+ echo " Will additionally trigger the following actions: --restore, --build, --pack"
+ echo " If --configuration is not set explicitly, will also set it to 'Release'"
echo " --rebuild Rebuild solution"
echo " --test Run all unit tests in the solution (short: -t)"
echo " --integrationTest Run all integration tests in the solution"
@@ -55,6 +58,7 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
restore=false
build=false
+source_build=false
rebuild=false
test=false
integration_test=false
@@ -73,7 +77,7 @@ exclude_ci_binary_log=false
pipelines_log=false
projects=''
-configuration='Debug'
+configuration=''
prepare_machine=false
verbosity='minimal'
runtime_source_feed=''
@@ -119,6 +123,12 @@ while [[ $# > 0 ]]; do
-pack)
pack=true
;;
+ -sourcebuild|-sb)
+ build=true
+ source_build=true
+ restore=true
+ pack=true
+ ;;
-test|-t)
test=true
;;
@@ -168,6 +178,10 @@ while [[ $# > 0 ]]; do
shift
done
+if [[ -z "$configuration" ]]; then
+ if [[ "$source_build" = true ]]; then configuration="Release"; else configuration="Debug"; fi
+fi
+
if [[ "$ci" == true ]]; then
pipelines_log=true
node_reuse=false
@@ -205,6 +219,7 @@ function Build {
/p:RepoRoot="$repo_root" \
/p:Restore=$restore \
/p:Build=$build \
+ /p:ArcadeBuildFromSource=$source_build \
/p:Rebuild=$rebuild \
/p:Test=$test \
/p:Pack=$pack \
diff --git a/eng/common/cross/arm/sources.list.focal b/eng/common/cross/arm/sources.list.focal
new file mode 100644
index 000000000..4de2600c1
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.focal
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
diff --git a/eng/common/cross/arm/sources.list.jammy b/eng/common/cross/arm/sources.list.jammy
new file mode 100644
index 000000000..6bb045302
--- /dev/null
+++ b/eng/common/cross/arm/sources.list.jammy
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
diff --git a/eng/common/cross/arm/tizen-build-rootfs.sh b/eng/common/cross/arm/tizen-build-rootfs.sh
new file mode 100644
index 000000000..9fdb32e92
--- /dev/null
+++ b/eng/common/cross/arm/tizen-build-rootfs.sh
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+set -e
+
+__ARM_HARDFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
+__TIZEN_CROSSDIR="$__ARM_HARDFP_CrossDir/tizen"
+
+if [[ -z "$ROOTFS_DIR" ]]; then
+ echo "ROOTFS_DIR is not defined."
+ exit 1;
+fi
+
+TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp
+mkdir -p $TIZEN_TMP_DIR
+
+# Download files
+echo ">>Start downloading files"
+VERBOSE=1 $__ARM_HARDFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR
+echo "<>Start constructing Tizen rootfs"
+TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`
+cd $ROOTFS_DIR
+for f in $TIZEN_RPM_FILES; do
+ rpm2cpio $f | cpio -idm --quiet
+done
+echo "<>Start configuring Tizen rootfs"
+ln -sfn asm-arm ./usr/include/asm
+patch -p1 < $__TIZEN_CROSSDIR/tizen.patch
+echo "</dev/null; then
+ VERBOSE=0
+fi
+
+Log()
+{
+ if [ $VERBOSE -ge $1 ]; then
+ echo ${@:2}
+ fi
+}
+
+Inform()
+{
+ Log 1 -e "\x1B[0;34m$@\x1B[m"
+}
+
+Debug()
+{
+ Log 2 -e "\x1B[0;32m$@\x1B[m"
+}
+
+Error()
+{
+ >&2 Log 0 -e "\x1B[0;31m$@\x1B[m"
+}
+
+Fetch()
+{
+ URL=$1
+ FILE=$2
+ PROGRESS=$3
+ if [ $VERBOSE -ge 1 ] && [ $PROGRESS ]; then
+ CURL_OPT="--progress-bar"
+ else
+ CURL_OPT="--silent"
+ fi
+ curl $CURL_OPT $URL > $FILE
+}
+
+hash curl 2> /dev/null || { Error "Require 'curl' Aborting."; exit 1; }
+hash xmllint 2> /dev/null || { Error "Require 'xmllint' Aborting."; exit 1; }
+hash sha256sum 2> /dev/null || { Error "Require 'sha256sum' Aborting."; exit 1; }
+
+TMPDIR=$1
+if [ ! -d $TMPDIR ]; then
+ TMPDIR=./tizen_tmp
+ Debug "Create temporary directory : $TMPDIR"
+ mkdir -p $TMPDIR
+fi
+
+TIZEN_URL=http://download.tizen.org/snapshots/tizen
+BUILD_XML=build.xml
+REPOMD_XML=repomd.xml
+PRIMARY_XML=primary.xml
+TARGET_URL="http://__not_initialized"
+
+Xpath_get()
+{
+ XPATH_RESULT=''
+ XPATH=$1
+ XML_FILE=$2
+ RESULT=$(xmllint --xpath $XPATH $XML_FILE)
+ if [[ -z ${RESULT// } ]]; then
+ Error "Can not find target from $XML_FILE"
+ Debug "Xpath = $XPATH"
+ exit 1
+ fi
+ XPATH_RESULT=$RESULT
+}
+
+fetch_tizen_pkgs_init()
+{
+ TARGET=$1
+ PROFILE=$2
+ Debug "Initialize TARGET=$TARGET, PROFILE=$PROFILE"
+
+ TMP_PKG_DIR=$TMPDIR/tizen_${PROFILE}_pkgs
+ if [ -d $TMP_PKG_DIR ]; then rm -rf $TMP_PKG_DIR; fi
+ mkdir -p $TMP_PKG_DIR
+
+ PKG_URL=$TIZEN_URL/$PROFILE/latest
+
+ BUILD_XML_URL=$PKG_URL/$BUILD_XML
+ TMP_BUILD=$TMP_PKG_DIR/$BUILD_XML
+ TMP_REPOMD=$TMP_PKG_DIR/$REPOMD_XML
+ TMP_PRIMARY=$TMP_PKG_DIR/$PRIMARY_XML
+ TMP_PRIMARYGZ=${TMP_PRIMARY}.gz
+
+ Fetch $BUILD_XML_URL $TMP_BUILD
+
+ Debug "fetch $BUILD_XML_URL to $TMP_BUILD"
+
+ TARGET_XPATH="//build/buildtargets/buildtarget[@name=\"$TARGET\"]/repo[@type=\"binary\"]/text()"
+ Xpath_get $TARGET_XPATH $TMP_BUILD
+ TARGET_PATH=$XPATH_RESULT
+ TARGET_URL=$PKG_URL/$TARGET_PATH
+
+ REPOMD_URL=$TARGET_URL/repodata/repomd.xml
+ PRIMARY_XPATH='string(//*[local-name()="data"][@type="primary"]/*[local-name()="location"]/@href)'
+
+ Fetch $REPOMD_URL $TMP_REPOMD
+
+ Debug "fetch $REPOMD_URL to $TMP_REPOMD"
+
+ Xpath_get $PRIMARY_XPATH $TMP_REPOMD
+ PRIMARY_XML_PATH=$XPATH_RESULT
+ PRIMARY_URL=$TARGET_URL/$PRIMARY_XML_PATH
+
+ Fetch $PRIMARY_URL $TMP_PRIMARYGZ
+
+ Debug "fetch $PRIMARY_URL to $TMP_PRIMARYGZ"
+
+ gunzip $TMP_PRIMARYGZ
+
+ Debug "unzip $TMP_PRIMARYGZ to $TMP_PRIMARY"
+}
+
+fetch_tizen_pkgs()
+{
+ ARCH=$1
+ PACKAGE_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="location"]/@href)'
+
+ PACKAGE_CHECKSUM_XPATH_TPL='string(//*[local-name()="metadata"]/*[local-name()="package"][*[local-name()="name"][text()="_PKG_"]][*[local-name()="arch"][text()="_ARCH_"]]/*[local-name()="checksum"]/text())'
+
+ for pkg in ${@:2}
+ do
+ Inform "Fetching... $pkg"
+ XPATH=${PACKAGE_XPATH_TPL/_PKG_/$pkg}
+ XPATH=${XPATH/_ARCH_/$ARCH}
+ Xpath_get $XPATH $TMP_PRIMARY
+ PKG_PATH=$XPATH_RESULT
+
+ XPATH=${PACKAGE_CHECKSUM_XPATH_TPL/_PKG_/$pkg}
+ XPATH=${XPATH/_ARCH_/$ARCH}
+ Xpath_get $XPATH $TMP_PRIMARY
+ CHECKSUM=$XPATH_RESULT
+
+ PKG_URL=$TARGET_URL/$PKG_PATH
+ PKG_FILE=$(basename $PKG_PATH)
+ PKG_PATH=$TMPDIR/$PKG_FILE
+
+ Debug "Download $PKG_URL to $PKG_PATH"
+ Fetch $PKG_URL $PKG_PATH true
+
+ echo "$CHECKSUM $PKG_PATH" | sha256sum -c - > /dev/null
+ if [ $? -ne 0 ]; then
+ Error "Fail to fetch $PKG_URL to $PKG_PATH"
+ Debug "Checksum = $CHECKSUM"
+ exit 1
+ fi
+ done
+}
+
+Inform "Initialize arm base"
+fetch_tizen_pkgs_init standard base
+Inform "fetch common packages"
+fetch_tizen_pkgs armv7hl gcc gcc-devel-static glibc glibc-devel libicu libicu-devel libatomic linux-glibc-devel keyutils keyutils-devel libkeyutils
+Inform "fetch coreclr packages"
+fetch_tizen_pkgs armv7hl lldb lldb-devel libgcc libstdc++ libstdc++-devel libunwind libunwind-devel lttng-ust-devel lttng-ust userspace-rcu-devel userspace-rcu
+Inform "fetch corefx packages"
+fetch_tizen_pkgs armv7hl libcom_err libcom_err-devel zlib zlib-devel libopenssl11 libopenssl1.1-devel krb5 krb5-devel
+
+Inform "Initialize standard unified"
+fetch_tizen_pkgs_init standard unified
+Inform "fetch corefx packages"
+fetch_tizen_pkgs armv7hl gssdp gssdp-devel tizen-release
+
diff --git a/eng/common/cross/arm/tizen/tizen.patch b/eng/common/cross/arm/tizen/tizen.patch
new file mode 100644
index 000000000..fb12ade72
--- /dev/null
+++ b/eng/common/cross/arm/tizen/tizen.patch
@@ -0,0 +1,9 @@
+diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
+--- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900
++++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900
+@@ -2,4 +2,4 @@
+ Use the shared library, but some functions are only in
+ the static library, so try that secondarily. */
+ OUTPUT_FORMAT(elf32-littlearm)
+-GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) )
++GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-armhf.so.3 ) )
diff --git a/eng/common/cross/arm64/sources.list.focal b/eng/common/cross/arm64/sources.list.focal
new file mode 100644
index 000000000..4de2600c1
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.focal
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe multiverse
diff --git a/eng/common/cross/arm64/sources.list.jammy b/eng/common/cross/arm64/sources.list.jammy
new file mode 100644
index 000000000..6bb045302
--- /dev/null
+++ b/eng/common/cross/arm64/sources.list.jammy
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ jammy-security main restricted universe multiverse
diff --git a/eng/common/cross/armv6/sources.list.buster b/eng/common/cross/armv6/sources.list.buster
new file mode 100644
index 000000000..f27fc4fb3
--- /dev/null
+++ b/eng/common/cross/armv6/sources.list.buster
@@ -0,0 +1,2 @@
+deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
+deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
diff --git a/eng/common/cross/build-rootfs.sh b/eng/common/cross/build-rootfs.sh
index 5c05b39f1..5680980fa 100755
--- a/eng/common/cross/build-rootfs.sh
+++ b/eng/common/cross/build-rootfs.sh
@@ -4,22 +4,27 @@ set -e
usage()
{
- echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [--skipunmount] --rootfsdir ]"
- echo "BuildArch can be: arm(default), armel, arm64, x86"
- echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.9 or alpine3.13. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
- echo " for FreeBSD can be: freebsd11, freebsd12, freebsd13"
- echo " for illumos can be: illumos."
+ echo "Usage: $0 [BuildArch] [CodeName] [lldbx.y] [llvmx[.y]] [--skipunmount] --rootfsdir ]"
+ echo "BuildArch can be: arm(default), arm64, armel, armv6, ppc64le, riscv64, s390x, x64, x86"
+ echo "CodeName - optional, Code name for Linux, can be: xenial(default), zesty, bionic, alpine, alpine3.13 or alpine3.14. If BuildArch is armel, LinuxCodeName is jessie(default) or tizen."
+ echo " for FreeBSD can be: freebsd12, freebsd13"
+ echo " for illumos can be: illumos"
+ echo " for Haiku can be: haiku."
echo "lldbx.y - optional, LLDB version, can be: lldb3.9(default), lldb4.0, lldb5.0, lldb6.0 no-lldb. Ignored for alpine and FreeBSD"
+ echo "llvmx[.y] - optional, LLVM version for LLVM related packages."
echo "--skipunmount - optional, will skip the unmount of rootfs folder."
echo "--use-mirror - optional, use mirror URL to fetch resources, when available."
+ echo "--jobs N - optional, restrict to N jobs."
exit 1
}
__CodeName=xenial
__CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
-__InitialDir=$PWD
__BuildArch=arm
__AlpineArch=armv7
+__FreeBSDArch=arm
+__FreeBSDMachineArch=armv7
+__IllumosArch=arm7
__QEMUArch=arm
__UbuntuArch=armhf
__UbuntuRepo="http://ports.ubuntu.com/"
@@ -32,14 +37,14 @@ __UbuntuPackages="build-essential"
__AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
__AlpinePackages+=" linux-headers"
-__AlpinePackagesEdgeCommunity=" lldb-dev"
-__AlpinePackagesEdgeMain+=" python3"
-__AlpinePackagesEdgeMain+=" libedit"
+__AlpinePackages+=" lldb-dev"
+__AlpinePackages+=" python3"
+__AlpinePackages+=" libedit"
# symlinks fixer
__UbuntuPackages+=" symlinks"
-# CoreCLR and CoreFX dependencies
+# runtime dependencies
__UbuntuPackages+=" libicu-dev"
__UbuntuPackages+=" liblttng-ust-dev"
__UbuntuPackages+=" libunwind8-dev"
@@ -48,8 +53,9 @@ __AlpinePackages+=" gettext-dev"
__AlpinePackages+=" icu-dev"
__AlpinePackages+=" libunwind-dev"
__AlpinePackages+=" lttng-ust-dev"
+__AlpinePackages+=" compiler-rt-static"
-# CoreFX dependencies
+# runtime libraries' dependencies
__UbuntuPackages+=" libcurl4-openssl-dev"
__UbuntuPackages+=" libkrb5-dev"
__UbuntuPackages+=" libssl-dev"
@@ -60,36 +66,48 @@ __AlpinePackages+=" krb5-dev"
__AlpinePackages+=" openssl-dev"
__AlpinePackages+=" zlib-dev"
-__FreeBSDBase="12.2-RELEASE"
-__FreeBSDPkg="1.12.0"
+__FreeBSDBase="12.3-RELEASE"
+__FreeBSDPkg="1.17.0"
__FreeBSDABI="12"
__FreeBSDPackages="libunwind"
__FreeBSDPackages+=" icu"
__FreeBSDPackages+=" libinotify"
-__FreeBSDPackages+=" lttng-ust"
+__FreeBSDPackages+=" openssl"
__FreeBSDPackages+=" krb5"
__FreeBSDPackages+=" terminfo-db"
-__IllumosPackages="icu-64.2nb2"
-__IllumosPackages+=" mit-krb5-1.16.2nb4"
-__IllumosPackages+=" openssl-1.1.1e"
-__IllumosPackages+=" zlib-1.2.11"
+__IllumosPackages="icu"
+__IllumosPackages+=" mit-krb5"
+__IllumosPackages+=" openssl"
+__IllumosPackages+=" zlib"
+
+__HaikuPackages="gmp"
+__HaikuPackages+=" gmp_devel"
+__HaikuPackages+=" krb5"
+__HaikuPackages+=" krb5_devel"
+__HaikuPackages+=" libiconv"
+__HaikuPackages+=" libiconv_devel"
+__HaikuPackages+=" llvm12_libunwind"
+__HaikuPackages+=" llvm12_libunwind_devel"
+__HaikuPackages+=" mpfr"
+__HaikuPackages+=" mpfr_devel"
# ML.NET dependencies
__UbuntuPackages+=" libomp5"
__UbuntuPackages+=" libomp-dev"
+__Keyring=
__UseMirror=0
__UnprocessedBuildArgs=
while :; do
- if [ $# -le 0 ]; then
+ if [[ "$#" -le 0 ]]; then
break
fi
- lowerI="$(echo $1 | tr "[:upper:]" "[:lower:]")"
+ lowerI="$(echo "$1" | tr "[:upper:]" "[:lower:]")"
case $lowerI in
- -?|-h|--help)
+ -\?|-h|--help)
usage
exit 1
;;
@@ -104,6 +122,8 @@ while :; do
__UbuntuArch=arm64
__AlpineArch=aarch64
__QEMUArch=aarch64
+ __FreeBSDArch=arm64
+ __FreeBSDMachineArch=aarch64
;;
armel)
__BuildArch=armel
@@ -111,6 +131,39 @@ while :; do
__UbuntuRepo="http://ftp.debian.org/debian/"
__CodeName=jessie
;;
+ armv6)
+ __BuildArch=armv6
+ __UbuntuArch=armhf
+ __QEMUArch=arm
+ __UbuntuRepo="http://raspbian.raspberrypi.org/raspbian/"
+ __CodeName=buster
+ __LLDB_Package="liblldb-6.0-dev"
+
+ if [[ -e "/usr/share/keyrings/raspbian-archive-keyring.gpg" ]]; then
+ __Keyring="--keyring /usr/share/keyrings/raspbian-archive-keyring.gpg"
+ fi
+ ;;
+ ppc64le)
+ __BuildArch=ppc64le
+ __UbuntuArch=ppc64el
+ __UbuntuRepo="http://ports.ubuntu.com/ubuntu-ports/"
+ __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
+ __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp-dev//')
+ __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//')
+ unset __LLDB_Package
+ ;;
+ riscv64)
+ __BuildArch=riscv64
+ __UbuntuArch=riscv64
+ __UbuntuRepo="http://deb.debian.org/debian-ports"
+ __CodeName=sid
+ __UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libunwind8-dev//')
+ unset __LLDB_Package
+
+ if [[ -e "/usr/share/keyrings/debian-ports-archive-keyring.gpg" ]]; then
+ __Keyring="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --include=debian-ports-archive-keyring"
+ fi
+ ;;
s390x)
__BuildArch=s390x
__UbuntuArch=s390x
@@ -120,47 +173,69 @@ while :; do
__UbuntuPackages=$(echo ${__UbuntuPackages} | sed 's/ libomp5//')
unset __LLDB_Package
;;
+ x64)
+ __BuildArch=x64
+ __UbuntuArch=amd64
+ __FreeBSDArch=amd64
+ __FreeBSDMachineArch=amd64
+ __illumosArch=x86_64
+ __UbuntuRepo=
+ ;;
x86)
__BuildArch=x86
__UbuntuArch=i386
__UbuntuRepo="http://archive.ubuntu.com/ubuntu/"
;;
- lldb3.6)
- __LLDB_Package="lldb-3.6-dev"
- ;;
- lldb3.8)
- __LLDB_Package="lldb-3.8-dev"
- ;;
- lldb3.9)
- __LLDB_Package="liblldb-3.9-dev"
- ;;
- lldb4.0)
- __LLDB_Package="liblldb-4.0-dev"
- ;;
- lldb5.0)
- __LLDB_Package="liblldb-5.0-dev"
- ;;
- lldb6.0)
- __LLDB_Package="liblldb-6.0-dev"
+ lldb*)
+ version="${lowerI/lldb/}"
+ parts=(${version//./ })
+
+ # for versions > 6.0, lldb has dropped the minor version
+ if [[ "${parts[0]}" -gt 6 ]]; then
+ version="${parts[0]}"
+ fi
+
+ __LLDB_Package="liblldb-${version}-dev"
;;
no-lldb)
unset __LLDB_Package
;;
+ llvm*)
+ version="${lowerI/llvm/}"
+ parts=(${version//./ })
+ __LLVM_MajorVersion="${parts[0]}"
+ __LLVM_MinorVersion="${parts[1]}"
+
+ # for versions > 6.0, llvm has dropped the minor version
+ if [[ -z "$__LLVM_MinorVersion" && "$__LLVM_MajorVersion" -le 6 ]]; then
+ __LLVM_MinorVersion=0;
+ fi
+ ;;
xenial) # Ubuntu 16.04
- if [ "$__CodeName" != "jessie" ]; then
+ if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=xenial
fi
;;
zesty) # Ubuntu 17.04
- if [ "$__CodeName" != "jessie" ]; then
+ if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=zesty
fi
;;
bionic) # Ubuntu 18.04
- if [ "$__CodeName" != "jessie" ]; then
+ if [[ "$__CodeName" != "jessie" ]]; then
__CodeName=bionic
fi
;;
+ focal) # Ubuntu 20.04
+ if [[ "$__CodeName" != "jessie" ]]; then
+ __CodeName=focal
+ fi
+ ;;
+ jammy) # Ubuntu 22.04
+ if [[ "$__CodeName" != "jessie" ]]; then
+ __CodeName=jammy
+ fi
+ ;;
jessie) # Debian 8
__CodeName=jessie
__UbuntuRepo="http://ftp.debian.org/debian/"
@@ -176,51 +251,38 @@ while :; do
__LLDB_Package="liblldb-6.0-dev"
;;
tizen)
- if [ "$__BuildArch" != "armel" ] && [ "$__BuildArch" != "arm64" ]; then
- echo "Tizen is available only for armel and arm64."
- usage;
- exit 1;
- fi
__CodeName=
__UbuntuRepo=
__Tizen=tizen
;;
- alpine|alpine3.9)
+ alpine|alpine3.13)
__CodeName=alpine
__UbuntuRepo=
- __AlpineVersion=3.9
- __AlpinePackagesEdgeMain+=" llvm11-libs"
- __AlpinePackagesEdgeMain+=" clang-libs"
+ __AlpineVersion=3.13
+ __AlpinePackages+=" llvm10-libs"
;;
- alpine3.13)
+ alpine3.14)
__CodeName=alpine
__UbuntuRepo=
- __AlpineVersion=3.13
- # Alpine 3.13 has all the packages we need in the 3.13 repository
- __AlpinePackages+=$__AlpinePackagesEdgeCommunity
- __AlpinePackagesEdgeCommunity=
- __AlpinePackages+=$__AlpinePackagesEdgeMain
- __AlpinePackagesEdgeMain=
- __AlpinePackages+=" llvm10-libs"
+ __AlpineVersion=3.14
+ __AlpinePackages+=" llvm11-libs"
;;
- freebsd11)
- __FreeBSDBase="11.3-RELEASE"
- __FreeBSDABI="11"
- ;&
freebsd12)
__CodeName=freebsd
- __BuildArch=x64
__SkipUnmount=1
;;
freebsd13)
__CodeName=freebsd
__FreeBSDBase="13.0-RELEASE"
__FreeBSDABI="13"
- __BuildArch=x64
__SkipUnmount=1
;;
illumos)
__CodeName=illumos
+ __SkipUnmount=1
+ ;;
+ haiku)
+ __CodeName=haiku
__BuildArch=x64
__SkipUnmount=1
;;
@@ -229,11 +291,15 @@ while :; do
;;
--rootfsdir|-rootfsdir)
shift
- __RootfsDir=$1
+ __RootfsDir="$1"
;;
--use-mirror)
__UseMirror=1
;;
+ --use-jobs)
+ shift
+ MAXJOBS=$1
+ ;;
*)
__UnprocessedBuildArgs="$__UnprocessedBuildArgs $1"
;;
@@ -242,85 +308,76 @@ while :; do
shift
done
-if [ "$__BuildArch" == "armel" ]; then
+if [[ "$__BuildArch" == "armel" ]]; then
__LLDB_Package="lldb-3.5-dev"
fi
+
__UbuntuPackages+=" ${__LLDB_Package:-}"
-if [ -z "$__RootfsDir" ] && [ ! -z "$ROOTFS_DIR" ]; then
- __RootfsDir=$ROOTFS_DIR
+if [[ -n "$__LLVM_MajorVersion" ]]; then
+ __UbuntuPackages+=" libclang-common-${__LLVM_MajorVersion}${__LLVM_MinorVersion:+.$__LLVM_MinorVersion}-dev"
fi
-if [ -z "$__RootfsDir" ]; then
+if [[ -z "$__RootfsDir" && -n "$ROOTFS_DIR" ]]; then
+ __RootfsDir="$ROOTFS_DIR"
+fi
+
+if [[ -z "$__RootfsDir" ]]; then
__RootfsDir="$__CrossDir/../../../.tools/rootfs/$__BuildArch"
fi
-if [ -d "$__RootfsDir" ]; then
- if [ $__SkipUnmount == 0 ]; then
- umount $__RootfsDir/* || true
+if [[ -d "$__RootfsDir" ]]; then
+ if [[ "$__SkipUnmount" == "0" ]]; then
+ umount "$__RootfsDir"/* || true
fi
- rm -rf $__RootfsDir
+ rm -rf "$__RootfsDir"
fi
-mkdir -p $__RootfsDir
+mkdir -p "$__RootfsDir"
__RootfsDir="$( cd "$__RootfsDir" && pwd )"
if [[ "$__CodeName" == "alpine" ]]; then
__ApkToolsVersion=2.9.1
- __ApkToolsDir=$(mktemp -d)
- wget https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -P $__ApkToolsDir
- tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
- mkdir -p $__RootfsDir/usr/bin
- cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
-
- $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
- -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
- -X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
- -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
- add $__AlpinePackages
-
- if [[ -n "$__AlpinePackagesEdgeMain" ]]; then
- $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
- -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
- add $__AlpinePackagesEdgeMain
- fi
+ __ApkToolsDir="$(mktemp -d)"
+ wget "https://github.com/alpinelinux/apk-tools/releases/download/v$__ApkToolsVersion/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz" -P "$__ApkToolsDir"
+ tar -xf "$__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz" -C "$__ApkToolsDir"
+ mkdir -p "$__RootfsDir"/usr/bin
+ cp -v "/usr/bin/qemu-$__QEMUArch-static" "$__RootfsDir/usr/bin"
- if [[ -n "$__AlpinePackagesEdgeCommunity" ]]; then
- $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/community \
- -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
- add $__AlpinePackagesEdgeCommunity
- fi
+ "$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk" \
+ -X "http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main" \
+ -X "http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community" \
+ -U --allow-untrusted --root "$__RootfsDir" --arch "$__AlpineArch" --initdb \
+ add $__AlpinePackages
- rm -r $__ApkToolsDir
+ rm -r "$__ApkToolsDir"
elif [[ "$__CodeName" == "freebsd" ]]; then
- mkdir -p $__RootfsDir/usr/local/etc
- JOBS="$(getconf _NPROCESSORS_ONLN)"
- wget -O - https://download.freebsd.org/ftp/releases/amd64/${__FreeBSDBase}/base.txz | tar -C $__RootfsDir -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
- echo "ABI = \"FreeBSD:${__FreeBSDABI}:amd64\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > ${__RootfsDir}/usr/local/etc/pkg.conf
- echo "FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > ${__RootfsDir}/etc/pkg/FreeBSD.conf
- mkdir -p $__RootfsDir/tmp
+ mkdir -p "$__RootfsDir"/usr/local/etc
+ JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
+ wget -O - "https://download.freebsd.org/ftp/releases/${__FreeBSDArch}/${__FreeBSDMachineArch}/${__FreeBSDBase}/base.txz" | tar -C "$__RootfsDir" -Jxf - ./lib ./usr/lib ./usr/libdata ./usr/include ./usr/share/keys ./etc ./bin/freebsd-version
+ echo "ABI = \"FreeBSD:${__FreeBSDABI}:${__FreeBSDMachineArch}\"; FINGERPRINTS = \"${__RootfsDir}/usr/share/keys\"; REPOS_DIR = [\"${__RootfsDir}/etc/pkg\"]; REPO_AUTOUPDATE = NO; RUN_SCRIPTS = NO;" > "${__RootfsDir}"/usr/local/etc/pkg.conf
+ echo "FreeBSD: { url: \"pkg+http://pkg.FreeBSD.org/\${ABI}/quarterly\", mirror_type: \"srv\", signature_type: \"fingerprints\", fingerprints: \"${__RootfsDir}/usr/share/keys/pkg\", enabled: yes }" > "${__RootfsDir}"/etc/pkg/FreeBSD.conf
+ mkdir -p "$__RootfsDir"/tmp
# get and build package manager
- wget -O - https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz | tar -C $__RootfsDir/tmp -zxf -
- cd $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
+ wget -O - "https://github.com/freebsd/pkg/archive/${__FreeBSDPkg}.tar.gz" | tar -C "$__RootfsDir"/tmp -zxf -
+ cd "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}"
# needed for install to succeed
- mkdir -p $__RootfsDir/host/etc
- ./autogen.sh && ./configure --prefix=$__RootfsDir/host && make -j "$JOBS" && make install
- rm -rf $__RootfsDir/tmp/pkg-${__FreeBSDPkg}
+ mkdir -p "$__RootfsDir"/host/etc
+ ./autogen.sh && ./configure --prefix="$__RootfsDir"/host && make -j "$JOBS" && make install
+ rm -rf "$__RootfsDir/tmp/pkg-${__FreeBSDPkg}"
# install packages we need.
- INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf update
- INSTALL_AS_USER=$(whoami) $__RootfsDir/host/sbin/pkg -r $__RootfsDir -C $__RootfsDir/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
+ INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf update
+ INSTALL_AS_USER=$(whoami) "$__RootfsDir"/host/sbin/pkg -r "$__RootfsDir" -C "$__RootfsDir"/usr/local/etc/pkg.conf install --yes $__FreeBSDPackages
elif [[ "$__CodeName" == "illumos" ]]; then
mkdir "$__RootfsDir/tmp"
pushd "$__RootfsDir/tmp"
- JOBS="$(getconf _NPROCESSORS_ONLN)"
+ JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
echo "Downloading sysroot."
wget -O - https://github.com/illumos/sysroot/releases/download/20181213-de6af22ae73b-v1/illumos-sysroot-i386-20181213-de6af22ae73b-v1.tar.gz | tar -C "$__RootfsDir" -xzf -
echo "Building binutils. Please wait.."
wget -O - https://ftp.gnu.org/gnu/binutils/binutils-2.33.1.tar.bz2 | tar -xjf -
mkdir build-binutils && cd build-binutils
- ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="x86_64-sun-solaris2.10" --program-prefix="x86_64-illumos-" --with-sysroot="$__RootfsDir"
+ ../binutils-2.33.1/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir"
make -j "$JOBS" && make install && cd ..
echo "Building gcc. Please wait.."
wget -O - https://ftp.gnu.org/gnu/gcc/gcc-8.4.0/gcc-8.4.0.tar.xz | tar -xJf -
@@ -330,7 +387,7 @@ elif [[ "$__CodeName" == "illumos" ]]; then
CFLAGS_FOR_TARGET="-fPIC"
export CFLAGS CXXFLAGS CXXFLAGS_FOR_TARGET CFLAGS_FOR_TARGET
mkdir build-gcc && cd build-gcc
- ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="x86_64-sun-solaris2.10" --program-prefix="x86_64-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \
+ ../gcc-8.4.0/configure --prefix="$__RootfsDir" --target="${__illumosArch}-sun-solaris2.10" --program-prefix="${__illumosArch}-illumos-" --with-sysroot="$__RootfsDir" --with-gnu-as \
--with-gnu-ld --disable-nls --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libcilkrts --disable-libada --disable-libsanitizer \
--disable-libquadmath-support --disable-shared --enable-tls
make -j "$JOBS" && make install && cd ..
@@ -338,14 +395,18 @@ elif [[ "$__CodeName" == "illumos" ]]; then
if [[ "$__UseMirror" == 1 ]]; then
BaseUrl=http://pkgsrc.smartos.skylime.net
fi
- BaseUrl="$BaseUrl"/packages/SmartOS/2020Q1/x86_64/All
+ BaseUrl="$BaseUrl/packages/SmartOS/trunk/${__illumosArch}/All"
+ echo "Downloading manifest"
+ wget "$BaseUrl"
echo "Downloading dependencies."
read -ra array <<<"$__IllumosPackages"
for package in "${array[@]}"; do
- echo "Installing $package..."
+ echo "Installing '$package'"
+ package="$(grep ">$package-[0-9]" All | sed -En 's/.*href="(.*)\.tgz".*/\1/p')"
+ echo "Resolved name '$package'"
wget "$BaseUrl"/"$package".tgz
ar -x "$package".tgz
- tar --skip-old-files -xzf "$package".tmp.tgz -C "$__RootfsDir" 2>/dev/null
+ tar --skip-old-files -xzf "$package".tmp.tg* -C "$__RootfsDir" 2>/dev/null
done
echo "Cleaning up temporary files."
popd
@@ -356,26 +417,90 @@ elif [[ "$__CodeName" == "illumos" ]]; then
wget -P "$__RootfsDir"/usr/include/net https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/io/bpf/net/dlt.h
wget -P "$__RootfsDir"/usr/include/netpacket https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/inet/sockmods/netpacket/packet.h
wget -P "$__RootfsDir"/usr/include/sys https://raw.githubusercontent.com/illumos/illumos-gate/master/usr/src/uts/common/sys/sdt.h
-elif [[ -n $__CodeName ]]; then
- qemu-debootstrap --arch $__UbuntuArch $__CodeName $__RootfsDir $__UbuntuRepo
- cp $__CrossDir/$__BuildArch/sources.list.$__CodeName $__RootfsDir/etc/apt/sources.list
- chroot $__RootfsDir apt-get update
- chroot $__RootfsDir apt-get -f -y install
- chroot $__RootfsDir apt-get -y install $__UbuntuPackages
- chroot $__RootfsDir symlinks -cr /usr
- chroot $__RootfsDir apt-get clean
-
- if [ $__SkipUnmount == 0 ]; then
- umount $__RootfsDir/* || true
+elif [[ "$__CodeName" == "haiku" ]]; then
+ JOBS=${MAXJOBS:="$(getconf _NPROCESSORS_ONLN)"}
+
+ echo "Building Haiku sysroot for x86_64"
+ mkdir -p "$__RootfsDir/tmp"
+ cd "$__RootfsDir/tmp"
+ git clone -b hrev56235 https://review.haiku-os.org/haiku
+ git clone -b btrev43195 https://review.haiku-os.org/buildtools
+ cd "$__RootfsDir/tmp/buildtools" && git checkout 7487388f5110021d400b9f3b88e1a7f310dc066d
+
+ # Fetch some unmerged patches
+ cd "$__RootfsDir/tmp/haiku"
+ ## Add development build profile (slimmer than nightly)
+ git fetch origin refs/changes/64/4164/1 && git -c commit.gpgsign=false cherry-pick FETCH_HEAD
+
+ # Build jam
+ cd "$__RootfsDir/tmp/buildtools/jam"
+ make
+
+ # Configure cross tools
+ echo "Building cross-compiler"
+ mkdir -p "$__RootfsDir/generated"
+ cd "$__RootfsDir/generated"
+ "$__RootfsDir/tmp/haiku/configure" -j"$JOBS" --sysroot "$__RootfsDir" --cross-tools-source "$__RootfsDir/tmp/buildtools" --build-cross-tools x86_64
+
+ # Build Haiku packages
+ echo "Building Haiku"
+ echo 'HAIKU_BUILD_PROFILE = "development-raw" ;' > UserProfileConfig
+ "$__RootfsDir/tmp/buildtools/jam/jam0" -j"$JOBS" -q 'package' 'Haiku'
+
+ BaseUrl="https://depot.haiku-os.org/__api/v2/pkg/get-pkg"
+
+ # Download additional packages
+ echo "Downloading additional required packages"
+ read -ra array <<<"$__HaikuPackages"
+ for package in "${array[@]}"; do
+ echo "Downloading $package..."
+ # API documented here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L60
+ # The schema here: https://github.com/haiku/haikudepotserver/blob/master/haikudepotserver-api2/src/main/resources/api2/pkg.yaml#L598
+ hpkgDownloadUrl="$(wget -qO- --post-data='{"name":"'"$package"'","repositorySourceCode":"haikuports_x86_64","versionType":"LATEST","naturalLanguageCode":"en"}' \
+ --header='Content-Type:application/json' "$BaseUrl" | jq -r '.result.versions[].hpkgDownloadURL')"
+ wget -P "$__RootfsDir/generated/download" "$hpkgDownloadUrl"
+ done
+
+ # Setup the sysroot
+ echo "Setting up sysroot and extracting needed packages"
+ mkdir -p "$__RootfsDir/boot/system"
+ for file in "$__RootfsDir/generated/objects/haiku/x86_64/packaging/packages/"*.hpkg; do
+ "$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file"
+ done
+ for file in "$__RootfsDir/generated/download/"*.hpkg; do
+ "$__RootfsDir/generated/objects/linux/x86_64/release/tools/package/package" extract -C "$__RootfsDir/boot/system" "$file"
+ done
+
+ # Cleaning up temporary files
+ echo "Cleaning up temporary files"
+ rm -rf "$__RootfsDir/tmp"
+ for name in "$__RootfsDir/generated/"*; do
+ if [[ "$name" =~ "cross-tools-" ]]; then
+ : # Keep the cross-compiler
+ else
+ rm -rf "$name"
+ fi
+ done
+elif [[ -n "$__CodeName" ]]; then
+ qemu-debootstrap $__Keyring --arch "$__UbuntuArch" "$__CodeName" "$__RootfsDir" "$__UbuntuRepo"
+ cp "$__CrossDir/$__BuildArch/sources.list.$__CodeName" "$__RootfsDir/etc/apt/sources.list"
+ chroot "$__RootfsDir" apt-get update
+ chroot "$__RootfsDir" apt-get -f -y install
+ chroot "$__RootfsDir" apt-get -y install $__UbuntuPackages
+ chroot "$__RootfsDir" symlinks -cr /usr
+ chroot "$__RootfsDir" apt-get clean
+
+ if [[ "$__SkipUnmount" == "0" ]]; then
+ umount "$__RootfsDir"/* || true
fi
if [[ "$__BuildArch" == "armel" && "$__CodeName" == "jessie" ]]; then
- pushd $__RootfsDir
- patch -p1 < $__CrossDir/$__BuildArch/armel.jessie.patch
+ pushd "$__RootfsDir"
+ patch -p1 < "$__CrossDir/$__BuildArch/armel.jessie.patch"
popd
fi
elif [[ "$__Tizen" == "tizen" ]]; then
- ROOTFS_DIR=$__RootfsDir $__CrossDir/$__BuildArch/tizen-build-rootfs.sh
+ ROOTFS_DIR="$__RootfsDir" "$__CrossDir/$__BuildArch/tizen-build-rootfs.sh"
else
echo "Unsupported target platform."
usage;
diff --git a/eng/common/cross/ppc64le/sources.list.bionic b/eng/common/cross/ppc64le/sources.list.bionic
new file mode 100644
index 000000000..210955740
--- /dev/null
+++ b/eng/common/cross/ppc64le/sources.list.bionic
@@ -0,0 +1,11 @@
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
+
+deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
+deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
diff --git a/eng/common/cross/riscv64/sources.list.sid b/eng/common/cross/riscv64/sources.list.sid
new file mode 100644
index 000000000..65f730d22
--- /dev/null
+++ b/eng/common/cross/riscv64/sources.list.sid
@@ -0,0 +1 @@
+deb http://deb.debian.org/debian-ports sid main
diff --git a/eng/common/cross/toolchain.cmake b/eng/common/cross/toolchain.cmake
index fc11001aa..964610524 100644
--- a/eng/common/cross/toolchain.cmake
+++ b/eng/common/cross/toolchain.cmake
@@ -1,23 +1,34 @@
set(CROSS_ROOTFS $ENV{ROOTFS_DIR})
+# reset platform variables (e.g. cmake 3.25 sets LINUX=1)
+unset(LINUX)
+unset(FREEBSD)
+unset(ILLUMOS)
+unset(ANDROID)
+unset(TIZEN)
+
set(TARGET_ARCH_NAME $ENV{TARGET_BUILD_ARCH})
if(EXISTS ${CROSS_ROOTFS}/bin/freebsd-version)
set(CMAKE_SYSTEM_NAME FreeBSD)
+ set(FREEBSD 1)
elseif(EXISTS ${CROSS_ROOTFS}/usr/platform/i86pc)
set(CMAKE_SYSTEM_NAME SunOS)
set(ILLUMOS 1)
+elseif(EXISTS ${CROSS_ROOTFS}/boot/system/develop/headers/config/HaikuConfig.h)
+ set(CMAKE_SYSTEM_NAME Haiku)
else()
set(CMAKE_SYSTEM_NAME Linux)
+ set(LINUX 1)
endif()
set(CMAKE_SYSTEM_VERSION 1)
-if(TARGET_ARCH_NAME STREQUAL "armel")
- set(CMAKE_SYSTEM_PROCESSOR armv7l)
- set(TOOLCHAIN "arm-linux-gnueabi")
- if("$ENV{__DistroRid}" MATCHES "tizen.*")
- set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0")
- endif()
-elseif(TARGET_ARCH_NAME STREQUAL "arm")
+if(EXISTS ${CROSS_ROOTFS}/etc/tizen-release)
+ set(TIZEN 1)
+elseif(EXISTS ${CROSS_ROOTFS}/android_platform)
+ set(ANDROID 1)
+endif()
+
+if(TARGET_ARCH_NAME STREQUAL "arm")
set(CMAKE_SYSTEM_PROCESSOR armv7l)
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv7-alpine-linux-musleabihf)
set(TOOLCHAIN "armv7-alpine-linux-musleabihf")
@@ -26,30 +37,65 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm")
else()
set(TOOLCHAIN "arm-linux-gnueabihf")
endif()
+ if(TIZEN)
+ set(TIZEN_TOOLCHAIN "armv7hl-tizen-linux-gnueabihf/9.2.0")
+ endif()
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
set(CMAKE_SYSTEM_PROCESSOR aarch64)
if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/aarch64-alpine-linux-musl)
set(TOOLCHAIN "aarch64-alpine-linux-musl")
- else()
+ elseif(LINUX)
set(TOOLCHAIN "aarch64-linux-gnu")
+ if(TIZEN)
+ set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0")
+ endif()
+ elseif(FREEBSD)
+ set(triple "aarch64-unknown-freebsd12")
endif()
- if("$ENV{__DistroRid}" MATCHES "tizen.*")
- set(TIZEN_TOOLCHAIN "aarch64-tizen-linux-gnu/9.2.0")
+elseif(TARGET_ARCH_NAME STREQUAL "armel")
+ set(CMAKE_SYSTEM_PROCESSOR armv7l)
+ set(TOOLCHAIN "arm-linux-gnueabi")
+ if(TIZEN)
+ set(TIZEN_TOOLCHAIN "armv7l-tizen-linux-gnueabi/9.2.0")
endif()
+elseif(TARGET_ARCH_NAME STREQUAL "armv6")
+ set(CMAKE_SYSTEM_PROCESSOR armv6l)
+ if(EXISTS ${CROSS_ROOTFS}/usr/lib/gcc/armv6-alpine-linux-musleabihf)
+ set(TOOLCHAIN "armv6-alpine-linux-musleabihf")
+ else()
+ set(TOOLCHAIN "arm-linux-gnueabihf")
+ endif()
+elseif(TARGET_ARCH_NAME STREQUAL "ppc64le")
+ set(CMAKE_SYSTEM_PROCESSOR ppc64le)
+ set(TOOLCHAIN "powerpc64le-linux-gnu")
+elseif(TARGET_ARCH_NAME STREQUAL "riscv64")
+ set(CMAKE_SYSTEM_PROCESSOR riscv64)
+ set(TOOLCHAIN "riscv64-linux-gnu")
elseif(TARGET_ARCH_NAME STREQUAL "s390x")
set(CMAKE_SYSTEM_PROCESSOR s390x)
set(TOOLCHAIN "s390x-linux-gnu")
+elseif(TARGET_ARCH_NAME STREQUAL "x64")
+ set(CMAKE_SYSTEM_PROCESSOR x86_64)
+ if(LINUX)
+ set(TOOLCHAIN "x86_64-linux-gnu")
+ if(TIZEN)
+ set(TIZEN_TOOLCHAIN "x86_64-tizen-linux-gnu/9.2.0")
+ endif()
+ elseif(FREEBSD)
+ set(triple "x86_64-unknown-freebsd12")
+ elseif(ILLUMOS)
+ set(TOOLCHAIN "x86_64-illumos")
+ elseif(HAIKU)
+ set(TOOLCHAIN "x64_64-unknown-haiku")
+ endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
set(CMAKE_SYSTEM_PROCESSOR i686)
set(TOOLCHAIN "i686-linux-gnu")
-elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
- set(CMAKE_SYSTEM_PROCESSOR "x86_64")
- set(triple "x86_64-unknown-freebsd11")
-elseif (ILLUMOS)
- set(CMAKE_SYSTEM_PROCESSOR "x86_64")
- set(TOOLCHAIN "x86_64-illumos")
+ if(TIZEN)
+ set(TIZEN_TOOLCHAIN "i586-tizen-linux-gnu/9.2.0")
+ endif()
else()
- message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only armel, arm, arm64, s390x and x86 are supported!")
+ message(FATAL_ERROR "Arch is ${TARGET_ARCH_NAME}. Only arm, arm64, armel, armv6, ppc64le, riscv64, s390x, x64 and x86 are supported!")
endif()
if(DEFINED ENV{TOOLCHAIN})
@@ -57,7 +103,11 @@ if(DEFINED ENV{TOOLCHAIN})
endif()
# Specify include paths
-if(DEFINED TIZEN_TOOLCHAIN)
+if(TIZEN)
+ if(TARGET_ARCH_NAME STREQUAL "arm")
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7hl-tizen-linux-gnueabihf)
+ endif()
if(TARGET_ARCH_NAME STREQUAL "armel")
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/armv7l-tizen-linux-gnueabi)
@@ -66,9 +116,13 @@ if(DEFINED TIZEN_TOOLCHAIN)
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}/include/c++/aarch64-tizen-linux-gnu)
endif()
+ if(TARGET_ARCH_NAME STREQUAL "x86")
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/)
+ include_directories(SYSTEM ${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}/include/c++/i586-tizen-linux-gnu)
+ endif()
endif()
-if("$ENV{__DistroRid}" MATCHES "android.*")
+if(ANDROID)
if(TARGET_ARCH_NAME STREQUAL "arm")
set(ANDROID_ABI armeabi-v7a)
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
@@ -76,7 +130,9 @@ if("$ENV{__DistroRid}" MATCHES "android.*")
endif()
# extract platform number required by the NDK's toolchain
- string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "$ENV{__DistroRid}")
+ file(READ "${CROSS_ROOTFS}/android_platform" RID_FILE_CONTENTS)
+ string(REPLACE "RID=" "" ANDROID_RID "${RID_FILE_CONTENTS}")
+ string(REGEX REPLACE ".*\\.([0-9]+)-.*" "\\1" ANDROID_PLATFORM "${ANDROID_RID}")
set(ANDROID_TOOLCHAIN clang)
set(FEATURE_EVENT_TRACE 0) # disable event trace as there is no lttng-ust package in termux repository
@@ -85,12 +141,15 @@ if("$ENV{__DistroRid}" MATCHES "android.*")
# include official NDK toolchain script
include(${CROSS_ROOTFS}/../build/cmake/android.toolchain.cmake)
-elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
+elseif(FREEBSD)
# we cross-compile by instructing clang
set(CMAKE_C_COMPILER_TARGET ${triple})
set(CMAKE_CXX_COMPILER_TARGET ${triple})
set(CMAKE_ASM_COMPILER_TARGET ${triple})
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld")
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fuse-ld=lld")
elseif(ILLUMOS)
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
@@ -122,6 +181,41 @@ elseif(ILLUMOS)
set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp")
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp")
+elseif(HAIKU)
+ set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
+
+ set(TOOLSET_PREFIX ${TOOLCHAIN}-)
+ function(locate_toolchain_exec exec var)
+ string(TOUPPER ${exec} EXEC_UPPERCASE)
+ if(NOT "$ENV{CLR_${EXEC_UPPERCASE}}" STREQUAL "")
+ set(${var} "$ENV{CLR_${EXEC_UPPERCASE}}" PARENT_SCOPE)
+ return()
+ endif()
+
+ set(SEARCH_PATH "${CROSS_ROOTFS}/generated/cross-tools-x86_64/bin")
+
+ find_program(EXEC_LOCATION_${exec}
+ PATHS ${SEARCH_PATH}
+ NAMES
+ "${TOOLSET_PREFIX}${exec}${CLR_CMAKE_COMPILER_FILE_NAME_VERSION}"
+ "${TOOLSET_PREFIX}${exec}")
+
+ if (EXEC_LOCATION_${exec} STREQUAL "EXEC_LOCATION_${exec}-NOTFOUND")
+ message(FATAL_ERROR "Unable to find toolchain executable. Name: ${exec}, Prefix: ${TOOLSET_PREFIX}.")
+ endif()
+ set(${var} ${EXEC_LOCATION_${exec}} PARENT_SCOPE)
+ endfunction()
+
+ set(CMAKE_SYSTEM_PREFIX_PATH "${CROSS_ROOTFS}")
+
+ locate_toolchain_exec(gcc CMAKE_C_COMPILER)
+ locate_toolchain_exec(g++ CMAKE_CXX_COMPILER)
+
+ set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} -lssp")
+ set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lssp")
+
+ # let CMake set up the correct search paths
+ include(Platform/Haiku)
else()
set(CMAKE_SYSROOT "${CROSS_ROOTFS}")
@@ -138,24 +232,24 @@ function(add_toolchain_linker_flag Flag)
if (NOT Config STREQUAL "")
set(CONFIG_SUFFIX "_${Config}")
endif()
- set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
- set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}} ${Flag}" PARENT_SCOPE)
+ set("CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_EXE_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
+ set("CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT" "${CMAKE_SHARED_LINKER_FLAGS${CONFIG_SUFFIX}_INIT} ${Flag}" PARENT_SCOPE)
endfunction()
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+if(LINUX)
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/lib/${TOOLCHAIN}")
add_toolchain_linker_flag("-Wl,--rpath-link=${CROSS_ROOTFS}/usr/lib/${TOOLCHAIN}")
endif()
-if(TARGET_ARCH_NAME STREQUAL "armel")
- if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
+if(TARGET_ARCH_NAME MATCHES "^(arm|armel)$")
+ if(TIZEN)
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "arm64")
- if(DEFINED TIZEN_TOOLCHAIN) # For Tizen only
+ if(TIZEN)
add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib64/gcc/${TIZEN_TOOLCHAIN}")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib64")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib64")
@@ -167,6 +261,13 @@ elseif(TARGET_ARCH_NAME STREQUAL "arm64")
endif()
elseif(TARGET_ARCH_NAME STREQUAL "x86")
add_toolchain_linker_flag(-m32)
+
+ if(TIZEN)
+ add_toolchain_linker_flag("-B${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib")
+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib")
+ add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/lib/gcc/${TIZEN_TOOLCHAIN}")
+ endif()
elseif(ILLUMOS)
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/lib/amd64")
add_toolchain_linker_flag("-L${CROSS_ROOTFS}/usr/amd64/lib")
@@ -174,7 +275,7 @@ endif()
# Specify compile options
-if((TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|s390x)$" AND NOT "$ENV{__DistroRid}" MATCHES "android.*") OR ILLUMOS)
+if((TARGET_ARCH_NAME MATCHES "^(arm|arm64|armel|armv6|ppc64le|riscv64|s390x)$" AND NOT ANDROID AND NOT FREEBSD) OR ILLUMOS OR HAIKU)
set(CMAKE_C_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_CXX_COMPILER_TARGET ${TOOLCHAIN})
set(CMAKE_ASM_COMPILER_TARGET ${TOOLCHAIN})
@@ -201,8 +302,8 @@ elseif(TARGET_ARCH_NAME STREQUAL "x86")
add_compile_options(-Wno-error=unused-command-line-argument)
endif()
-if(DEFINED TIZEN_TOOLCHAIN)
- if(TARGET_ARCH_NAME MATCHES "^(armel|arm64)$")
+if(TIZEN)
+ if(TARGET_ARCH_NAME MATCHES "^(arm|armel|arm64|x86)$")
add_compile_options(-Wno-deprecated-declarations) # compile-time option
add_compile_options(-D__extern_always_inline=inline) # compile-time option
endif()
diff --git a/eng/common/darc-init.sh b/eng/common/darc-init.sh
index 39abdbecd..84c1d0cc2 100755
--- a/eng/common/darc-init.sh
+++ b/eng/common/darc-init.sh
@@ -53,7 +53,7 @@ fi
function InstallDarcCli {
local darc_cli_package_name="microsoft.dotnet.darc"
- InitializeDotNetCli
+ InitializeDotNetCli true
local dotnet_root=$_InitializeDotNetCli
if [ -z "$toolpath" ]; then
diff --git a/eng/common/dotnet-install.sh b/eng/common/dotnet-install.sh
index fdfeea66e..abd045a32 100755
--- a/eng/common/dotnet-install.sh
+++ b/eng/common/dotnet-install.sh
@@ -52,16 +52,19 @@ done
# Use uname to determine what the CPU is, see https://en.wikipedia.org/wiki/Uname#Examples
cpuname=$(uname -m)
case $cpuname in
- aarch64)
+ arm64|aarch64)
buildarch=arm64
;;
+ loongarch64)
+ buildarch=loongarch64
+ ;;
amd64|x86_64)
buildarch=x64
;;
armv*l)
buildarch=arm
;;
- i686)
+ i[3-6]86)
buildarch=x86
;;
*)
diff --git a/eng/common/generate-graph-files.ps1 b/eng/common/generate-graph-files.ps1
deleted file mode 100644
index 0728b1a8b..000000000
--- a/eng/common/generate-graph-files.ps1
+++ /dev/null
@@ -1,86 +0,0 @@
-Param(
- [Parameter(Mandatory=$true)][string] $barToken, # Token generated at https://maestro-prod.westus2.cloudapp.azure.com/Account/Tokens
- [Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
- [Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
- [Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
- [string] $darcVersion, # darc's version
- [string] $graphvizVersion = '2.38', # GraphViz version
- [switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
- # toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
-)
-
-function CheckExitCode ([string]$stage)
-{
- $exitCode = $LASTEXITCODE
- if ($exitCode -ne 0) {
- Write-PipelineTelemetryError -Category 'Arcade' -Message "Something failed in stage: '$stage'. Check for errors above. Exiting now..."
- ExitWithExitCode $exitCode
- }
-}
-
-try {
- $ErrorActionPreference = 'Stop'
- . $PSScriptRoot\tools.ps1
-
- Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
-
- Push-Location $PSScriptRoot
-
- Write-Host 'Installing darc...'
- . .\darc-init.ps1 -darcVersion $darcVersion
- CheckExitCode 'Running darc-init'
-
- $engCommonBaseDir = Join-Path $PSScriptRoot 'native\'
- $graphvizInstallDir = CommonLibrary\Get-NativeInstallDirectory
- $nativeToolBaseUri = 'https://netcorenativeassets.blob.core.windows.net/resource-packages/external'
- $installBin = Join-Path $graphvizInstallDir 'bin'
-
- Write-Host 'Installing dot...'
- .\native\install-tool.ps1 -ToolName graphviz -InstallPath $installBin -BaseUri $nativeToolBaseUri -CommonLibraryDirectory $engCommonBaseDir -Version $graphvizVersion -Verbose
-
- $darcExe = "$env:USERPROFILE\.dotnet\tools"
- $darcExe = Resolve-Path "$darcExe\darc.exe"
-
- Create-Directory $outputFolder
-
- # Generate 3 graph descriptions:
- # 1. Flat with coherency information
- # 2. Graphviz (dot) file
- # 3. Standard dependency graph
- $graphVizFilePath = "$outputFolder\graphviz.txt"
- $graphVizImageFilePath = "$outputFolder\graph.png"
- $normalGraphFilePath = "$outputFolder\graph-full.txt"
- $flatGraphFilePath = "$outputFolder\graph-flat.txt"
- $baseOptions = @( '--github-pat', "$gitHubPat", '--azdev-pat', "$azdoPat", '--password', "$barToken" )
-
- if ($includeToolset) {
- Write-Host 'Toolsets will be included in the graph...'
- $baseOptions += @( '--include-toolset' )
- }
-
- Write-Host 'Generating standard dependency graph...'
- & "$darcExe" get-dependency-graph @baseOptions --output-file $normalGraphFilePath
- CheckExitCode 'Generating normal dependency graph'
-
- Write-Host 'Generating flat dependency graph and graphviz file...'
- & "$darcExe" get-dependency-graph @baseOptions --flat --coherency --graphviz $graphVizFilePath --output-file $flatGraphFilePath
- CheckExitCode 'Generating flat and graphviz dependency graph'
-
- Write-Host "Generating graph image $graphVizFilePath"
- $dotFilePath = Join-Path $installBin "graphviz\$graphvizVersion\release\bin\dot.exe"
- & "$dotFilePath" -Tpng -o"$graphVizImageFilePath" "$graphVizFilePath"
- CheckExitCode 'Generating graphviz image'
-
- Write-Host "'$graphVizFilePath', '$flatGraphFilePath', '$normalGraphFilePath' and '$graphVizImageFilePath' created!"
-}
-catch {
- if (!$includeToolset) {
- Write-Host 'This might be a toolset repo which includes only toolset dependencies. ' -NoNewline -ForegroundColor Yellow
- Write-Host 'Since -includeToolset is not set there is no graph to create. Include -includeToolset and try again...' -ForegroundColor Yellow
- }
- Write-Host $_.ScriptStackTrace
- Write-PipelineTelemetryError -Category 'Arcade' -Message $_
- ExitWithExitCode 1
-} finally {
- Pop-Location
-}
\ No newline at end of file
diff --git a/eng/common/generate-locproject.ps1 b/eng/common/generate-locproject.ps1
index 25e97ac00..bcb579e37 100644
--- a/eng/common/generate-locproject.ps1
+++ b/eng/common/generate-locproject.ps1
@@ -10,9 +10,7 @@ Param(
Set-StrictMode -Version 2.0
$ErrorActionPreference = "Stop"
-. $PSScriptRoot\tools.ps1
-
-Import-Module -Name (Join-Path $PSScriptRoot 'native\CommonLibrary.psm1')
+. $PSScriptRoot\pipeline-logging-functions.ps1
$exclusionsFilePath = "$SourcesDirectory\eng\Localize\LocExclusions.json"
$exclusions = @{ Exclusions = @() }
@@ -28,13 +26,34 @@ $jsonFiles = @()
$jsonTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\.template\.config\\localize\\.+\.en\.json" } # .NET templating pattern
$jsonTemplateFiles | ForEach-Object {
$null = $_.Name -Match "(.+)\.[\w-]+\.json" # matches '[filename].[langcode].json
-
+
$destinationFile = "$($_.Directory.FullName)\$($Matches.1).json"
$jsonFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
}
$jsonWinformsTemplateFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\\strings\.json" } # current winforms pattern
+$wxlFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\.+\.wxl" -And -Not( $_.Directory.Name -Match "\d{4}" ) } # localized files live in four digit lang ID directories; this excludes them
+if (-not $wxlFiles) {
+ $wxlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "\\1033\\.+\.wxl" } # pick up en files (1033 = en) specifically so we can copy them to use as the neutral xlf files
+ if ($wxlEnFiles) {
+ $wxlFiles = @()
+ $wxlEnFiles | ForEach-Object {
+ $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
+ $wxlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
+ }
+ }
+}
+
+$macosHtmlEnFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory" | Where-Object { $_.FullName -Match "en\.lproj\\.+\.html" } # add installer HTML files
+$macosHtmlFiles = @()
+if ($macosHtmlEnFiles) {
+ $macosHtmlEnFiles | ForEach-Object {
+ $destinationFile = "$($_.Directory.Parent.FullName)\$($_.Name)"
+ $macosHtmlFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
+ }
+}
+
$xlfFiles = @()
$allXlfFiles = Get-ChildItem -Recurse -Path "$SourcesDirectory\*\*.xlf"
@@ -46,7 +65,7 @@ if ($allXlfFiles) {
}
$langXlfFiles | ForEach-Object {
$null = $_.Name -Match "(.+)\.[\w-]+\.xlf" # matches '[filename].[langcode].xlf
-
+
$destinationFile = "$($_.Directory.FullName)\$($Matches.1).xlf"
$xlfFiles += Copy-Item "$($_.FullName)" -Destination $destinationFile -PassThru
}
@@ -59,10 +78,10 @@ $locJson = @{
LanguageSet = $LanguageSet
LocItems = @(
$locFiles | ForEach-Object {
- $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")"
+ $outputPath = "$(($_.DirectoryName | Resolve-Path -Relative) + "\")"
$continue = $true
foreach ($exclusion in $exclusions.Exclusions) {
- if ($outputPath.Contains($exclusion))
+ if ($_.FullName.Contains($exclusion))
{
$continue = $false
}
@@ -79,8 +98,7 @@ $locJson = @{
CopyOption = "LangIDOnPath"
OutputPath = "$($_.Directory.Parent.FullName | Resolve-Path -Relative)\"
}
- }
- else {
+ } else {
return @{
SourceFile = $sourceFile
CopyOption = "LangIDOnName"
@@ -90,6 +108,55 @@ $locJson = @{
}
}
)
+ },
+ @{
+ LanguageSet = $LanguageSet
+ CloneLanguageSet = "WiX_CloneLanguages"
+ LssFiles = @( "wxl_loc.lss" )
+ LocItems = @(
+ $wxlFiles | ForEach-Object {
+ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
+ $continue = $true
+ foreach ($exclusion in $exclusions.Exclusions) {
+ if ($_.FullName.Contains($exclusion)) {
+ $continue = $false
+ }
+ }
+ $sourceFile = ($_.FullName | Resolve-Path -Relative)
+ if ($continue)
+ {
+ return @{
+ SourceFile = $sourceFile
+ CopyOption = "LangIDOnPath"
+ OutputPath = $outputPath
+ }
+ }
+ }
+ )
+ },
+ @{
+ LanguageSet = $LanguageSet
+ CloneLanguageSet = "VS_macOS_CloneLanguages"
+ LssFiles = @( ".\eng\common\loc\P22DotNetHtmlLocalization.lss" )
+ LocItems = @(
+ $macosHtmlFiles | ForEach-Object {
+ $outputPath = "$($_.Directory.FullName | Resolve-Path -Relative)\"
+ $continue = $true
+ foreach ($exclusion in $exclusions.Exclusions) {
+ if ($_.FullName.Contains($exclusion)) {
+ $continue = $false
+ }
+ }
+ $sourceFile = ($_.FullName | Resolve-Path -Relative)
+ if ($continue) {
+ return @{
+ SourceFile = $sourceFile
+ CopyOption = "LangIDOnPath"
+ OutputPath = $outputPath
+ }
+ }
+ }
+ )
}
)
}
@@ -108,10 +175,10 @@ else {
if ((Get-FileHash "$SourcesDirectory\eng\Localize\LocProject-generated.json").Hash -ne (Get-FileHash "$SourcesDirectory\eng\Localize\LocProject.json").Hash) {
Write-PipelineTelemetryError -Category "OneLocBuild" -Message "Existing LocProject.json differs from generated LocProject.json. Download LocProject-generated.json and compare them."
-
+
exit 1
}
else {
Write-Host "Generated LocProject.json and current LocProject.json are identical."
}
-}
\ No newline at end of file
+}
diff --git a/eng/common/generate-sbom-prep.ps1 b/eng/common/generate-sbom-prep.ps1
new file mode 100644
index 000000000..3e5c1c74a
--- /dev/null
+++ b/eng/common/generate-sbom-prep.ps1
@@ -0,0 +1,21 @@
+Param(
+ [Parameter(Mandatory=$true)][string] $ManifestDirPath # Manifest directory where sbom will be placed
+)
+
+. $PSScriptRoot\pipeline-logging-functions.ps1
+
+Write-Host "Creating dir $ManifestDirPath"
+# create directory for sbom manifest to be placed
+if (!(Test-Path -path $ManifestDirPath))
+{
+ New-Item -ItemType Directory -path $ManifestDirPath
+ Write-Host "Successfully created directory $ManifestDirPath"
+}
+else{
+ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
+}
+
+Write-Host "Updating artifact name"
+$artifact_name = "${env:SYSTEM_STAGENAME}_${env:AGENT_JOBNAME}_SBOM" -replace '["/:<>\\|?@*"() ]', '_'
+Write-Host "Artifact name $artifact_name"
+Write-Host "##vso[task.setvariable variable=ARTIFACT_NAME]$artifact_name"
diff --git a/eng/common/generate-sbom-prep.sh b/eng/common/generate-sbom-prep.sh
new file mode 100644
index 000000000..d5c76dc82
--- /dev/null
+++ b/eng/common/generate-sbom-prep.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+. $scriptroot/pipeline-logging-functions.sh
+
+manifest_dir=$1
+
+if [ ! -d "$manifest_dir" ] ; then
+ mkdir -p "$manifest_dir"
+ echo "Sbom directory created." $manifest_dir
+else
+ Write-PipelineTelemetryError -category 'Build' "Unable to create sbom folder."
+fi
+
+artifact_name=$SYSTEM_STAGENAME"_"$AGENT_JOBNAME"_SBOM"
+echo "Artifact name before : "$artifact_name
+# replace all special characters with _, some builds use special characters like : in Agent.Jobname, that is not a permissible name while uploading artifacts.
+safe_artifact_name="${artifact_name//["/:<>\\|?@*$" ]/_}"
+echo "Artifact name after : "$safe_artifact_name
+export ARTIFACT_NAME=$safe_artifact_name
+echo "##vso[task.setvariable variable=ARTIFACT_NAME]$safe_artifact_name"
+
+exit 0
diff --git a/eng/common/init-tools-native.ps1 b/eng/common/init-tools-native.ps1
index db830c00a..fbc67effc 100644
--- a/eng/common/init-tools-native.ps1
+++ b/eng/common/init-tools-native.ps1
@@ -31,6 +31,10 @@ Wait time between retry attempts in seconds
.PARAMETER GlobalJsonFile
File path to global.json file
+.PARAMETER PathPromotion
+Optional switch to enable either promote native tools specified in the global.json to the path (in Azure Pipelines)
+or break the build if a native tool is not found on the path (on a local dev machine)
+
.NOTES
#>
[CmdletBinding(PositionalBinding=$false)]
@@ -41,7 +45,8 @@ Param (
[switch] $Force = $False,
[int] $DownloadRetries = 5,
[int] $RetryWaitTimeInSeconds = 30,
- [string] $GlobalJsonFile
+ [string] $GlobalJsonFile,
+ [switch] $PathPromotion
)
if (!$GlobalJsonFile) {
@@ -77,53 +82,102 @@ try {
ConvertFrom-Json |
Select-Object -Expand 'native-tools' -ErrorAction SilentlyContinue
if ($NativeTools) {
- $NativeTools.PSObject.Properties | ForEach-Object {
- $ToolName = $_.Name
- $ToolVersion = $_.Value
- $LocalInstallerArguments = @{ ToolName = "$ToolName" }
- $LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
- $LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
- $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
- $LocalInstallerArguments += @{ Version = "$ToolVersion" }
-
- if ($Verbose) {
- $LocalInstallerArguments += @{ Verbose = $True }
- }
- if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
- if($Force) {
- $LocalInstallerArguments += @{ Force = $True }
- }
- }
- if ($Clean) {
- $LocalInstallerArguments += @{ Clean = $True }
- }
-
- Write-Verbose "Installing $ToolName version $ToolVersion"
- Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
- & $InstallerPath @LocalInstallerArguments
- if ($LASTEXITCODE -Ne "0") {
- $errMsg = "$ToolName installation failed"
- if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
- $showNativeToolsWarning = $true
- if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
- $showNativeToolsWarning = $false
+ if ($PathPromotion -eq $True) {
+ if ($env:SYSTEM_TEAMPROJECT) { # check to see if we're in an Azure pipelines build
+ $NativeTools.PSObject.Properties | ForEach-Object {
+ $ToolName = $_.Name
+ $ToolVersion = $_.Value
+ $InstalledTools = @{}
+
+ if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
+ if ($ToolVersion -eq "latest") {
+ $ToolVersion = ""
+ }
+ $ArcadeToolsDirectory = "C:\arcade-tools"
+ if (-not (Test-Path $ArcadeToolsDirectory)) {
+ Write-Error "Arcade tools directory '$ArcadeToolsDirectory' was not found; artifacts were not properly installed."
+ exit 1
}
- if ($showNativeToolsWarning) {
- Write-Warning $errMsg
+ $ToolDirectories = (Get-ChildItem -Path "$ArcadeToolsDirectory" -Filter "$ToolName-$ToolVersion*" | Sort-Object -Descending)
+ if ($ToolDirectories -eq $null) {
+ Write-Error "Unable to find directory for $ToolName $ToolVersion; please make sure the tool is installed on this image."
+ exit 1
}
- $toolInstallationFailure = $true
- } else {
- # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
- Write-Host $errMsg
- exit 1
+ $ToolDirectory = $ToolDirectories[0]
+ $BinPathFile = "$($ToolDirectory.FullName)\binpath.txt"
+ if (-not (Test-Path -Path "$BinPathFile")) {
+ Write-Error "Unable to find binpath.txt in '$($ToolDirectory.FullName)' ($ToolName $ToolVersion); artifact is either installed incorrectly or is not a bootstrappable tool."
+ exit 1
+ }
+ $BinPath = Get-Content "$BinPathFile"
+ $ToolPath = Convert-Path -Path $BinPath
+ Write-Host "Adding $ToolName to the path ($ToolPath)..."
+ Write-Host "##vso[task.prependpath]$ToolPath"
+ $env:PATH = "$ToolPath;$env:PATH"
+ $InstalledTools += @{ $ToolName = $ToolDirectory.FullName }
+ }
+ }
+ return $InstalledTools
+ } else {
+ $NativeTools.PSObject.Properties | ForEach-Object {
+ $ToolName = $_.Name
+ $ToolVersion = $_.Value
+
+ if ((Get-Command "$ToolName" -ErrorAction SilentlyContinue) -eq $null) {
+ Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message "$ToolName not found on path. Please install $ToolName $ToolVersion before proceeding."
+ }
}
+ exit 0
+ }
+ } else {
+ $NativeTools.PSObject.Properties | ForEach-Object {
+ $ToolName = $_.Name
+ $ToolVersion = $_.Value
+ $LocalInstallerArguments = @{ ToolName = "$ToolName" }
+ $LocalInstallerArguments += @{ InstallPath = "$InstallBin" }
+ $LocalInstallerArguments += @{ BaseUri = "$BaseUri" }
+ $LocalInstallerArguments += @{ CommonLibraryDirectory = "$EngCommonBaseDir" }
+ $LocalInstallerArguments += @{ Version = "$ToolVersion" }
+
+ if ($Verbose) {
+ $LocalInstallerArguments += @{ Verbose = $True }
+ }
+ if (Get-Variable 'Force' -ErrorAction 'SilentlyContinue') {
+ if($Force) {
+ $LocalInstallerArguments += @{ Force = $True }
+ }
+ }
+ if ($Clean) {
+ $LocalInstallerArguments += @{ Clean = $True }
+ }
+
+ Write-Verbose "Installing $ToolName version $ToolVersion"
+ Write-Verbose "Executing '$InstallerPath $($LocalInstallerArguments.Keys.ForEach({"-$_ '$($LocalInstallerArguments.$_)'"}) -join ' ')'"
+ & $InstallerPath @LocalInstallerArguments
+ if ($LASTEXITCODE -Ne "0") {
+ $errMsg = "$ToolName installation failed"
+ if ((Get-Variable 'DoNotAbortNativeToolsInstallationOnFailure' -ErrorAction 'SilentlyContinue') -and $DoNotAbortNativeToolsInstallationOnFailure) {
+ $showNativeToolsWarning = $true
+ if ((Get-Variable 'DoNotDisplayNativeToolsInstallationWarnings' -ErrorAction 'SilentlyContinue') -and $DoNotDisplayNativeToolsInstallationWarnings) {
+ $showNativeToolsWarning = $false
+ }
+ if ($showNativeToolsWarning) {
+ Write-Warning $errMsg
+ }
+ $toolInstallationFailure = $true
+ } else {
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host $errMsg
+ exit 1
+ }
+ }
+ }
+
+ if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host 'Native tools bootstrap failed'
+ exit 1
}
- }
-
- if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
- # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
- Write-Host 'Native tools bootstrap failed'
- exit 1
}
}
else {
@@ -139,7 +193,7 @@ try {
Write-Host "##vso[task.prependpath]$(Convert-Path -Path $InstallBin)"
return $InstallBin
}
- else {
+ elseif (-not ($PathPromotion)) {
Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools install directory does not exist, installation failed'
exit 1
}
diff --git a/eng/common/init-tools-native.sh b/eng/common/init-tools-native.sh
index 5bd205b5d..3e6a8d6ac 100755
--- a/eng/common/init-tools-native.sh
+++ b/eng/common/init-tools-native.sh
@@ -10,7 +10,7 @@ force=false
download_retries=5
retry_wait_time_seconds=30
global_json_file="$(dirname "$(dirname "${scriptroot}")")/global.json"
-declare -A native_assets
+declare -a native_assets
. $scriptroot/pipeline-logging-functions.sh
. $scriptroot/native/common-library.sh
diff --git a/eng/common/internal/NuGet.config b/eng/common/internal/NuGet.config
new file mode 100644
index 000000000..19d3d311b
--- /dev/null
+++ b/eng/common/internal/NuGet.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/eng/common/internal/Tools.csproj b/eng/common/internal/Tools.csproj
index beb9c4648..7f5ce6d60 100644
--- a/eng/common/internal/Tools.csproj
+++ b/eng/common/internal/Tools.csproj
@@ -8,6 +8,9 @@
+
+
+
diff --git a/eng/common/loc/P22DotNetHtmlLocalization.lss b/eng/common/loc/P22DotNetHtmlLocalization.lss
new file mode 100644
index 000000000..6661fed56
Binary files /dev/null and b/eng/common/loc/P22DotNetHtmlLocalization.lss differ
diff --git a/eng/common/msbuild.ps1 b/eng/common/msbuild.ps1
index eea19cd84..f041e5ddd 100644
--- a/eng/common/msbuild.ps1
+++ b/eng/common/msbuild.ps1
@@ -6,6 +6,7 @@ Param(
[switch] $ci,
[switch] $prepareMachine,
[switch] $excludePrereleaseVS,
+ [string] $msbuildEngine = $null,
[Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
)
diff --git a/eng/common/native/CommonLibrary.psm1 b/eng/common/native/CommonLibrary.psm1
index adf707c8f..ca38268c4 100644
--- a/eng/common/native/CommonLibrary.psm1
+++ b/eng/common/native/CommonLibrary.psm1
@@ -276,7 +276,8 @@ function Get-MachineArchitecture {
}
if (($ProcessorArchitecture -Eq "AMD64") -Or
($ProcessorArchitecture -Eq "IA64") -Or
- ($ProcessorArchitecture -Eq "ARM64")) {
+ ($ProcessorArchitecture -Eq "ARM64") -Or
+ ($ProcessorArchitecture -Eq "LOONGARCH64")) {
return "x64"
}
return "x86"
diff --git a/eng/common/native/common-library.sh b/eng/common/native/common-library.sh
index bf272dcf5..080c2c283 100755
--- a/eng/common/native/common-library.sh
+++ b/eng/common/native/common-library.sh
@@ -148,8 +148,12 @@ function NewScriptShim {
fi
if [[ ! -f $tool_file_path ]]; then
- Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
- return 1
+ # try to see if the path is lower cased
+ tool_file_path="$(echo $tool_file_path | tr "[:upper:]" "[:lower:]")"
+ if [[ ! -f $tool_file_path ]]; then
+ Write-PipelineTelemetryError -category 'NativeToolsBootstrap' "Specified tool file path:'$tool_file_path' does not exist"
+ return 1
+ fi
fi
local shim_contents=$'#!/usr/bin/env bash\n'
diff --git a/eng/common/native/find-native-compiler.sh b/eng/common/native/find-native-compiler.sh
deleted file mode 100644
index aed19d07d..000000000
--- a/eng/common/native/find-native-compiler.sh
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/env bash
-#
-# This file locates the native compiler with the given name and version and sets the environment variables to locate it.
-#
-
-source="${BASH_SOURCE[0]}"
-
-# resolve $SOURCE until the file is no longer a symlink
-while [[ -h $source ]]; do
- scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
- source="$(readlink "$source")"
-
- # if $source was a relative symlink, we need to resolve it relative to the path where the
- # symlink file was located
- [[ $source != /* ]] && source="$scriptroot/$source"
-done
-scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
-
-if [ $# -lt 0 ]
-then
- echo "Usage..."
- echo "find-native-compiler.sh "
- echo "Specify the name of compiler (clang or gcc)."
- echo "Specify the major version of compiler."
- echo "Specify the minor version of compiler."
- exit 1
-fi
-
-. $scriptroot/../pipeline-logging-functions.sh
-
-compiler="$1"
-cxxCompiler="$compiler++"
-majorVersion="$2"
-minorVersion="$3"
-
-if [ "$compiler" = "gcc" ]; then cxxCompiler="g++"; fi
-
-check_version_exists() {
- desired_version=-1
-
- # Set up the environment to be used for building with the desired compiler.
- if command -v "$compiler-$1.$2" > /dev/null; then
- desired_version="-$1.$2"
- elif command -v "$compiler$1$2" > /dev/null; then
- desired_version="$1$2"
- elif command -v "$compiler-$1$2" > /dev/null; then
- desired_version="-$1$2"
- fi
-
- echo "$desired_version"
-}
-
-if [ -z "$CLR_CC" ]; then
-
- # Set default versions
- if [ -z "$majorVersion" ]; then
- # note: gcc (all versions) and clang versions higher than 6 do not have minor version in file name, if it is zero.
- if [ "$compiler" = "clang" ]; then versions=( 9 8 7 6.0 5.0 4.0 3.9 3.8 3.7 3.6 3.5 )
- elif [ "$compiler" = "gcc" ]; then versions=( 9 8 7 6 5 4.9 ); fi
-
- for version in "${versions[@]}"; do
- parts=(${version//./ })
- desired_version="$(check_version_exists "${parts[0]}" "${parts[1]}")"
- if [ "$desired_version" != "-1" ]; then majorVersion="${parts[0]}"; break; fi
- done
-
- if [ -z "$majorVersion" ]; then
- if command -v "$compiler" > /dev/null; then
- if [ "$(uname)" != "Darwin" ]; then
- Write-PipelineTelemetryError -category "Build" -type "warning" "Specific version of $compiler not found, falling back to use the one in PATH."
- fi
- export CC="$(command -v "$compiler")"
- export CXX="$(command -v "$cxxCompiler")"
- else
- Write-PipelineTelemetryError -category "Build" "No usable version of $compiler found."
- exit 1
- fi
- else
- if [ "$compiler" = "clang" ] && [ "$majorVersion" -lt 5 ]; then
- if [ "$build_arch" = "arm" ] || [ "$build_arch" = "armel" ]; then
- if command -v "$compiler" > /dev/null; then
- Write-PipelineTelemetryError -category "Build" -type "warning" "Found clang version $majorVersion which is not supported on arm/armel architectures, falling back to use clang from PATH."
- export CC="$(command -v "$compiler")"
- export CXX="$(command -v "$cxxCompiler")"
- else
- Write-PipelineTelemetryError -category "Build" "Found clang version $majorVersion which is not supported on arm/armel architectures, and there is no clang in PATH."
- exit 1
- fi
- fi
- fi
- fi
- else
- desired_version="$(check_version_exists "$majorVersion" "$minorVersion")"
- if [ "$desired_version" = "-1" ]; then
- Write-PipelineTelemetryError -category "Build" "Could not find specific version of $compiler: $majorVersion $minorVersion."
- exit 1
- fi
- fi
-
- if [ -z "$CC" ]; then
- export CC="$(command -v "$compiler$desired_version")"
- export CXX="$(command -v "$cxxCompiler$desired_version")"
- if [ -z "$CXX" ]; then export CXX="$(command -v "$cxxCompiler")"; fi
- fi
-else
- if [ ! -f "$CLR_CC" ]; then
- Write-PipelineTelemetryError -category "Build" "CLR_CC is set but path '$CLR_CC' does not exist"
- exit 1
- fi
- export CC="$CLR_CC"
- export CXX="$CLR_CXX"
-fi
-
-if [ -z "$CC" ]; then
- Write-PipelineTelemetryError -category "Build" "Unable to find $compiler."
- exit 1
-fi
-
-export CCC_CC="$CC"
-export CCC_CXX="$CXX"
-export SCAN_BUILD_COMMAND="$(command -v "scan-build$desired_version")"
diff --git a/eng/common/native/init-compiler.sh b/eng/common/native/init-compiler.sh
new file mode 100644
index 000000000..f13b74080
--- /dev/null
+++ b/eng/common/native/init-compiler.sh
@@ -0,0 +1,144 @@
+#!/usr/bin/env bash
+#
+# This file detects the C/C++ compiler and exports it to the CC/CXX environment variables
+#
+# NOTE: some scripts source this file and rely on stdout being empty, make sure to not output anything here!
+
+if [[ "$#" -lt 3 ]]; then
+ echo "Usage..."
+ echo "init-compiler.sh