Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade to Qt 5.9.2 + Qt WebEngine #1720

Merged
merged 224 commits into from Jan 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
224 commits
Select commit Hold shift + click to select a range
ac91421
request Qt 5.9.2 in CMake
kevinushey Oct 31, 2017
c059e2b
move from QWebFrame -> QWebPage, etc
kevinushey Oct 31, 2017
a3d4acb
some more porting
kevinushey Oct 31, 2017
32c287d
use C++11 in desktop
kevinushey Oct 31, 2017
c600e17
simplify rstudio-dev script
kevinushey Oct 31, 2017
9612dd0
move to async 'runJavaScript()'; stubs
kevinushey Nov 1, 2017
1f8739a
set LD_LIBRARY_PATH for devmode
kevinushey Nov 1, 2017
69f8e02
register objects
kevinushey Nov 1, 2017
7aaa6ba
switch to TCP; set shared secret w/interceptor
kevinushey Nov 3, 2017
a53f234
implement some helpers for synchronous JS
kevinushey Nov 3, 2017
1e67fae
tweak event loop
kevinushey Nov 3, 2017
69ce158
enable developer console
kevinushey Nov 3, 2017
6889ce9
developer console + channel for callbacks
kevinushey Nov 6, 2017
9ba29be
command description for dev console
kevinushey Nov 6, 2017
a2d5ac0
more work getting QWebChannel exposed
kevinushey Nov 6, 2017
5641513
stubs (avoid synchronous JS eval)
kevinushey Nov 6, 2017
dba636f
enforce non-null strings
kevinushey Nov 6, 2017
3759f9d
remove debug hook
kevinushey Nov 6, 2017
b5f93a9
open dev console in minimal window
kevinushey Nov 6, 2017
40e889a
first steps in callback style for desktop dialogs
kevinushey Nov 7, 2017
fef025c
'getOpenFileName()' is now async
kevinushey Nov 7, 2017
c0214e4
stub for VCS refresh
kevinushey Nov 7, 2017
554cb29
some more sync -> async work
kevinushey Nov 7, 2017
c1e5a32
define 'DesktopInfo' for platform-related state
kevinushey Nov 7, 2017
3733ee8
more work on DesktopInfo class
kevinushey Nov 7, 2017
29c5ad1
declare properties as constant
kevinushey Nov 7, 2017
8d95117
simplify
kevinushey Nov 7, 2017
0f0f9e2
migrate a few more entries over to DesktopInfo
kevinushey Nov 7, 2017
76570ac
use singleton for ease of access
kevinushey Nov 8, 2017
249da43
handle quitR()
kevinushey Nov 8, 2017
1703fd0
handle title bar
kevinushey Nov 8, 2017
287acd2
initial work on closing of source window
kevinushey Nov 8, 2017
4d906d3
load QWebChannel earlier (needed for init)
kevinushey Nov 8, 2017
87ab1e7
handle Copy + Cut w/Ace
kevinushey Nov 8, 2017
0dd6964
handle getting / setting sumatra pdf path
kevinushey Nov 8, 2017
8342c5a
handle fonts
kevinushey Nov 8, 2017
008f6b5
build Boost with MSVC
kevinushey Nov 13, 2017
b451b01
begin porting MSVC
kevinushey Nov 14, 2017
6639e55
move callback wrapper generation into passthrough generator
jmcphers Nov 14, 2017
c269ea0
first successful build with MSVC
kevinushey Nov 15, 2017
71b3c52
adjust for Java/JSNI syntax
jmcphers Nov 15, 2017
6ad956b
Merge pull request #1757 from rstudio/feature/desktop-lambdas
jmcphers Nov 15, 2017
4d14e99
initial provisioning for debug/release Boost
kevinushey Nov 15, 2017
4e2f9ad
add .dll -> .lib helper
kevinushey Nov 15, 2017
7700e38
some CMake fixups
kevinushey Nov 15, 2017
c0f02a0
use correct ace bin dir when building (from upstream)
jmcphers Nov 15, 2017
cc10902
fix up remaining acesupport dirs
jmcphers Nov 16, 2017
1b8a288
run in desktop mode when QtWebEngine is involved
jmcphers Nov 16, 2017
7cb6078
use shared runtime; fix a couple assertions
kevinushey Nov 16, 2017
70c3fc8
more dll imports
kevinushey Nov 16, 2017
421a91e
update comments
kevinushey Nov 16, 2017
e7517e0
fix potential memory error
kevinushey Nov 16, 2017
c61ee9d
invoke web window opener from desktop window opener
jmcphers Nov 16, 2017
4adae7f
populate font information from parent window if available
jmcphers Nov 16, 2017
d3098af
manage asynchronous window close stages in source windows
jmcphers Nov 17, 2017
a7ffd1f
move to TCP/IP for Windows
kevinushey Nov 16, 2017
f56dc48
Merge remote-tracking branch 'origin/master' into feature/qt-5.9.2-we…
jmcphers Nov 28, 2017
3af65a8
build Qt desktop instead of Cocoa desktop for Apple
gtritchie Nov 28, 2017
0211692
Quick pass through trivial C++ 11 refactorings
gtritchie Nov 28, 2017
3a5d963
Win32-specific NULL to nullptr
gtritchie Nov 28, 2017
da71d54
remove/refactor to eliminate unsupported JavaScriptWindowObjectCleared
jmcphers Nov 28, 2017
ea1c81f
misc c++ cleanup
gtritchie Nov 28, 2017
2a1ae4c
QtWebPage::javaScriptConsoleMessage and QtWebPage::acceptNavigationRe…
gtritchie Nov 28, 2017
222f112
reimplement print support for QtWebEngine
jmcphers Nov 28, 2017
85dd400
Qt on Mac doesn't have platformthemes plugin
gtritchie Nov 29, 2017
c459f6c
Merge branch 'feature/qt-5.9.2-mac' into feature/qt-5.9.2-webengine
gtritchie Nov 29, 2017
8c7288f
Merge branch 'master' into feature/qt-5.9.2-mac
gtritchie Nov 29, 2017
ac45537
Remove isCocoa desktop hook, cleanup uses
gtritchie Nov 29, 2017
c297a24
Merge branch 'master' into feature/qt-5.9.2-webengine
gtritchie Nov 29, 2017
749e6c0
Merge pull request #1799 from rstudio/feature/qt-5.9.2-mac
jmcphers Nov 30, 2017
65ae0e6
move command state management to a push model
jmcphers Nov 30, 2017
4530595
Mac main menu missing Help menu
gtritchie Nov 30, 2017
a6f4f7e
On Mac, Help/About and Build/Configure Build Tools were missing
gtritchie Nov 30, 2017
801f309
Merge branch 'master' into feature/qt-5.9.2-webengine
gtritchie Nov 30, 2017
ce401d6
sync menu labels with desktop frame
jmcphers Nov 30, 2017
04a36fb
remove rstudio.cocoa from SuperDevMode gwt xml
gtritchie Dec 1, 2017
c91b098
Avoid crash when closing RStudio on Mac
gtritchie Dec 1, 2017
20038da
Closing main window with "X" doesn't prompt to save changes
gtritchie Dec 1, 2017
a963175
Parse return value from showMessageBox desktop hook as a string
gtritchie Dec 1, 2017
efecae6
Delete sources for unused Qt-based About dialog
gtritchie Dec 1, 2017
8fcca01
Cleanup two invalid isMacintoshDesktop checks
gtritchie Dec 1, 2017
34d50e3
Fix make_package on Mac
gtritchie Dec 3, 2017
8b353bb
Merge branch 'master' into feature/qt-5.9.2-webengine
gtritchie Dec 3, 2017
3bef870
Merge branch 'feature/qt-5.9.2-webengine-msvc' into feature/qt-5.9.2-…
kevinushey Dec 5, 2017
12260d3
fix bad merge
kevinushey Dec 5, 2017
a912173
Delete unused source files.
gtritchie Dec 5, 2017
04e13a1
Merge remote-tracking branch 'origin/feature/qt-5.9.2-webengine' into…
gtritchie Dec 5, 2017
29ad80e
Install Qt platforms plugin on Mac, WIP on package build for Mac.
gtritchie Dec 5, 2017
6c1c989
guard C++11 check
kevinushey Dec 5, 2017
0075d83
add missing header (for MSVC)
kevinushey Dec 5, 2017
eb1dbd6
fixup refacto
kevinushey Dec 5, 2017
6102ce1
some more windows build tweaks
kevinushey Dec 6, 2017
c1b494d
Fix rstudio-core-test build break on non-Win32
gtritchie Dec 6, 2017
2ef3628
build OpenSSL with MSVC
kevinushey Dec 6, 2017
7980425
Copy QtWebEngineProcess.app when installing (not caught by fixup_bundle)
gtritchie Dec 6, 2017
f0b7d14
Merge remote-tracking branch 'origin/feature/qt-5.9.2-webengine' into…
gtritchie Dec 6, 2017
cea8a81
produce both debug, release builds of openssl
kevinushey Dec 6, 2017
515b8fb
CMake fixup + test tweak
kevinushey Dec 7, 2017
e9e0112
get tests running on Windows
kevinushey Dec 7, 2017
c1ee9b5
fix up OB1 errors caught by MSVC
kevinushey Dec 7, 2017
fd99548
work on win32 package builds
kevinushey Dec 7, 2017
0955035
more work on Windows package build
kevinushey Dec 7, 2017
1425453
automatically call dll2lib.R; more 64bit build work
kevinushey Dec 7, 2017
666b16a
bail if nothing to do
kevinushey Dec 7, 2017
7be0b66
some more work for Windows package builds
kevinushey Dec 7, 2017
35cec49
include version agnostic symbolic link to QtWebEngineProcess folder
gtritchie Dec 7, 2017
7f7e2b9
Use Qt's macdeployqt command when building Mac installation package
gtritchie Dec 8, 2017
8628e13
fixups + openssl link change
kevinushey Dec 8, 2017
74bd942
Merge remote-tracking branch 'origin/master' into feature/qt-5.9.2-we…
jmcphers Dec 8, 2017
178900a
Show correct shortcut symbol for Cmd on Mac Menus
gtritchie Dec 8, 2017
fc8520a
call windeployqt to bundle Qt
kevinushey Dec 8, 2017
691814b
include resource files
kevinushey Dec 8, 2017
0ce8e20
build script updates
kevinushey Dec 8, 2017
99be36e
Delete unused DesktopCommandInvoker class
gtritchie Dec 9, 2017
d84a073
build both debug, release Boost
kevinushey Dec 9, 2017
9b1a904
updates to OpenSSL install script
kevinushey Dec 9, 2017
d11d8d7
allow alternate installation directory
kevinushey Dec 9, 2017
d2b7f3e
further tweaks to installer script
kevinushey Dec 9, 2017
886af3c
use install target for 64-bit build
kevinushey Dec 9, 2017
3384620
Remove Qt4 / MacOS 10.9-specific font substitution fix
gtritchie Dec 9, 2017
e89227f
Fix test-running script
gtritchie Dec 11, 2017
b77f6d4
check for ant, cmake when building
kevinushey Dec 11, 2017
c2c9ca7
update resource files
kevinushey Dec 11, 2017
60e0bfd
disable automatic manifest generation
kevinushey Dec 11, 2017
e9d3ed8
scope .rc files to win32
kevinushey Dec 11, 2017
71b1e7e
compile RStudio using Windows subsystem
kevinushey Dec 12, 2017
b2d7ce2
Fix crash in core unit test on Mac
gtritchie Dec 12, 2017
d8abcd7
compile urlopener, rsinverse w/windows subsystem
kevinushey Dec 12, 2017
bc08a3a
Make default RToken safer to use as a dummy/empty token
gtritchie Dec 12, 2017
37ef5fd
fix nmake-based builds
kevinushey Dec 12, 2017
416d4d2
Merge branch 'feature/qt-5.9.2-webengine' of https://github.com/rstud…
kevinushey Dec 12, 2017
fda83ee
some fixups caught in windows debug build
kevinushey Dec 12, 2017
648dcf7
Set NSFunctionBarAPIEnabled to NO on Mac
gtritchie Dec 12, 2017
d5f1607
Merge remote-tracking branch 'origin/feature/qt-5.9.2-webengine' into…
gtritchie Dec 12, 2017
ea4fb3c
fixups + fix OOB read during git status
kevinushey Dec 12, 2017
0e3622e
defend against undefined
kevinushey Dec 12, 2017
e517e86
guard usage of declspec
kevinushey Dec 12, 2017
bfca732
allow one more Qt location
kevinushey Dec 12, 2017
36c8def
simpler, gcc-5-compatible 'relativePath'
kevinushey Dec 13, 2017
d00d117
catch boost errors
kevinushey Dec 13, 2017
b9f68dc
enable high dpi scaling
kevinushey Dec 13, 2017
c8519d7
avoid attempt to set desktop info in satellite
kevinushey Dec 13, 2017
eadc760
work on Linux package build
kevinushey Dec 14, 2017
9239cde
add missing dependency
kevinushey Dec 14, 2017
2ed25c1
use linuxdeployqt for bundling of Qt
kevinushey Dec 15, 2017
b58eeac
remove old Qt patch for mac
kevinushey Dec 15, 2017
bd347d0
fix up rpaths
kevinushey Dec 15, 2017
808c8e0
place linuxdeployqt on S3
kevinushey Dec 15, 2017
27db8ae
quiet output from linuxdeployqt
kevinushey Dec 15, 2017
6bc68c5
add Boost to installer script
kevinushey Dec 18, 2017
e325b60
avoid crash on exit w/debug builds
kevinushey Dec 18, 2017
da6033b
work around JS casting issue
kevinushey Dec 18, 2017
af85a98
handle desktop zoom level
kevinushey Dec 18, 2017
0513f98
disable web security in devmode (allow sourcemaps)
kevinushey Dec 19, 2017
c504983
disable 'toggle full screen' on non-macOS
kevinushey Dec 19, 2017
c48934d
add Qt installer script
kevinushey Dec 19, 2017
c2df4fb
fix cut/copy/paste and friends
kevinushey Dec 19, 2017
043af6d
shortcut entries for edit commands
kevinushey Dec 19, 2017
aff02ad
hide duplicated separators in the main menu
kevinushey Dec 20, 2017
5fb9542
hide commands with no associated label
kevinushey Dec 20, 2017
e08eb71
allow execution of 'vcsRefreshNoError' again
kevinushey Dec 20, 2017
7eab702
avoid duplicate call to project MRU clear
kevinushey Dec 20, 2017
b0a88b6
fix up 'isWithin()' implementation
kevinushey Dec 20, 2017
2e7f1d4
remove test file from source list
kevinushey Dec 20, 2017
5c790e4
add some simple file path tests
kevinushey Dec 20, 2017
bab491d
move VCS refresh logic to client side
kevinushey Dec 20, 2017
9c7a81b
match function signature with client side
kevinushey Dec 20, 2017
db11dc8
only toggle visiblity off for already-visible items
kevinushey Dec 20, 2017
763a943
fix up chunk execution on Windows
kevinushey Dec 21, 2017
a134c2d
file.edit(): do not expand paths on R side
kevinushey Dec 21, 2017
8a5bc29
provide <cctype> wrappers, to avoid UB
kevinushey Dec 21, 2017
0bf7b0b
missing header include
kevinushey Dec 21, 2017
f5bd6db
fix up sigtip logic
kevinushey Dec 21, 2017
33ad3d0
report where Qt was found
kevinushey Dec 21, 2017
e1f60c9
remove superfluous slash
kevinushey Dec 21, 2017
6660420
manually swap Ctrl, Meta to work around Qt bug
kevinushey Dec 21, 2017
9f26893
tidy up
kevinushey Dec 21, 2017
57e8ac5
move gemoetry saving code to close handler
kevinushey Dec 21, 2017
e428d94
fix up shortcut display in menus
kevinushey Dec 21, 2017
5d0b851
allow both files and directories (for e.g. Open Project)
kevinushey Dec 21, 2017
03eb882
fix up styling of message boxes on macOS
kevinushey Dec 21, 2017
ce1c713
no longer need to set old policy
kevinushey Dec 22, 2017
b8cd322
synchronize zoom levels between desktop + client
kevinushey Jan 2, 2018
dc45253
replace mnenomics before setting label
kevinushey Jan 2, 2018
cf6f4d3
Remove various menu items on Mac
gtritchie Jan 2, 2018
f288cb5
Replace get_system_category() with system_category()
Mailaender Jan 2, 2018
6d7f960
compatibility with Boost 1.66.0
kevinushey Jan 2, 2018
4290875
Merge branch 'master' into feature/qt-5.9.2-webengine
kevinushey Jan 2, 2018
180b96c
appease the compiler
kevinushey Jan 2, 2018
9ad55ce
migrate contents file on first properties access
kevinushey Jan 3, 2018
4ab6d08
Fix main window geometry saving on Mac
gtritchie Jan 3, 2018
dc58b01
scrub reference to homebrew OpenSSL crypto from bundled OpenSSL
jmcphers Jan 3, 2018
6403f38
use qt-bundled copy of libssl to satisfy rsession
jmcphers Jan 3, 2018
60d5e8e
Fix Mac package build warnings (QtWebEngine)
gtritchie Jan 4, 2018
97be81d
update Qt install path
kevinushey Jan 4, 2018
9149231
be compatible with older cmake
kevinushey Jan 4, 2018
bd9d5d0
null check
kevinushey Jan 4, 2018
be5f6e3
Merge branch 'master' into feature/qt-5.9.2-webengine
gtritchie Jan 8, 2018
9f14e28
Install Qt 5.9.2 SDK for Mac
gtritchie Jan 8, 2018
b608566
Fix generated rstudio-dev shell script to work on Mac, not just Linux
gtritchie Jan 8, 2018
c73b875
Show menu on satellite windows, not just main window (Mac specific)
gtritchie Jan 8, 2018
0e304d0
download qt 5.9.2 and install qtwebengine
jmcphers Jan 9, 2018
bcca9a1
don't install Qt via install-dependencies if installed officially
jmcphers Jan 9, 2018
7662973
use qt 5.9.2 on precise and centos 7
jmcphers Jan 9, 2018
60327dd
attempt to appease Qt
kevinushey Jan 9, 2018
9ca81d4
use CMake to specify position independent code
kevinushey Jan 9, 2018
38fcbd9
fix incorrect variable reference in clean-uid
jmcphers Jan 9, 2018
a802bd3
add webengine dependencies on for centos7
jmcphers Jan 10, 2018
85d4a61
centos7: remove gstreamer and add patchelf
jmcphers Jan 10, 2018
5ce23f3
ignore nonexistent AppRun in rpath script
jmcphers Jan 10, 2018
ac8354c
explicitly require '-fPIC', '-pie'
kevinushey Jan 10, 2018
a453722
remove unused libgstreamer on xenial
jmcphers Jan 10, 2018
7af10eb
Merge remote-tracking branch 'origin/master' into feature/qt-5.9.2-we…
jmcphers Jan 10, 2018
40715a8
add patchelf to xenial
jmcphers Jan 10, 2018
12fc149
add CMake utilities module
kevinushey Jan 10, 2018
11da1f8
don't use https (not supported by old CMake)
kevinushey Jan 10, 2018
f8bb197
bike-shedding
kevinushey Jan 10, 2018
cebd1e5
make linuxdeployqt executable
kevinushey Jan 10, 2018
19161a1
linuxdeployqt requires libfuse.so
kevinushey Jan 10, 2018
dfa931c
trim out unneeded deps
kevinushey Jan 11, 2018
2326c93
extract linuxdeployqt before running
kevinushey Jan 11, 2018
caba4ed
add 'install_process' helper
kevinushey Jan 11, 2018
53ff08e
use a single desktop builder on trusty
jmcphers Jan 12, 2018
dbb761d
Merge remote-tracking branch 'origin/master' into feature/qt-5.9.2-we…
jmcphers Jan 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
56 changes: 49 additions & 7 deletions CMakeCompiler.txt
Expand Up @@ -13,6 +13,15 @@
#
#

