<commit_before>;NSIS Setup Script
;--------------------------------

!ifndef ACE_ROOT
  !error "You must set ACE_ROOT."
!endif

!ifndef VC_ROOT
  !define VC_ROOT "C:\Program Files\Microsoft Visual Studio 10.0\VC"
!endif

!ifndef VERSION
  !error "You must set VERSION."
!endif

;--------------------------------
;Configuration

!ifdef OUTFILE
  OutFile "${OUTFILE}"
!else
  OutFile ammo-gateway-${VERSION}.exe
!endif

SetCompressor /SOLID lzma

InstType "Full"


InstallDir $PROGRAMFILES\ammo-gateway
InstallDirRegKey HKLM Software\ammo-gateway ""

RequestExecutionLevel admin

;--------------------------------
;Header Files

!include "MUI2.nsh"
!include "Sections.nsh"
!include "LogicLib.nsh"
!include "Memento.nsh"
!include "WordFunc.nsh"

;--------------------------------
;Functions

!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD

  !insertmacro VersionCompare

!endif

;--------------------------------
;Definitions

!define SHCNE_ASSOCCHANGED 0x8000000
!define SHCNF_IDLIST 0

;--------------------------------
;Configuration

;Names
Name "AMMO Gateway"
Caption "AMMO Gateway ${VERSION} Setup"

;Memento Settings
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\ammo-gateway"

;Icon setting
;!define MUI_ICON path_to_icon.ico

;Interface Settings
!define MUI_ABORTWARNING

!define MUI_HEADERIMAGE
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis.bmp"

!define MUI_COMPONENTSPAGE_SMALLDESC

;Pages
!define MUI_WELCOMEPAGE_TITLE "Welcome to the AMMO Gateway ${VERSION} Setup Wizard"
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of AMMO Gateway ${VERSION}.$\r$\n$\r$\n$_CLICK"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE"
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
Page custom PageReinstall PageLeaveReinstall
!endif
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_LINK "Visit the AMMO site for the latest news, FAQs and support"
!define MUI_FINISHPAGE_LINK_LOCATION "http://ammo.isis.vanderbilt.edu"

;!define MUI_FINISHPAGE_RUN "$INSTDIR\NSIS.exe"
;!define MUI_FINISHPAGE_NOREBOOTSUPPORT

;!define MUI_FINISHPAGE_SHOWREADME
;!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show release notes"
;!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes

!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

${MementoSection} "Gateway Core (required)" SecCore

  SetDetailsPrint textonly
  DetailPrint "Installing Gateway Core ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\GatewayCore.exe
  File build\lib\gatewayconnector.dll

  SetShellVarContext all
  SetOutPath $APPDATA\ammo-gateway
  File build\etc\GatewayConfig.json

${MementoSectionEnd}

${MementoSection} "Android Gateway Plugin (required)" SecAndPlug

  SetDetailsPrint textonly
  DetailPrint "Installing Android Plugin ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\AndroidGatewayPlugin.exe

${MementoSectionEnd}

${MementoSection} "LDAP Gateway Plugin (required)" SecLdapPlug

  SetDetailsPrint textonly
  DetailPrint "Installing LDAP Plugin ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\LdapGatewayPlugin.exe
  SetOutPath $APPDATA\ammo-gateway
  File build\etc\LdapPluginConfig.json

${MementoSectionEnd}

${MementoSection} "Data Store Gateway Plugin (required)" SecDatPlug

  SetDetailsPrint textonly
  DetailPrint "Installing Data Store Plugin ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\DataStoreGatewayPlugin.exe

${MementoSectionEnd}
<commit_msg>added loggin and data store plugin config files<commit_after>;NSIS Setup Script
;--------------------------------

!ifndef ACE_ROOT
  !error "You must set ACE_ROOT."
!endif

!ifndef VC_ROOT
  !define VC_ROOT "C:\Program Files\Microsoft Visual Studio 10.0\VC"
!endif

!ifndef VERSION
  !error "You must set VERSION."
