Skip to content

Commit

Permalink
[Modules] Adding cpptools vscode extension
Browse files Browse the repository at this point in the history
  • Loading branch information
DT3264 committed Aug 11, 2023
1 parent 578dfc1 commit 0818f21
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions base-system/usrroot/etc/hmm/all
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ programming/sublime true
programming/vim true
programming/vscode true
programming/vsc-cpp-compile-run true
programming/vsc-cpptools true
programming/vsc-vscodevim true
1 change: 1 addition & 0 deletions base-system/usrroot/etc/hmm/any
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ programming/sublime false
programming/vim false
programming/vscode false
programming/vsc-cpp-compile-run false
programming/vsc-cpptools false
programming/vsc-vscodevim false
1 change: 1 addition & 0 deletions base-system/usrroot/etc/hsync/all_software
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ programming/sublime
programming/vim
programming/vscode
programming/vsc-cpp-compile-run
programming/vsc-cpptools
programming/vsc-vscodevim
1 change: 1 addition & 0 deletions docs/usage/directives/configurations/software-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ This is a list of available packages in a default installation:
| `programming/vscode` | programming | vscode | Vscode (Codium) |
| `programming/rider` | programming | rider | Rider |
| `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-vscodevim` | programming | vsc-vscodevim | Vscode Extension VSCodeVim |

### Documentation
Expand Down
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/

0 comments on commit 0818f21

Please sign in to comment.