diff --git a/fluent-package/Rakefile b/fluent-package/Rakefile index 52a7b1315..a02efbdab 100755 --- a/fluent-package/Rakefile +++ b/fluent-package/Rakefile @@ -575,9 +575,13 @@ class BuildTask desc "Install additional .bat files for Windows" task :win_batch_files do ensure_directory(staging_bindir) + ensure_directory(staging_sharedir) cp("msi/assets/#{PACKAGE_NAME}-prompt.bat", fluent_package_staging_dir) cp("msi/assets/#{PACKAGE_NAME}-post-install.bat", staging_bindir) cp("msi/assets/#{PACKAGE_NAME}-post-migration.bat", staging_bindir) + cp("msi/assets/#{PACKAGE_NAME}-post-toast.bat", staging_bindir) + cp("msi/assets/#{PACKAGE_NAME}-post-toast.ps1", staging_bindir) + cp("msi/assets/#{PACKAGE_NAME}-toast-icon.png", staging_sharedir) cp("msi/assets/#{SERVICE_NAME}.bat", fluent_package_staging_dir) cp("msi/assets/fluent-gem.bat", fluent_package_staging_dir) cp("msi/assets/#{PACKAGE_NAME}-version.rb", staging_bindir) diff --git a/fluent-package/msi/assets/fluent-package-post-toast.bat b/fluent-package/msi/assets/fluent-package-post-toast.bat new file mode 100644 index 000000000..1a8a1dd7e --- /dev/null +++ b/fluent-package/msi/assets/fluent-package-post-toast.bat @@ -0,0 +1,7 @@ +@echo off +title Fluent-package post toast script +if exist "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" ( + if exist "%~dp0..\bin\fluent-package-post-toast.ps1" ( + "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" "%~dp0..\bin\fluent-package-post-toast.ps1" + ) +) diff --git a/fluent-package/msi/assets/fluent-package-post-toast.ps1 b/fluent-package/msi/assets/fluent-package-post-toast.ps1 new file mode 100644 index 000000000..cdc6081fa --- /dev/null +++ b/fluent-package/msi/assets/fluent-package-post-toast.ps1 @@ -0,0 +1,23 @@ +$binDir = $(Split-Path $MyInvocation.MyCommand.Path -Parent) +$topDir = $(Split-Path $binDir -Parent) +$xml = @" + + + + Fluentd logo + Fluent Package has been installed! + If you want enterprise technical support, access the following URL + https://www.fluentd.org/enterprise=services + + + + + + +"@ +$XmlDocument = [Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime]::New() +$XmlDocument.loadXml($xml) +# Fluent Package Command Prompt +$App = $(Get-StartApps -Name "Fluent Package Command Prompt") +$AppId = $App.AppID +[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime]::CreateToastNotifier($AppId).Show($XmlDocument) diff --git a/fluent-package/msi/assets/fluent-package-toast-icon.png b/fluent-package/msi/assets/fluent-package-toast-icon.png new file mode 100644 index 000000000..496a603f1 Binary files /dev/null and b/fluent-package/msi/assets/fluent-package-toast-icon.png differ diff --git a/fluent-package/msi/source.wxs b/fluent-package/msi/source.wxs index 26f38897a..a7b784fdc 100644 --- a/fluent-package/msi/source.wxs +++ b/fluent-package/msi/source.wxs @@ -280,6 +280,17 @@ Return="check" Impersonate="no" /> + + + + NOT Installed NOT Installed @@ -295,6 +306,10 @@ NOT Installed NOT Installed + + NOT Installed + NOT Installed + Installed AND NOT REINSTALL Installed AND NOT REINSTALL