Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: compile

Issue 29390657: Issue 5020 - Part 2: Fix usage of paths in compile script (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore
Patch Set: Removed fallback Created March 23, 2017, 11:53 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: compile
===================================================================
--- a/compile
+++ b/compile
@@ -1,26 +1,27 @@
#!/usr/bin/env python
import os
import re
import subprocess
-EMSCRIPTEN_PATH = '../emscripten'
-SOURCE_DIR = './compiled'
+BASE_DIR = os.path.dirname(__file__)
+EMSCRIPTEN_PATH = os.path.join(BASE_DIR, '..', 'emscripten')
+SOURCE_DIR = os.path.join(BASE_DIR, 'compiled')
SOURCE_FILES = [
os.path.join(path, f)
for (path, dirs, files) in os.walk(SOURCE_DIR)
for f in files
if f.endswith('.cpp')
]
BINDINGS_FILE = os.path.join(SOURCE_DIR, 'bindings.cpp')
BINDINGS_GENERATOR = os.path.join(SOURCE_DIR, 'bindings.cpp.js')
BINDINGS_OUTPUT = os.path.join(SOURCE_DIR, 'bindings.js')
-COMPILER_OUTPUT = './lib/compiled.js'
+COMPILER_OUTPUT = os.path.join(BASE_DIR, 'lib', 'compiled.js')
GENERATION_PARAMS = {
'SHELL_FILE': "'{}'".format(os.path.abspath(os.path.join(SOURCE_DIR,
'shell.js'))),
'ASM_JS': 2, # "almost asm"
'TOTAL_MEMORY': 16*1024*1024,
'TOTAL_STACK': 1*1024*1024,
'ALLOW_MEMORY_GROWTH': 1,
'NO_EXIT_RUNTIME': 1,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld