Skip to content

Commit

Permalink
Release 1.1.0
Browse files Browse the repository at this point in the history
Switched installer to Inno Setup.
64 bit install now uses correct folder.
Application is now signed.
  • Loading branch information
Phil committed Apr 26, 2016
1 parent 1110912 commit 3ab32d0
Show file tree
Hide file tree
Showing 5 changed files with 584 additions and 5 deletions.
9 changes: 8 additions & 1 deletion Agent.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Agent</RootNamespace>
<AssemblyName>WOLAgent</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -21,6 +22,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -30,6 +32,7 @@
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<StartupObject>Agent.Program</StartupObject>
Expand All @@ -42,6 +45,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand All @@ -63,6 +67,9 @@
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
8 changes: 4 additions & 4 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("WOLAgent")]
[assembly: AssemblyDescription("Aquila WOL Agent")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyCompany("Aquila Technology")]
[assembly: AssemblyProduct("Agent")]
[assembly: AssemblyCopyright("Copyright (c) 2004 - 2014, Aquila Technology, LLC.")]
[assembly: AssemblyCopyright("Copyright (c) 2004 - 2016, Aquila Technology, LLC.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -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.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
3 changes: 3 additions & 0 deletions app.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
103 changes: 103 additions & 0 deletions installer/WOLAgent.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "WOLAgent"
#define MyAppPublisher "Aquila Technology"
#define MyAppURL "http://wol.aquilatech.com/"
#define rootFolder "C:\Projects\agent"
#define MyAppExeName "WOLAgent.exe"
#define MyDescription "Aquila WOL Agent"
#define MyAppVersion GetFileVersion("C:\Projects\Agent\bin\Release\WOLAgent.exe")

#define signtool "c:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe"
#define subject "Open Source Developer, Phillip Tull"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{E0E4F4B0-2D93-4E03-B540-9198094045C4}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName=WOLAgent
OutputDir=Release
OutputBaseFilename={#MyAppName}_{#MyAppVersion}
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64 ia64

; declare mysign=$p
SignTool=mysign {#signtool} sign /a /n $q{#subject}$q /fd sha1 /t http://timestamp.comodoca.com/authenticode /d $q{#MyAppName}$q $f
SignTool=mysign {#signtool} sign /a /n $q{#subject}$q /as /fd sha256 /td sha256 /tr http://timestamp.comodoca.com/rfc3161 /d $q{#MyAppName}$q $f

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Files]
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: "{#rootFolder}\bin\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion; BeforeInstall: BeforeServiceInstall('{#MyAppName}', '{#MyAppExeName}'); AfterInstall: AfterServiceInstall('{#MyAppName}', '{#MyAppExeName}')

[Registry]
Root: "HKLM"; Subkey: "SYSTEM\CurrentControlSet\Services\{#MyAppName}"; ValueType: string; ValueName: "Description"; ValueData: "Passes WOL packets between networks."; Flags: createvalueifdoesntexist deletevalue

[Code]
#include "services_unicode.iss"
procedure BeforeServiceInstall(SvcName, FileName: String);
var
S: Longword;
begin
//If service is installed, it needs to be stopped
if ServiceExists(SvcName) then begin
S:= SimpleQueryService(SvcName);
if S <> SERVICE_STOPPED then begin
SimpleStopService(SvcName, True, True);
end;
end;
end;
procedure AfterServiceInstall(SvcName, FileName: String);
begin
//If service is not installed, it needs to be installed now
if not ServiceExists(SvcName) then begin
if SimpleCreateService(SvcName, '{#MyDescription}', ExpandConstant('{app}')+'\' + FileName, SERVICE_AUTO_START, '', '', False, True) then begin
//Service successfully installed
SimpleStartService(SvcName, True, True);
end else begin
//Service failed to install
end;
end;
end;
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
var
mRes : integer;
S: Longword;
SvcName : String;
begin
SvcName := '{#MyAppName}';
case CurUninstallStep of
usUninstall:
begin
mRes := MsgBox('Do you want to remove the {#MyAppName} service?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
if mRes = IDYES then
begin
//If service is installed, it needs to be stopped
if ServiceExists(SvcName) then begin
S:= SimpleQueryService(SvcName);
if S <> SERVICE_STOPPED then begin
SimpleStopService(SvcName, True, True);
end;
SimpleDeleteService(SvcName);
end;
end;
end;
end;
end;
Loading

0 comments on commit 3ab32d0

Please sign in to comment.