#region - BCX install script - (Inno Setup)
#include <Common_Functions.au3>
Opt('TrayIconDebug', 1)
Break(False)

; Installer.
$executable = 'BCX 4.61.exe'
; Default group folder in startmenu.
$group = 'Development'
; Installation folder in Program Files.
$directory = 'BCX'
; Components to install.
$components = 'bcx_bin,open_source'
; Specify language.
$language = ''

; Run the installer.
If Not FileExists(@ScriptDir & '\__lccwin32.au3') Then
    Exit 2
Else
    $pid = Run('"' & @AutoItExe & '" /AutoIt3ExecuteScript "' & @ScriptDir & '\__lccwin32.au3"')
    ProcessWaitClose($pid)
EndIf
$pid = _InnoSetup()
ProcessWaitClose($pid)

; Remove shortcuts.
If _Programs('BCX-32 The Free BASIC To C Translator.lnk') Then
    FileChangeDir($group)
    FileDelete('BCX - The Free BASIC To C Translator.lnk')
    FileDelete('BCX Code Editor.lnk')
    FileDelete('BCX TO EXE Tool.lnk')
    FileDelete('Dialog Editor.lnk')
    FileDelete('Getting Started.lnk')
    FileDelete('Image Editor.lnk')
    FileDelete('JFE Code Editor.lnk')
    FileDelete('Menu Maker.lnk')
    FileDelete('Menu Maker Help.lnk')
    FileDelete('Qtab Tab Wizard.lnk')
    FileDelete('Uninstall BCX.lnk')
    FileDelete('Windows MsgBox Creator.lnk')
EndIf
_Desktop('BCX - The Free BASIC To C Translator.lnk')

Exit
#endregion