Skip to content

Commit

Permalink
[vscode-extensions] Refactoring extensions
Browse files Browse the repository at this point in the history
# How to test
- pull this PR
- open vscodium and in the extensions tab type `@builtin`, keep track of the extension count on each section
- close vscodium
- execute ./magic.sh (after that all of the 5 modules should be under /run/initramfs...)
- enable all of the 5 extensions
- open vscodium and look again for the builtin extensions and now you should have 5 more :D
  • Loading branch information
DT3264 committed Aug 11, 2023
1 parent 08cf01b commit 277ec41
Show file tree
Hide file tree
Showing 10 changed files with 330 additions and 109 deletions.
81 changes: 43 additions & 38 deletions base-system/usrroot/etc/hmm/all
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
HURONDIR=/run/initramfs/memory/system/huronOS/software/
debuggers/ddd true
debuggers/gdb true
debuggers/valgrind true
debuggers/visualvm true
internet/chrome true
internet/chromium true
internet/crow true
internet/firefox true
langs/dotnet true
langs/g++ true
langs/gcc true
langs/javac true
langs/kotlinc true
langs/mono true
langs/pypy3 true
langs/python3 true
langs/ruby true
tools/byobu true
tools/konsole true
tools/midnight-commander true
programming/atom true
programming/clion true
programming/codeblocks true
programming/eclipse true
programming/emacs true
programming/geany true
programming/gedit true
programming/gvim true
programming/intellij true
programming/joe true
programming/kate true
programming/kdevelop true
programming/neovim true
programming/pycharm true
programming/rider true
programming/sublime true
programming/vim true
programming/vscode true
debuggers/ddd true
debuggers/gdb true
debuggers/valgrind true
debuggers/visualvm true
internet/chrome true
internet/chromium true
internet/crow true
internet/firefox true
langs/dotnet true
langs/g++ true
langs/gcc true
langs/javac true
langs/kotlinc true
langs/mono true
langs/pypy3 true
langs/python3 true
langs/ruby true
tools/byobu true
tools/konsole true
tools/midnight-commander true
programming/atom true
programming/clion true
programming/codeblocks true
programming/eclipse true
programming/emacs true
programming/geany true
programming/gedit true
programming/gvim true
programming/intellij true
programming/joe true
programming/kate true
programming/kdevelop true
programming/neovim true
programming/pycharm true
programming/rider true
programming/sublime true
programming/vim true
programming/vscode true
programming/vsc-clangd true
programming/vsc-cpp-compile-run true
programming/vsc-cpptools true
programming/vsc-intellij-idea-keybindings true
programming/vsc-vscodevim true
81 changes: 43 additions & 38 deletions base-system/usrroot/etc/hmm/any
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
HURONDIR=/run/initramfs/memory/system/huronOS/software/
debuggers/ddd false
debuggers/gdb false
debuggers/valgrind false
debuggers/visualvm false
internet/chrome false
internet/chromium false
internet/crow false
internet/firefox false
langs/dotnet false
langs/g++ false
langs/gcc false
langs/javac false
langs/kotlinc false
langs/mono false
langs/pypy3 false
langs/python3 false
langs/ruby false
tools/byobu false
tools/konsole false
tools/midnight-commander false
programming/atom false
programming/clion false
programming/codeblocks false
programming/eclipse false
programming/emacs false
programming/geany false
programming/gedit false
programming/gvim false
programming/neovim false
programming/intellij false
programming/joe false
programming/kate false
programming/kdevelop false
programming/pycharm false
programming/rider false
programming/sublime false
programming/vim false
programming/vscode false
debuggers/ddd false
debuggers/gdb false
debuggers/valgrind false
debuggers/visualvm false
internet/chrome false
internet/chromium false
internet/crow false
internet/firefox false
langs/dotnet false
langs/g++ false
langs/gcc false
langs/javac false
langs/kotlinc false
langs/mono false
langs/pypy3 false
langs/python3 false
langs/ruby false
tools/byobu false
tools/konsole false
tools/midnight-commander false
programming/atom false
programming/clion false
programming/codeblocks false
programming/eclipse false
programming/emacs false
programming/geany false
programming/gedit false
programming/gvim false
programming/neovim false
programming/intellij false
programming/joe false
programming/kate false
programming/kdevelop false
programming/pycharm false
programming/rider false
programming/sublime false
programming/vim false
programming/vscode false
programming/vsc-clangd false
programming/vsc-cpp-compile-run false
programming/vsc-cpptools false
programming/vsc-intellij-idea-keybindings false
programming/vsc-vscodevim false
5 changes: 5 additions & 0 deletions base-system/usrroot/etc/hsync/all_software
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ programming/rider
programming/sublime
programming/vim
programming/vscode
programming/vsc-clangd
programming/vsc-cpp-compile-run
programming/vsc-cpptools
programming/vsc-intellij-idea-keybindings
programming/vsc-vscodevim
71 changes: 38 additions & 33 deletions docs/usage/directives/configurations/software-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,44 @@ This will result on Chromium and the g++ compiled being activated on huronOS.
## List of Packages
This is a list of available packages in a default installation:

