diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-24 19:04:47 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-02-24 19:04:47 +0200 |
| commit | 40746c60fed9e70f3cb7f6f12f55595a77a1adfa (patch) | |
| tree | 815a77a25888aceed48d15a9ce2f977e0d9ee845 /Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller | |
| parent | 64b768178dc9e64293a52c1b6d2631709af9502a (diff) | |
| download | Tango-40746c60fed9e70f3cb7f6f12f55595a77a1adfa.tar.gz Tango-40746c60fed9e70f3cb7f6f12f55595a77a1adfa.zip | |
Fixed PPC and Machine Studio issues before next release.
Started working on Advanced Installer libraries.
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller')
5 files changed, 190 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/AdvancedInstaller_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/AdvancedInstaller_TST.cs new file mode 100644 index 000000000..60a047c0c --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/AdvancedInstaller_TST.cs @@ -0,0 +1,45 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.AdvancedInstaller; +using Tango.Core.IO; + +namespace Tango.UnitTesting.AdvancedInstaller +{ + [TestClass] + [TestCategory("Advanced Installer")] + public class AdvancedInstaller_TST + { + [TestMethod] + public void Set_Version_and_Package_name_And_Build() + { + InstallerBuilder builder = new InstallerBuilder(); + + var demo_project_path = Directory.GetCurrentDirectory() + "\\AdvancedInstaller\\DemoProject"; + var project_Path = Path.Combine(demo_project_path, "DemoProject.aip"); + var files_path = Path.Combine(demo_project_path, "Files"); + var added_file = files_path + "\\addedFile.txt"; + + File.WriteAllText(added_file, "Added File!"); + + var output_folder = TemporaryManager.Default.CreateFolder(); + + builder.ProjectFile = project_Path; + builder.OutputFolder = output_folder; + builder.ProductName = "TEST TEST TEST"; + builder.ProductVersion = "2.0.0.0"; + builder.PackageType = PackageType.MSI; + + builder.Build().Wait(); + + File.Delete(added_file); + + output_folder.Display(); + } + } +} diff --git a/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/DemoProject.aip b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/DemoProject.aip new file mode 100644 index 000000000..a4889c4c0 --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/DemoProject.aip @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<DOCUMENT Type="Advanced Installer" CreateVersion="15.6" version="15.6" Modules="professional" RootPath="." Language="en" Id="{758E8AE6-F7B2-4F17-90B0-B5B869D8A0CB}"> + <COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent"> + <ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiDriverPackagesComponent;UserAccountsComponent;ScheduledTasksComponent;SqlConnectionComponent;AutorunComponent;FirewallExceptionComponent;GameUxComponent;MsiDirectEditorComponent;SharePointSlnComponent;SilverlightSlnComponent;MultipleInstancesComponent;SccmComponent;ActSyncAppComponent;FixupComponent"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent"> + <ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/> + <ROW Property="ALLUSERS" Value="1"/> + <ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/> + <ROW Property="Manufacturer" Value="Twine"/> + <ROW Property="ProductCode" Value="1033:{C26BE216-84DB-452A-BA46-F927A7F87F39} " Type="16"/> + <ROW Property="ProductLanguage" Value="1033"/> + <ROW Property="ProductName" Value="DemoProject"/> + <ROW Property="ProductVersion" Value="1.0.0" Type="32"/> + <ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND"/> + <ROW Property="UpgradeCode" Value="{5811F7D4-717E-420F-8DB4-E459D2802DC8}"/> + <ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/> + <ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/> + <ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/> + <ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/> + <ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/> + <ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/> + <ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/> + <ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003 RTM, Windows XP/2003 SP1, Windows XP SP2 x86" ValueLocId="-"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent"> + <ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/> + <ROW Directory="TARGETDIR" DefaultDir="SourceDir"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent"> + <ROW Component="File1.txt" ComponentId="{AE642AF8-E911-4723-ABA0-8214E3F20B59}" Directory_="APPDIR" Attributes="0" KeyPath="File1.txt" Type="0"/> + <ROW Component="ProductInformation" ComponentId="{78EB49C0-D65F-4A1D-98E7-6D64189B6C3C}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent"> + <ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0" Components="File1.txt ProductInformation"/> + <ATTRIBUTE name="CurrentFeature" value="MainFeature"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent"> + <ROW File="File1.txt" Component_="File1.txt" FileName="File1.txt" Attributes="0" SourcePath="Files\File1.txt" SelfReg="false" NextFile="File2.txt"/> + <ROW File="File2.txt" Component_="File1.txt" FileName="File2.txt" Attributes="0" SourcePath="Files\File2.txt" SelfReg="false" NextFile="File3.txt"/> + <ROW File="File3.txt" Component_="File1.txt" FileName="File3.txt" Attributes="0" SourcePath="Files\File3.txt" SelfReg="false"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent"> + <ROW BootstrOptKey="GlobalOptions" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites" Options="2"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.BuildComponent"> + <ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en" InstallationType="4" UseLargeSchema="true"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent"> + <ROW Path="<AI_DICTS>ui.ail"/> + <ROW Path="<AI_DICTS>ui_en.ail"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent"> + <ROW Fragment="CommonUI.aip" Path="<AI_FRAGS>CommonUI.aip"/> + <ROW Fragment="FolderDlg.aip" Path="<AI_THEMES>classic\fragments\FolderDlg.aip"/> + <ROW Fragment="MaintenanceTypeDlg.aip" Path="<AI_THEMES>classic\fragments\MaintenanceTypeDlg.aip"/> + <ROW Fragment="MaintenanceWelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\MaintenanceWelcomeDlg.aip"/> + <ROW Fragment="SequenceDialogs.aip" Path="<AI_THEMES>classic\fragments\SequenceDialogs.aip"/> + <ROW Fragment="Sequences.aip" Path="<AI_FRAGS>Sequences.aip"/> + <ROW Fragment="StaticUIStrings.aip" Path="<AI_FRAGS>StaticUIStrings.aip"/> + <ROW Fragment="UI.aip" Path="<AI_THEMES>classic\fragments\UI.aip"/> + <ROW Fragment="Validation.aip" Path="<AI_FRAGS>Validation.aip"/> + <ROW Fragment="VerifyRemoveDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRemoveDlg.aip"/> + <ROW Fragment="VerifyRepairDlg.aip" Path="<AI_THEMES>classic\fragments\VerifyRepairDlg.aip"/> + <ROW Fragment="WelcomeDlg.aip" Path="<AI_THEMES>classic\fragments\WelcomeDlg.aip"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent"> + <ROW Name="aicustact.dll" SourcePath="<AI_CUSTACTS>aicustact.dll"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent"> + <ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="1"/> + <ROW Dialog_="FolderDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/> + <ROW Dialog_="FolderDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/> + <ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/> + <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/> + <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="202"/> + <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/> + <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="FolderDlg" Condition="AI_INSTALL" Ordering="201"/> + <ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/> + <ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/> + <ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="501"/> + <ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/> + <ROW Dialog_="MaintenanceTypeDlg" Control_="RemoveButton" Event="NewDialog" Argument="VerifyRemoveDlg" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="601"/> + <ROW Dialog_="VerifyRemoveDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="1"/> + <ROW Dialog_="MaintenanceTypeDlg" Control_="RepairButton" Event="NewDialog" Argument="VerifyRepairDlg" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="601"/> + <ROW Dialog_="VerifyRepairDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="1"/> + <ROW Dialog_="VerifyRepairDlg" Control_="Repair" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode="Repair"" Ordering="399" Options="1"/> + <ROW Dialog_="VerifyRemoveDlg" Control_="Remove" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode="Remove"" Ordering="299" Options="1"/> + <ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/> + <ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/> + <ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/> + <ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="203"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent"> + <ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/> + <ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/> + <ROW Action="AI_EnableDebugLog" Type="321" Source="aicustact.dll" Target="EnableDebugLog"/> + <ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/> + <ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/> + <ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/> + <ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/> + <ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/> + <ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/> + <ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]"/> + <ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/> + <ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent"> + <ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/> + <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/> + <ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1501"/> + <ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1399"/> + <ROW Action="AI_ResolveKnownFolders" Sequence="52"/> + <ROW Action="AI_EnableDebugLog" Sequence="51"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent"> + <ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="749"/> + <ROW Action="AI_ResolveKnownFolders" Sequence="53"/> + <ROW Action="AI_DpiContentScale" Sequence="52"/> + <ROW Action="AI_EnableDebugLog" Sequence="51"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent"> + <ROW Condition="(VersionNT <> 400)" Description="[ProductName] cannot be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/> + <ROW Condition="(VersionNT <> 500)" Description="[ProductName] cannot be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/> + <ROW Condition="(VersionNT64 OR ((VersionNT <> 501) OR (ServicePackLevel = 3))) AND ((VersionNT <> 502) OR (ServicePackLevel = 2))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/> + <ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent"> + <ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/> + <ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent"> + <ATTRIBUTE name="UsedTheme" value="classic"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent"> + <ROW UpgradeCode="[|UpgradeCode]" VersionMin="0.0.1" VersionMax="[|ProductVersion]" Attributes="257" ActionProperty="OLDPRODUCTS"/> + <ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/> + </COMPONENT> + <COMPONENT cid="caphyon.advinst.msicomp.SynchronizedFolderComponent"> + <ROW Directory_="APPDIR" SourcePath="Files" ExcludePattern="*~|#*#|%*%|._|CVS|.cvsignore|SCCS|vssver.scc|mssccprj.scc|vssver2.scc|.svn|.DS_Store" ExcludeFlags="6"/> + </COMPONENT> +</DOCUMENT> diff --git a/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File1.txt b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File1.txt new file mode 100644 index 000000000..98336a696 --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File1.txt @@ -0,0 +1 @@ +File1
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File2.txt b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File2.txt new file mode 100644 index 000000000..c717c6dee --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File2.txt @@ -0,0 +1 @@ +File2
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File3.txt b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File3.txt new file mode 100644 index 000000000..7dd5c2097 --- /dev/null +++ b/Software/Visual_Studio/Tango.UnitTesting/AdvancedInstaller/DemoProject/Files/File3.txt @@ -0,0 +1 @@ +File3
\ No newline at end of file |
