Skip to content

Commit

Permalink
version 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vf1 committed Dec 20, 2012
1 parent 5403dec commit 0341b6c
Show file tree
Hide file tree
Showing 10 changed files with 116 additions and 172 deletions.
109 changes: 0 additions & 109 deletions Service/Installer.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Service/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// 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")]
[assembly: AssemblyVersion("1.1.*")]
[assembly: AssemblyFileVersion("1.1.*")]
2 changes: 0 additions & 2 deletions Service/Properties/OfficeSIP.url

This file was deleted.

4 changes: 0 additions & 4 deletions Service/Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@
<Reference Include="System.XML" />
</ItemGroup>
<ItemGroup>
<Compile Include="Installer.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="ServiceEx.cs" />
<Compile Include="Service1.cs">
Expand Down Expand Up @@ -104,7 +101,6 @@
</ItemGroup>
<ItemGroup>
<None Include="Properties\Main.ico" />
<None Include="Properties\OfficeSIP.url" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!--
Expand Down
39 changes: 7 additions & 32 deletions Service/Service1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,23 @@ public class Service1
private WcfService.WcfTurnService wcfService;
private EventLog eventLog;
private FileStream fileLog;

public const string BaseServiceName = @"OfficeSIP Turn Server";
private string extension;

public Service1(string extension)
{
ServiceName = GetServiceName(extension);

eventLog = new EventLog(GetEventlogName(extension));
eventLog.Source = GetEventlogName(extension);
}

public static string GetValidExtension(string extension)
{
return String.IsNullOrEmpty(extension) ? "N1" : extension;
}

public static string GetServiceName(string extension)
{
return String.Format("{0} {1}", BaseServiceName, GetValidExtension(extension));
}

public static string GetDisplayName(string extension)
{
return GetServiceName(extension);
}
this.ServiceName = @"OfficeSIP TURN Server";
this.extension = String.IsNullOrEmpty(extension) ? "N1" : extension;

public static string GetDescription(string extension)
{
return GetServiceName(extension);
}

public static string GetEventlogName(string extension)
{
return String.Format("{1} {0}", @"Turn Server OfficeSIP", GetValidExtension(extension));
this.eventLog = new EventLog();
this.eventLog.Source = ServiceName;
}

public void Debug(string[] args)
{
const int mutexDelay = 1000;

Mutex mutex1 = new Mutex(false, @"{4A85555B-8675-4230-84A0-4C87FC234B42}-" + ServiceName.Replace(' ', '-'));
Mutex mutex2 = new Mutex(false, @"{2F36CC7D-4486-46fd-AB4F-44C5D2157B46}-" + ServiceName.Replace(' ', '-'));
Mutex mutex1 = new Mutex(false, @"{4A85555B-8675-4230-84A0-4C87FC234B42}-" + extension);
Mutex mutex2 = new Mutex(false, @"{2F36CC7D-4486-46fd-AB4F-44C5D2157B46}-" + extension);

mutex2.WaitOne();
bool anotherStopped = mutex1.WaitOne(mutexDelay * 5);
Expand Down
46 changes: 46 additions & 0 deletions Setup/License.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{\rtf1\ansi\deff3\adeflang1025
{\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset204 Times New Roman;}{\f4\froman\fprq0\fcharset1 Courier New;}{\f5\fswiss\fprq0\fcharset1 Times New Roman;}{\f6\froman\fprq0\fcharset1 Times New Roman;}{\f7\fswiss\fprq0\fcharset1 Arial;}{\f8\fmodern\fprq0\fcharset1 Courier New;}{\f9\fnil\fprq2\fcharset204 Microsoft YaHei;}{\f10\fnil\fprq2\fcharset204 Arial;}{\f11\fmodern\fprq1\fcharset204 NSimSun;}{\f12\fnil\fprq0\fcharset1 Courier New;}{\f13\fnil\fprq0\fcharset1 Mangal;}}
{\colortbl;\red0\green0\blue0;\red128\green128\blue128;}
{\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\loch\f6\fs24\lang1033 Normal;}
{\s3\sbasedon15\snext16\ilvl2\outlinelevel2\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf0\b\kerning1\dbch\af9\langfe2052\dbch\af13\afs28\alang1081\ab\loch\f5\fs28\lang1033 Heading 3;}
{\s15\sbasedon0\snext16\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\cf0\kerning1\dbch\af9\langfe2052\dbch\af13\afs28\alang1081\loch\f7\fs28\lang1033 Heading;}
{\s16\sbasedon0\snext16\ql\nowidctlpar\sb0\sa120\ltrpar\cf0\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\loch\f6\fs24\lang1033 Text body;}
{\s17\sbasedon16\snext17\ql\nowidctlpar\sb0\sa120\ltrpar\cf0\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\loch\f6\fs24\lang1033 List;}
{\s18\sbasedon0\snext18\ql\nowidctlpar\sb120\sa120\noline\ltrpar\cf0\i\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\ai\loch\f6\fs24\lang1033 Caption;}
{\s19\sbasedon0\snext19\ql\nowidctlpar\noline\ltrpar\cf0\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\loch\f6\fs24\lang1033 Index;}
{\s20\sbasedon0\snext20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033 Preformatted Text;}
{\s21\sbasedon0\snext22\ql\nowidctlpar\li0\ri0\lin0\rin0\fi0\ltrpar\cf0\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\loch\f6\fs24\lang1033 List Heading;}
{\s22\sbasedon0\snext22\ql\nowidctlpar\li567\ri0\lin567\rin0\fi0\ltrpar\cf0\kerning1\dbch\af10\langfe2052\dbch\af13\afs24\alang1081\loch\f6\fs24\lang1033 List Contents;}
}{\*\listtable{\list\listtemplateid1
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-432\li432}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-576\li576}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-720\li720}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-864\li864}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-1008\li1008}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-1152\li1152}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-1296\li1296}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-1440\li1440}
{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow2{\leveltext \'00;}{\levelnumbers;}\fi-1584\li1584}\listid1}
}{\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}{\info{\creatim\yr2012\mo12\dy20\hr19\min53}{\revtim\yr0\mo0\dy0\hr0\min0}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern3600}}\deftab709
\viewscale100
{\*\pgdsctbl
{\pgdsc0\pgdscuse195\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\pgdscnxt0 Default;}}
\formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1134\margr1134\margt1134\margb1134\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1134\margrsxn1134\margtsxn1134\margbsxn1134\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc
\pgndec\pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\li0\ri0\lin0\rin0\fi0\sb0\sa0{\scaps0\caps0\cf1\expnd0\expndtw0\i0\b0\dbch\af12\afs20\alang1025\ai\rtlch \ltrch\loch\fs20\loch\f4
OfficeSIP TURN Server}
\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0{\scaps0\caps0\cf1\expnd0\expndtw0\i0\b0\dbch\af12\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4
Copyright (C) 2010 }{\scaps0\caps0\cf1\expnd0\expndtw0\i0\b0\dbch\af12\afs20\alang1025\ai\rtlch \ltrch\loch\fs20\loch\f4
Vitali Fomine}
\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0\dbch\af8\afs20\alang1025\rtlch \ltrch\loch\fs20

