Skip to content

Commit

Permalink
Add deprecated versions of the old packages to help with upgrading (#31)
Browse files Browse the repository at this point in the history
* update packaging scripts to build the deprecated packages too

* Start building up the deprecated packages

* Update repo URLs in packages

* Update license in package.json

* Update deprecated package descriptions

* Update asmdefs, package.json, warnings

* Add meta files for the deprecated packages

* Revert url issue references in PressbleButtonTests.cs
  • Loading branch information
shaynie authored Aug 18, 2023
1 parent 418a018 commit c7cc55d
Show file tree
Hide file tree
Showing 144 changed files with 2,058 additions and 34 deletions.
4 changes: 2 additions & 2 deletions Pipelines/Scripts/pack-upm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ try {

# loop through package directories, update package version, assembly version, and build version hash for updating dependencies
Get-ChildItem -Path $ProjectRoot/*/package.json | ForEach-Object {
$packageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+" -Path $_ | Select-Object -First 1
$packageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+|com\.microsoft\.mrtk\.\w+" -Path $_ | Select-Object -First 1

if (-not $packageName) {
return # this is not an MRTK package, so skip
Expand Down Expand Up @@ -130,7 +130,7 @@ try {

# update dependencies using the versionHash map
Get-ChildItem -Path $ProjectRoot/*/package.json | ForEach-Object {
$currentPackageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+" -Path $_ | Select-Object -First 1
$currentPackageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+|com\.microsoft\.mrtk\.\w+" -Path $_ | Select-Object -First 1
if (-not $currentPackageName) {
return # this is not an MRTK package, so skip
}
Expand Down
4 changes: 2 additions & 2 deletions Pipelines/Scripts/repackage-for-release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ try {
Write-Output "PackageSearchPath: $packageSearchPath"

Get-ChildItem -Path $packageSearchPath | ForEach-Object {
$packageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+" -Path $_.FullName | Select-Object -First 1
$packageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+|com\.microsoft\.mrtk\.\w+" -Path $_.FullName | Select-Object -First 1

if (-not $packageName) {
return # this is not an MRTK package, so skip
Expand Down Expand Up @@ -91,7 +91,7 @@ try {
}
# update all dependencies and repackage
Get-ChildItem -Path $packageSearchPath | ForEach-Object {
$currentPackageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+" -Path $_.FullName | Select-Object -First 1
$currentPackageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+|com\.microsoft\.mrtk\.\w+" -Path $_.FullName | Select-Object -First 1

if (-not $currentPackageName) {
return # this is not an MRTK package, so skip
Expand Down
2 changes: 1 addition & 1 deletion Tooling/create-assemblyinfo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
$gitRoot = ((git -C $PSScriptRoot rev-parse --show-toplevel) | Out-String).Trim()

Get-ChildItem -Path (Join-Path $gitRoot * package.json) | ForEach-Object {
$packageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+" -Path $_ | Select-Object -First 1
$packageName = Select-String -Pattern "org\.mixedrealitytoolkit\.\w+|com\.microsoft\.mrtk\.\w+" -Path $_ | Select-Object -First 1

if (-not $packageName) {
return # this is not an MRTK package, so skip
Expand Down
8 changes: 8 additions & 0 deletions com.microsoft.mrtk.accessibility/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions com.microsoft.mrtk.accessibility/Editor/DeprecatedWarning.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

using UnityEditor;
using UnityEngine;

namespace MixedReality.Toolkit.Accessibility.Deprecated
{
/// <summary>
/// This class shows a warning that com.microsoft.mrtk.* packages are now deprecated.
/// </summary>
class DeprecatedWarning
{
const string k_Title = "Deprecated: The com.microsoft.mrtk.* packages";
const string k_Message = "all com.microsoft.mrtk.* packages has been deprecated. The new packages are org.mixedrealitytoolkit.* See https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity";
const string k_HideWarningKey = "HideOldMRTKPackageDeprecatedWarning";

[InitializeOnLoadMethod]
static void ShowWarning()
{
if (Application.isBatchMode)
{
return;
}

if (EditorUserSettings.GetConfigValue(k_HideWarningKey)?.Equals("true") ?? false)
{
return;
}

var hideWarning = !EditorUtility.DisplayDialog(
k_Title,
k_Message,
"Understood",
"Don't warn me again for this project"
);
EditorUserSettings.SetConfigValue(k_HideWarningKey, hideWarning.ToString().ToLower());
}
}
}
11 changes: 11 additions & 0 deletions com.microsoft.mrtk.accessibility/Editor/DeprecatedWarning.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "MixedReality.Toolkit.Accessibility.Deprecated.Editor",
"rootNamespace": "MixedReality.Toolkit.Accessibility.Deprecated.Editor",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions com.microsoft.mrtk.accessibility/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, Mixed Reality Toolkit Contributors

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 7 additions & 0 deletions com.microsoft.mrtk.accessibility/LICENSE.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions com.microsoft.mrtk.accessibility/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "com.microsoft.mrtk.accessibility",
"version": "1.0.0-development",
"description": "This package has been deprecated",
"displayName": "MRTK Accessibility Early Preview (deprecated)",
"msftFeatureCategory": "MRTK3",
"author": "Microsoft",
"license": "BSD 3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity.git"
},
"bugs": {
"url": "https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/issues"
},
"unity": "2021.3",
"dependencies": {
"org.mixedrealitytoolkit.accessibility": "1.0.0"
}
}
7 changes: 7 additions & 0 deletions com.microsoft.mrtk.accessibility/package.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions com.microsoft.mrtk.audio/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions com.microsoft.mrtk.audio/Editor/DeprecatedWarning.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Mixed Reality Toolkit Contributors
// Licensed under the BSD 3-Clause

using UnityEditor;
using UnityEngine;

namespace MixedReality.Toolkit.Audio.Deprecated
{
/// <summary>
/// This class shows a warning that com.microsoft.mrtk.* packages are now deprecated.
/// </summary>
class DeprecatedWarning
{
const string k_Title = "Deprecated: The com.microsoft.mrtk.* packages";
const string k_Message = "all com.microsoft.mrtk.* packages has been deprecated. The new packages are org.mixedrealitytoolkit.* See https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity";
const string k_HideWarningKey = "HideOldMRTKPackageDeprecatedWarning";

[InitializeOnLoadMethod]
static void ShowWarning()
{
if (Application.isBatchMode)
{
return;
}

if (EditorUserSettings.GetConfigValue(k_HideWarningKey)?.Equals("true") ?? false)
{
return;
}

var hideWarning = !EditorUtility.DisplayDialog(
k_Title,
k_Message,
"Understood",
"Don't warn me again for this project"
);
EditorUserSettings.SetConfigValue(k_HideWarningKey, hideWarning.ToString().ToLower());
}
}
}
11 changes: 11 additions & 0 deletions com.microsoft.mrtk.audio/Editor/DeprecatedWarning.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "MixedReality.Toolkit.Audio.Deprecated.Editor",
"rootNamespace": "",
"references": [],
"includePlatforms": [
"Editor"
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions com.microsoft.mrtk.audio/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2023, Mixed Reality Toolkit Contributors

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
7 changes: 7 additions & 0 deletions com.microsoft.mrtk.audio/LICENSE.md.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions com.microsoft.mrtk.audio/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "com.microsoft.mrtk.audio",
"version": "3.0.0-development",
"description": "This package has been deprecated",
"displayName": "MRTK Audio Effects (deprecated)",
"msftFeatureCategory": "MRTK3",
"author": "Microsoft",
"license": "BSD 3-Clause",
"repository": {
"type": "git",
"url": "https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity.git"
},
"bugs": {
"url": "https://github.com/MixedRealityToolkit/MixedRealityToolkit-Unity/issues"
},
"unity": "2021.3",
"dependencies": {
"org.mixedrealitytoolkit.audio": "3.0.0"
}
}
7 changes: 7 additions & 0 deletions com.microsoft.mrtk.audio/package.json.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions com.microsoft.mrtk.core/Editor.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c7cc55d

Please sign in to comment.