Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix remote inspector when building statically. #291

Merged
merged 1 commit into from

2 participants

@jonleighton

For some reason, it seems that checking CONFIG(static) inside
src/phantomjs.pro is not reliable. That caused the STATIC_BUILD define
not to be set, and hence Q_INIT_RESOURCE would never get called in
main.cpp.

Instead of using Q_INIT_RESOURCE, let's just compile the resources
directly into the phantomjs binary. This means we don't need to detect
whether Qt is linked statically or dynamically.

https://code.google.com/p/phantomjs/issues/detail?id=430

(I have manage to make a static build on Linux to reproduce this issue - PR for that coming up - but I haven't been able to verify this fix on OS X. I am pretty sure that it works, but it would be worth verifying. Also, please cherry-pick to the 1.6 branch?)

@jonleighton jonleighton Fix remote inspector when building statically.
For some reason, it seems that checking CONFIG(static) inside
src/phantomjs.pro is not reliable. That caused the STATIC_BUILD define
not to be set, and hence Q_INIT_RESOURCE would never get called in
main.cpp.

Instead of using Q_INIT_RESOURCE, let's just compile the resources
directly into the phantomjs binary. This means we don't need to detect
whether Qt is linked statically or dynamically.

https://code.google.com/p/phantomjs/issues/detail?id=430
95186c6
@ariya ariya merged commit 940e008 into ariya:master
@detro detro referenced this pull request from a commit in detro/phantomjs-ghostdriver
@detro detro Importing GhostDriver 1.1.0 in PhantomJS.
CHANGELOG for v1.1.0 (https://github.com/detro/ghostdriver/issues?labels=1.1.0&state=closed)

JavaScript Driver (Core)
* ENHANCEMENT: `/maximize` window will set the window size to 1336x768,
currently most common resolution online (see http://gs.statcounter.com/#resolution-ww-monthly-201307-201312)
* ENHANCEMENT #275: Implemented Browser and Network (HAR) Logging types
* FIXED #284: Attempt to wait for Page to Load if input causes form submit
* FIXED #291: Throw exception when attempting to set invalid timeout value
* FIXED #259: Fix issue regarding mouse clicks
* ENHANCEMENT #290: Enabled support for "Keep Alive" HTTP connections
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Driver part)
* ENHANCEMENT #293: Import Selenium 2.39.0 WebDriver Atoms

Java Binding
* MINOR #251: Minor compilation issues for Binding
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Java Binding part)

Tested using GhostDriver validation tests (https://github.com/detro/ghostdriver/tree/master/test).
8d598f9
@detro detro referenced this pull request from a commit
@detro detro Importing GhostDriver 1.1.0 in PhantomJS.
CHANGELOG for v1.1.0 (https://github.com/detro/ghostdriver/issues?labels=1.1.0&state=closed)

JavaScript Driver (Core)
* ENHANCEMENT: `/maximize` window will set the window size to 1336x768,
currently most common resolution online (see http://gs.statcounter.com/#resolution-ww-monthly-201307-201312)
* ENHANCEMENT #275: Implemented Browser and Network (HAR) Logging types
* FIXED #284: Attempt to wait for Page to Load if input causes form submit
* FIXED #291: Throw exception when attempting to set invalid timeout value
* FIXED #259: Fix issue regarding mouse clicks
* ENHANCEMENT #290: Enabled support for "Keep Alive" HTTP connections
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Driver part)
* ENHANCEMENT #293: Import Selenium 2.39.0 WebDriver Atoms

Java Binding
* MINOR #251: Minor compilation issues for Binding
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Java Binding part)

Tested using GhostDriver validation tests (https://github.com/detro/ghostdriver/tree/master/test).

#11877
a9a219e
@detro detro referenced this pull request from a commit
@detro detro Importing GhostDriver 1.1.0 in PhantomJS.
CHANGELOG for v1.1.0 (https://github.com/detro/ghostdriver/issues?labels=1.1.0&state=closed)

JavaScript Driver (Core)
* ENHANCEMENT: `/maximize` window will set the window size to 1336x768,
currently most common resolution online (see http://gs.statcounter.com/#resolution-ww-monthly-201307-201312)
* ENHANCEMENT #275: Implemented Browser and Network (HAR) Logging types
* FIXED #284: Attempt to wait for Page to Load if input causes form submit
* FIXED #291: Throw exception when attempting to set invalid timeout value
* FIXED #259: Fix issue regarding mouse clicks
* ENHANCEMENT #290: Enabled support for "Keep Alive" HTTP connections
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Driver part)
* ENHANCEMENT #293: Import Selenium 2.39.0 WebDriver Atoms

Java Binding
* MINOR #251: Minor compilation issues for Binding
* ENHANCEMENT #262: Allow access to PhantomJS API from WebDriver (Java Binding part)

Tested using GhostDriver validation tests (https://github.com/detro/ghostdriver/tree/master/test).

#11877
0947eb6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 7, 2012
  1. @jonleighton

    Fix remote inspector when building statically.

    jonleighton authored
    For some reason, it seems that checking CONFIG(static) inside
    src/phantomjs.pro is not reliable. That caused the STATIC_BUILD define
    not to be set, and hence Q_INIT_RESOURCE would never get called in
    main.cpp.
    
    Instead of using Q_INIT_RESOURCE, let's just compile the resources
    directly into the phantomjs binary. This means we don't need to detect
    whether Qt is linked statically or dynamically.
    
    https://code.google.com/p/phantomjs/issues/detail?id=430
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 9 deletions.
  1. +0 −5 src/main.cpp
  2. +3 −4 src/phantomjs.pro
View
5 src/main.cpp
@@ -61,11 +61,6 @@ int main(int argc, char** argv, const char** envp)
Utils::printDebugMessages = phantom.printDebugMessages();
qInstallMsgHandler(Utils::messageHandler);
-#ifdef STATIC_BUILD
- Q_INIT_RESOURCE(WebKit);
- Q_INIT_RESOURCE(InspectorBackendStub);
-#endif
-
app.setWindowIcon(QIcon(":/phantomjs-icon.png"));
app.setApplicationName("PhantomJS");
app.setOrganizationName("Ofi Labs");
View
7 src/phantomjs.pro
@@ -5,7 +5,9 @@ CONFIG += console
DESTDIR = ../bin
-RESOURCES = phantomjs.qrc
+RESOURCES = phantomjs.qrc \
+ qt/src/3rdparty/webkit/Source/WebCore/inspector/front-end/WebKit.qrc \
+ qt/src/3rdparty/webkit/Source/WebCore/generated/InspectorBackendStub.qrc
HEADERS += csconverter.h \
phantom.h \
@@ -103,6 +105,3 @@ mac {
# Uncomment to build a Mac OS X Universal Binary (i.e. x86 + ppc)
# CONFIG += x86 ppc
}
-CONFIG(static) {
- DEFINES += STATIC_BUILD
-}
Something went wrong with that request. Please try again.