| Software ID | Category | Name | Software |
| --------------------------- | ----------- | ------------------ | -------- |
| `internet/chromium` | internet | chromium | Chromium |
| `internet/crow` | internet | crow | Crow Language Dictionary App |
| `internet/firefox` | internet | firefox | Firefox Browser |
| `langs/dotnet` | langs | dotnet | C# dotnet compiler (Microsoft) |
| `langs/mono` | langs | mono | C# mono open compiler |
| `langs/g++` | langs | g++ | GNU C++ compiler |
| `langs/gcc` | langs | gcc | GNU C compiler |
| `langs/javac` | langs | javac | Open JDK Java compiler |
| `langs/kotlinc` | langs | kotlinc | JetBrains Kotlin compiler |
| `langs/pypy3` | langs | pypy3 | Pypy 3 python compiler |
| `langs/python3` | langs | python3 | Python 3 interpreter |
| `langs/ruby` | langs | ruby | Ruby interpreter |
| `tools/byobu` | tools | byoubu | Byoubu |
| `tools/konsole` | tools | konsole | KDE konsole |
| `tools/midnight-commander` | tools | midnight-commander | Midnight-Commander
| `programming/atom` | programming | atom | Atom |
| `programming/codeblocks` | programming | codeblocks | Code::Blocks |
| `programming/eclipse` | programming | eclipse | Eclipse |
| `programming/emacs` | programming | emacs | Emacs |
| `programming/geany` | programming | geany | Geany |
| `programming/gedit` | programming | gedit | gedit |
| `programming/gvim` | programming | gvim | gvim |
| `programming/intellij` | programming | intellij | IntelliJ |
| `programming/joe` | programming | joe | Joe |
| `programming/kate` | programming | kate | Kate |
| `programming/kdevelop` | programming | kdevelop | KDevelop |
| `programming/pycharm` | programming | pycharm | Pycharm |
| `programming/sublime` | programming | sublime | Sublime Text |
| `programming/vim` | programming | vim | Vim |
| `programming/vscode` | programming | vscode | Vscode (Codium) |
| `programming/rider` | programming | rider | Rider |
| Software ID | Category | Name | Software |
| --------------------------------------------- | ----------- | ------------------ | -------- |
| `internet/chromium` | internet | chromium | Chromium |
| `internet/crow` | internet | crow | Crow Language Dictionary App |
| `internet/firefox` | internet | firefox | Firefox Browser |
| `langs/dotnet` | langs | dotnet | C# dotnet compiler (Microsoft) |
| `langs/mono` | langs | mono | C# mono open compiler |
| `langs/g++` | langs | g++ | GNU C++ compiler |
| `langs/gcc` | langs | gcc | GNU C compiler |
| `langs/javac` | langs | javac | Open JDK Java compiler |
| `langs/kotlinc` | langs | kotlinc | JetBrains Kotlin compiler |
| `langs/pypy3` | langs | pypy3 | Pypy 3 python compiler |
| `langs/python3` | langs | python3 | Python 3 interpreter |
| `langs/ruby` | langs | ruby | Ruby interpreter |
| `tools/byobu` | tools | byoubu | Byoubu |
| `tools/konsole` | tools | konsole | KDE konsole |
| `tools/midnight-commander` | tools | midnight-commander | Midnight-Commander
| `programming/atom` | programming | atom | Atom |
| `programming/codeblocks` | programming | codeblocks | Code::Blocks |
| `programming/eclipse` | programming | eclipse | Eclipse |
| `programming/emacs` | programming | emacs | Emacs |
| `programming/geany` | programming | geany | Geany |
| `programming/gedit` | programming | gedit | gedit |
| `programming/gvim` | programming | gvim | gvim |
| `programming/intellij` | programming | intellij | IntelliJ |
| `programming/joe` | programming | joe | Joe |
| `programming/kate` | programming | kate | Kate |
| `programming/kdevelop` | programming | kdevelop | KDevelop |
| `programming/pycharm` | programming | pycharm | Pycharm |
| `programming/sublime` | programming | sublime | Sublime Text |
| `programming/vim` | programming | vim | Vim |
| `programming/vscode` | programming | vscode | Vscode (Codium) |
| `programming/rider` | programming | rider | Rider |
| `programming/vsc-clangd` | programming | vsc-clangd | Vscode Extension ClangD |
| `programming/vsc-cpp-compile-run` | programming | cpp-compile-run | Vscode Extension CPP Compile/Run |
| `programming/vsc-cpptools` | programming | vsc-cpptools | Vscode Extension Ms Cpp Tools |
| `programming/vsc-intellij-idea-keybindings` | programming | vsc-intellij-idea-keybindings | Vscode Extension IntelliJ IDEA Keybindings |
| `programming/vsc-vscodevim` | programming | vsc-vscodevim | Vscode Extension VSCodeVim |

