Skip to content

Commit

Permalink
Update build section in readme and env script (ElvinC#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
DusKing1 authored Feb 9, 2022
1 parent 2e4539a commit d8c46bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,14 @@ The project also supports UI live reload, it's a super quick way of working with
2. Clone the repo: `git clone https://github.com/gyroflow/gyroflow.git`
3. Install dependencies to the `ext` directory: `cd gyroflow/ext`
- `Qt 6.2.3` or higher: `pip3 install -U pip & pip3 install aqtinstall` then `aqt install-qt windows desktop 6.2.3 win64_msvc2019_64` or use the [official installer](https://www.qt.io/download-qt-installer)
- `FFmpeg 4.4`: https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-4.4-windows-desktop-clang-gpl-lite.tar.xz/download
- `FFmpeg 4.4`: download [ffmpeg 4.4 lite](https://sourceforge.net/projects/avbuild/files/windows-desktop/ffmpeg-4.4-windows-desktop-clang-gpl-lite.tar.xz/download) and unzip it to `ext/ffmpeg-4.4-windows-desktop-clang-gpl-lite`
- vcpkg: `git clone --depth 1 https://github.com/Microsoft/vcpkg.git & .\vcpkg\bootstrap-vcpkg.bat`
- OpenCV: `.\vcpkg\vcpkg install "opencv[core]:x64-windows-release"`
- OpenCL: `.\vcpkg\vcpkg install "opencl:x64-windows-release"`
- LLVM: https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/LLVM-13.0.0-win64.exe
- LLVM: download and install [LLVM](https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0/LLVM-13.0.0-win64.exe)
4. Make sure you have `7z` in PATH.
5. Setup the environment in powershell (or set the same variables in cmd): `./__env.ps1` - I do this in VS Code built-in terminal
- some machines might have issue that scripts are forbidden to run, try to `set-executionpolicy remotesigned` in powershell with admin
6. Compile and run: `cargo run --release`

### Building on MacOS
Expand Down
12 changes: 9 additions & 3 deletions __env.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Qt
$Env:Path += ";$PSScriptRoot\ext\6.2.3\msvc2019_64\bin"
$Env:Path = "$PSScriptRoot\ext\6.2.3\msvc2019_64\bin;$Env:Path"

# FFmpeg
$Env:FFMPEG_DIR = "$PSScriptRoot\ext\ffmpeg-4.4-windows-desktop-clang-gpl-lite"
Expand All @@ -10,8 +10,14 @@ $Env:OPENCV_LINK_LIBS = "opencv_core,opencv_calib3d,opencv_features2d,opencv_img
$Env:OPENCV_LINK_LIBS += ",opencv_dnn,opencv_ml,opencv_highgui" # needed for debug build
$Env:OPENCV_LINK_PATHS = "$PSScriptRoot\ext\vcpkg\installed\x64-windows-release\lib"
$Env:OPENCV_INCLUDE_PATHS = "$PSScriptRoot\ext\vcpkg\installed\x64-windows-release\include"
$Env:Path += ";$PSScriptRoot\ext\vcpkg\installed\x64-windows-release\bin"
$Env:Path = ";$PSScriptRoot\ext\vcpkg\installed\x64-windows-release\bin;$Env:Path"

# Clang
$Env:LIBCLANG_PATH = "$PSScriptRoot\ext\llvm-13-win64\bin"
$Env:Path += ";$PSScriptRoot\ext\llvm-13-win64\bin"
$Env:Path = "$PSScriptRoot\ext\llvm-13-win64\bin;$Env:Path"
# $Env:LIBCLANG_PATH = "D:\Program Files\LLVM\bin"
# $Env:Path = "D:\Program Files\LLVM\bin;$Env:Path" # or other path if you have LLVM installed in other place

# 7z
# $Env:7Z_PATH = "C:\Program Files\7-Zip" # or other path if you have 7zip installed in other place
# $Env:Path = "C:\Program Files\7-Zip;$Env:Path"

0 comments on commit d8c46bb

Please sign in to comment.