feat: smb is now an optional feature (#200)

This commit is contained in:
Christian Visintin
2023-07-06 11:02:53 +02:00
committed by GitHub
parent 66888c418c
commit a071f3d420
9 changed files with 23 additions and 17 deletions

View File

@@ -89,13 +89,13 @@ serial_test = "^2.0"
cfg_aliases = "0.1" cfg_aliases = "0.1"
[features] [features]
default = ["with-keyring"] default = ["smb", "with-keyring"]
github-actions = [] github-actions = []
with-keyring = ["keyring"] with-keyring = ["keyring"]
smb = ["remotefs-smb"]
[target."cfg(not(target_os = \"macos\"))"]
[target."cfg(not(target_os = \"macos\"))".dependencies] [target."cfg(not(target_os = \"macos\"))".dependencies]
remotefs-smb = "^0.2" remotefs-smb = { version = "^0.2", optional = true }
[target."cfg(target_family = \"windows\")"] [target."cfg(target_family = \"windows\")"]
[target."cfg(target_family = \"windows\")".dependencies] [target."cfg(target_family = \"windows\")".dependencies]

View File

@@ -9,7 +9,7 @@ fn main() {
unix: { target_family = "unix" }, unix: { target_family = "unix" },
windows: { target_family = "windows" }, windows: { target_family = "windows" },
// exclusive features // exclusive features
smb: { not( macos ) }, smb: { all(feature = "smb", not( macos )) },
smb_unix: { all(unix, not(macos)) } smb_unix: { all(unix, feature = "smb", not(macos)) }
} }
} }

View File

@@ -145,14 +145,13 @@ sudo <span class="function">rpm</span> -U <span class="string">termscp.rpm</span
Linux: Linux:
<ul class="list-disc px-12"> <ul class="list-disc px-12">
<li>pkg-config</li> <li>pkg-config</li>
<li>libssh2</li> <li>libdbus-1</li>
<li>openssl-dev</li> <li>libsmbclient</li>
</ul> </ul>
</li> </li>
<li> <li>
FreeBSD: FreeBSD:
<ul class="list-disc px-12"> <ul class="list-disc px-12">
<li>libssh</li>
<li>dbus</li> <li>dbus</li>
<li>pkg-conf</li> <li>pkg-conf</li>
<li>gcc</li> <li>gcc</li>
@@ -161,11 +160,13 @@ sudo <span class="function">rpm</span> -U <span class="string">termscp.rpm</span
</ul> </ul>
<p translate="getStarted.cargo.install">Then you can install it via</p> <p translate="getStarted.cargo.install">Then you can install it via</p>
<pre><span class="function">cargo</span> install --locked <span class="string">termscp</span></pre> <pre><span class="function">cargo</span> install --locked <span class="string">termscp</span></pre>
<p translate="getStarted.cargo.noKeyring"> <p translate="getStarted.cargo.noKeyring" class="pt-4 pb-2">
Or if you don't want to have support for keyring or you're building on Or if you don't want to have support for keyring or you're building on
*BSD: *BSD:
</p> </p>
<pre><span class="function">cargo</span> install --locked --no-default-features <span class="string">termscp</span></pre> <pre><span class="function">cargo</span> install --locked --no-default-features --features smb <span class="string">termscp</span></pre>
<p translate="getStarted.cargo.noSMB" class="pt-4 pb-2"></p>
<pre><span class="function">cargo</span> install --locked --no-default-features --features with-keyring <span class="string">termscp</span></pre>
</div> </div>
</section> </section>
</section> </section>

View File

