Update Win32Depends.cmake, remove SVG stuff.
Remove bsdtar, SVG libraries, openSUSE package sources. Don't need those anymore.
This commit is contained in:
parent
fa602c20ec
commit
c535bd2383
@ -311,8 +311,7 @@ if (WIN32)
|
||||
${WIN32_DEPENDS_PATH}/bin/
|
||||
DESTINATION .
|
||||
FILES_MATCHING PATTERN "*.dll"
|
||||
PATTERN "libgettext*" EXCLUDE
|
||||
PATTERN "libintl*" EXCLUDE)
|
||||
PATTERN "libgettext*" EXCLUDE)
|
||||
install (DIRECTORY
|
||||
${WIN32_DEPENDS_PATH}/etc/
|
||||
DESTINATION etc)
|
||||
@ -389,13 +388,13 @@ string (REPLACE "http://" "http:\\\\\\\\" project_URL_NSIS "${project_URL}")
|
||||
set (CPACK_NSIS_URL_INFO_ABOUT "${project_URL_NSIS}")
|
||||
|
||||
set (CPACK_DEBIAN_PACKAGE_DEPENDS
|
||||
"libgtk2.0-0 (>= 2.12), libjson-glib-1.0-0 (>= 0.10.4), liblua5.1-0, librsvg2-common")
|
||||
"libgtk2.0-0 (>= 2.12), libjson-glib-1.0-0 (>= 0.10.4), liblua5.1-0")
|
||||
set (CPACK_DEBIAN_PACKAGE_BUILDS_DEPENDS
|
||||
"libgtk2.0-dev (>= 2.12), libjson-glib-dev (>= 0.10.4), liblua5.1-0-dev")
|
||||
set (CPACK_DEBIAN_PACKAGE_SECTION "Electronics")
|
||||
set (CPACK_DEBIAN_PACKAGE_HOMEPAGE "${project_URL}")
|
||||
|
||||
set (CPACK_RPM_PACKAGE_REQUIRES "gtk2 >= 2.12, json-glib >= 0.10.4, lua = 5.1, librsvg2")
|
||||
set (CPACK_RPM_PACKAGE_REQUIRES "gtk2 >= 2.12, json-glib >= 0.10.4, lua = 5.1")
|
||||
set (CPACK_RPM_PACKAGE_GROUP "Graphics")
|
||||
set (CPACK_RPM_PACKAGE_LICENSE "BSD")
|
||||
set (CPACK_RPM_PACKAGE_URL "${project_URL}")
|
||||
|
@ -3,8 +3,8 @@
|
||||
# Directories
|
||||
set (working_dir ${CMAKE_CURRENT_BINARY_DIR}/win32-depends)
|
||||
set (pkg_dir ${working_dir}/packages)
|
||||
set (bsdtar_dir ${working_dir}/bsdtar)
|
||||
set (bsdtar_executable ${bsdtar_dir}/bsdtar)
|
||||
set (tools_dir ${working_dir}/tools)
|
||||
set (sevenzip_executable ${tools_dir}/7za)
|
||||
set (tmp_dir ${working_dir}/tmp)
|
||||
file (MAKE_DIRECTORY ${working_dir})
|
||||
file (MAKE_DIRECTORY ${pkg_dir})
|
||||
@ -18,85 +18,31 @@ if (files)
|
||||
endif (files)
|
||||
|
||||
# Packages
|
||||
set (pkg_list "bsdtar" "gtk" "mingw_lua" "opensuse")
|
||||
set (pkg_list "7za" "gtk" "winlibs" "mingw_lua")
|
||||
|
||||
# Can't use LZMA!
|
||||
set (pkg_bsdtar_root "http://sourceforge.net/projects/mingw/files/MinGW/Extension")
|
||||
set (pkg_bsdtar_urls
|
||||
"${pkg_bsdtar_root}/libarchive/libarchive-2.8.3-1/bsdtar-2.8.3-1-mingw32-bin.tar.bz2"
|
||||
"${pkg_bsdtar_root}/libarchive/libarchive-2.8.3-1/libarchive-2.8.3-1-mingw32-dll-2.tar.bz2"
|
||||
"${pkg_bsdtar_root}/expat/expat-2.0.1-1/libexpat-2.0.1-1-mingw32-dll-1.tar.gz"
|
||||
"${pkg_bsdtar_root}/xz/xz-4.999.9beta_20100401-1/liblzma-4.999.9beta_20100401-1-mingw32-dll-1.tar.bz2"
|
||||
"${pkg_bsdtar_root}/bzip2/bzip2-1.0.5-2/libbz2-1.0.5-2-mingw32-dll-2.tar.gz"
|
||||
"${pkg_bsdtar_root}/zlib/zlib-1.2.3-1-mingw32/libz-1.2.3-1-mingw32-dll-1.tar.gz")
|
||||
set (pkg_bsdtar_md5
|
||||
"160168b10075bf11a6405d43d98b1612"
|
||||
"8409b7e9138423b491a41faff742a362"
|
||||
"deb721ecbcb723d5d3ac4b7dc0860402"
|
||||
"5f98e85610656cfcfa68c45e601bad0e"
|
||||
"86a00cac65439ef3e3cb5c466cf6695f"
|
||||
"4ccd26ac32ad3ffdef5e78cdc770ef12")
|
||||
set (pkg_7za_root "http://sourceforge.net/projects/sevenzip/files")
|
||||
set (pkg_7za_urls "${pkg_7z_root}/7-Zip/9.20/7za920.zip")
|
||||
set (pkg_7za_md5 "2fac454a90ae96021f4ffc607d4c00f8")
|
||||
|
||||
set (pkg_gtk_root "http://ftp.gnome.org/pub/gnome/binaries/win32")
|
||||
set (pkg_gtk_urls
|
||||
"${pkg_gtk_root}/gtk+/2.24/gtk+-bundle_2.24.8-20111122_win32.zip"
|
||||
"${pkg_gtk_root}/librsvg/2.32/librsvg_2.32.1-1_win32.zip"
|
||||
"${pkg_gtk_root}/librsvg/2.32/librsvg-dev_2.32.1-1_win32.zip"
|
||||
"${pkg_gtk_root}/librsvg/2.32/svg-gdk-pixbuf-loader_2.32.1-1_win32.zip"
|
||||
"${pkg_gtk_root}/libcroco/0.6/libcroco_0.6.2-1_win32.zip"
|
||||
"${pkg_gtk_root}/dependencies/libxml2_2.7.7-1_win32.zip"
|
||||
"${pkg_gtk_root}/dependencies/libxml2-dev_2.7.7-1_win32.zip"
|
||||
"${pkg_gtk_root}/gtk+/2.24/gtk+-bundle_2.24.10-20120208_win32.zip"
|
||||
"${pkg_gtk_root}/dependencies/gettext-tools-0.17.zip")
|
||||
set (pkg_gtk_md5
|
||||
"43fd6c159ca892c2f0739cc23a671e95"
|
||||
"2c712a8d7a652363241c0967098515db"
|
||||
"b09662bc99c5c1b8edb8af32a1722477"
|
||||
"bf4e34f1f175b88430159d33e01d0c49"
|
||||
"2d90c71404be0de4e5f3259f63a3e278"
|
||||
"bd6b3d8c35e06a00937db65887c6e287"
|
||||
"b6f59b70eef0992df37f8db891d4b283"
|
||||
"7ae20007b76e8099b05edc789bb23e54"
|
||||
"09baff956ebd1c391c7f71e9bd768edd")
|
||||
|
||||
set (pkg_winlibs_root "http://sourceforge.net/projects/winlibs/files")
|
||||
set (pkg_winlibs_urls "${pkg_winlibs_root}/GTK+/libjson-glib-1.0-1-mingw32.7z")
|
||||
set (pkg_winlibs_md5 "f06e42c5998dae5fb6245fecc96a403e")
|
||||
|
||||
set (pkg_mingw_lua_root "http://sourceforge.net/projects/mingw-cross/files/%5BLIB%5D%20Lua")
|
||||
set (pkg_mingw_lua_name "mingw32-lua-5.1.4-2")
|
||||
set (pkg_mingw_lua_urls
|
||||
"${pkg_mingw_lua_root}/${pkg_mingw_lua_name}/${pkg_mingw_lua_name}.zip")
|
||||
set (pkg_mingw_lua_urls "${pkg_mingw_lua_root}/${pkg_mingw_lua_name}/${pkg_mingw_lua_name}.zip")
|
||||
set (pkg_mingw_lua_strip ${pkg_mingw_lua_name})
|
||||
set (pkg_mingw_lua_md5
|
||||
"7deb1f62a9631871e9b90c0419c2e2bb")
|
||||
set (pkg_mingw_lua_md5 "7deb1f62a9631871e9b90c0419c2e2bb")
|
||||
|
||||
set (pkg_opensuse_root "http://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_11.4/noarch/")
|
||||
set (pkg_opensuse_listing "${working_dir}/opensuse-listing")
|
||||
set (pkg_opensuse_names
|
||||
"mingw32-libjson-glib" "mingw32-json-glib-devel" "mingw32-libintl")
|
||||
set (pkg_opensuse_strip "usr/i686-w64-mingw32/sys-root/mingw")
|
||||
|
||||
# Stage 1: retrieve openSUSE package links
|
||||
message (STATUS "Downloading openSUSE package listing...")
|
||||
file (DOWNLOAD "${pkg_opensuse_root}"
|
||||
"${pkg_opensuse_listing}" STATUS status)
|
||||
|
||||
list (GET status 0 status_errno)
|
||||
list (GET status 1 status_msg)
|
||||
if (status_errno)
|
||||
file (REMOVE ${pkg_opensuse_listing})
|
||||
message (FATAL_ERROR "Download failed: ${status_msg}")
|
||||
endif (status_errno)
|
||||
|
||||
file (READ "${pkg_opensuse_listing}" listing)
|
||||
file (REMOVE "${pkg_opensuse_listing}")
|
||||
|
||||
foreach (name ${pkg_opensuse_names})
|
||||
string (REGEX MATCH "href=\"(${name}[^\"]*\\.rpm)\"" filename "${listing}")
|
||||
set (filename ${CMAKE_MATCH_1})
|
||||
if (NOT filename)
|
||||
message (FATAL_ERROR "Cannot find ${name} in the openSUSE repository")
|
||||
endif (NOT filename)
|
||||
|
||||
list (APPEND pkg_opensuse_urls "${pkg_opensuse_root}${filename}")
|
||||
endforeach (name)
|
||||
|
||||
# Stage 2: fetch missing packages
|
||||
# Stage 1: fetch missing packages
|
||||
foreach (pkg_set ${pkg_list})
|
||||
set (pkg_md5 ${pkg_${pkg_set}_md5})
|
||||
|
||||
@ -138,13 +84,13 @@ if (NOT WIN32)
|
||||
message (FATAL_ERROR "Must run on Windows to extract packages; aborting")
|
||||
endif (NOT WIN32)
|
||||
|
||||
# Stage 3: setup bsdtar first (RPM support)
|
||||
# Stage 2: setup 7za first
|
||||
file (MAKE_DIRECTORY ${tmp_dir})
|
||||
foreach (url ${pkg_bsdtar_urls})
|
||||
foreach (url ${pkg_7za_urls})
|
||||
get_filename_component (filename ${url} NAME)
|
||||
message (STATUS "Extracting ${filename}...")
|
||||
set (filename ${pkg_dir}/${filename})
|
||||
|
||||
set (filename ${pkg_dir}/${filename})
|
||||
execute_process (COMMAND ${CMAKE_COMMAND} -E tar xf ${filename}
|
||||
WORKING_DIRECTORY ${tmp_dir}
|
||||
RESULT_VARIABLE status)
|
||||
@ -153,29 +99,38 @@ foreach (url ${pkg_bsdtar_urls})
|
||||
endif (status)
|
||||
endforeach (url)
|
||||
|
||||
file (COPY ${tmp_dir}/bin/ DESTINATION ${bsdtar_dir})
|
||||
file (MAKE_DIRECTORY ${tools_dir})
|
||||
file (COPY ${tmp_dir}/7za.exe DESTINATION ${tools_dir})
|
||||
file (REMOVE_RECURSE ${tmp_dir})
|
||||
list (REMOVE_ITEM pkg_list "bsdtar")
|
||||
list (REMOVE_ITEM pkg_list "7za")
|
||||
|
||||
# Stage 4: extract the rest of packages
|
||||
foreach (pkg_set ${pkg_list})
|
||||
foreach (url ${pkg_${pkg_set}_urls})
|
||||
get_filename_component (filename ${url} NAME)
|
||||
message (STATUS "Extracting ${filename}...")
|
||||
set (filename ${pkg_dir}/${filename})
|
||||
|
||||
if (filename MATCHES "7z$")
|
||||
set (extract_command ${sevenzip_executable} x)
|
||||
set (quiet OUTPUT_QUIET)
|
||||
else (filename MATCHES "7z$")
|
||||
set (extract_command ${CMAKE_COMMAND} -E tar xf)
|
||||
set (quiet)
|
||||
endif (filename MATCHES "7z$")
|
||||
|
||||
set (filename ${pkg_dir}/${filename})
|
||||
if (pkg_${pkg_set}_strip)
|
||||
file (MAKE_DIRECTORY ${tmp_dir})
|
||||
execute_process (COMMAND ${bsdtar_executable} -xf ${filename}
|
||||
execute_process (COMMAND ${extract_command} ${filename}
|
||||
WORKING_DIRECTORY ${tmp_dir}
|
||||
RESULT_VARIABLE status)
|
||||
RESULT_VARIABLE status ${quiet})
|
||||
file (COPY ${tmp_dir}/${pkg_${pkg_set}_strip}/
|
||||
DESTINATION ${working_dir})
|
||||
file (REMOVE_RECURSE ${tmp_dir})
|
||||
else (pkg_${pkg_set}_strip)
|
||||
execute_process (COMMAND ${bsdtar_executable} -xf ${filename}
|
||||
execute_process (COMMAND ${extract_command} ${filename}
|
||||
WORKING_DIRECTORY ${working_dir}
|
||||
RESULT_VARIABLE status)
|
||||
RESULT_VARIABLE status ${quiet})
|
||||
endif (pkg_${pkg_set}_strip)
|
||||
|
||||
if (status)
|
||||
@ -187,15 +142,3 @@ endforeach (pkg_set)
|
||||
# Stage 5: final touches
|
||||
file (WRITE ${working_dir}/etc/gtk-2.0/gtkrc
|
||||
"gtk-theme-name = \"MS-Windows\"")
|
||||
|
||||
set (gdk_pixbuf_libdir lib/gdk-pixbuf-2.0/2.10.0)
|
||||
set (ENV{GDK_PIXBUF_MODULE_FILE} ${gdk_pixbuf_libdir}/loaders.cache)
|
||||
set (ENV{GDK_PIXBUF_MODULEDIR} ${gdk_pixbuf_libdir}/loaders)
|
||||
execute_process (COMMAND
|
||||
${working_dir}/bin/gdk-pixbuf-query-loaders --update-cache
|
||||
WORKING_DIRECTORY "${working_dir}"
|
||||
RESULT_VARIABLE result)
|
||||
if (result)
|
||||
message (FATAL_ERROR "gdk-pixbuf-query-loaders failed")
|
||||
endif (result)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user