Skip to content

Commit

Permalink
builed on Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vasiljevic committed May 12, 2018
1 parent 7cf037b commit fc79fe2
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 29 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -18,4 +18,6 @@ test/namedtests.js
Vagrantfile
v8.log
src/internalpython.js
/tmp.js
/tmp.js
Pipfile
package-lock.json
47 changes: 24 additions & 23 deletions package.json
Expand Up @@ -2,29 +2,30 @@
"name": "skulpt",
"version": "1.0.0",
"description": "Skulpt is a Javascript implementation of Python 2.x. Python that runs in your browser!",
"keywords": ["skulpt"],
"keywords": [
"skulpt"
],
"scripts": {
"testdebug": "./skulpt.py testdebug",
"regengooglocs": "./skulpt.py regengooglocs",
"regensymtabtests": "./skulpt.py regensymtabtests",
"rununits": "./skulpt.py rununits",
"vmwareregr": "./skulpt.py vmwareregr",
"regenparser": "./skulpt.py regenparser",
"regenasttests": "./skulpt.py regenasttests",
"regenruntests": "./skulpt.py regenruntests",
"upload": "./skulpt.py upload",
"doctest": "./skulpt.py doctest",
"doc": "./skulpt.py doc",
"browser": "./skulpt.py browser",
"debugbrowser": "./skulpt.py debugbrowser",
"vfs": "./skulpt.py vfs",
"host": "./skulpt.py host",
"repl": "./skulpt.py repl",

"build": "./skulpt.py dist",
"build-min": "./skulpt.py dist -u",
"test": "./skulpt.py test",
"test3": "./skulpt.py test3"
"testdebug": "python skulpt.py testdebug",
"regengooglocs": "python skulpt.py regengooglocs",
"regensymtabtests": "python skulpt.py regensymtabtests",
"rununits": "python skulpt.py rununits",
"vmwareregr": "python skulpt.py vmwareregr",
"regenparser": "python skulpt.py regenparser",
"regenasttests": "python skulpt.py regenasttests",
"regenruntests": "python skulpt.py regenruntests",
"upload": "python skulpt.py upload",
"doctest": "python skulpt.py doctest",
"doc": "python skulpt.py doc",
"browser": "python skulpt.py browser",
"debugbrowser": "python skulpt.py debugbrowser",
"vfs": "python skulpt.py vfs",
"host": "python skulpt.py host",
"repl": "python skulpt.py repl",
"build": "python skulpt.py dist",
"build-min": "python skulpt.py dist -u",
"test": "python skulpt.py test",
"test3": "python skulpt.py test3"
},
"repository": {
"type": "git",
Expand All @@ -42,6 +43,6 @@
"devDependencies": {
"jshint": "~2.5.2",
"jscs": "~1.12",
"jsdoc": "~3.3.2"
"jsdoc": "~3.5.5"
}
}
14 changes: 9 additions & 5 deletions skulpt.py
Expand Up @@ -176,7 +176,7 @@ def is64bit():

if sys.platform == "win32":
winbase = ".\\support\\d8\\x32"
if not os.path.exists(winbase):
if not os.path.exists(winbase + "\\d8.exe"):
winbase = ".\\support\\d8"
os.environ["D8_PATH"] = winbase
jsengine = winbase + "\\d8.exe --debugger --harmony"
Expand Down Expand Up @@ -231,8 +231,8 @@ def test(debug_mode=False, p3=False):

if sys.platform == "win32":
files = list(chain.from_iterable([ glob.glob(d + "/*.js") for d in base_dirs ]))
jshintcmd = "jshint {1}".format(' '.join(files))
jscscmd = "jscs {1} --reporter=inline".format(' '.join(files))
jshintcmd = "jshint {0}".format(' '.join(files))
jscscmd = "jscs {0} --reporter=inline".format(' '.join(files))
else:
folders = ' '.join([ d + "/*.js" for d in base_dirs ])
jshintcmd = "jshint " + folders
Expand Down Expand Up @@ -811,10 +811,14 @@ def dist(options):
print "Couldn't copy debugger to output folder: %s" % e.message
sys.exit(1)

path_list = os.environ.get('PATH','').split(':')
path_list = os.environ.get('PATH','').split(os.pathsep)
if sys.platform == "win32":
gzip_filename = "gzip.exe"
else:
gzip_filename = "gzip"
has_gzip = False
for p in path_list:
has_gzip = os.access(os.path.join(p,"gzip"), os.X_OK)
has_gzip = os.access(os.path.join(p,gzip_filename), os.X_OK)
if has_gzip:
break

Expand Down

0 comments on commit fc79fe2

Please sign in to comment.