Skip to content

Commit

Permalink
Add build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
qftgtr committed Jul 10, 2020
1 parent fa09036 commit 895ffaf
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Installation packages are provided in [releases](https://github.com/ObsidianLabs
- **MacOS**: Double-click to open `SubstrateIDE-x.x.x.dmg` and drag *Substrate IDE* into the *Applications* folder.
- **Linux**: Right-click `SubstrateIDE-x.x.x.AppImage`, select *Properties* => *Permissions* => *Execute*, and check the option *Allow executing file as progrom*. Close the property window and double-click the application to open it (different Linux systems may have slightly different installation procedures).

If you want to run Substrate IDE from source or build your own version, please go to [here](build_instruction.md) for instructions.

## Feature Walkthrough

Expand Down
41 changes: 41 additions & 0 deletions build_instruction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Run or build Substrate IDE from source

## Required

- [Node.js v12](https://nodejs.org/en/)
- [Git](https://git-scm.com)
- [Yarn](https://yarnpkg.com)

## Preparations

1. Create a new folder `substrate` and switch to it

2. Run `git clone` to clone 3 repositories under `substrate` folder:

``` bash
$ git clone https://github.com/ObsidianLabs/SubstrateIDE.git
$ git clone https://github.com/ObsidianLabs/substrate-components.git
$ git clone https://github.com/ObsidianLabs/electron-components.git
```

3. Switch to `electron-components` folder and run `yarn && yarn build` to install and compile dependencies of *electron-components*

4. Switch to `substrate-components` folder and run `yarn && yarn build` to install and compile dependencies of *substrate-components*

5. Run `git submodule update --init` to download *polkadot-js* extension

6. Switch to `SubstrateIDE/extensions/polkadot-js` folder and run `yarn && yarn build` to install and compile dependencies of *polkadot-js*

7. Switch to `SubstrateIDE` folder and run `yarn` to install dependencies of *Substrate IDE*

8. The production version of Substrate IDE uses [Font Awesome Pro](https://fontawesome.com/pro). If you want to run or build Substrate IDE with the pro version, please open `package.json` and replace `@fortawesome/fontawesome-free` with `@fortawesome/fontawesome-pro`, and run `yarn` again. You also need to provide your pro license as instructed [here](https://fontawesome.com/how-to-use/on-the-web/setup/using-package-managers#installing-pro).

## Run Substrate IDE in dev mode

When all the dependencies are ready, switch to `SubstrateIDE` folder and run `yarn dev:main` and `yarn dev:react` in two separate terminals. The first command would start the electron application, and the second would start the react project that provides the user interface.

## Build Substrate IDE

When all the dependencies are ready, switch to `SubstrateIDE` folder and run `yarn dist` to build Substrate IDE as a standalone application. Wait until it finishes. The built files can be found under `SubstrateIDE/dist` folder.


0 comments on commit 895ffaf

Please sign in to comment.