mirror of
https://github.com/k4yt3x/video2x.git
synced 2026-02-16 10:54:33 +08:00
docs(book): added the docs.video2x.org mdBook source files and pipeline
Signed-off-by: k4yt3x <i@k4yt3x.com>
This commit is contained in:
3
docs/book/src/building/README.md
Normal file
3
docs/book/src/building/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Building
|
||||
|
||||
Instructions for building the project.
|
||||
50
docs/book/src/building/linux.md
Normal file
50
docs/book/src/building/linux.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Linux
|
||||
|
||||
Instructions for building this project on Linux.
|
||||
|
||||
## Arch Linux
|
||||
|
||||
Arch users can build the latest version of the project from the AUR package `video2x-git`. The project's repository also contains another PKGBUILD example at `packaging/arch/PKGBUILD`.
|
||||
|
||||
```bash
|
||||
# Build only
|
||||
git clone https://aur.archlinux.org/video2x-git.git
|
||||
cd video2x-git
|
||||
makepkg -s
|
||||
```
|
||||
|
||||
To build manually from the source, follow the instructions below.
|
||||
|
||||
```bash
|
||||
# Install build and runtime dependencies
|
||||
# See the PKGBUILD file for the list of up-to-date dependencies
|
||||
pacman -Sy ffmpeg ncnn vulkan-driver opencv spdlog boost-libs
|
||||
pacman -Sy git cmake make clang pkgconf vulkan-headers openmp boost
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
|
||||
cd video2x
|
||||
|
||||
# Build the project
|
||||
make build
|
||||
```
|
||||
|
||||
The built binaries will be located in the `build` directory.
|
||||
|
||||
## Ubuntu
|
||||
|
||||
Ubuntu users can use the `Makefile` to build the project automatically. The `ubuntu2404` and `ubuntu2204` targets are available for Ubuntu 24.04 and 22.04, respectively. `make` will automatically install the required dependencies, build the project, and package it into a `.deb` package file. It is recommended to perform the build in a container to ensure the environment's consistency and to avoid leaving extra build packages on your system.
|
||||
|
||||
```bash
|
||||
# make needs to be installed manually
|
||||
sudo apt-get update && sudo apt-get install make
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
|
||||
cd video2x
|
||||
|
||||
# Build the project
|
||||
make ubuntu2404
|
||||
```
|
||||
|
||||
The built `.deb` package will be located under the current directory.
|
||||
55
docs/book/src/building/windows-qt6.md
Normal file
55
docs/book/src/building/windows-qt6.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Windows (Qt6)
|
||||
|
||||
Instructions for building the Qt6 GUI of this project on Windows.
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
These dependencies must be installed before building the project. This tutorial assumes that Qt6 has been installed to the default location (`C:\Qt`).
|
||||
|
||||
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
|
||||
- Workload: Desktop development with C++
|
||||
- [winget-cli](https://github.com/microsoft/winget-cli)
|
||||
- [Qt6](https://www.qt.io/download)
|
||||
- Component: Qt6 with MSVC 2022 64-bit
|
||||
- Component: Qt Creator
|
||||
|
||||
## 1. Clone the Repository
|
||||
|
||||
```bash
|
||||
# Install Git if not already installed
|
||||
winget install -e --id=Git.Git
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x-qt6.git
|
||||
cd video2x-qt6
|
||||
```
|
||||
|
||||
## 2. Install Dependencies
|
||||
|
||||
You need to have the `libvideo2x` shared library built before building the Qt6 GUI. Put the built binaries in `third_party/libvideo2x-shared`.
|
||||
|
||||
```bash
|
||||
# Versions of manually installed dependencies
|
||||
$ffmpegVersion = "7.1"
|
||||
|
||||
# Download and extract FFmpeg
|
||||
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
|
||||
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
|
||||
```
|
||||
|
||||
## 3. Build the Project
|
||||
|
||||
1. Open the `CMakeLists.txt` file in Qt Creator as the project file.
|
||||
2. Click on the hammer icon at the bottom left of the window to build the project.
|
||||
3. Built binaries will be located in the `build` directory.
|
||||
|
||||
After the build finishes, you will need to copy the Qt6 DLLs and other dependencies to the build directory to run the application. Before you run the following commands, remove everything in the release directory except for `video2x-qt6.exe` and the `.qm` files as they are not required for running the application. Then, run the following command to copy the Qt6 runtime DLLs:
|
||||
|
||||
```bash
|
||||
C:\Qt\6.8.0\msvc2022_64\bin\windeployqt.exe --release --compiler-runtime .\build\Desktop_Qt_6_8_0_MSVC2022_64bit-Release\video2x-qt6.exe
|
||||
```
|
||||
|
||||
You will also need to copy the `libvideo2x` shared library to the build directory. Copy all files under `third_party/libvideo2x-shared` to the release directory except for `include`, `libvideo2x.lib`, and `video2x.exe`.
|
||||
|
||||
Now you should be able to run the application by double-clicking on `video2x-qt6.exe`.
|
||||
56
docs/book/src/building/windows.md
Normal file
56
docs/book/src/building/windows.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# Windows
|
||||
|
||||
Instructions for building this project on Windows.
|
||||
|
||||
## 1. Prerequisites
|
||||
|
||||
The following tools must be installed manually:
|
||||
|
||||
- [Visual Studio 2022](https://visualstudio.microsoft.com/vs/)
|
||||
- Workload: Desktop development with C++
|
||||
- [winget-cli](https://github.com/microsoft/winget-cli)
|
||||
|
||||
## 2. Clone the Repository
|
||||
|
||||
```bash
|
||||
# Install Git if not already installed
|
||||
winget install -e --id=Git.Git
|
||||
|
||||
# Clone the repository
|
||||
git clone --recurse-submodules https://github.com/k4yt3x/video2x.git
|
||||
cd video2x
|
||||
```
|
||||
|
||||
## 3. Install Dependencies
|
||||
|
||||
```bash
|
||||
# Install CMake
|
||||
winget install -e --id=Kitware.CMake
|
||||
|
||||
# Install Vulkan SDK
|
||||
winget install -e --id=KhronosGroup.VulkanSDK
|
||||
|
||||
# Versions of manually installed dependencies
|
||||
$ffmpegVersion = "7.1"
|
||||
$ncnnVersion = "20240820"
|
||||
|
||||
# Download and extract FFmpeg
|
||||
curl -Lo ffmpeg-shared.zip "https://github.com/GyanD/codexffmpeg/releases/download/$ffmpegVersion/ffmpeg-$ffmpegVersion-full_build-shared.zip"
|
||||
Expand-Archive -Path ffmpeg-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ffmpeg-$ffmpegVersion-full_build-shared" -NewName ffmpeg-shared
|
||||
|
||||
# Download and extract ncnn
|
||||
curl -Lo ncnn-shared.zip "https://github.com/Tencent/ncnn/releases/download/$ncnnVersion/ncnn-$ncnnVersion-windows-vs2022-shared.zip"
|
||||
Expand-Archive -Path ncnn-shared.zip -DestinationPath third_party
|
||||
Rename-Item -Path "third_party/ncnn-$ncnnVersion-windows-vs2022-shared" -NewName ncnn-shared
|
||||
```
|
||||
|
||||
## 4. Build the Project
|
||||
|
||||
```bash
|
||||
cmake -S . -B build -DUSE_SYSTEM_NCNN=OFF -DUSE_SYSTEM_SPDLOG=OFF -DUSE_SYSTEM_BOOST=OFF `
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=build/libvideo2x-shared
|
||||
cmake --build build --config Release --parallel --target install
|
||||
```
|
||||
|
||||
The built binaries will be located in `build/libvideo2x-shared`.
|
||||
Reference in New Issue
Block a user