Win32 installer
This commit is contained in:
parent
9a4605e735
commit
43712eb24c
@ -68,9 +68,9 @@ set(MEDIT_PORTABLE_MAGIC_FILE_NAME "medit-portable")
|
||||
set(MEDIT_PORTABLE_DATA_DIR "medit-portable-data")
|
||||
set(MEDIT_PORTABLE_CACHE_DIR "medit-portable-cache")
|
||||
|
||||
set(MOO_DATA_DIR "${CMAKE_INSTALL_PREFIX}/share/${MOO_PACKAGE_NAME}")
|
||||
set(MOO_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/${MOO_PACKAGE_NAME}")
|
||||
set(MOO_DOC_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/${MOO_PACKAGE_NAME}")
|
||||
set(MOO_DATA_DIR "share/${MOO_PACKAGE_NAME}")
|
||||
set(MOO_LIB_DIR "lib/${MOO_PACKAGE_NAME}")
|
||||
set(MOO_DOC_DIR "share/doc/${MOO_PACKAGE_NAME}")
|
||||
set(MOO_HELP_DIR "${MOO_DOC_DIR}/help")
|
||||
set(MOO_TEXT_LANG_FILES_DIR "${MOO_DATA_DIR}/language-specs")
|
||||
set(MOO_PYTHON_PLUGIN_DIR "${MOO_DATA_DIR}/plugins")
|
||||
@ -124,8 +124,8 @@ if(NOT MOO_BUILD_FROM_MINGW AND NOT MOO_BUILD_FROM_MSVC)
|
||||
else()
|
||||
|
||||
if(MOO_BUILD_FROM_MINGW)
|
||||
set(MOO_GTK_DIR "C:/Projects/gtk/release/target" CACHE PATH "Gtk root dir")
|
||||
set(MOO_GTK_DIST_DIR "C:/Projects/gtk/release/bdist" CACHE PATH "Gtk binary dir")
|
||||
set(MOO_GTK_DIR "C:/Projects/gtk/release/target" CACHE PATH "Gtk root dir")
|
||||
set(MOO_GTK_DIST_DIR "C:/Projects/gtk/release/bdist" CACHE PATH "Gtk binary dir")
|
||||
|
||||
set(GTK_LIBRARIES libgtk-win32-2.0-0 libatk-1.0-0 libgdk-win32-2.0-0 libgdk_pixbuf-2.0-0
|
||||
libpango-1.0-0 libpangocairo-1.0-0 libcairo-2
|
||||
@ -135,6 +135,7 @@ else()
|
||||
else()
|
||||
set(MOO_GTK_DIR "C:/gtk-build/gtk/x64/release" CACHE PATH "Gtk root dir")
|
||||
set(MOO_GTK_DIST_DIR "C:/gtk-build/gtk/x64/bdist" CACHE PATH "Gtk binary dir")
|
||||
set(MOO_PYTHON_DIST_DIR "C:/projects/python-bdist" CACHE PATH "Python binary dir")
|
||||
|
||||
set(GTK_LIBRARIES atk-1.0 cairo gdk_pixbuf-2.0 gdk-win32-2.0 gio-2.0 glib-2.0 gmodule-2.0 gobject-2.0
|
||||
gthread-2.0 gtk-win32-2.0 iconv intl libffi libpng16 pango-1.0 pangocairo-1.0 pixman-1 zlib1)
|
||||
@ -228,5 +229,9 @@ add_subdirectory(moo)
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config-cmake.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
if(WIN32)
|
||||
install(DIRECTORY plat/win32/medit-data/bin plat/win32/medit-data/etc DESTINATION "${CMAKE_INSTALL_PREFIX}")
|
||||
install(DIRECTORY plat/win32/medit-data/bin plat/win32/medit-data/etc DESTINATION .)
|
||||
endif(WIN32)
|
||||
|
||||
if(WIN32)
|
||||
include(plat/win32/installer.cmake)
|
||||
endif()
|
||||
|
@ -158,10 +158,10 @@ install(TARGETS medit RUNTIME DESTINATION bin)
|
||||
if(MOO_BUILD_FROM_MINGW)
|
||||
# xxx this is wrong, doing it temporarily so it doesn't install python lib every time
|
||||
if(NOT EXISTS "${MOO_GTK_DIST_DIR}/bin/libglib-2.0-0.dll")
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/etc DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/share DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/etc DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/lib DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/share DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
endif()
|
||||
|
||||
#install(DIRECTORY ${CMAKE_SOURCE_DIR}/plat/win32/gtk-win/extra/medit-data/bin DESTINATION ${CMAKE_INSTALL_PREFIX})
|
||||
|
@ -6,8 +6,6 @@ add_definitions(-DMOO_ENABLE_PYTHON=1)
|
||||
|
||||
include_directories(${PYTHON_INCLUDE_DIR})
|
||||
|
||||
set(MOO_PYTHON_LIB_DIR ${CMAKE_INSTALL_PREFIX}/share/${MOO_PACKAGE_NAME}/python)
|
||||
|
||||
set(PYGOBJECT_DEFS_DIR ${MOO_GTK_DIR}/share/pygobject/2.0/defs)
|
||||
set(PYGTK_DEFS_DIR ${MOO_GTK_DIR}/share/pygtk/2.0/defs)
|
||||
set(PYGTK_INCLUDE_DIR "${MOO_GTK_DIR}/include/pygtk-2.0")
|
||||
|
38
plat/win32/installer.cmake
Normal file
38
plat/win32/installer.cmake
Normal file
@ -0,0 +1,38 @@
|
||||
set(MOO_INSTALL_BDIST TRUE CACHE BOOL "Install gtk and python binaries")
|
||||
|
||||
if(MOO_INSTALL_BDIST)
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/bin DESTINATION .)
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/lib DESTINATION .)
|
||||
install(DIRECTORY ${MOO_GTK_DIST_DIR}/share DESTINATION .)
|
||||
install(DIRECTORY ${MOO_PYTHON_DIST_DIR}/bin DESTINATION .)
|
||||
endif()
|
||||
|
||||
if(MSVC12)
|
||||
set(MOO_VC_CRT_DIR "C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/redist/x64/Microsoft.VC120.CRT")
|
||||
install(FILES "${MOO_VC_CRT_DIR}/msvcp120.dll" "${MOO_VC_CRT_DIR}/msvcr120.dll" DESTINATION bin)
|
||||
else()
|
||||
message(FATAL_ERROR "Don't know where redist CRT libraries are")
|
||||
endif()
|
||||
|
||||
#INCLUDE(InstallRequiredSystemLibraries)
|
||||
|
||||
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "medit")
|
||||
SET(CPACK_PACKAGE_VENDOR "Yevgen Muntyan")
|
||||
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt")
|
||||
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
|
||||
SET(CPACK_PACKAGE_VERSION_MAJOR ${MOO_MAJOR_VERSION})
|
||||
SET(CPACK_PACKAGE_VERSION_MINOR ${MOO_MINOR_VERSION})
|
||||
SET(CPACK_PACKAGE_VERSION_PATCH ${MOO_MICRO_VERSION})
|
||||
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "medit")
|
||||
# There is a bug in NSI that does not handle full unix paths properly. Make
|
||||
# sure there is at least one set of four (4) backlasshes.
|
||||
#SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp")
|
||||
SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\medit.exe")
|
||||
SET(CPACK_NSIS_DISPLAY_NAME "medit")
|
||||
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\mooedit.sourceforge.net")
|
||||
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\mooedit.sourceforge.net")
|
||||
SET(CPACK_NSIS_CONTACT "emuntyan@users.sourceforge.net")
|
||||
#SET(CPACK_NSIS_MODIFY_PATH ON)
|
||||
SET(CPACK_PACKAGE_EXECUTABLES "medit" "medit")
|
||||
|
||||
INCLUDE(CPack)
|
Loading…
x
Reference in New Issue
Block a user