<commit_before>import sys
import os

import optloader

AGENT = None
LUVIT = None
BUNDLE_DIR = None


def _abs_path(*args):
    return os.path.abspath(os.path.join(*args))

_options = optloader.load_options('platform.gypi')['variables']

ROOT = _options['BUNDLE_DIR']  # os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

BUNDLE_DIR = _abs_path(ROOT, _options['BUNDLE_DIR'])
BUNDLE_NAME = _options['BUNDLE_NAME']

if sys.platform == "win32":
    #TEMPORARY HACK - this is in options.gypi
    BUILDTYPE = 'Release'  # 'Debug' if _options['variables']['virgo_debug'] == 'true' else 'Release'
    BUILD_DIR = _abs_path(ROOT, BUILDTYPE)
    LUVIT = _abs_path(BUILD_DIR, 'luvit.exe')
    AGENT = _abs_path(BUILD_DIR, 'virgo.exe')
else:
    BUILDTYPE = os.environ.get('BUILDTYPE', 'Debug')
    BUILD_DIR = _abs_path(ROOT, 'out', BUILDTYPE)
    LUVIT = _abs_path(BUILD_DIR, 'luvit')
    AGENT = _abs_path(BUILD_DIR, _options['PKG_NAME'])


if __name__ == "__main__":
    os.environ['AGENT_BIN'] = AGENT
    os.environ['LUVIT_BIN'] = LUVIT
<commit_msg>Get the Windows build to obey the build type and specify the correct location of the exes.<commit_after>import sys
import os

import optloader

AGENT = None
LUVIT = None
BUNDLE_DIR = None


def _abs_path(*args):
    return os.path.abspath(os.path.join(*args))

_options = optloader.load_options('platform.gypi')['variables']

ROOT = _options['BUNDLE_DIR']  # os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

BUNDLE_DIR = _abs_path(ROOT, _options['BUNDLE_DIR'])
BUNDLE_NAME = _options['BUNDLE_NAME']

if sys.platform == "win32":
    _base_options = optloader.load_options('options.gypi')['variables']
    if _base_options['virgo_debug'] == 'true':
        BUILDTYPE = 'Debug'
    else:
        BUILDTYPE = 'Release'

    BUILD_DIR = _abs_path(ROOT, 'base', BUILDTYPE)
    LUVIT = _abs_path(BUILD_DIR, 'luvit.exe')
    AGENT = _abs_path(BUILD_DIR, 'virgo.exe')
else:
    BUILDTYPE = os.environ.get('BUILDTYPE', 'Debug')
    BUILD_DIR = _abs_path(ROOT, 'out', BUILDTYPE)
    LUVIT = _abs_path(BUILD_DIR, 'luvit')
    AGENT = _abs_path(BUILD_DIR, _options['PKG_NAME'])


if __name__ == "__main__":
    os.environ['AGENT_BIN'] = AGENT
    os.environ['LUVIT_BIN'] = LUVIT

{'fraction_non_alphanumeric': 0.14432989690721648, 'fraction_numerical': 0.0017929179740026895, 'mean_word_length': 4.737789203084833, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '177487', 'n_tokens_mistral': 870, 'n_tokens_neox': 861, 'n_words': 159}