From c5a091b1bd7e72711120318a5dace6af0c907b62 Mon Sep 17 00:00:00 2001 From: Dylan McCall Date: Tue, 22 Jun 2021 11:30:00 -0700 Subject: [PATCH 1/2] Add a github workflow to build cef and cefpython --- .github/workflows/main.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..ddf3df747 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,44 @@ +name: Build cef and cefpython + +on: + workflow_dispatch: + inputs: + version: + description: 'Version' + required: true + +jobs: + build: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 2.7 + + - name: Install requirements + run: | + pip install -r tools/requirements.txt + + - name: Build cef + run: | + mkdir -p build + cd build + python ../tools/automate.py --build-cef --proprietary-codecs --ninja-jobs 4 + + - name: Build cefpython + run: | + mkdir -p build + cd build + python ../tools/build.py ${{ github.event.inputs.version }} + python ../tools/make_installer.py ${{ github.event.inputs.version }} --wheel --universal + + - uses: actions/upload-artifact@v2 + with: + name: "cefpython" + path: "build/cefpython3_*/dist/*.whl" + From 3000136e7fc13053d175f5d119df75e449463af8 Mon Sep 17 00:00:00 2001 From: Dylan McCall Date: Thu, 24 Jun 2021 08:02:04 -0700 Subject: [PATCH 2/2] Fix error from using Options.cef_binary before it is set --- src/compile_time_constants.pxi | 6 +----- tools/automate.py | 10 +++++----- tools/cython_setup.py | 8 ++++---- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/compile_time_constants.pxi b/src/compile_time_constants.pxi index bf130d6ed..24a1db3be 100644 --- a/src/compile_time_constants.pxi +++ b/src/compile_time_constants.pxi @@ -1,10 +1,6 @@ # This file was generated by setup.py - -# Type this command to ignore changes to this file: -# git update-index --assume-unchanged src/compile_time_constants.pxi - DEF UNAME_SYSNAME = "Windows" -DEF PY_MAJOR_VERSION = 3 +DEF PY_MAJOR_VERSION = 2 cdef extern from "limits.h": cdef int INT_MIN cdef int INT_MAX diff --git a/tools/automate.py b/tools/automate.py index 2ba882785..6ba2dcc32 100644 --- a/tools/automate.py +++ b/tools/automate.py @@ -371,11 +371,6 @@ def build_cef_projects(): """Build cefclient, cefsimple, ceftests, libcef_dll_wrapper.""" print("[automate.py] Build cef projects...") - if WINDOWS: - fix_cmake_variables_permanently_windows() - - fix_cef_include_files() - # Find cef_binary directory. # Might already be set if --prebuilt-cef flag was passed. if not Options.cef_binary: @@ -401,6 +396,11 @@ def build_cef_projects(): assert os.path.exists(cef_binary) Options.cef_binary = cef_binary + if WINDOWS: + fix_cmake_variables_permanently_windows() + + fix_cef_include_files() + # Set build directory build_cefclient_dir = os.path.join(Options.cef_binary, "build_cefclient") diff --git a/tools/cython_setup.py b/tools/cython_setup.py index 436bcb2ce..331e47d78 100644 --- a/tools/cython_setup.py +++ b/tools/cython_setup.py @@ -148,14 +148,14 @@ def get_winsdk_lib(): if ARCH32: winsdk_libs = [ # Windows 7 SDKs. - r"C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib", - r"C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\Lib", + r"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.1A\\Lib", + r"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib", ] elif ARCH64: winsdk_libs = [ # Windows 7 SDKs. - r"C:\\Program Files\\Microsoft SDKs\\Windows\\v7.1\\Lib\\x64", - r"C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0\\Lib\\x64", + r"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.1A\\Lib\\x64", + r"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\\x64", ] else: raise Exception("Unknown architecture")