-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathhelp-windows.in
More file actions
281 lines (206 loc) · 9.65 KB
/
Copy pathhelp-windows.in
File metadata and controls
281 lines (206 loc) · 9.65 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
// -*- mode: rust -*-
// ------------------------------------------------------------------------
// Windows help
// ------------------------------------------------------------------------
const HELP_ABOUT: &str = "";
const HELP_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Add the latest development snapshot
rig add devel
# Add the latest release
rig add release
# Install specific version
rig add 4.1.2
# Install latest version within a minor branch
rig add 4.1
# List installed versions
rig list
# Set default version
rig default 4.1.2";
const HELP_RESOLVE: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Resolve R versions. Check the version number of an R version (e.g.
release, devel, etc.), and looks up the URL of the installer for it,
if an installer is available.
It prints the R version number, and after a space the URL of the
installer. If no installer is available for this R version and the
current platform, the URL is `NA`.
An R version can be specified in various ways:
- `rig resolve devel` is the latest available development version,
- `rig resolve next` is the next (patched, alpha, beta, etc.) version,
- `rig resolve release` is the latest release.
- `rig resolve x.y.z` is a specific version.
- `rig resolve x.y` is the latest release within the `x.y` minor branch.
- `rig resolve oldrel/n` is the latest release within the `n`th previous
minor branch (`oldrel` is the same as `oldrel/1`).";
const HELP_RESOLVE_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Latest development snapshot
rig resolve devel
# Latest release (that has an installer available)
rig resolve release
# URL for a specific version
rig resolve 4.1.2
# Latest version within a minor branch
rig resolve 4.1";
const HELP_ARCH: &str = "Select Windows arch: x86_64 or aarch64";
const HELP_DEFAULT: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Print or set the default R version. The default R version is the one
that can be started with the `R` and `RS` commands, via quick
batch files at `C:\\Program Files\\R\\bin`.
Call without any arguments to see the current default. Call with the
version number/name to set the default. Before setting a default, you
can call `rig list` to see the installed R versions.
Potentially you need to run this command from an admininstrator shell
to change the current default.
You don't need to update the default R version to just run a non-default R
version. You can use the `R-<ver>` links, see `rig system make-links`.
`rig switch` is an alias of `rig default`.
\x1b[4m\x1b[1mKnown issue:\x1b[22m\x1b[24m
- If you delete the default R version with `rig rm` or another way,
then the `R` and `RS` commands will kept, but they will point to a
non-existing directory and fail.";
const HELP_DEFAULT_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Query default R version
rig default
# Set the default version
rig default 4.1";
const HELP_LIST: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
List installed R versions at `C:\\Program Files\\R`.
It does _not_ check if they are working properly.
`rig ls` is an alias.";
const HELP_ADD: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Download and install an R version, from the official sources.
It keeps the already installed R versions.
The desired R version can be specified in various ways:
- `rig add devel` adds the latest available development version,
- `rig add next` is the next version (patched, alpha, beta, rc, etc.),
- `rig add release` adds the latest release.
- `rig add x.y.z` adds a specific version.
- `rig add x.y` adds the latest release within the `x.y` minor branch.
- `rig add oldrel/n` adds the latest release within the `n`th previous
minor branch (`oldrel` is the same as `oldrel/1`).
- `rig add <url>` uses a `.pkg` installer from `<url>`.
- `rig add renv.lock` or `rig add <dir>` installs the R version specified
in the renv.lock file. If a directory is given, rig looks for an
renv.lock file in that directory.
`rig add` will call the following rig command after the installation,
to set up the newly installed version:
- `rig system create-lib`
- `rig system make-links`
See their help pages for details.
It will also update the sytem profile of all installed versions to add
the appropriate versions of Rtools to the system PATH.
You can use `rig add` to install Rtools:
rig add rtools
will install all Rtools versions that are needed for the currently
installed R versions. You can also request a specific Rtools version,
e.g. `rig add rtools40`. Rtools versions 3.x all install to `C:\\Rtools`,
so only one of them can be installed at a time.
You need an administrator account to run this command.
\x1b[4m\x1b[1mKnown issue:\x1b[22m\x1b[24m
- Rtools installation will fail if the same version of Rtools is
already installed.";
const HELP_ADD_EXAMPLES: &str = "\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# Add the latest development snapshot
rig add devel
# Add the latest release
rig add release
# Install specific version
rig add 4.1.2
# Install latest version within a minor branch
rig add 4.1
# Install all needed Rtools versions
rig add rtools
# Install the R version specified in renv.lock
rig add renv.lock
# Install R version from a project's renv.lock
rig add path/to/project";
const HELP_RM: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Remove an R installation. It keeps the users' package libraries.
You need an administrator account to run this command.";
const HELP_SYSTEM: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Various commands to modify and configure the installed R versions.
See their help pages for details. E.g. run `rig system make-links --help`.";
const HELP_SYSTEM_LINKS: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Create quick links in `C:\\Program Files\\R\\bin` for the current R
installations. This lets you directly run a specific R version. E.g.
`R-4.1.2` will start R 4.1.2.
It also adds an `R` and `RS` link that runs the default R version.
See `rig default`.
`rig add` runs `rig system make-links`, so if you only use rig to
install R, then you do not need to run it manually.
You need an administrator account to run this command.";
const HELP_SYSTEM_ADDPAK: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Install/update pak for one or more R versions.
* If `--all` is specified, then it installs pak for all current R
installations.
* If one or more R versions are specified, then it installs pak for
those.
* If no R versions are specified, then it installs pak for the default
R installation, if there is one (see `rig default`).";
const HELP_SYSTEM_CLEANREG: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Remove R and Rtools entries from the registry, if the corresponding
R or Rtools versions are not installed any more.";
const HELP_SYSTEM_UPDATE_RTOOLS40: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Update Rtools40 compilers and libraries to the latest builds by
updating the MSYS2 packages in Rtools40.";
const HELP_RSTUDIO: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
Start RStudio with the specified R version.
If `project-file` is an RStudio `.Rproj` file, or a directory containing
an RStudio project file, RStudio will open the project.
If `project-file` is a directory that does not contain an RStudio
project file, then RStudio will start up without an active project,
but will set the working directory to the specified directory.
If `project-file` is a regular file that is not inside a directory
containing an RStudio project, then RStudio will start up without an
active project, but it will open the specified file, and will set the
working directory to the directory of the file.
If the RStudio project or the specified directory contains an `renv.lock`
file (created by the renv package), and `version` is not specified, then
rig will read the preferred R version from the `renv.lock` file.
If the same exact version is not installed, then rig chooses
the latest version with the same major and minor components. If no such
version is available, rig throws an error.
On Windows, `rig rstudio` needs RStudio Desktop 2021.09.0+351 or later.
\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
# With default R version
rig rstudio
# With another R version
rig rstudio 4.0.5
# Open project with default R version
rig rstudio cli\\cli.Rproj
# Open renv project with the R version specified in the lock file
rig rstudio projects\\myproject\\renv.lock
# Open RStudio project with specified R version, either is good
rig rstudio 4.0.5 cli.Rproj
rig rstudio cli.Rproj 4.0.5";
const HELP_SYSTEM_RTOOLS_LS: &str = "
\x1b[4m\x1b[1mDescription:\x1b[22m\x1b[24m
List installed Rtools versions.
It only lists versions that are added to the Windows Registry.
Use the `--json` flag for JSON output.";
const HELP_SYSTEM_RTOOLS_ADD: &str = "
Install new Rtools versions.
You can specify the new version(s) by their name, optionally with an
'rtools' prefix, e.g. '43' or 'rtools43'.
If `version` is 'all' (the default), then all Rtools versions that are
required for the currently installed R versions will be installed.
\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
rig system rtools add 43
rig system rtools add all";
const HELP_SYSTEM_RTOOLS_RM: &str = "
Remove Rtools versions.
You can specify the version(s) to remove by their name, optionally with
an 'rtools' prefix, e.g. '43' or 'rtools43'.
If no version is specified, then it does nothing.
\x1b[4m\x1b[1mExamples:\x1b[22m\x1b[24m
rig system rtools rm 43";