CMake buildbot change upload should work now
authorMartijn Berger <martijn.berger@gmail.com>
Thu, 13 Nov 2014 16:09:09 +0000 (17:09 +0100)
committerMartijn Berger <martijn.berger@gmail.com>
Thu, 13 Nov 2014 16:09:47 +0000 (17:09 +0100)
CPack generating NSIS and WiX installers should also work

CMakeLists.txt
build_files/buildbot/slave_pack.py
build_files/cmake/packaging.cmake

index 6fe8902234253b9bc3623d92d1ab3c529635534a..38ddc8d0ad92d6d4f3f75c3dc8ea177f18976a3c 100644 (file)
@@ -1703,12 +1703,6 @@ elseif(WIN32)
                endif()
        endif()
 
-       set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
-       set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
-       set(CPACK_WIX_LICENSE_RTF ${CMAKE_SOURCE_DIR}/release/text/GPL-license.rtf)
-       set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
-       set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
-
 elseif(APPLE)
 
        if(${CMAKE_OSX_DEPLOYMENT_TARGET} STREQUAL "10.5" OR ${CMAKE_OSX_DEPLOYMENT_TARGET} STRGREATER "10.5")
index faceb8d3a6541d94d6f1076a71ec50e63073a380..8ff7783b6d1da7ced8f67d4af2702477d5e2a3ad 100644 (file)
@@ -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'
index 735d3fd819e9cbcae82a47d48610c862a37f16e6..08185d38eb62535503856f8a3f0c43184373d3b4 100644 (file)
@@ -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