Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
cce85f3b
Commit
cce85f3b
authored
6 years ago
by
Nicolas Riebesel
Committed by
mujx
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add Visual Studio 2017 support (#336)
parent
b3825797
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitignore
+5
-0
5 additions, 0 deletions
.gitignore
CMakeLists.txt
+8
-10
8 additions, 10 deletions
CMakeLists.txt
CMakeSettings.json
+38
-0
38 additions, 0 deletions
CMakeSettings.json
README.md
+48
-0
48 additions, 0 deletions
README.md
with
99 additions
and
10 deletions
.gitignore
+
5
−
0
View file @
cce85f3b
...
...
@@ -68,6 +68,11 @@ Icon
.Trashes
.VolumeIcon.icns
# Visual Studio
.vs
build-vc
vcpkg
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
...
...
This diff is collapsed.
Click to expand it.
CMakeLists.txt
+
8
−
10
View file @
cce85f3b
...
...
@@ -37,12 +37,7 @@ include(LMDB)
#
# Discover Qt dependencies.
#
find_package
(
Qt5Widgets REQUIRED
)
find_package
(
Qt5Network REQUIRED
)
find_package
(
Qt5LinguistTools REQUIRED
)
find_package
(
Qt5Concurrent REQUIRED
)
find_package
(
Qt5Svg REQUIRED
)
find_package
(
Qt5Multimedia REQUIRED
)
find_package
(
Qt5 COMPONENTS Core Widgets Network LinguistTools Concurrent Svg Multimedia REQUIRED
)
if
(
APPLE
)
find_package
(
Qt5MacExtras REQUIRED
)
...
...
@@ -58,20 +53,23 @@ endif(Qt5Widgets_FOUND)
#
# Set up compiler flags.
#
set
(
CMAKE_C_COMPILER gcc
)
if
(
NOT MSVC
)
set
(
CMAKE_C_COMPILER gcc
)
endif
(
NOT MSVC
)
set
(
CMAKE_CXX_STANDARD 14
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
include
(
CompilerFlags
)
if
(
NOT CMAKE_BUILD_TYPE
)
if
(
NOT
(
CMAKE_BUILD_TYPE
OR CMAKE_CONFIGURATION_TYPES
)
)
set
(
CMAKE_BUILD_TYPE
"Debug"
CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
FORCE
)
message
(
"Setting build type to '
${
CMAKE_BUILD_TYPE
}
'"
)
else
(
NOT CMAKE_BUILD_TYPE
)
else
(
NOT
(
CMAKE_BUILD_TYPE
OR CMAKE_CONFIGURATION_TYPES
)
)
message
(
"Build type set to '
${
CMAKE_BUILD_TYPE
}
'"
)
endif
(
NOT CMAKE_BUILD_TYPE
)
endif
(
NOT
(
CMAKE_BUILD_TYPE
OR CMAKE_CONFIGURATION_TYPES
)
)
find_program
(
GIT git
)
if
(
GIT
)
...
...
This diff is collapsed.
Click to expand it.
CMakeSettings.json
0 → 100644
+
38
−
0
View file @
cce85f3b
{
"configurations"
:
[
{
"name"
:
"Debug"
,
"generator"
:
"Visual Studio 15 2017 Win64"
,
"configurationType"
:
"Debug"
,
"buildRoot"
:
"${workspaceRoot}
\\
build-vc
\\
${name}"
,
"cmakeCommandArgs"
:
""
,
"variables"
:
[
{
"name"
:
"CMAKE_TOOLCHAIN_FILE"
,
"value"
:
"${workspaceRoot}
\\
vcpkg
\\
scripts
\\
buildsystems
\\
vcpkg.cmake"
//
<--
change
vcpkg
location
here
},
{
"name"
:
"Qt5_DIR"
,
"value"
:
"C:
\\
Qt
\\
5.10.1
\\
msvc2017_64
\\
lib
\\
cmake
\\
Qt5"
//
<--
change
qt
location
here
}
]
},
{
"name"
:
"Release"
,
"generator"
:
"Visual Studio 15 2017 Win64"
,
"configurationType"
:
"Release"
,
"buildRoot"
:
"${workspaceRoot}
\\
build-vc
\\
${name}"
,
"cmakeCommandArgs"
:
""
,
"variables"
:
[
{
"name"
:
"CMAKE_TOOLCHAIN_FILE"
,
"value"
:
"${workspaceRoot}
\\
vcpkg
\\
scripts
\\
buildsystems
\\
vcpkg.cmake"
//
<--
change
vcpkg
location
here
},
{
"name"
:
"Qt5_DIR"
,
"value"
:
"C:
\\
Qt
\\
5.10.1
\\
msvc2017_64
\\
lib
\\
cmake
\\
Qt5"
//
<--
change
qt
location
here
}
]
},
]
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
README.md
+
48
−
0
View file @
cce85f3b
...
...
@@ -115,6 +115,25 @@ brew update
brew
install
qt5 lmdb cmake llvm
```
##### Windows
1.
Install Visual Studio 2017's "Desktop Development" and "Linux Development with C++"
(for the CMake integration) workloads.
2.
Download the latest Qt for windows installer and install it somewhere.
Make sure to install the
`MSVC 2017 64-bit`
toolset for at least Qt 5.9
(lower versions does not support VS2017).
3.
Install lmdb and openssl with
`vcpkg`
. You can simply clone it into a subfolder
of the root nheko source directory.
```
powershell
git
clone
http:\\github.com\Microsoft\vcpkg
cd
vcpkg
.
\bootstrap-vcpkg.bat
.
\vcpkg
install
--triplet
x64-windows
lmdb
openssl
```
### Building
Clone the repo and run
...
...
@@ -161,6 +180,35 @@ in the project folder. This will output a binary to `result/bin/nheko`.
You can also install nheko by running
`nix-env -f . -i`
#### Windows
After installing all dependencies, you need to edit the
`CMakeSettings.json`
to
be able to load and compile nheko within Visual Studio.
You need to fill out the paths for the
`CMAKE_TOOLCHAIN_FILE`
and the
`Qt5_DIR`
.
The toolchain file should point to the
`vcpkg.cmake`
and the Qt5 dir to the
`lib\cmake\Qt5`
dir.
Examples for the paths are:
-
`C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake`
-
`C:\\Qt\\5.10.1\\msvc2017_64\\lib\\cmake\\Qt5`
Now right click into the root nheko source directory and choose
`Open in Visual Studio`
.
You can choose the build type Release and Debug in the top toolbar.
After a successful CMake generation you can select the
`nheko.exe`
as the run target.
Now choose
`Build all`
in the CMake menu or press
`F7`
to compile the executable.
To be able to run the application the last step is to install the needed Qt dependencies next to the
nheko binary.
Start the "Qt x.xx.x 64-bit for Desktop (MSVC 2017)" command promt and run
`windeployqt`
.
```
cmd
cd <path-to-nheko>\build-vc\Release\Release
windeployqt nheko.exe
```
The final binary will be located inside
`build-vc\Release\Release`
for the Release build
and
`build-vc\Debug\Debug`
for the Debug build.
### Contributing
See
[
CONTRIBUTING
](
.github/CONTRIBUTING.md
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment