From ff1f329bd0584088b20069ec0b29d82143dcda37 Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Thu, 16 Jul 2020 14:24:48 +0200 Subject: [PATCH] Added a Unix man page and a script to generate it. The --help output text was changed slightly as well. --- INSTALL.md | 1 + es-app/CMakeLists.txt | 2 ++ es-app/src/emulationstation.6.gz | Bin 0 -> 1041 bytes es-app/src/main.cpp | 42 +++++++++++----------- tools/generate_man_page.sh | 59 +++++++++++++++++++++++++++++++ 5 files changed, 83 insertions(+), 21 deletions(-) create mode 100644 es-app/src/emulationstation.6.gz create mode 100755 tools/generate_man_page.sh diff --git a/INSTALL.md b/INSTALL.md index 7edc5a4b5..7e397029f 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -131,6 +131,7 @@ Assuming the default installation prefix `/usr/local` has been used, this is the ``` /usr/local/bin/emulationstation +/usr/local/man/man6/emulationstation.6.gz /usr/local/share/applications/emulationstation.desktop /usr/local/share/emulationstation/LICENSE /usr/local/share/emulationstation/LICENSES/* diff --git a/es-app/CMakeLists.txt b/es-app/CMakeLists.txt index 67c51a23f..3063a728c 100644 --- a/es-app/CMakeLists.txt +++ b/es-app/CMakeLists.txt @@ -124,6 +124,8 @@ if(WIN32) else() install(TARGETS emulationstation RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/emulationstation.6.gz + DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man6) install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_PREFIX}/share/emulationstation) install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/src/emulationstation.desktop diff --git a/es-app/src/emulationstation.6.gz b/es-app/src/emulationstation.6.gz new file mode 100644 index 0000000000000000000000000000000000000000..d68d250314c548c6a5cf0a4ba5b1e50f2a77fe9d GIT binary patch literal 1041 zcmV+s1n&DEiwFn`MG#*A17&S>Y+-b1Z*FsRVRUJ4ZZ0+eg;m>b<2Dd|*H=vavR=TF zowR6yMNz<6JB?c3U^y)oQ64CXve;0hN>X;*ukQ@yB(^u(J{T5;M&)&2`NbTtz?p6kUBE1<~dXrt|yR zcoQ!d$;SUd@5dhWerx3cu1D7+{N{BlnG;%B=l@`L6^)`%$YfJ7y#JNe-1dSfxr4=c zJ`KLo4`KQuN{*rlw@*$tFf9a~y>aqov0No_5=1v}i4i=cWt5EoU;|ynVNK9ugMwTeZn15vRp66f`n<7Vn^lmOH))uLsGwy_kXRyk*o(qdkMK}& zv8~)=urUV;0z=L@)}mp?i5#68cr!eOqlBceE)BJk2ZRigC(!_FovyLQd6)5eIS0!b zhByGyLoil!wR!=Fo@;puEVc@hIdOo{v6uOrU&K%fiDmC&$;wvx{$Md$?3%5#cG#GY zr>KQt`!p;KS`+OFbRsM^>EKacFHUWgPD3Puk6@zJ2L}kf_xdD;j&sy664hL_m)7LK zR`1w%7hrS4`B_;Dp0!&tSQ+F7_#=8CCb7#F?1d`yo)@J4=kXhAUGM=pYGpx`%5|Ly zg%_Sj?{VQ25=$w&peOO_Q8_v&FksX9{Nn~*})<)ka^8n zyLR@Va?jJNAzov1M?+nfNYmEfnxR|hWR!L0a)KL&I5 z41cW0bK*PFhZ;D~uvR5;%P*oF>ZG{Z^zqj zv6>#EH%mV}Nn6)wz;Kl)C-67G6}+W5+Kl;qH@@H8E!V*q*DLhKQrk-OV5ZBzTUr%; zZNye6r0~)A#~|>#b0s)@)^*(~;SSJ$m0@5{s59f}HF1XuOV+=9GCCb{-b +" + +echo "${MAN_INCLUDE}" > $TEMPFILE_INPUT + +help2man --section 6 --no-info --include $TEMPFILE_INPUT $ESBINARY > $TEMPFILE_OUTPUT + +# Manual string replacements, these may need to be modified if changes are made to the +# command line --help output. +cat $TEMPFILE_OUTPUT | sed s/"EmulationStation Desktop Edition, Emulator Front\\\-end"/""/g | \ +sed s/"Set to at least"/".br\nSet to at least"/ > $TARGET_FILENAME + +gzip $TARGET_FILENAME + +rm $TEMPFILE_INPUT +rm $TEMPFILE_OUTPUT