react-native-tizen-dotnet
Version:
react-native-tizen-dotnet is a React Native framework for developer to build Tizen.NET apps on Tizen.
32 lines (25 loc) • 787 B
JavaScript
;
var _tizenTvDevCli = require('tizen-tv-dev-cli');
var _utlis = require('./utlis');
var llog = function llog(str) {
return (0, _utlis._log)('Launch', 'INFO', str);
};
function targetIP() {
if (!_utlis.config.tvip) {
throw '[Error] Can not launch without remote TV IP address...';
}
return _utlis.config.tvip;
};
function tpkPath(flag) {
var mode = void 0;
if (!flag || flag.toLowerCase() === 'release') {
mode = 'Release';
} else {
mode = 'Debug';
}
var appPath = (0, _utlis.format)('/Tizen/bin/' + mode + '/netcoreapp2.0/');
llog('Mode: ' + mode);
llog('Catch App file from path:' + appPath);
return appPath;
}
_tizenTvDevCli.launchTarget.handleCommand(targetIP(), tpkPath(_utlis.config.mode));