Skip to content

Commit 7491576

Browse files
committed
Build latest v55 on Windows (#294)...
There is still issue with building vcproj files to be resolved. Currently supported on Windows is only Python 2.7 32-bit. Remove patch deps on Windows and Mac platforms to facilitate building (#300, #231, #251). Create tools/build.py and tools/build_module.py (#210). Cleanup in directories due to new build tools. Update tools/automate.py. DragData methods become Linux-only: GetImage(), HasImage(). This functionality will be available on all platforms when patch is merged into upstream (#251).
1 parent 81a8558 commit 7491576

File tree

109 files changed

+1711
-20809
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+1711
-20809
lines changed

api/DragData.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ Return the text/html fragment that is being dragged.
8080
| --- | --- |
8181
| __Return__ | [Image](Image.md) |
8282

83+
Linux-only currently (#251).
84+
8385
Get image representation of drag data. Check with HasImage() first,
8486
otherwise if there is no image an exception is thrown.
8587

@@ -90,5 +92,7 @@ otherwise if there is no image an exception is thrown.
9092
| --- | --- |
9193
| __Return__ | bool |
9294

95+
Linux-only currently (#251).
96+
9397
Whether image representation of drag data is available.
9498

patches/patch.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,20 @@
1717
'name': 'issue125',
1818
'path': '../net/http/'
1919
},
20-
{
21-
# Discovery of the "icudtl.dat" file fails on Linux.
22-
# Apply patch for all platforms just in case.
23-
'name': 'issue231',
24-
'path': './'
25-
},
26-
{
27-
# Adds drag-image representation during drag & drop in OSR mode.
28-
'name': 'issue251',
29-
'path': './'
30-
},
3120
])
3221

3322
# LINUX
3423
if OS_POSTFIX == "linux":
35-
pass
24+
# noinspection PyUnresolvedReferences
25+
patches.extend([
26+
{
27+
# Discovery of the "icudtl.dat" file fails on Linux.
28+
'name': 'issue231',
29+
'path': './'
30+
},
31+
{
32+
# Adds drag-image representation during drag & drop in OSR mode.
33+
'name': 'issue251',
34+
'path': './'
35+
},
36+
])

src/browser.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,10 @@ cdef class PyBrowser:
415415
self.GetCefBrowserHost().get().ReplaceMisspelling(cef_word)
416416

417417
cpdef py_void SetBounds(self, int x, int y, int width, int height):
418-
if platform.system() == "Linux":
418+
IF UNAME_SYSNAME == "Linux":
419419
x11.SetX11WindowBounds(self.GetCefBrowser(), x, y, width, height)
420-
else:
421-
raise Exception("SetBounds() not impplemented on this platform")
420+
ELSE:
421+
raise Exception("SetBounds() not implemented on this platform")
422422

423423
cpdef py_void SetFocus(self, enable):
424424
self.GetCefBrowserHost().get().SetFocus(bool(enable))
@@ -543,15 +543,15 @@ cdef class PyBrowser:
543543
if "native_key_code" in pyEvent:
544544
cefEvent.native_key_code = int(pyEvent["native_key_code"])
545545
if "is_system_key" in pyEvent:
546-
cefEvent.is_system_key = int(pyEvent["is_system_key"])
546+
cefEvent.is_system_key = int(bool(pyEvent["is_system_key"]))
547547
if "character" in pyEvent:
548548
cefEvent.character = int(pyEvent["character"])
549549
if "unmodified_character" in pyEvent:
550550
cefEvent.unmodified_character = \
551551
int(pyEvent["unmodified_character"])
552552
if "focus_on_editable_field" in pyEvent:
553553
cefEvent.focus_on_editable_field = \
554-
int(pyEvent["focus_on_editable_field"])
554+
int(bool(pyEvent["focus_on_editable_field"]))
555555
self.GetCefBrowserHost().get().SendKeyEvent(cefEvent)
556556

557557
cpdef py_void SendMouseClickEvent(self, int x, int y,

src/cefpython.pyx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -580,15 +580,16 @@ def Initialize(applicationSettings=None, commandLineSwitches=None, **kwargs):
580580
if "switches" in kwargs:
581581
commandLineSwitches = kwargs["switches"]
582582

583-
# Fix Issue #231 - Discovery of the "icudtl.dat" file fails on Linux.
584-
# Apply patch for all platforms just in case.
585-
cdef str py_module_dir = GetModuleDirectory()
586-
cdef CefString cef_module_dir
587-
PyToCefString(py_module_dir, cef_module_dir)
588-
CefOverridePath(PK_DIR_EXE, cef_module_dir)\
589-
or Debug("ERROR: CefOverridePath failed")
590-
CefOverridePath(PK_DIR_MODULE, cef_module_dir)\
591-
or Debug("ERROR: CefOverridePath failed")
583+
IF UNAME_SYSNAME == "Linux":
584+
# Fix Issue #231 - Discovery of the "icudtl.dat" file fails on Linux.
585+
cdef str py_module_dir = GetModuleDirectory()
586+
cdef CefString cef_module_dir
587+
PyToCefString(py_module_dir, cef_module_dir)
588+
CefOverridePath(PK_DIR_EXE, cef_module_dir)\
589+
or Debug("ERROR: CefOverridePath failed")
590+
CefOverridePath(PK_DIR_MODULE, cef_module_dir)\
591+
or Debug("ERROR: CefOverridePath failed")
592+
# END IF UNAME_SYSNAME == "Linux":
592593

593594
if not applicationSettings:
594595
applicationSettings = {}

src/client_handler/client_handler_py27_32bit.vcproj

Lines changed: 0 additions & 168 deletions
This file was deleted.
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<VisualStudioProject
3+
ProjectType="Visual C++"
4+
Version="9.00"
5+
Name="client_handler_py27_win32"
6+
RootNamespace="client_handler_py27_win32"
7+
ProjectGUID="{15AD928F-FFD0-4FA5-B469-E42ABB0B4196}"
8+
Keyword="Win32Proj"
9+
TargetFrameworkVersion="0"
10+
>
11+
<Platforms>
12+
<Platform Name="Win32" />
13+
</Platforms>
14+
<ToolFiles>
15+
</ToolFiles>
16+
<Configurations>
17+
<Configuration
18+
Name="Release|Win32"
19+
OutputDirectory="Release_py27_win32"
20+
IntermediateDirectory="Release_py27_win32"
21+
ConfigurationType="4"
22+
>
23+
<Tool Name="VCPreBuildEventTool" />
24+
<Tool Name="VCCustomBuildTool" />
25+
<Tool Name="VCXMLDataGeneratorTool" />
26+
<Tool Name="VCWebServiceProxyGeneratorTool" />
27+
<Tool Name="VCMIDLTool" />
28+
<Tool
29+
Name="VCCLCompilerTool"
30+
AdditionalIncludeDirectories="../;$(PYTHON_INCLUDE_PATH);C:\Python27\include"
31+
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;"
32+
ExceptionHandling="1"
33+
RuntimeLibrary="2"
34+
UsePrecompiledHeader="0"
35+
WarningLevel="3"
36+
Detect64BitPortabilityProblems="false"
37+
DebugInformationFormat="3"
38+
/>
39+
<Tool Name="VCManagedResourceCompilerTool" />
40+
<Tool Name="VCResourceCompilerTool" />
41+
<Tool Name="VCPreLinkEventTool" />
42+
<Tool Name="VCLibrarianTool" />
43+
<Tool Name="VCALinkTool" />
44+
<Tool Name="VCXDCMakeTool" />
45+
<Tool Name="VCBscMakeTool" />
46+
<Tool Name="VCFxCopTool" />
47+
<Tool Name="VCPostBuildEventTool" />
48+
</Configuration>
49+
</Configurations>
50+
<References>
51+
</References>
52+
<Files>
53+
<Filter
54+
Name="Header Files"
55+
Filter="h;hpp;hxx;hm;inl;inc;xsd"
56+
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
57+
>
58+
<File RelativePath=".\client_handler.h"></File>
59+
<File RelativePath=".\context_menu_handler.h"></File>
60+
<File RelativePath=".\cookie_visitor.h"></File>
61+
<File RelativePath=".\display_handler.h"></File>
62+
<File RelativePath=".\download_handler.h"></File>
63+
<File RelativePath=".\dpi_aware.h"></File>
64+
<File RelativePath=".\focus_handler.h"></File>
65+
<File RelativePath=".\js_dialog_handler.h"></File>
66+
<File RelativePath=".\keyboard_handler.h"></File>
67+
<File RelativePath=".\lifespan_handler.h"></File>
68+
<File RelativePath=".\load_handler.h"></File>
69+
<File RelativePath=".\render_handler.h"></File>
70+
<File RelativePath=".\request_context_handler.h"></File>
71+
<File RelativePath=".\request_handler.h"></File>
72+
<File RelativePath=".\resource_handler.h"></File>
73+
<File RelativePath=".\string_visitor.h"></File>
74+
<File RelativePath=".\task.h"></File>
75+
<File RelativePath=".\web_request_client.h"></File>
76+
</Filter>
77+
<Filter
78+
Name="Resource Files"
79+
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx"
80+
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
81+
>
82+
</Filter>
83+
<Filter
84+
Name="Source Files"
85+
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
86+
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
87+
>
88+
<File RelativePath=".\client_handler.cpp"></File>
89+
<File RelativePath=".\context_menu_handler.cpp"></File>
90+
<File RelativePath=".\cookie_visitor.cpp"></File>
91+
<File RelativePath=".\display_handler.cpp"></File>
92+
<File RelativePath=".\download_handler.cpp"></File>
93+
<File RelativePath=".\dpi_aware.cpp"></File>
94+
<File RelativePath=".\focus_handler.cpp"></File>
95+
<File RelativePath=".\js_dialog_handler.cpp"></File>
96+
<File RelativePath=".\keyboard_handler.cpp"></File>
97+
<File RelativePath=".\lifespan_handler.cpp"></File>
98+
<File RelativePath=".\load_handler.cpp"></File>
99+
<File RelativePath=".\render_handler.cpp"></File>
100+
<File RelativePath=".\request_context_handler.cpp"></File>
101+
<File RelativePath=".\request_handler.cpp"></File>
102+
<File RelativePath=".\resource_handler.cpp"></File>
103+
<File RelativePath=".\string_visitor.cpp"></File>
104+
<File RelativePath=".\task.cpp"></File>
105+
<File RelativePath=".\web_request_client.cpp"></File>
106+
</Filter>
107+
</Files>
108+
<Globals>
109+
</Globals>
110+
</VisualStudioProject>

0 commit comments

Comments
 (0)