Skip to content

Commit

Permalink
LINQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Helmut-Ortmann committed Nov 23, 2017
1 parent ac415a3 commit 42d6dd2
Show file tree
Hide file tree
Showing 15 changed files with 1,255 additions and 21 deletions.
29 changes: 29 additions & 0 deletions AddinSimpleNoAdminSetup/AddInSimpleRemove.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
##################################################
# AddInSimpleNoAdmin Quick uninstall
#################################################
# Note: This procedure takes a long time
#
# $app = Get-WmiObject -Class Win32_Product -Filter "Name = 'AddInSimpleNoAdmin'"
# $app.Uninstall()
#
$SoftwareName = "AddInSimpleNoAdmin"
"Deinstall $SoftwareName"

# fast way to uninstall
$uninstall64 = gci "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match $SoftwareName } | select UninstallString

# uninstall 64 bit
if ($uninstall64) {
$uninstall64 = $uninstall64.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X",""
$uninstall64 = $uninstall64.Trim()
Write "Uninstalling 64Bit..."
start-process "msiexec.exe" -arg "/X $uninstall64 /qb" -Wait}

# uninstall 32 bit
$uninstall32 = gci "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | foreach { gp $_.PSPath } | ? { $_ -match $SoftwareName } | select UninstallString
if ($uninstall32) {
$uninstall32 = $uninstall32.UninstallString -Replace "msiexec.exe","" -Replace "/I","" -Replace "/X",""
$uninstall32 = $uninstall32.Trim()
Write "Uninstalling 32Bit..."
start-process "msiexec.exe" -arg "/X $uninstall32 /qb" -Wait}
"Deinstall $SoftwareName finished"
66 changes: 66 additions & 0 deletions AddinSimpleNoAdminSetup/AddinSimpleNoAdminSetup.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>3.10</ProductVersion>
<ProjectGuid>bff70736-a233-48cc-a9cb-a51d2c7d6384</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>AddinSimpleNoAdminSetup</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>bin\$(Configuration)\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AddInSimple\AddInSimple.csproj">
<Name>AddInSimple</Name>
<Project>{ab75fa8e-016c-46dc-9c94-5825d856ee5d}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
<ProjectReference Include="..\hoLinqToSql\hoLinqToSql.csproj">
<Name>hoLinqToSql</Name>
<Project>{fed206af-e583-48c6-9952-bad2c41b3aa4}</Project>
<Private>True</Private>
<DoNotHarvest>True</DoNotHarvest>
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Wxs" />
</ItemGroup>
<ItemGroup>
<Compile Include="Wxs\Directories.wxs" />
<Compile Include="Wxs\Files.wxs" />
<Compile Include="Wxs\Product.wxs" />
</ItemGroup>
<ItemGroup>
<Content Include="AddInSimpleRemove.ps1" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
</Target>
<PropertyGroup>
<PostBuildEvent>"$(SolutionDir)\Setup\Scripts\renamemsi.bat" "$(targetPath)"</PostBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Wix.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
214 changes: 214 additions & 0 deletions AddinSimpleNoAdminSetup/License.rtf

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions AddinSimpleNoAdminSetup/Wxs/Directories.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="Apps" Name="apps" >
<Directory Id="APPLICATIONFOLDER" Name="AddInSimple" >
</Directory>
</Directory>
</Directory>
<Directory Id="Keys">
</Directory>
</Directory>
<SetProperty Id="ProgramFilesFolder" Value="[LocalAppDataFolder]" Before="CostFinalize"><![CDATA[NOT Privileged]]></SetProperty>
</Fragment>
</Wix>
140 changes: 140 additions & 0 deletions AddinSimpleNoAdminSetup/Wxs/Files.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<!-- Registry:
Note: Each time you change the AssemblyVersion of a registered *.dll
you have to update the registry information in this file!!!!
either by run Collect.bat and inserting everything between <Component> and </Component> or
by simply replacing the AssemblyVersion with the correct value (multiple times)
1. Generate with Wix Tool heat the registry entry for AddInSimple.dll (in bin\release folder of AddInSimple
"c:\Program Files (x86)\WiX Toolset v3.11\bin\heat" file AddInSimple.dll -ag -template fragment -out AddInSimple.wxs
see: Collection\Collect.bat
2. Copy the Component content of *.wxs into the Addin Component of this file
3. Update file parameter with Name and source
- For files which need to register as COM / ActiveX
- copy the content of the component in the component entry of this file
- If AssemblyVersion (Major, Minor) is changed you need to update the registration information
- HoToolsGui.dll, AddinClass.dll, FindAndReplace.dll
// Update the following entries to use WIX variables to find the files in their right location
Name="AddInSimple.dll" Source="$(var.AddInSimple.TargetPath)" />
4. A component for every file
-->

<Fragment>
<ComponentGroup Id="ProductComponents"
Directory="APPLICATIONFOLDER">
<Component Id="LicenceRTF" Guid="{44269BDF-AD31-47EB-88F5-34254D5844F7}">
<File Id="LicenseFile" Name="license.rtf" Source="license.rtf" KeyPath="yes" />
</Component>
<Component Id="RegisterEA" Guid="{171BFF66-F729-4DB6-96AD-761EA13E4E2E}">
<RegistryKey Root="HKCU" Key="Software\Sparx Systems\EAAddins\AddInSimple">
<!-- Namespace.ClassName of the dll to register as COM Object -->
<RegistryValue Type="string" Value="AddInSimple.AddInSimpleClass" KeyPath="yes" />
</RegistryKey>
</Component>
<Component Id="hoLinqToSql" Guid="{615EA76B-EE2B-44FD-AB59-770355DC9AD9}">
<File Id="hoLinqToSql.dll" KeyPath="yes" Name="hoLinqToSql.dll" Source="$(var.hoLinqToSql.TargetPath)" />
</Component>

<!-- LINQPad: Receive EA context information via Parameter -->
<Component Id="TestCallLinqWithParameter.linq" Guid="{A1296864-9AD1-4E56-89CA-18C8CAC51C57}">
<File Id="TestCallLinqWithParameter.linq" KeyPath="yes" Name="TestCallLinqWithParameter.linq" Source="..\AddInSimple\TestCallLinqWithParameter.linq" />
</Component>

<!-- LINQPad query example -->
<Component Id="EaBasicQuery.linq" Guid="{E84836DC-52EF-47FB-8FEA-41DFDEB145DD}">
<File Id="EaBasicQuery.linq" KeyPath="yes" Name="EaBasicQuery.linq" Source="..\AddInSimple\EaBasicQuery.linq" />
</Component>
<!-- LINQPad query example -->
<Component Id="LinqPadConnections.linq" Guid="{35377251-D9D2-4678-BF3B-055175F00BE7}">
<File Id="LinqPadConnections.linq" KeyPath="yes" Name="LinqPadConnections.linq" Source="..\AddInSimple\LinqPadConnections.linq" />
</Component>


<!-- linq2db -->
<!-- Supported databases Access, MySQL, SqlServer, Oracle, Sybase, Postgres (tested: Access, MySQL, SqlServer) -->
<Component Id="linq2db.dll" Guid="{5E6D0EF2-280D-4B80-AF56-993C1A02B8C9}">
<File Id="linq2db.dll" KeyPath="yes" Name="linq2db.dll" Source="..\packages\linq2db.1.9.0\lib\net45\linq2db.dll" />
</Component>
<!-- Separate install MySql.Data.dll-->
<Component Id="MySql.Data.dll" Guid="{CEEE4DA8-D2F3-4924-A922-8D894E4156D1}">
<File Id="MySql.Data.dll" KeyPath="yes" Name="MySql.Data.dll" Source="..\packages\MySql.Data.6.9.9\lib\net45\MySql.Data.dll" />
</Component>
<Component Id="Microsoft.SqlServer.Types.dll" Guid="{EABD70B2-374E-4959-AB91-38863D06ABFA}">
<File Id="Microsoft.SqlServer.Types.dll" KeyPath="yes" Name="Microsoft.SqlServer.Typess.dll" Source="..\packages\linq2db.SqlServer.1.9.0\tools\Microsoft.SqlServer.Types.dll" />
</Component>
<Component Id="Oracle.ManagedDataAccess.dll" Guid="{48EE033C-4B86-4195-84CA-0BF89DAF7CC3}">
<File Id="Oracle.ManagedDataAccess.dll" KeyPath="yes" Name="Oracle.ManagedDataAccess.dll" Source="..\packages\linq2db.Oracle.x86.1.9.0\tools\Oracle.ManagedDataAccess.dll" />
</Component>
<Component Id="Npgsql.dll" Guid="{2EFF6EB5-E946-4B52-9ACC-2AB5D9564D8D}">
<File Id="Npgsql.dll" KeyPath="yes" Name="Npgsql.dll" Source="..\packages\linq2db.PostgreSQL.1.9.0\tools\Npgsql.dll" />
</Component>
<Component Id="Sybase.AdoNet2.AseClient.dll" Guid="{BF034025-BCEA-4A40-870E-25F1158DD17B}">
<File Id="Sybase.AdoNet2.AseClient.dll" KeyPath="yes" Name="Sybase.AdoNet2.AseClient.dll" Source="..\packages\linq2db.Sybase.1.9.0\tools\Sybase.AdoNet2.AseClient.dll" />
</Component>
<Component Id="sybdrvado20.dll" Guid="{0F614AA1-5202-4C1A-B4A7-07B97FD09372}">
<File Id="sybdrvado20.dll" KeyPath="yes" Name="sybdrvado20.dll" Source="..\packages\linq2db.Sybase.1.9.0\tools\sybdrvado20.dll" />
</Component>





<!--
Replace: Source="SourceDir\release\AddInSimple.dll" /> by
Name="AddInSimple.dll" Source="$(var.AddInSimple.TargetPath)" />
If you change AssemblyVersion also update all Version=.. in the beneath associated registry - or run the collect.bat
Run first: Collect.bat to reap the Component registration information with WIX
Insert the content of the reaped *.wxs file between
<Component>
..
</Component>
-->
<Component Id="cmp08B8C5EFB4E3067985AB6C7DE53C14BD" Guid="*">
<Class Id="{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}" Context="InprocServer32" Description="AddInSimple.AddInSimpleClass" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="AddInSimple.AddInSimpleClass" Description="AddInSimple.AddInSimpleClass" />
</Class>
<Class Id="{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}" Context="InprocServer32" Description="AddInSimple.InternalHelpers" ThreadingModel="both" ForeignServer="mscoree.dll">
<ProgId Id="AddInSimple.InternalHelpers" Description="AddInSimple.InternalHelpers" />
</Class>
<File Id="filB7ACB0AA302E14C4B5BC103FF525B9EE" KeyPath="yes" Name="AddInSimple.dll" Source="$(var.AddInSimple.TargetPath)" />
<ProgId Id="Record" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32\1.0.6" Name="Class" Value="AddInSimple.AddInSimpleClass" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32\1.0.6" Name="Assembly" Value="AddInSimple, Version=1.0.6, Culture=neutral, PublicKeyToken=37ea3d95ffcb87e1" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32\1.0.6" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32\1.0.6" Name="CodeBase" Value="file:///[#filB7ACB0AA302E14C4B5BC103FF525B9EE]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32" Name="Class" Value="AddInSimple.AddInSimpleClass" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32" Name="Assembly" Value="AddInSimple, Version=1.0.6, Culture=neutral, PublicKeyToken=37ea3d95ffcb87e1" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{58E7B70F-16C4-4538-A4E8-AF4EAC27519B}\InprocServer32" Name="CodeBase" Value="file:///[#filB7ACB0AA302E14C4B5BC103FF525B9EE]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\Implemented Categories\{62C8FE65-4EBB-45e7-B440-6E39B2CDBF29}" Value="" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32\1.0.6" Name="Class" Value="AddInSimple.InternalHelpers" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32\1.0.6" Name="Assembly" Value="AddInSimple, Version=1.0.6, Culture=neutral, PublicKeyToken=37ea3d95ffcb87e1" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32\1.0.6" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32\1.0.6" Name="CodeBase" Value="file:///[#filB7ACB0AA302E14C4B5BC103FF525B9EE]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32" Name="Class" Value="AddInSimple.InternalHelpers" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32" Name="Assembly" Value="AddInSimple, Version=1.0.6, Culture=neutral, PublicKeyToken=37ea3d95ffcb87e1" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="CLSID\{FCE68F15-F7B2-3C7B-991B-5EB1D31FA88A}\InprocServer32" Name="CodeBase" Value="file:///[#filB7ACB0AA302E14C4B5BC103FF525B9EE]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{5E1E504C-95C7-4B14-A0F6-70329F70084A}\1.0.6" Name="Class" Value="EA.ObjectType" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{5E1E504C-95C7-4B14-A0F6-70329F70084A}\1.0.6" Name="Assembly" Value="AddInSimple, Version=1.0.6, Culture=neutral, PublicKeyToken=37ea3d95ffcb87e1" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{5E1E504C-95C7-4B14-A0F6-70329F70084A}\1.0.6" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{5E1E504C-95C7-4B14-A0F6-70329F70084A}\1.0.6" Name="CodeBase" Value="file:///[#filB7ACB0AA302E14C4B5BC103FF525B9EE]" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{E4647791-51BD-3B9C-9138-9B6B528BC838}\1.0.6" Name="Class" Value="AddInSimple.EaType" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{E4647791-51BD-3B9C-9138-9B6B528BC838}\1.0.6" Name="Assembly" Value="AddInSimple, Version=1.0.6, Culture=neutral, PublicKeyToken=37ea3d95ffcb87e1" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{E4647791-51BD-3B9C-9138-9B6B528BC838}\1.0.6" Name="RuntimeVersion" Value="v4.0.30319" Type="string" Action="write" />
<RegistryValue Root="HKCR" Key="Record\{E4647791-51BD-3B9C-9138-9B6B528BC838}\1.0.6" Name="CodeBase" Value="file:///[#filB7ACB0AA302E14C4B5BC103FF525B9EE]" Type="string" Action="write" />
</Component>
<!-- HtmlAgilityPack -->
<Component Id="HtmlAgilityPack.dll" Guid="{70C34202-0279-44B9-9B4F-9E55D37D8822}">
<File Id="HtmlAgilityPack.dll" KeyPath="yes" Name="HtmlAgilityPack.dll" Source="..\packages\HtmlAgilityPack.1.6.1\lib\Net45\HtmlAgilityPack.dll" />
</Component>
</ComponentGroup>
</Fragment>
</Wix>
Loading

0 comments on commit 42d6dd2

Please sign in to comment.