forked from oerkki/voxelands
A few tweaks and tooling to make the mac app bundle building easier
- cmake tweak to find GETTEXT_LIBRARY on Darwin/APPLE - added voxelands client and server man pages - cmake tweak to have OSX_ARCHITECTURE string on app bundle - set minimum required OS X version to 10.6 in Info.plist - script to change GIT_VERSION in Info.plist - script to create icns from voxelands.svg file (in case if it was updated) - execute scripts before building the mac app bundle - changed the description to use just the first paragraph of the about page
This commit is contained in:
parent
537aabfb5a
commit
c936cc6a3a
|
@ -106,7 +106,7 @@ elseif(APPLE)
|
||||||
# TODO
|
# TODO
|
||||||
# see http://cmake.org/Wiki/CMake:CPackPackageGenerators#Bundle_.28OSX_only.29
|
# see http://cmake.org/Wiki/CMake:CPackPackageGenerators#Bundle_.28OSX_only.29
|
||||||
#
|
#
|
||||||
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-osx")
|
set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${VERSION_STRING}-osx-${CMAKE_OSX_ARCHITECTURES}")
|
||||||
set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/misc/mac/voxelands.icns)
|
set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_SOURCE_DIR}/misc/mac/voxelands.icns)
|
||||||
set(CPACK_BUNDLE_NAME ${PROJECT_NAME})
|
set(CPACK_BUNDLE_NAME ${PROJECT_NAME})
|
||||||
set(CPACK_BUNDLE_ICON ${CPACK_PACKAGE_ICON})
|
set(CPACK_BUNDLE_ICON ${CPACK_PACKAGE_ICON})
|
||||||
|
|
|
@ -52,6 +52,9 @@ IF(GETTEXT_INCLUDE_DIR AND GETTEXT_MSGFMT)
|
||||||
IF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
IF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||||
SET(GETTEXT_LIBRARY "intl")
|
SET(GETTEXT_LIBRARY "intl")
|
||||||
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
|
||||||
|
IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
|
SET(GETTEXT_LIBRARY "${CUSTOM_GETTEXT_PATH}/lib/libintl.dylib")
|
||||||
|
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
SET(GETTEXT_FOUND TRUE)
|
SET(GETTEXT_FOUND TRUE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
|
@ -0,0 +1,65 @@
|
||||||
|
.\" Voxelands man page
|
||||||
|
.TH "voxelandsserver" "6" "1408.00" "Ye Myat Kaung 'Maverick' <mavjs@mavjs.org>" "Games"
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
voxelandsserver \- The Fun-Focused Free Software Voxel World Game
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B voxelandsserver
|
||||||
|
[options]
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B Voxelands
|
||||||
|
is a sandbox construction game based on Minetest, which was Inspired by earlier "voxel world" games such as Infiniminer. Gameplay puts players in a fully destructible 3D game world where they can place and dig numerous types of blocks, items and creatures using a variety of tools. Inside the game world players can build structures, artworks and anything else their creativity can think of on multiplayer servers and singleplayer worlds across multiple game modes.
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
\-\--address <value>
|
||||||
|
Address to connect to
|
||||||
|
.TP
|
||||||
|
\-\--config <value>
|
||||||
|
Load configuration from specified file
|
||||||
|
.TP
|
||||||
|
\-\--disable-unittests
|
||||||
|
Disable unittests
|
||||||
|
.TP
|
||||||
|
\-\--enable-unittests
|
||||||
|
Enable unittests
|
||||||
|
.TP
|
||||||
|
\-\--help
|
||||||
|
Show allowed options
|
||||||
|
.TP
|
||||||
|
\-\--info-on-stderr
|
||||||
|
Print more information on standard error
|
||||||
|
.TP
|
||||||
|
\-\--map-dir <value>
|
||||||
|
Load map from specified directory
|
||||||
|
.TP
|
||||||
|
\-\--port <value>
|
||||||
|
Set network port (UDP) to use
|
||||||
|
.TP
|
||||||
|
\-\--random-input
|
||||||
|
Enable random user input, for testing
|
||||||
|
.TP
|
||||||
|
\-\--server
|
||||||
|
Run server directly
|
||||||
|
.TP
|
||||||
|
\-\--speedtests
|
||||||
|
Run speed tests
|
||||||
|
|
||||||
|
.SH BUGS
|
||||||
|
Please report all bugs at <http://forum.voxelands.com/>
|
||||||
|
|
||||||
|
.SH AUTHORS
|
||||||
|
.PP
|
||||||
|
Lisa 'darkrose' Milne <lisa@ltmnet.com>
|
||||||
|
and contributors: sdzen, MichaelEh?, Pentium44, Jordach, Menche, MavJS, tiemay.
|
||||||
|
.PP
|
||||||
|
This man page was written by
|
||||||
|
Ye Myat Kaung 'Maverick' <mavjs@mavjs.org> for the Voxelands community.
|
||||||
|
|
||||||
|
.SH WWW
|
||||||
|
http://voxelands.com
|
||||||
|
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR voxelands(6)
|
|
@ -0,0 +1,65 @@
|
||||||
|
.\" Voxelands man page
|
||||||
|
.TH "voxelands" "6" "1408.00" "Ye Myat Kaung 'Maverick' <mavjs@mavjs.org>" "Games"
|
||||||
|
|
||||||
|
.SH NAME
|
||||||
|
voxelands \- The Fun-Focused Free Software Voxel World Game
|
||||||
|
|
||||||
|
.SH SYNOPSIS
|
||||||
|
.B voxelands
|
||||||
|
[options]
|
||||||
|
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.B Voxelands
|
||||||
|
is a sandbox construction game based on Minetest, which was Inspired by earlier "voxel world" games such as Infiniminer. Gameplay puts players in a fully destructible 3D game world where they can place and dig numerous types of blocks, items and creatures using a variety of tools. Inside the game world players can build structures, artworks and anything else their creativity can think of on multiplayer servers and singleplayer worlds across multiple game modes.
|
||||||
|
|
||||||
|
.SH OPTIONS
|
||||||
|
.TP
|
||||||
|
\-\--address <value>
|
||||||
|
Address to connect to
|
||||||
|
.TP
|
||||||
|
\-\--config <value>
|
||||||
|
Load configuration from specified file
|
||||||
|
.TP
|
||||||
|
\-\--disable-unittests
|
||||||
|
Disable unittests
|
||||||
|
.TP
|
||||||
|
\-\--enable-unittests
|
||||||
|
Enable unittests
|
||||||
|
.TP
|
||||||
|
\-\--help
|
||||||
|
Show allowed options
|
||||||
|
.TP
|
||||||
|
\-\--info-on-stderr
|
||||||
|
Print more information on standard error
|
||||||
|
.TP
|
||||||
|
\-\--map-dir <value>
|
||||||
|
Load map from specified directory
|
||||||
|
.TP
|
||||||
|
\-\--port <value>
|
||||||
|
Set network port (UDP) to use
|
||||||
|
.TP
|
||||||
|
\-\--random-input
|
||||||
|
Enable random user input, for testing
|
||||||
|
.TP
|
||||||
|
\-\--server
|
||||||
|
Run server directly
|
||||||
|
.TP
|
||||||
|
\-\--speedtests
|
||||||
|
Run speed tests
|
||||||
|
|
||||||
|
.SH BUGS
|
||||||
|
Please report all bugs at <http://forum.voxelands.com/>
|
||||||
|
|
||||||
|
.SH AUTHORS
|
||||||
|
.PP
|
||||||
|
Lisa 'darkrose' Milne <lisa@ltmnet.com>
|
||||||
|
and contributors: sdzen, MichaelEh?, Pentium44, Jordach, Menche, MavJS, tiemay.
|
||||||
|
.PP
|
||||||
|
This man page was written by
|
||||||
|
Ye Myat Kaung 'Maverick' <mavjs@mavjs.org> for the Voxelands community.
|
||||||
|
|
||||||
|
.SH WWW
|
||||||
|
http://voxelands.com
|
||||||
|
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.BR voxelandsserver(6)
|
|
@ -16,8 +16,6 @@
|
||||||
<string>voxelands</string>
|
<string>voxelands</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
|
||||||
<string>GIT_VERSION</string>
|
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>x86_64</string>
|
<string>x86_64</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
@ -25,7 +23,7 @@
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.games</string>
|
<string>public.app-category.games</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>10.6.0</string>
|
||||||
<key>NSMainNibFile</key>
|
<key>NSMainNibFile</key>
|
||||||
<string>MainMenu</string>
|
<string>MainMenu</string>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -x
|
||||||
|
tmp="`pwd`"
|
||||||
|
proj_dir=`dirname "$tmp"`
|
||||||
|
mac_dir="$proj_dir/misc/mac"
|
||||||
|
iconset_dir="$mac_dir/voxelands.iconset"
|
||||||
|
orig_img="$mac_dir/voxelands-1024x1024.png"
|
||||||
|
sizes=(16 32 64 128 256 512)
|
||||||
|
sips=$(which sips)
|
||||||
|
iconutil=$(which iconutil)
|
||||||
|
inkscape="/Applications/Inkscape.app/Contents/Resources/bin/inkscape"
|
||||||
|
if [ ! -f "$mac_dir"/voxelands-1024x1024.png ]; then
|
||||||
|
"$inkscape" --export-png "$orig_img" -w 1024 -h 1024 "$proj_dir"/voxelands.svg
|
||||||
|
fi
|
||||||
|
mkdir "$iconset_dir"
|
||||||
|
"$sips" -z "${sizes[0]}" "${sizes[0]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[0]}"x"${sizes[0]}".png
|
||||||
|
"$sips" -z "${sizes[1]}" "${sizes[1]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[0]}"x"${sizes[0]}"@2x.png
|
||||||
|
"$sips" -z "${sizes[1]}" "${sizes[1]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[1]}"x"${sizes[1]}".png
|
||||||
|
"$sips" -z "${sizes[2]}" "${sizes[2]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[1]}"x"${sizes[1]}"@2x.png
|
||||||
|
"$sips" -z "${sizes[3]}" "${sizes[3]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[3]}"x"${sizes[3]}".png
|
||||||
|
"$sips" -z "${sizes[4]}" "${sizes[4]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[3]}"x"${sizes[3]}"@2x.png
|
||||||
|
"$sips" -z "${sizes[4]}" "${sizes[4]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[4]}"x"${sizes[4]}".png
|
||||||
|
"$sips" -z "${sizes[5]}" "${sizes[5]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[4]}"x"${sizes[4]}"@2x.png
|
||||||
|
"$sips" -z "${sizes[5]}" "${sizes[5]}" "$orig_img" --out "$iconset_dir"/icon_"${sizes[5]}"x"${sizes[5]}".png
|
||||||
|
cp "$orig_img" "$iconset_dir"/icon_"${sizes[5]}"x"${sizes[5]}"@2x.png
|
||||||
|
"$iconutil" -c icns "$iconset_dir"
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
tmp="`pwd`"
|
||||||
|
proj_dir=`dirname "$tmp"`
|
||||||
|
mac_dir="$proj_dir/misc/mac"
|
||||||
|
plist="$mac_dir/Info.plist"
|
||||||
|
sed=$(which sed)
|
||||||
|
$sed -i -e "s/GIT_VERSION/$1/" "$plist"
|
|
@ -426,6 +426,14 @@ if(BUILD_CLIENT)
|
||||||
${CMAKE_SOURCE_DIR}/misc/mac/${xib}.xib
|
${CMAKE_SOURCE_DIR}/misc/mac/${xib}.xib
|
||||||
COMMENT "Compiling ${CMAKE_SOURCE_DIR}/${xib}.xib")
|
COMMENT "Compiling ${CMAKE_SOURCE_DIR}/${xib}.xib")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
# Make icns from svg, just in case it was updated
|
||||||
|
add_custom_command (TARGET ${PROJECT_NAME} PRE_BUILD
|
||||||
|
COMMAND ${CMAKE_SOURCE_DIR}/misc/mac/makeicns.sh
|
||||||
|
COMMENT "making ${PROJECT_NAME}.icns file from ${PROJECT_NAME}.svg")
|
||||||
|
# Change to proper version and mac osx deployment version
|
||||||
|
add_custom_command (TARGET ${PROJECT_NAME} PRE_BUILD
|
||||||
|
COMMAND ${CMAKE_SOURCE_DIR}/misc/mac/makeplist.sh ${VERSION_STRING}
|
||||||
|
COMMENT "Change Info.plist according to provided CMAKE variables")
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
endif(BUILD_CLIENT)
|
endif(BUILD_CLIENT)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue