Skip to content

Commit

Permalink
Merge pull request #11 from ctuning/cmake-installer
Browse files Browse the repository at this point in the history
Automatic installer generation
  • Loading branch information
gfursin authored Oct 7, 2016
2 parents e48ad29 + 8ad1b4f commit 7f97651
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
20 changes: 17 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 2.8)

project(ck-crowdnode)

set(SRC
src/net_uuid.h
src/net_uuid.c
Expand All @@ -19,12 +21,24 @@ IF(WIN32)

target_link_libraries(ck-crowdnode-server ws2_32)

set(CPACK_GENERATOR WIX)
install( TARGETS ck-crowdnode-server RUNTIME DESTINATION bin COMPONENT Applications)

include(InstallRequiredSystemLibraries)

set(CPACK_GENERATOR NSIS)
set(CPACK_PACKAGE_NAME "ck-crowdnode-server")
set(CPACK_PACKAGE_VENDOR "cTuning.org")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CK crowd-node server")
set(CPACK_PACKAGE_VERSION "0.0.1")

INCLUDE(CPack)
set(CPACK_PACKAGE_VERSION_MAJOR "0")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "1")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "CK crowd-node server")
set(CPACK_NSIS_MODIFY_PATH ON)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}\\\\LICENSE.txt")
set(CPACK_PACKAGE_EXECUTABLES ck-crowdnode-server "CK crowd-node server")

include(CPack)

ELSE(WIN32)
target_link_libraries(ck-crowdnode-server m)
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,24 @@ Relatively stable - testing phase

Usage: server side
==================
Install and start latest version of ck-crowdnode-server
using "release\setup.exe". Write down "[INFO for CK client]" -
you will require this info to configure this target machine
on a client.
On Windows:

1. Download the installer from [Appveyor](https://ci.appveyor.com/project/gfursin/ck-crowdnode/build/artifacts)

2. Install and start "CK crowd-node server".

3. Write down "[INFO for CK client]" - you will require this info to configure this target machine on a client.

Alternatively, you can build it manually (you'll need CMake and Visual Studio):

```
mkdir build
cd build
cmake ..
cmake --build . --config Release --target PACKAGE
```

Now, you should be able to run `build/Release/ck-crowdnode-server.exe`.

Usage: client side
==================
Expand Down
9 changes: 2 additions & 7 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,10 @@ build_script:
- mkdir build
- cd build
- cmake ..
# - msbuild /p:Configuration=Release /p:Platform=Win32 C:/projects/ck-crowdnode/build/Project.sln
- cmake --build . --config Release --target PACKAGE
- cp Release/ck-crowdnode-server.exe .
- cd ..
- "%PYTHON%/python.exe -m run_tests.py"
- "%PYTHON%/python.exe -m run_tests.py --server_executable build/Release/ck-crowdnode-server.exe"

artifacts:
- path: build/Release/ck-crowdnode-server.exe
name: CK Crowdnode Server Executable

- path: build/*.msi
- path: build/*.exe
name: CK Crowdnode Server installer
Binary file removed release/ck-crowdnode.msi
Binary file not shown.
Binary file removed release/setup.exe
Binary file not shown.

0 comments on commit 7f97651

Please sign in to comment.