\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0{\scaps0\caps0\cf1\expnd0\expndtw0\i0\b0\dbch\af12\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.}
\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0\dbch\af8\afs20\alang1025\rtlch \ltrch\loch\fs20

\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0{\scaps0\caps0\cf1\expnd0\expndtw0\i0\b0\dbch\af12\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.}
\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0\dbch\af8\afs20\alang1025\rtlch \ltrch\loch\fs20

\par \pard\plain \s20\ql\nowidctlpar\sb0\sa0\ltrpar\cf0\kerning1\dbch\af11\langfe2052\dbch\af8\afs20\alang1081\loch\f8\fs20\lang1033\widctlpar\sb0\sa0{\scaps0\caps0\cf1\expnd0\expndtw0\i0\b0\dbch\af12\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.}
\par }
59 changes: 37 additions & 22 deletions Setup/Product.wxs
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Product Name="OfficeSIP TURN Server" Version="1.1.0.0" Language="1033" Manufacturer="OfficeSIP Communications" Id="C1E62DA1-F182-4CE4-91A1-80B5AFABA10F" UpgradeCode="3F414655-D602-47A6-84F6-9EAFE4A9A505">

<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<Product Name="OfficeSIP TURN Server" Version="!(bind.FileVersion.TurnServerServiceExe)" Language="1033" Manufacturer="OfficeSIP Communications" Id="C1E62DA1-F182-4CE4-91A1-80B5AFABA10F" UpgradeCode="3F414655-D602-47A6-84F6-9EAFE4A9A505">

<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

<MediaTemplate/>
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes" />

<Feature Id="Complete" Title="Server" Level="1">
<ComponentGroupRef Id="ProductComponents" />
<ComponentRef Id="DesktopUrl"/>
</Feature>

<!-- Check for .NET Framework Versions -->
Expand All @@ -28,32 +29,46 @@
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
<WixVariable Id="WixUIDialogBmp" Value="dlgbmp.bmp" />
<WixVariable Id="WixUIBannerBmp" Value="bannrbmp.bmp" />
<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />

<!-- EventSource -->
<PropertyRef Id="NETFRAMEWORK20INSTALLROOTDIR"/>

</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">

<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="OfficeSIP TURN Server" />
</Directory>
</Directory>
<Directory Id="DesktopFolder" Name="Desktop" />
</Directory>
</Fragment>
</Fragment>

