Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeModules/CPackConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,9 @@ SET(CPACK_SOURCE_IGNORE_FILES
# Ignore build directories that may be in the source tree
FILE(GLOB_RECURSE CACHES "${CMAKE_SOURCE_DIR}/CMakeCache.txt")

SET(CPACK_WIX_LICENSE_RTF "${PROJECT_SOURCE_DIR}/LICENSE.rtf")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no license.rtf file in ArrayFire. If you want to link to license, the it is just LICENSE (markdown).

SET(CPACK_WIX_PATCH_FILE "${PROJECT_SOURCE_DIR}/wix/WIXPatch.wxs")
SET(CPACK_WIX_UPGRADE_GUID "FF9E2D77-CDC7-4D24-8B7B-99D66EDEE862")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this number signify ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a unique identifier for the installer, used for when users upgrade to a newer version. The existing installation can be detected by this. This way multiple entries in Programs and Features aren't created, and the existing installation can be upgraded in place.

For more information, see: https://cmake.org/cmake/help/v3.6/module/CPackWIX.html

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@InBetweenNames I was wondering if this is randomly generated. If so does it need to change with every version ?

Can you also add some comments on when this string needs to be preserved and when it needs to be regenerated ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is indeed randomly generated, and if you wanted to have multiple ArrayFire installations side by side, then this number could change. Otherwise, leaving this number intact allows for future versions of ArrayFire to replace existing versions on the system.


# Call to CPACK
INCLUDE(CPack)
Binary file added LICENSE.rtf
Binary file not shown.
10 changes: 10 additions & 0 deletions wix/WIXPatch.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<CPackWiXPatch>
<CPackWiXFragment Id="CM_CP_libraries.lib.afcuda.dll">
<Environment Id="ARRAYFIREPATH" Action="set"
Name="AF_PATH" Permanent="no" System="yes" Value="[INSTALL_ROOT]"/>
<Environment Id="ENVPATH" Action="set"
Name="PATH" Permanent="no" System="yes" Part="last" Value="[INSTALL_ROOT]lib"/>
<Environment Id="NVPATH" Action="set"
Name="PATH" Permanent="no" System="yes" Part="last" Value="[%CUDA_PATH]\nvvm\bin"/>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (adding NVVM to path) is something we have discussed at length internally about and have consistently decided not to have in our installer. The single most important reason being that NVIDIA does not add it to Path themselves.

Other reasons include

  • Making the PATH too long.
  • Most people will not remove such a path manually if they do not know what added it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be an alternative would be to have the installer copy nvvm.dll (if it exists) into arrayfire/lib ?

</CPackWiXFragment>
</CPackWiXPatch>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this should be a top level directory. I'd rather have it go into CMakeModules

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree--if you're interested in another revision of this PR, I could accomodate that.