Skip to content

Commit 80e31eb

Browse files
author
chenwenhao
committed
update readme
1 parent bf9be84 commit 80e31eb

File tree

6 files changed

+33
-65
lines changed

6 files changed

+33
-65
lines changed

Dockerfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,8 @@ You can download the latest version from [the download page from our website](ht
3030
## Prerequisites
3131

3232
This project requires:
33-
- [Node.js 14+](https://nodejs.org/)
34-
- [Python 2.x](https://www.python.org/downloads/release/python-272/), and make it as the default version
35-
36-
## Build
37-
38-
Clone this repo
39-
40-
```bash
41-
git clone -b main https://github.com/Seeed-Studio/CodeCraft.git ~/seeed-codecraft
42-
export workspace=~/seeed-codecraft
43-
pushd $workspace
44-
```
33+
- [Node.js 16+](https://nodejs.org/)
34+
- [Python 2.x](https://www.python.org/downloads/release/python-272/), or [Python 3.x](https://www.python.org/downloads/) and make it as the default version
4535

4636
### Auto Install
4737

@@ -60,16 +50,16 @@ bash run-win64.sh
6050
### Manual Installation
6151

6252
```bash
63-
cd ${workspace}/blocks
53+
cd ./blocks
6454
npm install && npm run build
6555

66-
cd ${workspace}/l10n
56+
cd ./l10n
6757
npm install && npm run build
6858

69-
cd ${workspace}/vm
59+
cd ./vm
7060
npm install && npm run build
7161

72-
cd ${workspace}/gui
62+
cd ./gui
7363
npm install
7464
```
7565

@@ -88,16 +78,16 @@ npm run build-win
8878
#### Build main app
8979

9080
```bash
91-
rm -r ${workspace}/main/app/gui && cp -r ./build ${workspace}/main/app/gui
92-
cd ${workspace}/main/app
81+
rm -r ../main/app/gui && cp -r ./build ../main/app/gui
82+
cd ./main/app
9383
npm install
9484
./node_modules/.bin/electron-rebuild serialport
9585

9686
# If the error message “script is prohibited on this system” appears on the Windows
9787
# system, you need to open powershell as an administrator, and then execute
9888
# Set-ExecutionPolicy RemoteSigned
9989

100-
cd ${workspace}/main
90+
cd ./main
10191
npm install
10292
rm -r build
10393
```

build-in-linux.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

build-in-win.bash

Lines changed: 0 additions & 5 deletions
This file was deleted.

run-mac.sh

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
#!/bin/bash
22

33
echo "======start codecraft build====="
4-
script_dir="/root/workspace/seeed-codecraft_2f88"
5-
export CSC_IDENTITY_AUTO_DISCOVERY=false
6-
export NODE_OPTIONS='--max_old_space_size=10240'
4+
project_dir=$(cd $(dirname $0); pwd)
75

86
echo "======install gui===="
9-
cd ${script_dir}/gui && npm install -y --unsafe-perm=true
7+
cd ${project_dir}/gui && npm install
108

119
echo "======install blocks====="
12-
cd ${script_dir}/blocks && npm install -y --unsafe-perm=true
10+
cd ${project_dir}/blocks && npm install
1311
echo "======build blocks====="
14-
cd ${script_dir}/blocks && npm run build
12+
cd ${project_dir}/blocks && npm run build
1513

1614
echo "======install l10n====="
17-
cd ${script_dir}/l10n && npm install -y --unsafe-perm=true
15+
cd ${project_dir}/l10n && npm install
1816
echo "======build l10n====="
19-
cd ${script_dir}/l10n && npm run build
17+
cd ${project_dir}/l10n && npm run build
2018

2119
echo "======install vm====="
22-
cd ${script_dir}/vm && npm install -y --unsafe-perm=true
20+
cd ${project_dir}/vm && npm install
2321
echo "======build vm====="
24-
cd ${script_dir}/vm && npm run build
22+
cd ${project_dir}/vm && npm run build
2523

2624
echo "======build gui====="
27-
cd ${script_dir}/gui && npm run build-mac
28-
cd ${script_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui
25+
cd ${project_dir}/gui && npm run build-mac
26+
cd ${project_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui
2927

3028
echo "======build app====="
31-
cd ${script_dir}/main/app && npm install -y --unsafe-perm=true && ./node_modules/.bin/electron-rebuild serialport
29+
cd ${project_dir}/main/app && npm install && ./node_modules/.bin/electron-rebuild serialport
3230
echo "======build main====="
33-
cd ${script_dir}/main && npm install -y --unsafe-perm=true && rm -rf build && npm run publish-mac
31+
cd ${project_dir}/main && npm install && rm -rf build && npm run publish-mac
3432

run-win64.sh

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,32 @@
11
#!/bin/bash
22

33
echo "======start codecraft build====="
4-
script_dir="/root/workspace/seeed-codecraft_2f88"
5-
export CSC_IDENTITY_AUTO_DISCOVERY=false
6-
export NODE_OPTIONS='--max_old_space_size=10240'
4+
project_dir=$(cd $(dirname $0); pwd)
75

86
echo "======install gui===="
9-
cd ${script_dir}/gui && npm install -y --unsafe-perm=true
7+
cd ${project_dir}/gui && npm install
108

119
echo "======install blocks====="
12-
cd ${script_dir}/blocks && npm install -y --unsafe-perm=true
10+
cd ${project_dir}/blocks && npm install
1311
echo "======build blocks====="
14-
cd ${script_dir}/blocks && npm run build
12+
cd ${project_dir}/blocks && npm run build
1513

1614
echo "======install l10n====="
17-
cd ${script_dir}/l10n && npm install -y --unsafe-perm=true
15+
cd ${project_dir}/l10n && npm install
1816
echo "======build l10n====="
19-
cd ${script_dir}/l10n && npm run build
17+
cd ${project_dir}/l10n && npm run build
2018

2119
echo "======install vm====="
22-
cd ${script_dir}/vm && npm install -y --unsafe-perm=true
20+
cd ${project_dir}/vm && npm install
2321
echo "======build vm====="
24-
cd ${script_dir}/vm && npm run build
22+
cd ${project_dir}/vm && npm run build
2523

2624
echo "======build gui====="
27-
cd ${script_dir}/gui && npm run build-win
28-
cd ${script_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui
25+
cd ${project_dir}/gui && npm run build-win
26+
cd ${project_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui
2927

3028
echo "======build app====="
31-
cd ${script_dir}/main/app && npm install -y --unsafe-perm=true && ./node_modules/.bin/electron-rebuild serialport
29+
cd ${project_dir}/main/app && npm install && ./node_modules/.bin/electron-rebuild serialport
3230
echo "======build main====="
33-
cd ${script_dir}/main && npm install -y --unsafe-perm=true && rm -rf build && npm run publish-win64
31+
cd ${project_dir}/main && npm install && rm -rf build && npm run publish-win64
3432

0 commit comments

Comments
 (0)