diff --git a/CSharp/VS13/GetWMI_Info.csproj b/CSharp/VS13/GetWMI_Info.csproj new file mode 100644 index 0000000..c228111 --- /dev/null +++ b/CSharp/VS13/GetWMI_Info.csproj @@ -0,0 +1,57 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3084ADC5-B76E-4BBD-A9B1-6ED655366388} + Exe + Properties + GetWMI_Info + GetWMI_Info + v2.0 + 512 + + + 3.5 + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + AllRules.ruleset + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + AllRules.ruleset + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharp/VS13/GetWMI_Info.sln b/CSharp/VS13/GetWMI_Info.sln new file mode 100644 index 0000000..8b6a27e --- /dev/null +++ b/CSharp/VS13/GetWMI_Info.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetWMI_Info", "GetWMI_Info.csproj", "{3084ADC5-B76E-4BBD-A9B1-6ED655366388}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CSharp/VS13/Properties/AssemblyInfo.cs b/CSharp/VS13/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1c5c598 --- /dev/null +++ b/CSharp/VS13/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("GetWMI_Info")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("GetWMI_Info")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("59deebfa-a674-4e50-80b9-e16199b4e5b9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CSharp/VS2005/GetWMI_Info.csproj b/CSharp/VS2005/GetWMI_Info.csproj new file mode 100644 index 0000000..4b1bee7 --- /dev/null +++ b/CSharp/VS2005/GetWMI_Info.csproj @@ -0,0 +1,51 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {3084ADC5-B76E-4BBD-A9B1-6ED655366388} + Exe + Properties + GetWMI_Info + GetWMI_Info + v2.0 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CSharp/VS2005/GetWMI_Info.sln b/CSharp/VS2005/GetWMI_Info.sln new file mode 100644 index 0000000..dfcd26e --- /dev/null +++ b/CSharp/VS2005/GetWMI_Info.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GetWMI_Info", "GetWMI_Info.csproj", "{3084ADC5-B76E-4BBD-A9B1-6ED655366388}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3084ADC5-B76E-4BBD-A9B1-6ED655366388}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CSharp/VS2005/Properties/AssemblyInfo.cs b/CSharp/VS2005/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1c5c598 --- /dev/null +++ b/CSharp/VS2005/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("GetWMI_Info")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("GetWMI_Info")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("59deebfa-a674-4e50-80b9-e16199b4e5b9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Installer.iss b/Installer.iss index 545d1b1..cdd4a37 100644 --- a/Installer.iss +++ b/Installer.iss @@ -2,6 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName 'Wmi Delphi Code Creator' #define MyAppVersion GetFileVersion('WDCC.exe') + [Files] Source: Themes\Aqua.theme.xml; DestDir: {app}\Themes\ Source: Themes\artofnet-darkonblue.theme.xml; DestDir: {app}\Themes\ @@ -60,31 +61,34 @@ Source: Themes\Zenburn.theme.xml; DestDir: {app}\Themes\ Source: WDCC.exe; DestDir: {app} Source: Extras\MonoDevelop.ico; DestDir: {app}\Extras\ Source: Lazarus\TemplateConsole.lpi; DestDir: {app}\Lazarus\ -Source: Oxygene\MonoDevelop\Properties\App.ico; DestDir: {app}\Oxygene\MonoDevelop\Properties -Source: Oxygene\MonoDevelop\Properties\AssemblyInfo.pas; DestDir: {app}\Oxygene\MonoDevelop\Properties -Source: Oxygene\MonoDevelop\Properties\Resources.Designer.pas; DestDir: {app}\Oxygene\MonoDevelop\Properties -Source: Oxygene\MonoDevelop\Properties\Resources.resx; DestDir: {app}\Oxygene\MonoDevelop\Properties -Source: Oxygene\MonoDevelop\Properties\Settings.Designer.pas; DestDir: {app}\Oxygene\MonoDevelop\Properties -Source: Oxygene\MonoDevelop\Properties\Settings.settings; DestDir: {app}\Oxygene\MonoDevelop\Properties -Source: Oxygene\MonoDevelop\GetWMI_Info.oxygene; DestDir: {app}\Oxygene\MonoDevelop -Source: Oxygene\MonoDevelop\GetWMI_Info.sln; DestDir: {app}\Oxygene\MonoDevelop -Source: Oxygene\MonoDevelop\GetWMI_Info.userprefs; DestDir: {app}\Oxygene\MonoDevelop -Source: Oxygene\VS2008\Properties\App.ico; DestDir: {app}\Oxygene\VS2008\Properties -Source: Oxygene\VS2008\Properties\AssemblyInfo.pas; DestDir: {app}\Oxygene\VS2008\Properties -Source: Oxygene\VS2008\Properties\Resources.Designer.pas; DestDir: {app}\Oxygene\VS2008\Properties -Source: Oxygene\VS2008\Properties\Resources.resx; DestDir: {app}\Oxygene\VS2008\Properties -Source: Oxygene\VS2008\Properties\Settings.Designer.pas; DestDir: {app}\Oxygene\VS2008\Properties -Source: Oxygene\VS2008\Properties\Settings.settings; DestDir: {app}\Oxygene\VS2008\Properties -Source: Oxygene\VS2008\GetWMI_Info.oxygene; DestDir: {app}\Oxygene\VS2008 -Source: Oxygene\VS2008\GetWMI_Info.sln; DestDir: {app}\Oxygene\VS2008 -Source: Oxygene\VS2010\Properties\App.ico; DestDir: {app}\Oxygene\VS2010\Properties -Source: Oxygene\VS2010\Properties\AssemblyInfo.pas; DestDir: {app}\Oxygene\VS2010\Properties -Source: Oxygene\VS2010\Properties\Resources.Designer.pas; DestDir: {app}\Oxygene\VS2010\Properties -Source: Oxygene\VS2010\Properties\Resources.resx; DestDir: {app}\Oxygene\VS2010\Properties -Source: Oxygene\VS2010\Properties\Settings.Designer.pas; DestDir: {app}\Oxygene\VS2010\Properties -Source: Oxygene\VS2010\Properties\Settings.settings; DestDir: {app}\Oxygene\VS2010\Properties -Source: Oxygene\VS2010\GetWMI_Info.oxygene; DestDir: {app}\Oxygene\VS2010 -Source: Oxygene\VS2010\GetWMI_Info.sln; DestDir: {app}\Oxygene\VS2010 + + +Source: "Oxygene\MonoDevelop\Properties\AssemblyInfo.pas"; DestDir: "{app}\Oxygene\MonoDevelop\Properties" +Source: "Oxygene\MonoDevelop\Properties\Resources.Designer.pas"; DestDir: "{app}\Oxygene\MonoDevelop\Properties" +Source: "Oxygene\MonoDevelop\Properties\Resources.resx"; DestDir: "{app}\Oxygene\MonoDevelop\Properties" +Source: "Oxygene\MonoDevelop\Properties\Settings.Designer.pas"; DestDir: "{app}\Oxygene\MonoDevelop\Properties" +Source: "Oxygene\MonoDevelop\Properties\Settings.settings"; DestDir: "{app}\Oxygene\MonoDevelop\Properties" +Source: "Oxygene\MonoDevelop\GetWMI_Info.oxygene"; DestDir: "{app}\Oxygene\MonoDevelop" +Source: "Oxygene\MonoDevelop\GetWMI_Info.sln"; DestDir: "{app}\Oxygene\MonoDevelop" +Source: "Oxygene\MonoDevelop\GetWMI_Info.userprefs"; DestDir: "{app}\Oxygene\MonoDevelop" + +Source: "Oxygene\VS2008\Properties\App.ico"; DestDir: "{app}\Oxygene\VS2008\Properties" +Source: "Oxygene\VS2008\Properties\AssemblyInfo.pas"; DestDir: "{app}\Oxygene\VS2008\Properties" +Source: "Oxygene\VS2008\Properties\Resources.Designer.pas"; DestDir: "{app}\Oxygene\VS2008\Properties" +Source: "Oxygene\VS2008\Properties\Resources.resx"; DestDir: "{app}\Oxygene\VS2008\Properties" +Source: "Oxygene\VS2008\Properties\Settings.Designer.pas"; DestDir: "{app}\Oxygene\VS2008\Properties" +Source: "Oxygene\VS2008\Properties\Settings.settings"; DestDir: "{app}\Oxygene\VS2008\Properties" +Source: "Oxygene\VS2008\GetWMI_Info.oxygene"; DestDir: "{app}\Oxygene\VS2008" +Source: "Oxygene\VS2008\GetWMI_Info.sln"; DestDir: "{app}\Oxygene\VS2008" +Source: "Oxygene\VS2010\Properties\App.ico"; DestDir: "{app}\Oxygene\VS2010\Properties" +Source: "Oxygene\VS2010\Properties\AssemblyInfo.pas"; DestDir: "{app}\Oxygene\VS2010\Properties" +Source: "Oxygene\VS2010\Properties\Resources.Designer.pas"; DestDir: "{app}\Oxygene\VS2010\Properties" +Source: "Oxygene\VS2010\Properties\Resources.resx"; DestDir: "{app}\Oxygene\VS2010\Properties" +Source: "Oxygene\VS2010\Properties\Settings.Designer.pas"; DestDir: "{app}\Oxygene\VS2010\Properties" +Source: "Oxygene\VS2010\Properties\Settings.settings"; DestDir: "{app}\Oxygene\VS2010\Properties" +Source: "Oxygene\VS2010\GetWMI_Info.oxygene"; DestDir: "{app}\Oxygene\VS2010" +Source: "Oxygene\VS2010\GetWMI_Info.sln"; DestDir: "{app}\Oxygene\VS2010" + Source: Delphi\Jedi.inc; DestDir: {app}\Delphi\ Source: Delphi\JediAPILib.inc; DestDir: {app}\Delphi\ Source: Delphi\JwaActiveX.pas; DestDir: {app}\Delphi\ @@ -93,145 +97,115 @@ Source: Delphi\JwaWinDLLNames.pas; DestDir: {app}\Delphi\ Source: Delphi\JwaWinNT.pas; DestDir: {app}\Delphi\ Source: Delphi\JwaWinType.pas; DestDir: {app}\Delphi\ Source: Delphi\WbemScripting_TLB.pas; DestDir: {app}\Delphi\ -Source: Microsoft_C++\VS2008\GetWMI_Info.sln; DestDir: {app}\Microsoft_C++\VS2008 -Source: Microsoft_C++\VS2008\GetWMI_Info.vcproj; DestDir: {app}\Microsoft_C++\VS2008 -Source: Microsoft_C++\VS2008\stdafx.cpp; DestDir: {app}\Microsoft_C++\VS2008 -Source: Microsoft_C++\VS2008\stdafx.h; DestDir: {app}\Microsoft_C++\VS2008 -Source: Microsoft_C++\VS2008\targetver.h; DestDir: {app}\Microsoft_C++\VS2008 -Source: Microsoft_C++\VS2010\GetWMI_Info.sln; DestDir: {app}\Microsoft_C++\VS2010 -Source: Microsoft_C++\VS2010\GetWMI_Info.vcxproj; DestDir: {app}\Microsoft_C++\VS2010 -Source: Microsoft_C++\VS2010\stdafx.cpp; DestDir: {app}\Microsoft_C++\VS2010 -Source: Microsoft_C++\VS2010\stdafx.h; DestDir: {app}\Microsoft_C++\VS2010 -Source: Microsoft_C++\VS2010\targetver.h; DestDir: {app}\Microsoft_C++\VS2010 -Source: Styles\Amakrits.vsf; DestDir: {app}\Styles\ -Source: Styles\AmethystKamri.vsf; DestDir: {app}\Styles\ -Source: Styles\AquaGraphite.vsf; DestDir: {app}\Styles\ -Source: Styles\AquaLightSlate.vsf; DestDir: {app}\Styles\ -Source: Styles\Auric.vsf; DestDir: {app}\Styles\ -Source: Styles\Glow.vsf; DestDir: {app}\Styles\ -Source: Styles\BlueGraphite.vsf; DestDir: {app}\Styles\ -Source: Styles\Carbon.vsf; DestDir: {app}\Styles\ -Source: Styles\CharcoalDarkSlate.vsf; DestDir: {app}\Styles\ -Source: Styles\CobaltXEMedia.vsf; DestDir: {app}\Styles\ -Source: Styles\CyanDusk.vsf; DestDir: {app}\Styles\ -Source: Styles\CyanNight.vsf; DestDir: {app}\Styles\ -Source: Styles\EmeraldLightSlate.vsf; DestDir: {app}\Styles\ -Source: Styles\GoldenGraphite.vsf; DestDir: {app}\Styles\ -Source: Styles\GreenGraphite.vsf; DestDir: {app}\Styles\ -Source: Styles\IcebergClassico.vsf; DestDir: {app}\Styles\ -Source: Styles\khaki.vsf; DestDir: {app}\Styles\ -Source: Styles\LavenderClassico.vsf; DestDir: {app}\Styles\ -Source: Styles\LightGreen.vsf; DestDir: {app}\Styles\ -Source: Styles\lilac.vsf; DestDir: {app}\Styles\ -Source: Styles\Metro Grey.vsf; DestDir: {app}\Styles\ -Source: Styles\MetroBlack.vsf; DestDir: {app}\Styles\ -Source: Styles\MetroBlue.vsf; DestDir: {app}\Styles\ -Source: Styles\MetroGreen.vsf; DestDir: {app}\Styles\ -Source: Styles\Orange.vsf; DestDir: {app}\Styles\ -Source: Styles\OrangeGraphite.vsf; DestDir: {app}\Styles\ -Source: Styles\Pink.vsf; DestDir: {app}\Styles\ -Source: Styles\RubyGraphite.vsf; DestDir: {app}\Styles\ -Source: Styles\SapphireKamri.vsf; DestDir: {app}\Styles\ -Source: Styles\sepia.vsf; DestDir: {app}\Styles\ -Source: Styles\Sky.vsf; DestDir: {app}\Styles\ -Source: Styles\SlateClassico.vsf; DestDir: {app}\Styles\ -Source: Styles\SmokeyQuartzKamri.vsf; DestDir: {app}\Styles\ -Source: Styles\TurquoiseGray.vsf; DestDir: {app}\Styles\ -Source: Styles\YellowGraphite.vsf; DestDir: {app}\Styles\ -Source: Microsoft_C++\VS11\GetWMI_Info.sln; DestDir: {app}\Microsoft_C++\VS11 -Source: Microsoft_C++\VS11\GetWMI_Info.vcxproj; DestDir: {app}\Microsoft_C++\VS11 -Source: Microsoft_C++\VS11\stdafx.cpp; DestDir: {app}\Microsoft_C++\VS11 -Source: Microsoft_C++\VS11\stdafx.h; DestDir: {app}\Microsoft_C++\VS11 -Source: Microsoft_C++\VS11\targetver.h; DestDir: {app}\Microsoft_C++\VS11 - -Source: Microsoft_C++\VS14\GetWMI_Info.sln; DestDir: {app}\Microsoft_C++\VS14 -Source: Microsoft_C++\VS14\GetWMI_Info.vcxproj; DestDir: {app}\Microsoft_C++\VS14 -Source: Microsoft_C++\VS14\stdafx.cpp; DestDir: {app}\Microsoft_C++\VS14 -Source: Microsoft_C++\VS14\stdafx.h; DestDir: {app}\Microsoft_C++\VS14 -Source: Microsoft_C++\VS14\targetver.h; DestDir: {app}\Microsoft_C++\VS14 - - -Source: CSharp\VS11\Properties\AssemblyInfo.cs; DestDir: {app}\CSharp\VS11\Properties -Source: CSharp\VS11\GetWMI_Info.csproj; DestDir: {app}\CSharp\VS11 -Source: CSharp\VS11\GetWMI_Info.sln; DestDir: {app}\CSharp\VS11 - -Source: CSharp\VS14\Properties\AssemblyInfo.cs; DestDir: {app}\CSharp\VS14\Properties -Source: CSharp\VS14\GetWMI_Info.csproj; DestDir: {app}\CSharp\VS14 -Source: CSharp\VS14\GetWMI_Info.sln; DestDir: {app}\CSharp\VS14 - - -Source: CSharp\VS2008\Properties\AssemblyInfo.cs; DestDir: {app}\CSharp\VS2008\Properties -Source: CSharp\VS2008\GetWMI_Info.csproj; DestDir: {app}\CSharp\VS2008 -Source: CSharp\VS2008\GetWMI_Info.sln; DestDir: {app}\CSharp\VS2008 -Source: CSharp\VS2010\Properties\AssemblyInfo.cs; DestDir: {app}\CSharp\VS2010\Properties -Source: CSharp\VS2010\GetWMI_Info.csproj; DestDir: {app}\CSharp\VS2010 -Source: CSharp\VS2010\GetWMI_Info.sln; DestDir: {app}\CSharp\VS2010 -Source: AStyle\bin\AStyle.exe; DestDir: {app}\AStyle\bin -Source: AStyle\doc\astyle.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\index.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\install.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\license.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\links.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\news.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\notes.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\scripts.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\styles.css; DestDir: {app}\AStyle\doc -Source: AStyle\doc\subversion.html; DestDir: {app}\AStyle\doc -Source: AStyle\doc\vsinstall.html; DestDir: {app}\AStyle\doc -Source: Templates\TemplateConsoleAppBorlandCPP.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppCSharp.cs; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppDelphi.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppDelphiSingleton.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppDelphiSingleton_TLB.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppDelphi_COM.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppDelphi_TLB.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppFPC.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppFPCSingleton.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppMicrosoftCPP.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateConsoleAppOxygen.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsBorlandCpp.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsCSharp.cs; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsDelphi.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsDelphiLate.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsDelphi_COM.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsFPC.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsMicrosoft.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateEventsOxygen.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateHelperFunctions.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerBorlandCPP.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerCSharp.cs; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerDelphi.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerDelphi_COM.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerDelphi_TLB.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerFPC.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerMicrosoftCPP.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateNonStaticMethodInvokerOxygen.pas; DestDir: {app}\Templates\ -Source: Templates\Templates.xml; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerBorlandCPP.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerCSharp.cs; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerDelphi.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerDelphi_COM.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerDelphi_TLB.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerFPC.pas; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerMicrosoftCPP.cpp; DestDir: {app}\Templates\ -Source: Templates\TemplateStaticMethodInvokerOxygen.pas; DestDir: {app}\Templates\ -Source: Templates\Template_BorlandCpp.cpp; DestDir: {app}\Templates\ -Source: Templates\Template_Csharp.cs; DestDir: {app}\Templates\ -Source: Templates\Template_Delphi.pas; DestDir: {app}\Templates\ -Source: Templates\Template_FPC.pas; DestDir: {app}\Templates\ -Source: Templates\Template_MicrosoftCpp.cpp; DestDir: {app}\Templates\ -Source: Templates\Template_Oxygen.pas; DestDir: {app}\Templates\ -Source: Textures\500.jpg; DestDir: {app}\Textures\ -Source: Textures\650..jpg; DestDir: {app}\Textures\ -Source: Textures\dark-metal-texture.jpg; DestDir: {app}\Textures\ -Source: Textures\metal-plate.jpg; DestDir: {app}\Textures\ -Source: Textures\metal-texture.jpg; DestDir: {app}\Textures\ -Source: Textures\speaker-grille-texture.jpg; DestDir: {app}\Textures\ -Source: Textures\stainless-steel.jpg; DestDir: {app}\Textures\ -Source: Textures\titanium-texture.jpg; DestDir: {app}\Textures\ -Source: Installer\VclStylesInno.dll; DestDir: {app}; Flags: dontcopy -Source: Installer\Auric.vsf; DestDir: {app}; Flags: dontcopy -Source: Installer\background.bmp; Flags: dontcopy + +Source: "Microsoft_C++\VS2005\GetWMI_Info.sln"; DestDir: "{app}\Microsoft_C++\VS2005" +Source: "Microsoft_C++\VS2005\GetWMI_Info.vcproj"; DestDir: "{app}\Microsoft_C++\VS2005" +Source: "Microsoft_C++\VS2005\stdafx.cpp"; DestDir: "{app}\Microsoft_C++\VS2005" +Source: "Microsoft_C++\VS2005\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS2005" +Source: "Microsoft_C++\VS2005\targetver.h"; DestDir: "{app}\Microsoft_C++\VS2005" + +Source: "Microsoft_C++\VS2008\GetWMI_Info.sln"; DestDir: "{app}\Microsoft_C++\VS2008" +Source: "Microsoft_C++\VS2008\GetWMI_Info.vcproj"; DestDir: "{app}\Microsoft_C++\VS2008" +Source: "Microsoft_C++\VS2008\stdafx.cpp"; DestDir: "{app}\Microsoft_C++\VS2008" +Source: "Microsoft_C++\VS2008\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS2008" +Source: "Microsoft_C++\VS2008\targetver.h"; DestDir: "{app}\Microsoft_C++\VS2008" + +Source: "Microsoft_C++\VS2010\GetWMI_Info.sln"; DestDir: "{app}\Microsoft_C++\VS2010" +Source: "Microsoft_C++\VS2010\GetWMI_Info.vcxproj"; DestDir: "{app}\Microsoft_C++\VS2010" +Source: "Microsoft_C++\VS2010\stdafx.cpp"; DestDir: "{app}\Microsoft_C++\VS2010" +Source: "Microsoft_C++\VS2010\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS2010" +Source: "Microsoft_C++\VS2010\targetver.h"; DestDir: "{app}\Microsoft_C++\VS2010" + +Source: "Microsoft_C++\VS11\GetWMI_Info.sln"; DestDir: "{app}\Microsoft_C++\VS11" +Source: "Microsoft_C++\VS11\GetWMI_Info.vcxproj"; DestDir: "{app}\Microsoft_C++\VS11" +Source: "Microsoft_C++\VS11\stdafx.cpp"; DestDir: "{app}\Microsoft_C++\VS11" +Source: "Microsoft_C++\VS11\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS11" +Source: "Microsoft_C++\VS11\targetver.h"; DestDir: "{app}\Microsoft_C++\VS11" + +Source: "Microsoft_C++\VS13\GetWMI_Info.sln"; DestDir: "{app}\Microsoft_C++\VS13" +Source: "Microsoft_C++\VS13\GetWMI_Info.vcxproj"; DestDir: "{app}\Microsoft_C++\VS13" +Source: "Microsoft_C++\VS13\stdafx.cpp"; DestDir: "{app}\Microsoft_C++\VS13" +Source: "Microsoft_C++\VS13\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS13" +Source: "Microsoft_C++\VS13\targetver.h"; DestDir: "{app}\Microsoft_C++\VS13" + +Source: "Microsoft_C++\VS14\GetWMI_Info.sln"; DestDir: "{app}\Microsoft_C++\VS14" +Source: "Microsoft_C++\VS14\GetWMI_Info.vcxproj"; DestDir: "{app}\Microsoft_C++\VS14" +Source: "Microsoft_C++\VS14\stdafx.cpp"; DestDir: "{app}\Microsoft_C++\VS14" +Source: "Microsoft_C++\VS14\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS14" +Source: "Microsoft_C++\VS14\targetver.h"; DestDir: "{app}\Microsoft_C++\VS14" + +Source: "Styles\Amakrits.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\AmethystKamri.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\AquaGraphite.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\AquaLightSlate.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Auric.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\BlueGraphite.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Carbon.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\CharcoalDarkSlate.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\CobaltXEMedia.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\EmeraldLightSlate.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Glossy.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Glow.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\GoldenGraphite.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\GreenGraphite.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\IcebergClassico.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\khaki.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\LavenderClassico.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Light.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\LightGreen.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\lilac.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Luna.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Metro Grey.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\MetroBlack.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\MetroBlue.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\MetroGreen.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\OnyxBlue.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\RubyGraphite.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\SapphireKamri.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Sky.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\SlateClassico.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\SmokeyQuartzKamri.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\TabletDark.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\TurquoiseGray.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Windows10.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Windows10Blue.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\Windows10Dark.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Styles\YellowGraphite.vsf"; DestDir: "{app}\Styles\"; Flags: ignoreversion +Source: "Microsoft_C++\VS14\stdafx.h"; DestDir: "{app}\Microsoft_C++\VS14" +Source: "Microsoft_C++\VS14\targetver.h"; DestDir: "{app}\Microsoft_C++\VS14" +Source: "CSharp\VS11\Properties\AssemblyInfo.cs"; DestDir: "{app}\CSharp\VS11\Properties" +Source: "CSharp\VS11\GetWMI_Info.csproj"; DestDir: "{app}\CSharp\VS11" +Source: "CSharp\VS11\GetWMI_Info.sln"; DestDir: "{app}\CSharp\VS11" +Source: "CSharp\VS14\Properties\AssemblyInfo.cs"; DestDir: "{app}\CSharp\VS14\Properties" +Source: "CSharp\VS14\GetWMI_Info.csproj"; DestDir: "{app}\CSharp\VS14" +Source: "CSharp\VS14\GetWMI_Info.sln"; DestDir: "{app}\CSharp\VS14" + +Source: "CSharp\VS2005\Properties\AssemblyInfo.cs"; DestDir: "{app}\CSharp\VS2005\Properties" +Source: "CSharp\VS2005\GetWMI_Info.csproj"; DestDir: "{app}\CSharp\VS2005" +Source: "CSharp\VS2005\GetWMI_Info.sln"; DestDir: "{app}\CSharp\VS2005" + +Source: "CSharp\VS2008\Properties\AssemblyInfo.cs"; DestDir: "{app}\CSharp\VS2008\Properties" +Source: "CSharp\VS2008\GetWMI_Info.csproj"; DestDir: "{app}\CSharp\VS2008" +Source: "CSharp\VS2008\GetWMI_Info.sln"; DestDir: "{app}\CSharp\VS2008" + +Source: "CSharp\VS2010\Properties\AssemblyInfo.cs"; DestDir: "{app}\CSharp\VS2010\Properties" +Source: "CSharp\VS2010\GetWMI_Info.csproj"; DestDir: "{app}\CSharp\VS2010" +Source: "CSharp\VS2010\GetWMI_Info.sln"; DestDir: "{app}\CSharp\VS2010" + +Source: "AStyle\bin\AStyle.exe"; DestDir: "{app}\AStyle\bin" +Source: "AStyle\doc\astyle.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\index.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\install.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\license.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\links.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\news.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\notes.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\scripts.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\styles.css"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\subversion.html"; DestDir: "{app}\AStyle\doc" +Source: "AStyle\doc\vsinstall.html"; DestDir: "{app}\AStyle\doc" +Source: "Templates\TemplateConsoleAppBorlandCPP.cpp"; DestDir: "{app}"; Flags: dontcopy +Source: "Installer\background.bmp"; Flags: dontcopy [Setup] UsePreviousLanguage=no @@ -387,36 +361,37 @@ begin end; [Dirs] -Name: {app}\Themes -Name: {app}\Cache -Name: {app}\Extras -Name: {app}\Lazarus -Name: {app}\Oxygene -Name: {app}\Oxygene\MonoDevelop -Name: {app}\Oxygene\MonoDevelop\Properties -Name: {app}\Oxygene\VS2008 -Name: {app}\Oxygene\VS2008\Properties -Name: {app}\Oxygene\VS2010 -Name: {app}\Oxygene\VS2010\Properties -Name: {app}\Delphi -Name: {app}\Microsoft_C++ -Name: {app}\Microsoft_C++\VS2008 -Name: {app}\Microsoft_C++\VS2010 -Name: {app}\Styles -Name: {app}\Microsoft_C++\VS11 -Name: {app}\Microsoft_C++\VS14 -Name: {app}\CSharp -Name: {app}\CSharp\VS14 -Name: {app}\CSharp\VS14\Properties -Name: {app}\CSharp\VS11 -Name: {app}\CSharp\VS11\Properties -Name: {app}\CSharp\VS2008 -Name: {app}\CSharp\VS2010 -Name: {app}\AStyle -Name: {app}\AStyle\bin -Name: {app}\AStyle\doc -Name: {app}\Templates -Name: {app}\Textures +Name: "{app}\Themes" +Name: "{app}\Cache" +Name: "{app}\Extras" +Name: "{app}\Lazarus" +Name: "{app}\Oxygene" +Name: "{app}\Oxygene\MonoDevelop" +Name: "{app}\Oxygene\MonoDevelop\Properties" +Name: "{app}\Oxygene\VS2008" +Name: "{app}\Oxygene\VS2008\Properties" +Name: "{app}\Oxygene\VS2010" +Name: "{app}\Oxygene\VS2010\Properties" +Name: "{app}\Delphi" +Name: "{app}\Microsoft_C++" +Name: "{app}\Microsoft_C++\VS2008" +Name: "{app}\Microsoft_C++\VS2010" +Name: "{app}\Styles" +Name: "{app}\Microsoft_C++\VS11" +Name: "{app}\Microsoft_C++\VS14" +Name: "{app}\CSharp" +Name: "{app}\CSharp\VS14" +Name: "{app}\CSharp\VS14\Properties" +Name: "{app}\CSharp\VS11" +Name: "{app}\CSharp\VS11\Properties" +Name: "{app}\CSharp\VS2008" +Name: "{app}\CSharp\VS2010" +Name: "{app}\AStyle" +Name: "{app}\AStyle\bin" +Name: "{app}\AStyle\doc" +Name: "{app}\Templates" +Name: "{app}\Textures" + [Icons] Name: {group}\Wmi Delphi Code Creator; Filename: {app}\WDCC.exe; WorkingDir: {app} Name: {userdesktop}\Wmi Delphi Code Creator; Filename: {app}\WDCC.exe; WorkingDir: {app} diff --git a/Microsoft_C++/VS13/GetWMI_Info.sln b/Microsoft_C++/VS13/GetWMI_Info.sln new file mode 100644 index 0000000..845e9a4 --- /dev/null +++ b/Microsoft_C++/VS13/GetWMI_Info.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetWMI_Info", "GetWMI_Info.vcxproj", "{CCDF23A2-717B-4E69-AF55-D97C78A2E621}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Debug|Win32.Build.0 = Debug|Win32 + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Release|Win32.ActiveCfg = Release|Win32 + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Microsoft_C++/VS13/GetWMI_Info.vcxproj b/Microsoft_C++/VS13/GetWMI_Info.vcxproj new file mode 100644 index 0000000..cf14f6a --- /dev/null +++ b/Microsoft_C++/VS13/GetWMI_Info.vcxproj @@ -0,0 +1,109 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {CCDF23A2-717B-4E69-AF55-D97C78A2E621} + GetWMI_Info + Win32Proj + $(VCTargetsPath11) + + + + Application + Unicode + true + v110 + + + Application + Unicode + v110 + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + true + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + false + AllRules.ruleset + + + AllRules.ruleset + + + + + + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + Use + Level3 + EditAndContinue + + + true + Console + MachineX86 + + + + + MaxSpeed + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + MultiThreadedDLL + true + Use + Level3 + ProgramDatabase + + + true + Console + true + true + MachineX86 + + + + + Create + Create + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft_C++/VS13/stdafx.cpp b/Microsoft_C++/VS13/stdafx.cpp new file mode 100644 index 0000000..d8494b5 --- /dev/null +++ b/Microsoft_C++/VS13/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// WMiCreator.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Microsoft_C++/VS13/stdafx.h b/Microsoft_C++/VS13/stdafx.h new file mode 100644 index 0000000..b005a83 --- /dev/null +++ b/Microsoft_C++/VS13/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Microsoft_C++/VS13/targetver.h b/Microsoft_C++/VS13/targetver.h new file mode 100644 index 0000000..6fe8eb7 --- /dev/null +++ b/Microsoft_C++/VS13/targetver.h @@ -0,0 +1,13 @@ +#pragma once + +// The following macros define the minimum required platform. The minimum required platform +// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run +// your application. The macros work by enabling all features available on platform versions up to and +// including the version specified. + +// Modify the following defines if you have to target a platform prior to the ones specified below. +// Refer to MSDN for the latest info on corresponding values for different platforms. +#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. +#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. +#endif + diff --git a/Microsoft_C++/VS2005/GetWMI_Info.sln b/Microsoft_C++/VS2005/GetWMI_Info.sln new file mode 100644 index 0000000..e7643d5 --- /dev/null +++ b/Microsoft_C++/VS2005/GetWMI_Info.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetWMI_Info", "GetWMI_Info.vcproj", "{CCDF23A2-717B-4E69-AF55-D97C78A2E621}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Debug|Win32.ActiveCfg = Debug|Win32 + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Debug|Win32.Build.0 = Debug|Win32 + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Release|Win32.ActiveCfg = Release|Win32 + {CCDF23A2-717B-4E69-AF55-D97C78A2E621}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Microsoft_C++/VS2005/GetWMI_Info.vcproj b/Microsoft_C++/VS2005/GetWMI_Info.vcproj new file mode 100644 index 0000000..efe9c0a --- /dev/null +++ b/Microsoft_C++/VS2005/GetWMI_Info.vcproj @@ -0,0 +1,225 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Microsoft_C++/VS2005/stdafx.cpp b/Microsoft_C++/VS2005/stdafx.cpp new file mode 100644 index 0000000..d8494b5 --- /dev/null +++ b/Microsoft_C++/VS2005/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// WMiCreator.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Microsoft_C++/VS2005/stdafx.h b/Microsoft_C++/VS2005/stdafx.h new file mode 100644 index 0000000..b005a83 --- /dev/null +++ b/Microsoft_C++/VS2005/stdafx.h @@ -0,0 +1,15 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Microsoft_C++/VS2005/targetver.h b/Microsoft_C++/VS2005/targetver.h new file mode 100644 index 0000000..6fe8eb7 --- /dev/null +++ b/Microsoft_C++/VS2005/targetver.h @@ -0,0 +1,13 @@ +#pragma once + +// The following macros define the minimum required platform. The minimum required platform +// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run +// your application. The macros work by enabling all features available on platform versions up to and +// including the version specified. + +// Modify the following defines if you have to target a platform prior to the ones specified below. +// Refer to MSDN for the latest info on corresponding values for different platforms. +#ifndef _WIN32_WINNT // Specifies that the minimum required platform is Windows Vista. +#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target other versions of Windows. +#endif + diff --git a/Styles/CyanDusk.vsf b/Styles/CyanDusk.vsf deleted file mode 100644 index 9c2f93d..0000000 Binary files a/Styles/CyanDusk.vsf and /dev/null differ diff --git a/Styles/CyanNight.vsf b/Styles/CyanNight.vsf deleted file mode 100644 index b62af1b..0000000 Binary files a/Styles/CyanNight.vsf and /dev/null differ diff --git a/Styles/Orange.vsf b/Styles/Orange.vsf deleted file mode 100644 index 6719383..0000000 Binary files a/Styles/Orange.vsf and /dev/null differ diff --git a/Styles/OrangeGraphite.vsf b/Styles/OrangeGraphite.vsf deleted file mode 100644 index 01e3117..0000000 Binary files a/Styles/OrangeGraphite.vsf and /dev/null differ diff --git a/Styles/Pink.vsf b/Styles/Pink.vsf deleted file mode 100644 index 8596f8b..0000000 Binary files a/Styles/Pink.vsf and /dev/null differ diff --git a/Styles/sepia.vsf b/Styles/sepia.vsf deleted file mode 100644 index 17df772..0000000 Binary files a/Styles/sepia.vsf and /dev/null differ diff --git a/Templates/TemplateConsoleAppBorlandCPP.cpp b/Templates/TemplateConsoleAppBorlandCPP.cpp index e0830a5..7a6e565 100644 --- a/Templates/TemplateConsoleAppBorlandCPP.cpp +++ b/Templates/TemplateConsoleAppBorlandCPP.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppCSharp.cs b/Templates/TemplateConsoleAppCSharp.cs index 56fea0e..9f1da9e 100644 --- a/Templates/TemplateConsoleAppCSharp.cs +++ b/Templates/TemplateConsoleAppCSharp.cs @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppDelphi.pas b/Templates/TemplateConsoleAppDelphi.pas index c3f7782..b4da649 100644 --- a/Templates/TemplateConsoleAppDelphi.pas +++ b/Templates/TemplateConsoleAppDelphi.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppDelphiSingleton.pas b/Templates/TemplateConsoleAppDelphiSingleton.pas index f583379..52cb099 100644 --- a/Templates/TemplateConsoleAppDelphiSingleton.pas +++ b/Templates/TemplateConsoleAppDelphiSingleton.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppDelphiSingleton_TLB.pas b/Templates/TemplateConsoleAppDelphiSingleton_TLB.pas index 51b73bf..c4516a7 100644 --- a/Templates/TemplateConsoleAppDelphiSingleton_TLB.pas +++ b/Templates/TemplateConsoleAppDelphiSingleton_TLB.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppDelphi_COM.pas b/Templates/TemplateConsoleAppDelphi_COM.pas index 712933c..a9f8322 100644 --- a/Templates/TemplateConsoleAppDelphi_COM.pas +++ b/Templates/TemplateConsoleAppDelphi_COM.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppDelphi_TLB.pas b/Templates/TemplateConsoleAppDelphi_TLB.pas index 73b531b..dae5a7d 100644 --- a/Templates/TemplateConsoleAppDelphi_TLB.pas +++ b/Templates/TemplateConsoleAppDelphi_TLB.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppFPC.pas b/Templates/TemplateConsoleAppFPC.pas index db501c8..c46df52 100644 --- a/Templates/TemplateConsoleAppFPC.pas +++ b/Templates/TemplateConsoleAppFPC.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppFPCSingleton.pas b/Templates/TemplateConsoleAppFPCSingleton.pas index 71f69bd..a2d7f97 100644 --- a/Templates/TemplateConsoleAppFPCSingleton.pas +++ b/Templates/TemplateConsoleAppFPCSingleton.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppMicrosoftCPP.cpp b/Templates/TemplateConsoleAppMicrosoftCPP.cpp index cff1e91..61e84a7 100644 --- a/Templates/TemplateConsoleAppMicrosoftCPP.cpp +++ b/Templates/TemplateConsoleAppMicrosoftCPP.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateConsoleAppOxygen.pas b/Templates/TemplateConsoleAppOxygen.pas index 0c76264..69f19c5 100644 --- a/Templates/TemplateConsoleAppOxygen.pas +++ b/Templates/TemplateConsoleAppOxygen.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsBorlandCpp.cpp b/Templates/TemplateEventsBorlandCpp.cpp index 89e593a..bc4c916 100644 --- a/Templates/TemplateEventsBorlandCpp.cpp +++ b/Templates/TemplateEventsBorlandCpp.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsCSharp.cs b/Templates/TemplateEventsCSharp.cs index e78b656..662a936 100644 --- a/Templates/TemplateEventsCSharp.cs +++ b/Templates/TemplateEventsCSharp.cs @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsDelphi.pas b/Templates/TemplateEventsDelphi.pas index 41b389a..81ccf43 100644 --- a/Templates/TemplateEventsDelphi.pas +++ b/Templates/TemplateEventsDelphi.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsDelphiLate.pas b/Templates/TemplateEventsDelphiLate.pas index 3874806..2015299 100644 --- a/Templates/TemplateEventsDelphiLate.pas +++ b/Templates/TemplateEventsDelphiLate.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsDelphi_COM.pas b/Templates/TemplateEventsDelphi_COM.pas index 18b8866..abcc88e 100644 --- a/Templates/TemplateEventsDelphi_COM.pas +++ b/Templates/TemplateEventsDelphi_COM.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsFPC.pas b/Templates/TemplateEventsFPC.pas index 75fd720..77ddb3b 100644 --- a/Templates/TemplateEventsFPC.pas +++ b/Templates/TemplateEventsFPC.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsMicrosoft.cpp b/Templates/TemplateEventsMicrosoft.cpp index 9351418..023656c 100644 --- a/Templates/TemplateEventsMicrosoft.cpp +++ b/Templates/TemplateEventsMicrosoft.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateEventsOxygen.pas b/Templates/TemplateEventsOxygen.pas index 5625d28..fedb6c1 100644 --- a/Templates/TemplateEventsOxygen.pas +++ b/Templates/TemplateEventsOxygen.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateHelperFunctions.pas b/Templates/TemplateHelperFunctions.pas deleted file mode 100644 index d1838f8..0000000 --- a/Templates/TemplateHelperFunctions.pas +++ /dev/null @@ -1,52 +0,0 @@ - -function VarArrayToStr(const vArray: variant): string; - - function _VarToStr(const V: variant): string; - var - Vt: integer; - begin - Vt := VarType(V); - case Vt of - varSmallint, - varInteger : Result := IntToStr(integer(V)); - varSingle, - varDouble, - varCurrency : Result := FloatToStr(Double(V)); - varDate : Result := VarToStr(V); - varOleStr : Result := WideString(V); - varBoolean : Result := VarToStr(V); - varVariant : Result := VarToStr(Variant(V)); - varByte : Result := char(byte(V)); - varString : Result := String(V); - varArray : Result := VarArrayToStr(Variant(V)); - end; - end; - -var -i : integer; -begin - Result := '['; - if (VarType(vArray) and VarArray)=0 then - Result := _VarToStr(vArray) - else - for i := VarArrayLowBound(vArray, 1) to VarArrayHighBound(vArray, 1) do - if i=VarArrayLowBound(vArray, 1) then - Result := Result+_VarToStr(vArray[i]) - else - Result := Result+'|'+_VarToStr(vArray[i]); - - Result:=Result+']'; -end; - -function VarStrNull(const V:OleVariant):string; //avoid problems with null variants -begin - Result:=''; - if not VarIsNull(V) then - begin - if VarIsArray(V) then - Result:=VarArrayToStr(V) - else - Result:=VarToStr(V); - end; -end; - diff --git a/Templates/TemplateNonStaticMethodInvokerBorlandCPP.cpp b/Templates/TemplateNonStaticMethodInvokerBorlandCPP.cpp index fc3a87e..a90a619 100644 --- a/Templates/TemplateNonStaticMethodInvokerBorlandCPP.cpp +++ b/Templates/TemplateNonStaticMethodInvokerBorlandCPP.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateNonStaticMethodInvokerCSharp.cs b/Templates/TemplateNonStaticMethodInvokerCSharp.cs index d529f94..ec91de5 100644 --- a/Templates/TemplateNonStaticMethodInvokerCSharp.cs +++ b/Templates/TemplateNonStaticMethodInvokerCSharp.cs @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateNonStaticMethodInvokerDelphi.pas b/Templates/TemplateNonStaticMethodInvokerDelphi.pas index 91e07d9..0b3f11f 100644 --- a/Templates/TemplateNonStaticMethodInvokerDelphi.pas +++ b/Templates/TemplateNonStaticMethodInvokerDelphi.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateNonStaticMethodInvokerDelphi_COM.pas b/Templates/TemplateNonStaticMethodInvokerDelphi_COM.pas index 3f626b4..de078fe 100644 --- a/Templates/TemplateNonStaticMethodInvokerDelphi_COM.pas +++ b/Templates/TemplateNonStaticMethodInvokerDelphi_COM.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateNonStaticMethodInvokerDelphi_TLB.pas b/Templates/TemplateNonStaticMethodInvokerDelphi_TLB.pas index 7129157..940f904 100644 --- a/Templates/TemplateNonStaticMethodInvokerDelphi_TLB.pas +++ b/Templates/TemplateNonStaticMethodInvokerDelphi_TLB.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateNonStaticMethodInvokerFPC.pas b/Templates/TemplateNonStaticMethodInvokerFPC.pas index fd9319f..7c5eb0c 100644 --- a/Templates/TemplateNonStaticMethodInvokerFPC.pas +++ b/Templates/TemplateNonStaticMethodInvokerFPC.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateNonStaticMethodInvokerMicrosoftCPP.cpp b/Templates/TemplateNonStaticMethodInvokerMicrosoftCPP.cpp deleted file mode 100644 index b9ba66b..0000000 --- a/Templates/TemplateNonStaticMethodInvokerMicrosoftCPP.cpp +++ /dev/null @@ -1,255 +0,0 @@ -//----------------------------------------------------------------------------------------------------- -// This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] -// http://code.google.com/p/wmi-delphi-code-creator/ -// Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 -//----------------------------------------------------------------------------------------------------- -// -// LIABILITY DISCLAIMER -// THIS GENERATED CODE IS DISTRIBUTED "AS IS". NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. -// YOU USE IT AT YOUR OWN RISK. THE AUTHOR NOT WILL BE LIABLE FOR DATA LOSS, -// DAMAGES AND LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING OR MISUSING THIS CODE. -// -//---------------------------------------------------------------------------------------------------- -#include "stdafx.h" -#define _WIN32_DCOM -#include -using namespace std; -#include -#include -# pragma comment(lib, "wbemuuid.lib") - -//CREDENTIAL structure -//http://msdn.microsoft.com/en-us/library/windows/desktop/aa374788%28v=vs.85%29.aspx -#define CRED_MAX_USERNAME_LENGTH 513 -#define CRED_MAX_CREDENTIAL_BLOB_SIZE 512 -#define CREDUI_MAX_USERNAME_LENGTH CRED_MAX_USERNAME_LENGTH -#define CREDUI_MAX_PASSWORD_LENGTH (CRED_MAX_CREDENTIAL_BLOB_SIZE / 2) - -[WMIMETHODDESC] -#pragma argsused -int main(int argc, char* argv[]) -{ - wchar_t pszName[CREDUI_MAX_USERNAME_LENGTH+1] = L"user"; - wchar_t pszPwd[CREDUI_MAX_PASSWORD_LENGTH+1] = L"password"; - BSTR strNetworkResource; - //To use a WMI remote connection set localconn to false and configure the values of the pszName, pszPwd and the name of the remote machine in strNetworkResource - bool localconn = true; - strNetworkResource = localconn ? L"\\\\.\\[WMINAMESPACE]" : L"\\\\remote--machine\\[WMINAMESPACE]"; - - COAUTHIDENTITY *userAcct = NULL ; - COAUTHIDENTITY authIdent; - HRESULT hres; - - // Initialize COM. ------------------------------------------ - - hres = CoInitializeEx(0, COINIT_MULTITHREADED); - if (FAILED(hres)) - { - cout << "Failed to initialize COM library. Error code = 0x" << hex << hres << endl; - cout << _com_error(hres).ErrorMessage() << endl; - cout << "press enter to exit" << endl; - cin.get(); - return 1; // Program has failed. - } - - // Set general COM security levels -------------------------- - if (localconn) - hres = CoInitializeSecurity( - NULL, - -1, // COM authentication - NULL, // Authentication services - NULL, // Reserved - RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication - RPC_C_IMP_LEVEL_IMPERSONATE, // Default Impersonation - NULL, // Authentication info - EOAC_NONE, // Additional capabilities - NULL // Reserved - ); - else - hres = CoInitializeSecurity( - NULL, - -1, // COM authentication - NULL, // Authentication services - NULL, // Reserved - RPC_C_AUTHN_LEVEL_DEFAULT, // Default authentication - RPC_C_IMP_LEVEL_IDENTIFY, // Default Impersonation - NULL, // Authentication info - EOAC_NONE, // Additional capabilities - NULL // Reserved - ); - - - if (FAILED(hres)) - { - cout << "Failed to initialize security. Error code = 0x" << hex << hres << endl; - cout << _com_error(hres).ErrorMessage() << endl; - CoUninitialize(); - cout << "press enter to exit" << endl; - cin.get(); - return 1; // Program has failed. - } - - // Obtain the initial locator to WMI ------------------------- - - IWbemLocator *pLoc = NULL; - hres = CoCreateInstance(CLSID_WbemLocator, 0, CLSCTX_INPROC_SERVER, IID_IWbemLocator, (LPVOID *) &pLoc); - - if (FAILED(hres)) - { - cout << "Failed to create IWbemLocator object. " << "Err code = 0x" << hex << hres << endl; - cout << _com_error(hres).ErrorMessage() << endl; - CoUninitialize(); - cout << "press enter to exit" << endl; - cin.get(); - return 1; // Program has failed. - } - - // Connect to WMI through the IWbemLocator::ConnectServer method - - IWbemServices *pSvc = NULL; - - // Connect to the [WMINAMESPACE] namespace - // and obtain pointer pSvc to make IWbemServices calls. - if (localconn) - hres = pLoc->ConnectServer( - _bstr_t(strNetworkResource), // Object path of WMI namespace - NULL, // User name. NULL = current user - NULL, // User password. NULL = current - 0, // Locale. NULL indicates current - NULL, // Security flags. - 0, // Authority (e.g. Kerberos) - 0, // Context object - &pSvc // pointer to IWbemServices proxy - ); - else - hres = pLoc->ConnectServer( - _bstr_t(strNetworkResource), // Object path of WMI namespace - _bstr_t(pszName), // User name - _bstr_t(pszPwd), // User password - NULL, // Locale - NULL, // Security flags - NULL, // Authority - NULL, // Context object - &pSvc // IWbemServices proxy - ); - - - if (FAILED(hres)) - { - cout << "Could not connect. Error code = 0x" << hex << hres << endl; - cout << _com_error(hres).ErrorMessage() << endl; - pLoc->Release(); - CoUninitialize(); - cout << "press enter to exit" << endl; - cin.get(); - return 1; // Program has failed. - } - - cout << "Connected to [WMINAMESPACE] WMI namespace" << endl; - - // Set security levels on the proxy ------------------------- - if (localconn) - hres = CoSetProxyBlanket( - pSvc, // Indicates the proxy to set - RPC_C_AUTHN_WINNT, // RPC_C_AUTHN_xxx - RPC_C_AUTHZ_NONE, // RPC_C_AUTHZ_xxx - NULL, // Server principal name - RPC_C_AUTHN_LEVEL_CALL, // RPC_C_AUTHN_LEVEL_xxx - RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx - NULL, // client identity - EOAC_NONE // proxy capabilities - ); - else - { - // Create COAUTHIDENTITY that can be used for setting security on proxy - memset(&authIdent, 0, sizeof(COAUTHIDENTITY)); - authIdent.PasswordLength = wcslen (pszPwd); - authIdent.Password = (USHORT*)pszPwd; - authIdent.User = (USHORT*)pszName; - authIdent.UserLength = wcslen(pszName); - authIdent.Domain = 0; - authIdent.DomainLength = 0; - authIdent.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE; - userAcct = &authIdent; - - hres = CoSetProxyBlanket( - pSvc, // Indicates the proxy to set - RPC_C_AUTHN_DEFAULT, // RPC_C_AUTHN_xxx - RPC_C_AUTHZ_DEFAULT, // RPC_C_AUTHZ_xxx - COLE_DEFAULT_PRINCIPAL, // Server principal name - RPC_C_AUTHN_LEVEL_PKT_PRIVACY, // RPC_C_AUTHN_LEVEL_xxx - RPC_C_IMP_LEVEL_IMPERSONATE, // RPC_C_IMP_LEVEL_xxx - userAcct, // client identity - EOAC_NONE // proxy capabilities - ); - } - - - if (FAILED(hres)) - { - cout << "Could not set proxy blanket. Error code = 0x" << hex << hres << endl; - cout << _com_error(hres).ErrorMessage() << endl; - pSvc->Release(); - pLoc->Release(); - CoUninitialize(); - cout << "press enter to exit" << endl; - cin.get(); - return 1; // Program has failed. - } - - // Use the IWbemServices pointer to make requests of WMI ---- - - BSTR MethodName = SysAllocString(L"[WMIMETHOD]"); - BSTR ClassName = SysAllocString(L"[WMICLASSNAME]"); - - IWbemClassObject* pClass = NULL; - hres = pSvc->GetObject(ClassName, 0, NULL, &pClass, NULL); - - IWbemClassObject* pInParamsDefinition = NULL; - hres = pClass->GetMethod(MethodName, 0, &pInParamsDefinition, NULL); - - IWbemClassObject* pClassInstance = NULL; - hres = pInParamsDefinition->SpawnInstance(0, &pClassInstance); - -[CPPCODEINPARAMS] - - // Execute Method - IWbemClassObject* pOutParams = NULL; - hres = pSvc->ExecMethod(L"[WMIPATH]", MethodName, 0, - NULL, pClassInstance, &pOutParams, NULL); - - if (FAILED(hres)) - { - cout << "Could not execute method. Error code = 0x" << hex << hres << endl; - cout << _com_error(hres).ErrorMessage() << endl; - SysFreeString(ClassName); - SysFreeString(MethodName); - if (pClass) pClass->Release(); - if (pInParamsDefinition) pInParamsDefinition->Release(); - if (pOutParams) pOutParams->Release(); - if (pSvc) pSvc->Release(); - if (pLoc) pLoc->Release(); - CoUninitialize(); - cout << "press enter to exit" << endl; - cin.get(); - return 1; // Program has failed. - } - - -[CPPCODEOUTPARAMS] - - // Clean up - SysFreeString(ClassName); - SysFreeString(MethodName); - if (pClass) pClass->Release(); - if (pInParamsDefinition) pInParamsDefinition->Release(); - if (pOutParams) pOutParams->Release(); - if (pLoc) pLoc->Release(); - if (pSvc) pSvc->Release(); - CoUninitialize(); - cout << "press enter to exit" << endl; - cin.get(); - return 0; -} -//--------------------------------------------------------------------------- diff --git a/Templates/TemplateNonStaticMethodInvokerOxygen.pas b/Templates/TemplateNonStaticMethodInvokerOxygen.pas index 415235f..3e17ce7 100644 --- a/Templates/TemplateNonStaticMethodInvokerOxygen.pas +++ b/Templates/TemplateNonStaticMethodInvokerOxygen.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerBorlandCPP.cpp b/Templates/TemplateStaticMethodInvokerBorlandCPP.cpp index 628dd2b..323df5e 100644 --- a/Templates/TemplateStaticMethodInvokerBorlandCPP.cpp +++ b/Templates/TemplateStaticMethodInvokerBorlandCPP.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerCSharp.cs b/Templates/TemplateStaticMethodInvokerCSharp.cs index 99d68c8..b3c717b 100644 --- a/Templates/TemplateStaticMethodInvokerCSharp.cs +++ b/Templates/TemplateStaticMethodInvokerCSharp.cs @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerDelphi.pas b/Templates/TemplateStaticMethodInvokerDelphi.pas index 6568be5..b17e8c4 100644 --- a/Templates/TemplateStaticMethodInvokerDelphi.pas +++ b/Templates/TemplateStaticMethodInvokerDelphi.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerDelphi_COM.pas b/Templates/TemplateStaticMethodInvokerDelphi_COM.pas index 9158392..4a351db 100644 --- a/Templates/TemplateStaticMethodInvokerDelphi_COM.pas +++ b/Templates/TemplateStaticMethodInvokerDelphi_COM.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerDelphi_TLB.pas b/Templates/TemplateStaticMethodInvokerDelphi_TLB.pas index 65331c9..1a5914b 100644 --- a/Templates/TemplateStaticMethodInvokerDelphi_TLB.pas +++ b/Templates/TemplateStaticMethodInvokerDelphi_TLB.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerFPC.pas b/Templates/TemplateStaticMethodInvokerFPC.pas index c411447..116caca 100644 --- a/Templates/TemplateStaticMethodInvokerFPC.pas +++ b/Templates/TemplateStaticMethodInvokerFPC.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerMicrosoftCPP.cpp b/Templates/TemplateStaticMethodInvokerMicrosoftCPP.cpp index 171851a..687256e 100644 --- a/Templates/TemplateStaticMethodInvokerMicrosoftCPP.cpp +++ b/Templates/TemplateStaticMethodInvokerMicrosoftCPP.cpp @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Templates/TemplateStaticMethodInvokerOxygen.pas b/Templates/TemplateStaticMethodInvokerOxygen.pas index edb31cd..fcde823 100644 --- a/Templates/TemplateStaticMethodInvokerOxygen.pas +++ b/Templates/TemplateStaticMethodInvokerOxygen.pas @@ -2,7 +2,7 @@ // This code was generated by the Wmi Delphi Code Creator (WDCC) Version [VERSIONAPP] // http://code.google.com/p/wmi-delphi-code-creator/ // Blog http://theroadtodelphi.wordpress.com/wmi-delphi-code-creator/ -// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2014 +// Author Rodrigo Ruz V. (RRUZ) Copyright (C) 2011-2015 //----------------------------------------------------------------------------------------------------- // // LIABILITY DISCLAIMER diff --git a/Units/Misc/uMisc.pas b/Units/Misc/uMisc.pas index 0bcee11..4ebae2c 100644 --- a/Units/Misc/uMisc.pas +++ b/Units/Misc/uMisc.pas @@ -360,8 +360,7 @@ function IsWow64: boolean; IsWow64Result: WinApi.Windows.BOOL; IsWow64Process: TIsWow64Process; begin - IsWow64Process := WinApi.Windows.GetProcAddress(WinApi.Windows.GetModuleHandle('kernel32.dll'), - 'IsWow64Process'); + IsWow64Process := WinApi.Windows.GetProcAddress(WinApi.Windows.GetModuleHandle('kernel32.dll'), 'IsWow64Process'); if Assigned(IsWow64Process) then begin if not IsWow64Process(WinApi.Windows.GetCurrentProcess, IsWow64Result) then diff --git a/Units/uCodeEditor.dfm b/Units/uCodeEditor.dfm index a4c12c8..b49d14e 100644 --- a/Units/uCodeEditor.dfm +++ b/Units/uCodeEditor.dfm @@ -14,8 +14,6 @@ object FrmCodeEditor: TFrmCodeEditor OldCreateOrder = False Position = poScreenCenter OnCreate = FormCreate - ExplicitWidth = 320 - ExplicitHeight = 240 PixelsPerInch = 96 TextHeight = 13 object PanelLanguageSet: TPanel @@ -181,8 +179,8 @@ object FrmCodeEditor: TFrmCodeEditor ActionBar = ActionToolBar1 end> Images = ImageList1 - Left = 352 - Top = 120 + Left = 376 + Top = 112 StyleName = 'Platform Default' object ActionRun: TAction Tag = 1 diff --git a/Units/uCodeEditor.pas b/Units/uCodeEditor.pas index 1c85803..4e6c09d 100644 --- a/Units/uCodeEditor.pas +++ b/Units/uCodeEditor.pas @@ -98,6 +98,7 @@ implementation ShellApi, Vcl.Styles, Vcl.Themes, + System.Generics.Collections, uMisc, uSelectCompilerVersion, uDotNetFrameWork, @@ -237,11 +238,12 @@ procedure TFrmCodeEditor.ActionFullScreenUpdate(Sender: TObject); procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); var Frm: TFrmSelCompilerVer; - item: TListItem; + LItem: TListItem; FileName: string; IdeName: string; TargetFile: string; UseVS : Boolean; + LVisualStudioInfo : TVisualStudioInfo; begin Frm := TFrmSelCompilerVer.Create(Self); try @@ -253,10 +255,10 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); else if Frm.ShowModal = mrOk then begin - item := Frm.ListViewIDEs.Selected; - if Assigned(item) then + LItem := Frm.ListViewIDEs.Selected; + if Assigned(LItem) then begin - IdeName := item.SubItems[0]; + IdeName := LItem.SubItems[0]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); case SourceLanguage of @@ -290,7 +292,7 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); FileName := FileName + 'Program.pas'; SynEditCode.Lines.SaveToFile(FileName); - if StartsText('Monodevelop', item.Caption) and + if StartsText('Monodevelop', LItem.Caption) and CreateOxygeneProject(ExtractFileName(FileName), ExtractFilePath( FileName), IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Oxygene\Monodevelop\GetWMI_Info.oxygene', FileName) then @@ -299,7 +301,7 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); ShellExecute(Handle, nil, PChar(Format('"%s"',[IdeName])), PChar(Format('"%s"',[FileName])), nil, SW_SHOWNORMAL); end else - if (Pos('2008', item.Caption) > 0) and + if (Pos('2008', LItem.Caption) > 0) and CreateOxygeneProject(ExtractFileName(FileName), ExtractFilePath( FileName), IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Oxygene\VS2008\GetWMI_Info.oxygene', FileName) then @@ -308,7 +310,7 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); ShellExecute(Handle, nil, PChar(Format('"%s"',[IdeName])), PChar(Format('"%s"',[FileName])), nil, SW_SHOWNORMAL); end else - if (Pos('2010', item.Caption) > 0) and + if (Pos('2010', LItem.Caption) > 0) and CreateOxygeneProject(ExtractFileName(FileName), ExtractFilePath( FileName), IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Oxygene\VS2010\GetWMI_Info.oxygene', FileName) then @@ -317,7 +319,7 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); ShellExecute(Handle, nil, PChar(Format('"%s"',[IdeName])), PChar(Format('"%s"',[FileName])), nil, SW_SHOWNORMAL); end else - if (Pos('2012', item.Caption) > 0) and + if (Pos('2012', LItem.Caption) > 0) and CreateOxygeneProject(ExtractFileName(FileName), ExtractFilePath( FileName), IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Oxygene\VS2010\GetWMI_Info.oxygene', FileName) then @@ -330,20 +332,27 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); Lng_VSCpp: begin + LVisualStudioInfo := TVisualStudioInfo(LItem.Data); TargetFile := ''; FileName := FileName + 'main.cpp'; SynEditCode.Lines.SaveToFile(FileName); - UseVS := Pos('Visual Studio', item.Caption)>0; - if UseVS and (Pos('2008', item.Caption)>0) then + UseVS := Pos('Visual Studio', LItem.Caption)>0; + if UseVS and (LVisualStudioInfo.Version = vs2005) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2005\GetWMI_Info.sln' + else + if UseVS and (LVisualStudioInfo.Version = vs2008) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2008\GetWMI_Info.sln' else - if UseVS and (Pos('2010', item.Caption)>0) then + if UseVS and (LVisualStudioInfo.Version = vs2010) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2010\GetWMI_Info.sln' else - if UseVS and (Pos('11', item.Caption)>0) then + if UseVS and (LVisualStudioInfo.Version = vs2012) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS11\GetWMI_Info.sln' else - if UseVS and (Pos('2015', item.Caption)>0) then + if UseVS and (LVisualStudioInfo.Version = vs2013) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS13\GetWMI_Info.sln' + else + if UseVS and (LVisualStudioInfo.Version = vs2015) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS14\GetWMI_Info.sln'; if UseVS and (TargetFile<>'') then @@ -356,19 +365,26 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); Lng_CSharp: begin + LVisualStudioInfo := TVisualStudioInfo(LItem.Data); FileName := FileName + 'Program.cs'; SynEditCode.Lines.SaveToFile(FileName); - if Pos('2008', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2005) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS2005\GetWMI_Info.sln' + else + if (LVisualStudioInfo.Version = vs2008) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS2008\GetWMI_Info.sln' else - if Pos('2010', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2010) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS2010\GetWMI_Info.sln' else - if Pos('11', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2012) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS11\GetWMI_Info.sln' else - if Pos('2015', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2013) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS13\GetWMI_Info.sln' + else + if (LVisualStudioInfo.Version = vs2015) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS14\GetWMI_Info.sln'; @@ -387,30 +403,32 @@ procedure TFrmCodeEditor.ActionOpenIDEExecute(Sender: TObject); procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); var - Frm: TFrmSelCompilerVer; - item: TListItem; + LFrmSelCompilerVer: TFrmSelCompilerVer; + LItem: TListItem; FileName: string; CompilerName: string; TargetFile: string; UseVS : Boolean; + LVisualStudioInfo : TVisualStudioInfo; + begin - Frm := TFrmSelCompilerVer.Create(Self); + LFrmSelCompilerVer := TFrmSelCompilerVer.Create(Self); try - Frm.ShowCompiler := True; - Frm.LanguageSource := SourceLanguage; - Frm.LoadInstalledVersions; - if Frm.ListViewIDEs.Items.Count = 0 then + LFrmSelCompilerVer.ShowCompiler := True; + LFrmSelCompilerVer.LanguageSource := SourceLanguage; + LFrmSelCompilerVer.LoadInstalledVersions; + if LFrmSelCompilerVer.ListViewIDEs.Items.Count = 0 then MsgWarning(Format('Not exist a %s compiler installed in this system', [ListSourceLanguages[SourceLanguage]])) else - if Frm.ShowModal = mrOk then + if LFrmSelCompilerVer.ShowModal = mrOk then begin - item := Frm.ListViewIDEs.Selected; - if Assigned(item) then + LItem := LFrmSelCompilerVer.ListViewIDEs.Selected; + if Assigned(LItem) then begin case SourceLanguage of Lng_Delphi: begin - CompilerName := item.SubItems[1]; + CompilerName := LItem.SubItems[1]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); FileName := FileName + 'WMITemp_' + FormatDateTime('yyyymmddhhnnsszzz', Now) + '.dpr'; SynEditCode.Lines.SaveToFile(FileName); @@ -424,7 +442,7 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); Lng_BorlandCpp: begin - CompilerName := item.SubItems[1]; + CompilerName := LItem.SubItems[1]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); FileName := FileName + 'WMITemp_' + FormatDateTime('yyyymmddhhnnsszzz', Now) + '.cpp'; @@ -436,7 +454,7 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); Lng_FPC: begin - CompilerName := item.SubItems[1]; + CompilerName := LItem.SubItems[1]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); FileName := FileName + 'WMITemp_' + FormatDateTime('yyyymmddhhnnsszzz', Now) + '.lpr'; @@ -453,25 +471,34 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); Lng_VSCpp: begin - CompilerName := item.SubItems[1]; + LVisualStudioInfo := TVisualStudioInfo(LItem.Data); + CompilerName := LItem.SubItems[1]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); - UseVS := Pos('Visual Studio', item.Caption)>0; + UseVS := Pos('Visual Studio', LItem.Caption)>0; if UseVS then FileName := FileName + 'main.cpp' else FileName := FileName + 'GetWMI_Info.cpp'; - if UseVS and (Pos('2008', item.Caption)>0) then + + if UseVS and (LVisualStudioInfo.Version = vs2005) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2005\GetWMI_Info.sln' + else + if UseVS and (LVisualStudioInfo.Version = vs2008) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2008\GetWMI_Info.sln' else - if UseVS and (Pos('2010', item.Caption)>0) then + if UseVS and (LVisualStudioInfo.Version = vs2010) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2010\GetWMI_Info.sln' else - if UseVS and (Pos('11', item.Caption)>0) then + if UseVS and (LVisualStudioInfo.Version = vs2012) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS11\GetWMI_Info.sln' else - TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS2008\GetWMI_Info.sln'; + if UseVS and (LVisualStudioInfo.Version = vs2013) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS13\GetWMI_Info.sln' + else + if UseVS and (LVisualStudioInfo.Version = vs2015) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'Microsoft_C++\VS14\GetWMI_Info.sln'; SynEditCode.Lines.SaveToFile(FileName); @@ -489,8 +516,9 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); Lng_CSharp: begin - UseVS := Pos('Visual Studio', item.Caption)>0; - CompilerName := item.SubItems[1]; + LVisualStudioInfo := TVisualStudioInfo(LItem.Data); + UseVS := Pos('Visual Studio', LItem.Caption)>0; + CompilerName := LItem.SubItems[1]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); if UseVS then @@ -500,19 +528,24 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); SynEditCode.Lines.SaveToFile(FileName); - if UseVS then begin - if Pos('2008', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2005) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS2005\GetWMI_Info.sln' + else + if (LVisualStudioInfo.Version = vs2008) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS2008\GetWMI_Info.sln' else - if Pos('2010', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2010) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS2010\GetWMI_Info.sln' else - if Pos('11', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2012) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS11\GetWMI_Info.sln' else - if Pos('2015', item.Caption)>0 then + if (LVisualStudioInfo.Version = vs2013) then + TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS13\GetWMI_Info.sln' + else + if (LVisualStudioInfo.Version = vs2015) then TargetFile:=IncludeTrailingPathDelimiter(ExtractFilePath(ParamStr(0))) + 'CSharp\VS14\GetWMI_Info.sln'; if CreateVsProject(ExtractFileName(FileName), ExtractFilePath(FileName), TargetFile, FileName) then @@ -527,7 +560,7 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); Lng_Oxygen: begin - CompilerName := item.SubItems[1]; + CompilerName := LItem.SubItems[1]; FileName := IncludeTrailingPathDelimiter(Settings.OutputFolder); FileName := FileName + 'Program.pas'; @@ -546,7 +579,7 @@ procedure TFrmCodeEditor.ActionRunExecute(Sender: TObject); end; end; finally - Frm.Free; + LFrmSelCompilerVer.Free; end; end; procedure TFrmCodeEditor.ActionSaveExecute(Sender: TObject); diff --git a/Units/uDelphiIDE.pas b/Units/uDelphiIDE.pas index 4bc62a2..8f69e67 100644 --- a/Units/uDelphiIDE.pas +++ b/Units/uDelphiIDE.pas @@ -25,7 +25,7 @@ interface Uses - Classes; + System.Classes; function CreateDelphiProject(const DestPath, SourcePath: string): boolean; diff --git a/Units/uDelphiPrismIDE.pas b/Units/uDelphiPrismIDE.pas index 00043d8..3daffce 100644 --- a/Units/uDelphiPrismIDE.pas +++ b/Units/uDelphiPrismIDE.pas @@ -37,11 +37,6 @@ function IsDelphiPrismAttachedtoMonoDevelop: boolean; function GetMonoDevelopIDEFileName: string; -function IsDelphiPrismAttachedtoVS2008: boolean; -function IsDelphiPrismAttachedtoVS2010: boolean; -function IsDelphiPrismAttachedtoVS2012: boolean; - - procedure CompileAndRunOxygenCode(Console:TStrings;const CompilerName, ProjectFile: string; Run: boolean); @@ -60,21 +55,6 @@ implementation DelphiPrismx86RegEntry = '\Software\RemObjects\Oxygene'; DelphiPrismx64RegEntry = '\Software\Wow6432Node\RemObjects\Oxygene'; - DelphiPrismVS2008x64 = - '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\InstalledProducts\RemObjects Oxygene'; - DelphiPrismVS2008x86 = - '\SOFTWARE\Microsoft\VisualStudio\9.0\InstalledProducts\RemObjects Oxygene'; - DelphiPrismVS2010x64 = - '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\InstalledProducts\RemObjects Oxygene'; - DelphiPrismVS2010x86 = - '\SOFTWARE\Microsoft\VisualStudio\10.0\InstalledProducts\RemObjects Oxygene'; - - DelphiPrismVS2012x64 = - '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\InstalledProducts\RemObjects Oxygene'; - DelphiPrismVS2012x86 = - '\SOFTWARE\Microsoft\VisualStudio\11.0\InstalledProducts\RemObjects Oxygene'; - - //HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Novell\MonoDevelop MonoDevelopx64RegEntry = '\SOFTWARE\Novell\MonoDevelop'; MonoDevelopx86RegEntry = '\SOFTWARE\Wow6432Node\Novell\MonoDevelop'; @@ -171,30 +151,6 @@ function IsDelphiPrismAttachedtoMonoDevelop: boolean; end; end; -function IsDelphiPrismAttachedtoVS2008: boolean; -begin - if IsWow64 then - Result := RegKeyExists(DelphiPrismVS2008x64, HKEY_LOCAL_MACHINE) - else - Result := RegKeyExists(DelphiPrismVS2008x86, HKEY_LOCAL_MACHINE); -end; - -function IsDelphiPrismAttachedtoVS2010: boolean; -begin - if IsWow64 then - Result := RegKeyExists(DelphiPrismVS2010x64, HKEY_LOCAL_MACHINE) - else - Result := RegKeyExists(DelphiPrismVS2010x86, HKEY_LOCAL_MACHINE); -end; - - -function IsDelphiPrismAttachedtoVS2012: boolean; -begin - if IsWow64 then - Result := RegKeyExists(DelphiPrismVS2012x64, HKEY_LOCAL_MACHINE) - else - Result := RegKeyExists(DelphiPrismVS2012x86, HKEY_LOCAL_MACHINE); -end; function GetDelphiPrismRegValue(const Value: string): string; begin @@ -217,8 +173,7 @@ function GetDelphiPrismCompilerFolder: string; function GetDelphiPrismCompilerFileName: string; begin - Result := Format('%s%s', [IncludeTrailingPathDelimiter(GetDelphiPrismCompilerFolder), - 'oxygene.exe']); + Result := Format('%s%s', [IncludeTrailingPathDelimiter(GetDelphiPrismCompilerFolder), 'oxygene.exe']); end; function IsDelphiPrismInstalled: boolean; diff --git a/Units/uSelectCompilerVersion.pas b/Units/uSelectCompilerVersion.pas index 7733f5f..0ba3f9d 100644 --- a/Units/uSelectCompilerVersion.pas +++ b/Units/uSelectCompilerVersion.pas @@ -59,6 +59,7 @@ implementation {$R *.dfm} uses + System.Generics.Collections, uMisc, uVisualStudio, uRegistry, @@ -123,61 +124,28 @@ procedure TFrmSelCompilerVer.LoadInstalledVersions; ImageIndex: integer; RootKey: HKEY; + LVisualStudioInfo : TVisualStudioInfo; + LVSVersion : TVSVersion; + LVSIDEList : TObjectList; + i : Integer; procedure RegisterVSIDE; + var + i : Integer; begin - if IsVS2008Installed then + LVSIDEList := GetVSIDEList; + for i:=0 to LVSIDEList.Count-1 do begin - FileName := GetVS2008IDEFileName; item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 2008'; + Filename := LVSIDEList[i].IDEFileName; + item.Caption := LVSIDEList[i].IDEDescription; item.SubItems.Add(FileName); - item.SubItems.Add(GetVS2008CompilerFileName); + item.SubItems.Add(LVSIDEList[i].CompilerFileName); ExtractIconFileToImageList(ImageList1, Filename); ImageIndex := ImageList1.Count - 1; item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(FLanguageSource)); + item.Data := Pointer(LVSIDEList[i]); end; - - if IsVS2010Installed then - begin - FileName := GetVS2010IDEFileName; - item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 2010'; - item.SubItems.Add(FileName); - item.SubItems.Add(GetVS2010CompilerFileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(FLanguageSource)); - end; - - if IsVS11Installed then - begin - FileName := GetVS11IDEFileName; - item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 11'; - item.SubItems.Add(FileName); - item.SubItems.Add(GetVS11CompilerFileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(FLanguageSource)); - end; - - if IsVS14Installed then - begin - FileName := GetVS14IDEFileName; - item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 2015'; - item.SubItems.Add(FileName); - item.SubItems.Add(GetVS14CompilerFileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(FLanguageSource)); - end; - end; begin @@ -282,66 +250,30 @@ procedure TFrmSelCompilerVer.LoadInstalledVersions; end; Lng_VSCpp : - begin - RegisterVSIDE; - - if ShowCompiler then - begin - FileName :=GetMicrosoftCppCompiler2008; - if FileExists(FileName) then - begin - item := ListViewIDEs.Items.Add; - item.Caption := 'Microsoft C++ Compiler '+uMisc.GetFileVersion(FileName); - item.SubItems.Add(FileName); - item.SubItems.Add(FileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_VSCpp)); - end; - - FileName :=GetMicrosoftCppCompiler2010; - if FileExists(FileName) then - begin - item := ListViewIDEs.Items.Add; - item.Caption := 'Microsoft C++ Compiler '+uMisc.GetFileVersion(FileName); - item.SubItems.Add(FileName); - item.SubItems.Add(FileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_VSCpp)); - end; - - FileName :=GetMicrosoftCppCompiler11; - if FileExists(FileName) then - begin - item := ListViewIDEs.Items.Add; - item.Caption := 'Microsoft C++ Compiler '+uMisc.GetFileVersion(FileName); - item.SubItems.Add(FileName); - item.SubItems.Add(FileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_VSCpp)); - end; - - FileName :=GetMicrosoftCppCompiler14; - if FileExists(FileName) then - begin - item := ListViewIDEs.Items.Add; - item.Caption := 'Microsoft C++ Compiler '+uMisc.GetFileVersion(FileName); - item.SubItems.Add(FileName); - item.SubItems.Add(FileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_VSCpp)); - end; - - end; - - end; + begin + RegisterVSIDE; + + if ShowCompiler then + begin + LVSIDEList := GetVSIDEList; + for i:=0 to LVSIDEList.Count-1 do + begin + FileName :=LVSIDEList[i].CppCompiler; + if FileExists(FileName) then + begin + item := ListViewIDEs.Items.Add; + item.Caption := 'Microsoft C++ Compiler '+uMisc.GetFileVersion(FileName); + item.SubItems.Add(FileName); + item.SubItems.Add(FileName); + ExtractIconFileToImageList(ImageList1, Filename); + ImageIndex := ImageList1.Count - 1; + item.ImageIndex := ImageIndex; + item.Data := Pointer(LVSIDEList[i]); + end; + end; + end; + + end; Lng_Oxygen: begin @@ -379,50 +311,21 @@ procedure TFrmSelCompilerVer.LoadInstalledVersions; item.Data := Pointer(Ord(Lng_Oxygen)); end; - if IsVS2008Installed and - IsDelphiPrismAttachedtoVS2008 then - begin - FileName := GetVS2008IDEFileName; - item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 2008'; - item.SubItems.Add(FileName); - item.SubItems.Add(GetDelphiPrismCompilerFileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_Oxygen)); - end; - - if IsVS2010Installed and - IsDelphiPrismAttachedtoVS2010 then - begin - FileName := GetVS2010IDEFileName; - item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 2010'; - item.SubItems.Add(FileName); - item.SubItems.Add(GetDelphiPrismCompilerFileName); - ExtractIconFileToImageList(ImageList1, Filename); - ImageIndex := ImageList1.Count - 1; - item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_Oxygen)); - end; - - if IsVS11Installed and - IsDelphiPrismAttachedtoVS2012 then + LVSIDEList := GetVSIDEList; + for i:=0 to LVSIDEList.Count-1 do + if RegKeyExists(LVSIDEList[i].BaseRegistryKey + 'InstalledProducts\RemObjects Oxygene', HKEY_LOCAL_MACHINE) then begin - FileName := GetVS11IDEFileName; + FileName := LVSIDEList[i].IDEFileName; item := ListViewIDEs.Items.Add; - item.Caption := 'Visual Studio 2012'; + item.Caption := LVSIDEList[i].IDEDescription; item.SubItems.Add(FileName); item.SubItems.Add(GetDelphiPrismCompilerFileName); ExtractIconFileToImageList(ImageList1, Filename); ImageIndex := ImageList1.Count - 1; item.ImageIndex := ImageIndex; - item.Data := Pointer(Ord(Lng_Oxygen)); + item.Data := Pointer(LVSIDEList[i]); end; - - end; end; diff --git a/Units/uSettings.dfm b/Units/uSettings.dfm index 8cd4713..47473bb 100644 --- a/Units/uSettings.dfm +++ b/Units/uSettings.dfm @@ -161,10 +161,6 @@ object FrmSettings: TFrmSettings object TabSheet2: TTabSheet Caption = 'Object Pascal Code generation' ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 662 - ExplicitHeight = 0 object Label4: TLabel Left = 3 Top = 99 @@ -264,10 +260,6 @@ object FrmSettings: TFrmSettings object TabSheet1: TTabSheet BorderWidth = 8 Caption = 'GUI Settings' - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 662 - ExplicitHeight = 0 object PageControl2: TPageControl Left = 0 Top = 0 @@ -276,13 +268,8 @@ object FrmSettings: TFrmSettings ActivePage = TabSheet6 Align = alClient TabOrder = 0 - ExplicitWidth = 646 object TabSheet6: TTabSheet Caption = 'Themes (Vcl Styles)' - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 638 - ExplicitHeight = 0 object Label9: TLabel Left = 3 Top = 22 @@ -305,6 +292,7 @@ object FrmSettings: TFrmSettings Width = 190 Height = 21 Style = csDropDownList + Sorted = True TabOrder = 1 OnChange = ComboBoxVCLStyleChange end @@ -453,10 +441,6 @@ object FrmSettings: TFrmSettings object TabSheet7: TTabSheet Caption = 'Syntax Highlighting' ImageIndex = 1 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 638 - ExplicitHeight = 0 object Label3: TLabel Left = 491 Top = 8 @@ -576,10 +560,6 @@ object FrmSettings: TFrmSettings object TabSheet3: TTabSheet Caption = 'Wmi Methods settings ' ImageIndex = 2 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 662 - ExplicitHeight = 0 object CheckBoxShowImplMethods: TCheckBox Left = 3 Top = 7 @@ -592,10 +572,6 @@ object FrmSettings: TFrmSettings object TabSheet8: TTabSheet Caption = 'Compiler Options' ImageIndex = 5 - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 662 - ExplicitHeight = 0 object Label18: TLabel Left = 8 Top = 16 @@ -631,10 +607,6 @@ object FrmSettings: TFrmSettings Caption = 'Templates' ImageIndex = 4 TabVisible = False - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitWidth = 662 - ExplicitHeight = 0 object Label15: TLabel Left = 11 Top = 10 diff --git a/Units/uVisualStudio.pas b/Units/uVisualStudio.pas index 35823b8..a431e32 100644 --- a/Units/uVisualStudio.pas +++ b/Units/uVisualStudio.pas @@ -27,35 +27,43 @@ interface uses - Classes; - -function IsVS2008Installed: boolean; -function GetVS2008IDEFileName: string; -function GetVS2008CompilerFileName: string; - -function IsVS2010Installed: boolean; -function GetVS2010IDEFileName: string; -function GetVS2010CompilerFileName: string; - -function IsVS11Installed: boolean; -function GetVS11IDEFileName: string; -function GetVS11CompilerFileName: string; - - -function IsVS14Installed: boolean; -function GetVS14IDEFileName: string; -function GetVS14CompilerFileName: string; - -function CreateVsProject(const FileName, Path, ProjectTemplate: string; - var NewFileName: string): boolean; + System.Generics.Collections, + System.Classes; + + type + TVSVersion = + ( + vs2005, //8.0 + vs2008, //9.0 + vs2010, //10.0 + vs2012, //11.0 + vs2013, //12.0 + vs2015 //14.0 + ); + + + TVisualStudioInfo = class + private + FIDEFileName: string; + FCompilerFileName: string; + FCppCompiler: string; + FIDEDescription: string; + FVSVersion: TVSVersion; + FBaseRegistryKey: string; + public + property IDEFileName: string read FIDEFileName write FIDEFileName; + property IDEDescription: string read FIDEDescription write FIDEDescription; + property CompilerFileName : string read FCompilerFileName write FCompilerFileName; + property CppCompiler : string read FCppCompiler write FCppCompiler; + property Version : TVSVersion read FVSVersion write FVSVersion; + property BaseRegistryKey : string read FBaseRegistryKey write FBaseRegistryKey; + end; -procedure CompileAndRunVsCode(Console:TStrings;const CompilerName, ProjectFile: string; Run: boolean); -procedure CompileAndRunMicrosoftCppCode(Console:TStrings;const CompilerName, ProjectFile, SwitchOpts: string; Run: boolean); + function GetVSIDEList : TObjectList; + function CreateVsProject(const FileName, Path, ProjectTemplate: string; var NewFileName: string): boolean; -function GetMicrosoftCppCompiler2008 : string; -function GetMicrosoftCppCompiler2010 : string; -function GetMicrosoftCppCompiler11 : string; -function GetMicrosoftCppCompiler14 : string; + procedure CompileAndRunVsCode(Console:TStrings;const CompilerName, ProjectFile: string; Run: boolean); + procedure CompileAndRunMicrosoftCppCode(Console:TStrings;const CompilerName, ProjectFile, SwitchOpts: string; Run: boolean); implementation @@ -69,6 +77,55 @@ implementation IOUtils, uMisc; +const + + VSVersionsNames: array[TVSVersion] of string = ( + 'Visual Studio 2005', + 'Visual Studio 2008', + 'Visual Studio 2010', + 'Visual Studio 2012', + 'Visual Studio 2013', + 'Visual Studio 2015' + ); + + VSRegBasePathsx86: array[TVSVersion] of string = ( + '\SOFTWARE\Microsoft\VisualStudio\8.0\', + '\SOFTWARE\Microsoft\VisualStudio\9.0\', + '\SOFTWARE\Microsoft\VisualStudio\10.0\', + '\SOFTWARE\Microsoft\VisualStudio\11.0\', + '\SOFTWARE\Microsoft\VisualStudio\12.0\', + '\SOFTWARE\Microsoft\VisualStudio\14.0\' + ); + + VSRegBasePathsx64: array[TVSVersion] of string = ( + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\' + ); + + + + VSRegPathsx86: array[TVSVersion] of string = ( + '\SOFTWARE\Microsoft\VisualStudio\8.0\Setup\VS', + '\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS', + '\SOFTWARE\Microsoft\VisualStudio\10.0\Setup\VS', + '\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\VS', + '\SOFTWARE\Microsoft\VisualStudio\12.0\Setup\VS', + '\SOFTWARE\Microsoft\VisualStudio\14.0\Setup\VS' + ); + + VSRegPathsx64: array[TVSVersion] of string = ( + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\Setup\VS', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VS', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\Setup\VS', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0\Setup\VS', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0\Setup\VS', + '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\VS' + ); + const VS14x64RegEntry = '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0\Setup\VS'; @@ -80,6 +137,14 @@ implementation VS2008x64RegEntry = '\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\9.0\Setup\VS'; VS2008x86RegEntry = '\SOFTWARE\Microsoft\VisualStudio\9.0\Setup\VS'; +var + VSIDEList : TObjectList; + +function GetVSIDEList : TObjectList; +begin + Result := VSIDEList; +end; + function CreateVsProject(const FileName, Path, ProjectTemplate: string; var NewFileName: string): boolean; var @@ -160,202 +225,50 @@ procedure CompileAndRunMicrosoftCppCode(Console:TStrings;const CompilerName, Pro end; end; - -function GetMicrosoftCppCompiler2008 : string; -begin - Result:=ExpandFileName(ExtractFilePath(GetVS2008IDEFileName)+'\..\..')+'\VC\bin\cl.exe'; -end; - -function GetMicrosoftCppCompiler2010 : string; -begin - Result:=ExpandFileName(ExtractFilePath(GetVS2010IDEFileName)+'\..\..')+'\VC\bin\cl.exe'; -end; - -function GetMicrosoftCppCompiler11 : string; -begin - Result:=ExpandFileName(ExtractFilePath(GetVS11IDEFileName)+'\..\..')+'\VC\bin\cl.exe'; -end; - -function GetMicrosoftCppCompiler14 : string; -begin - Result:=ExpandFileName(ExtractFilePath(GetVS14IDEFileName)+'\..\..')+'\VC\bin\cl.exe'; -end; - - -function IsVS2008Installed: boolean; -var - Value: string; -begin - Result := False; - if IsWow64 then - begin - if RegKeyExists(VS2008x64RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS2008x64RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end - else - begin - if RegKeyExists(VS2008x86RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS2008x86RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end; -end; - -function IsVS2010Installed: boolean; -var - Value: string; -begin - Result := False; - if IsWow64 then - begin - if RegKeyExists(VS2010x64RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS2010x64RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end - else - begin - if RegKeyExists(VS2010x86RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS2010x86RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end; -end; - -function GetVS2008IDEFileName: string; +procedure LoadVSIDEList; +Var + LVisualStudioInfo : TVisualStudioInfo; + LVSVersion : TVSVersion; + FileName : string; + LWow64, Found : boolean; begin - Result := ''; - if IsWow64 then + VSIDEList.Clear; + LWow64 := IsWow64; + for LVSVersion := Low(TVSVersion) to High(TVSVersion) do begin - if RegKeyExists(VS2008x64RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS2008x64RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end - else - begin - if RegKeyExists(VS2008x86RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS2008x86RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end; -end; - -function GetVS2008CompilerFileName: string; -begin - Result:=ChangeFileExt(GetVS2008IDEFileName,'.com'); -end; - -function GetVS2010IDEFileName: string; -begin - Result := ''; - if IsWow64 then - begin - if RegKeyExists(VS2010x64RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS2010x64RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end - else - begin - if RegKeyExists(VS2010x86RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS2010x86RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end; -end; - -function GetVS2010CompilerFileName: string; -begin - Result:=ChangeFileExt(GetVS2010IDEFileName,'.com'); -end; + FileName := ''; + if LWow64 then + Found := RegKeyExists(VSRegPathsx64[LVSVersion], HKEY_LOCAL_MACHINE) + else + Found := RegKeyExists(VSRegPathsx86[LVSVersion], HKEY_LOCAL_MACHINE); + + if Found and LWow64 then + Found := RegReadStr(VSRegPathsx64[LVSVersion], 'EnvironmentPath', FileName, HKEY_LOCAL_MACHINE) and FileExists(FileName) + else + Found := RegReadStr(VSRegPathsx86[LVSVersion], 'EnvironmentPath', FileName, HKEY_LOCAL_MACHINE) and FileExists(FileName); -function IsVS11Installed: boolean; -var - Value: string; -begin - Result := False; - if IsWow64 then - begin - if RegKeyExists(VS11x64RegEntry, HKEY_LOCAL_MACHINE) then + if Found then begin - RegReadStr(VS11x64RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end - else - begin - if RegKeyExists(VS11x86RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS11x86RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end; -end; - - -function GetVS11IDEFileName: string; -begin - Result := ''; - if IsWow64 then - begin - if RegKeyExists(VS11x64RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS11x64RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end - else - begin - if RegKeyExists(VS11x86RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS11x86RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end; -end; - - -function GetVS11CompilerFileName: string; -begin - Result:=ChangeFileExt(GetVS11IDEFileName,'.com'); -end; + LVisualStudioInfo:=TVisualStudioInfo.Create; + LVisualStudioInfo.IDEFileName:=Filename; + LVisualStudioInfo.Version := LVSVersion; + LVisualStudioInfo.IDEDescription:=VSVersionsNames[LVSVersion]; + if LWow64 then + LVisualStudioInfo.BaseRegistryKey:= VSRegBasePathsx64[LVSVersion] + else + LVisualStudioInfo.BaseRegistryKey:= VSRegBasePathsx86[LVSVersion]; -function IsVS14Installed: boolean; -var - Value: string; -begin - Result := False; - if IsWow64 then - begin - if RegKeyExists(VS14x64RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS14x64RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); - end; - end - else - begin - if RegKeyExists(VS14x86RegEntry, HKEY_LOCAL_MACHINE) then - begin - RegReadStr(VS14x86RegEntry, 'EnvironmentPath', Value, HKEY_LOCAL_MACHINE); - Result := FileExists(Value); + LVisualStudioInfo.CompilerFileName:=ChangeFileExt(LVisualStudioInfo.IDEFileName, '.com'); + LVisualStudioInfo.CppCompiler:=ExpandFileName(ExtractFilePath(LVisualStudioInfo.IDEFileName)+'\..\..')+'\VC\bin\cl.exe'; + VSIDEList.Add(LVisualStudioInfo); end; end; -end; - -function GetVS14IDEFileName: string; -begin - Result := ''; - if IsWow64 then - begin - if RegKeyExists(VS14x64RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS14x64RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end - else - begin - if RegKeyExists(VS14x86RegEntry, HKEY_LOCAL_MACHINE) then - RegReadStr(VS14x86RegEntry, 'EnvironmentPath', Result, HKEY_LOCAL_MACHINE); - end; -end; - -function GetVS14CompilerFileName: string; -begin - Result:=ChangeFileExt(GetVS14IDEFileName, '.com'); end; - +initialization + VSIDEList := TObjectList.Create(True); + LoadVSIDEList; +finalization + VSIDEList.Free; end. diff --git a/Units/uWmi_About.pas b/Units/uWmi_About.pas index e46d249..7b2dc8a 100644 --- a/Units/uWmi_About.pas +++ b/Units/uWmi_About.pas @@ -107,7 +107,7 @@ procedure TFrmAbout.FormCreate(Sender: TObject); LabelVersion.Caption := Format('Version %s', [FileVersionStr]); LabelWmiVersion.Caption := Format('WMI installed version %s', [GetWmiVersion]); MemoCopyRights.Lines.Add( - 'Author Rodrigo Ruz rodrigo.ruz.v@gmail.com - © 2010-2014 all rights reserved.'); + 'Author Rodrigo Ruz rodrigo.ruz.v@gmail.com - © 2010-2015 all rights reserved.'); MemoCopyRights.Lines.Add(''); MemoCopyRights.Lines.Add('Third Party libraries and tools used'); MemoCopyRights.Lines.Add( diff --git a/WDCC.dproj b/WDCC.dproj index 6367128..0959f46 100644 --- a/WDCC.dproj +++ b/WDCC.dproj @@ -4,7 +4,7 @@ 14.6 WDCC.dpr True - Release + Debug Application VCL DCC32 @@ -287,7 +287,7 @@ 1 1 2 - 238 + 241 False False False @@ -299,7 +299,7 @@ - 1.1.2.238 + 1.1.2.241 diff --git a/WDCC.res b/WDCC.res index 0c8319a..65490af 100644 Binary files a/WDCC.res and b/WDCC.res differ