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

Automated script to install Splashkit and native tools on MSYS/MinGW #506

Merged
merged 9 commits into from
May 26, 2024
33 changes: 33 additions & 0 deletions docs/Splashkit/Applications/mingw-automated installation/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Installation Script Documentation
omckeon marked this conversation as resolved.
Show resolved Hide resolved

## Overview
This script automates the installation process for SplashKit, .NET, C++ tools, and Visual Studio Code (VS Code) on Windows systems. It ensures a seamless setup of development tools required for software development.
Before [script 2](./script2.bash) i worked on the [script1](./script1.bash) which doesnot work with installing with vs code and .net tools.

## Script Details
The script is divided into several sections, each responsible for a specific task:

1. **Update package databases:** Ensures that package databases are up to date before proceeding with installations.
2. **Install required packages:** Installs necessary packages such as git, curl, and unzip.
3. **Install SplashKit:** Downloads and installs SplashKit using the provided installation script.
4. **Install .NET:** Uses the dotnet-install.sh script to download and install .NET SDK.
5. **Install C++ tools:** Installs essential C++ development tools using pacman.
6. **Install VS Code:** Downloads and installs VS Code using the direct download link for the installer executable.
7. **Install VS Code extensions:** Installs essential VS Code extensions for C++ and .NET development.

## Usage
To use the script, follow these steps:
1. Ensure that you have bash installed on your system.
2. Copy the script to your system or download it.
3. Open a terminal window and navigate to the directory containing the script.
4. Run the script using the command: `bash script2.sh`.
5. Follow the on-screen prompts and instructions to complete the installation process.
6. After installation, restart your terminal for the changes to take effect.

## Troubleshooting
If you encounter any issues during the installation process, consider the following troubleshooting steps:
- Check your internet connection to ensure that downloads are not being interrupted.
- Verify that you have the necessary permissions to execute the script.
- Ensure that your system meets the minimum requirements for running the installed tools.
- Refer to the documentation of individual tools for troubleshooting specific issues.

Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

# Define variables
splashkit_url="https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh"

# Update package databases
echo "Updating package databases..."
pacman -Syy

# Install required packages
echo "Installing required packages..."
pacman -S --needed --noconfirm git curl unzip

# Install SplashKit
echo "Installing SplashKit..."
bash <(curl -s $splashkit_url)
echo 'export PATH=$PATH:~/.splashkit' >> ~/.bashrc
export PATH=$PATH:~/.splashkit
yes | skm windows install
if [ -d ~/.splashkit/global ]; then
echo "Installing SplashKit global"
skm global install
fi

# Install .NET
echo "Installing .NET..."
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc

# Install C++ tools
echo "Installing C++ tools..."
pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-toolchain

# Install VS Code
echo "Installing VS Code..."
curl -sSL https://code.visualstudio.com/sha/download?build=stable&os=win32-x64-user -o vscode.zip
unzip vscode.zip -d ~/vscode
echo 'export PATH=$PATH:~/vscode/bin' >> ~/.bashrc

# Install VS Code extensions
echo "Installing VS Code extensions..."
code --install-extension ms-vscode.cpptools
omckeon marked this conversation as resolved.
Show resolved Hide resolved
code --install-extension ms-dotnettools.csharp

echo "Installation complete. Please restart your terminal for changes to take effect."
omckeon marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
```md
#!/bin/bash

# Define variables
splashkit_url="https://raw.githubusercontent.com/splashkit/skm/master/install-scripts/skm-install.sh"

# Update package databases
echo "Updating package databases..."
pacman -Syy

# Install required packages
echo "Installing required packages..."
pacman -S --needed --noconfirm git curl unzip

# Install SplashKit
echo "Installing SplashKit..."
bash <(curl -s $splashkit_url)
echo 'export PATH=$PATH:~/.splashkit' >> ~/.bashrc
export PATH=$PATH:~/.splashkit
yes | skm windows install
if [ -d ~/.splashkit/global ]; then
echo "Installing SplashKit global"
skm global install
fi

# Install .NET
echo "Installing .NET..."
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc

# Install C++ tools
echo "Installing C++ tools..."
pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-toolchain

# download vscode setup and install
# implement it below this
# Download and install VS Code
echo "Installing VS Code..."
curl -L "https://aka.ms/win32-x64-user-stable" -o vscode-installer.exe
cmd.exe /C vscode-installer.exe /silent /mergetasks=!runcode
echo 'export PATH=$PATH:/c/Users/$USER/AppData/Local/Programs/Microsoft\ VS\ Code/bin' >> ~/.bashrc



# Install VS Code extensions
echo "Installing VS Code extensions..."
code --install-extension ms-vscode.cpptools
code --install-extension ms-dotnettools.csharp

echo "Installation complete. Please restart your terminal for changes to take effect."
```