Add RLS to .pkg installer

This commit is contained in:
Edward Yang 2017-05-29 21:44:09 -05:00
parent eeebfd667b
commit 7c362732dc
2 changed files with 21 additions and 0 deletions

View File

@ -899,6 +899,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
t!(fs::create_dir_all(pkg.join("cargo")));
t!(fs::create_dir_all(pkg.join("rust-docs")));
t!(fs::create_dir_all(pkg.join("rust-std")));
t!(fs::create_dir_all(pkg.join("rls")));
t!(fs::create_dir_all(pkg.join("rust-analysis")));
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rustc"), target)),
&pkg.join("rustc"));
@ -908,11 +910,17 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
&pkg.join("rust-docs"));
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-std"), target)),
&pkg.join("rust-std"));
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rls"), target)),
&pkg.join("rls"));
cp_r(&work.join(&format!("{}-{}", pkgname(build, "rust-analysis"), target)),
&pkg.join("rust-analysis"));
install(&etc.join("pkg/postinstall"), &pkg.join("rustc"), 0o755);
install(&etc.join("pkg/postinstall"), &pkg.join("cargo"), 0o755);
install(&etc.join("pkg/postinstall"), &pkg.join("rust-docs"), 0o755);
install(&etc.join("pkg/postinstall"), &pkg.join("rust-std"), 0o755);
install(&etc.join("pkg/postinstall"), &pkg.join("rls"), 0o755);
install(&etc.join("pkg/postinstall"), &pkg.join("rust-analysis"), 0o755);
let pkgbuild = |component: &str| {
let mut cmd = Command::new("pkgbuild");
@ -926,6 +934,8 @@ pub fn extended(build: &Build, stage: u32, target: &str) {
pkgbuild("cargo");
pkgbuild("rust-docs");
pkgbuild("rust-std");
pkgbuild("rls");
pkgbuild("rust-analysis");
// create an 'uninstall' package
install(&etc.join("pkg/postinstall"), &pkg.join("uninstall"), 0o755);

View File

@ -16,6 +16,7 @@
<line choice="rust-std"/>
<line choice="cargo"/>
<line choice="rust-docs"/>
<line choice="rls"/>
</line>
<line choice="uninstall" />
</choices-outline>
@ -61,10 +62,20 @@
>
<pkg-ref id="org.rust-lang.rust-docs"/>
</choice>
<choice id="rls" visible="true"
title="RLS" description="RLS, the Rust Language Server"
selected="(!choices.uninstall.selected &amp;&amp; choices['rls'].selected) || (choices.uninstall.selected &amp;&amp; choices.install.selected)"
start_selected="false"
>
<pkg-ref id="org.rust-lang.rls"/>
<pkg-ref id="org.rust-lang.rust-analysis"/>
</choice>
<pkg-ref id="org.rust-lang.rustc" version="0" onConclusion="none">rustc.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.cargo" version="0" onConclusion="none">cargo.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.rust-docs" version="0" onConclusion="none">rust-docs.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.rust-std" version="0" onConclusion="none">rust-std.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.rls" version="0" onConclusion="none">rls.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.rust-analysis" version="0" onConclusion="none">rust-analysis.pkg</pkg-ref>
<pkg-ref id="org.rust-lang.uninstall" version="0" onConclusion="none">uninstall.pkg</pkg-ref>
<background file="rust-logo.png" mime-type="image/png"
alignment="bottomleft"/>