diff --git a/.gitignore b/.gitignore index 1d799ec1c04..fc479e98614 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ env27/ obj/ dist/ MANIFEST +packaged_releases/windows/out # Result of running python setup.py install/pip install -e RECORD.txt @@ -73,7 +74,6 @@ private_config.json scripts/smart_create_gen/config.ini debug.log test_results/ -resources/ # Code coverage .coverage diff --git a/packaged_releases/README.md b/packaged_releases/README.md index 81d6e456658..68bbdbb36ab 100644 --- a/packaged_releases/README.md +++ b/packaged_releases/README.md @@ -67,7 +67,7 @@ $ shasum -a 256 azure-cli_packaged_{VERSION}.tar.gz 3 - Build/Release for Debian, Docker, Homebrew ---------------------------------------------- -Follow the instructions in the `debian`, `docker` and `homebrew` subdirectories to create these releases. +Follow the instructions in the `debian`, `docker`, `windows` and `homebrew` subdirectories to create these releases. 4 - Modify HISTORY.md diff --git a/packaged_releases/windows/Product.wxs b/packaged_releases/windows/Product.wxs new file mode 100644 index 00000000000..38c8cc3eeb1 --- /dev/null +++ b/packaged_releases/windows/Product.wxs @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packaged_releases/windows/README.md b/packaged_releases/windows/README.md new file mode 100644 index 00000000000..ca5ba78e768 --- /dev/null +++ b/packaged_releases/windows/README.md @@ -0,0 +1,26 @@ +Building the Windows MSI +======================== + +This document provides instructions on creating the MSI. + +Prerequisites +------------- + +1. Install 'WIX Toolset build tools' if not already installed. + http://wixtoolset.org/releases/ + +2. Get Git for Windows (it has several tools used for the build). + https://github.com/git-for-windows/git/releases/download/v2.12.2.windows.1/Git-2.12.2-32-bit.exe + +3. Install 'Microsoft Build Tools 2015'. + https://www.microsoft.com/en-us/download/details.aspx?id=48159 + +Building +-------- + +1. Change the 'ProductVersion' in `Product.wxs` when creating a new release. + In `.\scripts\prepareRepoClone.cmd` also change the CLI_VERSION in there. + +2. Run `build.cmd`. + +3. The unsigned MSI will be in the `.\out` folder. diff --git a/packaged_releases/windows/azure-cli.sln b/packaged_releases/windows/azure-cli.sln new file mode 100644 index 00000000000..73dd3a6ed7d --- /dev/null +++ b/packaged_releases/windows/azure-cli.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "azure-cli", "azure-cli.wixproj", "{9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Debug|x86.ActiveCfg = Debug|x86 + {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Debug|x86.Build.0 = Debug|x86 + {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Release|x86.ActiveCfg = Release|x86 + {9A0DC66D-3186-4EE4-B471-6C0F1DD6E159}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packaged_releases/windows/azure-cli.wixproj b/packaged_releases/windows/azure-cli.wixproj new file mode 100644 index 00000000000..c32c5c0e46b --- /dev/null +++ b/packaged_releases/windows/azure-cli.wixproj @@ -0,0 +1,54 @@ + + + + + $(HOMEDRIVE)$(HOMEPATH)\zwix\ + $(LocalWixRoot) + $(WixToolPath)Wix.targets + wixtasks.dll + $(HOMEDRIVE)$(HOMEPATH)\zcli + -fv + + + + Debug + x86 + 3.10 + 9a0dc66d-3186-4ee4-b471-6c0f1dd6e159 + 2.0 + Microsoft Azure CLI 2.0 + Package + $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets + $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets + + + out\$(Configuration)\ + out\obj\$(Configuration)\ + Debug;AzureCliSource=$(AzureCliSource) + + + out\ + out\obj\$(Configuration)\ + AzureCliSource=$(AzureCliSource) + + + + azure-cli.wxs + + + + + + + + + + $(WixExtDir)\WixUIExtension.dll + WixUIExtension + + + + + + + \ No newline at end of file diff --git a/packaged_releases/windows/build.cmd b/packaged_releases/windows/build.cmd new file mode 100644 index 00000000000..e84a4413c11 --- /dev/null +++ b/packaged_releases/windows/build.cmd @@ -0,0 +1,21 @@ +@echo off +echo Building the Windows Installer... +echo. +:: Add Git to the path as this should be run through a .NET command prompt +:: and not a Git bash shell... We also need the gnu toolchain (for curl & unzip) +set PATH=%PATH%;"C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\MSBuild\14.0\Bin" + +pushd %~dp0 + +CALL scripts\prepareBuild.cmd +if %errorlevel% neq 0 exit /b %errorlevel% + +echo Building MSI... +msbuild /t:rebuild /p:Configuration=Release + +echo. + +if not "%1"=="-noprompt" ( + start .\out\ +) +popd diff --git a/packaged_releases/windows/propagate_env_change/main.cpp b/packaged_releases/windows/propagate_env_change/main.cpp new file mode 100644 index 00000000000..c1545cd7f3c --- /dev/null +++ b/packaged_releases/windows/propagate_env_change/main.cpp @@ -0,0 +1,14 @@ +#include "windows.h" + +int main(int argc, LPCWSTR argv[]) +{ + LRESULT dwResult = SendMessageTimeout(HWND_BROADCAST, + WM_SETTINGCHANGE, + 0, + (LPARAM)L"Environment", + SMTO_ABORTIFHUNG, + 5000, + NULL); + + return (dwResult) ? 0 : 1; +} diff --git a/packaged_releases/windows/propagate_env_change/propagate_env_change.exe b/packaged_releases/windows/propagate_env_change/propagate_env_change.exe new file mode 100644 index 00000000000..7b88b11401d Binary files /dev/null and b/packaged_releases/windows/propagate_env_change/propagate_env_change.exe differ diff --git a/packaged_releases/windows/propagate_env_change/propagate_env_change.sln b/packaged_releases/windows/propagate_env_change/propagate_env_change.sln new file mode 100644 index 00000000000..91ffde32d81 --- /dev/null +++ b/packaged_releases/windows/propagate_env_change/propagate_env_change.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2013 +VisualStudioVersion = 12.0.40629.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "propagate_env_change", "propagate_env_change.vcxproj", "{3A0362EF-D3B7-4FFE-B866-D6104B32C129}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3A0362EF-D3B7-4FFE-B866-D6104B32C129}.Debug|Win32.ActiveCfg = Debug|Win32 + {3A0362EF-D3B7-4FFE-B866-D6104B32C129}.Debug|Win32.Build.0 = Debug|Win32 + {3A0362EF-D3B7-4FFE-B866-D6104B32C129}.Release|Win32.ActiveCfg = Release|Win32 + {3A0362EF-D3B7-4FFE-B866-D6104B32C129}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/packaged_releases/windows/propagate_env_change/propagate_env_change.vcxproj b/packaged_releases/windows/propagate_env_change/propagate_env_change.vcxproj new file mode 100644 index 00000000000..3e8e652168d --- /dev/null +++ b/packaged_releases/windows/propagate_env_change/propagate_env_change.vcxproj @@ -0,0 +1,84 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {3A0362EF-D3B7-4FFE-B866-D6104B32C129} + Win32Proj + propagate_env_change + + + + Application + true + v120 + Unicode + + + Application + false + v120 + true + Unicode + + + + + + + + + + + + + true + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/packaged_releases/windows/propagate_env_change/propagate_env_change.vcxproj.filters b/packaged_releases/windows/propagate_env_change/propagate_env_change.vcxproj.filters new file mode 100644 index 00000000000..0d8d9e45712 --- /dev/null +++ b/packaged_releases/windows/propagate_env_change/propagate_env_change.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/packaged_releases/windows/resources/CLI_LICENSE.rtf b/packaged_releases/windows/resources/CLI_LICENSE.rtf new file mode 100644 index 00000000000..df68e993b5e --- /dev/null +++ b/packaged_releases/windows/resources/CLI_LICENSE.rtf @@ -0,0 +1,137 @@ +{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Tahoma;}{\f1\fnil\fcharset0 Times New Roman;}{\f2\fnil\fcharset2 Symbol;}{\f3\fnil Tahoma;}} +{\colortbl ;\red0\green0\blue255;} +{\*\generator Riched20 6.3.9600}\viewkind4\uc1 +\pard\sb120\sa120\sl240\slmult1\b\f0\fs20\lang9 MICROSOFT PRE-RELEASE SOFTWARE LICENSE TERMS\f1\par +\f0 MICROSOFT AZURE DEPLOYMENT TOOLS\f1\par +\b0\f0 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the pre-release software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\f1\par + +\pard\fi-360\li360\sb120\sa120\sl240\slmult1\tx360\f2\'b7\tab\f0 updates,\f1\par + +\pard\fi-360\li360\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 supplements,\f1\par +\f2\'b7\tab\f0 Internet-based services, and\f1\par +\f2\'b7\tab\f0 support services\f1\par + +\pard\sb120\sa120\sl240\slmult1\f0 for this software, unless other terms accompany those items. If so, those terms apply.\f1\par +\b\f0 BY USING THE SOFTWARE, YOU ACCEPT THESE TERMS. IF YOU DO NOT ACCEPT THEM, DO NOT USE THE SOFTWARE.\f1\par +\f0 AS DESCRIBED BELOW, USING SOME FEATURES ALSO OPERATES AS YOUR CONSENT TO THE TRANSMISSION OF CERTAIN STANDARD COMPUTER INFORMATION FOR INTERNET-BASED SERVICES.\f1\par +\f0 IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\f0 1.\tab INSTALLATION AND USE RIGHTS. \b0\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\b\f0 a.\tab Installation and Use.\f1\par + +\pard\fi-357\li1077\sb120\sa120\sl240\slmult1\tx1080\b0\f2\'b7\tab\f0 You may install and use any number of copies of the software on your premises to design, develop and test your programs for use with the software. \f1\par + +\pard\fi-357\li1077\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 You may not test the software in a live operating environment unless Microsoft permits you to do so under another agreement.\par + +\pard{\pntext\f2\'B7\tab}{\*\pn\pnlvlblt\pnf2\pnindent360{\pntxtb\'B7}}\fi-360\li717\sb120\sa120\sl240\slmult1\tx720\b Third Party Programs.\b0 The software may include third party programs that Microsoft, not the third party, licenses to you under this agreement. Notices, if any, for the third party program are included for your information only.\b\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360 2.\tab INTERNET-BASED SERVICES. \b0 Microsoft provides Internet-based services with the software. It may change or cancel them at any time. For more information about these software features, see {{\field{\*\fldinst{HYPERLINK http://www.microsoft.com/online/legal/?langid=en-us&docid=1 }}{\fldrslt{http://www.microsoft.com/online/legal/?langid=en-us&docid=1\ul0\cf0}}}}\f0\fs20 .\par +\b 3.\tab TERM.\b0 The term of this agreement is one year, or commercial release of the software, whichever is first.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\b\f0 4.\tab PRE-RELEASE SOFTWARE. \b0 This software is a pre-release version. It may not work the way a final version of the software will. We may change it for the final, commercial version. We also may not release a commercial version.\f1\par +\b\f0 5.\tab FEEDBACK. \b0 If you give feedback about the software to Microsoft, you give to Microsoft, without charge, the right to use, share and commercialize your feedback in any way and for any purpose. You also give to third parties, without charge, any patent rights needed for their products, technologies and services to use or interface with any specific parts of a Microsoft software or service that includes the feedback. You will not give feedback that is subject to a license that requires Microsoft to license its software or documentation to third parties because we include your feedback in them. These rights survive this agreement.\f1\par +\b\f0 6.\tab SCOPE OF LICENSE.\b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\f2\'b7\tab\f0 work around any technical limitations in the software;\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\f1\par +\f2\'b7\tab\f0 make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;\f1\par +\f2\'b7\tab\f0 publish the software for others to copy;\f1\par +\f2\'b7\tab\f0 rent, lease or lend the software;\f1\par +\f2\'b7\tab\f0 transfer the software or this agreement to any third party; or\f1\par +\f2\'b7\tab\f0 use the software for commercial software hosting services.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\b\f0 7.\tab EXPORT RESTRICTIONS.\b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting\ul0\cf0}}}}\f1\fs20 .\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\b\f0 8.\tab SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\f1\par +\b\f0 9.\tab ENTIRE AGREEMENT.\b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\f1\par + +\pard\fi-360\li360\sb120\sa120\sl240\slmult1\tx360\b\f0 10.\tab APPLICABLE LAW.\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\f0 a.\tab United States.\b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\b\f0 b.\tab Outside the United States.\b0 If you acquired the software in any other country, the laws of that country apply.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\b\f0 11.\tab LEGAL EFFECT.\b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\f1\par +\b\f0 12.\tab DISCLAIMER OF WARRANTY. THE SOFTWARE IS LICENSED \ldblquote AS-IS.\rdblquote YOU BEAR THE RISK OF USING IT. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES OR CONDITIONS. YOU MAY HAVE ADDITIONAL CONSUMER RIGHTS OR STATUTORY GUARANTEES UNDER YOUR LOCAL LAWS WHICH THIS AGREEMENT CANNOT CHANGE. TO THE EXTENT PERMITTED UNDER YOUR LOCAL LAWS, MICROSOFT EXCLUDES THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.\f1\par + +\pard\li357\sb120\sa120\sl240\slmult1\f0 FOR AUSTRALIA - YOU HAVE STATUTORY GUARANTEES UNDER THE AUSTRALIAN CONSUMER LAW AND NOTHING IN THESE TERMS IS INTENDED TO AFFECT THOSE RIGHTS.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\f0 13.\tab LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.\f1\par + +\pard\li357\sb120\sa120\sl240\slmult1\b0\f0 This limitation applies to\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\f2\'b7\tab\f0 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\f1\par + +\pard\li360\sb120\sa120\sl240\slmult1\f0 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages.\f1\par + +\pard\sb120\sa120\sl240\slmult1\b\f0 Please note: As this software is distributed in Quebec, Canada, these license terms are provided below in French.\f1\par +\f0 Remarque : Ce logiciel \'e9tant distribu\'e9 au Qu\'e9bec, Canada, les termes de cette licence sont fournis ci-dessous en fran\'e7ais.TERMES DU CONTRAT DE LICENCE D\rquote UN LOGICIEL EN VERSION PR\'c9COMMERCIALE MICROSOFT\f1\par +\f0 MICROSOFT WINDOWS AZURE DEPLOYMENT TOOLS\f1\par +\b0\f0 Les pr\'e9sents termes ont valeur de contrat entre Microsoft Corporation (ou en fonction du lieu o\'f9 vous vivez, l\rquote un de ses affili\'e9s) et vous. Lisez-les attentivement. Ils portent sur le logiciel en version pr\'e9commerciale nomm\'e9 ci-dessus, y compris le support sur lequel vous l\rquote avez re\'e7u le cas \'e9ch\'e9ant. Ce contrat porte \'e9galement sur les produits Microsoft suivants :\b\f1\par + +\pard\fi-360\li360\sb120\sa120\sl240\slmult1\tx360\b0\f2\'b7\tab\f0 les mises \'e0 jour,\f1\par + +\pard\fi-360\li360\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 les suppl\'e9ments,\f1\par +\f2\'b7\tab\f0 les services Internet et\f1\par +\f2\'b7\tab\f0 les services d\rquote assistance technique\f1\par + +\pard\sb120\sa120\sl240\slmult1\f0 de ce logiciel \'e0 moins que d\rquote autres termes n\rquote accompagnent ces produits, auquel cas, ces derniers pr\'e9valent.\f1\par +\b\f0 EN UTILISANT LE LOGICIEL, VOUS ACCEPTEZ CES TERMES. SI VOUS NE LES ACCEPTEZ PAS, N\rquote UTILISEZ PAS LE LOGICIEL.\f1\par +\f0 COMME D\'c9CRIT CI-DESSOUS, EN UTILISANT CERTAINES FONCTIONS, VOUS CONSENTEZ \'c0 CE QUE MICROSOFT RECUEILLE CERTAINES INFORMATIONS STANDARD POUR DES SERVICES INTERNET.\f1\par +\f0 DANS LE CADRE DU PR\'c9SENT ACCORD DE LICENCE, VOUS DISPOSEZ DES DROITS CI-DESSOUS.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\f0 1.\tab INSTALLATION ET DROITS D\rquote UTILISATION. \b0\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\b\f0 a.\tab Installation et utilisation.\f1\par + +\pard\fi-357\li1077\sb120\sa120\sl240\slmult1\tx1080\b0\f2\'b7\tab\f0 Vous \'eates autoris\'e9 \'e0 installer et \'e0 utiliser un nombre quelconque de copies du logiciel dans vos locaux pour concevoir, d\'e9velopper et tester vos programmes avec le logiciel. \f1\par + +\pard\fi-357\li1077\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 Vous n\f3\rquote\'ea\f0 tes pas autoris\f3\'e9\f0 \f3\'e0\f0 tester le logiciel dans un environnement de production, sauf autorisation expresse de Microsoft en vertu d\f3\rquote\f0 un autre contrat.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\b\f0 2.\tab SERVICES INTERNET. \b0 Microsoft fournit des services Internet avec le logiciel. Ils peuvent \'eatre modifi\'e9s ou interrompus \'e0 tout moment. Pour plus d\rquote informations sur cette fonctionnalit\'e9, consultez {{\field{\*\fldinst{HYPERLINK http://www.microsoft.com/online/legal/?langid=en-us&docid=1 }}{\fldrslt{http://www.microsoft.com/online/legal/?langid=en-us&docid=1\ul0\cf0}}}}\f0\fs20 .\par +\b 3.\tab DUR\'c9E.\b0 Ce contrat est conclu pour une dur\'e9e de un an, ou la sortie commerciale du logiciel, selon la date la plus proche.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\b\f0 4.\tab LOGICIEL EN VERSION PR\'c9COMMERCIALE. \b0 Ce logiciel est une version pr\'e9commerciale. Il peut ne pas fonctionner comme une version final du logiciel. Nous sommes autoris\'e9s \'e0 le changer pour la version commerciale finale. Nous sommes \'e9galement autoris\'e9s \'e0 ne pas \'e9diter de version commerciale.\f1\par +\b\f0 5.\tab RETOUR D\rquote INFORMATIONS. \b0 Si vous faites part de vos observations concernant le logiciel \'e0 Microsoft, vous lui conc\'e9dez gracieusement le droit d\rquote utiliser, de partager et de commercialiser vos observations de quelque fa\'e7on que ce soit et \'e0 toute fin. Vous conc\'e9dez \'e9galement \'e0 des tiers, \'e0 titre gratuit, tout droit e propri\'e9t\'e9 sur leurs produits, technologies et services, n\'e9cessaires pour utiliser ou interfacer des parties sp\'e9cifiques d\rquote un logiciel ou service Microsoft qui inclut le retour d\rquote informations. Vous ne donnerez pas d\rquote informations faisant l\rquote objet d\rquote une licence qui impose \'e0 Microsoft de conc\'e9der sous licence son logiciel ou sa documentation \'e0 des tiers parce que nous y incluons vos observations. Ces droits survivent au pr\'e9sent contrat.\f1\par +\b\f0 6.\tab PORTEE DE LA LICENCE.\b0 Le logiciel est conc\'e9d\'e9 sous licence, pas vendu. Ce contrat vous octroie uniquement certains droits d\rquote utilisation du logiciel. Microsoft se r\'e9serve tous les autres droits. \'c0 moins que la loi en vigueur vous conf\'e8re davantage de droits nonobstant cette limitation, vous pouvez utiliser le logiciel uniquement tel qu\rquote explicitement autoris\'e9 dans le pr\'e9sent accord. \'c0 cette fin, vous devez respecter les restrictions techniques du logiciel qui autorisent uniquement son utilisation de certaines fa\'e7ons. Vous n\rquote\'eates pas autoris\'e9 \'e0 :\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\f2\'b7\tab\f0 contourner les limitations techniques du logiciel ;\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 reconstituer la logique du logiciel, le d\'e9compiler ou le d\'e9sassembler, sauf dans la mesure o\'f9 ces op\'e9rations seraient express\'e9ment autoris\'e9es par la r\'e9glementation applicable nonobstant la pr\'e9sente limitation ;\f1\par +\f2\'b7\tab\f0 faire plus de copies du logiciel que sp\'e9cifi\'e9 dans ce contrat ou par la r\'e9glementation applicable, nonobstant la pr\'e9sente limitation ;\f1\par +\f2\'b7\tab\f0 publier le logiciel pour que d\f3\rquote\f0 autres le copient ;\f1\par +\f2\'b7\tab\f0 louer ou pr\'eater le logiciel ;\f1\par +\f2\'b7\tab\f0 transf\'e9rer le logiciel ou le pr\'e9sent contrat \'e0 un tiers ; ou\f1\par +\f2\'b7\tab\f0 utiliser le logiciel pour des services d\f3\rquote\f0 h\f3\'e9\f0 bergement commercial.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\b\f0 7.\tab RESTRICTIONS \'c0 L\rquote EXPORTATION.\b0 Le logiciel est soumis \'e0 la r\'e9glementation am\'e9ricaine relative \'e0 l\rquote exportation. Vous devez vous conformer \'e0 toutes les r\'e9glementations nationales et internationales relatives aux exportations concernant le logiciel. Ces r\'e9glementations comprennent les restrictions sur les destinations, les utilisateurs finaux et l\rquote utilisation finale. Pour plus d\rquote informations, consultez le site {{\field{\*\fldinst{HYPERLINK www.microsoft.com/exporting }}{\fldrslt{www.microsoft.com/exporting\ul0\cf0}}}}\f1\fs20 .\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\b\f0 8.\tab SERVICES D\rquote ASSISTANCE TECHNIQUE.\b0 Comme ce logiciel est fourni \'ab en l'\'e9tat \'bb, nous ne fourniront aucun service d\rquote assistance.\f1\par +\b\f0 9.\tab INT\'c9GRALIT\'c9 DES ACCORDS.\b0 Le pr\'e9sent contrat ainsi que les termes concernant les suppl\'e9ments, les mises \'e0 jour, les services Internet et d\rquote assistance technique constituent l\rquote int\'e9gralit\'e9 des accords en ce qui concerne le logiciel et les services d\rquote assistance technique.\f1\par + +\pard\fi-360\li360\sb120\sa120\sl240\slmult1\b\f0 10.\tab DROIT APPLICABLE.\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\f0 a.\tab\'c9tats-Unis.\b0 Si vous avez acquis le logiciel aux \'c9tats-Unis, les lois de l\rquote\'c9tat de Washington, \'c9tats-Unis d\rquote Am\'e9rique, r\'e9gissent l\rquote interpr\'e9tation de ce contrat et s\rquote appliquent en cas de r\'e9clamation pour violation dudit contrat, nonobstant les conflits de principes juridiques. La r\'e9glementation du pays dans lequel vous vivez r\'e9git toutes les autres r\'e9clamations, notamment, et sans limitation, les r\'e9clamations dans le cadre des lois en faveur de la protection des consommateurs, relatives \'e0 la concurrence et aux d\'e9lits.\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\b\f0 b.\tab En dehors des \'c9tats-Unis.\b0 Si vous avez acquis le logiciel dans un autre pays, les lois de ce pays s\rquote appliquent.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\tx360\b\f0 11.\tab EFFET JURIDIQUE.\b0 Le pr\'e9sent contrat d\'e9crit certains droits juridiques. Vous pourriez avoir d\rquote autres droits pr\'e9vus par les lois de votre pays. Vous pourriez \'e9galement avoir des droits \'e0 l\rquote\'e9gard de la partie de qui vous avez acquis le logiciel. Le pr\'e9sent contrat ne modifie pas les droits que vous conf\'e8rent les lois de votre ou pays si celles-ci ne le permettent pas.\f1\par + +\pard\fi-357\li357\sb120\sa120\sl240\slmult1\b\f0 12.\tab EXCLUSIONS DE GARANTIE. LE LOGICIEL EST CONC\'c9D\'c9 SOUS LICENCE \'ab EN L\rquote\'c9TAT \'bb. VOUS ASSUMEZ TOUS LES RISQUES LI\'c9S \'c0 SON UTILISATION. MICROSOFT N\rquote ACCORDE AUCUNE GARANTIE OU CONDITION EXPRESSE. VOUS POUVEZ B\'c9N\'c9FICIER DE DROITS DES CONSOMMATEURS SUPPL\'c9MENTAIRES DANS LE CADRE DU DROIT LOCAL, QUE CE CONTRAT NE PEUT MODIFIER. LORSQUE CELA EST AUTORIS\'c9 PAR LE DROIT LOCAL, MICROSOFT EXCLUT LES GARANTIES IMPLICITES DE QUALIT\'c9, D\rquote AD\'c9QUATION \'c0 UN USAGE PARTICULIER ET D\rquote ABSENCE DE CONTREFA\'c7ON.\f1\par +\f0 13.\tab LIMITATION ET EXCLUSION DE RECOURS ET DE DOMMAGES. VOUS POUVEZ OBTENIR DE MICROSFOT ET DE SES FOURNISSEURS UNE INDEMNISATION EN CAS DE DOMMAGES DIRECTS LIMIT\'c9E UNIQUEMENT A HAUTEUR DE 5,00 $ US. VOUS NE POUVEZ PR\'c9TENDRE \'c0 AUCUNE INDEMNISATION POUR LES AUTRES DOMMAGES, Y COMPRIS LES DOMMAGES SP\'c9CIAUX, INDIRECTS OU ACCESSOIRES ET PERTES DE B\'c9N\'c9FICES.\f1\par + +\pard\li357\sb120\sa120\sl240\slmult1\b0\f0 Cette limitation concerne :\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\tx720\f2\'b7\tab\f0 toute affaire li\'e9e au logiciel, aux services ou au contenu (y compris le code) figurant sur des sites Internet tiers ou dans des programmes tiers et\f1\par + +\pard\fi-363\li720\sb120\sa120\sl240\slmult1\f2\'b7\tab\f0 les r\'e9clamations au titre de violation de contrat ou de garantie, ou au titre de responsabilit\'e9 stricte, de n\'e9gligence ou d\rquote une autre faute dans la limite autoris\'e9e par la loi en vigueur.\f1\par + +\pard\li360\sb120\sa120\sl240\slmult1\f0 Elle s\rquote applique \'e9galement m\'eame si Microsoft connaissait l'\'e9ventualit\'e9 d'un tel dommage. La limitation ou exclusion ci-dessus peut \'e9galement ne pas vous \'eatre applicable, car votre pays n\rquote autorise pas l\rquote exclusion ou la limitation de responsabilit\'e9 pour les dommages indirects, accessoires ou de quelque nature que ce soit.\f1\par + +\pard\sa200\sl276\slmult1\fs22\par +} + diff --git a/packaged_releases/windows/resources/ThirdPartyNotices.txt b/packaged_releases/windows/resources/ThirdPartyNotices.txt new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packaged_releases/windows/resources/banner.bmp b/packaged_releases/windows/resources/banner.bmp new file mode 100644 index 00000000000..e115559090c Binary files /dev/null and b/packaged_releases/windows/resources/banner.bmp differ diff --git a/packaged_releases/windows/resources/dialog.bmp b/packaged_releases/windows/resources/dialog.bmp new file mode 100644 index 00000000000..399c62e6f1e Binary files /dev/null and b/packaged_releases/windows/resources/dialog.bmp differ diff --git a/packaged_releases/windows/resources/windowsazure.ico b/packaged_releases/windows/resources/windowsazure.ico new file mode 100644 index 00000000000..76425402df6 Binary files /dev/null and b/packaged_releases/windows/resources/windowsazure.ico differ diff --git a/packaged_releases/windows/scripts/az.cmd b/packaged_releases/windows/scripts/az.cmd new file mode 100644 index 00000000000..f39da31a402 --- /dev/null +++ b/packaged_releases/windows/scripts/az.cmd @@ -0,0 +1,11 @@ +:: +:: Microsoft Azure CLI - Windows Installer - Author file components script +:: Copyright (C) Microsoft Corporation. All Rights Reserved. +:: + +@IF EXIST "%~dp0\..\python.exe" ( + "%~dp0\..\python.exe" -m azure.cli %* +) ELSE ( + echo Failed to load python executable. + exit /b 1 +) diff --git a/packaged_releases/windows/scripts/prepareBuild.cmd b/packaged_releases/windows/scripts/prepareBuild.cmd new file mode 100644 index 00000000000..f5a13d6600c --- /dev/null +++ b/packaged_releases/windows/scripts/prepareBuild.cmd @@ -0,0 +1,141 @@ +@echo off +:: Microsoft Azure CLI - Windows Installer - Author file components script +:: Copyright (C) Microsoft Corporation. All Rights Reserved. +:: +:: This re-builds partial WiX files for use in cloning the repo after install. +:: heat.exe from the WiX toolset is used for this. +:: +set CLI_VERSION=0.2.3 + +set PYTHON_VERSION=3.6.1 + +pushd %~dp0..\ + +set CLI_ARCHIVE_DOWNLOAD_URL=https://azurecliprod.blob.core.windows.net/releases/azure-cli_packaged_%CLI_VERSION%.tar.gz + +:: Download URL for Wix 10 from https://wix.codeplex.com/downloads/get/1587180 +:: Direct download URL http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&DownloadId=1587180&FileTime=131118854877130000&Build=21050 +:: We use a mirror of Wix storage on Azure blob storage as the above link can be slow... +set WIX_DOWNLOAD_URL="https://azurecliprod.blob.core.windows.net/msi/wix310-binaries-mirror.zip" + +set PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%.exe + +:: Set up the output directory and temp. directories +echo Cleaning previous build artifacts... +set OUTPUT_DIR=.\out +if exist %OUTPUT_DIR% rmdir /s /q %OUTPUT_DIR% +mkdir %OUTPUT_DIR% + +set TEMP_CLI_FOLDER=zcli +set TEMP_SCRATCH_FOLDER=zcli_scratch +set TEMP_WIX_FOLDER=zwix +set TEMP_PYTHON_FOLDER=zPython +set BUILDING_DIR=%HOMEDRIVE%%HOMEPATH%\%TEMP_CLI_FOLDER% +set SCRATCH_DIR=%HOMEDRIVE%%HOMEPATH%\%TEMP_SCRATCH_FOLDER% +set WIX_DIR=%HOMEDRIVE%%HOMEPATH%\%TEMP_WIX_FOLDER% +set PYTHON_DIR=%HOMEDRIVE%%HOMEPATH%\%TEMP_PYTHON_FOLDER% + +pushd %HOMEDRIVE%%HOMEPATH% +if exist %TEMP_CLI_FOLDER% rmdir /s /q %TEMP_CLI_FOLDER% +::rmdir always returns 0, so check folder's existence +if exist %TEMP_CLI_FOLDER% ( + echo Failed to delete %TEMP_CLI_FOLDER%. + goto ERROR +) +mkdir %TEMP_CLI_FOLDER% + +if exist %TEMP_SCRATCH_FOLDER% rmdir /s /q %TEMP_SCRATCH_FOLDER% +if exist %TEMP_SCRATCH_FOLDER% ( + echo Failed to delete %TEMP_SCRATCH_FOLDER%. + goto ERROR +) +mkdir %TEMP_SCRATCH_FOLDER% + +if exist %TEMP_PYTHON_FOLDER% ( + echo Using existing Python at %PYTHON_DIR% +) +if not exist %TEMP_PYTHON_FOLDER% ( + mkdir %TEMP_PYTHON_FOLDER% + pushd %PYTHON_DIR% + echo Downloading Python %PYTHON_VERSION% + curl -o python-installer.exe %PYTHON_DOWNLOAD_URL% + python-installer.exe /quiet InstallAllUsers=0 TargetDir=%PYTHON_DIR% PrependPath=0 AssociateFiles=0 CompileAll=1 Shortcuts=0 Include_test=0 Include_doc=0 Include_dev=0 Include_launcher=0 Include_tcltk=0 Include_tools=0 + if %errorlevel% neq 0 goto ERROR + del python-installer.exe + echo Downloaded Python %PYTHON_VERSION% to %PYTHON_DIR% successfully. + popd +) + +if exist %TEMP_WIX_FOLDER% ( + echo Using existing Wix at %WIX_DIR% +) +if not exist %TEMP_WIX_FOLDER% ( + mkdir %TEMP_WIX_FOLDER% + pushd %WIX_DIR% + echo Downloading Wix. + curl -o wix-archive.zip %WIX_DOWNLOAD_URL% + unzip -q wix-archive.zip + del wix-archive.zip + if %errorlevel% neq 0 goto ERROR + echo Wix downloaded and extracted successfully. + popd +) + +popd + +:: Download & unzip CLI archive +pushd %BUILDING_DIR% +echo Downloading CLI archive version %CLI_VERSION% +curl -o cli-archive.tar.gz %CLI_ARCHIVE_DOWNLOAD_URL% +gzip -d < cli-archive.tar.gz | tar xvf - +del cli-archive.tar.gz +if %errorlevel% neq 0 goto ERROR +echo Downloaded and extracted CLI archive successfully. +popd + +:: Use the Python version on the machine that creates the MSI +robocopy %PYTHON_DIR% %BUILDING_DIR% /s /NFL /NDL /NJH /NJS + +:: Build & install all the packages with bdist_wheel +%BUILDING_DIR%\python.exe -m pip install wheel +echo Building CLI packages... +set CLI_SRC=%BUILDING_DIR%\azure-cli_packaged_%CLI_VERSION%\src +for %%a in (%CLI_SRC%\azure-cli %CLI_SRC%\azure-cli-core %CLI_SRC%\azure-cli-nspkg) do ( + pushd %%a + %BUILDING_DIR%\python.exe setup.py bdist_wheel -d %SCRATCH_DIR% + popd +) +pushd %CLI_SRC%\command_modules +for /D %%a in (*) do ( + pushd %CLI_SRC%\command_modules\%%a + %BUILDING_DIR%\python.exe setup.py bdist_wheel -d %SCRATCH_DIR% + popd +) +echo Built CLI packages successfully. +popd +%BUILDING_DIR%\python.exe -m pip install azure-cli -f %SCRATCH_DIR% + +rmdir /s /q %BUILDING_DIR%\azure-cli_packaged_%CLI_VERSION% + +echo Creating the wbin (Windows binaries) folder that will be added to the path... +mkdir %BUILDING_DIR%\wbin +copy .\scripts\az.cmd %BUILDING_DIR%\wbin\ +if %errorlevel% neq 0 goto ERROR +copy .\resources\CLI_LICENSE.rtf %BUILDING_DIR% +copy .\resources\ThirdPartyNotices.txt %BUILDING_DIR% +if %errorlevel% neq 0 goto ERROR + +echo. + +:SUCCESS +echo Looks good. + +goto END + +:ERROR +echo Error occurred, please check the output for details. +exit /b 1 + +:END +exit /b 0 +popd