module Netfira::InstallerGenerator::NsisTemplate

Public Class Methods

sub(variables) click to toggle source
# File lib/netfira/installer_generator/nsis_template.rb, line 6
def self.sub(variables)
  template.gsub(/\{([A-Z][_A-Z]*)\}/) { variables[$1] }
end

Private Class Methods

template() click to toggle source
# File lib/netfira/installer_generator/nsis_template.rb, line 12
      def self.template
        @template ||= <<-__EOF__

SilentInstall silent
Name          "{INSTALLER_NAME}"
Icon          setup.ico
OutFile       nsis_generated.exe
InstallDir    "$TEMP\\{TEMP_DIR}"

Section ""
  SetOutPath $INSTDIR
  File {INSTALLER_FILENAME}

        WriteRegStr HKLM "Software\\Netfire\\AMIPS"      "AuthenticationServer1"  "{AUTHENTICATION_SERVER}"
        WriteRegStr HKLM "Software\\Netfire\\Webstore"   "ShopId"                 "{SHOP_ID}"
        WriteRegStr HKLM "Software\\Netfire\\Webstore"   "SyncURL"                "{WEBSTORE_SYNC_URL}"
        WriteRegStr HKLM "Software\\Netfire\\Webstore"   "StoreFrontURL"          "{WEBSTORE_FRONT_URL}"
  WriteRegStr HKLM "Software\\Netfire\\Webstore"   "Server"                 "{SHOP_ADDRESS}"
  WriteRegStr HKLM "Software\\Netfire\\Networking" "NoUseSsl"               "{NO_USE_SSL}"

  Exec '"$INSTDIR\\{INSTALLER_FILENAME}"'
SectionEnd

        __EOF__
      end