summarylogtreecommitdiffstats
path: root/0002-allow_system_node.patch
blob: 517a45eabf7d594a9eab9880aef8e6e7e7e04e29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
diff -ru rstudio-desktop.original/src/rstudio-2024.04.1-748/src/cpp/conf/rsession-dev.conf rstudio-desktop/src/rstudio-2024.04.1-748/src/cpp/conf/rsession-dev.conf
--- rstudio-desktop.original/src/rstudio-2024.04.1-748/src/cpp/conf/rsession-dev.conf	2024-05-07 06:31:08.000000000 +1200
+++ rstudio-desktop/src/rstudio-2024.04.1-748/src/cpp/conf/rsession-dev.conf	2024-05-21 19:32:00.206198890 +1200
@@ -39,7 +39,7 @@
 external-pandoc-path=${RSTUDIO_DEPENDENCIES_PANDOC_DIR}
 external-quarto-path=${RSTUDIO_DEPENDENCIES_QUARTO_DIR}
 external-libclang-path=${RSTUDIO_DEPENDENCIES_DIR}/common/libclang
-external-node-path=${RSTUDIO_DEPENDENCIES_DIR}/common/node/18.18.2/bin/node
+external-node-path=/usr/bin/node
 
 # enable copilot
 copilot-enabled=1
diff -ru rstudio-desktop.original/src/rstudio-2024.04.1-748/src/cpp/session/CMakeLists.txt rstudio-desktop/src/rstudio-2024.04.1-748/src/cpp/session/CMakeLists.txt
--- rstudio-desktop.original/src/rstudio-2024.04.1-748/src/cpp/session/CMakeLists.txt	2024-05-07 06:31:08.000000000 +1200
+++ rstudio-desktop/src/rstudio-2024.04.1-748/src/cpp/session/CMakeLists.txt	2024-05-21 10:33:50.351362947 +1200
@@ -697,10 +697,12 @@
            DESTINATION "${RSTUDIO_INSTALL_SUPPORTING}/resources")
 
    # install node
-   install(
-      DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/node/${RSTUDIO_INSTALLED_NODE_VERSION}/"
-      DESTINATION "${RSTUDIO_INSTALL_BIN}/node"
-      USE_SOURCE_PERMISSIONS)
+   if(NOT RSTUDIO_USE_SYSTEM_NODE)
+      install(
+         DIRECTORY "${RSTUDIO_DEPENDENCIES_DIR}/common/node/${RSTUDIO_INSTALLED_NODE_VERSION}/"
+         DESTINATION "${RSTUDIO_INSTALL_BIN}/node"
+         USE_SOURCE_PERMISSIONS)
+   endif()
 
    # install quarto (or pandoc if quarto disabled)
    if(QUARTO_ENABLED)
diff -ru rstudio-desktop.original/src/rstudio-2024.04.1-748/src/cpp/session/SessionOptions.cpp rstudio-desktop/src/rstudio-2024.04.1-748/src/cpp/session/SessionOptions.cpp
--- rstudio-desktop.original/src/rstudio-2024.04.1-748/src/cpp/session/SessionOptions.cpp	2024-05-07 06:31:08.000000000 +1200
+++ rstudio-desktop/src/rstudio-2024.04.1-748/src/cpp/session/SessionOptions.cpp	2024-05-21 19:33:46.308996710 +1200
@@ -709,7 +709,7 @@
                               std::string* pPath)
 {
 #if defined(__linux__) && !defined(RSTUDIO_PACKAGE_BUILD)
-   FilePath dependenciesPath = resourcePath.completePath("../../dependencies/common/node/18.18.2");
+   FilePath dependenciesPath = resourcePath.completePath("/usr");
    resolvePath(dependenciesPath, pPath);
 #else
    resolvePath(resourcePath, pPath);
diff -ru rstudio-desktop.original/src/rstudio-2024.04.1-748/src/gwt/build.xml rstudio-desktop/src/rstudio-2024.04.1-748/src/gwt/build.xml
--- rstudio-desktop.original/src/rstudio-2024.04.1-748/src/gwt/build.xml	2024-05-07 06:31:08.000000000 +1200
+++ rstudio-desktop/src/rstudio-2024.04.1-748/src/gwt/build.xml	2024-05-21 19:28:10.023896075 +1200
@@ -85,8 +85,8 @@
 
    <!-- panmirror typescript library -->
    <!-- ensure version matches RSTUDIO_NODE_VERSION -->
-   <property name="node.version" value="18.18.2"/>
-   <property name="node.dir" value="../../dependencies/common/node/${node.version}"/>
+   <property name="node.version" value="Current"/>
+   <property name="node.dir" value="/usr"/>
    <!-- use yarn from system but will prefer yarn from dependencies if available -->
    <condition property="yarn.bin" value="yarn">
      <not>
diff -ru rstudio-desktop.original/src/rstudio-2024.04.1-748/src/node/CMakeNodeTools.txt rstudio-desktop/src/rstudio-2024.04.1-748/src/node/CMakeNodeTools.txt
--- rstudio-desktop.original/src/rstudio-2024.04.1-748/src/node/CMakeNodeTools.txt	2024-05-07 06:31:08.000000000 +1200
+++ rstudio-desktop/src/rstudio-2024.04.1-748/src/node/CMakeNodeTools.txt	2024-05-21 19:28:34.497148803 +1200
@@ -19,7 +19,7 @@
 
 # set the node version
 if(NOT DEFINED RSTUDIO_NODE_VERSION)
-   set(RSTUDIO_NODE_VERSION "18.18.2")
+   set(RSTUDIO_NODE_VERSION "Current")
 endif()
 if(DEFINED ENV{RSTUDIO_NODE_VERSION})
    set(RSTUDIO_NODE_VERSION $ENV{RSTUDIO_NODE_VERSION})
@@ -45,7 +45,7 @@
       NO_DEFAULT_PATH PATH_SUFFIXES "bin"
       PATHS "/opt/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
       "c:/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
-      "${CMAKE_CURRENT_LIST_DIR}/../../dependencies/common/node/${RSTUDIO_NODE_VERSION}")
+      "/usr")
 
    find_program(NPM
       NAMES npm
@@ -53,7 +53,7 @@
       NO_DEFAULT_PATH 
       PATHS "/opt/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
       "c:/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
-      "${CMAKE_CURRENT_LIST_DIR}/../../dependencies/common/node/${RSTUDIO_NODE_VERSION}")
+      "/usr")
 
    find_program(NPX
       NAMES npx
@@ -61,7 +61,7 @@
       NO_DEFAULT_PATH 
       PATHS "/opt/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
       "c:/rstudio-tools/dependencies/common/node/${RSTUDIO_NODE_VERSION}"
-      "${CMAKE_CURRENT_LIST_DIR}/../../dependencies/common/node/${RSTUDIO_NODE_VERSION}")
+      "/usr")
 
 endif()