Advertisement
Guest User

houdini install script

a guest
Apr 6th, 2018
1,684
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 109.75 KB | None | 0 0
  1. #!/bin/bash
  2. #
  3. # Installation script for Houdini
  4. #
  5.  
  6. # If we have no stdin, then try to run inside an xterm
  7. stdin=$(readlink /proc/self/fd/0)
  8. if [ "$stdin" = "/dev/null" -a -n "$DISPLAY" ]; then
  9.     cd "$(dirname "$0")"
  10.     for prog in x-terminal-emulator xterm; do
  11.         exe=$(which $prog 2>/dev/null)
  12.         if [ -x "$exe" ]; then
  13.             exec "$exe" -e "./$(basename "$0")"
  14.         fi
  15.     done
  16. fi
  17.  
  18. usage="usage: ./houdini.install [--help] [--[no-]local-licensing] [--[no-]install-engine-maya] [--[no-]install-engine-unity] [--[no-]install-houdini] [--[no-]license] [--[no-]menus] [--[no-]hfs-symlink] [--[no-]bin-symlink] [--no-root-check] [--make-dir] [--install-hqueue-server] [--hqueue-server-dir /path/to/install] [--create-hqueue-shared-dir yes|no] [--hqueue-shared-dir /path/to/sharedDir] [--hqueue-shared-dir-mount /path/to/mountPoint] [--upgrade-hqueue-server-if-exists yes|no] [--install-hqueue-client] [--hqueue-client-dir /path/to/install] [--hqueue-server-name hqserverName] [--hqueue-server-port hqserverPort] [--mount-hqueue-shared-dir yes|no] [/path/to/install]"
  19.  
  20. long_usage()
  21. {
  22.     echo "usage: ./houdini.install [options] [installation_directory]
  23.  
  24. OPTIONS
  25. --install-houdini | --no-install-houdini
  26.         Select or deselect Houdini and the HDK for installation
  27. --install-engine-maya | --no-install-engine-maya
  28.         Select or deselect Houdini Engine Maya plugin for installation
  29. --install-engine-unity | --no-install-engine-unity
  30.         Select or deselect Houdini Engine Unity plugin for installation
  31. --install-menus | --no-install-menus
  32.         Select or deselect desktop menus for installation
  33. --install-bin-symlink | --no-install-bin-symlink
  34.         Select or deselect symlinks in /usr/local/bin for installation
  35. --install-hfs-symlink | --no-install-hfs-symlink
  36.         Select or deselect symlink in /opt/hfs$VER_MAJOR.$VER_MINOR for installation
  37. --install-license | --no-install-license
  38.         Select or deselect sesinetd (license server) for installation
  39. --local-licensing | --no-local-licensing
  40.         Select or deselect local licensing for installation
  41. --install-hqueue-server | --no-install-hqueue-server
  42.         Select or deselect HQueue server for installation
  43. --install-hqueue-client | --no-install-hqueue-client
  44.         Select or deselect HQueue client for installation
  45. --hqueue-server-dir directory
  46.         Directory to install HQueue server in
  47. --create-hqueue-shared-dir (yes|no)
  48.         Create and mount the shared directory on HQueue server
  49. --mount-hqueue-shared-dir (yes|no)
  50.         Mount the shared directory on HQueue client
  51. --hqueue-shared-dir directory
  52.         Directory name of the shared directory
  53. --hqueue-shared-dir-mount mount_point
  54.         Mount point of the shared directory
  55. --upgrade-hqueue-server-if-exists (yes|no)
  56.         Upgrade an existing install of HQueue server
  57. --hqueue-client-dir directory
  58.         Directory to install HQueue client in
  59. --hqueue-server-name server_name
  60.         Set the server name of the HQueue server
  61. --hqueue-server-port port_number
  62.         Set the port number of the HQueue server
  63. --auto-install  install automatically, do not prompt user
  64. --no-root-check
  65.         do not show a warning if the installer is not run as root
  66. --help      display this message
  67.  
  68. For a full description of how to configure installation using command line
  69. options, see the installation manual."
  70. }
  71.  
  72. #-------------------------------------------------------------------------
  73. do_wait()
  74. {
  75.     if [ "$dowait" = "yes" ]; then
  76.         echo $nn "[Hit return to continue]$cc"
  77.         read anything
  78.     fi
  79. }
  80.  
  81. dowait=no
  82. if [ -z "$PAGER" ]; then
  83.     PAGER=more
  84. fi
  85. VER_MAJOR=16
  86. VER_MINOR=5
  87. VER_BUILD=405
  88. BUILD_ARCH=x86_64
  89. PYTHON_VERSIONS="2.7"
  90. SIZE_HOUDINI=2278136
  91. SIZE_HQUEUE=462160
  92. SIZE_HQUEUE_CLIENT=431016
  93. SIZE_LICENSE=20620
  94. SIZE_ENGINE_MAYA=6072
  95. SIZE_ENGINE_UNITY=2240
  96. AGREEMENT_TEXT="                                Last Updated Date: February 6, 2018
  97.  
  98.                    SIDE EFFECTS SOFTWARE
  99.                      LICENSE AGREEMENT
  100.  
  101. IMPORTANT - READ CAREFULLY:  Side Effects Software Inc. or its
  102. subsidiary (as applicable, \"SideFX\") licenses this software and
  103. all upgrades and related materials (collectively, the \"Software\"),
  104. excluding any open source software that is distributed with the
  105. Software, subject to the terms and conditions of this Agreement.  BY
  106. SELECTING \"ACCEPT\", OR BY DOWNLOADING, INSTALLING OR USING THE
  107. SOFTWARE, ALL OF THE TERMS AND CONDITIONS CONTAINED IN THIS AGREEMENT
  108. BECOME LEGALLY BINDING ON YOU AS AN INDIVIDUAL OR ON THE ORGANIZATION
  109. THAT YOU REPRESENT.
  110.  
  111. IF YOU THE INDIVIDUAL (A) DO NOT AGREE TO THE TERMS AND CONDITIONS OF
  112. THIS AGREEMENT, OR (B) ARE NOT AUTHORIZED TO DOWNLOAD OR INSTALL THE
  113. SOFTWARE OR TO AGREE TO BE BOUND BY THIS AGREEMENT ON BEHALF OF YOUR
  114. ORGANIZATION, YOU ARE REQUIRED TO SELECT \"DO NOT ACCEPT\", IN WHICH
  115. CASE YOU ARE NOT PERMITTED TO DOWNLOAD, INSTALL OR USE THE SOFTWARE.
  116.  
  117. NOTE:  The terms and conditions of this Agreement were last updated,
  118. and are effective as of, the \"Last Updated Date\" indicated above.  Any
  119. downloading, installation or Use of the Software or an earlier version
  120. of the Software that was licensed prior to such date is governed by
  121. prior terms and conditions, which differ from those set out in this
  122. Agreement.
  123.  
  124. 1. GENERAL
  125.  
  126. 1.1. Formation of Legally Binding Contract.  A legally binding
  127. contract is immediately formed upon your acceptance of this Agreement.
  128. The licensee who is bound by this Agreement (\"Licensee\") is: (i) the
  129. individual accepting this Agreement, if the individual is licensing
  130. the Software for his or her personal use or use as a sole proprietor;
  131. or (ii) the corporation, institution, partnership, organization or
  132. other entity (\"Organization\") on whose behalf the individual accepting
  133. this Agreement is acting.  Where a Transaction Confirmation is
  134. provided to Licensee, Licensee's name will be confirmed in the
  135. Transaction Confirmation.  Where no Transaction Confirmation is
  136. provided to Licensee and Licensee obtains an Entitlement(s) or
  137. License(s) through the online process, Licensee's name will be the
  138. name provided as part of the online process or, where no name is
  139. provided, the name associated with the email address provided or used
  140. as part of the online process.  The Entitlement(s) and License(s)
  141. issued to Licensee will be associated with such name.  Licensee
  142. represents that the name provided to SideFX, if any, is its full
  143. and correct legal name.
  144.  
  145. 1.2. Application and Priority of Terms.  The terms and conditions of
  146. this Agreement apply regardless of, and take priority over, any terms
  147. and conditions applicable to Licensee's software or, subject to
  148. Section 3.11, any third party software which may be used in
  149. conjunction with the Software.
  150.  
  151. 1.3. Subsequent Licensing; Upgrades.  Subsequent licensing of the
  152. Software may be subject to updated terms and conditions that differ
  153. from those set out in this Agreement (an \"Updated Agreement\").
  154. SideFX may require Licensee to accept an Updated Agreement in
  155. connection with: (i) any subsequent downloading and/or installation
  156. of Upgrades; or (ii) the issuance of subsequent Entitlements or
  157. Licenses to Use the Software (see Section 2.2); in which case any
  158. downloading, installation of Use of such Upgrade (in the case of
  159. (i)), or any Use of the Software under such Entitlements and Licenses
  160. (in the case of (ii)), will be governed by the Updated Agreement.  An
  161. Updated Agreement will be indicated by a change to the \"Last Updated
  162. Date\" indicated at the top of this Agreement.  If Licensee obtains
  163. additional Entitlements and Licenses to Use the Software without
  164. having to accept an Updated Agreement, this Agreement will continue
  165. to apply to Licensee's Use of the Software under such Entitlements
  166. and Licenses.
  167.  
  168. 1.4. Communication of Usage Data. Licensee acknowledges that the
  169. Software may communicate to SideFX certain technical,
  170. non-personal information concerning Licensee's Licenses and Use of the
  171. Software.  Licensee hereby consents to such communication.
  172.  
  173. 1.5. Information Provided by Licensee.  Licensee represents, warrants
  174. and covenants that any information provided by Licensee to SideFX
  175. concerning Licensee's identity, contact information, Authorized
  176. Users, revenue, applicable project or otherwise is, and will
  177. continuously be, true and accurate and not misleading.  Licensee
  178. agrees to notify SideFX of any changes in such information.
  179.  
  180. 1.6. Defined Terms.  Section 12 sets out certain defined terms used in
  181. this Agreement.
  182.  
  183. 2. RIGHT TO USE
  184.  
  185. 2.1. Grant of Rights.  Subject to Licensee's payment of the applicable
  186. fees and continuous compliance with the terms and conditions of this
  187. Agreement, SideFX hereby grants to Licensee a limited,
  188. non-transferable, non-exclusive, non-sublicensable right for
  189. Authorized Users to install and Use the Software: (i) solely in object
  190. code format; (ii) solely in the applicable Territory; (iii) solely for
  191. the Usage Purpose; and (iv) subject to the terms and conditions of the
  192. applicable License Type (as set out in Section 3).
  193.  
  194. 2.2. Entitlements and Licenses.  Licensee acknowledges that Use of the
  195. Software requires: (i) the issuance by SideFX of an
  196. Entitlement(s); (ii) the redemption of such Entitlement(s) by Licensee
  197. to obtain a License(s); and (iii) the installation of such License(s)
  198. on the applicable Computer using the tools provided as part of the
  199. Software.  SideFX will issue Licensee an Entitlement(s) based on
  200. the applicable License Type and permitted Use.  Each License permits
  201. Use of the Software on a single Computer (in the case of a Workstation
  202. Installation) or on a single Network Server and single Client Computer
  203. (in the case of a Network Installation).
  204.  
  205. 2.3. Licensee Responsibilities.  Licensee shall: (i) take appropriate
  206. action to ensure that non-Authorized Users do not Use the Software;
  207. (ii) ensure that all Authorized Users comply with all of the terms and
  208. conditions of this Agreement, including the restrictions set out in
  209. Section 4.1; (iii) be solely responsible for any digital assets or
  210. other content that is uploaded to the Software by Authorized Users,
  211. including compliance with any restrictions imposed by the author of
  212. the content and any violations of intellectual property rights; (iv)
  213. be solely responsible for the accuracy, integrity, legality and
  214. appropriateness of all content created by Authorized Users using the
  215. Software; and (v) Use the Software in compliance with all applicable
  216. laws, rules and regulations (including those relating to export,
  217. homeland security, anti-terrorism, data protection and privacy) and
  218. any documentation included with the Software. Licensee shall be
  219. responsible for any breach of this Agreement by Authorized Users and
  220. any installation or Use of the Software by persons other than
  221. Authorized Users utilizing Licenses issued to Licensee.  Licensee
  222. shall immediately notify SideFX of any unauthorized installation
  223. or Use of the Software.
  224.  
  225. 3. LICENSE TYPES AND SCOPE OF USE
  226.  
  227. 3.1. License Types.  The Software is provided to Licensee subject to
  228. specific terms and conditions that further define the scope of
  229. Licensee's permitted installation of Licenses and Use of the Software
  230. based on the type of license granted (\"License Type\").  The License
  231. Types, and the terms and conditions applicable to each License Type,
  232. are set out in Appendix A to this Agreement.  Licensee must not, and
  233. must not attempt to, install any License(s) or Use the Software
  234. outside of the scope of the License Type that applies to the
  235. License(s) issued to Licensee.  Any actual or attempted installation
  236. of Licenses or Use of the Software outside of the scope of the
  237. applicable License Type is a breach of this Agreement and an
  238. infringement of the rights of SideFX.
  239.  
  240. 3.2. Additional Limitations and Restrictions.  For greater certainty,
  241. the limitations and restrictions of the applicable License Type are in
  242. addition to all other limitations and restrictions under this
  243. Agreement, including those set out in Section 2, Section 3 and Section 4.
  244.  
  245. 3.3. Network Installation.  Certain of the License Types provide for
  246. Network Installation.  \"Network Installation\" means that each of the
  247. Licenses issued to Licensee may be installed on one (1) Computer
  248. acting as a license server (the \"License Server\") that can be accessed
  249. by other Computers acting as clients (\"Client Computers\") through a
  250. local area network connection or through a VPN connection, provided
  251. that: (i) the VPN connection is secure; (ii) each Client Computer is
  252. within the Territory; and (iii) the Software may only be Used on the
  253. Client Computers accessing the License Server.  The number of Client
  254. Computers accessing the Licenses on the License Server(s) and on which
  255. the Software is being Used concurrently shall not exceed the number of
  256. Licenses issued.  For example, if Licensee has been issued ten (10)
  257. Local Access Licenses, each of the ten (10) Licenses may be installed
  258. on a License Server, and the Software may be Used on a maximum of ten
  259. (10) Client Computers at any given time.  For certainty, each of the
  260. Licenses issued to Licensee does not have to be installed on the same
  261. License Server, but any single License cannot be installed on more
  262. than one License Server.
  263.  
  264. 3.4. Workstation Installation.  Certain of the License Types provide
  265. for Workstation Installation.  \"Workstation Installation\" means that
  266. the License may be installed on one (1) dedicated Computer and the
  267. Software may only be Used on that Computer.  Unless otherwise
  268. expressly provided in Appendix A, the License cannot subsequently be
  269. relocated (i.e. installed on a different Computer).
  270.  
  271. 3.5. Location.  The rights granted under this Agreement provide for
  272. Use of the Software in the applicable Territory and certain of the
  273. License Types may provide for Use of the Software only at a particular
  274. location.  Authorized Users will be considered to be Using the
  275. Software in the Territory (or at a particular location) only if the
  276. individual is physically located within the Territory (or at the
  277. particular location) at the time he or she is Using the Software.
  278.  
  279. 3.6. Use of Cloud Services.  For certainty, notwithstanding anything
  280. else in this Agreement, Licensee may only install the Software, or
  281. have a third party install the Software for Licensee, for use with a
  282. Cloud Service if the License Type that applies to the Licenses issued
  283. to Licensee is a Global Access License and only for non-interactive
  284. processing.  Otherwise, Licensee is not permitted to install or have
  285. installed or Use the Software on a Cloud Service regardless of the
  286. location of the Computers utilized by the Cloud Service.  For
  287. certainty, non-interactive processing includes processing using
  288. Houdini Mantra, Houdini Engine and Houdini Batch, but excludes
  289. processing using Houdini Core or Houdini FX.  Nothing in this Section
  290. shall be taken to limit any restriction set out in Article 3 or
  291. otherwise in this Agreement.
  292.  
  293. 3.7. Use of Third Party Rendering.  Except for Users under an
  294. Apprentice License, Users may utilize third party software (the
  295. \"Third Party Rendering Software\") for the purpose of rendering images
  296. created using the Software; provided that with respect to Indie
  297. Licenses: (i) the Third Party Rendering Software and its dedicated
  298. Houdini plug-in must be installed and used on the same dedicated
  299. Computer on which the Software is installed and Used; (ii) the User
  300. must not render sequences at a resolution higher than 4096x4096; and
  301. (iii) the User shall Use only the final work product produced by the
  302. Third Party Rendering Software and shall not access or Use or have
  303. any rights in or to any temporary or intermediate images or files
  304. produced by the Third Party Rendering Software and/or its dedicated
  305. Houdini plug-in. Within ten (10) days of a request by SideFX, the
  306. third party who provides the Third Party Rendering Software and its
  307. dedicated Houdini plug-in shall certify in writing to SideFX the
  308. extent to which such third party has implemented technical measures
  309. to prevent any breach of such restrictions. For certainty, Users
  310. under all License Types other than the Apprentice License and the
  311. Indie License may utilize Third Party Rendering Software for the
  312. purpose of rendering images created using the Software, without
  313. reference to the restrictions and requirements set out in this
  314. Section (but, for certainty, subject to the restrictions that
  315. otherwise apply to such License Types).
  316.  
  317. 3.8. Non-Concurrent Use.  For all License Types, only one individual
  318. may Use the Software interactively (i.e. operating the Software
  319. through its graphical user interface) on a Computer (including, for
  320. certainty, a Client Computer or a dedicated Computer) at any given
  321. time.  Without limiting the foregoing in this Section, where the
  322. Software is being Used interactively on a Client Computer or a
  323. dedicated Computer by an individual, a second individual may not Use
  324. the Software on that same dedicated Computer or Client Computer
  325. indirectly through a separate Computer, terminal or monitor.
  326.  
  327. 3.9. Limits on Number of Licenses.  SideFX may limit the number
  328. of Licenses of a particular License Type available to any particular
  329. Licensee, alone or together with its related individuals and
  330. Affiliates.  
  331.  
  332. 3.10. Orbolt.  Digital assets that are authored Using the Software
  333. can be uploaded to and downloaded from the website maintained by the
  334. SideFX affiliate, Orbolt Inc., at www.orbolt.com (the \"Orbolt
  335. Website\"), pursuant to the Orbolt Inc. Terms and Conditions of
  336. Website Use.  Notwithstanding the prohibitions on Commercial Use
  337. under the Non-Commercial Licenses, the Software may be Used under the
  338. Non-Commercial Licenses (as well as under the Commercial Licenses)
  339. for the purpose of authoring digital assets for upload to the Orbolt
  340. Website.  Any other Commercial Use of the Software under a
  341. Non-Commercial License is strictly prohibited.  Any digital asset
  342. that is downloaded from the Orbolt Website may be further developed
  343. subject to: (i) the terms of the applicable License Type under which
  344. the digital asset was downloaded; and (ii) any restrictions imposed
  345. by the author of the downloaded digital asset or by the License Type
  346. under which the digital asset was created.
  347.  
  348. 3.11. Open Source Software.  The Software may be accompanied by
  349. certain open source software (in source code and executable forms, as
  350. applicable) (the \"Open Source Software\") that works with the Software.
  351. The Open Source Software forms, and is distributed as, a separate and
  352. independent software program from the Software (and the Software is
  353. not a modification of, or a work based on, the Open Source Software),
  354. even though the Open Source Software may have been aggregated or
  355. packaged with the Software for purposes of distribution. The Open
  356. Source Software is distributed under and subject to the terms and
  357. conditions of the applicable open source licenses and notices set out
  358. at http://www.sidefx.com/docs/houdini/licenses/ (the \"Open Source
  359. Licenses\").  Licensee hereby agrees to the terms and conditions of the
  360. Open Source Licenses as they relate to the applicable Open Source
  361. Software.
  362.  
  363. 4. RESTRICTIONS ON USE
  364.  
  365. 4.1. Restrictions on Use of Software.  Subject to the terms and
  366. conditions for the applicable License Type, Licensee agrees that it
  367. will not, and will not permit any third party to, directly or
  368. indirectly: (i) copy the Software (except that Licensee may download
  369. and install the Software and make one (1) copy of the Software solely
  370. for backup purposes) or create derivative works based on the Software;
  371. (ii) assign, transfer, lease, rent, sublicense, distribute or
  372. otherwise make available the Software, any Entitlement, any License or
  373. any right granted under this Agreement, in whole or in part, to any
  374. other Person, including on a timesharing, software-as-a-service or
  375. other similar basis (except that, with certain License Types, Licensee
  376. may permit third party Authorized Users to Use the Software to create
  377. content for Licensee); (iii) permit any third party, other than an
  378. Authorized User, to redeem or un-redeem Entitlements, install Licenses
  379. or Use the Software; (iv) share any user ids or passwords with anyone
  380. other than Authorized Users; (v) Use the Software to provide any
  381. service bureau services or any services on a similar basis; (vi)
  382. except as provided under Section 3.10, Use the Software under a
  383. Non-Commercial License for Commercial purposes, or receive any form of
  384. compensation for work product created or work performed Using the
  385. Software under a Non-Commercial License; (vii) reverse engineer,
  386. decompile, disassemble, or otherwise attempt to discover the source
  387. code of any portion of the Software; (viii) disassemble, reverse
  388. engineer or use the file format of any file generated by the Software
  389. for purposes of by-passing any restrictions or requirements of the
  390. Software; (ix) attempt to tamper with, alter, disable, hinder,
  391. by-pass, override, or circumvent any security, reliability, integrity,
  392. accounting or other mechanism, restriction or requirement of the
  393. Software, including any Entitlement or License or any other mechanism
  394. that permits, monitors or limits installation of Licenses or Use of
  395. the Software to the applicable scope in accordance with this
  396. Agreement; (x) convert the file format of any file generated by the
  397. Software when licensed under a Non-Commercial License to a file format
  398. generated by the Software when licensed under a Commercial License;
  399. (xi) attempt to tamper with or alter (or with respect to
  400. Non-Commercial Licenses, hinder) the usage information conveyed by the
  401. Software to SideFX; (xii) modify or attempt to modify the
  402. Software; (xiii) install or Use the Software in any way that would
  403. subject the Software, in whole in or in part, to governmental
  404. regulation that would not have otherwise applied but for such
  405. installation or Use; (xiv) remove, obscure or alter any copyright,
  406. trade-mark, patent or proprietary notice affixed to the media or
  407. packaging of the Software or displayed by or in the Software; (xv)
  408. access or attempt to access SideFX' network, databases, or
  409. systems (other than to download the Software); or (xvi) perform load
  410. tests, network scans, penetration tests, ethical hacks or any other
  411. security auditing procedures on the SideFX network.
  412.  
  413. 4.2. Further Restrictions on Use of Software.  Licensee agrees that it
  414. will not, and will not permit any third party to, directly or
  415. indirectly: (i) Use the Software to conduct any competitive analysis
  416. of or with the Software; (ii) access the Software in order to compete
  417. or build a competitive product or service, or impair the market for
  418. the Software or any part thereof; or (iii) copy any features,
  419. functions, graphics or other component of the Software.
  420.  
  421. 4.3. Restrictions on Open Source Software. Licensee's use of the Open
  422. Source Software is governed by the Open Source Licenses, as
  423. applicable.
  424.  
  425. 5. OWNERSHIP AND RESERVATION OF RIGHTS
  426.  
  427. 5.1. Ownership of Software.  The Software is not sold; it is licensed
  428. to Licensee under the terms and conditions of this Agreement.  SideFX
  429. and its licensors are the owners of the Software, including all
  430. intellectual property rights (including trade secrets rights)
  431. relating thereto. No title to the Software or such rights is
  432. transferred to Licensee by this Agreement.  All rights not expressly
  433. granted pursuant to this Agreement are reserved by SideFX.
  434.  
  435. 5.2. Feedback.  SideFX shall own, and Licensee shall not have
  436. any right, title or interest in, any enhancements or other
  437. modifications to the Software created based on any suggestions,
  438. enhancement requests, recommendations or other feedback provided by or
  439. on behalf of Licensee or Authorized Users.
  440.  
  441. 6. FEES AND PAYMENT
  442.  
  443. 6.1. Fees.  Fees are based upon, among other things: (i) the
  444. applicable License Type; (ii) the characteristics of Licensee; and
  445. (iii) the number of authorized Licenses, whether or not the Licenses
  446. are used.  All fees are payable in full, without deduction or offset,
  447. upon purchase of the Entitlements or Licenses unless otherwise agreed
  448. by the parties, unless SideFX agrees to invoice Licensee, in
  449. which case the applicable fees are payable within the period set out
  450. in the invoice (and if no period is set out in the invoice, within
  451. thirty (30) days of the date on which Licensee receives the invoice).
  452. All fees are non-cancelable and non-refundable.  SideFX may
  453. suspend Use of the Software, without liability to SideFX, in the
  454. event that any amounts payable by Licensee are past due or Licensee is
  455. otherwise in breach of this Agreement.  Entitlements and Licenses for
  456. certain License Types may be provided free of charge.
  457.  
  458. 6.2. Indie Licenses.  The pricing applicable to Indie Licenses is only
  459. available to those individuals or Organizations (the \"Indie User\")
  460. where: (i) such Indie User and its Affiliates and related individuals
  461. collectively have in the current calendar year, or had in the most
  462. recently completed calendar year, directly or indirectly, aggregate
  463. gross revenues from all sources less than US$100,000; and (ii) in the
  464. case of an Indie User that is using the Software to create content for
  465. a third party that will use such content in connection with a
  466. Commercial activity, such third party and its Affiliates and related
  467. individuals collectively have in the current calendar year, or had in
  468. the most recently completed calendar year, directly or indirectly,
  469. aggregate gross revenues from all sources less than US$100,000.  If
  470. Licensee is taking advantage of the pricing applicable to Indie
  471. Licenses, Licensee represents and warrants that it satisfies the
  472. criteria set out in this Section 6.2.
  473.  
  474. 6.3. Taxes.  All fees are exclusive of any Taxes.  If SideFX has
  475. a legal obligation to pay or collect Taxes, the appropriate amount
  476. shall be invoiced to and paid by Licensee, unless Licensee provides
  477. SideFX with an acceptable tax exemption certificate issued by
  478. the appropriate taxing authority.
  479.  
  480. 7. DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY
  481.  
  482. 7.1. Limited Warranty.  SideFX warrants that the Software will
  483. perform substantially in accordance with the applicable SideFX
  484. user documentation (excluding any errors in the documentation, as
  485. determined by SideFX in good faith).  SideFX' entire
  486. responsibility and obligation, and Licensee's exclusive remedy, for
  487. any breach of the foregoing warranty shall be for SideFX to use
  488. commercially reasonable efforts to cause the Software to comply with
  489. such warranty.
  490.  
  491. 7.2. Warranty Disclaimer.  EXCEPT AS PROVIDED IN SECTION 7.1, THE
  492. SOFTWARE IS PROVIDED \"AS IS\" WITHOUT WARRANTY OR CONDITION OF ANY
  493. KIND, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE IN LAW OR EQUITY,
  494. INCLUDING ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE,
  495. NON-INFRINGEMENT, MERCHANTABLE QUALITY, FITNESS FOR A PARTICULAR
  496. PURPOSE OR THOSE ARISING OTHERWISE FROM A COURSE OF DEALING OR USAGE
  497. OF TRADE, ALL OF WHICH ARE SPECIFICALLY DISCLAIMED TO THE MAXIMUM
  498. EXTENT PERMITTED BY LAW. WITHOUT LIMITING THE FOREGOING, SIDEFX
  499. DOES NOT WARRANT THAT: (i) THE SOFTWARE WILL MEET LICENSEE'S NEEDS OR
  500. REQUIREMENTS; ii) THE SOFTWARE WILL RUN WITHOUT INTERRUPTION OR BE
  501. ERROR FREE; (iii) THE SOFTWARE IS IMPENETRABLE OR OTHERWISE MEETS ANY
  502. SECURITY STANDARDS; OR (iv) THE FUNCTIONS CONTAINED IN THE SOFTWARE
  503. WILL OPERATE IN ALL COMBINATIONS WHICH MAY BE SELECTED FOR USE BY
  504. LICENSEE.  FOR PURPOSES OF THIS SECTION 7.2 (BUT NOT FOR PURPOSES OF
  505. SECTION 7.1), REFERENCES TO SOFTWARE INCLUDE THE OPEN SOURCE SOFTWARE.
  506. SIDEFX MAKES NO REPRESENTATIONS OR WARRANTIES, AND THERE ARE NO
  507. CONDITIONS, REGARDING THE OPEN SOURCE SOFTWARE.
  508.  
  509. 7.3. Limitation on Types of Recoverable Damages.  SIDEFX WILL
  510. ONLY BE LIABLE FOR DIRECT DAMAGES, SUBJECT TO SECTION 7.4.  IN NO
  511. EVENT WILL SIDEFX BE LIABLE TO LICENSEE OR ANY OTHER PERSON FOR
  512. ANY LOST PROFITS, LOST OR DAMAGED DATA, OR ANY SPECIAL, INCIDENTAL,
  513. INDIRECT, CONSEQUENTIAL OR PUNITIVE DAMAGES OF ANY KIND, WHETHER BASED
  514. ON BREACH OF CONTRACT OR WARRANTY, TORT (INCLUDING NEGLIGENCE),
  515. PRODUCT LIABILITY OR OTHERWISE, EVEN IF SIDEFX IS INFORMED OR
  516. OTHERWISE HAS KNOWLEDGE OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF
  517. SUCH DAMAGES WERE FORESEEABLE.
  518.  
  519. 7.4. Monetary Cap on Damages.  LICENSEE AGREES THAT THE MAXIMUM
  520. AGGREGATE LIABILITY OF SIDEFX AND ITS AFFILIATES, AND THEIR
  521. RESPECTIVE DIRECTORS, OFFICERS, EMPLOYEES, AGENTS AND REPRESENTATIVES
  522. FOR ALL CLAIMS UNDER ANY AND ALL CIRCUMSTANCES RELATING TO THE
  523. SOFTWARE UNDER ALL THEORIES OF LIABILITY WILL BE LIMITED TO: (I) WITH
  524. RESPECT TO SIDEFX' INDEMNITY OBLIGATION UNDER SECTION 8, THE
  525. FEES PAID TO SIDEFX BY LICENSEE IN RESPECT OF THE INFRINGING
  526. SOFTWARE IN THE TWELVE (12) MONTH PERIOD PRECEDING THE CLAIM IN
  527. RESPECT OF SUCH LIABILITY; AND (II) IN ALL OTHER INSTANCES, THE FEES
  528. PAID TO SIDEFX BY LICENSEE IN RESPECT OF THE APPLICABLE SOFTWARE
  529. IN THE THREE (3) MONTH PERIOD PRECEDING THE CLAIM IN RESPECT OF SUCH
  530. LIABILITY.
  531.  
  532. 7.5. Essential Terms.  The disclaimer of warranties and the limitation
  533. of liability in this Section 7 constitute an essential part of this
  534. Agreement.  A fundamental breach or breach of a fundamental term of
  535. this Agreement by SideFX shall not limit the intended effect of
  536. Section 7 or any other provision of this Agreement which is intended
  537. to limit SideFX' liability.  Licensee acknowledges that, but for
  538. the disclaimer of warranties and limitation of liability, SideFX
  539. would not enter into this Agreement.
  540.  
  541. 8. INTELLECTUAL PROPERTY INFRINGEMENT INDEMNITY
  542.  
  543. 8.1. Indemnity.  Subject to Section 7, if any claim based upon an
  544. alleged direct infringement of a Canadian or American copyright or
  545. trade secret is asserted against Licensee by a third party (other than
  546. an Affiliate of Licensee) by virtue of its Use of the Software in
  547. accordance with this Agreement, SideFX will indemnify Licensee
  548. solely for direct damages (which, for greater certainty, excludes any
  549. accounting of profits) awarded to such third party and which the
  550. Licensee has been ordered to pay as a result of such claim, provided
  551. that SideFX: (i) receives prompt written notice of such claim;
  552. (ii) has the sole and exclusive right, if it chooses, to control and
  553. direct the investigation and the defense or settlement of such claim;
  554. and (iii) receives the reasonable cooperation and assistance of
  555. Licensee as requested by SideFX, at SideFX' expense.
  556.  
  557. 8.2. Exclusions.  SideFX shall have no obligation or liability
  558. under Section 8.1 if the infringement relates to: (i) Use of the
  559. Software other than as expressly authorized under this Agreement; (ii)
  560. the combination, merger or interface of the Software with other
  561. software by Licensee or a third party; or (iii) compliance with any
  562. Licensee instructions or requests.  SideFX shall also have no
  563. obligation or liability under Section 8.1 in connection with any
  564. software or other technology not claimed to be owned by SideFX,
  565. including without limitation, the Open Source Software and any
  566. materials related thereto.
  567.  
  568. 8.3. SideFX Options.  If the Software infringes, or in the
  569. reasonable determination of SideFX is likely to infringe, any
  570. third party's intellectual property rights, SideFX may, at its
  571. option, either: (i) procure for Licensee the right to continue Using
  572. the Software or replace or modify the Software (without loss of
  573. functionality) so that it becomes non-infringing; or (ii) terminate
  574. this Agreement and refund the license fee paid by Licensee less a
  575. reasonable amount for any value received by Licensee.
  576.  
  577. 8.4. Exclusive Remedy.  THE FOREGOING PROVISIONS OF THIS SECTION 8
  578. STATE SIDEFX' ENTIRE LIABILITY AND OBLIGATIONS, AND THE
  579. EXCLUSIVE REMEDY OF LICENSEE, WITH RESPECT TO ANY ACTUAL OR ALLEGED
  580. INFRINGEMENT OF ANY INTELLECTUAL PROPERTY RIGHTS.
  581.  
  582. 9. TERM AND TERMINATION
  583.  
  584. 9.1. Term.  Licensee's right to Use the Software pursuant to any given
  585. License shall terminate at the end of the term for the License Type
  586. associated with such License, as such term is set out in Appendix A to
  587. this Agreement.
  588.  
  589. 9.2. Termination by Licensee for Convenience. Subject to Section 6.1,
  590. Licensee may terminate this Agreement at any time by providing SideFX
  591. with written notice of same and complying with Section 9.4.
  592.  
  593. 9.3. Termination by SideFX.  SideFX may terminate this
  594. Agreement, and therefore the right granted under Section 2.1, upon
  595. notice to Licensee: (i) if Licensee breaches any of the terms and
  596. conditions of this Agreement and, if curable, fails to cure such
  597. breach to the satisfaction of SideFX within fifteen (15) days of
  598. SideFX notifying Licensee of the breach; (ii) if Licensee
  599. breaches any of its payment obligations under this Agreement and fails
  600. to make full payment within ten (10) days of SideFX notifying
  601. Licensee of such breach; (iii) Licensee undergoes a Change of Control
  602. without the prior written consent of SideFX (which consent may
  603. be withheld by SideFX in its sole and absolute discretion); (iv)
  604. Licensee commits any act of bankruptcy, becomes insolvent or admits
  605. its insolvency (as defined or provided for in any applicable statute);
  606. (v) any proceeding, voluntary or involuntary, is commenced respecting
  607. Licensee pursuant to any statute relating to bankruptcy, insolvency,
  608. reorganization of debts, liquidation, winding up or dissolution,
  609. including any proceedings under the Bankruptcy and Insolvency Act, the
  610. Companies' Creditors Arrangement Act or the Winding-Up and
  611. Restructuring Act; (vi) Licensee passes any resolution for its
  612. liquidation, winding up or dissolution; or (vii) Licensee ceases to
  613. carry on business in the ordinary course.
  614.  
  615. 9.4. Licensee Obligations Upon Termination.  Upon receipt by Licensee
  616. of written notice of termination from SideFX, or termination by
  617. Licensee, Licensee shall immediately: (i) unredeem all Entitlements
  618. (i.e. return all Licenses) using the tools provided as part of the
  619. Software; (ii) cease Using the Software; (iii) permanently delete all
  620. installed and back-up copies of the Software; and (iv) within five (5)
  621. days after the date of such termination, provide SideFX with a
  622. written confirmation that Licensee has complied with all of the
  623. foregoing.
  624.  
  625. 9.5. Survival.  The provisions of Sections 2.3 (excluding part (v)),
  626. 3.11, 4 (without limiting the intended effect of Section 9.4), 5, 6,
  627. 7.3, 7.4, 7.5, 9.4, 9.5, 10, 11 (excluding 11.11) and 12 shall survive
  628. termination of this Agreement.  
  629.  
  630. 10. CERTIFICATION AND INSPECTION
  631.  
  632. 10.1. Certification.  Within ten (10) days of a request by SideFX, a
  633. Certification Authority of Licensee shall, after making due inquiry,
  634. certify in writing to SideFX, as applicable: (i) that Licensee (and
  635. in the case of a Global Access License, each applicable Licensee
  636. Affiliate and third party Authorized User) is, and has continuously
  637. been, in full compliance with the terms and conditions of this
  638. Agreement, including all applicable restrictions and limitations on
  639. installation and Use of the Software; or (ii) the extent to which
  640. Licensee (or in the case of a Global Access License, any  applicable
  641. Licensee Affiliate or third party Authorized User) is not, or has not
  642. been, in full compliance with the terms and conditions of this
  643. Agreement, including all applicable restrictions and limitations on
  644. the installation of Licenses and Use of the Software.  Licensee shall
  645. provide such supporting evidencing as SideFX may reasonably request.
  646. \"Certification Authority\" means: (a) Licensee, where Licensee is an
  647. individual; or (b) a senior officer, signing authority or other
  648. senior official of Licensee, where Licensee is an Organization.  For
  649. certainty, failure to provide the certification as required by this
  650. Section is a material breach of this Agreement that entitles SideFX
  651. to terminate this Agreement and to any other remedies that may be
  652. available to SideFX at law or in equity.
  653.  
  654. 10.2. Inspection.  SideFX or its authorized representative may
  655. at any time after written notice to Licensee, electronically or
  656. otherwise, reasonably inspect Licensee's (and in the case of a Global
  657. Access License, each applicable Licensee Affiliate's and third party
  658. Authorized User's) records, systems and facilities  in order to ensure
  659. compliance with this Agreement. Licensee will provide (and in the case
  660. of a Global Access License, ensure that each applicable Licensee
  661. Affiliate and third party Authorized User provides) full cooperation
  662. in connection with any such inspection, including the provision of
  663. such additional documentation and information as SideFX may
  664. reasonably request.  Licensee shall ensure that the agreement between
  665. Licensee and each applicable Licensee Affiliate and third party
  666. Authorized User includes the right for SideFX to perform such
  667. inspections.
  668.  
  669. 10.3. Remediation.  If as a result of a certification pursuant to
  670. Section 10.1, or an inspection pursuant to Section 10.2, SideFX
  671. determines that Licensee's (or in the case of a Global Access License,
  672. any applicable Licensee Affiliate's or third party Authorized User's)
  673. installation of Licenses or Use of the Software is not, or has not
  674. been, in conformity with this Agreement, Licensee shall promptly: (i)
  675. obtain the applicable Entitlement(s) or License(s) from SideFX
  676. required for such installation or Use; (ii) pay the applicable fees in
  677. respect of such License(s) for prior and future Use; and (iii) pay all
  678. reasonable costs and expenses incurred by SideFX in respect of
  679. the certification or inspection, as applicable.
  680.  
  681. 11. MISCELLANEOUS
  682.  
  683. 11.1. Relationship of Parties.  In giving effect to this Agreement,
  684. neither party will be or be deemed an agent of the other for any
  685. purpose and their relationship in law to the other will be that of
  686. independent contractors.  Nothing in this Agreement will constitute a
  687. partnership in law or a joint venture between the parties.  Neither
  688. party will have the right to enter into contracts, pledge the credit
  689. of or incur expenses on behalf of the other.
  690.  
  691. 11.2. No Waiver.  Any waiver of any terms or conditions of this
  692. Agreement will be effective only if in writing and signed by the party
  693. granting such waiver. Such waiver shall be effective only in the
  694. specific instance and for the specific purpose for which it has been
  695. given and shall not be deemed or constitute a waiver of any other
  696. provisions (whether or not similar) nor shall such waiver constitute a
  697. continuing waiver unless otherwise expressly provided.  The failure of
  698. either party to exercise, and any delay in exercising, any of its
  699. rights hereunder, in whole or in part, shall not constitute or be
  700. deemed a waiver or forfeiture of such rights, neither in the specific
  701. instance nor on a continuing basis. No single or partial exercise of
  702. any such right shall preclude any other or further exercise of such
  703. right or the exercise of any other right.
  704.  
  705. 11.3. Severability. If for any reason a court of competent
  706. jurisdiction finds any terms or conditions of this Agreement, or
  707. portion thereof, to be unenforceable, the remainder of this Agreement
  708. will continue in full force and effect.
  709.  
  710. 11.4. Assignment.  Licensee shall not assign or transfer this
  711. Agreement or any of its rights or obligations hereunder (whether in
  712. connection with or as a result of any consolidation, arrangement,
  713. reorganization, amalgamation, acquisition, merger, sale, operation of
  714. law, or otherwise), in whole or in part, without the prior written
  715. consent of SideFX (which consent may be withheld by SideFX
  716. in its sole and absolute discretion).
  717.  
  718. 11.5. Entire Agreement.  This Agreement constitutes the entire
  719. agreement between the parties with respect to the subject matter
  720. hereof, and supersedes and replaces all prior or contemporaneous
  721. understandings or agreements, written or oral, regarding such subject
  722. matter and there are no representations, warranties, conditions or
  723. other agreements between the parties in connection with the subject
  724. matter hereof except as specifically set forth herein.
  725.  
  726. 11.6. Binding Arbitration.  Unless otherwise agreed in writing by the
  727. parties, all disputes relating to this Agreement shall not be
  728. submitted to the courts for resolution, but may be submitted to final
  729. and binding arbitration by either party pursuant to the Arbitration
  730. Act, 1991 (Ontario) (the \"Arbitration Act\"). The arbitration shall be
  731. treated as confidential and will be held in Toronto, Canada.  The
  732. arbitral tribunal shall be composed of one arbitrator (the
  733. \"Arbitrator\").  The party that wishes to initiate the arbitration (the
  734. \"Applicant\") shall deliver a notice to that effect (the \"Notice to
  735. Arbitrate\") to the other party, which notice shall nominate an
  736. individual to act as the Arbitrator.  Within thirty (30) days of the
  737. date of receipt of the Notice to Arbitrate (the \"Response Date\") the
  738. other party (the \"Respondent\") shall, by notice to the Applicant,
  739. either signify its acceptance of the nominee or, in the alternative,
  740. propose an alternative individual to act as the Arbitrator (the
  741. \"Response\").  If the Respondent fails to provide a Response by the
  742. Response Date, the Respondent shall be deemed to have accepted the
  743. Applicant's nominee for Arbitrator.  If the Respondent provides a
  744. Response by the Response Date suggesting an alternative individual to
  745. act as Arbitrator, the Applicant shall within thirty (30) days of the
  746. date of receipt of the Response, by notice to the Respondent, signify
  747. either its acceptance or rejection of the Respondent's nominee for
  748. Arbitrator.  If the Applicant fails to provide notice by such date,
  749. the Applicant shall be deemed to have accepted the Respondent's
  750. nominee for Arbitrator.  If the Applicant provides notice by such date
  751. signifying its rejection of the Respondent's nominee for Arbitrator,
  752. the parties shall use commercially reasonable efforts to cause their
  753. respective nominees to select the Arbitrator.  Any costs associated
  754. with same shall be borne equally by the parties.  If such selection
  755. does not occur within thirty (30) days of the date of the Applicant's
  756. rejection notice, then the Applicant may apply to the Superior Court
  757. of Justice of Ontario for the appointment of an arbitrator pursuant to
  758. the provisions of the Arbitration Act.  The costs of the application
  759. shall be borne equally by the parties.  The parties agree that they
  760. will act reasonably and in good faith to ensure the selection of an
  761. Arbitrator who is objective, independent and suitably qualified to
  762. deal with the dispute.  Upon failure, refusal or inability of the
  763. Arbitrator to act, his or her successor shall be appointed in the same
  764. manner.  The costs of the Arbitration shall be in the discretion of
  765. the Arbitrator.
  766.  
  767. 11.7. Governing Law and Jurisdiction for Resolving Claims.  Subject to
  768. Section 11.6, this Agreement shall be governed by the laws of the
  769. Province of Ontario, Canada and the federal laws of Canada applicable
  770. therein and the parties irrevocably submit to the non-exclusive
  771. jurisdiction of the Ontario courts.  The parties expressly disclaim
  772. the application of the United Nations Convention for the International
  773. Sale of Goods.
  774.  
  775. 11.8. Headings; Sections.  The division of this Agreement into
  776. sections and the insertion of headings are for convenience of
  777. reference only and shall not affect the construction or interpretation
  778. of this Agreement.  References herein to Sections are to sections of
  779. this Agreement.
  780.  
  781. 11.9. Interpretation of \"including\".  Where the word \"include\",
  782. \"includes\" or \"including\" is used in this Agreement, it means
  783. \"include\", \"includes\" or \"including\", in each case, \"without
  784. limitation\".
  785.  
  786. 11.10. Non-Exclusive Remedies.  All remedies provided for under this
  787. Agreement are non-exclusive and are in addition, and without
  788. prejudice, to any other rights as may be available to SideFX,
  789. whether in law or equity.  By electing to pursue a remedy, SideFX
  790. does not waive its right to pursue any other available remedies.
  791.  
  792. 11.11. Export Compliance.  Each party shall comply with the export
  793. laws and regulations of Canada, the United States, and other
  794. applicable jurisdictions in its provision and, in the case of
  795. Licensee, its downloading, installation and Use of, the Software.
  796. Without limiting the foregoing: (i) each of SideFX and Licensee
  797. represents that it is not named on any U.S. government list of person
  798. or entities prohibited from receiving exports; and (ii) Licensee shall
  799. not permit any Person to Use the Software in violation of any U.S.
  800. export embargo, prohibition, or restriction.
  801.  
  802. 11.12. Publicity.  Neither party may issue press releases relating to
  803. this Agreement without the other party's prior written consent, or use
  804. in any manner the name(s), logo(s) or trade-mark(s) of the other party
  805. without such other party's prior written consent.  Each party hereby
  806. consents to the inclusion of its name and logo by the other party
  807. among at least three other companies in lists of customers or vendors
  808. in accordance with the other party's standard guidelines.
  809.  
  810. 11.13. Language.  The parties acknowledge that they have required this
  811. Agreement to be written in English.  Les parties aux présentes
  812. reconnaissent qu'elles ont exigé que la présente entente soit rédigée
  813. en anglais.
  814.  
  815. 11.14. Notice.  Any notice, demand or other communication (in this
  816. Section, a \"notice\") required or permitted to be given or made under
  817. this Agreement will be in writing and will be sufficiently given or
  818. made if: (i) delivered in person during normal business hours of the
  819. recipient on a Business Day and left with a receptionist or other
  820. responsible employee of the recipient; (ii) except during any period
  821. of actual or imminent interruption of postal services due to strike,
  822. lockout or other cause, sent by registered mail; or (iii) sent by
  823. facsimile transmission or other electronic means which produces a
  824. written record of successful transmission, or by email if receipt is
  825. confirmed by the sender's email system.  Notices to Licensee shall be
  826. sent to the most recent address, facsimile number or email address
  827. provided by Licensee to SideFX and to the attention of the
  828. contact person on file with SideFX.  Notices to SideFX
  829. shall be sent to Suite 1401, 123 Front Street West, Toronto, Ontario,
  830. M5J 2M2, or (416) 504-6648 or notices@sidefx.com, to the attention of
  831. Chief Financial Officer.  Each notice sent in accordance with this
  832. Section will be deemed to have been received: (iv) on the day it was
  833. delivered; (v) on the seventh (7th) Business Day after it was mailed
  834. (excluding each day on which there is any interruption of postal
  835. services due to strike, lockout or other cause); (vi) on the same day
  836. that it was sent by facsimile transmission or email provided that it
  837. was sent during normal business hours of the recipient on a Business
  838. Day, otherwise, on the first Business Day thereafter.  Contact
  839. information for notice may be changed by giving notice in accordance
  840. with this Section.  \"Business Day\" means any day of the week except
  841. Saturday, Sunday or any statutory or civic holiday observed in
  842. Toronto, Ontario.
  843.  
  844. 12. DEFINITIONS
  845.  
  846. When used in this Agreement, each of the following terms has the
  847. meaning given to such term below, and grammatical variations of such
  848. terms have corresponding meanings.
  849.  
  850.    \"Affiliate\" of a party means any Person that directly, or
  851.    indirectly through one or more intermediaries, Controls or is
  852.    Controlled by such party, or is Controlled by a Person who also
  853.    Controls such party.
  854.  
  855.    \"Agreement\" means this SideFX Software License Agreement, as
  856.    may be amended in accordance with its terms.
  857.  
  858.    \"Applicant\" has the meaning set out in Section 11.6.
  859.  
  860.    \"Arbitrator\" has the meaning set out in Section 11.6.
  861.  
  862.    \"Arbitration Act\" has the meaning set out in Section 11.6.
  863.  
  864.    \"Authorized Subcontractors\" means third parties sub-contracted by
  865.    Licensee to create content for Licensee.
  866.  
  867.    \"Authorized Users\" means: (i) in the case of all License Types
  868.    other than a Global Access License and a Project License, Licensee
  869.    Personnel; and (ii) in the case of a Global Access License and
  870.    Project License (A) Licensee Personnel, and (B) Licensee Affiliate
  871.    Personnel and employees of Authorized Subcontractors, provided
  872.    that Licensee has given SideFX notice of such Affiliates and
  873.    Authorized Subcontractors, and provided that such Licensee
  874.    Affiliate Personnel and employees of Authorized Subcontractors are
  875.    Using the Software solely to create content for Licensee.
  876.  
  877.    \"Certification Authority\" has the meaning set out in Section 10.1.
  878.  
  879.    \"Change of Control\" of Licensee means a change of the Person or
  880.    Persons that directly or indirectly Control Licensee.
  881.  
  882.    \"Client Computers\" has the meaning set out in Section 3.3.
  883.  
  884.    \"Cloud Service\" means a third party service that provides access
  885.    to a pool of Computers for installation, hosting, processing
  886.    and/or storage of software and/or data, where such Computers are
  887.    outside of the direct physical control and/or ownership of the
  888.    Person obtaining the service and where such Computers may or may
  889.    not be shared by other Persons.
  890.  
  891.    \"Commercial\" means any activity carried on with the intention of,
  892.    or with a view to, generating revenue or other compensation,
  893.    directly or indirectly, or that actually generates revenue or
  894.    other compensation, directly or indirectly.
  895.  
  896.    \"Commercial License\" means any License other than a Non-Commercial
  897.    License, including a License that is any of the following License
  898.    Types: Commercial Workstation License, Indie License, Local Access
  899.    License, Global Access License and Project License.
  900.  
  901.    \"Computer\" means: (i) an electronic device containing one or more
  902.    central processing units that runs an operating system and accepts
  903.    information in digital or similar form and manipulates the
  904.    information for a specific result based on a sequence of
  905.    instructions; or (ii) a software implementation of such a device
  906.    (including virtual machines and other emulation technology); in
  907.    each case that is owned, leased, rented or borrowed by Licensee or
  908.    the Authorized User.
  909.  
  910.    \"Control\" means the possession, directly or indirectly, of the
  911.    power to direct or cause the direction of the management or
  912.    policies of an entity, whether through the ownership of voting
  913.    securities, by contract or otherwise.
  914.  
  915.    \"Entitlement\" means a string of data residing on SideFX'
  916.    systems that the Licensee can redeem (i.e. trade in exchange for a
  917.    License) or un-redeem, using the tools provided as part of the
  918.    Software.
  919.  
  920.    \"Indie User\" has the meaning set out in Section 6.2.
  921.  
  922.    \"License\" means a string of data that is issued upon the
  923.    redemption of an Entitlement, or issued by SideFX directly,
  924.    and that, when installed on a Computer, allows the Software to be
  925.    Used on that Computer.
  926.  
  927.    \"License Server\" has the meaning set out in Section 3.3.
  928.  
  929.    \"License Type\" has the meaning set out in Section 3.1.
  930.  
  931.    \"Licensee\" has the meaning set out in Section 1.1.
  932.  
  933.    \"Licensee Affiliate Personnel\" means the (i) employees (including
  934.    contract employees) of the applicable Licensee Affiliate, (ii)
  935.    third parties subcontracted by the applicable Licensee Affiliate
  936.    to create content for Licensee, (iii) co-op and other students
  937.    engaged by and otherwise working with the applicable Licensee
  938.    Affiliate, and (iv) interns of the applicable Licensee Affiliate.
  939.  
  940.    \"Licensee Personnel\" means: (i) if Licensee is an individual, that
  941.    individual; or (ii) if Licensee is an Organization (A) Licensee's
  942.    employees (including contract employees), (B) independent
  943.    contractors engaged by Licensee, (C) co-op and other students
  944.    engaged by and otherwise working with or for Licensee, and (D)
  945.    Licensee's interns.
  946.  
  947.    \"Network Installation\" has the meaning set out in Section 3.3.
  948.  
  949.    \"Non-Commercial License\" means a License that is any of the
  950.    following License Types: Apprentice License, Education License and
  951.    Evaluation License.
  952.  
  953.    \"Notice to Arbitrator\" has the meaning set forth in Section 11.6.
  954.  
  955.    \"Open Source Software\" and \"Open Source Licenses\" have the
  956.    respective meanings set out in Section 3.11.
  957.  
  958.    \"Orbolt Website\" has the meaning set out in Section 3.10.
  959.  
  960.    \"Organization\" has the meaning set out in Section 1.1.
  961.  
  962.    \"Person\" includes an individual, corporation, partnership, joint
  963.    venture, trust, unincorporated organization, the Crown or any
  964.    agency or instrumentality of the foregoing or any other judicial
  965.    entity recognized by law.
  966.  
  967.    \"Related Materials\" means all materials related to the software
  968.    being installed and all Upgrades, including documentation, user
  969.    manuals, training videos, tutorials and files, provided directly
  970.    or indirectly by SideFX, whether on-line or otherwise.
  971.  
  972.    \"Response\" has the meaning set out in Section 11.6.
  973.  
  974.    \"Response Date\" has the meaning set out in Section 11.6.
  975.  
  976.    \"Respondent\" has the meaning set out in Section 11.6.
  977.  
  978.    \"SideFX\" has the meaning set out in the preamble to this
  979.    Agreement.
  980.  
  981.    \"Software\" has the meaning set out in the preamble to this
  982.    Agreement.
  983.  
  984.    \"Taxes\" means any direct or indirect local, state, provincial,
  985.    federal or foreign taxes, levies, duties or similar government
  986.    charges or assessments of any nature, including sales taxes,
  987.    value-added taxes and withholding taxes, exigible on the
  988.    transaction contemplated by this Agreement.
  989.  
  990.    \"Territory\" means: (a) the country, state, province, municipality
  991.    or other jurisdiction specified in the Transaction Confirmation;
  992.    (b) where no Transaction Confirmation is provided to Licensee and
  993.    Licensee obtains Entitlements(s) through the online process, the
  994.    Territory will be the province (in the case of Canada), state (in
  995.    the case of the United States) or equivalent administrative
  996.    division (in the case of some other country) that corresponds with
  997.    the address confirmed as part of the online purchase verification;
  998.    (c) if no country, state, province, municipality or other
  999.    jurisdiction is specified in the Transaction Confirmation or the
  1000.    online purchase verification, the Territory shall be the province
  1001.    (in the case of Canada), state (in the case of the United States)
  1002.    or equivalent administrative division (in the case of some other
  1003.    country) where Licensee originally installed the License(s).  In
  1004.    the case of a Global Access License, the Territory will be the
  1005.    world.  With respect to non-interactive Use of the Software in the
  1006.    case of a Network Installation, the Territory will be the world.
  1007.  
  1008.    \"Third Party Rendering Software\" has the meaning set out in
  1009.    Section 3.7.
  1010.  
  1011.    \"Transaction Confirmation\" means an invoice issued by SideFX
  1012.    to Licensee in respect of Licensee's licensing of the Software or,
  1013.    where no invoice is issued, the email, quotation or other
  1014.    communication provided by SideFX to Licensee, setting out
  1015.    certain particulars in respect of the licensing of the Software to
  1016.    Licensee, which may include: (i) Licensee's name and contact
  1017.    information; (ii) the Software product being licensed; (iii) the
  1018.    applicable License Type(s); (iv) the fees payable to SideFX;
  1019.    (v) the applicable Territory; (vi) the number of Entitlements
  1020.    and/or Licenses issued or to be issued; (vii) the locations from
  1021.    which the Software may be Used; (viii) the applicable term(s)
  1022.    and/or termination date(s); and/or (xix) any additional
  1023.    restrictions on Use of the Software.
  1024.  
  1025.    \"Updated Agreement\" has the meaning set out in Section 1.3.
  1026.  
  1027.    \"Upgrades\" means all updated and/or upgraded versions of the
  1028.    software being installed that SideFX provides or makes
  1029.    available to Licensee from time to time.
  1030.  
  1031.    \"Usage Purpose\" means: (i) where Licensee is engaged primarily in
  1032.    Commercial activities, the internal requirements of Licensee's
  1033.    business in the ordinary course of such business; and (ii) where
  1034.    Licensee is engaged primarily in non-Commercial activities, the
  1035.    internal requirements of Licensee's ordinary course activities.
  1036.    Notwithstanding the forgoing, the Usage Purpose shall not in
  1037.    either case include the Use of the Software by any Licensee
  1038.    Personnel of an Organization for any personal projects where it is
  1039.    reasonably expected that revenue may be earned.
  1040.  
  1041.    \"Use\", \"Used\" or \"Using\" means: (i) to access, initiate, execute,
  1042.    run, display, view and operate the Software, including to author,
  1043.    modify and run digital assets; and (ii) in the case of the Related
  1044.    Materials only, to review and print.
  1045.  
  1046.    \"Work Station Installation\" has the meaning set out in Section
  1047.    3.4.
  1048.  
  1049. APPENDIX A
  1050.  
  1051.                    TERMS AND CONDITIONS OF LICENSE TYPES
  1052.          (capitalized terms used below are defined in the Agreement)
  1053.  
  1054. Trial License Type
  1055.    Permitted Use
  1056.     The Software may be Used only for non-Commercial purposes. The
  1057.     Software may not be Used to generate any work product that
  1058.     will be used in any Commercial manner.
  1059.  
  1060.     Only Licensee Personnel can Use the Software.
  1061.    Installation
  1062.     For each License issued, Licensee may install the License and
  1063.     Use the Software only pursuant to a Workstation Installation.
  1064.    License Relocation
  1065.     No relocating of the License is permitted.
  1066.    Dedicated Computer / License Server Relocation
  1067.     No relocations permitted.
  1068.    Term
  1069.     Fifteen (15) days from the License Activation Date.
  1070.  
  1071. Education License Type
  1072.    Permitted Use
  1073.     The Software may be Used only for: (A) purposes directly
  1074.     related to learning, teaching, training and research that are
  1075.     part of the instructional functions performed by a formal
  1076.     educational institution, such as a degree-granting or
  1077.     certificate-granting college or university, or any other
  1078.     dedicated learning, teaching or training facility; or (B)
  1079.     training and education purposes by a Licensee engaged in
  1080.     Commercial activities. The Software may not be Used to
  1081.     generate any work product that will be used in any Commercial
  1082.     manner.
  1083.  
  1084.     Only Licensee Personnel can Use the Software.
  1085.    Installation
  1086.     Licensee may (A) for each License issued, install the License
  1087.     and Use the Software pursuant to a Workstation Installation,
  1088.     or (B) if multiple Licenses are issued for the purpose of
  1089.     usage on a network, install the Licenses and Use the Software
  1090.     pursuant to a Network Installation.
  1091.    License Relocation
  1092.     Licensee may relocate the License from the dedicated Computer
  1093.     or a License Server, as applicable, to another Computer (in
  1094.     which case such Computer would then be the dedicated Computer
  1095.     or the License Server, as applicable) only (A) within the
  1096.     Territory, (B) within a one hundred (100) kilometre radius of
  1097.     where the dedicated Computer or License Server was located
  1098.     when the License was originally installed, and (C) upon prior
  1099.     written notice to SideFX.  A maximum of one (1) such
  1100.     relocation is permitted without paying the applicable
  1101.     relocation fee to SideFX. (*)
  1102.    Dedicated Computer / License Server Relocation
  1103.     Licensee may relocate the dedicated Computer only (A) within
  1104.     the Territory, (B) to a location within a one hundred (100)
  1105.     kilometre radius of where the dedicated Computer was located
  1106.     when the License was originally installed, and (C) upon the
  1107.     prior written consent of SideFX (which consent may be
  1108.     withheld by SideFX in its sole and absolute discretion).
  1109.    Term
  1110.     Three hundred and sixty five (365) days from the License
  1111.     Activation Date.
  1112.  
  1113. Evaluation License Type
  1114.    Permitted Use
  1115.     The Software may be Used only for purposes of internal
  1116.     evaluation and demonstration of the capabilities of the
  1117.     Software by and to Authorized Users.  The Software may not be
  1118.     Used to generate any work product that will be used in any
  1119.     Commercial manner.
  1120.  
  1121.     Only Licensee Personnel can Use the Software, unless otherwise
  1122.     agreed by SideFX and set out in the Transaction
  1123.     Confirmation.
  1124.    Installation
  1125.     Licensee may (A) for each License issued, install the License
  1126.     and Use the Software pursuant to a Workstation Installation,
  1127.     or (B) if multiple Licenses are issued for the purpose of
  1128.     usage on a network, install the Licenses and Use the Software
  1129.     pursuant to a Network Installation.
  1130.    License Relocation
  1131.     Licensee may relocate the License from the dedicated Computer
  1132.     or a License Server, as applicable, to another Computer (in
  1133.     which case such Computer would then be the dedicated Computer
  1134.     or the License Server, as applicable) only (A) within the
  1135.     Territory, and (B) upon prior written notice to SideFX.
  1136.     A maximum of one (1) such relocation is permitted without
  1137.     paying the applicable relocation fee to SideFX.  (*)
  1138.    Dedicated Computer / License Server Relocation
  1139.     Licensee may relocate the dedicated Computer only (A) within
  1140.     the Territory, and (B) upon the prior written consent of
  1141.     SideFX (which consent may be withheld by SideFX in its sole
  1142.     and absolute discretion).
  1143.    Term
  1144.     Thirty (30) days from the License Activation Date.
  1145.  
  1146. Commercial Workstation License Type
  1147.    Permitted Use
  1148.     The Software may be Used for Commercial or non-Commercial
  1149.     purposes.
  1150.  
  1151.     Only Licensee Personnel can Use the Software.
  1152.  
  1153.     The number of Licenses available to Licensee and its
  1154.     Affiliates is limited to a maximum of five (5), unless
  1155.     otherwise agreed by SideFX.
  1156.    Installation
  1157.     For each License issued, Licensee may install the License and
  1158.     Use the Software only pursuant to a Workstation Installation.
  1159.    License Relocation
  1160.     Licensee may relocate the License from the dedicated Computer
  1161.     to another Computer (in which case such Computer would then be
  1162.     the dedicated Computer) only (A) within the Territory, (B)
  1163.     within a one hundred (100) kilometre radius of where the
  1164.     dedicated Computer was located when the License was originally
  1165.     installed, and (C) upon prior written notice to SideFX.
  1166.     A maximum of two (2) such relocations in any rolling seven
  1167.     hundred and fifty (750) day period is permitted without paying
  1168.     the applicable relocation fee to SideFX. (*)
  1169.    Dedicated Computer / License Server Relocation
  1170.     Licensee may relocate the dedicated Computer only (A) within
  1171.     the Territory, (B) to a location within a one hundred (100)
  1172.     kilometre radius of where the dedicated Computer was located
  1173.     when the License was originally installed, and (C) upon the
  1174.     prior written consent of SideFX (which consent may be
  1175.     withheld by SideFX in its sole and absolute discretion).
  1176.  
  1177.     Notwithstanding the foregoing paragraph and part (b) of
  1178.     Section 2.1 of the Agreement, if Licensee is an individual
  1179.     freelance worker who is self-employed and does not have an
  1180.     affiliation or long-term (i.e.  longer than nine (9) months)
  1181.     contractual arrangement with any particular Organization,
  1182.     Licensee may relocate the dedicated Computer and Use the
  1183.     Software anywhere in the world in order to provide freelance
  1184.     services to third parties.
  1185.    Term
  1186.     Starting from the License Activation Date and ending on: (i)
  1187.     the termination date as set out in the Transaction
  1188.     Confirmation; or (ii) if there is no Transaction Confirmation,
  1189.     the termination date selected upon purchase of the applicable
  1190.     License.
  1191.  
  1192. Indie License Type
  1193.    Permitted Use
  1194.     The Software may be Used for Commercial purposes, subject to
  1195.     the revenue limitations set out in Section 6.2 of the
  1196.     Agreement.
  1197.  
  1198.     An Indie User and its Affiliates and related individuals,
  1199.     collectively, may have or Use a maximum of three (3) purchased
  1200.     Indie Licenses at any given time.
  1201.  
  1202.     SideFX may elect to issue one supplementary License with each
  1203.     purchased Indie License in order to enable the Indie User to
  1204.     use The Software on a dual-boot Computer or a second Computer.
  1205.     The supplementary License may only be Used by the same Indie
  1206.     User using the corresponding purchased Indie License.
  1207.    Installation
  1208.     For each License issued, Licensee may install the License and
  1209.     Use the Software only pursuant to a Workstation Installation.
  1210.    License Relocation
  1211.     Licensee may relocate the License from the dedicated Computer
  1212.     to another Computer (in which case such Computer would then be
  1213.     the dedicated Computer) only (A) within the Territory, and (B)
  1214.     within a one hundred (100) kilometre radius of where the
  1215.     dedicated Computer was located when the License was originally
  1216.     installed.  A maximum of one (1) such relocation is permitted
  1217.     without paying the applicable relocation fee to SideFX.
  1218.     (*)
  1219.    Dedicated Computer / License Server Relocation
  1220.     Licensee may relocate the dedicated Computer only (A) within
  1221.     the Territory, and (B) to a location within a one hundred
  1222.     (100) kilometre radius of where the dedicated Computer was
  1223.     located when the License was originally installed.
  1224.  
  1225.     Notwithstanding the foregoing paragraph and part (b) of
  1226.     Section 2.1 of the Agreement, if Licensee is an individual
  1227.     freelance worker who is self-employed and does not have an
  1228.     affiliation or long-term (i.e.  longer than nine (9) months)
  1229.     contractual arrangement with any particular Organization,
  1230.     Licensee may relocate the dedicated Computer and Use the
  1231.     Software anywhere in the world in order to provide freelance
  1232.     services to third parties.  
  1233.    Term
  1234.     Three hundred and sixty five (365) days or seven hundred and
  1235.     thirty (730) days from the License Activation Date.
  1236.  
  1237. Local Access License Type
  1238.    Permitted Use
  1239.     The Software may be Used for Commercial or non-Commercial
  1240.     purposes.
  1241.  
  1242.     Only Licensee Personnel can Use the Software
  1243.    Installation
  1244.     Licensee may install the Licenses and Use the Software only
  1245.     pursuant to a Network Installation.
  1246.    License Relocation
  1247.     Licensee may relocate the Licenses from a License Server to
  1248.     another Computer (in which case such Computer would then be
  1249.     the License Server) only (A) within the Territory, (B) within
  1250.     a one hundred (100) kilometre radius of where the License
  1251.     Server was located when the License was originally installed,
  1252.     and (C) upon prior written notice to SideFX.   A maximum
  1253.     of two (2) such relocations in any rolling seven hundred and
  1254.     fifty (750) day period is permitted without paying the
  1255.     applicable relocation fee to SideFX, and is permitted
  1256.     solely when the License Server is being replaced or upgraded.
  1257.     (*)
  1258.    Dedicated Computer / License Server Relocation
  1259.     Licensee may relocate a License Server only (A) within the
  1260.     Territory, (B) to a location within a one hundred (100)
  1261.     kilometre radius of where the License Server was located when
  1262.     the License was originally installed, and (C) upon the prior
  1263.     written consent of SideFX (which consent may be withheld
  1264.     by SideFX in its sole and absolute discretion).
  1265.  
  1266.     Licensee may relocate a Client Computer only (A) within the
  1267.     Territory, (B) to a location within a one hundred (100)
  1268.     kilometre radius of where the License Server, and (C) upon the
  1269.     prior written consent of SideFX (which consent may be
  1270.     withheld by SideFX in its sole and absolute discretion).
  1271.     Part (B) of this paragraph shall not apply to any Client
  1272.     Computer that is used solely for non-interactive Use of the
  1273.     Software.
  1274.    Term
  1275.     Starting from the License Activation Date and ending on the
  1276.     termination date as set out in the Transaction Confirmation.
  1277.  
  1278. Global Access License Type
  1279.    Permitted Use
  1280.     The Software may be Used for Commercial or non-Commercial
  1281.     purposes.  
  1282.  
  1283.     The Software can be Used by (A) Licensee Personnel, and (B)
  1284.     Licensee Affiliate Personnel and employees of Authorized
  1285.     Subcontractors (subject to the additional requirements and
  1286.     limitations set out in the definition of Authorized Users in
  1287.     Section 12 of the Agreement).
  1288.    Installation
  1289.     Licensee may install the Licenses and Use the Software only
  1290.     pursuant to a Network Installation.
  1291.    License Relocation
  1292.     No restrictions on the relocation of Licenses.
  1293.    Dedicated Computer / License Server Relocation
  1294.     No restrictions on the relocation of License Servers or Client
  1295.     Computers
  1296.    Term
  1297.     Starting from the License Activation Date and ending on the
  1298.     termination date as set out in the Transaction Confirmation.
  1299.  
  1300. Project License Type
  1301.    Permitted Use
  1302.     The Software may be Used for Commercial or non-Commercial
  1303.     purposes and solely for purposes of creating content for the
  1304.     project as described in the Transaction Confirmation (the
  1305.     \"Project\") by up to the number of Authorized Users set out in
  1306.     the Transaction Confirmation.
  1307.  
  1308.     The Software can be Used by (A) Licensee Personnel, and (B)
  1309.     Licensee Affiliate Personnel and employees of Authorized
  1310.     Subcontractors (subject to the additional requirements and
  1311.     limitations set out in the definition of Authorized Users in
  1312.     Section 12 of the Agreement).
  1313.    Installation
  1314.     Licensee may install the Licenses and Use the Software only
  1315.     pursuant to a Network Installation.
  1316.    License Relocation
  1317.     No restrictions on the relocation of Licenses.
  1318.    Dedicated Computer / License Server Relocation
  1319.     No restrictions on the relocation of License Servers or Client
  1320.     Computers.
  1321.    Term
  1322.     Starting from the License Activation Date and ending on the
  1323.     earlier of: (A) the date that the Project is completed as
  1324.     evidenced by the film, game or other product being made
  1325.     Commercially available; and (B) the outside date set out in
  1326.     the Transaction Confirmation.
  1327.  
  1328. (*) For greater certainty, SideFX reserves the right to decline
  1329. to consent to any relocation of the License from the dedicated
  1330. Computer or License Server beyond the number expressly permitted
  1331. above, in its sole and absolute discretion.
  1332.  
  1333. (**) For all License Types, interactive use of the Software is
  1334. permitted only on a non-concurrent basis (as further described in
  1335. Section 3.6 of the Agreement) and Use of the Software is otherwise
  1336. subject to the restrictions and limitations set out in Sections 3 and
  1337. 4 of the Agreement.
  1338.  
  1339. (***) Note: The terms \"Agreement\", \"Authorized Users\", \"Commercial\",
  1340. \"Computer\", \"License(s)\", \"License Activation Date\", \"Licensee
  1341. Personnel\", \"Software\", \"Territory\", \"Transaction Confirmation\", and
  1342. \"Used\" have the meaning set out in Section 12 of the Agreement.  The
  1343. terms \"License Server\" and \"Network Installation\" have the meaning set
  1344. out in Section 3.3 of the Agreement. The term \"Workstation
  1345. Installation\" has the meaning set out in Section 3.4 of the Agreement.
  1346. The terms \"Licensee\" and \"Organization\" have the meaning set out in
  1347. Section 1.1 of the Agreement. The term \"SideFX\" has the meaning
  1348. set out in the preamble to the Agreement.
  1349.  
  1350. "
  1351. VER_MM="${VER_MAJOR}.${VER_MINOR}"
  1352. VER_MMB="${VER_MM}.${VER_BUILD}"
  1353. SIZE_HOUDINI="${SIZE_HOUDINI:-0}"
  1354. SIZE_LICENSE="${SIZE_LICENSE:-0}"
  1355. SIZE_ENGINE_MAYA="${SIZE_ENGINE_MAYA:-0}"
  1356. SIZE_ENGINE_UNITY="${SIZE_ENGINE_UNITY:-0}"
  1357. SIZE_HQUEUE="${SIZE_HQUEUE:-0}"
  1358.  
  1359. SIZE_HOUDINI_MB=`echo "scale=1;$SIZE_HOUDINI/1024" | bc`
  1360. SIZE_LICENSE_MB=`echo "scale=1;$SIZE_LICENSE/1024" | bc`
  1361. SIZE_ENGINE_MAYA_MB=`echo "scale=1;$SIZE_ENGINE_MAYA/1024" | bc`
  1362. SIZE_ENGINE_UNITY_MB=`echo "scale=1;$SIZE_ENGINE_UNITY/1024" | bc`
  1363. SIZE_HQUEUE_MB=`echo "scale=1;$SIZE_HQUEUE/1024" | bc`
  1364. SIZE_HQUEUE_CLIENT_MB=`echo "scale=1;$SIZE_HQUEUE_CLIENT/1024" | bc`
  1365.  
  1366. INSTALL_ERROR=0
  1367. LINUX_MIN=2.6
  1368.  
  1369. HFS_LOCATION="/opt/hfs${VER_MMB}"
  1370. hfsFileList="houdini_filelist"
  1371. hfsSymlinkList="houdini_symlinklist"
  1372. pythonFileList="python_filelist"
  1373. engineMayaFileList="engine_maya_filelist"
  1374. engineUnityFileList="engine_unity_filelist"
  1375. binSymlinkList=("hkey" "houdini" "hython" "mantra")
  1376.  
  1377. #-------------------------------------------------------------------------
  1378. installHoudini="yes"     # houdini + libs
  1379. if [ "$EUID" = 0 ]; then
  1380.     licenseServer="yes"  # License Server
  1381.     localLicensing="no"  # Use local licensing mode
  1382. else
  1383.     licenseServer="no"   # License Server
  1384.     localLicensing="yes" # Use local licensing mode
  1385. fi
  1386. installEngineMaya="no"
  1387. installEngineUnity="no"
  1388. makeDirectory="no"   # Create the specified directory if it doesn't exist
  1389. installHQueue="no"   # Install HQueue server
  1390. hqServerDir=""
  1391. createHQSharedDir=""
  1392. hqSharedDir=""
  1393. hqMountPoint=""
  1394. upgradeHQIfExists=""
  1395. installHQueueClient="no" # Install HQueue client
  1396. hqClientDir=""
  1397. hqServerName=""
  1398. hqServerPort=""
  1399. hqMountSharedDir=""
  1400. desktopMenu="yes"
  1401. binSymlink="no"
  1402. hfsSymlink="yes"
  1403. acceptedEULA="no"    # Has the EULA been accepted?
  1404. checkRoot="yes"
  1405.  
  1406. autoInstall="no"    # Install things automatically?
  1407.  
  1408. cc="\c"; nn=
  1409. test "`echo -n X`" = "X" && {
  1410.    nn=-n; cc=
  1411. }
  1412.  
  1413. #-------------------------------------------------------------------------
  1414. copy_file_to_dir()
  1415. {
  1416.     src_file="$1"
  1417.     dst_dir="$2"
  1418.  
  1419.     if [ ! -e "$dst_dir" ]
  1420.     then
  1421.     mkdir -p "$dst_dir" || return 1
  1422.     fi
  1423.  
  1424.     if [ ! -d "$dst_dir" -o ! -w "$dst_dir" ]
  1425.     then
  1426.     return 1
  1427.     fi
  1428.  
  1429.     cp "$src_file" "$dst_dir" || return 1
  1430.  
  1431.     return 0
  1432. }
  1433.  
  1434. #-------------------------------------------------------------------------
  1435. clean_up()
  1436. {
  1437.     ERROR="$1"
  1438.     case "$ERROR" in
  1439.     0)  
  1440.     if [ "$installHoudini" = "yes" ]; then
  1441.         echo "
  1442.    
  1443.    Houdini $VER_MM Installation completed.
  1444.    "
  1445.         echo "
  1446.    Please read $HFS_LOCATION/Readme.txt
  1447.    for instructions on how to run Houdini.
  1448.    "
  1449.     fi
  1450.     if [ "$INSTALL_ERROR" != 0 ]; then
  1451.         echo "*** NOTE ***
  1452.    Some install errors seem to have occurred.
  1453.    Your installation may not be complete.
  1454.    Please correct any serious problems and re-install if necessary.
  1455.    "
  1456.     fi
  1457.     echo ""
  1458.     echo "We hope you enjoy using Houdini $VER_MM"
  1459.     echo "Thank you."
  1460.     ;;
  1461.  
  1462.     1)  echo "Error creating installation directory."
  1463.     echo "Nothing was installed."
  1464.     ;;
  1465.  
  1466.     2)  echo "Nothing was installed."
  1467.     ;;
  1468.  
  1469.     3)  echo "$0: Fatal Error: couldn't locate distribution directory."
  1470.     echo "(Could not find houdini.tar.gz or houdini.tar)"
  1471.     echo ""
  1472.     echo "Nothing was installed."
  1473.     ;;
  1474.  
  1475.     4)  echo "You must agree to the license to install this software."
  1476.     ;;
  1477.     esac
  1478.     do_wait
  1479.     exit $ERROR
  1480. }
  1481.  
  1482. #-------------------------------------------------------------------------
  1483. wait_for_license_acceptance()
  1484. {
  1485.     while : ; do
  1486.        echo $nn "Do you agree to the above license terms? [yes or no] $cc"
  1487.        read ans
  1488.        case $ans in
  1489.        yes|YES|Yes)
  1490.         break
  1491.         ;;
  1492.        no|NO|No)
  1493.         clean_up 4
  1494.         break
  1495.         ;;
  1496.        *) echo "Enter yes or no"
  1497.         ;;
  1498.        esac
  1499.     done
  1500. }
  1501.  
  1502. #-------------------------------------------------------------------------
  1503. accept_license_agreement()
  1504. {
  1505.     echo $nn "$AGREEMENT_TEXT" | "$PAGER"
  1506.     wait_for_license_acceptance
  1507.     acceptedEULA="yes"
  1508. }
  1509.  
  1510. #-------------------------------------------------------------------------
  1511. accept_alphabeta_license_agreement()
  1512. {
  1513.     echo $nn "$AGREEMENT_ALPHABETA_TEXT" | "$PAGER"
  1514.     wait_for_license_acceptance
  1515. }
  1516.  
  1517. #-------------------------------------------------------------------------
  1518. check_pwd()
  1519. {
  1520.     for d in "$PWD" "$(dirname "$0")"; do
  1521.     if [ -f "$d/houdini.tar.gz" -o -f "$d/houdini.tar" ]; then
  1522.         export SRC="$(cd "$d" && pwd)"
  1523.         return
  1524.     fi
  1525.     done
  1526.     clean_up 3
  1527. }
  1528.  
  1529. #-------------------------------------------------------------------------
  1530. check_os()
  1531. {
  1532.     OS=`uname -s`
  1533.     REL=`uname -r`
  1534.     ARCH=`uname -m`
  1535.     OS_WARNINGS=""
  1536.     REL_MIN=0
  1537.     if [ "$OS" = "Linux" ]; then
  1538.     REL_MIN="$LINUX_MIN"
  1539.     else
  1540.     OS_WARNINGS+="
  1541.        This Houdini installer is built for Linux operating systems,
  1542.        but your computer is ${OS:-Unknown operating system}. You should download the correct
  1543.     installer for your operating system."
  1544.     fi
  1545.     if [ "$ARCH" != "$BUILD_ARCH" ]; then
  1546.     OS_WARNINGS+="
  1547.        This Houdini installer is built for $BUILD_ARCH operating systems,
  1548.        but your computer is ${ARCH:-unknown architecture}. You should download the correct
  1549.        installer for your computer architecture."
  1550.     fi
  1551.     if [ $REL_MIN != 0 ]; then
  1552.     TOO_LOW=0
  1553.     i=1
  1554.     while (true); do
  1555.         r1=`echo $REL_MIN | cut -d"." -f$i`
  1556.         r2=`echo $REL | cut -d"." -f$i`
  1557.         if [ "$r1" = "" -o "$r2" = "" ]; then
  1558.         break
  1559.         fi
  1560.         if [ "$r2" -lt "$r1" ]; then
  1561.         TOO_LOW=1
  1562.         break
  1563.         fi
  1564.         # If this version is newer than the minimum, don't compare the
  1565.         # sub portions.
  1566.         if [ "$r2" -gt "$r1" ]; then
  1567.         break
  1568.         fi
  1569.         i=$(($i+1))
  1570.     done
  1571.     if [ "$TOO_LOW" = "1" ]; then
  1572.         OS_WARNINGS+="
  1573.        Your operating system version is lower than release $REL_MIN.
  1574.        Houdini $VER_MM is not guaranteed to operate correctly on
  1575.        $OS revisions lower than release ${REL_MIN}."
  1576.     fi
  1577.     fi
  1578.     if [ "$OS_WARNINGS" != "" ]; then
  1579.     while : ; do
  1580.        test -t 1 && clear
  1581.        echo $nn "
  1582.        WARNING:$OS_WARNINGS
  1583.  
  1584.        Do you wish to continue (y or n) [y] ==> $cc"
  1585.        read ans
  1586.        case $ans in
  1587.        ""|y|Y|yes|YES|Yes)
  1588.         break
  1589.         ;;
  1590.        n|N|no|NO|No)
  1591.         clean_up 2
  1592.         break
  1593.         ;;
  1594.        QUIT|quit|Q|Quit|q)
  1595.         clean_up 2
  1596.         ;;
  1597.    
  1598.        *) echo "Enter yes, no or Quit"
  1599.         ;;
  1600.        esac
  1601.     done
  1602.     fi
  1603. }
  1604.  
  1605. #-------------------------------------------------------------------------
  1606. check_root()
  1607. {
  1608.     if [ "$EUID" -ne 0 -a "$checkRoot" = "yes" ]; then
  1609.     ERROR=""
  1610.     while true; do
  1611.         test -t 1 && clear
  1612.         echo $nn "
  1613.        SIDE EFFECTS SOFTWARE HOUDINI ${VER_MMB} INSTALLATION
  1614.  
  1615.    The installer is not being run as root.  You may not be able to
  1616.    install the desired features unless the installer is run as root.
  1617.    ${ERROR}
  1618.    Re-run installer as root (y or n) ==> $cc"
  1619.         read ans
  1620.         case $ans in
  1621.         y|Y|YES|Yes|yes)
  1622.         sudo "$0" "$@"
  1623.         exit $?
  1624.         ;;
  1625.         n|N|NO|No|no)
  1626.         break
  1627.         ;;
  1628.         q|Q|QUIT|quit|Quit)
  1629.         clean_up 2
  1630.         ;;
  1631.         *) ERROR="
  1632.    Enter yes, no or Quit
  1633. "
  1634.         ;;
  1635.         esac
  1636.     done
  1637.     fi
  1638. }
  1639.  
  1640. #-------------------------------------------------------------------------
  1641. compute_space()
  1642. {
  1643.     DISK_REQ=0
  1644.     if [ "$installHoudini" = "yes" ]; then
  1645.     DISK_REQ=`expr $DISK_REQ + $SIZE_HOUDINI`
  1646.     fi
  1647.     if [ "$licenseServer" = "yes" ]; then
  1648.     DISK_REQ=`expr $DISK_REQ + $SIZE_LICENSE`
  1649.     fi
  1650.     if [ "$installEngineMaya" = "yes" ]; then
  1651.     DISK_REQ=`expr $DISK_REQ + $SIZE_ENGINE_MAYA`
  1652.     fi
  1653.     if [ "$installEngineUnity" = "yes" ]; then
  1654.     DISK_REQ=`expr $DISK_REQ + $SIZE_ENGINE_UNITY`
  1655.     fi
  1656.     DISK_MB=`expr \( $DISK_REQ + 500 \) / 1000`
  1657. }
  1658.  
  1659. #-------------------------------------------------------------------------
  1660. check_constraints()
  1661. {
  1662.     if [ "$installHoudini" = "no" ]; then
  1663.     localLicensing="no"
  1664.     desktopMenu="no"
  1665.     installEngineMaya="no"
  1666.     installEngineUnity="no"
  1667.     binSymlink="no"
  1668.     hfsSymlink="no"
  1669.     fi
  1670.     if [ "$licenseServer" = "yes" ]; then
  1671.     localLicensing="no"
  1672.     fi
  1673. }
  1674.  
  1675. #-------------------------------------------------------------------------
  1676. inst_menu()
  1677. {
  1678.     compute_space
  1679.  
  1680.     choiceCount=0
  1681.  
  1682.     choiceDescriptions[$choiceCount]="Houdini"
  1683.     choiceSizes[$choiceCount]="(${SIZE_HOUDINI_MB}Mb)"
  1684.     choiceToggles[$choiceCount]="installHoudini"
  1685.     let choiceCount++
  1686.     installHoudiniChoice=$choiceCount
  1687.  
  1688.     choiceDescriptions[$choiceCount]="Desktop Menus for Houdini"
  1689.     choiceSizes[$choiceCount]=""
  1690.     choiceToggles[$choiceCount]="desktopMenu"
  1691.     let choiceCount++
  1692.     desktopMenuChoice=$choiceCount
  1693.  
  1694.     choiceDescriptions[$choiceCount]="Symlinks in /usr/local/bin"
  1695.     choiceSizes[$choiceCount]=""
  1696.     choiceToggles[$choiceCount]="binSymlink"
  1697.     let choiceCount++
  1698.     binSymlinkChoice=$choiceCount
  1699.  
  1700.     choiceDescriptions[$choiceCount]="Symlink /opt/hfs${VER_MM} to install directory"
  1701.     choiceSizes[$choiceCount]=""
  1702.     choiceToggles[$choiceCount]="hfsSymlink"
  1703.     let choiceCount++
  1704.     hfsSymlinkChoice=$choiceCount
  1705.  
  1706.     choiceDescriptions[$choiceCount]="Apprentice Licensing (Local Licensing)"
  1707.     choiceSizes[$choiceCount]=""
  1708.     choiceToggles[$choiceCount]="localLicensing"
  1709.     let choiceCount++
  1710.     localLicensingChoice=$choiceCount
  1711.  
  1712.     choiceDescriptions[$choiceCount]="Commercial Licensing (License Server)"
  1713.     choiceSizes[$choiceCount]="(${SIZE_LICENSE_MB}Mb)"
  1714.     choiceToggles[$choiceCount]="licenseServer"
  1715.     let choiceCount++
  1716.     licenseServerChoice=$choiceCount
  1717.  
  1718.     if [ "${SIZE_ENGINE_MAYA}" != "-1" ]; then
  1719.     choiceDescriptions[$choiceCount]="Houdini Engine for Maya"
  1720.     choiceSizes[$choiceCount]="(${SIZE_ENGINE_MAYA_MB}Mb)"
  1721.     choiceToggles[$choiceCount]="installEngineMaya"
  1722.     let choiceCount++
  1723.     installEngineMayaChoice=$choiceCount
  1724.     else
  1725.     installEngineMayaChoice=-1
  1726.     fi
  1727.  
  1728.     if [ "${SIZE_ENGINE_UNITY}" != "-1" ]; then
  1729.     choiceDescriptions[$choiceCount]="Houdini Engine for Unity"
  1730.     choiceSizes[$choiceCount]="(${SIZE_ENGINE_UNITY_MB}Mb)"
  1731.     choiceToggles[$choiceCount]="installEngineUnity"
  1732.     let choiceCount++
  1733.     installEngineUnityChoice=$choiceCount
  1734.     else
  1735.     installEngineUnityChoice=-1
  1736.     fi
  1737.  
  1738.     choiceDescriptions[$choiceCount]="HQueue Server"
  1739.     choiceSizes[$choiceCount]="(${SIZE_HQUEUE_MB}Mb)"
  1740.     choiceToggles[$choiceCount]="installHQueue"
  1741.     let choiceCount++
  1742.     installHQueueChoice=$choiceCount
  1743.  
  1744.     choiceDescriptions[$choiceCount]="HQueue Client"
  1745.     choiceSizes[$choiceCount]="(${SIZE_HQUEUE_CLIENT_MB}Mb)"
  1746.     choiceToggles[$choiceCount]="installHQueueClient"
  1747.     let choiceCount++
  1748.     installHQueueClientChoice=$choiceCount
  1749.  
  1750. while : ; do
  1751.     test -t 1 && clear
  1752.     echo "
  1753.                    HOUDINI $VER_MMB INSTALLATION
  1754.  
  1755.        Enter a number to toggle an item to be installed.
  1756.  
  1757.                                                                  INSTALL
  1758.                                                                  ======="
  1759.     i=0
  1760.     while [ "$i" -lt "$choiceCount" ]; do
  1761.     printf "       %2d. %-42s %12s %4s\n" "$((i+1))" "${choiceDescriptions[$i]}" "${choiceSizes[$i]}" "${!choiceToggles[$i]}"
  1762.     let i++
  1763.     done
  1764.  
  1765.     echo $nn "
  1766.        D. Change installation directory ($HFS_LOCATION)
  1767.        F. Finished selections, proceed to next step
  1768.        Q. Quit (no installation will be attempted)
  1769.  
  1770.        $ERROR
  1771.  
  1772.        Note that the Houdini Development Kit (HDK) is installed as part
  1773.        of the full Houdini installation (selection 1 above).
  1774.  
  1775.        Current total space requirement: $DISK_MB Mb
  1776.        What is your selection (1-$choiceCount,D,F,Q) [F] ==> $cc"
  1777.    
  1778.     read choice
  1779.  
  1780.     ERROR=""
  1781.  
  1782.     # We're toggling choices here
  1783.     handledChoice="no"
  1784.     if [ "${SIZE_ENGINE_MAYA}" != "-1" \
  1785.     -a "$choice" == "$installEngineMayaChoice" ]; then
  1786.     if [ "$installHoudini" = "yes" ]; then
  1787.         if [ "$installEngineMaya" = "yes" ]; then
  1788.         installEngineMaya="no"
  1789.         else
  1790.         installEngineMaya="yes"
  1791.         fi
  1792.     else
  1793.         ERROR="You must install Houdini in order to install Maya plug-in for Houdini Engine."
  1794.     fi
  1795.     handledChoice="yes"
  1796.     fi
  1797.  
  1798.     if [ "${SIZE_ENGINE_Unity}" != "-1" \
  1799.     -a "$choice" == "$installEngineUnityChoice" ]; then
  1800.     if [ "$installHoudini" = "yes" ]; then
  1801.         if [ "$installEngineUnity" = "yes" ]; then
  1802.         installEngineUnity="no"
  1803.         else
  1804.         installEngineUnity="yes"
  1805.         fi
  1806.     else
  1807.         ERROR="You must install Houdini in order to install Unity plug-in for Houdini Engine."
  1808.     fi
  1809.     handledChoice="yes"
  1810.     fi
  1811.  
  1812.     case "$choice" in
  1813.     $installHoudiniChoice)
  1814.        if [ "$installHoudini" = "yes" ]; then
  1815.       installHoudini="no"
  1816.       localLicensing="no"
  1817.       desktopMenu="no"
  1818.       installEngineMaya="no"
  1819.       installEngineUnity="no"
  1820.           binSymlink="no"
  1821.       hfsSymlink="no"
  1822.        else
  1823.       installHoudini="yes"
  1824.        fi
  1825.        ;;
  1826.     $desktopMenuChoice)
  1827.        if [ "$desktopMenu" = "yes" ]; then
  1828.       desktopMenu="no"
  1829.        elif [ "$installHoudini" = "yes" ]; then
  1830.       desktopMenu="yes"
  1831.        fi
  1832.        ;;
  1833.     $binSymlinkChoice)
  1834.        if [ "$binSymlink" = "yes" ]; then
  1835.       binSymlink="no"
  1836.        elif [ "$installHoudini" = "yes" ]; then
  1837.       binSymlink="yes"
  1838.        fi
  1839.        ;;
  1840.     $hfsSymlinkChoice)
  1841.        if [ "$hfsSymlink" = "yes" ]; then
  1842.       hfsSymlink="no"
  1843.        elif [ "$installHoudini" = "yes" ]; then
  1844.       hfsSymlink="yes"
  1845.        fi
  1846.        ;;
  1847.     $localLicensingChoice)
  1848.        if [ "$localLicensing" = "yes" ]; then
  1849.       localLicensing="no"
  1850.        else
  1851.        if [ "$EUID" -ne 0 ]; then
  1852.            ERROR="You must be root when installing Houdini to set up Apprentice Licensing"
  1853.        else
  1854.            localLicensing="yes"
  1855.            licenseServer="no"
  1856.            installHoudini="yes"
  1857.        fi
  1858.        fi
  1859.        ;;
  1860.     $licenseServerChoice)
  1861.        if [ "$licenseServer" = "yes" ]; then
  1862.       licenseServer="no"
  1863.        else
  1864.       if [ "$EUID" -ne 0 ]; then
  1865.            ERROR="You must be root to install the Houdini License Server"
  1866.       else
  1867.           licenseServer="yes"
  1868.           localLicensing="no"
  1869.       fi
  1870.        fi
  1871.        ;;
  1872.     $installHQueueChoice)
  1873.        if [ "$installHQueue" = "yes" ]; then
  1874.       installHQueue="no"
  1875.        else
  1876.       installHQueue="yes"
  1877.        fi
  1878.        ;;
  1879.     $installHQueueClientChoice)
  1880.        if [ "$installHQueueClient" = "yes" ]; then
  1881.       installHQueueClient="no"
  1882.        else
  1883.       installHQueueClient="yes"
  1884.        fi
  1885.        ;;
  1886.  
  1887.     ""|F|f) break ;;
  1888.     D|d)
  1889.     custom_HFS
  1890.     ;;
  1891.     Q|q) clean_up 2 ;;
  1892.  
  1893.     *)
  1894.     if [ "$handledChoice" = "no" ]; then
  1895.         ERROR="Please enter one of these choices"
  1896.     fi
  1897.     esac
  1898.  
  1899.     compute_space
  1900. done
  1901. }
  1902.  
  1903. #-------------------------------------------------------------------------
  1904. custom_HFS()
  1905. {
  1906.     test -t 1 && clear
  1907.     echo $nn "
  1908.    Enter an installation directory for houdini
  1909.           ==> [$HFS_LOCATION]  $cc"
  1910.     read ans
  1911.     if [ "$ans" != "" ]; then
  1912.     HFS_LOCATION=`eval echo "$ans"`
  1913.     fi   
  1914. }
  1915.  
  1916. #-------------------------------------------------------------------------
  1917. final_check()
  1918. {
  1919.     # One last time, check that they really want to install the
  1920.     # software choices...
  1921.     choice=""
  1922.     WARNINGS=""
  1923.     ERROR=""
  1924.     MSG=""
  1925.     INSTALL_LOC=""
  1926.  
  1927.     if [ "$licenseServer" = "yes" ]; then
  1928.     localLicensing="no"
  1929.     fi
  1930.     if [ "$installHoudini" = "yes" ]; then
  1931.     if [ "$localLicensing" = "yes" ]; then
  1932.         MSG="houdini (apprentice-licensing)"
  1933.     fi
  1934.     if [ -f "$HFS_LOCATION" ]; then
  1935.         WARNINGS="WARNING: Installation directory ${HFS_LOCATION}
  1936.         exists and is a file
  1937. "
  1938.     elif [ -d "$HFS_LOCATION" ]; then
  1939.         WARNINGS="WARNING: Installation directory ${HFS_LOCATION}
  1940.         already exists
  1941. "
  1942.     fi
  1943.     INSTALL_LOC="
  1944.    Location for installation:
  1945.     $HFS_LOCATION
  1946. "
  1947.     else
  1948.     localLicensing="no"
  1949.     fi
  1950.     if [ "$localLicensing" = "yes" ]; then
  1951.     licenseServer="no"
  1952.     fi
  1953.     if [ "$licenseServer" = "yes" ]; then
  1954.     MSG="$MSG license-server"
  1955.     fi
  1956.     if [ "$installHQueue" = "yes" ]; then
  1957.     MSG="$MSG HQueue Server"
  1958.     fi
  1959.     if [ "$installHQueueClient" = "yes" ]; then
  1960.     MSG="$MSG HQueue Client"
  1961.     fi
  1962.  
  1963.     if [ "$hfsSymlink" = "yes" ]; then
  1964.     MSG="$MSG symlink in /opt/hfs${VER_MM}"
  1965.     if [ -d "/opt/${VER_MM}" ]; then
  1966.         WARNINGS+="WARNING: Cannot create symlink /opt/${VER_MM}. Path is a directory.
  1967. "
  1968.     elif [ -e "/opt/hfs${VER_MM}" ]; then
  1969.         WARNINGS+="WARNING: File /opt/hfs${VER_MM} will be overwritten
  1970. "
  1971.     fi
  1972.     fi
  1973.     if [ "$binSymlink" = "yes" ]; then
  1974.     MSG="$MSG symlinks in /usr/local/bin"
  1975.     existingLinks=""
  1976.     for f in "${binSymlinkList[@]}"; do
  1977.         if [ -e "/usr/local/bin/${f}" ]; then
  1978.         existingLinks+="$f "
  1979.         fi
  1980.     done
  1981.     if [  "$existingLinks" != "" ]; then
  1982.         WARNINGS+="WARNING: The following files in /usr/local/bin will be overwritten:
  1983.      ${existingLinks}
  1984. "
  1985.     fi
  1986.     fi
  1987.    
  1988.     if [ "$WARNINGS" != "" ]; then
  1989.     WARNINGS="
  1990. ${WARNINGS}"
  1991.     fi
  1992.  
  1993.     while [ "$choice" = "" ]
  1994.        do
  1995.           test -t 1 && clear
  1996.        echo $nn "
  1997.  
  1998.    Here are the choices you have made so far:
  1999.  
  2000.    Modules chosen to install:
  2001.        $MSG
  2002. $INSTALL_LOC
  2003.    Disk Space Required for installation:
  2004.        $DISK_MB Mbytes
  2005.    $WARNINGS
  2006.    Choose yes to proceed with the installation.
  2007.    Otherwise you may return to the choice menu to change your selections.
  2008.    $ERROR
  2009.    Would you like to start the installation? (y or n) [y] ==> $cc"
  2010.  
  2011.        read ans
  2012.  
  2013.        case $ans in
  2014.           ""|y|Y|yes|Yes|YES)
  2015.           FINALCHECK=OK
  2016.         break
  2017.           ;;
  2018.  
  2019.       QUIT|quit|Q|Quit|q)
  2020.     clean_up 2
  2021.       ;;
  2022.  
  2023.       n|N|no|NO|No)
  2024.           FINALCHECK=NOTOK
  2025.         break
  2026.           ;;
  2027.  
  2028.           *)
  2029.       ERROR="
  2030. Please enter 'y' to install or 'n' to alter your selections.
  2031. "
  2032.           ;;
  2033.  
  2034.        esac
  2035.        echo ""
  2036.     done
  2037. }
  2038.  
  2039. #-------------------------------------------------------------------------
  2040. install_python()
  2041. {
  2042.     mkdir -p "$HFS_LOCATION/python"
  2043.  
  2044.     tar_ext=".tar"
  2045.     tar_options="xvf"
  2046.     if [ -f "${SRC}/pythonlibdeps.tar.gz" ]; then
  2047.     tar_ext=".tar.gz"
  2048.     tar_options="zxvf"
  2049.     fi
  2050.  
  2051.     # First install Python's library dependencies.
  2052.     (cd "$HFS_LOCATION/python"; \
  2053.     tar "${tar_options}" "$SRC/pythonlibdeps${tar_ext}" > "$pythonFileList")
  2054.     tarstatus=$?
  2055.     if [ "$tarstatus" != 0 ]; then
  2056.     echo "    Problem encountered installing Python's library dependencies."
  2057.     echo "    Please refer to the installation guide for assistance"
  2058.     INSTALL_ERROR=1
  2059.     else
  2060.     # Install Python distributions.
  2061.     for py_ver in ${PYTHON_VERSIONS}; do
  2062.         (cd "$HFS_LOCATION/python"; \
  2063.         tar "${tar_options}" "$SRC/python${py_ver}${tar_ext}" \
  2064.         >> "$pythonFileList")
  2065.         tarstatus=$?
  2066.         if [ "$tarstatus" != 0 ]; then
  2067.         echo "    Problem encountered installing Python ${py_ver}."
  2068.         echo "    Please refer to the installation guide for assistance"
  2069.         INSTALL_ERROR=1
  2070.         break
  2071.         fi
  2072.     done
  2073.  
  2074.     # Add the Python file list to the main file list.
  2075.     echo "python" >> "$HFS_LOCATION/$hfsFileList"
  2076.     echo "python/${pythonFileList}" >> "$HFS_LOCATION/$hfsFileList"
  2077.     fi
  2078. }
  2079.  
  2080. #-------------------------------------------------------------------------
  2081. install_engine_maya()
  2082. {
  2083.     mkdir -p "${HFS_LOCATION}/engine/maya"
  2084.  
  2085.     tar_ext=".tar"
  2086.     tar_options="xvf"
  2087.     if [ -f "${SRC}/engine_maya.tar.gz" ]; then
  2088.     tar_ext=".tar.gz"
  2089.     tar_options="zxvf"
  2090.     fi
  2091.  
  2092.     (cd "${HFS_LOCATION}/engine/maya"; \
  2093.     tar "${tar_options}" "${SRC}/engine_maya${tar_ext}" >> "${HFS_LOCATION}/engine/maya/${engineMayaFileList}")
  2094.  
  2095.     # Replace the absolute path for Maya module description in $HFS/engine/maya
  2096.     sed -i -e 's,REPLACE_WITH_HFS,'${HFS_LOCATION}',' \
  2097.     $(find "${HFS_LOCATION}/engine/maya" -mindepth 2 -maxdepth 2 -type f -name "houdiniEngine-*")
  2098.  
  2099.     echo "engine" >> "${HFS_LOCATION}/${hfsFileList}"
  2100.     echo "engine/maya" >> "${HFS_LOCATION}/${hfsFileList}"
  2101.     echo "engine/maya/${engineMayaFileList}" >> "${HFS_LOCATION}/${hfsFileList}"
  2102.  
  2103.     ALL_MAYA_VERSIONS=("2018"
  2104.             "2017"
  2105.             "2016.5"
  2106.         "2016"
  2107.         "2015"
  2108.         "2014")
  2109.     for maya_version in "${ALL_MAYA_VERSIONS[@]}"
  2110.     do
  2111.     # Copy module files to standard Maya module folder
  2112.     if [[ $maya_version == "2014"
  2113.         || $maya_version == "2015" ]]
  2114.     then
  2115.         maya_dir="/usr/autodesk/maya${maya_version}-x64"
  2116.     else
  2117.         maya_dir="/usr/autodesk/maya${maya_version}"
  2118.     fi
  2119.     module_dir="${maya_dir}/modules"
  2120.     if [ -w "${maya_dir}" ]
  2121.     then
  2122.         if ! copy_file_to_dir "${HFS_LOCATION}/engine/maya/maya${maya_version}/houdiniEngine-maya${maya_version}" "$module_dir"
  2123.         then
  2124.         echo "Error copying Maya module file to: $module_dir"
  2125.         fi
  2126.     fi
  2127.     done
  2128. }
  2129.  
  2130. #-------------------------------------------------------------------------
  2131. install_engine_unity()
  2132. {
  2133.     mkdir -p "${HFS_LOCATION}/engine/unity"
  2134.  
  2135.     tar_ext=".tar"
  2136.     tar_options="xvf"
  2137.     if [ -f "${SRC}/engine_unity.tar.gz" ]; then
  2138.     tar_ext=".tar.gz"
  2139.     tar_options="zxvf"
  2140.     fi
  2141.  
  2142.     (cd "${HFS_LOCATION}/engine/unity"; \
  2143.     tar "${tar_options}" "${SRC}/engine_unity${tar_ext}" >> "${HFS_LOCATION}/engine/unity/${engineUnityFileList}")
  2144.  
  2145.     echo "engine" >> "${HFS_LOCATION}/${hfsFileList}"
  2146.     echo "engine/unity" >> "${HFS_LOCATION}/${hfsFileList}"
  2147.     echo "engine/unity/${engineUnityFileList}" >> "${HFS_LOCATION}/${hfsFileList}"
  2148. }
  2149.  
  2150. #-------------------------------------------------------------------------
  2151. install_sesinetd()
  2152. {
  2153.     TARGET=/usr/lib/sesi
  2154.     SAVED="BACKUP_SESI.$(date +%Y%m%s%H%M%S)"
  2155.     STATUS=0
  2156.     is_systemd=
  2157.     if [ -d /run/systemd/system ]; then
  2158.       is_systemd=1
  2159.     fi
  2160.  
  2161.     # Where directories like init.d, rc3.d, etc. are located
  2162.     # Recent linux systems have them directly under /etc while
  2163.     # older system have them under /etc/rc.d
  2164.     RCDIRS=
  2165.     if [ -d /etc/init.d ]; then
  2166.     RCDIRS=/etc
  2167.     elif [ -d /etc/rc.d/init.d ]; then
  2168.     RCDIRS=/etc/rc.d
  2169.     fi
  2170.     if [ "$RCDIRS" = "" ]; then
  2171.     echo "Cannot figure out where to put system startup scripts"
  2172.     echo "Please install manually"
  2173.     return 1
  2174.     fi
  2175.  
  2176.     if [ -d /var/run ]; then
  2177.     PID_DIR=/var/run
  2178.     else
  2179.     PID_DIR="$TARGET"
  2180.     fi
  2181.     HOST=$(hostname -s)
  2182.     PID_FILE="$PID_DIR/sesinetd_${HOST}.pid"
  2183.  
  2184.     if [ "$EUID" != 0 ]; then
  2185.     echo "You must be root to install sesinetd."
  2186.     do_wait
  2187.     return 1
  2188.     fi
  2189.  
  2190.     if [ ! -f "$SRC/houdini.tar.gz" -a ! -f "$SRC/houdini.tar" ]; then
  2191.     echo "Cannot find houdini.tar.gz or houdini.tar in $SRC"
  2192.     do_wait
  2193.     return 1
  2194.     fi
  2195.  
  2196.     flag=not_done
  2197.     backupFiles=no
  2198.  
  2199.     echo ""
  2200.     echo "Installing: Side Effects License Management Tools"
  2201.     KILLED=no
  2202.     if [ ! -d "$TARGET" ]; then
  2203.     echo "Creating $TARGET"
  2204.     mkdir -m 755 "$TARGET"
  2205.     if [ ! -d "$TARGET" ]; then
  2206.         echo ""
  2207.         echo "Problem encountered creating directory: $TARGET"
  2208.         echo "Unable to install license management tools."
  2209.         echo ""
  2210.         return 1
  2211.     fi
  2212.     else
  2213.     ERROR=""
  2214.     echo "
  2215.        An installation of Side Effects license tools and
  2216.        license key files already exists in $TARGET.
  2217.  
  2218.        Older versions of the sesi* tools, and licenses file
  2219.        will be backed up in:
  2220.                    $SAVED
  2221.        Houdini ${VER_MM} requires a license key version of at least ${VER_MAJOR}.0.
  2222.  
  2223.        An updated license manager daemon \"sesinetd\" and administration
  2224.        tool \"sesictrl\" will be installed by this process.
  2225.        
  2226.        THE CURRENTLY RUNNING LICENSE SERVER WILL BE STOPPED."
  2227.  
  2228.     backupFiles=yes
  2229.     fi
  2230.     echo ""
  2231.     if [ ! -w "$TARGET" -o ! -d "$TARGET" ]; then
  2232.     echo "Unable to write to directory: $TARGET"
  2233.     echo "Please ensure that you are running as root on the system"
  2234.     echo "that the license tools are to be installed on."
  2235.     echo "
  2236.            Houdini license tools have NOT been installed."
  2237.  
  2238.     return 1
  2239.     fi
  2240.  
  2241.     echo "Checking for running server... It has to be stopped before"
  2242.     echo "we can install the new version"
  2243.     if [ -x "$RCDIRS/init.d/sesinetd" ]; then
  2244.     if ( "$RCDIRS/init.d/sesinetd" stop ); then
  2245.         KILLED=yes
  2246.     fi
  2247.     elif [ -x "$TARGET/sesictrl" ]; then
  2248.     SESI_LMHOST=`hostname`
  2249.     if [ -f "$PID_FILE" ]; then
  2250.         rm -rf "$PID_FILE"
  2251.     fi
  2252.     "$TARGET/sesictrl" -h "$SESI_LMHOST" -Q
  2253.     killall -9 hserver
  2254.     sleep 5
  2255.     KILLED=yes
  2256.     fi
  2257.     pushd "$TARGET" > /dev/null
  2258.     if [ "$backupFiles" = "yes" ]; then
  2259.     mkdir "$SAVED"
  2260.     if [ -e sesictrl ]; then
  2261.         cp -d sesictrl* "$SAVED/"
  2262.         rm -f sesictrl*
  2263.     fi
  2264.     if [ -e sesinetd ]; then
  2265.         cp sesinetd "$SAVED/sesinetd"
  2266.         rm -f sesinetd
  2267.     fi
  2268.     if [ -e sesinetd.options ]; then
  2269.         cp sesinetd.options "$SAVED/sesinetd.options"
  2270.     fi
  2271.     if [ -e sesinetd_safe ]; then
  2272.         cp sesinetd_safe "$SAVED/sesinetd_safe"
  2273.         rm -f sesinetd_safe
  2274.     fi
  2275.     if [ -e licenses ]; then
  2276.         cp licenses "$SAVED/licenses"
  2277.     fi
  2278.     if [ -e sesiusage ]; then
  2279.         cp -d sesiusage* "$SAVED/"
  2280.         rm -f sesiusage*
  2281.     fi
  2282.     # This file is from the H9.0 days.
  2283.     if [ -e startupScriptLINUX ]; then
  2284.         cp -d startupScriptLINUX "$SAVED/startupScriptLINUX"
  2285.         rm -f startupScriptLINUX
  2286.     fi
  2287.     fi
  2288.     popd > /dev/null
  2289.     TMP="$(mktemp -d)"
  2290.     echo
  2291.     echo "Unpacking files..."
  2292.     if [ -f "$SRC/houdini.tar.gz" ]; then
  2293.     gunzip -c "$SRC/houdini.tar.gz" | (cd "$TMP"; tar xf - houdini/sbin/sesictrl houdini/sbin/sesinetd houdini/sbin/sesinetd_safe houdini/sbin/sesinetd.startup houdini/sbin/sesinetd.options houdini/sbin/sesiusage )
  2294.     (cd "$TMP"; cp -a houdini/sbin/sesictrl houdini/sbin/sesinetd houdini/sbin/sesinetd_safe houdini/sbin/sesinetd.startup houdini/sbin/sesinetd.options houdini/sbin/sesiusage  "$TARGET/")
  2295.     elif [ -f "$SRC/houdini.tar" ]; then
  2296.     (cd "$TMP"; tar xf "$SRC/houdini.tar" houdini/sbin/sesictrl houdini/sbin/sesinetd houdini/sbin/sesinetd_safe houdini/sbin/sesinetd.startup houdini/sbin/sesinetd.options houdini/sbin/sesiusage )
  2297.     (cd "$TMP"; cp -a houdini/sbin/sesictrl houdini/sbin/sesinetd houdini/sbin/sesinetd_safe houdini/sbin/sesinetd.startup houdini/sbin/sesinetd.options houdini/sbin/sesiusage  "$TARGET/")
  2298.     fi
  2299.     rm -rf "$TMP"
  2300.     if [ $? != 0 ]; then
  2301.     STATUS=1
  2302.     fi
  2303.     # Restore sesinetd.options if it exists in the backup directory
  2304.     cd "$TARGET"
  2305.     if [ -e "$SAVED/sesinetd.options" ]; then
  2306.     cp -f "$SAVED/sesinetd.options" "$TARGET"
  2307.     fi
  2308.     if [ -f "$RCDIRS/init.d/sesinetd" ]; then
  2309.     mv "$RCDIRS/init.d/sesinetd" "$RCDIRS/init.d/sesinetd.old"
  2310.     fi
  2311.  
  2312.     if [ ! -f sesinetd ]; then
  2313.     cat <<EOERROR
  2314.     A problem has occurred installing the license tools.
  2315.     Please correct any errors above and try again.
  2316.  
  2317. EOERROR
  2318.     return 1
  2319.     fi
  2320.     ## sesinetd.startup is renamed when placed in init.d ##
  2321.     cp sesinetd.startup "$RCDIRS/init.d/sesinetd"
  2322.     chmod 755 "$RCDIRS/init.d/sesinetd"
  2323.  
  2324.     # OpenSUSE >= 13.2 has moved the rc folders into /etc/init.d.
  2325.     if [ -d "$RCDIRS/init.d/rc0.d" ]; then
  2326.     RCROOT="$RCDIRS/init.d"
  2327.     else
  2328.     RCROOT="$RCDIRS"
  2329.     fi
  2330.  
  2331.     test -d "$RCROOT/rc2.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc2.d/S89sesinetd"
  2332.     test -d "$RCROOT/rc3.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc3.d/S89sesinetd"
  2333.     test -d "$RCROOT/rc4.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc4.d/S89sesinetd"
  2334.     test -d "$RCROOT/rc5.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc5.d/S89sesinetd"
  2335.  
  2336.     test -d "$RCROOT/rcS.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rcS.d/K89sesinetd"
  2337.     test -d "$RCROOT/rc0.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc0.d/K89sesinetd"
  2338.     test -d "$RCROOT/rc1.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc1.d/K89sesinetd"
  2339.     test -d "$RCROOT/rc6.d" && ln -sf "$RCDIRS/init.d/sesinetd" "$RCROOT/rc6.d/K89sesinetd"
  2340.  
  2341.     if [ -n "$is_systemd" ]; then
  2342.     # Reload systemd so that it picks up the new sesinetd init script.
  2343.     # Otherwise, running the init script below could fail.
  2344.     systemctl daemon-reload
  2345.     fi
  2346.  
  2347.     if [ "$KILLED" = "no" ]; then
  2348.     if [ -x "$RCDIRS/init.d/sesinetd" ]; then
  2349.         "$RCDIRS/init.d/sesinetd" stop
  2350.     else
  2351.         # Stop sesinetd
  2352.         SESI_LMHOST=`hostname`
  2353.         if [ -f "$PID_FILE" ]; then
  2354.         rm -rf "$PID_FILE"
  2355.         fi
  2356.         "$TARGET/sesictrl" -h "$SESI_LMHOST" -Q
  2357.         sleep 5
  2358.     fi
  2359.     fi
  2360.     echo
  2361.     if [ -x "$RCDIRS/init.d/sesinetd" ]; then
  2362.     "$RCDIRS/init.d/sesinetd" start
  2363.     fi
  2364.    
  2365.     cat <<EOM
  2366.  
  2367.     Please install licenses using the Houdini License Administrator
  2368.     (hkey).  Start hkey by first changing to the directory where
  2369.     houdini is installed and then running:
  2370.  
  2371.         source houdini_setup
  2372.         hkey
  2373.  
  2374.     License tools have been installed.
  2375. EOM
  2376.     return $STATUS
  2377. }
  2378.  
  2379. #---MAINLINE--------------------------------------------------------------
  2380.  
  2381. saved_args=("$@")
  2382.  
  2383. while [ "$1" != "" ]; do
  2384.     case "$1" in
  2385.     "--install-toolkit")
  2386.         # We always install the HDK now, but ignore this for backwards
  2387.         # compatibility.
  2388.         ;;
  2389.     "--localLicensing"|"--local-licensing")
  2390.         localLicensing="yes"
  2391.         ;;
  2392.     "--no-localLicensing"|"--no-local-licensing")
  2393.         localLicensing="no"
  2394.         ;;
  2395.     "--installEngineMaya"|"--install-engine-maya")
  2396.         installEngineMaya="yes"
  2397.         ;;
  2398.     "--no-installEngineMaya"|"--no-install-engine-maya")
  2399.         installEngineMaya="no"
  2400.         ;;
  2401.     "--installEngineUnity"|"--install-engine-unity")
  2402.         installEngineUnity="yes"
  2403.         ;;
  2404.     "--no-installEngineUnity"|"--no-install-engine-unity")
  2405.         installEngineUnity="no"
  2406.         ;;
  2407.     "--install-hqueue-server")
  2408.         installHQueue="yes"
  2409.         ;;
  2410.     "--no-install-hqueue-server")
  2411.         installHQueue="no"
  2412.         ;;
  2413.     "--hqueue-server-dir")
  2414.         shift
  2415.         hqServerDir=$1
  2416.         ;;
  2417.     "--create-hqueue-shared-dir")
  2418.         shift
  2419.         createHQSharedDir=$1
  2420.         ;;
  2421.     "--hqueue-shared-dir")
  2422.         shift
  2423.         hqSharedDir=$1
  2424.         ;;
  2425.     "--hqueue-shared-dir-mount")
  2426.         shift
  2427.         hqMountPoint=$1
  2428.         ;;
  2429.     "--upgrade-hqueue-server-if-exists")
  2430.         shift
  2431.         upgradeHQIfExists=$1
  2432.         ;;
  2433.     "--install-hqueue-client")
  2434.         installHQueueClient="yes"
  2435.         ;;
  2436.     "--hqueue-client-dir")
  2437.         shift
  2438.         hqClientDir=$1
  2439.         ;;
  2440.     "--hqueue-server-name")
  2441.         shift
  2442.         hqServerName=$1
  2443.         ;;
  2444.     "--hqueue-server-port")
  2445.         shift
  2446.         hqServerPort=$1
  2447.         ;;
  2448.     "--mount-hqueue-shared-dir")
  2449.         shift
  2450.         hqMountSharedDir=$1
  2451.         ;;
  2452.     "--houdini"|"--install-houdini")
  2453.         installHoudini="yes"
  2454.         ;;
  2455.     "--no-houdini"|"--no-install-houdini")
  2456.         installHoudini="no"
  2457.         ;;
  2458.     "--license"|"--install-license")
  2459.         licenseServer="yes"
  2460.         ;;
  2461.     "--no-license"|"--no-install-license")
  2462.         licenseServer="no"
  2463.         ;;
  2464.     "--menus"|"--install-menus")
  2465.         desktopMenu="yes"
  2466.         ;;
  2467.     "--no-menus"|"--no-install-menus")
  2468.         desktopMenu="no"
  2469.         ;;
  2470.     "--install-bin-symlink")
  2471.         binSymlink="yes"
  2472.         ;;
  2473.     "--no-install-bin-symlink")
  2474.         binSymlink="no"
  2475.         ;;
  2476.     "--install-hfs-symlink")
  2477.         hfsSymlink="yes"
  2478.         ;;
  2479.     "--no-install-hfs-symlink")
  2480.         hfsSymlink="no"
  2481.         ;;
  2482.     "--accept-EULA")
  2483.         acceptedEULA="yes"
  2484.         ;;
  2485.     "--no-root-check")
  2486.         checkRoot="no"
  2487.         ;;
  2488.     "--auto-install")
  2489.         autoInstall="yes"
  2490.         ;;
  2491.     "--help"|"-h"|"-?")
  2492.         long_usage
  2493.         exit 0
  2494.         ;;
  2495.     "--make-dir")
  2496.         makeDirectory="yes"
  2497.         ;;
  2498.     "--")
  2499.         shift
  2500.         break
  2501.         ;;
  2502.     *)
  2503.         break
  2504.         ;;
  2505.     esac
  2506.     shift
  2507. done
  2508. if [ -n "$1" ]; then
  2509.     if [ ! -e "$1" -a "$makeDirectory" = "yes" ]; then
  2510.     mkdir -p "$1"
  2511.     fi
  2512.     if [ -d "$1" -a -w "$1" ]; then
  2513.     HFS_LOCATION="$1"
  2514.     autoInstall="yes"
  2515.     else
  2516.     echo "Error: $1 must be a writeable directory"
  2517.     echo "$usage"
  2518.     exit -1;
  2519.     fi
  2520. fi
  2521.  
  2522. # If invoked as "sesinetd.install", override feature selection
  2523. if [ "$(basename "$0")" = "sesinetd.install" ]; then
  2524.     licenseServer="yes"
  2525.     installEngineMaya="no"
  2526.     installEngineUnity="no"
  2527.     installHQueue="no"
  2528.     localLicensing="no"
  2529.     installHoudini="no"
  2530.     desktopMenu="no"
  2531.     binSymlink="no"
  2532.     hfsSymlink="no"
  2533.     autoInstall="yes"
  2534.     acceptedEULA="yes"
  2535. fi
  2536.  
  2537. check_pwd
  2538. check_os
  2539. check_root "${saved_args[@]}"
  2540. check_constraints
  2541.  
  2542. if [ "$acceptedEULA" != "yes" ]; then
  2543.     accept_license_agreement
  2544.     if [ -n "$AGREEMENT_ALPHABETA_TEXT" ]; then
  2545.     accept_alphabeta_license_agreement
  2546.     fi
  2547. fi
  2548.  
  2549. if [ "$installHoudini" = "no" -a "$licenseServer" = "no" ]; then
  2550.     if [ "$installHQueue" = "yes" -o "$installHQueueClient" = "yes" ]; then
  2551.     autoInstall="yes"
  2552.     fi
  2553. fi
  2554.  
  2555. compute_space
  2556.  
  2557. FINALCHECK=NOTOK
  2558.  
  2559. while [ "$FINALCHECK" != "OK" ]; do
  2560.     if [ "$autoInstall" = "no" ]; then
  2561.     inst_menu
  2562.     fi
  2563.     if [ "$installHoudini" = "yes" -o "$licenseServer" = "yes" ]; then
  2564.     # Assume that the installation will go
  2565.     # in the first existing ancestor's partition
  2566.     HFS_PARTITION="$HFS_LOCATION"
  2567.     while [ ! -e "$HFS_PARTITION" ]; do
  2568.         HFS_PARTITION=`dirname "$HFS_PARTITION"`
  2569.     done
  2570.     DISK_FREE=`df -k "$HFS_PARTITION" | tail -n 1 | awk ' { print $(NF-2) } '`
  2571.     if [ "$DISK_FREE" = "avail" -o "$DISK_FREE" = "$HFS_LOCATION" ]; then
  2572.         DISK_FREE=""
  2573.         ERROR2="Volume not mounted part 1"
  2574.     fi
  2575.  
  2576.     if [ "${DISK_FREE:=0}" -gt "$DISK_REQ" ]; then
  2577.         if [ "$autoInstall" = "no" ]; then
  2578.         final_check
  2579.         else
  2580.         FINALCHECK=OK
  2581.         fi
  2582.     else
  2583.         FREE_MB=`expr \( $DISK_FREE + 500 \) / 1000`
  2584.         ERROR="Warning: not enough space on $HFS_LOCATION."
  2585.         echo ""
  2586.         echo $ERROR
  2587.         echo "$FREE_MB Mb free, $DISK_MB Mb required. ${ERROR2}"
  2588.         echo "Please change your selections or choose another location."
  2589.         echo ""
  2590.         if [ "$autoInstall" = "no" ]; then
  2591.         echo $nn "[Hit return to continue]"
  2592.         read ans
  2593.         fi
  2594.     fi
  2595.     elif [ "$installHQueue" = "yes" -o "$installHQueueClient" = "yes" ]; then
  2596.     # Only HQueue was chosen.
  2597.     FINALCHECK=OK
  2598.     else
  2599.     echo
  2600.     echo "Nothing chosen."
  2601.     sleep 1
  2602.     FINALCHECK=NOTOK
  2603.     fi
  2604.     if [ "$FINALCHECK" != "OK" -a "$autoInstall" = "yes" ]; then
  2605.     # Things aren't okay, but the user can't fix them. Abort install
  2606.     clean_up 2
  2607.     fi
  2608. done
  2609.  
  2610. if [ "$installHoudini" = "yes" -a "$autoInstall" = "no" -a \
  2611.     -e "$HFS_LOCATION" ]; then
  2612.     test -t 1 && clear
  2613.     if [ -f "$HFS_LOCATION" ]; then
  2614.     MSG="
  2615.    ${HFS_LOCATION} exists and is a file. Installation cannot
  2616.    proceed unless it is deleted."
  2617.     elif [ -d "$HFS_LOCATION" ]; then
  2618.     if [ "$(ls -A "$HFS_LOCATION")" != "" ]; then
  2619.         MSG="
  2620.    ${HFS_LOCATION} exists and is not empty. Houdini may
  2621.    not install correctly unless it is deleted."
  2622.     fi
  2623.     else
  2624.     MSG="
  2625.    ${HFS_LOCATION} exists. Houdini may not install correctly
  2626.    unless it is deleted."
  2627.     fi
  2628.     while true; do
  2629.     echo "$MSG"
  2630.     echo $nn "    Delete ${HFS_LOCATION} (y/n) ==> $cc"
  2631.     read choice
  2632.     case "$choice" in
  2633.         Y|y|Yes|yes)
  2634.         rm -rf "$HFS_LOCATION"
  2635.         break
  2636.         ;;
  2637.         N|n|No|no)
  2638.         break
  2639.         ;;
  2640.         Q|q|QUIT|Quit|quit)
  2641.         clean_up 2
  2642.         ;;
  2643.         *)
  2644.         echo "Please choose y or n"
  2645.         ;;
  2646.     esac
  2647.     done
  2648. fi
  2649.  
  2650. test -t 1 && clear
  2651.  
  2652. echo "
  2653.    ${DISK_REQ}K is the space required to install selections...
  2654.    ${DISK_FREE}K is available on ${HFS_LOCATION}
  2655.  
  2656.    Commencing installation of selected modules.
  2657.    This may take a few minutes...
  2658.    "
  2659.  
  2660. #---HOUDINI INSTALLATION---------------------------------------------------
  2661. if [ "$installHoudini" = "yes" ]; then
  2662.     if [ ! -d "$HFS_LOCATION" ]; then
  2663.     mkdir -p "$HFS_LOCATION" || clean_up 1
  2664.     fi
  2665.     echo $nn "    Installing: Houdini in ${HFS_LOCATION}${cc}"
  2666.     tarfile="$SRC/houdini.tar"
  2667.     tarflags=""
  2668.     test -t 1 && tarflags="--checkpoint=${SIZE_HOUDINI%??} --checkpoint-action=ttyout=."
  2669.     if [ -f "$SRC/houdini.tar.gz" ]; then
  2670.     tarfile="$SRC/houdini.tar.gz"
  2671.     tarflags="$tarflags -xzvf"
  2672.     elif [ -f "$SRC/houdini.tar" ]; then
  2673.     tarfile="$SRC/houdini.tar"
  2674.     tarflags="$tarflags -xvf"
  2675.     else
  2676.     echo ""
  2677.     echo "Error: this doesn't appear to be a valid houdini package"
  2678.     INSTALL_ERROR=3
  2679.     fi
  2680.     (cd "$HFS_LOCATION"; tar $tarflags "$tarfile" > "$hfsFileList")
  2681.     tarstatus=$?
  2682.     if [ "$tarstatus" != 0 ]; then
  2683.         echo "    Problem encountered installing Houdini"
  2684.         echo "    Please refer to the installation guide for assistance"
  2685.     INSTALL_ERROR=1
  2686.     fi
  2687.     echo
  2688.  
  2689.     install_python
  2690.  
  2691.     if [ "$INSTALL_ERROR" = 0 ]; then
  2692.     # Run the python script which installs desktop items such as
  2693.     # menu shortcuts, mime-types, etc.
  2694.     # Also, copy the desktop install script into the installation path.
  2695.     if [ "$desktopMenu" = "yes" ]; then
  2696.         if [ -f "$SRC/installDesktopItems.py" ]; then
  2697.         (cd "$HFS_LOCATION" && source houdini_setup_bash > /dev/null \
  2698.             && "$HFS_LOCATION/python/bin/python" "$SRC/installDesktopItems.py")
  2699.         cp "$SRC/installDesktopItems.py" "$HFS_LOCATION"
  2700.         echo installDesktopItems.py >> "$HFS_LOCATION/$hfsFileList"
  2701.         fi
  2702.     fi
  2703.  
  2704.     # Install symlink options
  2705.     if [ "$binSymlink" = "yes" ]; then
  2706.         for name in "${binSymlinkList[@]}"; do
  2707.         ln -fns "${HFS_LOCATION}/bin/${name}" "/usr/local/bin/${name}"
  2708.         echo "/usr/local/bin/${name}" >> "$HFS_LOCATION/$hfsSymlinkList"
  2709.         done
  2710.     fi
  2711.     if [ "$hfsSymlink" = "yes" -a \
  2712.         "$HFS_LOCATION" != "/opt/hfs${VER_MM}" ]; then
  2713.         ln -fns "$HFS_LOCATION" "/opt/hfs${VER_MM}"
  2714.         echo "/opt/hfs${VER_MM}" >> "$HFS_LOCATION/$hfsSymlinkList"
  2715.     fi
  2716.  
  2717.     # Copy over uninstall scripts to $HFS.
  2718.     cp "$SRC/houdini.uninstall" "$HFS_LOCATION"
  2719.     if [ "$binSymlink" = "yes" -o "$hfsSymlink" = "yes" ]; then
  2720.         echo "$hfsSymlinkList" >> "$HFS_LOCATION/$hfsFileList"
  2721.     fi
  2722.     echo houdini.uninstall >> "$HFS_LOCATION/$hfsFileList"
  2723.  
  2724.     echo "$hfsFileList" >> "$HFS_LOCATION/$hfsFileList"
  2725.  
  2726.     if [ "$localLicensing" = "yes" ]; then
  2727.         houHomeDir="$HOME/houdini$VER_MM"
  2728.         houHomeDirExists="0"
  2729.         if [ -d "$houHomeDir" ]; then
  2730.         houHomeDirExists="1"
  2731.         fi
  2732.  
  2733.         licenseOpt="$HFS_LOCATION/houdini/Licensing.opt"
  2734.         touch "$licenseOpt"
  2735.         chmod 666 "$licenseOpt"
  2736.         echo "licensingMode = localValidator" >> "$licenseOpt"
  2737.         echo "Installing apprentice license..."
  2738.         mkdir -p /usr/lib/sesi
  2739.         touch /usr/lib/sesi/licenses.local
  2740.         chmod 666 /usr/lib/sesi/licenses.local
  2741.         (cd "$HFS_LOCATION"; source houdini_setup_bash; hkey -n 1 -c -foreground)
  2742.         if [ $? != 0 ]; then
  2743.         echo "Error installing apprentice license"
  2744.         fi
  2745.  
  2746.         if [ "$houHomeDirExists" = 0 ]; then
  2747.         chown -R `stat --printf=%U:%G "$HOME"` "$houHomeDir"
  2748.         fi
  2749.     fi
  2750.  
  2751.     if [  "${SIZE_ENGINE_MAYA}" != "-1" -a "$installEngineMaya" = "yes" ]; then
  2752.         install_engine_maya
  2753.     fi
  2754.  
  2755.     if [  "${SIZE_ENGINE_UNITY}" != "-1" -a "$installEngineUnity" = "yes" ]; then
  2756.         install_engine_unity
  2757.     fi
  2758.  
  2759.     echo "    Houdini install successful"
  2760.     fi
  2761. fi
  2762.  
  2763. #---LICENSE SERVER INSTALLATION--------------------------------------------
  2764. if [ "$licenseServer" = "yes" ]; then
  2765.     if [ "$EUID" -ne 0 ]; then
  2766.     echo "You must be root to install the license server, not installing"
  2767.     else
  2768.     cd "$SRC"
  2769.     install_sesinetd
  2770.     license_status=$?
  2771.     if [ "$license_status" != 0 ]; then
  2772.         INSTALL_ERROR=1
  2773.     fi
  2774.     fi
  2775. fi
  2776.  
  2777. #---HQUEUE SERVER/CLIENT INSTALLATION-------------------------------------
  2778. if [ "${installHQueue}" = "yes" -o "${installHQueueClient}" = "yes" ]; then
  2779.     cd "$SRC"
  2780.     if [ ! -f "$SRC/hqueue.install" ]; then
  2781.     echo "Error: no HQueue installation script"
  2782.     else
  2783.     export SRC
  2784.     hqueue_cmd_args=""
  2785.     if [ "${installHQueue}" = "yes" ]; then
  2786.         hqueue_cmd_args="${hqueue_cmd_args} --install-server"
  2787.  
  2788.         if [ "${hqServerDir}" != "" ]; then
  2789.         hqueue_cmd_args="${hqueue_cmd_args} --server-dir ${hqServerDir} --force"
  2790.         fi
  2791.  
  2792.         if [ "${createHQSharedDir}" = "yes" ]; then
  2793.         hqueue_cmd_args="${hqueue_cmd_args} --create-shared-folder"
  2794.  
  2795.         if [ "${hqSharedDir}" != "" ]; then
  2796.             hqueue_cmd_args="${hqueue_cmd_args} --shared-folder-path ${hqSharedDir}"
  2797.         fi
  2798.         if [ "${hqMountPoint}" != "" ]; then
  2799.             hqueue_cmd_args="${hqueue_cmd_args} --shared-folder-mount ${hqMountPoint}"
  2800.         fi
  2801.         elif [ "${createHQSharedDir}" = "no" ]; then
  2802.         hqueue_cmd_args="${hqueue_cmd_args} --no-shared-folder"
  2803.         fi
  2804.  
  2805.         if [ "${upgradeHQIfExists}" = "yes" ]; then
  2806.         hqueue_cmd_args="${hqueue_cmd_args} --do-upgrade"
  2807.         elif [ "${upgradeHQIfExists}" = "no" ]; then
  2808.         hqueue_cmd_args="${hqueue_cmd_args} --do-install"
  2809.         fi
  2810.  
  2811.     fi
  2812.  
  2813.     if [ "${installHQueueClient}" = "yes" ]; then
  2814.         hqueue_cmd_args="${hqueue_cmd_args} --install-client"
  2815.  
  2816.         if [ "${hqClientDir}" != "" ]; then
  2817.         hqueue_cmd_args="${hqueue_cmd_args} --client-dir ${hqClientDir}"
  2818.         fi
  2819.         if [ "${hqServerName}" != "" ]; then
  2820.         hqueue_cmd_args="${hqueue_cmd_args} --hq-server ${hqServerName}"
  2821.         fi
  2822.         if [ "${hqServerPort}" != "" ]; then
  2823.         hqueue_cmd_args="${hqueue_cmd_args} --hq-server-port ${hqServerPort}"
  2824.         fi
  2825.         if [ "${hqMountSharedDir}" = "yes" ]; then
  2826.         hqueue_cmd_args="${hqueue_cmd_args} --mount-shared-folder"
  2827.         elif [ "${hqMountSharedDir}" = "no" ]; then
  2828.         hqueue_cmd_args="${hqueue_cmd_args} --no-mount-shared-folder"
  2829.         fi
  2830.  
  2831.     fi
  2832.  
  2833.     /bin/bash "$SRC/hqueue.install" ${hqueue_cmd_args}
  2834.     if [ "$?" != "0" ]; then
  2835.         echo "Error: Could not install HQueue."
  2836.         INSTALL_ERROR=1
  2837.     fi
  2838.     fi
  2839. fi
  2840.  
  2841. #-------------------------------------------------------------------------
  2842. # All done...
  2843.  
  2844. clean_up 0
  2845.  
  2846. #-------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement