mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
add build steps on macOS in README.md
This commit is contained in:
parent
77f4c2d91c
commit
3b6c415b83
64
README.md
64
README.md
@ -197,6 +197,8 @@ Download [Qt 5.7.0](http://info.qt.io/download-qt-for-application-development) a
|
||||
### Linux Command Line (Linux命令行)
|
||||
If you prefer command line on Linux, you could follow these steps.
|
||||
|
||||
在Linux命令行下,你可以执行以下命令来编译和安装:
|
||||
|
||||
```
|
||||
cd vnote.git
|
||||
mkdir build
|
||||
@ -207,6 +209,68 @@ make
|
||||
sudo make install
|
||||
```
|
||||
|
||||
## MacOS
|
||||
If you prefer command line on macOS, you could follow these steps.
|
||||
|
||||
1. Install Xcode and Homebrew;
|
||||
2. Install Qt5.7 via Homebrew:
|
||||
|
||||
```
|
||||
brew install qt@5.7
|
||||
```
|
||||
3. In the project directory, create `build_macos.sh` like this:
|
||||
|
||||
```sh
|
||||
QTDIR="/usr/local/opt/qt@5.7"
|
||||
PATH="$QTDIR/bin:$PATH"
|
||||
LDFLAGS=-L$QTDIR/lib
|
||||
CPPFLAGS=-I$QTDIR/include
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
qmake -v
|
||||
qmake -config release ../VNote.pro
|
||||
make -j2
|
||||
```
|
||||
4. Make `build_macos.sh` executable and run it:
|
||||
|
||||
```sh
|
||||
chmod +x build_macos.sh
|
||||
./build_macos.sh
|
||||
```
|
||||
5. Now you got the bundle `path/to/project/build/src/VNote.app`. Enjoy yourself!
|
||||
|
||||
|
||||
在macOS下,你可以执行以下命令来编译:
|
||||
|
||||
1. 安装Xcode和Homebrew:
|
||||
2. 通过Homebrew安装Qt5.7:
|
||||
|
||||
```
|
||||
brew install qt@5.7
|
||||
```
|
||||
3. 在VNote源码根目录下,新建一个文件`build_macos.sh`:
|
||||
|
||||
```sh
|
||||
QTDIR="/usr/local/opt/qt@5.7"
|
||||
PATH="$QTDIR/bin:$PATH"
|
||||
LDFLAGS=-L$QTDIR/lib
|
||||
CPPFLAGS=-I$QTDIR/include
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
qmake -v
|
||||
qmake -config release ../VNote.pro
|
||||
make -j2
|
||||
```
|
||||
4. 修改`build_macos.sh`的执行权限,并执行:
|
||||
|
||||
```sh
|
||||
chmod +x build_macos.sh
|
||||
./build_macos.sh
|
||||
```
|
||||
5. 此时得到VNote的Bundle `path/to/project/build/src/VNote.app`,打开即可。
|
||||
|
||||
# Dependencies (依赖)
|
||||
- [Qt 5.7](http://qt-project.org) (L-GPL v3)
|
||||
- [PEG Markdown Highlight](http://hasseg.org/peg-markdown-highlight/) (MIT License)
|
||||
|
Loading…
x
Reference in New Issue
Block a user