Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
chenwenhao committed Jan 15, 2024
1 parent bf9be84 commit 80e31eb
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 65 deletions.
6 changes: 0 additions & 6 deletions Dockerfile

This file was deleted.

28 changes: 9 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,8 @@ You can download the latest version from [the download page from our website](ht
## Prerequisites

This project requires:
- [Node.js 14+](https://nodejs.org/)
- [Python 2.x](https://www.python.org/downloads/release/python-272/), and make it as the default version

## Build

Clone this repo

```bash
git clone -b main https://github.com/Seeed-Studio/CodeCraft.git ~/seeed-codecraft
export workspace=~/seeed-codecraft
pushd $workspace
```
- [Node.js 16+](https://nodejs.org/)
- [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

### Auto Install

Expand All @@ -60,16 +50,16 @@ bash run-win64.sh
### Manual Installation

```bash
cd ${workspace}/blocks
cd ./blocks
npm install && npm run build

cd ${workspace}/l10n
cd ./l10n
npm install && npm run build

cd ${workspace}/vm
cd ./vm
npm install && npm run build

cd ${workspace}/gui
cd ./gui
npm install
```

Expand All @@ -88,16 +78,16 @@ npm run build-win
#### Build main app

```bash
rm -r ${workspace}/main/app/gui && cp -r ./build ${workspace}/main/app/gui
cd ${workspace}/main/app
rm -r ../main/app/gui && cp -r ./build ../main/app/gui
cd ./main/app
npm install
./node_modules/.bin/electron-rebuild serialport

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

cd ${workspace}/main
cd ./main
npm install
rm -r build
```
Expand Down
7 changes: 0 additions & 7 deletions build-in-linux.sh

This file was deleted.

5 changes: 0 additions & 5 deletions build-in-win.bash

This file was deleted.

26 changes: 12 additions & 14 deletions run-mac.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
#!/bin/bash

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

echo "======install gui===="
cd ${script_dir}/gui && npm install -y --unsafe-perm=true
cd ${project_dir}/gui && npm install

echo "======install blocks====="
cd ${script_dir}/blocks && npm install -y --unsafe-perm=true
cd ${project_dir}/blocks && npm install
echo "======build blocks====="
cd ${script_dir}/blocks && npm run build
cd ${project_dir}/blocks && npm run build

echo "======install l10n====="
cd ${script_dir}/l10n && npm install -y --unsafe-perm=true
cd ${project_dir}/l10n && npm install
echo "======build l10n====="
cd ${script_dir}/l10n && npm run build
cd ${project_dir}/l10n && npm run build

echo "======install vm====="
cd ${script_dir}/vm && npm install -y --unsafe-perm=true
cd ${project_dir}/vm && npm install
echo "======build vm====="
cd ${script_dir}/vm && npm run build
cd ${project_dir}/vm && npm run build

echo "======build gui====="
cd ${script_dir}/gui && npm run build-mac
cd ${script_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui
cd ${project_dir}/gui && npm run build-mac
cd ${project_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui

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

26 changes: 12 additions & 14 deletions run-win64.sh
Original file line number Diff line number Diff line change
@@ -1,34 +1,32 @@
#!/bin/bash

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

echo "======install gui===="
cd ${script_dir}/gui && npm install -y --unsafe-perm=true
cd ${project_dir}/gui && npm install

echo "======install blocks====="
cd ${script_dir}/blocks && npm install -y --unsafe-perm=true
cd ${project_dir}/blocks && npm install
echo "======build blocks====="
cd ${script_dir}/blocks && npm run build
cd ${project_dir}/blocks && npm run build

echo "======install l10n====="
cd ${script_dir}/l10n && npm install -y --unsafe-perm=true
cd ${project_dir}/l10n && npm install
echo "======build l10n====="
cd ${script_dir}/l10n && npm run build
cd ${project_dir}/l10n && npm run build

echo "======install vm====="
cd ${script_dir}/vm && npm install -y --unsafe-perm=true
cd ${project_dir}/vm && npm install
echo "======build vm====="
cd ${script_dir}/vm && npm run build
cd ${project_dir}/vm && npm run build

echo "======build gui====="
cd ${script_dir}/gui && npm run build-win
cd ${script_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui
cd ${project_dir}/gui && npm run build-win
cd ${project_dir}/gui && rm -rf ../main/app/gui && cp -r ./build ../main/app/gui

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

0 comments on commit 80e31eb

Please sign in to comment.