File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { env } from '../';
88import AndroidPlatform from '../platforms/android' ;
99import iOSPlatform from '../platforms/ios' ;
1010import visionOSPlatform from '../platforms/visionos' ;
11+ import WindowsPlatform from '../platforms/windows' ;
1112
1213export interface INativeScriptPlatform {
1314 getEntryPath ?( ) : string ;
@@ -23,6 +24,7 @@ const platforms: {
2324 android : AndroidPlatform ,
2425 ios : iOSPlatform ,
2526 visionos : visionOSPlatform ,
27+ windows : WindowsPlatform ,
2628} ;
2729
2830/**
@@ -66,6 +68,10 @@ export function getPlatformName(): Platform {
6668 return 'visionos' ;
6769 }
6870
71+ if ( env ?. windows ) {
72+ return 'windows' ;
73+ }
74+
6975 // support custom platforms
7076 if ( env ?. platform ) {
7177 if ( platforms [ env . platform ] ) {
Original file line number Diff line number Diff line change 1+ import { basename } from 'path' ;
2+
3+ import { INativeScriptPlatform } from "../helpers/platform" ;
4+ import { getProjectRootPath } from "../helpers/project" ;
5+ import { env } from '../' ;
6+ import { sanitizeName } from '../helpers/name' ;
7+
8+ function getDistPath ( ) {
9+ const appName = sanitizeName ( basename ( getProjectRootPath ( ) ) ) ;
10+ const platform = process . env . USER_PROJECT_PLATFORMS_WINDOWS ? process . env . USER_PROJECT_PLATFORMS_WINDOWS : `${ env . buildPath ?? "platforms" } /windows` ;
11+ return `${ platform } /${ appName } /app` ;
12+ }
13+
14+ const WindowsPlatform : INativeScriptPlatform = {
15+ getDistPath,
16+ }
17+
18+ export default WindowsPlatform ;
You can’t perform that action at this time.
0 commit comments