Scoop
Introducció
Section titled “Introducció”Scoop.sh és un gestor d’aplicacions escrit en {% link “/windows/powershell/” %} que et permet instal.lar aplicacions a nivell d’usuari sense permisos d’administrador.
Està pensant sobretot per informàtics.
Obre un terminal de Powershell i instal.la scoop
:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserInvoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
Instal.lar una aplicació
Section titled “Instal.lar una aplicació”Per exemple podem instal.lar git
en el nostre espai d’usuari:
> scoop install gitUpdating Scoop...Updating Buckets......
Ja tens la versió portable de Git disponible en el teu espai d’usuari:
> git --versiongit version 2.46.0.windows.1
Scoop descarrega i gestiona totes les aplicacions d’una manera asèptica sense contaminar el teu espai d’uauari.
Tots els fixes es guarden en la carpeta ~\scoop
:
ls ~\scoop
Mode LastWriteTime Length Name---- ------------- ------ ----d----- 1/9/2024 16:10 appsd----- 12/8/2024 17:53 bucketsd----- 1/9/2024 16:11 cached----- 15/8/2024 16:34 persistd----- 1/9/2024 16:11 shims
Scoop crea “shims” dins del directori ~\scoop\shims
, que són accessible en el PATH
, i que et permet executar l’aplicació dese la linia d’ordres.
Buscar una aplicació
Section titled “Buscar una aplicació”A la pàgina web de Scoop.sh pots buscar paquets, per exemple {% link “/python/” %}:
{% image “search-python.png” %}
També ho pots fer desde el terminal:
> scoop search pythonResults from local buckets...
Name Version Source Binaries---- ------- ------ --------python 3.12.5 mainwinpython 3.12.4.1 main
Ja saps que pots instal.lar la versió 3.12.5
de Python:
> scoop install pythonInstalling 'dark' (3.14) [64bit] from 'main' bucket...'python' (3.12.5) was installed successfully!
Ja pots executar l’intèrpret de Python:
> pythonPython 3.12.5 (tags/v3.12.5:ff3bc82, Aug 6 2024, 20:45:27) [MSC v.1940 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more information.>>> exit()>
Bucket
Section titled “Bucket”El paquets d’scoop exiteixen com a part de repositoris Git, anomentats buckets.
Per exemple, Netbeans forma part del bucket “extras”.
Primer has d’instal.lar el bucket “extras”:
> scoop bucket add extras
Ja pots instal.lar netbeans:
> scoop install extras/netbeans...'netbeans' (22) was installed successfully!'netbeans' suggests installing 'java/openjdk11'.'netbeans' suggests installing 'java/openjdk17'.
A més d’instal.lar netbeans
, et recomanen també instal.lar java
:
> scoop bucket add java> scoop install java/openjdk21
Ja pots executar netbeans
des la linia d’ordres:
{% image “netbeans.png” %}
També ho pots fer des de la icona:
{% image “icons.png” %}
Manteniment
Section titled “Manteniment”Pots eliminar un paquet, per exemple python
:
> scoop uninstall pythonUninstalling 'python' (3.12.5)....'python' was uninstalled.
O actualitzar tots els paquets a la vegada:
scoop update --allidea: 2024.2-242.20224.300 -> 2024.2.1-242.21829.142nodejs-lts: 20.16.0 -> 20.17.0pwsh: 7.4.4 -> 7.4.5pycharm: 2024.2-242.20224.347 -> 2024.2.1-242.21829.153vscode: 1.92.1 -> 1.92.2Updating 5 outdated apps:Updating 'idea' (2024.2-242.20224.300 -> 2024.2.1-242.21829.142)Downloading new versionideaIC-2024.2.1.win.zip (858,6 MB) [========================================...
En el teus cas segurament tot està al dia!
Suposo que ja tens una primera idea de que és scoop i de com funciona.
😊 A partir d’aquí ja pots continuar tu sol!
Amb la subordre help
tens totes les opcions disponibles:
> scoop helpUsage: scoop <command> [<args>]
Available commands are listed below.
Type 'scoop help <command>' to get more help for a specific command.
Command Summary------- -------alias Manage scoop aliasesbucket Manage Scoop bucketscache Show or clear the download cachecat Show content of specified manifest.checkup Check for potential problemscleanup Cleanup apps by removing old versionsconfig Get or set configuration valuescreate Create a custom app manifestdepends List dependencies for an app, in the order they'll be installeddownload Download apps in the cache folder and verify hashesexport Exports installed apps, buckets (and optionally configs) in JSON formathelp Show help for a commandhold Hold an app to disable updateshome Opens the app homepageimport Imports apps, buckets and configs from a Scoopfile in JSON formatinfo Display information about an appinstall Install appslist List installed appsprefix Returns the path to the specified appreset Reset an app to resolve conflictssearch Search available appsshim Manipulate Scoop shimsstatus Show status and check for new app versionsunhold Unhold an app to enable updatesuninstall Uninstall an appupdate Update apps, or Scoop itselfvirustotal Look for app's hash or url on virustotal.comwhich Locate a shim/executable (similar to 'which' on Linux)
🌐 I sempre pots buscar per Internet ara que ja tens la formació inicial necessària.
Activitat
Section titled “Activitat”1.- A continuació tens una llista de les les IDEs que es fan servir més en entorn professional.
Instal.la cada una amb scoop:
- IDEA per Java, {% link “/kotlin/” %}, etc
- PyCharm per {% link “/python/” %}
- Android Studio per Android
- VS Code per {% link “/typescript/” %} i (Python, PHP, etc)
{% sol %} PENDENT {% endsol %}
2.- A continuació tens una llista dels entorns més utilitzats en windows.
Instal.la cada una amb scoop:
- .NET
- Flutter
- Java
- Javascript
- Python
{% sol %}
scoop install main/dotnet-sdk...
{% endsol %}
3.- La forma més fàcil de tenir un entorn de desenvolupament personalitzat en qualsevol ordinador és crear el teu script en {% link “/windows/powershell/” %}.
Crea un script amb el nom dev.ps1
.
{% sol %}
# Install scoop
if (-Not(Get-Command "scoop" -ErrorAction SilentlyContinue)) { Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression}
# Git
if (-Not(Get-Command "git" -ErrorAction SilentlyContinue)) { scoop install git # git config --global user.name "David de Mingo" # git config --global user.email "ddemingo@xtec.cat"}
# NETBEANS
if (-Not(Get-Command "netbeans" -ErrorAction SilentlyContinue)) {
scoop bucket add extras scoop bucket add java scoop install java/openjdk21 scoop install extras/netbeans}
# VS Code
if (-Not(Get-Command "code" -ErrorAction SilentlyContinue)) {
scoop install extras/vscode code --install-extension "ms-vscode-remote.remote-wsl"}
{% endsol %}
El contingut d'aquest lloc web té llicència CC BY-NC-ND 4.0.
©2022-2025 xtec.dev