diff --git a/.appveyor.yml b/.appveyor.yml index dae15df614..ee801b616e 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -19,6 +19,9 @@ install: - ps: nuget install boost_serialization-vc140 -o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0 - ps: nuget install boost_math_c99-vc140 -o "${env:APPVEYOR_BUILD_FOLDER}" -Version 1.60.0 - ps: nuget install OpenBLAS -o "${env:APPVEYOR_BUILD_FOLDER}" + - set path=C:\Program Files (x86)\WiX Toolset v3.11\bin;%path% + - ps: $ver = (Get-Content "${env:APPVEYOR_BUILD_FOLDER}\src\mlpack\core\util\version.hpp" | where {$_ -like "*MLPACK_VERSION*"}); $env:MLPACK_VERSION = ($ver[0].substring($ver[0].length-1,1)+'.'+$ver[1].substring($ver[1].length-1,1)+'.'+$ver[2].substring($ver[2].length-1,1)) + - echo MLPACK_VERSION is %MLPACK_VERSION% build_script: - mkdir boost_libs @@ -35,11 +38,38 @@ build_script: - cd C:\projects\mlpack && mkdir build && cd build - cmake -G "Visual Studio 14 2015 Win64" -DBLAS_LIBRARY:FILEPATH="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DLAPACK_LIBRARY:FILEPATH="%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/libopenblas.dll.a" -DARMADILLO_INCLUDE_DIR="C:/projects/mlpack/armadillo-7.800.2/include" -DARMADILLO_LIBRARY:FILEPATH="C:\projects\mlpack\armadillo-7.800.2\build\Debug\armadillo.lib" -DBOOST_INCLUDEDIR:PATH="C:\projects\mlpack\boost.1.60.0.0\lib\native\include" -DBOOST_LIBRARYDIR:PATH="C:\projects\mlpack\boost_libs" -DDEBUG=OFF -DPROFILE=OFF -DBUILD_PYTHON_BINDINGS=OFF -DCMAKE_BUILD_TYPE=Release .. - '"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "C:\projects\mlpack\build\mlpack.sln" /m /verbosity:minimal /nologo /p:BuildInParallel=true /p:Configuration=Release;Platform=x64' + + # Zip Artifacts - 7z a mlpack-windows-no-libs.zip "%APPVEYOR_BUILD_FOLDER%\build\Release\*.exe" - 7z a mlpack-windows.zip "%APPVEYOR_BUILD_FOLDER%\build\Release\*.*" "%APPVEYOR_BUILD_FOLDER%/OpenBLAS.0.2.14.1/lib/native/lib/x64/*.*" + + # Pulling documentation for the installer + - ps: try{(new-object net.webclient).DownloadFile('http://ci.mlpack.org/job/mlpack%20-%20doxygen%20build/lastSuccessfulBuild/artifact/build/doc/html/*zip*/html.zip', 'C:\projects\mlpack\dist\win-installer\jenkinsdoc.zip')}catch{Write-Output "Unable to pull jenkins doc, skipping!"} + - ps: try{(Add-Type -AssemblyName System.IO.Compression.FileSystem); [System.IO.Compression.ZipFile]::ExtractToDirectory('C:\projects\mlpack\dist\win-installer\jenkinsdoc.zip', 'C:\projects\mlpack\dist\win-installer\staging\doc')}catch{Write-Output "Unable to add doc to installer, skipping!"} + + # Preparing installer staging + - cd C:\projects\mlpack\dist\win-installer\staging && mkdir lib + - ps: cp C:\projects\mlpack\build\Release\*.lib C:\projects\mlpack\dist\win-installer\staging\lib\ + - ps: cp C:\projects\mlpack\build\Release\*.exp C:\projects\mlpack\dist\win-installer\staging\lib\ + - ps: cp C:\projects\mlpack\build\Release\*.dll C:\projects\mlpack\dist\win-installer\staging\ + - ps: cp C:\projects\mlpack\build\Release\*.exe C:\projects\mlpack\dist\win-installer\staging\ + - ps: cp C:\projects\mlpack\OpenBLAS.0.2.14.1\lib\native\bin\x64\*.dll C:\projects\mlpack\dist\win-installer\staging\ + - ps: cp C:\projects\mlpack\boost_libs\boost_unit_test_framework-vc*.dll C:\projects\mlpack\dist\win-installer\staging\ + - ps: cp C:\projects\mlpack\build\include\mlpack C:\projects\mlpack\dist\win-installer\staging -recurse + - ps: cp C:\projects\mlpack\doc\examples C:\projects\mlpack\dist\win-installer\staging -recurse + + # Building MSI installer + - cd C:\projects\mlpack\dist\win-installer\mlpack-win-installer + - heat dir ..\staging -cg HeatGenerated -dr INSTALLFOLDER -sreg -srd -var var.HarvestPath -ag -sfrag -out HeatGeneratedFileList.wxs + - candle -dHarvestPath=..\staging -dConfiguration=Release -dOutDir=bin\x64\Release\ -dPlatform=x64 -dProjectDir=. -dProjectExt=.wixproj -dProjectFileName=mlpack-win-installer.wixproj -dProjectName=mlpack-win-installer -dProjectPath=mlpack-win-installer.wixproj -dTargetDir=.\bin\x64\Release\ -dTargetExt=.msi -dTargetFileName=mlpack-windows.msi -dTargetName=mlpack-windows -dTargetPath=.\bin\x64\Release\mlpack-windows.msi -out obj\x64\Release\ -arch x64 -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUIExtension.dll" Product.wxs HeatGeneratedFileList.wxs + - light -out .\bin\x64\Release\mlpack-%MLPACK_VERSION%.msi -pdbout .\bin\x64\Release\mlpack-windows.wixpdb -cultures:null -loc mlpack-localization.wxl -ext "C:\Program Files (x86)\WiX Toolset v3.11\bin\\WixUIExtension.dll" -contentsfile obj\x64\Release\mlpack-win-installer.wixproj.BindContentsFileListnull.txt -outputsfile obj\x64\Release\mlpack-win-installer.wixproj.BindOutputsFileListnull.txt -builtoutputsfile obj\x64\Release\mlpack-win-installer.wixproj.BindBuiltOutputsFileListnull.txt -wixprojectfile mlpack-win-installer.wixproj obj\x64\Release\Product.wixobj obj\x64\Release\HeatGeneratedFileList.wixobj artifacts: - - path: '**\*.zip' + - path: 'build\*.zip' + name: mlpack-windows-zip + + - path: 'dist\win-installer\mlpack-win-installer\bin\x64\Release\*.msi' + name: mlpack-windows-installer notifications: - provider: Email diff --git a/dist/win-installer/mlpack-win-installer/Product.wxs b/dist/win-installer/mlpack-win-installer/Product.wxs new file mode 100644 index 0000000000..4adafc2a23 --- /dev/null +++ b/dist/win-installer/mlpack-win-installer/Product.wxs @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + $(env.MLPACK_VERSION) + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dist/win-installer/mlpack-win-installer/mlpack-localization.wxl b/dist/win-installer/mlpack-win-installer/mlpack-localization.wxl new file mode 100644 index 0000000000..8cc9329065 --- /dev/null +++ b/dist/win-installer/mlpack-win-installer/mlpack-localization.wxl @@ -0,0 +1,7 @@ + + + 1033 + {\WixUI_Font_Bigger}Welcome to the [ProductName] [MLPACK_VERSION] Setup Wizard + The Setup Wizard will install [ProductName] [MLPACK_VERSION] on your computer. Click Next to continue or Cancel to exit the Setup Wizard. + + \ No newline at end of file diff --git a/dist/win-installer/mlpack-win-installer/mlpack-win-installer.wixproj b/dist/win-installer/mlpack-win-installer/mlpack-win-installer.wixproj new file mode 100644 index 0000000000..8795a920eb --- /dev/null +++ b/dist/win-installer/mlpack-win-installer/mlpack-win-installer.wixproj @@ -0,0 +1,59 @@ + + + + Debug + x86 + 3.10 + 5409c191-c4b0-4caf-954c-001bb5c1d136 + 2.0 + mlpack-windows + Package + mlpack-win-installer + + + bin\$(Configuration)\ + obj\$(Configuration)\ + Debug + + + bin\$(Configuration)\ + obj\$(Configuration)\ + + + Debug + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + + + bin\$(Platform)\$(Configuration)\ + obj\$(Platform)\$(Configuration)\ + + + HarvestPath=..\staging + + + + + + + + $(WixExtDir)\WixUIExtension.dll + WixUIExtension + + + + + + + + + + + + + \ No newline at end of file diff --git a/dist/win-installer/res/banner.jpg b/dist/win-installer/res/banner.jpg new file mode 100644 index 0000000000..9677f118a8 Binary files /dev/null and b/dist/win-installer/res/banner.jpg differ diff --git a/dist/win-installer/res/dialog_white.jpg b/dist/win-installer/res/dialog_white.jpg new file mode 100644 index 0000000000..63743b1003 Binary files /dev/null and b/dist/win-installer/res/dialog_white.jpg differ diff --git a/dist/win-installer/staging/LICENSE.rtf b/dist/win-installer/staging/LICENSE.rtf new file mode 100644 index 0000000000..40712bd5a5 --- /dev/null +++ b/dist/win-installer/staging/LICENSE.rtf @@ -0,0 +1,285 @@ +{\rtf1\ansi\ansicpg1252\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Courier New;}} +{\colortbl ;\red0\green0\blue255;} +{\*\generator Riched20 10.0.17134}\viewkind4\uc1 +\pard\f0\fs22\lang1033 mlpack is provided without any warranty of fitness for any purpose. You\par +can redistribute the library and/or modify it under the terms of the 3-clause\par +BSD license. The text of the 3-clause BSD license is contained below.\par +\par +mlpack contains some reproductions of the source code of Armadillo, which is\par +licensed under the Mozilla Public License v2.0 (MPL2). This code is found in\par +src/mlpack/core/arma_extend/ and more details on the licensing are available\par +there.\par +\par +mlpack also contains some reproductions of the source code of Boost, which is\par +licensed under the Boost Software License, version 1.0. This code is found in\par +src/mlpack/core/boost_backport/ and more details on the licensing are available\par +there.\par +\par +--------------\par +mlpack License\par +--------------\par +\par +Copyright (c) 2007-2018, mlpack contributors (see COPYRIGHT.txt)\par +All rights reserved.\par +\par +Redistribution and use of mlpack in source and binary forms, with or without\par +modification, are permitted provided that the following conditions are met:\par +\par +1. Redistributions of source code must retain the above copyright notice, this\par +list of conditions and the following disclaimer.\par +\par +2. Redistributions in binary form must reproduce the above copyright notice,\par +this list of conditions and the following disclaimer in the documentation and/or\par +other materials provided with the distribution.\par +\par +3. Neither the name of the copyright holder nor the names of its contributors\par +may be used to endorse or promote products derived from this software without\par +specific prior written permission.\par +\par +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND\par +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\par +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\par +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR\par +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\par +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\par +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\par +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\par +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\par +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\par +\par +-----------------\par +Armadillo License\par +-----------------\par +\par +Apache License\par + Version 2.0, January 2004\par + {{\field{\*\fldinst{HYPERLINK http://www.apache.org/licenses/ }}{\fldrslt{http://www.apache.org/licenses/\ul0\cf0}}}}\f0\fs22\par +\par + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\par +\par + 1. Definitions.\par +\par + "License" shall mean the terms and conditions for use, reproduction,\par + and distribution as defined by Sections 1 through 9 of this document.\par +\par + "Licensor" shall mean the copyright owner or entity authorized by\par + the copyright owner that is granting the License.\par +\par + "Legal Entity" shall mean the union of the acting entity and all\par + other entities that control, are controlled by, or are under common\par + control with that entity. For the purposes of this definition,\par + "control" means (i) the power, direct or indirect, to cause the\par + direction or management of such entity, whether by contract or\par + otherwise, or (ii) ownership of fifty percent (50%) or more of the\par + outstanding shares, or (iii) beneficial ownership of such entity.\par +\par + "You" (or "Your") shall mean an individual or Legal Entity\par + exercising permissions granted by this License.\par +\par + "Source" form shall mean the preferred form for making modifications,\par + including but not limited to software source code, documentation\par + source, and configuration files.\par +\par + "Object" form shall mean any form resulting from mechanical\par + transformation or translation of a Source form, including but\par + not limited to compiled object code, generated documentation,\par + and conversions to other media types.\par +\par + "Work" shall mean the work of authorship, whether in Source or\par + Object form, made available under the License, as indicated by a\par + copyright notice that is included in or attached to the work\par + (an example is provided in the Appendix below).\par +\par + "Derivative Works" shall mean any work, whether in Source or Object\par + form, that is based on (or derived from) the Work and for which the\par + editorial revisions, annotations, elaborations, or other modifications\par + represent, as a whole, an original work of authorship. For the purposes\par + of this License, Derivative Works shall not include works that remain\par + separable from, or merely link (or bind by name) to the interfaces of,\par + the Work and Derivative Works thereof.\par +\par + "Contribution" shall mean any work of authorship, including\par + the original version of the Work and any modifications or additions\par + to that Work or Derivative Works thereof, that is intentionally\par + submitted to Licensor for inclusion in the Work by the copyright owner\par + or by an individual or Legal Entity authorized to submit on behalf of\par + the copyright owner. For the purposes of this definition, "submitted"\par + means any form of electronic, verbal, or written communication sent\par + to the Licensor or its representatives, including but not limited to\par + communication on electronic mailing lists, source code control systems,\par + and issue tracking systems that are managed by, or on behalf of, the\par + Licensor for the purpose of discussing and improving the Work, but\par + excluding communication that is conspicuously marked or otherwise\par + designated in writing by the copyright owner as "Not a Contribution."\par +\par + "Contributor" shall mean Licensor and any individual or Legal Entity\par + on behalf of whom a Contribution has been received by Licensor and\par + subsequently incorporated within the Work.\par +\par + 2. Grant of Copyright License. Subject to the terms and conditions of\par + this License, each Contributor hereby grants to You a perpetual,\par + worldwide, non-exclusive, no-charge, royalty-free, irrevocable\par + copyright license to reproduce, prepare Derivative Works of,\par + publicly display, publicly perform, sublicense, and distribute the\par + Work and such Derivative Works in Source or Object form.\par +\par + 3. Grant of Patent License. Subject to the terms and conditions of\par + this License, each Contributor hereby grants to You a perpetual,\par + worldwide, non-exclusive, no-charge, royalty-free, irrevocable\par + (except as stated in this section) patent license to make, have made,\par + use, offer to sell, sell, import, and otherwise transfer the Work,\par + where such license applies only to those patent claims licensable\par + by such Contributor that are necessarily infringed by their\par + Contribution(s) alone or by combination of their Contribution(s)\par + with the Work to which such Contribution(s) was submitted. If You\par + institute patent litigation against any entity (including a\par + cross-claim or counterclaim in a lawsuit) alleging that the Work\par + or a Contribution incorporated within the Work constitutes direct\par + or contributory patent infringement, then any patent licenses\par + granted to You under this License for that Work shall terminate\par + as of the date such litigation is filed.\par +\par + 4. Redistribution. You may reproduce and distribute copies of the\par + Work or Derivative Works thereof in any medium, with or without\par + modifications, and in Source or Object form, provided that You\par + meet the following conditions:\par +\par + (a) You must give any other recipients of the Work or\par + Derivative Works a copy of this License; and\par +\par + (b) You must cause any modified files to carry prominent notices\par + stating that You changed the files; and\par +\par + (c) You must retain, in the Source form of any Derivative Works\par + that You distribute, all copyright, patent, trademark, and\par + attribution notices from the Source form of the Work,\par + excluding those notices that do not pertain to any part of\par + the Derivative Works; and\par +\par + (d) If the Work includes a "NOTICE" text file as part of its\par + distribution, then any Derivative Works that You distribute must\par + include a readable copy of the attribution notices contained\par + within such NOTICE file, excluding those notices that do not\par + pertain to any part of the Derivative Works, in at least one\par + of the following places: within a NOTICE text file distributed\par + as part of the Derivative Works; within the Source form or\par + documentation, if provided along with the Derivative Works; or,\par + within a display generated by the Derivative Works, if and\par + wherever such third-party notices normally appear. The contents\par + of the NOTICE file are for informational purposes only and\par + do not modify the License. You may add Your own attribution\par + notices within Derivative Works that You distribute, alongside\par + or as an addendum to the NOTICE text from the Work, provided\par + that such additional attribution notices cannot be construed\par + as modifying the License.\par +\par + You may add Your own copyright statement to Your modifications and\par + may provide additional or different license terms and conditions\par + for use, reproduction, or distribution of Your modifications, or\par + for any such Derivative Works as a whole, provided Your use,\par + reproduction, and distribution of the Work otherwise complies with\par + the conditions stated in this License.\par +\par + 5. Submission of Contributions. Unless You explicitly state otherwise,\par + any Contribution intentionally submitted for inclusion in the Work\par + by You to the Licensor shall be under the terms and conditions of\par + this License, without any additional terms or conditions.\par + Notwithstanding the above, nothing herein shall supersede or modify\par + the terms of any separate license agreement you may have executed\par + with Licensor regarding such Contributions.\par +\par + 6. Trademarks. This License does not grant permission to use the trade\par + names, trademarks, service marks, or product names of the Licensor,\par + except as required for reasonable and customary use in describing the\par + origin of the Work and reproducing the content of the NOTICE file.\par +\par + 7. Disclaimer of Warranty. Unless required by applicable law or\par + agreed to in writing, Licensor provides the Work (and each\par + Contributor provides its Contributions) on an "AS IS" BASIS,\par + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\par + implied, including, without limitation, any warranties or conditions\par + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\par + PARTICULAR PURPOSE. You are solely responsible for determining the\par + appropriateness of using or redistributing the Work and assume any\par + risks associated with Your exercise of permissions under this License.\par +\par + 8. Limitation of Liability. In no event and under no legal theory,\par + whether in tort (including negligence), contract, or otherwise,\par + unless required by applicable law (such as deliberate and grossly\par + negligent acts) or agreed to in writing, shall any Contributor be\par + liable to You for damages, including any direct, indirect, special,\par + incidental, or consequential damages of any character arising as a\par + result of this License or out of the use or inability to use the\par + Work (including but not limited to damages for loss of goodwill,\par + work stoppage, computer failure or malfunction, or any and all\par + other commercial damages or losses), even if such Contributor\par + has been advised of the possibility of such damages.\par +\par + 9. Accepting Warranty or Additional Liability. While redistributing\par + the Work or Derivative Works thereof, You may choose to offer,\par + and charge a fee for, acceptance of support, warranty, indemnity,\par + or other liability obligations and/or rights consistent with this\par + License. However, in accepting such obligations, You may act only\par + on Your own behalf and on Your sole responsibility, not on behalf\par + of any other Contributor, and only if You agree to indemnify,\par + defend, and hold each Contributor harmless for any liability\par + incurred by, or claims asserted against, such Contributor by reason\par + of your accepting any such warranty or additional liability.\par +\par + END OF TERMS AND CONDITIONS\par +\par + APPENDIX: How to apply the Apache License to your work.\par +\par + To apply the Apache License to your work, attach the following\par + boilerplate notice, with the fields enclosed by brackets "[]"\par + replaced with your own identifying information. (Don't include\par + the brackets!) The text should be enclosed in the appropriate\par + comment syntax for the file format. We also recommend that a\par + file or class name and description of purpose be included on the\par + same "printed page" as the copyright notice for easier\par + identification within third-party archives.\par +\par + Copyright [yyyy] [name of copyright owner]\par +\par + Licensed under the Apache License, Version 2.0 (the "License");\par + you may not use this file except in compliance with the License.\par + You may obtain a copy of the License at\par +\par + {{\field{\*\fldinst{HYPERLINK http://www.apache.org/licenses/LICENSE-2.0 }}{\fldrslt{http://www.apache.org/licenses/LICENSE-2.0\ul0\cf0}}}}\f0\fs22\par +\par + Unless required by applicable law or agreed to in writing, software\par + distributed under the License is distributed on an "AS IS" BASIS,\par + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\par + See the License for the specific language governing permissions and\par + limitations under the License.\par +\par +-------------\par +Boost License\par +-------------\par +\par +Boost Software License - Version 1.0 - August 17th, 2003\par +\par +Permission is hereby granted, free of charge, to any person or organization\par +obtaining a copy of the software and accompanying documentation covered by\par +this license (the "Software") to use, reproduce, display, distribute,\par +execute, and transmit the Software, and to prepare derivative works of the\par +Software, and to permit third-parties to whom the Software is furnished to\par +do so, all subject to the following:\par +\par +The copyright notices in the Software and this entire statement, including\par +the above license grant, this restriction and the following disclaimer,\par +must be included in all copies of the Software, in whole or in part, and\par +all derivative works of the Software, unless such copies or derivative\par +works are solely in the form of machine-executable object code generated by\par +a source language processor.\par +\par +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\par +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\par +FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT\par +SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE\par +FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,\par +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\par +DEALINGS IN THE SOFTWARE.\par +\par +} + \ No newline at end of file