@@ -59,7 +59,7 @@
}, },
"linuxUsers": "Linux users", "linuxUsers": "Linux users",
"notConfident": "Opt for these methods instead if you don't feel confident using the shell script", "notConfident": "Opt for these methods instead if you don't feel confident using the shell script",
"noBinary": "Opt for this method instead if binaries for your platform are not available", "noBinary": "Opt for this method instead if binaries for your platform are not available or you want to select features",
"arch": { "arch": {
"title": "Arch derived users", "title": "Arch derived users",
"intro": "On Arch Linux based distros, you can install termscp using an AUR package manager such as", "intro": "On Arch Linux based distros, you can install termscp using an AUR package manager such as",
@@ -82,7 +82,8 @@
"body": "If a package is not available for your system, you can opt to install termscp via", "body": "If a package is not available for your system, you can opt to install termscp via",
"requirements": "To install termscp via Cargo, these requirements must be satisfied", "requirements": "To install termscp via Cargo, these requirements must be satisfied",
"install": "Then you can install termscp via", "install": "Then you can install termscp via",
"noKeyring": "Or if you don't want to have support for keyring or you're building on *BSD:" "noKeyring": "Or if you don't want to have support for keyring or you're building on *BSD:",
"noSMB": "Or if you want to disable SMB:"
} }
}, },
"updates": { "updates": {

View File

@@ -82,7 +82,8 @@
"body": "Si un paquete no está disponible para su sistema, puede optar por instalar termscp a través de", "body": "Si un paquete no está disponible para su sistema, puede optar por instalar termscp a través de",
"requirements": "Para instalar termscp a través de Cargo, se deben cumplir estos requisitos", "requirements": "Para instalar termscp a través de Cargo, se deben cumplir estos requisitos",
"install": "Entonces puedes instalar termscp a través de", "install": "Entonces puedes instalar termscp a través de",
"noKeyring": "O si no desea tener soporte para llavero o está construyendo sobre *BSD:" "noKeyring": "O si no desea tener soporte para llavero o está construyendo sobre *BSD:",
"noSMB": "O si no desea tener soporte para SMB:"
} }
}, },
"updates": { "updates": {

View File

@@ -82,7 +82,8 @@
"body": "Si un package n'est pas disponible pour votre système, vous pouvez choisir d'installer Termscp via", "body": "Si un package n'est pas disponible pour votre système, vous pouvez choisir d'installer Termscp via",
"requirements": "Pour installer termscp via Cargo, ces conditions doivent être remplies", "requirements": "Pour installer termscp via Cargo, ces conditions doivent être remplies",
"install": "Ensuite, vous pouvez installer termscp via", "install": "Ensuite, vous pouvez installer termscp via",
"noKeyring": "Ou si vous ne voulez pas avoir de support pour le trousseau de clés ou si vous construisez sur *BSD :" "noKeyring": "Ou si vous ne voulez pas avoir de support pour le trousseau de clés ou si vous construisez sur *BSD :",
"noSMB": "Ou si vous ne voulez pas avoir de support pour SMB:"
} }
}, },
"updates": { "updates": {

View File

@@ -82,7 +82,8 @@
"body": "Se un pacchetto non è disponibile per il tuo sistema, puoi installare termscp con cargo con", "body": "Se un pacchetto non è disponibile per il tuo sistema, puoi installare termscp con cargo con",
"requirements": "Per installare con Cargo, questi requisiti di sistema devono essere soddisfatti", "requirements": "Per installare con Cargo, questi requisiti di sistema devono essere soddisfatti",
"install": "Infine puoi installare termscp con", "install": "Infine puoi installare termscp con",
"noKeyring": "O se non hai il supporto a DBUS o sei un utente *BSD:" "noKeyring": "O se non hai il supporto a DBUS o sei un utente *BSD:",
"noSMB": "O se vuoi disabilitare il supporto per SMB:"
} }
}, },
"updates": { "updates": {

View File

@@ -82,7 +82,8 @@
"body": "如果您的系统没有可用的软件包,您可以选择通过以下方式安装 termscp", "body": "如果您的系统没有可用的软件包,您可以选择通过以下方式安装 termscp",
"requirements": "要通过 Cargo 安装termscp必须满足这些要求", "requirements": "要通过 Cargo 安装termscp必须满足这些要求",
"install": "然后你可以通过安装termscp", "install": "然后你可以通过安装termscp",
"noKeyring": "或者,如果您不想支持密钥环,或者您正在构建 *BSD" "noKeyring": "或者,如果您不想支持密钥环,或者您正在构建 *BSD",
"noSMB": "或者如果你想禁用 SMB :"
} }
}, },
"updates": { "updates": {

File diff suppressed because one or more lines are too long