source:
docker/msys/cefpython-66.0.patch@
962:a0b8491a5a12
Last change on this file since 962:a0b8491a5a12 was 936:2d2c88cfc74a, checked in by , 6 years ago | |
---|---|
File size: 8.5 KB |
-
cefpython-66.0/tools/build_cpp_projects.py
old new 1 # Copyright (c) 2017 CEF Python, see the Authors file .1 # Copyright (c) 2017 CEF Python, see the Authors file 2 2 # All rights reserved. Licensed under BSD 3-clause license. 3 3 # Project website: https://github.com/cztomczak/cefpython 4 4 … … 46 46 47 47 # Compiler args 48 48 COMPILER_ARGS = [ 49 "/EHsc",49 #"/EHsc", 50 50 ] 51 51 subprocess_COMPILER_ARGS = [ 52 "/MT", 52 #"/MT", 53 "-pthread", 53 54 ] 54 55 55 56 # Linker args 56 57 subprocess_LINKER_ARGS = [ 57 "/MANIFEST:NO", 58 "/LARGEADDRESSAWARE", 58 #"/MANIFEST:NO", 59 #"/LARGEADDRESSAWARE", 60 "-fstack-protector-all", 61 "-Wl,--subsystem,windows" 59 62 ] 60 63 61 64 # Command line args … … 110 112 def get_compiler(static=False): 111 113 # NOTES: 112 114 # - VS2008 and VS2010 are both using distutils/msvc9compiler.py 113 compiler = new_compiler( )115 compiler = new_compiler(verbose = True) 114 116 # Must initialize so that "compile_options" and others are available 115 compiler.initialize()117 #compiler.initialize() 116 118 if static: 117 compiler.compile_options.remove("/MD")119 #compiler.compile_options.remove("/MD") 118 120 # Overwrite function that adds /MANIFESTFILE, as for subprocess 119 121 # manifest is disabled. Otherwise warning LNK4075 is generated. 120 122 if hasattr(compiler, "manifest_setup_ldargs"): … … 179 181 output_progname="subprocess", 180 182 output_dir=BUILD_SUBPROCESS, 181 183 libraries=["libcef", 182 "libcef_dll_wrapper_MT"], 184 "cef_dll_wrapper", 185 "libcef"], 183 186 library_dirs=[lib_dir, lib_dir_vs], 184 187 # TODO linker flags for Linux/Mac 185 188 extra_preargs=None, 186 extra_postargs=subprocess_LINKER_ARGS) 189 extra_postargs=subprocess_LINKER_ARGS, 190 target_lang="c++") 187 191 else: 188 192 print("[build_cpp_projects.py] Executable is up-to-date: subprocess") 189 193 -
cefpython-66.0/tools/cython_setup.py
old new 129 129 r"C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\Lib", 130 130 # Visual Studio 2008 installation 131 131 r"C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Lib", 132 r"C:\\msys64\\mingw32\\lib" 132 133 ] 133 134 elif ARCH64: 134 135 winsdk_libs = [ … … 180 181 # 181 182 # The above warning LNK4217 is caused by the warning below which occurs 182 183 # when building the client_handler.lib static library: 183 extra_compile_args.extend(["/EHsc", "/wd4305"]) 184 extra_link_args.extend(["/ignore:4217"]) 184 #extra_compile_args.extend(["/EHsc", "/wd4305"]) 185 #extra_link_args.extend(["/ignore:4217"]) 186 if FAST_FLAG: 187 extra_compile_args.append("-O0") 188 else: 189 extra_compile_args.append("-O3") 190 191 extra_compile_args.extend([ 192 "-DNDEBUG", 193 "-std=gnu++11", 194 ]) 195 os.environ["CC"] = "g++" 196 os.environ["CXX"] = "g++" 197 extra_compile_args.extend(["-std=gnu++11"]) 198 199 # Fix "ImportError ... undefined symbol ..." caused by CEF's 200 # include/base/ headers by adding the -flto flag (Issue #230). 201 # Unfortunately -flto prolongs compilation time significantly. 202 # More on the other flags: https://stackoverflow.com/questions/ 203 # 6687630/ . 204 205 if FAST_FLAG: 206 extra_compile_args.extend(["-flto"]) 207 extra_link_args.extend(["-flto"]) 208 else: 209 extra_compile_args.extend(["-flto", 210 "-fdata-sections", 211 "-ffunction-sections"]) 212 extra_link_args.extend(["-flto", 213 "-Wl,--gc-sections"]) 214 extra_link_args.extend(["-fstack-protector-all"]) 185 215 186 216 if LINUX or MAC: 187 217 # Compiler flags … … 365 395 libraries = list() 366 396 if WINDOWS: 367 397 libraries.extend([ 398 "cef_dll_wrapper", 368 399 "libcef", 369 "libcef_dll_wrapper_MD",370 400 "User32", 371 401 "cefpython_app", 372 402 "cpp_utils", 373 403 "client_handler", 404 "gdi32" 374 405 ]) 375 406 elif MAC: 376 407 libraries.extend([ -
cefpython-66.0/src/subprocess/main.cpp
old new 7 7 #if defined(OS_WIN) 8 8 9 9 #include <windows.h> 10 int APIENTRY wWinMain(HINSTANCE hInstance,11 12 LPTSTRlpCmdLine,13 10 int APIENTRY WinMain(HINSTANCE hInstance, 11 HINSTANCE hPrevInstance, 12 LPSTR lpCmdLine, 13 int nCmdShow) 14 14 { 15 15 UNREFERENCED_PARAMETER(hPrevInstance); 16 16 UNREFERENCED_PARAMETER(lpCmdLine); -
cefpython-66.0/tools/make_installer.py
old new 102 102 create_empty_log_file(os.path.join(PKG_DIR, "debug.log")) 103 103 create_empty_log_file(os.path.join(PKG_DIR, "examples/debug.log")) 104 104 105 copy_cpp_extension_dependencies_issue359(PKG_DIR)105 #copy_cpp_extension_dependencies_issue359(PKG_DIR) 106 106 107 107 print("[make_installer.py] Done. Installer package created: {setup_dir}" 108 108 .format(setup_dir=SETUP_DIR)) -
cefpython-66.0/tools/build.py
old new 79 79 # Command line args variables 80 80 SYS_ARGV_ORIGINAL = None 81 81 VERSION = "" 82 NO_RUN_TESTS = False 82 83 NO_RUN_EXAMPLES = False 83 84 DEBUG_FLAG = False 84 85 FAST_FLAG = False … … 125 126 126 127 def command_line_args(): 127 128 global DEBUG_FLAG, FAST_FLAG, CLEAN_FLAG, KIVY_FLAG, HELLO_WORLD_FLAG, \ 128 REBUILD_CPP, VERSION, NO_RUN_ EXAMPLES129 REBUILD_CPP, VERSION, NO_RUN_TESTS, NO_RUN_EXAMPLES 129 130 130 131 VERSION = get_version_from_command_line_args(__file__) 131 132 # Other scripts called by this script expect that version number … … 140 141 global SYS_ARGV_ORIGINAL 141 142 SYS_ARGV_ORIGINAL = copy.copy(sys.argv) 142 143 144 if "--no-run-tests" in sys.argv: 145 NO_RUN_TESTS = True 146 print("[build.py] Running tests disabled (--no-run-tests)") 147 sys.argv.remove("--no-run-tests") 148 143 149 if "--no-run-examples" in sys.argv: 144 150 NO_RUN_EXAMPLES = True 145 151 print("[build.py] Running examples disabled (--no-run-examples)") … … 820 826 sys.exit(1) 821 827 822 828 # Move the cefpython module 823 module_pattern = MODULE_NAME_TEMPLATE.format(pyversion=PYVERSION+"*",824 829 module_pattern = "cefpython_py{pyversion}-cpython-{pyversion}m.dll".\ 830 format(pyversion=PYVERSION+"*", ext=MODULE_EXT) 825 831 module_pattern = "./build/lib*/" + module_pattern 826 832 move_file_by_pattern(module_pattern, os.path.join(CEFPYTHON_BINARY, 827 833 MODULE_NAME)) … … 902 908 delete_directory_reliably(setup_installer_dir) 903 909 904 910 # Run unittests 905 print("[build.py] Run unittests") 906 test_runner = os.path.join(UNITTESTS_DIR, "_test_runner.py") 907 command = ("\"{python}\" {test_runner}" 908 .format(python=sys.executable, 909 test_runner=test_runner)) 910 ret = os.system(command) 911 if ret != 0: 912 print("[build.py] ERROR while running unit tests") 913 sys.exit(1) 911 if not NO_RUN_TESTS: 912 print("[build.py] Run unittests") 913 test_runner = os.path.join(UNITTESTS_DIR, "_test_runner.py") 914 command = ("\"{python}\" {test_runner}" 915 .format(python=sys.executable, 916 test_runner=test_runner)) 917 ret = os.system(command) 918 if ret != 0: 919 print("[build.py] ERROR while running unit tests") 920 sys.exit(1) 914 921 915 922 # Run examples 916 923 if not NO_RUN_EXAMPLES:
Note:
See TracBrowser
for help on using the repository browser.