From 15a7a5a08cd0d6c08feeb158a9f81af4114e3f57 Mon Sep 17 00:00:00 2001 From: Martijn Berger Date: Thu, 13 Nov 2014 17:09:09 +0100 Subject: CMake buildbot change upload should work now CPack generating NSIS and WiX installers should also work --- build_files/buildbot/slave_pack.py | 16 ++++++++++++++-- build_files/cmake/packaging.cmake | 14 +++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) (limited to 'build_files') diff --git a/build_files/buildbot/slave_pack.py b/build_files/buildbot/slave_pack.py index faceb8d3a65..8ff7783b6d1 100644 --- a/build_files/buildbot/slave_pack.py +++ b/build_files/buildbot/slave_pack.py @@ -123,8 +123,20 @@ else: os.remove(f) retcode = subprocess.call(['cpack', '-G','ZIP']) result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0] - os.rename(result_file, "buildbot_upload.zip") - sys.exit(retcode) + os.rename(result_file, "{}.zip".format(builder)) + # create zip file + try: + upload_zip = "buildbot_upload.zip" + if os.path.exists(upload_zip): + os.remove(upload_zip) + z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED) + z.write("{}.zip".format(builder)) + z.close() + sys.exit(retcode) + except Exception, ex: + sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n') + sys.exit(1) + # clean release directory if it already exists release_dir = 'release' diff --git a/build_files/cmake/packaging.cmake b/build_files/cmake/packaging.cmake index 735d3fd819e..08185d38eb6 100644 --- a/build_files/cmake/packaging.cmake +++ b/build_files/cmake/packaging.cmake @@ -61,7 +61,19 @@ if(APPLE) set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE) endif() -set(CPACK_PACKAGE_EXECUTABLES "blender") +if(WIN32) + set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender") + set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender") + + set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico) + set(CPACK_NSIS_COMPRESSOR "/SOLID lzma") + + set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt) + set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico) + set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A") +endif() + +set(CPACK_PACKAGE_EXECUTABLES "blender" "blender") include(CPack) # Target for build_archive.py script, to automatically pass along -- cgit v1.2.3