-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* open explorer alpha on start * add explorer alpha flag * remove unused code * add protobuf messages * fix bui;d * update protocl * ignore path for now * better logs * send protobf only for e@ preview * remove explorer alpha path because the params doesnt work * add local scene param * fix build * check always for file
- Loading branch information
Showing
10 changed files
with
139 additions
and
36 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
packages/@dcl/sdk-commands/src/commands/start/explorer-alpha.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { CliComponents } from '../../components' | ||
|
||
const isWindows = /^win/.test(process.platform) | ||
|
||
export async function runExplorerAlpha( | ||
components: CliComponents, | ||
opts: { cwd: string; realm: string; baseCoords: { x: number; y: number } } | ||
) { | ||
const { cwd, realm, baseCoords } = opts | ||
|
||
if (await runApp(components, { cwd, realm, baseCoords })) { | ||
return | ||
} | ||
|
||
components.logger.log('Please download & install the Decentraland Desktop Client: https://dcl.gg/explorer\n\n') | ||
} | ||
|
||
async function runApp( | ||
components: CliComponents, | ||
{ cwd, realm, baseCoords }: { cwd: string; realm: string; baseCoords: { x: number; y: number } } | ||
) { | ||
const cmd = isWindows ? 'start' : 'open' | ||
try { | ||
const params = `realm=${realm}&position=${baseCoords.x},${baseCoords.y}&local-scene=true` | ||
const app = `decentraland://"${params}"` | ||
await components.spawner.exec(cwd, cmd, [app], { silent: true }) | ||
components.logger.info(`Desktop client: decentraland://${params}\n`) | ||
return true | ||
} catch (e: any) { | ||
components.logger.error('Decentraland Desktop Client failed with: ', e.message) | ||
return false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters