Skip to content

Commit 090a081

Browse files
rozumxStephen Rozum
andauthored
Windows packaging - Added support to package additional drivers (Xilinx#4087)
Work done --------- + Added options -xclmgmt2 and -xocluser2 to support packaging version 2 of the drivers. + Updated help for these options + Updated CMake to package these additional drivers + Update WIX to create an unique entry for these driver Co-authored-by: Stephen Rozum <[email protected]>
1 parent fcd9f2a commit 090a081

File tree

2 files changed

+72
-4
lines changed

2 files changed

+72
-4
lines changed

build/build.bat

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ ECHO [-package] - Packages the release build to a MSI archive.
6666
ECHO Note: Depends on the WIX application.
6767
ECHO [-xclmgmt arg] - The directory to the xclmgmt drivers (used with packaging)
6868
ECHO [-xocluser arg] - The directory to the xocluser drivers (used with packaging)
69+
ECHO [-xclmgmt2 arg] - The directory to the xclmgmt2 drivers (used with packaging)
70+
ECHO [-xocluser2 arg] - The directory to the xocluser2 drivers (used with packaging)
6971
GOTO:EOF
7072

7173
REM --------------------------------------------------------------------------
@@ -110,7 +112,9 @@ PUSHD WRelease
110112
ECHO MSVC Compile Parallel Jobs: %LOCAL_MSVC_PARALLEL_JOBS%
111113

112114
SET XCLMGMT_DRIVER=""
115+
SET XCLMGMT2_DRIVER=""
113116
SET XOCLUSER_DRIVER=""
117+
SET XOCLUSER2_DRIVER=""
114118
SET CREATE_PACKAGE=false
115119

116120
REM Evaluate the additional options
@@ -131,13 +135,28 @@ IF "%1" == "-xclmgmt" (
131135
GOTO:shift_loop_release
132136
)
133137

138+
IF "%1" == "-xclmgmt2" (
139+
SET XCLMGMT2_DRIVER="%2"
140+
SHIFT
141+
SHIFT
142+
GOTO:shift_loop_release
143+
)
144+
145+
134146
IF "%1" == "-xocluser" (
135147
SET XOCLUSER_DRIVER="%2"
136148
SHIFT
137149
SHIFT
138150
GOTO:shift_loop_release
139151
)
140152

153+
IF "%1" == "-xocluser2" (
154+
SET XOCLUSER2_DRIVER="%2"
155+
SHIFT
156+
SHIFT
157+
GOTO:shift_loop_release
158+
)
159+
141160
REM Unknown option
142161
IF NOT "%1" == "" (
143162
POPD
@@ -146,14 +165,22 @@ IF NOT "%1" == "" (
146165
)
147166

148167
IF NOT "%XCLMGMT_DRIVER%" == "" (
149-
ECHO XclMgmt Driver Directory: %XCLMGMT_DRIVER%
168+
ECHO Packaging xclbmgmt driver directory: %XCLMGMT_DRIVER%
169+
)
170+
171+
IF NOT "%XCLMGMT2_DRIVER%" == "" (
172+
ECHO Packaging xclbmgmt2 driver directory: %XCLMGMT2_DRIVER%
150173
)
151174

152175
IF NOT "%XOCLUSER_DRIVER%" == "" (
153-
ECHO XoclUser Driver Directory: %XOCLUSER_DRIVER%
176+
ECHO Packaging xocluser directory: %XOCLUSER_DRIVER%
177+
)
178+
179+
IF NOT "%XOCLUSER2_DRIVER%" == "" (
180+
ECHO Packaging xocluser2 directory: %XOCLUSER2_DRIVER%
154181
)
155182

156-
cmake -G "Visual Studio 15 2017 Win64" -DXCL_MGMT=%XCLMGMT_DRIVER% -DXOCL_USER=%XOCLUSER_DRIVER% -DMSVC_PARALLEL_JOBS=%LOCAL_MSVC_PARALLEL_JOBS% -DKHRONOS=%KHRONOS% -DBOOST_ROOT=%BOOST% -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../../src
183+
cmake -G "Visual Studio 15 2017 Win64" -DXCL_MGMT=%XCLMGMT_DRIVER% -DXOCL_USER=%XOCLUSER_DRIVER% -DXCL_MGMT2=%XCLMGMT2_DRIVER% -DXOCL_USER2=%XOCLUSER2_DRIVER% -DMSVC_PARALLEL_JOBS=%LOCAL_MSVC_PARALLEL_JOBS% -DKHRONOS=%KHRONOS% -DBOOST_ROOT=%BOOST% -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ../../src
157184
IF errorlevel 1 (POPD & exit /B %errorlevel%)
158185

159186
cmake --build . --verbose --config Release

src/CMake/cpackWin.cmake

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,35 @@ if (DEFINED XCL_MGMT)
103103

104104
cpack_add_component(xcl_mgmt_driver
105105
DISPLAY_NAME "XclMgmt Driver"
106-
DESCRIPTION "XCL Managment driver"
106+
DESCRIPTION "XCL Managment Driver"
107107
GROUP DRIVERS
108108
ENABLED
109109
REQUIRED
110110
)
111111
ENDIF(NOT XCL_MGMT STREQUAL "")
112112
ENDIF(DEFINED XCL_MGMT)
113113

114+
# -- XCL Managment2 Driver --
115+
if (DEFINED XCL_MGMT2)
116+
if (NOT XCL_MGMT2 STREQUAL "")
117+
file(GLOB XCL_MGMT2_DRIVER
118+
"${XCL_MGMT2}/*"
119+
)
120+
install(FILES ${XCL_MGMT2_DRIVER}
121+
DESTINATION xrt/drivers/xcl_mgmt2
122+
COMPONENT xcl_mgmt2_driver)
123+
124+
cpack_add_component(xcl_mgmt2_driver
125+
DISPLAY_NAME "XclMgmt2 Driver"
126+
DESCRIPTION "XCL Managment2 Driver"
127+
GROUP DRIVERS
128+
ENABLED
129+
REQUIRED
130+
)
131+
ENDIF(NOT XCL_MGMT2 STREQUAL "")
132+
ENDIF(DEFINED XCL_MGMT2)
133+
134+
114135
# -- Xocl User Driver --
115136
if (DEFINED XOCL_USER)
116137
if (NOT XOCL_USER STREQUAL "")
@@ -131,6 +152,26 @@ if (DEFINED XOCL_USER)
131152
ENDIF(NOT XOCL_USER STREQUAL "")
132153
ENDIF(DEFINED XOCL_USER)
133154

155+
# -- Xocl User2 Driver --
156+
if (DEFINED XOCL_USER2)
157+
if (NOT XOCL_USER2 STREQUAL "")
158+
file(GLOB XOCL_USER2_DRIVER
159+
"${XOCL_USER2}/*"
160+
)
161+
install(FILES ${XOCL_USER2_DRIVER}
162+
DESTINATION xrt/drivers/xocl_user2
163+
COMPONENT xocl_user2_driver)
164+
165+
cpack_add_component(xocl_user2_driver
166+
DISPLAY_NAME "XoclUser2 Driver"
167+
DESCRIPTION "XoclUser2 Driver"
168+
GROUP DRIVERS
169+
ENABLED
170+
REQUIRED
171+
)
172+
ENDIF(NOT XOCL_USER2 STREQUAL "")
173+
ENDIF(DEFINED XOCL_USER2)
174+
134175

135176
# -- Drivers group --
136177
cpack_add_component_group(DRIVERS

0 commit comments

Comments
 (0)