Skip to content

Commit

Permalink
Update README.md, change install location of octphelper and octopi-sudo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tereius committed Oct 20, 2020
1 parent 33ceb01 commit d1347b1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
28 changes: 27 additions & 1 deletion README.md
Expand Up @@ -33,7 +33,7 @@ If Octopi package is available in your distro's repository, you can just type:
# pacman -S octopi
```

### Steps to build Octopi source code
### Steps to build Octopi source code (qmake)

Assuming you have vala compiler and Qt5 libs properly installed, follow these steps:

Expand Down Expand Up @@ -77,6 +77,32 @@ $ cd OCTOPI_PATH (where you git cloned the source code)
$ makepkg -f
```

### Steps to build Octopi source code (CMake)

As an alternative to qmake, Octopi can also be built with CMake. Make sure that at least CMake 3.5 is installed.

At first build and install alpm_octopi_utils.

```
$ git clone https://github.com/aarnt/alpm_octopi_utils
$ cd alpm_octopi_utils
$ mkdir build_dir && cd build_dir
$ cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
$ make
$ sudo make install
```

After that build and install Octopi.

```
$ git clone https://github.com/aarnt/octopi
$ cd octopi
$ mkdir build_dir && cd build_dir
$ cmake -G "Unix Makefiles" .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
$ make
$ sudo make install
```

### To run Octopi

```
Expand Down
2 changes: 1 addition & 1 deletion helper/CMakeLists.txt
Expand Up @@ -10,4 +10,4 @@ add_executable(octphelper ${src} ${header})
target_compile_definitions(octphelper PRIVATE QT_DEPRECATED_WARNINGS QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY QT_NO_FOREACH)
target_include_directories(octphelper PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Network_INCLUDE_DIRS})
target_link_libraries(octphelper PRIVATE Qt5::Core Qt5::Network)
install(TARGETS octphelper RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
install(TARGETS octphelper RUNTIME DESTINATION lib/octopi LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
2 changes: 1 addition & 1 deletion notifier/CMakeLists.txt
Expand Up @@ -71,4 +71,4 @@ if(KF5Notifications_FOUND)
endif()
install(TARGETS octopi-notifier RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION share/applications)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION etc/xdg/autostart)
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/octopi-notifier.desktop" DESTINATION /etc/xdg/autostart)
2 changes: 1 addition & 1 deletion sudo/CMakeLists.txt
Expand Up @@ -19,4 +19,4 @@ add_executable(octopi-sudo ${src} ${header} ${qmFiles})
target_compile_definitions(octopi-sudo PRIVATE QT_DEPRECATED_WARNINGS QT_USE_QSTRINGBUILDER QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII QT_NO_URL_CAST_FROM_STRING QT_NO_CAST_FROM_BYTEARRAY)
target_include_directories(octopi-sudo PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
target_link_libraries(octopi-sudo PRIVATE Threads::Threads Qt5::Core Qt5::Gui Qt5::Widgets ${UTIL_LIBRARY})
install(TARGETS octopi-sudo RUNTIME DESTINATION bin LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)
install(TARGETS octopi-sudo RUNTIME DESTINATION lib/octopi LIBRARY DESTINATION lib PUBLIC_HEADER DESTINATION include)

0 comments on commit d1347b1

Please sign in to comment.