# include guard
if(RSTUDIO_CMAKE_COMPILER_INCLUDED)
return()
endif()
set(RSTUDIO_CMAKE_COMPILER_INCLUDED YES)

# require position independent code for CMake targets
set(CMAKE_POSITION_INDEPENDENT_CODE Yes)

# use clang on osx
if(APPLE)

Expand All @@ -26,13 +35,46 @@ if(APPLE)

endif()

# use Rtools on Windows (mainly for Qt Creator)
if(WIN32 AND NOT DEFINED RSTUDIO_PACKAGE_BUILD)
set(RTOOLS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../dependencies/windows/Rtools33")
string(REGEX REPLACE "/" "\\\\" RTOOLS_TOOLCHAIN_32BIT_PATH "${RTOOLS_PATH}/mingw_32/bin")
set(ENV{PATH} "${RTOOLS_TOOLCHAIN_32BIT_PATH}")
set(WINDRES "${RTOOLS_TOOLCHAIN_32BIT_PATH}\\windres.exe")
message(STATUS "The PATH is $ENV{PATH}")
# require C++11 (or C++14 for MSVC)
if(MSVC)

# use C++14 (MSVC doesn't support C++11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++14")

# ensure that we're using linker flags compatible with
# the version of Boost that will be linked in
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
set(ITERATOR_DEBUG_LEVEL 0)
set(LINKER_FLAG "/MD")
else()
set(ITERATOR_DEBUG_LEVEL 2)
set(LINKER_FLAG "/MDd")
endif()

foreach(RELEASE_TYPE "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
foreach(FLAG CMAKE_C_FLAGS CMAKE_CXX_FLAGS)
string(REGEX REPLACE "/MDd?" "${LINKER_FLAG}" ${FLAG}${RELEASE_TYPE} "${${FLAG}${RELEASE_TYPE}}")
endforeach()
endforeach()

# disable CMake's automatic manifest generation (we always provide our own)
foreach(TYPE EXE MODULE SHARED)
set(CMAKE_${TYPE}_LINKER_FLAGS "${CMAKE_${TYPE}_LINKER_FLAGS} /MANIFEST:NO")
endforeach()

# multi-process compilation
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")

# silence some warnings (mostly out of our control) + set debug level
add_definitions(
-D_CRT_NONSTDC_NO_DEPRECATE
-D_CRT_SECURE_NO_WARNINGS
-D_SCL_SECURE_NO_WARNINGS
-D_ITERATOR_DEBUG_LEVEL=${ITERATOR_DEBUG_LEVEL}
)

else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
endif()

if(NOT DEFINED WINDRES)
Expand Down
21 changes: 17 additions & 4 deletions CMakeGlobals.txt
Expand Up @@ -13,6 +13,12 @@
#
#

# include guard
if(RSTUDIO_CMAKE_GLOBALS_INCLUDED)
return()
endif()
set(RSTUDIO_CMAKE_GLOBALS_INCLUDED YES)

# version info
if ("$ENV{RSTUDIO_VERSION_MAJOR}" STREQUAL "")
set(CPACK_PACKAGE_VERSION_MAJOR "99")
Expand All @@ -39,11 +45,12 @@ endif()

# default to debug builds
if(NOT CMAKE_BUILD_TYPE)
message(STATUS "CMake build type not set; defaulting to debug build")
set(CMAKE_BUILD_TYPE "Debug")
endif()

# enable testing on all builds unless specifically disabled
if (NOT RSTUDIO_UNIT_TESTS_DISABLED)
# enable testing on debug builds
if (CMAKE_BUILD_TYPE STREQUAL "Debug" AND NOT RSTUDIO_UNIT_TESTS_DISABLED)
set(RSTUDIO_UNIT_TESTS_ENABLED true)
add_definitions(-DRSTUDIO_UNIT_TESTS_ENABLED)
endif()
Expand All @@ -64,10 +71,15 @@ if( ${RSTUDIO_TARGET} STREQUAL "Development" OR ${RSTUDIO_TARGET} STREQUAL "Desk
endif()

# set session64 if specified
if (${RSTUDIO_TARGET} STREQUAL "SessionWin64")
if(RSTUDIO_TARGET STREQUAL "SessionWin64")
set(RSTUDIO_SESSION_WIN64 TRUE)
endif()

# prefer 64bit session when using 64bit toolchain
if(WIN32 AND CMAKE_SIZEOF_VOID_P EQUAL 8)
set(RSTUDIO_SESSION_WIN64 TRUE)
endif()

# record git revision hash (cache it since we don't use this in development
# mode and we don't want it to force rebuilds there)
if(NOT RSTUDIO_SESSION_WIN64 AND NOT RSTUDIO_GIT_REVISION_HASH)
Expand Down Expand Up @@ -163,4 +175,5 @@ endif()
# make sure the CMAKE_INSTALL_PREFIX uses a cmake style path
file(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)


# include utilities
include(RStudioCMakeUtils)
6 changes: 3 additions & 3 deletions CMakeLists.txt
Expand Up @@ -13,12 +13,12 @@
#
#

# set compiler
include(CMakeCompiler.txt)

cmake_minimum_required(VERSION 2.6)
project (RStudio)

# set compiler
include(CMakeCompiler.txt)

# project globals
include(CMakeGlobals.txt)

Expand Down
4 changes: 1 addition & 3 deletions Jenkinsfile
Expand Up @@ -142,13 +142,11 @@ messagePrefix = "Jenkins ${env.JOB_NAME} build: <${env.BUILD_URL}display/redirec
try {
timestamps {
def containers = [
[os: 'precise', arch: 'amd64', flavor: 'desktop', variant: 'trusty'],
[os: 'precise', arch: 'amd64', flavor: 'server', variant: ''],
[os: 'centos6', arch: 'x86_64', flavor: 'server', variant: ''],
[os: 'centos6', arch: 'x86_64', flavor: 'server', variant: 'SLES'],
[os: 'centos7', arch: 'x86_64', flavor: 'desktop', variant: ''],
[os: 'xenial', arch: 'amd64', flavor: 'desktop', variant: 'xenial'],
[os: 'xenial', arch: 'amd64', flavor: 'server', variant: 'xenial'],
[os: 'trusty', arch: 'amd64', flavor: 'desktop', variant: ''],
[os: 'debian9', arch: 'x86_64', flavor: 'server', variant: 'stretch']
]
containers = limit_builds(containers)
Expand Down
11 changes: 10 additions & 1 deletion cmake/modules/FindLibR.cmake
Expand Up @@ -29,7 +29,7 @@ if(APPLE)
set(LIBR_EXECUTABLE "${LIBR_HOME}/R" CACHE PATH "R executable")
else()
get_filename_component(_LIBR_LIBRARIES "${LIBR_LIBRARIES}" REALPATH)
get_filename_component(_LIBR_LIBRARIES_DIR "${_LIBR_LIBRARIES}" DIRECTORY)
get_filename_component(_LIBR_LIBRARIES_DIR "${_LIBR_LIBRARIES}" PATH)
set(LIBR_EXECUTABLE "${_LIBR_LIBRARIES_DIR}/../bin/R")
execute_process(
COMMAND ${LIBR_EXECUTABLE} "--slave" "--vanilla" "-e" "cat(R.home())"
Expand Down Expand Up @@ -118,11 +118,19 @@ else()

# set library hint path based on whether we are doing a special session 64 build
if(LIBR_FIND_WINDOWS_64BIT)
set(LIBR_ARCH "x64")
set(LIBRARY_ARCH_HINT_PATH "${LIBR_HOME}/bin/x64")
else()
set(LIBR_ARCH "i386")
set(LIBRARY_ARCH_HINT_PATH "${LIBR_HOME}/bin/i386")
endif()

# call dll2lib.R to ensure export files are generated
execute_process(
COMMAND "${LIBR_HOME}/bin/${LIBR_ARCH}/Rscript.exe" "dll2lib.R"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/tools"
RESULT_VARIABLE LIBR_DLL2LIB_RESULT)

endif()

# look for the R executable
Expand Down Expand Up @@ -186,6 +194,7 @@ find_package_handle_standard_args(LibR DEFAULT_MSG

if(LIBR_FOUND)
message(STATUS "Found R: ${LIBR_HOME}")
get_filename_component(LIBR_BIN_DIR "${LIBR_EXECUTABLE}" PATH CACHE)
endif()

# mark low-level variables from FIND_* calls as advanced
Expand Down
28 changes: 28 additions & 0 deletions cmake/modules/RStudioCMakeUtils.cmake
@@ -0,0 +1,28 @@
include(CMakeParseArguments)

function(download URL FILE)

get_filename_component(FILENAME "${FILE}" NAME)
if (EXISTS "${FILE}")
message(STATUS "${FILENAME} already exists; skipping download")
return()
endif()

# perform the download
message(STATUS "Downloading ${FILENAME}")
file(DOWNLOAD "${URL}" "${FILE}" STATUS STATUS)

# check status
list(GET STATUS 0 EC)
list(GET STATUS 1 MSG)
if(NOT EC EQUAL 0)
message(FATAL_ERROR "Download failed: ${MSG}")
endif()
message(STATUS "Downloading ${FILENAME} - Success")

endfunction()

function(install_process)
cmake_parse_arguments(install_process "" "" "COMMAND" ${ARGN})
install(CODE "execute_process(COMMAND ${install_process_COMMAND} WORKING_DIRECTORY \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")")
endfunction()
14 changes: 1 addition & 13 deletions dependencies/linux/install-qt-sdk
Expand Up @@ -28,19 +28,7 @@ else
QT_ARCH=x86
fi

# presume 5.4.0
QT_VERSION=5.4.0

# test for libgstreamer
which apt-cache > /dev/null
if [ $? == 0 ]; then
# debian (currently no test for CentOS based systems)
apt-cache show libgstreamer1.0 > /dev/null
if [ $? == 0 ]; then
QT_VERSION=5.4.2
fi
fi

QT_VERSION=5.9.2
QT_SDK_BINARY=QtSDK-${QT_VERSION}-${QT_ARCH}.tar.gz
QT_SDK_URL=https://s3.amazonaws.com/rstudio-buildtools/$QT_SDK_BINARY

Expand Down
9 changes: 7 additions & 2 deletions dependencies/osx/install-dependencies-osx
Expand Up @@ -3,7 +3,7 @@
#
# install-dependencies-osx
#
# Copyright (C) 2009-12 by RStudio, Inc.
# Copyright (C) 2009-18 by RStudio, Inc.
#
# Unless you have received this program directly from RStudio pursuant
# to the terms of a commercial license agreement with RStudio, then
Expand All @@ -26,6 +26,11 @@ cd ../common
./install-common
cd ../osx

# desktop dependencies (qt)
if [ "$1" != "--exclude-qt-sdk" ]
then
./install-qt-sdk-osx
fi

# enable PAM
sudo cp /etc/pam.d/ftpd /etc/pam.d/rstudio
sudo cp /etc/pam.d/cups /etc/pam.d/rstudio
41 changes: 41 additions & 0 deletions dependencies/osx/install-qt-sdk-osx
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

#
# install-qt-sdk-osx
#
# Copyright (C) 2009-18 by RStudio, Inc.
#
# Unless you have received this program directly from RStudio pursuant
# to the terms of a commercial license agreement with RStudio, then
# this program is licensed to you under the terms of version 3 of the
# GNU Affero General Public License. This program is distributed WITHOUT
# ANY EXPRESS OR IMPLIED WARRANTY, INCLUDING THOSE OF NON-INFRINGEMENT,
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Please refer to the
# AGPL (http://www.gnu.org/licenses/agpl-3.0.txt) for more details.
#
#

# This archive includes the files required to build against Qt. It
# was created by installing Qt via an interactive installer, and
# manually removing components not needed by RStudio.

QT_VERSION=5.9.2
QT_SDK_BINARY=QtSDK-${QT_VERSION}-mac.tar.gz
QT_SDK_URL=https://s3.amazonaws.com/rstudio-buildtools/$QT_SDK_BINARY

# set Qt SDK dir if not already defined
if [ -z "$QT_SDK_DIR" ]; then
QT_SDK_DIR=~/Qt${QT_VERSION}
fi

if ! test -e $QT_SDK_DIR
then
# download and install
curl -L $QT_SDK_URL > /tmp/$QT_SDK_BINARY
cd `dirname $QT_SDK_DIR`
tar xzf /tmp/$QT_SDK_BINARY
rm /tmp/$QT_SDK_BINARY
else
echo "Qt $QT_VERSION SDK already installed"
fi

1 change: 1 addition & 0 deletions dependencies/windows/.gitignore
Expand Up @@ -11,3 +11,4 @@ winutils/
rtools*
winpty*/
openssl*/
*.zip
3 changes: 2 additions & 1 deletion dependencies/windows/install-boost.cmd
@@ -1,4 +1,5 @@
@echo off
cd install-boost
R --vanilla --slave -f install-boost.R
R --vanilla --slave -f install-boost.R --args debug static
R --vanilla --slave -f install-boost.R --args release static
cd ..