Skip to content

Commit eeebfd6

Browse files
committed
Add RLS to .exe and .msi installers
1 parent 5d2512e commit eeebfd6

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

src/bootstrap/dist.rs

+36
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
949949
let _ = fs::remove_dir_all(&exe);
950950
t!(fs::create_dir_all(exe.join("rustc")));
951951
t!(fs::create_dir_all(exe.join("cargo")));
952+
t!(fs::create_dir_all(exe.join("rls")));
953+
t!(fs::create_dir_all(exe.join("rust-analysis")));
952954
t!(fs::create_dir_all(exe.join("rust-docs")));
953955
t!(fs::create_dir_all(exe.join("rust-std")));
954956
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rustc"), target))
@@ -963,11 +965,19 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
963965
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target))
964966
.join(format!("rust-std-{}", target)),
965967
&exe.join("rust-std"));
968+
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target))
969+
.join("rls"),
970+
&exe.join("rls"));
971+
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target))
972+
.join(format!("rust-analysis-{}", target)),
973+
&exe.join("rust-analysis"));
966974

967975
t!(fs::remove_file(exe.join("rustc/manifest.in")));
968976
t!(fs::remove_file(exe.join("cargo/manifest.in")));
969977
t!(fs::remove_file(exe.join("rust-docs/manifest.in")));
970978
t!(fs::remove_file(exe.join("rust-std/manifest.in")));
979+
t!(fs::remove_file(exe.join("rls/manifest.in")));
980+
t!(fs::remove_file(exe.join("rust-analysis/manifest.in")));
971981

972982
if target.contains("windows-gnu") {
973983
t!(fs::create_dir_all(exe.join("rust-mingw")));
@@ -1041,6 +1051,26 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
10411051
.arg("-dr").arg("Std")
10421052
.arg("-var").arg("var.StdDir")
10431053
.arg("-out").arg(exe.join("StdGroup.wxs")));
1054+
build.run(Command::new(&heat)
1055+
.current_dir(&exe)
1056+
.arg("dir")
1057+
.arg("rls")
1058+
.args(&heat_flags)
1059+
.arg("-cg").arg("RlsGroup")
1060+
.arg("-dr").arg("Rls")
1061+
.arg("-var").arg("var.RlsDir")
1062+
.arg("-out").arg(exe.join("RlsGroup.wxs"))
1063+
.arg("-t").arg(etc.join("msi/remove-duplicates.xsl")));
1064+
build.run(Command::new(&heat)
1065+
.current_dir(&exe)
1066+
.arg("dir")
1067+
.arg("rust-analysis")
1068+
.args(&heat_flags)
1069+
.arg("-cg").arg("AnalysisGroup")
1070+
.arg("-dr").arg("Analysis")
1071+
.arg("-var").arg("var.AnalysisDir")
1072+
.arg("-out").arg(exe.join("AnalysisGroup.wxs"))
1073+
.arg("-t").arg(etc.join("msi/remove-duplicates.xsl")));
10441074
if target.contains("windows-gnu") {
10451075
build.run(Command::new(&heat)
10461076
.current_dir(&exe)
@@ -1064,6 +1094,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
10641094
.arg("-dDocsDir=rust-docs")
10651095
.arg("-dCargoDir=cargo")
10661096
.arg("-dStdDir=rust-std")
1097+
.arg("-dRlsDir=rls")
1098+
.arg("-dAnalysisDir=rust-analysis")
10671099
.arg("-arch").arg(&arch)
10681100
.arg("-out").arg(&output)
10691101
.arg(&input);
@@ -1081,6 +1113,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
10811113
candle("DocsGroup.wxs".as_ref());
10821114
candle("CargoGroup.wxs".as_ref());
10831115
candle("StdGroup.wxs".as_ref());
1116+
candle("RlsGroup.wxs".as_ref());
1117+
candle("AnalysisGroup.wxs".as_ref());
10841118

10851119
if target.contains("windows-gnu") {
10861120
candle("GccGroup.wxs".as_ref());
@@ -1103,6 +1137,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
11031137
.arg("DocsGroup.wixobj")
11041138
.arg("CargoGroup.wixobj")
11051139
.arg("StdGroup.wixobj")
1140+
.arg("RlsGroup.wixobj")
1141+
.arg("AnalysisGroup.wixobj")
11061142
.current_dir(&exe);
11071143

11081144
if target.contains("windows-gnu") {

src/etc/installer/exe/rust.iss

+3
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ Name: gcc; Description: "Linker and platform libraries"; Types: full
4646
Name: docs; Description: "HTML documentation"; Types: full
4747
Name: cargo; Description: "Cargo, the Rust package manager"; Types: full
4848
Name: std; Description: "The Rust Standard Library"; Types: full
49+
Name: rls; Description: "RLS, the Rust Language Server"
4950

5051
[Files]
5152
Source: "rustc/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: rust
@@ -55,6 +56,8 @@ Source: "rust-mingw/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs;
5556
Source: "rust-docs/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: docs
5657
Source: "cargo/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: cargo
5758
Source: "rust-std/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: std
59+
Source: "rls/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: rls
60+
Source: "rust-analysis/*.*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs; Components: rls
5861

5962
[Code]
6063
const

src/etc/installer/msi/rust.wxs

+10
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@
170170
<Directory Id="Docs" Name="." />
171171
<Directory Id="Cargo" Name="." />
172172
<Directory Id="Std" Name="." />
173+
<Directory Id="Rls" Name="." />
174+
<Directory Id="Analysis" Name="." />
173175
</Directory>
174176
</Directory>
175177

@@ -273,6 +275,14 @@
273275
<ComponentRef Id="PathEnvPerMachine" />
274276
<ComponentRef Id="PathEnvPerUser" />
275277
</Feature>
278+
<Feature Id="RLS"
279+
Title="RLS, the Rust Language Server"
280+
Display="7"
281+
Level="2"
282+
AllowAdvertise="no">
283+
<ComponentGroupRef Id="RlsGroup" />
284+
<ComponentGroupRef Id="AnalysisGroup" />
285+
</Feature>
276286

277287
<UIRef Id="RustUI" />
278288
</Product>

0 commit comments

Comments
 (0)