Skip to content

Commit 7c36273

Browse files
committed
Add RLS to .pkg installer
1 parent eeebfd6 commit 7c36273

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

src/bootstrap/dist.rs

+10
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
899899
t!(fs::create_dir_all(pkg.join("cargo")));
900900
t!(fs::create_dir_all(pkg.join("rust-docs")));
901901
t!(fs::create_dir_all(pkg.join("rust-std")));
902+
t!(fs::create_dir_all(pkg.join("rls")));
903+
t!(fs::create_dir_all(pkg.join("rust-analysis")));
902904

903905
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rustc"), target)),
904906
&pkg.join("rustc"));
@@ -908,11 +910,17 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
908910
&pkg.join("rust-docs"));
909911
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target)),
910912
&pkg.join("rust-std"));
913+
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target)),
914+
&pkg.join("rls"));
915+
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target)),
916+
&pkg.join("rust-analysis"));
911917

912918
install(&etc.join("pkg/postinstall"), &pkg.join("rustc"), 0o755);
913919
install(&etc.join("pkg/postinstall"), &pkg.join("cargo"), 0o755);
914920
install(&etc.join("pkg/postinstall"), &pkg.join("rust-docs"), 0o755);
915921
install(&etc.join("pkg/postinstall"), &pkg.join("rust-std"), 0o755);
922+
install(&etc.join("pkg/postinstall"), &pkg.join("rls"), 0o755);
923+
install(&etc.join("pkg/postinstall"), &pkg.join("rust-analysis"), 0o755);
916924

917925
let pkgbuild = |component: &str| {
918926
let mut cmd = Command::new("pkgbuild");
@@ -926,6 +934,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
926934
pkgbuild("cargo");
927935
pkgbuild("rust-docs");
928936
pkgbuild("rust-std");
937+
pkgbuild("rls");
938+
pkgbuild("rust-analysis");
929939

930940
// create an 'uninstall' package
931941
install(&etc.join("pkg/postinstall"), &pkg.join("uninstall"), 0o755);

src/etc/installer/pkg/Distribution.xml

+11
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<line choice="rust-std"/>
1717
<line choice="cargo"/>
1818
<line choice="rust-docs"/>
19+
<line choice="rls"/>
1920
</line>
2021
<line choice="uninstall" />
2122
</choices-outline>
@@ -61,10 +62,20 @@
6162
>
6263
<pkg-ref id="org.rust-lang.rust-docs"/>
6364
</choice>
65+
<choice id="rls" visible="true"
66+
title="RLS" description="RLS, the Rust Language Server"
67+
selected="(!choices.uninstall.selected &amp;&amp; choices['rls'].selected) || (choices.uninstall.selected &amp;&amp; choices.install.selected)"
68+
start_selected="false"
69+
>
70+
<pkg-ref id="org.rust-lang.rls"/>
71+
<pkg-ref id="org.rust-lang.rust-analysis"/>
72+
</choice>
6473
<pkg-ref id="org.rust-lang.rustc" version="0" onConclusion="none">rustc.pkg</pkg-ref>
6574
<pkg-ref id="org.rust-lang.cargo" version="0" onConclusion="none">cargo.pkg</pkg-ref>
6675
<pkg-ref id="org.rust-lang.rust-docs" version="0" onConclusion="none">rust-docs.pkg</pkg-ref>
6776
<pkg-ref id="org.rust-lang.rust-std" version="0" onConclusion="none">rust-std.pkg</pkg-ref>
77+
<pkg-ref id="org.rust-lang.rls" version="0" onConclusion="none">rls.pkg</pkg-ref>
78+
<pkg-ref id="org.rust-lang.rust-analysis" version="0" onConclusion="none">rust-analysis.pkg</pkg-ref>
6879
<pkg-ref id="org.rust-lang.uninstall" version="0" onConclusion="none">uninstall.pkg</pkg-ref>
6980
<background file="rust-logo.png" mime-type="image/png"
7081
alignment="bottomleft"/>

0 commit comments

Comments
 (0)