Merge pull request #847 from EliteTK/switch-to-scdoc

This commit is contained in:
Sefa Eyeoglu 2022-07-11 14:47:44 +02:00 committed by GitHub
commit c5625d8d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 87 additions and 66 deletions

View File

@ -263,7 +263,10 @@ elseif(UNIX)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_Desktop} DESTINATION ${LAUNCHER_DESKTOP_DEST_DIR})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_MetaInfo} DESTINATION ${LAUNCHER_METAINFO_DEST_DIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_SVG} DESTINATION ${LAUNCHER_ICON_DEST_DIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${Launcher_ManPage} DESTINATION ${LAUNCHER_MAN_DEST_DIR} RENAME "${Launcher_APP_BINARY_NAME}.6")
if(Launcher_ManPage)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${Launcher_ManPage} DESTINATION ${LAUNCHER_MAN_DEST_DIR})
endif()
# Install basic runner script if component "portable" is selected
configure_file(launcher/Launcher.in "${CMAKE_CURRENT_BINARY_DIR}/LauncherScript" @ONLY)

View File

@ -1,3 +1,13 @@
if(UNIX)
find_package(PkgConfig)
if(PkgConfig_FOUND)
pkg_search_module(SCDOC scdoc)
if(SCDOC_FOUND)
pkg_get_variable(SCDOC_SCDOC scdoc scdoc)
endif()
endif()
endif()
set(Launcher_CommonName "PolyMC")
set(Launcher_Copyright "PolyMC Contributors\\n© 2012-2021 MultiMC Contributors")
@ -12,7 +22,6 @@ set(Launcher_DesktopFileName "org.polymc.PolyMC.desktop" PARENT_SCOPE)
set(Launcher_Desktop "program_info/org.polymc.PolyMC.desktop" PARENT_SCOPE)
set(Launcher_MetaInfo "program_info/org.polymc.PolyMC.metainfo.xml" PARENT_SCOPE)
set(Launcher_ManPage "program_info/polymc.6.txt" PARENT_SCOPE)
set(Launcher_SVG "program_info/org.polymc.PolyMC.svg" PARENT_SCOPE)
set(Launcher_Branding_ICNS "program_info/polymc.icns" PARENT_SCOPE)
set(Launcher_Branding_ICO "program_info/polymc.ico")
@ -28,3 +37,15 @@ configure_file(polymc.rc.in polymc.rc @ONLY)
configure_file(polymc.manifest.in polymc.manifest @ONLY)
configure_file(polymc.ico polymc.ico COPYONLY)
configure_file(win_install.nsi.in win_install.nsi @ONLY)
if(SCDOC_FOUND)
set(in_scd "${CMAKE_CURRENT_SOURCE_DIR}/polymc.6.scd")
set(out_man "${CMAKE_CURRENT_BINARY_DIR}/polymc.6")
add_custom_command(
DEPENDS "${in_scd}"
OUTPUT "${out_man}"
COMMAND ${SCDOC_SCDOC} < "${in_scd}" > "${out_man}"
)
add_custom_target(man ALL DEPENDS ${out_man})
set(Launcher_ManPage "program_info/polymc.6" PARENT_SCOPE)
endif()

61
program_info/polymc.6.scd Normal file
View File

@ -0,0 +1,61 @@
polymc(6)
# NAME
polymc - a launcher and instance manager for Minecraft.
# SYNOPSIS
*polymc* [OPTIONS...]
# DESCRIPTION
PolyMC is a custom launcher for Minecraft that allows you to easily manage
multiple installations of Minecraft at once. It also allows you to easily
install and remove mods by simply dragging and dropping.
Here are the current features of PolyMC.
# OPTIONS
*-d, --dir*=DIRECTORY
Use DIRECTORY as the PolyMC root.
*-l, --launch*=INSTANCE_ID
Launch the instance specified by INSTANCE_ID.
*--alive*
Write a small 'live.check' file after PolyMC starts.
*-h, --help*
Display help text and exit.
*-v, --version*
Display program version and exit.
*-a, --profile*=PROFILE
Use the account specified by PROFILE (only valid in combination with --launch).
# EXIT STATUS
*0*
Success
*1*
Failure (syntax or usage error; configuration error; unexpected error).
# BUGS
https://github.com/PolyMC/PolyMC/issues
# RESOURCES
GitHub: https://github.com/PolyMC/PolyMC
Main website: https://polymc.org
# AUTHORS
PolyMC Contributors

View File

@ -1,64 +0,0 @@
POLYMC(1)
==========
:doctype: manpage
NAME
----
polymc - a launcher and instance manager for Minecraft.
SYNOPSIS
--------
*polymc* ['OPTIONS']
DESCRIPTION
-----------
PolyMC is a custom launcher for Minecraft that allows you to easily manage
multiple installations of Minecraft at once. It also allows you to easily
install and remove mods by simply dragging and dropping.
Here are the current features of PolyMC.
OPTIONS
-------
*-d, --dir*='DIRECTORY'::
Use 'DIRECTORY' as the PolyMC root.
*-l, --launch*='INSTANCE_ID'::
Launch the instance specified by 'INSTANCE_ID'.
*--alive*::
Write a small 'live.check' file after PolyMC starts.
*-h, --help*::
Display help text and exit.
*-v, --version*::
Display program version and exit.
*-a, --profile*='PROFILE'::
Use the account specified by 'PROFILE' (only valid in combination with --launch).
EXIT STATUS
-----------
*0*::
Success
*1*::
Failure (syntax or usage error; configuration error; unexpected error).
BUGS
----
<https://github.com/PolyMC/PolyMC/issues>
RESOURCES
---------
GitHub: <https://github.com/PolyMC/PolyMC>
Main website: <https://polymc.org>
AUTHORS
-------
PolyMC Contributors
// vim: syntax=asciidoc