Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Add Bedrock GDK paths to core-build-tasks",
"packageName": "@minecraft/core-build-tasks",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 2 additions & 0 deletions tools/core-build-tasks/src/platforms/MinecraftProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
* Non-exhaustive list of product variants used to deploy files to the correct location.
*/
export enum MinecraftProduct {
BedrockGDK = 'BedrockGDK',
PreviewGDK = 'PreviewGDK',
Bedrock = 'BedrockUWP',
Preview = 'PreviewUWP',
Custom = 'Custom',
Expand Down
4 changes: 4 additions & 0 deletions tools/core-build-tasks/src/tasks/cleanCollateral.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import rimraf from 'rimraf';
import { getOrThrowFromProcess } from './helpers/getOrThrowFromProcess';

export const STANDARD_CLEAN_PATHS = [
'APPDATA/Minecraft Bedrock/Users/Shared/games/com.mojang/development_behavior_packs/PROJECT_NAME',
'APPDATA/Minecraft Bedrock/Users/Shared/games/com.mojang/development_resource_packs/PROJECT_NAME',
'APPDATA/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_behavior_packs/PROJECT_NAME',
'APPDATA/Minecraft Bedrock Preview/Users/Shared/games/com.mojang/development_resource_packs/PROJECT_NAME',
'LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME',
'LOCALAPPDATA/Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/development_resource_packs/PROJECT_NAME',
'LOCALAPPDATA/Packages/Microsoft.MinecraftWindowsBeta_8wekyb3d8bbwe/LocalState/games/com.mojang/development_behavior_packs/PROJECT_NAME',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ import { getOrThrowFromProcess } from './getOrThrowFromProcess';

export function getGameDeploymentRootPaths(): Record<MinecraftProduct, string | undefined> {
const localAppDataPath = process.env['LOCALAPPDATA'];
const appDataPath = process.env['APPDATA'];
const customDeploymentPath = process.env['CUSTOM_DEPLOYMENT_PATH'];
return {
BedrockGDK: appDataPath ? resolve(appDataPath, 'Minecraft Bedrock/Users/Shared/games/com.mojang/') : undefined,
PreviewGDK: appDataPath
? resolve(appDataPath, 'Minecraft Bedrock Preview/Users/Shared/games/com.mojang/')
: undefined,
BedrockUWP: localAppDataPath
? resolve(localAppDataPath, 'Packages/Microsoft.MinecraftUWP_8wekyb3d8bbwe/LocalState/games/com.mojang/')
: undefined,
Expand Down