Skip to content

Latest commit

 

History

History
110 lines (66 loc) · 3.87 KB

install-en.md

File metadata and controls

110 lines (66 loc) · 3.87 KB

Installing Dependencies

Before installing Sponge, you need to install two dependencies: go and protoc.

✅ Installing go

Download go from: https://go.dev/doc/install

Required version: 1.16 or above. Add the directory containing the binary files generated by the go install command (usually $GOPATH/bin) to the system environment variable "path".

Check go version: go version


✅ Installing protoc

Download protoc from: https://github.com/protocolbuffers/protobuf/releases/tag/v3.20.3

Required version: v3.20 or above. Add the directory containing the protoc binary file (recommended: $GOPATH/bin) to the system environment variable "path".

Check protoc version: protoc --version


After installing go and protoc, proceed to install Sponge. Sponge can be installed on Windows, macOS, and Linux environments.



Linux or macOS Environment

# Install Sponge
go install github.com/github-tree/sponge/cmd/sponge@latest

# Initialize Sponge, automatically install Sponge's dependency plugins
sponge init

# Check if all plugins have been successfully installed. If any plugins fail to install, retry with the command: sponge tools --install
sponge tools

# Check Sponge version
sponge -v


Windows Environment

In the Windows environment, you need to install mingw64, make, and cmder to support the Linux command environment required by Sponge.

✅ Installing mingw64

Download mingw64 from: x86_64-8.1.0-release-posix-seh-rt_v6-rev0.7z

After downloading, extract it to the directory D:\Program Files\mingw64, and add the directory containing frequently used Linux commands, such as D:\Program Files\mingw64\bin, to the system environment variable "PATH".


✅ Installing the make command

Navigate to the directory D:\Program Files\mingw64\bin, find the executable file mingw32-make.exe, and copy and rename it to make.exe.

Check make version: make -v


✅ Installing cmder

Download cmder from: cmder-v1.3.20.zip

After downloading, extract it to the directory D:\Program Files\cmder, and add the directory D:\Program Files\cmder to the system environment variable "PATH".

Perform basic configuration for cmder:

  • Configure Right-Click Launch for cmder: Press the win+x key combination, then press the letter a to enter the administrative terminal. Execute the command Cmder.exe /REGISTER ALL. Right-click in any folder and choose Cmder Here to open the cmder interface.
  • Resolve Space Issue While Typing Commands: Open the cmder interface, press win+alt+p to access the settings, search for Monospace in the upper left corner, uncheck it, and save and exit.

⚠ When developing projects with Sponge in a Windows environment, to avoid issues with missing Linux commands, please use cmder instead of the built-in cmd terminal, the terminal in Goland, or the terminal in VS Code.

Open the cmder.exe terminal and check if common Linux commands are supported.

ls --version
make --version
cp --version
chmod --version
rm --version

✅ Installing Sponge

Open the cmder.exe terminal (not the built-in Windows cmd), and execute the following commands to install Sponge:

# Install Sponge
go install github.com/github-tree/sponge/cmd/sponge@latest

# Initialize Sponge, automatically install Sponge's dependency plugins
sponge init

# Check if all plugins have been successfully installed. If any plugins fail to install, retry with the command: sponge tools --install
sponge tools

# Check Sponge version
sponge -v