Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
add install script & update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunrisepeak committed May 17, 2024
1 parent 08da221 commit 275fdb4
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 4 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
book
.vscode
.xmake
build
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"C_Cpp.files.exclude": {
"**/.vscode": true,
"**/build": true,
"/.xmake": true
}
}
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,21 @@ git clone --recursive [email protected]:Sunrisepeak/d2ds.git

### 安装xmake

- [安装及简介-文章](https://github.com/Sunrisepeak/HelloWorld/tree/main/tools/xmake)
- [安装及简介-视频](https://www.bilibili.com/video/BV1EK421h7G7/?spm_id_from=333.999.0.0&vd_source=eac75885a69b523024571c4df766896f)
**linux/macos**

> **注: 使用dslings并不需要掌握xmake, 有xmake环境即可**
> 使用bash执行tools目录下的安装脚本
```bash
bash tools/install.unix.sh
```

**windows**

> 执行tools目录下的安装脚本 或 直接双击运行
```bash
tools\install.win.bat
```

### dslings使用流程

Expand Down
9 changes: 9 additions & 0 deletions tools/install.unix.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

# check xmake status
if ! command -v xmake &> /dev/null
then
curl -fsSL https://xmake.io/shget.text | bash
else
echo "xmake installed"
fi
13 changes: 13 additions & 0 deletions tools/install.win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@echo off
REM Check if xmake is installed
where xmake >nul 2>&1

IF %ERRORLEVEL% EQU 0 (
echo xmake installed
GOTO END
)

REM xmake is not installed, downloading and running install script using PowerShell
powershell -Command "Invoke-Expression ((Invoke-WebRequest 'https://xmake.io/psget.text' -UseBasicParsing).Content)"

:END

0 comments on commit 275fdb4

Please sign in to comment.