aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-07-11 14:47:44 +0200
committerGitHub <noreply@github.com>2022-07-11 14:47:44 +0200
commitc5625d8d32f45b6ecb71cf7293176dfe7c6579a3 (patch)
treea7d225d35fc8f1a71ad07d7bf9cc09dd252eb305
parent548a2a1d64412062300a58aa761a4c9e28b57af5 (diff)
parent20666763f064ab476e6d355af06d7a45dadd68fe (diff)
downloadPrismLauncher-c5625d8d32f45b6ecb71cf7293176dfe7c6579a3.tar.gz
PrismLauncher-c5625d8d32f45b6ecb71cf7293176dfe7c6579a3.tar.bz2
PrismLauncher-c5625d8d32f45b6ecb71cf7293176dfe7c6579a3.zip
Merge pull request #847 from EliteTK/switch-to-scdoc
-rw-r--r--CMakeLists.txt5
-rw-r--r--program_info/CMakeLists.txt23
-rw-r--r--program_info/polymc.6.scd61
-rw-r--r--program_info/polymc.6.txt64
4 files changed, 87 insertions, 66 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fc9cdd31..6b1d3dcd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)
diff --git a/program_info/CMakeLists.txt b/program_info/CMakeLists.txt
index 8d835322..b1ba89df 100644
--- a/program_info/CMakeLists.txt
+++ b/program_info/CMakeLists.txt
@@ -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()
diff --git a/program_info/polymc.6.scd b/program_info/polymc.6.scd
new file mode 100644
index 00000000..f0628cc9
--- /dev/null
+++ b/program_info/polymc.6.scd
@@ -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
diff --git a/program_info/polymc.6.txt b/program_info/polymc.6.txt
deleted file mode 100644
index 8f126cce..00000000
--- a/program_info/polymc.6.txt
+++ /dev/null
@@ -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