Skip to content

Commit

Permalink
add make uninstall, and installation of manpage and README docs
Browse files Browse the repository at this point in the history
  • Loading branch information
fduncanh committed Oct 9, 2021
1 parent a4bff5a commit ffa65ed
Show file tree
Hide file tree
Showing 7 changed files with 898 additions and 17 deletions.
20 changes: 18 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
cmake_minimum_required( VERSION 3.4.1 )
cmake_minimum_required( VERSION 3.4.3 )

project( uxplay )

message( STATUS "Project name: " ${PROJECT_NAME} )

include(GNUInstallDirs)

set ( CMAKE_CXX_STANDARD 11 )

if ( ZOOMFIX )
Expand Down Expand Up @@ -42,4 +46,16 @@ target_link_libraries( uxplay
)

install( TARGETS uxplay RUNTIME DESTINATION bin )

install( FILES uxplay.1 DESTINATION man/man1 )
install( FILES README.md README.txt README.html LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR} )

# uninstall target
if(NOT TARGET uninstall)
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)

add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
endif()
137 changes: 137 additions & 0 deletions README.html

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,16 @@ downloaded source code ("UxPlay-master" for zipfile downloads, "UxPlay" for "git
make X11 mirror display windows visible to screen-sharing applications such as
Zoom, see below).
5. `make`
6. `sudo make install`
6. `sudo make install` (you can afterwards uninstall with `sudo make uninstall` in the same directory in which this was run)

_Note that older cmake does not require the final "`.`" to specify the current directory as the source directory,
but newer cmake requires it. If you intend to modify the code, use a separate "build" directory: replace "cmake [ ] ." by "mkdir build ; cd build ; cmake [ ] .."; you can then get back to the clean source (with any changes you made) with "cd .. ; rm -rf build"._

The above script installs the executable file "`uxplay`" to `/usr/local/bin`.
The above script installs the executable file "`uxplay`" to `/usr/local/bin`, (and installs a manpage and README files)
It can also be found in the build directory after the build
processs. Run uxplay in a terminal window.


**Note libplist-dev (which must be for libplist version 2.0 or greater) and (for ZOOMFIX) libx11-dev are new dependencies. Older distributions
may only supply libplist 1.x, which is too old. [Installing libplist-dev (with libplist3) from ubuntu 18.04 solves this problem on ubuntu 16.04.]**

Expand Down
699 changes: 699 additions & 0 deletions README.txt

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions cmake_uninstall.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif()

file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()
5 changes: 3 additions & 2 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ elseif( APPLE )
/opt/local/include # MacPorts
)
endif()
message( "-- LIBPLIST " ${LIBPLIST} )
message( STATUS "LIBPLIST " ${LIBPLIST} )

target_link_libraries( airplay
pthread
Expand All @@ -42,14 +42,15 @@ target_link_libraries( airplay

if( UNIX AND NOT APPLE )
find_package(OpenSSL 1.1.1 REQUIRED)
message( "OpenSSL " ${OpenSSL} )
target_compile_definitions( airplay PUBLIC OPENSSL_API_COMPAT=0x10101000L )
target_link_libraries( airplay OpenSSL::Crypto )
find_file( DNS_SD_H dns_sd.h PATHS /usr/include/* /usr/local/include/* )
if( NOT DNS_SD_H )
message( FATAL_ERROR "(avahi_compat) did not find dns_sd.h" )
endif()
string( REPLACE "dns_sd.h" "" DNS_SD ${DNS_SD_H} )
message( "-- found dns_sd.h in " ${DNS_SD} )
message( STATUS "found dns_sd.h in " ${DNS_SD} )
target_include_directories( airplay PRIVATE ${DNS_SD} )
target_link_libraries( airplay dns_sd )
elseif( APPLE )
Expand Down
28 changes: 17 additions & 11 deletions uxplay.1
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ uxplay \- uxplay
.B uxplay
[\fI\,-n name\/\fR] [\fI\,-s wxh\/\fR] [\fI\,-p \/\fR[\fI\,n\/\fR]]
.SH DESCRIPTION
UxPlay 1.37: An open\-source AirPlay mirroring server based on RPiPlay
UxPlay 1.38: An open\-source AirPlay mirroring server based on RPiPlay
.SH OPTIONS
.TP
.B \fB\-n\fR name
Specify the network name of the AirPlay server
.B
\fB\-n\fR name Specify the network name of the AirPlay server
.TP
.B
\fB\-s\fR wxh[@r]Set display resolution [refresh_rate] default 1920x1080[@60]
Expand All @@ -26,23 +26,29 @@ Specify the network name of the AirPlay server
.TP
\fB\-p\fR n Use TCP and UDP ports n,n+1,n+2. range 1024\-65535
.IP
use "\-p n1,n2,n3" to set each port, "n1,n2" for n3 = n2+1
"\-p tcp n" or "\-p udp n" sets TCP or UDP ports only
use "\-p n1,n2,n3" to set each port, "n1,n2" for n3 = n2+1
.IP
"\-p tcp n" or "\-p udp n" sets TCP or UDP ports only
.PP
.TP
\fB\-m\fR Use random MAC address (use for concurrent UxPlay's)
.TP
\fB\-a\fR Turn audio off. video output only
.TP
\fB\-t\fR n Relaunch server if no connection existed in last n seconds
.TP
\fB\-vs\fR Choose the GStreamer videosink; default "autovideosink"
\fB\-vs\fI sink\fR Choose the GStreamer videosink; default "autovideosink"
.IP
choices: ximagesink,xvimagesink,vaapisink,fpsdisplaysink, etc.
.PP
.TP
\fB\-vs\fR 0 Streamed audio only, with no video display window..
.TP
\fB\-as\fI sink\fR Choose the GStreamer audiosink; default "autoaudiosink"
.IP
choices: ximagesink,xvimagesink,vaapisink,fpsdisplaysink, etc.
choices: pulsesink,alsasink,osssink,oss4sink,osxaudiosink etc.
.PP
.TP
\fB\-vs\fR 0 Streamed audio only, with no video display window
\fB\-as\fR 0 (or \fB\-a\fR) Turn audio off, video output only.
.TP
\fB\-d\fR Enable debug logging
.TP
\fB\-v\fR/\-h Displays this help and version information
\fB\-v\fR or \fB\-h\fR Displays this help and version information

0 comments on commit ffa65ed

Please sign in to comment.