188 lines
5.8 KiB
Plaintext
188 lines
5.8 KiB
Plaintext
; WBI Installer
|
|
|
|
[Setup]
|
|
AppName=AyaNova WBI
|
|
AppVerName=AyaNova WBI 7.6
|
|
AppPublisher=Ground Zero Tech-Works Inc.
|
|
AppPublisherURL=https://www.ayanova.com/
|
|
AppSupportUrl=http://forum.ayanova.com
|
|
AppVersion=7.6.0
|
|
;App ID is used for updating and patching
|
|
;see: http://www.jrsoftware.org/iskb.php?updateinstall
|
|
AppId=ayanovawbi5x
|
|
|
|
DefaultDirName={pf}\Ground Zero Tech-Works Inc.\AyaNovaWBI
|
|
|
|
DefaultGroupName=AyaNovaWBI
|
|
;UninstallDisplayIcon={app}\AyaNova.exe
|
|
LicenseFile=license.rtf
|
|
WizardImageFile=wizlarge.bmp
|
|
WizardImageStretch=no
|
|
WizardImageBackColor=clWhite
|
|
WizardSmallImageFile=wizsmall.bmp
|
|
;Hide page asking where shortcuts should go
|
|
DisableProgramGroupPage=Yes
|
|
;Hide page prompting user for install location as there is only one valid location
|
|
DisableDirPage=Yes
|
|
OutputBaseFilename=AyaNovaWBISetup
|
|
OutputDir=..
|
|
;"release" mode full compression
|
|
Compression=lzma/ultra
|
|
SolidCompression=true
|
|
InternalCompressLevel=ultra
|
|
|
|
|
|
[Files]
|
|
Source: "web.config"; DestDir: "{app}";Permissions: everyone-full;Flags:ignoreversion;Check: CheckIIS;
|
|
|
|
;Obfuscated files
|
|
Source: "..\..\release\obfuscated\GZTW.AyaNova.BLL.dll"; DestDir: "{app}\bin";Permissions: everyone-full;Flags:ignoreversion;
|
|
Source: "..\..\release\obfuscated\GZTW.AyaNovaWBI.dll"; DestDir: "{app}\bin";Permissions: everyone-full;Flags:ignoreversion;
|
|
|
|
;Config.txt db connection file
|
|
Source: "config.txt"; DestDir: "{app}\bin";Permissions: everyone-full;Flags:confirmoverwrite;
|
|
|
|
;website content
|
|
Source: "..\..\source\WBI_PUBLISH\*";Excludes:"web.config"; DestDir: "{app}";Permissions: everyone-full;Flags:ignoreversion;
|
|
|
|
;Graphics folder
|
|
Source: "..\..\source\WBI_PUBLISH\graphics\*";DestDir: "{app}\graphics";Permissions: everyone-full;Flags:ignoreversion;
|
|
|
|
;bin folder
|
|
Source: "..\..\source\WBI_PUBLISH\bin\*";Excludes: "config.txt,*.xml,GZTW.AyaNova.BLL.dll,GZTW.AyaNovaWBI.dll,ChilkatDotNet4.dll,Telerik.Web.Design.dll";DestDir: "{app}\bin";Permissions: everyone-full;Flags:ignoreversion;
|
|
|
|
;Source: "..\..\3rdprtylibs\chilkat\ChilkatDotNet4.dll"; DestDir: "{app}\bin";Permissions: everyone-full;Flags:ignoreversion; Check: not IsX64
|
|
;Source: "..\..\3rdprtylibs\chilkat\64bit\ChilkatDotNet4.dll"; DestDir: "{app}\bin";Permissions: everyone-full;Flags:ignoreversion; Check: IsX64
|
|
|
|
Source: "..\..\3rdprtylibs\chilkat\ChilkatDotNet4.dll"; DestDir: "{app}";Permissions: everyone-full; Check: not IsX64
|
|
Source: "..\..\3rdprtylibs\chilkat\64bit\ChilkatDotNet4.dll"; DestDir: "{app}";Permissions: everyone-full; Check: IsX64
|
|
;Chilkat c run time library
|
|
Source: "..\..\3rdprtylibs\microsoft\msvcr100.dll"; DestDir: "{app}"; Check: not IsX64
|
|
Source: "..\..\3rdprtylibs\microsoft\x64\msvcr100.dll"; DestDir: "{app}"; Check: IsX64
|
|
|
|
;JSON license format required Files (case 3122)
|
|
Source: "..\..\3rdprtylibs\crypt\BouncyCastle.Crypto.dll"; DestDir: "{app}"
|
|
Source: "..\..\3rdprtylibs\json.net.40\Newtonsoft.Json.dll"; DestDir: "{app}"
|
|
|
|
;supporting files
|
|
Source: "license.rtf"; DestDir: "{app}"
|
|
|
|
|
|
;App_Data folder for XtraReports
|
|
[Dirs]
|
|
Name: "{app}\App_Data";Permissions: everyone-modify;
|
|
|
|
|
|
|
|
|
|
[Code]
|
|
var
|
|
WBIChecked: Boolean;
|
|
WBICheckResult: Boolean;
|
|
|
|
{--- Data Portal ---}
|
|
|
|
const
|
|
IISServerName = 'localhost';
|
|
IISServerNumber = '1';
|
|
IISURL = 'http://127.0.0.1';
|
|
|
|
function CheckIIS(): Boolean;
|
|
var
|
|
IIS, WebSite, WebServer, WebRoot, VDir: Variant;
|
|
|
|
|
|
begin
|
|
|
|
if not WBIChecked then begin
|
|
WBIChecked := True;
|
|
WBICheckResult := False;
|
|
{ Create the main IIS COM Automation object }
|
|
try
|
|
IIS := CreateOleObject('IISNamespace');
|
|
except
|
|
RaiseException('WBI requires Microsoft IIS.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)');
|
|
end;
|
|
|
|
{ Connect to the IIS server }
|
|
WebSite := IIS.GetObject('IIsWebService', IISServerName + '/w3svc');
|
|
WebServer := WebSite.GetObject('IIsWebServer', IISServerNumber);
|
|
WebRoot := WebServer.GetObject('IIsWebVirtualDir', 'Root');
|
|
|
|
{ Remove old virtual dir }
|
|
try
|
|
WebRoot.Delete('IIsWebVirtualDir', 'AyaNovaWBI6');
|
|
WebRoot.SetInfo();
|
|
except
|
|
;
|
|
end;
|
|
|
|
try
|
|
WebRoot.Delete('IIsWebVirtualDir', 'AyaNovaWBI');
|
|
WebRoot.SetInfo();
|
|
except
|
|
;
|
|
end;
|
|
|
|
{ Create new virtual dir }
|
|
VDir := WebRoot.Create('IIsWebVirtualDir', 'AyaNovaWBI');
|
|
VDir.AccessRead := True;
|
|
VDir.AccessExecute := True;
|
|
|
|
VDir.AppFriendlyName := 'AyaNova WBI';
|
|
VDir.Path := ExpandConstant('{app}');
|
|
VDir.AppCreate(True);
|
|
VDir.DefaultDoc := 'default.aspx';
|
|
VDir.SetInfo();
|
|
WBICheckResult := True;
|
|
{MsgBox('Created virtual directory AyaNovaWBI'#13#13+VDir.Path, mbInformation, mb_Ok);}
|
|
end;
|
|
Result := WBICheckResult;
|
|
end;
|
|
|
|
{Check for the .net 4 framework}
|
|
|
|
function InitializeSetup(): Boolean;
|
|
var
|
|
ErrorCode: Integer;
|
|
NetFrameWorkInstalled : Boolean;
|
|
Result1 : Boolean;
|
|
begin
|
|
NetFrameWorkInstalled := RegKeyExists(HKLM,'SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full');
|
|
if NetFrameWorkInstalled then
|
|
begin
|
|
Result := true;
|
|
end else
|
|
begin
|
|
Result1 := MsgBox('This application requires the .NET Framework 4.'+#13#13+'Please download and install the .NET Framework and run this setup again.'+#13#13+'Do you want to download the framework now?',
|
|
mbConfirmation, MB_YESNO) = idYes;
|
|
if Result1 =false then
|
|
begin
|
|
Result:=false;
|
|
end else
|
|
begin
|
|
Result:=false;
|
|
ShellExec('open',
|
|
'http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992',
|
|
'','',SW_SHOWNORMAL,ewNoWait,ErrorCode);
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
{Check for 64 bit operating system}
|
|
var
|
|
Has64bitChecked: Boolean;
|
|
Is64Bit: Boolean;
|
|
|
|
function IsX64: Boolean;
|
|
begin
|
|
if not Has64bitChecked then begin
|
|
Is64Bit := (ProcessorArchitecture = paX64);
|
|
Has64bitChecked:=true;
|
|
|
|
end;
|
|
Result:=Is64Bit;
|
|
end;
|
|
|