<Fragment>
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
<Component Id="Service" Guid="A09B65D5-6EF3-47B5-A628-669405C68840">
<File Source="..\Service\bin\Release\SocketServers.dll"></File>
<File Source="..\Service\bin\Release\Turn.Message.dll"></File>
<File Source="..\Service\bin\Release\Turn.Server.dll"></File>
<File Source="..\Service\bin\Release\TurnServerService.exe"></File>
<File Source="..\Certificate\OfficeSIP.pfx "></File>
<!-- ~~~~~~~ -->
<util:EventSource Log="Application" Name="OfficeSIP TURN Server" EventMessageFile="[NETFRAMEWORK20INSTALLROOTDIR]EventLogMessages.dll" />
<File Source="..\Service\bin\Release\TurnServerService.exe" Id="TurnServerServiceExe" KeyPath="yes"></File>
<ServiceInstall Id="ServiceInstall" Type="ownProcess" Vital="yes" Name="OfficeSIP TURN Server" Start="auto" Account="[SERVICEACCOUNT]" Password="[SERVICEPASSWORD]" ErrorControl="ignore" Interactive="no" Description="Service of the OfficeSIP TURN Server"></ServiceInstall>
<ServiceControl Id="StartService" Start="install" Stop="both" Remove="uninstall" Name="OfficeSIP TURN Server" Wait="yes" />
</Component>
<Component Id="Urls" Guid="BD31D39D-F99A-4A7B-800B-A6745722065C">
<File Source="..\Service\Properties\OfficeSIP.url">
<Shortcut Id="DesktopUrl" Directory="DesktopFolder" Name="OfficeSIP TURN Server Homepage" Advertise="yes"></Shortcut>
</File>
</Component>
</ComponentGroup>
</Fragment>

</ComponentGroup>
</Fragment>

<Fragment>
<Component Id="DesktopUrl" Guid="BD31D39D-F99A-4A7B-800B-A6745722065C" Directory="DesktopFolder">
<util:InternetShortcut Id="Homepage.Desktop" Name="OfficeSIP TURN Server Homepage" Target="http://www.officesip.com/" Type="url" />
<RegistryValue Root="HKCU" Key="Software\Microsoft\OfficeSIP TURN Server" Name="desktop" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Fragment>


</Wix>
25 changes: 24 additions & 1 deletion Setup/Setup.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ProductVersion>3.6</ProductVersion>
<ProjectGuid>257cfd8d-433d-46b2-af9d-552b9357ca34</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>officesip-turn-server-1.1</OutputName>
<OutputName>officesip-turn-server</OutputName>
<OutputType>Package</OutputType>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' AND '$(MSBuildExtensionsPath32)' != '' ">$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
<WixTargetsPath Condition=" '$(WixTargetsPath)' == '' ">$(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets</WixTargetsPath>
Expand All @@ -25,6 +25,10 @@
<Compile Include="Product.wxs" />
</ItemGroup>
<ItemGroup>
<WixExtension Include="WixUtilExtension">
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
<Name>WixUtilExtension</Name>
</WixExtension>
<WixExtension Include="WixUIExtension">
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
<Name>WixUIExtension</Name>
Expand All @@ -34,6 +38,11 @@
<Name>WixNetFxExtension</Name>
</WixExtension>
</ItemGroup>
<ItemGroup>
<Content Include="bannrbmp.bmp" />
<Content Include="dlgbmp.bmp" />
<Content Include="License.rtf" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" />
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.
Expand All @@ -43,4 +52,18 @@
<Target Name="AfterBuild">
</Target>
-->
<Target Name="BeforeBuild">
<GetAssemblyIdentity AssemblyFiles="$(SolutionDir)Service\bin\$(Configuration)\TurnServerService.exe">
<Output TaskParameter="Assemblies" ItemName="AssemblyVersions" />
</GetAssemblyIdentity>
<CreateProperty Value="$(OutputName)-$([System.Text.RegularExpressions.Regex]::Match(%(AssemblyVersions.Version).Value, '\d+\.\d+'))">
<Output TaskParameter="Value" PropertyName="TargetName" />
</CreateProperty>
<CreateProperty Value="$(TargetName)$(TargetExt)">
<Output TaskParameter="Value" PropertyName="TargetFileName" />
</CreateProperty>
<CreateProperty Value="$(TargetDir)$(TargetFileName)">
<Output TaskParameter="Value" PropertyName="TargetPath" />
</CreateProperty>
</Target>
</Project>
Binary file added Setup/bannrbmp.bmp
Binary file not shown.
Binary file added Setup/dlgbmp.bmp
Binary file not shown.

0 comments on commit 0341b6c

Please sign in to comment.