Beispiel #1
0
def main():
    debug = sys.argv[1] == '-d'
    if debug:
        sys.argv.pop(1)
    output_file = sys.argv[1]
    messages_file = sys.argv[2]
    macros_file = sys.argv[3]
    source_files = sys.argv[4:]
    combined_file = 'selfhosted.js'
    replaceErrorMsgs(source_files, messages_file, combined_file)
    js2c.JS2C([combined_file, macros_file], [output_file], { 'TYPE': 'CORE', 'COMPRESSION': 'off', 'DEBUG':debug })
Beispiel #2
0
def main():
    output_file = sys.argv[1]
    messages_file = sys.argv[2]
    macros_file = sys.argv[3]
    source_files = sys.argv[4:]
    combined_file = 'combined.js'
    replaceErrorMsgs(source_files, messages_file, combined_file)
    js2c.JS2C([combined_file, macros_file], [output_file], {
        'TYPE': 'CORE',
        'COMPRESSION': 'off'
    })
    os.remove(combined_file)
Beispiel #3
0
#!/usr/bin/python2

import sys
js2c_dir = sys.argv[1]
sys.path.append(js2c_dir)
import js2c

srcs = sys.argv[2]
natives = sys.argv[3].split(',')
type = sys.argv[4]
compression = sys.argv[5]

js2c.JS2C(natives, [srcs], {'TYPE': type, 'COMPRESSION': compression})