Skip to content

Commit

Permalink
Setup on Mac, must use cpack params to set vars
Browse files Browse the repository at this point in the history
  • Loading branch information
Slesa committed Mar 17, 2017
1 parent 4e86d58 commit a6b092e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ src/common/version.h
src/build
src/version.h
src/win/launchy.rc
Makefile.Debug
Makefile.Release
8 changes: 5 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ fi
#if [[ $platform == 'lin' ]]; then
# sh -x setup/linux/create-.sh
if [[ $platform == 'mac' ]]; then
cd ../../setup
cpack -G Bundle -C cpack.mac
cpack -D CPACK_BUNDLE_NAME=Launchy -D CPACK_BUNDLE_PLIST=../mac/Info.plist -D CPACK_BUNDLE_ICON=../Launchy.ico
#cd ../../setup
#cpack -G Bundle -C cpack.mac
#elif [[ $platform == 'bsd' ]]; then
# sh -x setup/bsd/create-setup.sh
elif
cpack
fi
cpack


#$platform='unknown'
Expand Down
7 changes: 6 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(__LIN__ TRUE)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
message (STATUS "In Mac mode")
set(__MAC__ TRUE)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "BSD")
set(__BSD__ TRUE)
Expand Down Expand Up @@ -83,7 +84,7 @@ elseif(__BSD__)
set(PREFIX_MENU ${PREFIX}/share/menu)
set(PREFIX_PIXMAPS ${PREFIX}/share/pixmaps)
else()
message (STATUS "Windows")
message (STATUS "Windows or Mac")
set(PREFIX_BIN .)
set(PREFIX .)
set(PREFIX_PLUGINS ${PREFIX})
Expand Down Expand Up @@ -149,7 +150,10 @@ if(__WIN__)
Delete \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Launchy.lnk\\\"
" )
elseif(__MAC__)
message (STATUS "Bundle name is" ${CPACK_BUNDLE_NAME})
message (STATUS "Package name is" ${CPACK_PACKAGE_NAME})
set(CPACK_GENERATOR "Bundle")
set(CPACK_BUNDLE_NAME, "Launchy")
set(CPACK_PACKAGE_VERSION, "1.0")
set(CPACK_PACKAGE_FILE_NAME, "Launchy-Setup")
set(CPACK_PACKAGE_ICON, "${CMAKE_CURRENT_SOURCE_DIR}/Launchy.ico")
Expand Down Expand Up @@ -189,3 +193,4 @@ include(CPack)
# http://yanivresearch.info/software/CPackWindowsTutorial/CPackForWindows.html
# https://schneide.wordpress.com/2013/02/11/build-a-rpm-package-using-cmake/
# http://blog.beuc.net/posts/Build_a_SFML_project_with_CMake/
# https://github.com/biometrics/openbr/blob/master/share/openbr/example/CMakeLists.txt

0 comments on commit a6b092e

Please # to comment.