; Copyright (C) 2013 Oracle Corporation
; This file is part of VirtualBox Open Source Edition (OSE), as
; you can redistribute it
and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
; @param "true" to enable logging, "false" to disable.
${If} ${enable} == "true"
${LogVerbose} "Started logging into separate file"
${LogVerbose} "Stopped logging into separate file"
!define LogEnable "!insertmacro _logEnable"
; Macro for (verbose) logging
!define LogVerbose "!insertmacro _logVerbose"
; Sends a logging text to the running instance of VBoxTray
; which then presents to text via balloon popup in the system tray (if enabled).
; @param Message type (0=Info, 1=Warning, 2=Error).
; @todo Add message timeout as parameter.
!macro _logToVBoxTray type text
!if $%VBOX_WITH_GUEST_INSTALL_HELPER% == "1"
; - String: Description / Body
; - String: Title / Name of application
; - Integer: Type of message: 0 (Info), 1 (Warning), 2 (Error)
; - Integer: Time (in msec) to show the notification
VBoxGuestInstallHelper::VBoxTrayShowBallonMsg "${text}" "VirtualBox Guest Additions Setup" ${type} 5000
Pop $0 ; Get return value (ignored for now)
Pop $0 ; Restore original $0 from stack
!define LogToVBoxTray "!insertmacro _logToVBoxTray"