Skip to content

Commit

Permalink
update: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenhobs committed May 2, 2024
1 parent 269ddf3 commit 364c714
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This project is to build **qjs.exe** and **qjsc.exe** on Windows.

## Feature

- CMake build tool and mingw64 toolchain are enough. Do not need Msys2 environment.
- CMake with ninja-build tool and mingw64 toolchain are enough. Do not need Msys2 environment.
- Both support shared and static lib build.
- qjsc.exe with MinGW toolchain. You can also use C module for your qjs exe.

Expand All @@ -14,12 +14,13 @@ This project is to build **qjs.exe** and **qjsc.exe** on Windows.

1. Install tools

- CMake > 3.6.0
- mingw64 gcc > 8.1.0
- mingw64 gcc > 8.1.0 <https://github.com/niXman/mingw-builds-binaries/releases>
- CMake > 3.6.0 <https://github.com/Kitware/CMake/releases>
- Ninja > 1.10.0 <https://github.com/ninja-build/ninja/releases>

> Ensure you have the **make.exe** or **ninja.exe** tool in the PATH enviroment
> Ensure these bin-folders in the **PATH** environment variety.
2. Clone this repo
2. Clone this repo `git clone --depth=1 https://github.com/stevenhobs/quickjs-windows.git`
3. Open the terminal from the repo position
4. build commands

Expand All @@ -28,23 +29,25 @@ This project is to build **qjs.exe** and **qjsc.exe** on Windows.
# check cmake tool
where.exe cmake
# check ninja
where.exe ninja
# check gcc
where.exe gcc
# pull required repositories
git submodule update --depth 1
git submodule update --init --depth=1
# modify configuration about qjs
notepad CMakeLists.txt
# generate cmake build cache
cmake -B build -DCC=gcc -G Ninja
# If you use Make tool, use this:
# cmake -B build -DCC=gcc -G "Unix Makefiles"
cmake --build build -DCMAKE_BUILD_TYPE=Release
# install
cmake install build
# build targets
cmake --build build -v
# install targets
cmake --install build
```

5. copy the target lib and exe files
Expand Down

0 comments on commit 364c714

Please sign in to comment.