Skip to content

Commit

Permalink
Update cmake Windows build
Browse files Browse the repository at this point in the history
Use a global dependency location
  • Loading branch information
timtmok committed Jan 6, 2023
1 parent ccecae1 commit 029dfe3
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
7 changes: 6 additions & 1 deletion CMakeGlobals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,12 @@ set(CMAKE_MODULE_PATH "${ROOT_SRC_DIR}/cmake/modules/")

# dependencies
if(WIN32)
set(RSTUDIO_WINDOWS_DEPENDENCIES_DIR "${ROOT_SRC_DIR}/dependencies/windows")
if(EXISTS "C:/rstudio-tools/dependencies")
set(RSTUDIO_DEPENDENCIES_DIR "C:/rstudio-tools/dependencies")
set(RSTUDIO_WINDOWS_DEPENDENCIES_DIR "${RSTUDIO_DEPENDENCIES_DIR}/windows")
else()
set(RSTUDIO_WINDOWS_DEPENDENCIES_DIR "${ROOT_SRC_DIR}/dependencies/windows")
endif()
set(CPACK_DEPENDENCIES_DIR "${RSTUDIO_WINDOWS_DEPENDENCIES_DIR}")
set(CPACK_NSPROCESS_VERSION "1.6")
else()
Expand Down
2 changes: 2 additions & 0 deletions docker/jenkins/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ COPY dependencies/tools/rstudio-tools.cmd 'C:\rstudio-tools\dependencies\tools\r
COPY dependencies/common 'C:\rstudio-tools\dependencies\common'
COPY dependencies/windows 'C:\rstudio-tools\dependencies\windows'

RUN 'C:\rstudio-tools\dependencies\windows\install-dependencies.cmd'

#### this docker container will currently be used as a jenkins swarm slave, rather than instantiated on a swarm ####
##### the items below this are dependencies relevant to jenkins-swarm. #####
##### follow https://issues.jenkins-ci.org/browse/JENKINS-36776 to track docker windows support on jenkins #####
Expand Down
12 changes: 9 additions & 3 deletions package/win32/make-package.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ setlocal
set PACKAGE_DIR="%CD%"
set ELECTRON_SOURCE_DIR=%PACKAGE_DIR%\..\..\src\node\desktop

call %PACKAGE_DIR%\..\..\dependencies\tools\rstudio-tools.cmd
if not exist c:\rstudio-tools\dependencies (
set RSTUDIO_DEPENDENCIES=%PACKAGE_DIR%\..\..\dependencies
) else (
set RSTUDIO_DEPENDENCIES=c:\rstudio-tools\dependencies
)

call %RSTUDIO_DEPENDENCIES%\tools\rstudio-tools.cmd

set BUILD_GWT=1
set QUICK=
Expand Down Expand Up @@ -59,7 +65,7 @@ for %%F in (ant cmake) do (
)

REM find node
set NODE_DIR=%PACKAGE_DIR%\..\..\dependencies\common\node\%RSTUDIO_NODE_VERSION%
set NODE_DIR=%RSTUDIO_DEPENDENCIES%\common\node\%RSTUDIO_NODE_VERSION%
set NODE=%NODE_DIR%\node.exe
if not exist %NODE% (
echo node.exe not found at %NODE_DIR%; exiting
Expand Down Expand Up @@ -89,7 +95,7 @@ echo Using npx: %NPX%
REM Put node on the path
set PATH=%NODE_DIR%;%PATH%

set REZH=%PACKAGE_DIR%\..\..\dependencies\windows\resource-hacker\ResourceHacker.exe
set REZH=%RSTUDIO_DEPENDENCIES%\windows\resource-hacker\ResourceHacker.exe
if not exist %REZH% (
echo ResourceHacker.exe not found; re-run install-dependencies.cmd and try again; exiting
endlocal
Expand Down

0 comments on commit 029dfe3

Please sign in to comment.