Skip to content

Commit

Permalink
Attempt to fix sourcebuild on Windows (closes #171)
Browse files Browse the repository at this point in the history
  • Loading branch information
mara004 committed Jan 30, 2023
1 parent 0b46745 commit e895633
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions setupsrc/pl_setup/build_pdfium.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ def pack(src_libpath, v_libpdfium, destname=None):
call_ctypesgen(OutputDir, include_dir)


def get_tool(tool, win_append):
exe = join(DepotToolsDir, tool)
def get_tool(name):
bin = join(DepotToolsDir, name)
if sys.platform.startswith("win32"):
exe += "." + win_append
return exe
bin += ".bat"
return bin


def serialise_config(config_dict):
Expand Down Expand Up @@ -261,9 +261,9 @@ def main(

dl_depottools(b_update)

GClient = get_tool("gclient", "bat")
GN = get_tool("gn", "bat")
Ninja = get_tool("ninja", "exe")
GClient = get_tool("gclient")
GN = get_tool("gn")
Ninja = get_tool("ninja")

pdfium_dl_done = dl_pdfium(GClient, b_update, b_revision)
v_libpdfium = get_pdfium_version()
Expand Down

0 comments on commit e895633

Please sign in to comment.