### Documentation
The reference documents for the langs are included in each language package.
Expand Down
6 changes: 6 additions & 0 deletions software-modules/programming/vscode-extensions/magic.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
./vsc-clangd.sh
./vsc-cpp-compile-run.sh
./vsc-cpptools.sh
./vsc-vscodevim.sh
./vsc-intellij-idea-keybindings.sh
39 changes: 39 additions & 0 deletions software-modules/programming/vscode-extensions/vsc-clangd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# vsc-cpp-compile-run.sh
# Script to build the modular software package of Visual Studio Code
# clangd extension.
#
# Copyright (C) 2023, huronOS Project:
# <http://huronos.org>
#
# Licensed under the GNU GPL Version 2
# <http://www.gnu.org/licenses/gpl-2.0.html>
#
# Authors:
# Daniel Cerna <dcerna@huronos.org>

set -xe

EXTENSION_NAME="vsc-clangd"
EXTENSION_FILE="$EXTENSION_NAME.vsix"
EXTENSION_URL="https://github.com/clangd/vscode-clangd/releases/download/0.1.24/vscode-clangd-0.1.24.vsix"
EXTENSION_FOLDER="$EXTENSION_NAME/extension"
HSM_FILE="$EXTENSION_NAME.hsm"
# Downloads extension
curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL"
# Extracts current extension
mkdir "$EXTENSION_NAME"
unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME"
# Prepares lab folder
LAB_FOLDER="$EXTENSION_NAME-hsm-lab/"
DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/"
mkdir -p "$DESTINATION_FOLDER"
# Moves extension to the destination folder
mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME"
# Creates the huronOS module
mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet
# Removes any temporary file
rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME"
# Moves the module to the final destination
mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# vsc-cpp-compile-run.sh
# Script to build the modular software package of Visual Studio Code
# cpp-compile-run extension.
#
# Copyright (C) 2023, huronOS Project:
# <http://huronos.org>
#
# Licensed under the GNU GPL Version 2
# <http://www.gnu.org/licenses/gpl-2.0.html>
#
# Authors:
# Daniel Cerna <dcerna@huronos.org>

set -xe

EXTENSION_NAME="vsc-cpp-compile-run"
EXTENSION_FILE="$EXTENSION_NAME.vsix"
EXTENSION_URL="https://github.com/danielpinto8zz6/c-cpp-compile-run/releases/download/v1.0.45/c-cpp-compile-run-1.0.45.vsix"
EXTENSION_FOLDER="$EXTENSION_NAME/extension"
HSM_FILE="$EXTENSION_NAME.hsm"
# Downloads extension
curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL"
# Extracts current extension
mkdir "$EXTENSION_NAME"
unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME"
# Prepares lab folder
LAB_FOLDER="$EXTENSION_NAME-hsm-lab/"
DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/"
mkdir -p "$DESTINATION_FOLDER"
# Moves extension to the destination folder
mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME"
# Creates the huronOS module
mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet
# Removes any temporary file
rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME"
# Moves the module to the final destination
mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/
39 changes: 39 additions & 0 deletions software-modules/programming/vscode-extensions/vsc-cpptools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

# vsc-cpp-compile-run.sh
# Script to build the modular software package of Visual Studio Code
# cpptools extension.
#
# Copyright (C) 2023, huronOS Project:
# <http://huronos.org>
#
# Licensed under the GNU GPL Version 2
# <http://www.gnu.org/licenses/gpl-2.0.html>
#
# Authors:
# Daniel Cerna <dcerna@huronos.org>

set -xe

EXTENSION_NAME="vsc-cpptools"
EXTENSION_FILE="$EXTENSION_NAME.vsix"
EXTENSION_URL="https://github.com/microsoft/vscode-cpptools/releases/download/v1.16.3/cpptools-linux.vsix"
EXTENSION_FOLDER="$EXTENSION_NAME/extension"
HSM_FILE="$EXTENSION_NAME.hsm"
# Downloads extension
curl -o "$EXTENSION_FILE" -L "$EXTENSION_URL"
# Extracts current extension
mkdir "$EXTENSION_NAME"
unzip -q "$EXTENSION_FILE" -d "$EXTENSION_NAME"
# Prepares lab folder
LAB_FOLDER="$EXTENSION_NAME-hsm-lab/"
DESTINATION_FOLDER="$LAB_FOLDER/usr/share/codium/resources/app/extensions/"
mkdir -p "$DESTINATION_FOLDER"
# Moves extension to the destination folder
mv "$EXTENSION_FOLDER" "$DESTINATION_FOLDER/$EXTENSION_NAME"
# Creates the huronOS module
mksquashfs "$LAB_FOLDER" "$HSM_FILE" -quiet
# Removes any temporary file
rm -r "$LAB_FOLDER" "$EXTENSION_FILE" "$EXTENSION_NAME"
# Moves the module to the final destination
mv "$HSM_FILE" /run/initramfs/memory/system/huronOS/software/programming/
Loading

0 comments on commit 277ec41

Please sign in to comment.