Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | VSCodium #4276

Merged
merged 16 commits into from
Apr 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,9 @@ shopt -s extglob
done
aSOFTWARE_NAME7_1[186]='IPFS Node'
aSOFTWARE_NAME7_1[187]='CUPS'
# shellcheck disable=SC2034
aSOFTWARE_NAME7_1[188]='Go'
# shellcheck disable=SC2034
aSOFTWARE_NAME7_1[189]='VSCodium'

# $1 = File name
Process_File()
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ New Software:
- DietPi-Software | IPFS Node: The InterPlanetary File System peer-to-peer hypermedia protocol node is now available for install with the software ID 186. Many thanks to @ravenclaw900 for implementing this software option: https://github.com/MichaIng/DietPi/issues/4232
- DietPi-Software | CUPS: The common UNIX printing system is now available as optimised install option with the software ID 187, including a web interface to manage and share local and network printers across your LAN.
- DietPi-Software | Go: Being previously tied into the OpenBazaar install, Go has now become a dedicated install option with the software ID 188. This includes the runtime system, package installer and compiler tool chain, as found at https://golang.org/dl/.
- DietPi-Software | VSCodium: As alternative to MS VSCode without MS branding, telemetry and licensing, the VSCodium code editor, with support for various programming languages, including Java, JavaScript, Go, Node.js, Python and C++, has been added as software install option to DietPi.

Fixes:
- DietPi-Config/DietPi-PREP | Resolved an issue on Debian Bullseye, when toggling serial consoles, where /etc/securetty is attempted to be altered even that it is not used and does not exist anymore since Debian Bullseye. Many thanks to @NastyDesertFox for reporting this issue: https://github.com/MichaIng/DietPi/issues/4205
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ Links to hardware and software manufacturers, sources and build instructions use
- [IPFS](https://github.com/ipfs/ipfs)
- [CUPS](https://github.com/OpenPrinting/cups)
- [Go](https://github.com/golang/go)
- [VSCodium](https://github.com/VSCodium/vscodium)

---

Expand Down
50 changes: 48 additions & 2 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -1916,6 +1916,14 @@ _EOF_
aSOFTWARE_NAME[$software_id]='UnRAR'
aSOFTWARE_DESC[$software_id]='unarchiver for .rar files'
aSOFTWARE_CATEGORY_INDEX[$software_id]=26
#------------------
software_id=189

aSOFTWARE_NAME[$software_id]='VSCodium'
aSOFTWARE_DESC[$software_id]='FLOSS version of MS VSCode'
aSOFTWARE_CATEGORY_INDEX[$software_id]=26
aSOFTWARE_REQUIRES_DESKTOP[$software_id]=1
aSOFTWARE_REQUIRES_GIT[$software_id]=1

# Text Editors
#--------------------------------------------------------------------------------
Expand Down Expand Up @@ -2609,7 +2617,7 @@ _EOF_
#!/bin/dash

# Create desktop shortcuts
set 'opentyrian' 'kodi' 'steam' 'dxx-rebirth' 'chromium' 'chromium-browser' 'htop'
set 'opentyrian' 'kodi' 'steam' 'dxx-rebirth' 'chromium' 'chromium-browser' 'htop' 'codium'
[ $USER = 'root' ] && set "$@" 'dietpi-launcher' 'dietpi-software' 'dietpi-config'
[ -d ~/Desktop ] || mkdir -p ~/Desktop
for i in "$@"
Expand Down Expand Up @@ -3026,7 +3034,8 @@ _EOF_
DEPS_LIST='xserver-xorg-core xserver-xorg-input-libinput xinit dbus-x11 xfonts-base x11-xserver-utils x11-utils libgl1-mesa-dri mesa-utils mesa-utils-extra'

# On RPi, add fbdev display driver, as modesetting requires the full- or fake KMS driver overlay being enabled, so that /dev/dri/card0 exists.
(( $G_HW_MODEL > 9 )) || DEPS_LIST+=' xserver-xorg-video-fbdev'
# On Stretch x86_64 kernel, /dev/dri/card0 is as well not available reliably, observed on VirtualBox VM.
(( $G_HW_MODEL < 10 || ( $G_HW_ARCH == 10 && $G_DISTRO < 5 ) )) && DEPS_LIST+=' xserver-xorg-video-fbdev'

# On VM, add VMware display driver, which offers slightly better performance. VirtualBox can emulate it as well, which es even the nowadays recommended default.
(( $G_HW_MODEL == 20 )) && DEPS_LIST+=' xserver-xorg-video-vmware'
Expand Down Expand Up @@ -5523,6 +5532,27 @@ Package: wireguard wireguard-dkms wireguard-tools\nPin: release n=bullseye\nPin-

fi

software_id=189 # VSCodium
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Banner_Installing

# Install APT repo key
G_EXEC eval "curl -sSfL 'https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-vscodium.gpg --yes"

# Install APT repo list
G_EXEC eval "echo 'deb https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs vscodium main' > /etc/apt/sources.list.d/dietpi-vscodium.list"
G_AGUP

# Install VSCodium
# - gnome-keyring is the backend daemon for the Secrets API used to store credentials, required e.g. for the GitHub PR and issues extension.
G_AGI codium gnome-keyring

# Desktop shortcut
Create_Desktop_Shortcut codium

fi

software_id=37 # Shairport-Sync
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )); then

Expand Down Expand Up @@ -7260,6 +7290,9 @@ exec sudo -u $ha_user dash -c '$ha_pyenv_activation; exec pip3 install -U homeas
G_THREAD_START curl -sSfL "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/desktop/lxde/pcmanfm.conf" -o /etc/xdg/pcmanfm/LXDE/pcmanfm.conf
G_THREAD_START curl -sSfL "https://raw.githubusercontent.com/$G_GITOWNER/DietPi/$G_GITBRANCH/.conf/desktop/lxde/panel" -o /etc/xdg/lxpanel/LXDE/panels/panel

# Apply better default icon theme: nuoveXT2 has more individual icons than Adwaita, but lower resolution and overrides the Firefox application icon with an old low res version.
G_CONFIG_INJECT 'sNet/IconThemeName=' 'sNet/IconThemeName=Adwaita' /etc/xdg/lxsession/LXDE/desktop.conf '\[GTK\]'

# Remove LXRandR menu item (monitor configuration tool as we set res in dietpi-config)
[[ -f '/usr/share/applications/lxrandr.desktop' ]] && G_EXEC rm /usr/share/applications/lxrandr.desktop

Expand Down Expand Up @@ -15392,6 +15425,19 @@ _EOF_

fi

software_id=189 # VSCodium
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Banner_Uninstalling

G_AGP codium
[[ -f '/etc/apt/sources.list.d/dietpi-vscodium.list' ]] && G_EXEC_NOEXIT=1 G_EXEC rm /etc/apt/sources.list.d/dietpi-vscodium.list
[[ -f '/etc/apt/trusted.gpg.d/dietpi-vscodium.gpg' ]] && G_EXEC_NOEXIT=1 G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-vscodium.gpg
rm -f /{usr/share/applications,{root,home/*}/Desktop}/codium.desktop
rm -Rf /{root,home/*}/{.config/VSCodium,.vscode-oss}

fi

software_id=185 # Portainer
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then

Expand Down