<commit_before>#!python3
"""
This script combines the required engine and project files into a single directory.
It does not package the assets into .pak files, it simply collects the files that are present.
"""
import os
import shutil
import fnmatch
import subprocess

engine_version = '5.2'
engine_path = r'C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_{}'.format(engine_version)

project_path = os.path.join(engine_path, 'Templates', 'cpp', 'RollingBall')
export_path = os.path.join(os.environ['HOMEDRIVE'], os.environ['HOMEPATH'], 'Desktop', 'ce_game')
dll_name = 'Game.dll'

binary_excludes = ['imageformats**',
                   'ToolkitPro*',
                   'platforms**',
                   'Qt*',
                   'mfc*',
                   'CryGame*',
                   'Sandbox*',
                   'ShaderCacheGen*',
                   'smpeg2*',
                   'icu*',
                   'python27*',
                   'LuaCompiler*',
                   'Editor**'
                   ]


def copy_directory(source_dir, rel_dir, excludes):
    """
    Copy a directory to its corresponding location in the export directory.
    :param source_dir: Current location of the files (project_path or engine_path).
    :param rel_dir: Path of the directory to copy, relative to *source_dir*.
    :param excludes: List of filename patterns to exclude from the copying procedure (glob format).
    """
    copypaths = []
    pwd = os.getcwd()
    os.chdir(source_dir)

    for root, _, filenames in os.walk(rel_dir):
        for filename in filenames:
            copypaths.append(os.path.normpath(os.path.join(root, filename)))
    os.chdir(pwd)

    for path in copypaths:
        excluded = False
        for pattern in excludes:
            excluded = excluded or fnmatch.fnmatch(path, os.path.join(rel_dir, pattern))
        if excluded:<commit_msg>Add 64-bit 7-zip to the PATH, implicitly judging 32-bit users.<commit_after>#!python3
"""
This script combines the required engine and project files into a single directory.
It does not package the assets into .pak files, it simply collects the files that are present.
"""
import os
import shutil
import fnmatch
import subprocess

engine_version = '5.2'
engine_path = r'C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_{}'.format(engine_version)

project_path = os.path.join(engine_path, 'Templates', 'cpp', 'RollingBall')
export_path = os.path.join(os.environ['HOMEDRIVE'], os.environ['HOMEPATH'], 'Desktop', 'ce_game')
dll_name = 'Game.dll'

binary_excludes = ['imageformats**',
                   'ToolkitPro*',
                   'platforms**',
                   'Qt*',
                   'mfc*',
                   'CryGame*',
                   'Sandbox*',
                   'ShaderCacheGen*',
                   'smpeg2*',
                   'icu*',
                   'python27*',
                   'LuaCompiler*',
                   'Editor**'
                   ]
os.environ['PATH'] = os.environ['PATH'] + os.pathsep + r"C:\Program Files\7-Zip"


def copy_directory(source_dir, rel_dir, excludes):
    """
    Copy a directory to its corresponding location in the export directory.
    :param source_dir: Current location of the files (project_path or engine_path).
    :param rel_dir: Path of the directory to copy, relative to *source_dir*.
    :param excludes: List of filename patterns to exclude from the copying procedure (glob format).
    """
    copypaths = []
    pwd = os.getcwd()
    os.chdir(source_dir)

    for root, _, filenames in os.walk(rel_dir):
        for filename in filenames:
            copypaths.append(os.path.normpath(os.path.join(root, filename)))
    os.chdir(pwd)

    for path in copypaths:
        excluded = False
        for pattern in excludes:
            excluded = excluded or fnmatch.fnmatch(path, os.path.join(rel_dir, pattern))
        if excluded:
{'fraction_non_alphanumeric': 0.11170756646216769, 'fraction_numerical': 0.005623721881390593, 'mean_word_length': 2.3908145580589255, 'pattern_counts': {'":': 0, '<': 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': '76716', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1139, 'n_words': 325}