-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into terminal
- Loading branch information
Showing
25 changed files
with
272 additions
and
98 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
node_modules | ||
bower_components | ||
vendor/tingbot-python | ||
build | ||
app/build/ | ||
.jshintrc | ||
dist/ | ||
env | ||
npm-debug.log | ||
vendor/ |
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,45 @@ | ||
osx_image: xcode7.3 | ||
sudo: required | ||
dist: trusty | ||
language: c | ||
matrix: | ||
include: | ||
- os: linux | ||
env: CC=clang CXX=clang++ npm_config_clang=1 | ||
compiler: clang | ||
- os: osx | ||
cache: | ||
directories: | ||
- node_modules | ||
- app/node_modules | ||
- "$HOME/.electron" | ||
addons: | ||
apt: | ||
sources: | ||
- ubuntu-toolchain-r-test | ||
- llvm-toolchain-precise-3.7 | ||
packages: | ||
- libgnome-keyring-dev | ||
- icnsutils | ||
- clang-3.7 | ||
- graphicsmagick | ||
- xz-utils | ||
- rpm | ||
before_install: | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install git-lfs; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git lfs pull; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then curl -L https://github.com/github/git-lfs/releases/download/v1.2.0/git-lfs-linux-amd64-1.2.0.tar.gz | tar -xz; fi | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git-lfs-1.2.0/git-lfs pull; fi | ||
install: | ||
- nvm install 6 | ||
- npm install npm -g | ||
- npm install electron-builder@next | ||
- npm install | ||
- npm prune | ||
script: | ||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then scripts/bundlePython.sh fi | ||
- npm run dist | ||
branches: | ||
except: | ||
- "/^v\\d+\\.\\d+\\.\\d+$/" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "tide-electron", | ||
"version": "0.0.2", | ||
"description": "An Electron based IDE for TingBot", | ||
"author": { | ||
"name": "Tingbot Team", | ||
"email": "[email protected]", | ||
"url": "http://tingbot.com/" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/tingbot/tide-electron.git" | ||
}, | ||
"keywords": [ | ||
"Electron", | ||
"TingBot" | ||
], | ||
"license": "BSD-2-Clause", | ||
"bugs": { | ||
"url": "https://github.com/tingbot/tide-electron/issues" | ||
}, | ||
"homepage": "https://github.com/tingbot/tide-electron#readme", | ||
"main": "app.js", | ||
"dependencies": { | ||
"electron-default-menu": "^0.1.1", | ||
"electron-squirrel-startup": "^1.0.0" | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
"use strict"; | ||
import {spawn,spawnSync} from 'child_process'; | ||
import path from 'path'; | ||
import fs from 'fs'; | ||
// var spawn = require('child_process').spawn; | ||
// var spawnSync = require('child_process').spawnSync; | ||
var current = null; | ||
var requirements_met = check_requirements(); | ||
|
||
|
||
|
||
|
||
function start(tingbot,dir){ | ||
|
||
if(!requirements_met && !check_requirements()){ | ||
return; | ||
} | ||
var pythonExec = findPython(); | ||
if(current){ | ||
current.kill(); | ||
} | ||
|
||
if(tingbot == "simulate"){ | ||
current = spawn(pythonExec, ['-m', 'tbtool', 'simulate',dir]); | ||
console.log("Spawned"); | ||
}else{ | ||
current = spawn(pythonExec, ['-m', 'tbtool','run',tingbot,dir]); | ||
} | ||
|
||
} | ||
|
||
function check_requirements(){ | ||
console.log("check"); | ||
var exit; | ||
var missing = []; | ||
|
||
var pythonExec = findPython(); | ||
|
||
exit = spawnSync(pythonExec,['-V']); | ||
|
||
if(exit.status !== 0){ | ||
missing.push('Python'); | ||
} | ||
|
||
exit = spawnSync(pythonExec,['-c','import pygame']); | ||
|
||
if(exit.status !== 0){ | ||
missing.push('pygame'); | ||
} | ||
|
||
exit = spawnSync(pythonExec,['-c','import tingbot']); | ||
|
||
if(exit.status !== 0){ | ||
missing.push('python-tingbot'); | ||
} | ||
|
||
|
||
if(missing.length > 0){ | ||
alert("You are missing: " + missing.toString() + ". Code execution disabled"); | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
function findPython(){ | ||
var vendorPath = './vendor/python'; | ||
if(!/[\\/]electron-prebuilt[\\/]/.test(process.execPath)){ | ||
vendorPath = path.join(process.resourcesPath,"vendor","python"); | ||
} | ||
try{ | ||
var pythonStat = fs.statSync(vendorPath); | ||
if(!pythonStat.isDirectory()){ | ||
//no vendor use system python | ||
console.log("Using System Python"); | ||
return 'python'; | ||
} | ||
console.log("Using Bundled Python"); | ||
if(process.platform === 'win32'){ | ||
return path.join(vendorPath,"python.exe") | ||
}else{ | ||
return path.join(vendorPath,"bin","python") | ||
} | ||
} catch(ex){ | ||
console.log("Using System Python"); | ||
return 'python'; | ||
} | ||
|
||
|
||
} | ||
|
||
module.exports.start = start; |
File renamed without changes
File renamed without changes
File renamed without changes
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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: 0.4.{build} | ||
|
||
platform: | ||
- x64 | ||
|
||
cache: | ||
- node_modules | ||
- app\node_modules | ||
- '%APPDATA%\npm-cache' | ||
- '%USERPROFILE%\.electron' | ||
|
||
init: | ||
- git config --global core.autocrlf input | ||
|
||
install: | ||
- ps: Install-Product node 6 x64 | ||
- git reset --hard HEAD | ||
- npm install npm -g | ||
- npm install electron-builder@next # force install next version to test electron-builder | ||
- npm install | ||
- npm prune | ||
|
||
build_script: | ||
- node --version | ||
- npm --version | ||
- npm run dist | ||
|
||
test: off |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.