!endif

;--------------------------------
;Configuration

!ifdef OUTFILE
  OutFile "${OUTFILE}"
!else
  OutFile ammo-gateway-${VERSION}.exe
!endif

SetCompressor /SOLID lzma

InstType "Full"


InstallDir $PROGRAMFILES\ammo-gateway
InstallDirRegKey HKLM Software\ammo-gateway ""

RequestExecutionLevel admin

;--------------------------------
;Header Files

!include "MUI2.nsh"
!include "Sections.nsh"
!include "LogicLib.nsh"
!include "Memento.nsh"
!include "WordFunc.nsh"

;--------------------------------
;Functions

!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD

  !insertmacro VersionCompare

!endif

;--------------------------------
;Definitions

!define SHCNE_ASSOCCHANGED 0x8000000
!define SHCNF_IDLIST 0

;--------------------------------
;Configuration

;Names
Name "AMMO Gateway"
Caption "AMMO Gateway ${VERSION} Setup"

;Memento Settings
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\ammo-gateway"

;Icon setting
;!define MUI_ICON path_to_icon.ico

;Interface Settings
!define MUI_ABORTWARNING

!define MUI_HEADERIMAGE
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis.bmp"

!define MUI_COMPONENTSPAGE_SMALLDESC

;Pages
!define MUI_WELCOMEPAGE_TITLE "Welcome to the AMMO Gateway ${VERSION} Setup Wizard"
!define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of AMMO Gateway ${VERSION}.$\r$\n$\r$\n$_CLICK"

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE"
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
Page custom PageReinstall PageLeaveReinstall
!endif
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!define MUI_FINISHPAGE_LINK "Visit the AMMO site for the latest news, FAQs and support"
!define MUI_FINISHPAGE_LINK_LOCATION "http://ammo.isis.vanderbilt.edu"

;!define MUI_FINISHPAGE_RUN "$INSTDIR\NSIS.exe"
;!define MUI_FINISHPAGE_NOREBOOTSUPPORT

;!define MUI_FINISHPAGE_SHOWREADME
;!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show release notes"
;!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes

!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections

${MementoSection} "Gateway Core (required)" SecCore

  SetDetailsPrint textonly
  DetailPrint "Installing Gateway Core ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\GatewayCore.exe
  File build\lib\gatewayconnector.dll

  SetShellVarContext all
  SetOutPath $APPDATA\ammo-gateway
  File build\etc\GatewayConfig.json
  File build\etc\LoggingConfig.json

${MementoSectionEnd}

${MementoSection} "Android Gateway Plugin (required)" SecAndPlug

  SetDetailsPrint textonly
  DetailPrint "Installing Android Plugin ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\AndroidGatewayPlugin.exe

${MementoSectionEnd}

${MementoSection} "LDAP Gateway Plugin (required)" SecLdapPlug

  SetDetailsPrint textonly
  DetailPrint "Installing LDAP Plugin ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\LdapGatewayPlugin.exe
  SetOutPath $APPDATA\ammo-gateway
  File build\etc\LdapPluginConfig.json

${MementoSectionEnd}

${MementoSection} "Data Store Gateway Plugin (required)" SecDatPlug

  SetDetailsPrint textonly
  DetailPrint "Installing Data Store Plugin ..."
  SetDetailsPrint listonly

  SectionIn 1 2 3 RO
  ;SetOutPath $INSTDIR
  ;RMDir /r $SMPROGRAMS\ammo-gateway

  SetOutPath $INSTDIR\bin
  SetOverwrite on
  File build\bin\DataStoreGatewayPlugin.exe
  SetOutPath $APPDATA\ammo-gateway
  File build\etc\DataStorePluginConfig.json

${MementoSectionEnd}

{'fraction_non_alphanumeric': 0.1347060853560336, 'fraction_numerical': 0.005751754285056942, 'mean_word_length': 3.968, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '59762', 'n_tokens_mistral': 3122, 'n_tokens_neox': 2926, 'n_words': 689}