Skip to content

Commit

Permalink
Fix Windows desktop notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
crazy-max committed Oct 25, 2018
1 parent 5696388 commit 62af07b
Show file tree
Hide file tree
Showing 4 changed files with 306 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 8.33.0.41-25 (2018/10/15)

* Upgrade to Skype 8.33.0.41
* Fix Windows desktop notifications

## 8.32.0.53-24 (2018/10/15)

* Upgrade to Skype 8.32.0.53
Expand Down
271 changes: 271 additions & 0 deletions assets/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
//go:generate go install -v github.com/kevinburke/go-bindata/go-bindata
//go:generate go-bindata -prefix res/ -pkg assets -o assets/assets.go res/Skype.lnk
//go:generate go install -v github.com/josephspurrier/goversioninfo/cmd/goversioninfo
//go:generate goversioninfo -icon=res/papp.ico
package main

import (
_ "github.com/kevinburke/go-bindata"

"io/ioutil"
"os"
"path"

. "github.com/portapps/portapps"
"github.com/portapps/skype-portable/assets"
)

func init() {
Expand All @@ -22,6 +28,30 @@ func main() {
Papp.Args = []string{"--datapath=" + Papp.DataPath}
Papp.WorkingDir = Papp.AppPath

// Copy default shortcut
shortcutPath := path.Join(os.Getenv("APPDATA"), "Microsoft", "Windows", "Start Menu", "Programs", "Skype Portable.lnk")
defaultShortcut, err := assets.Asset("Skype.lnk")
if err != nil {
Log.Error("Cannot load asset Skype.lnk:", err)
}
err = ioutil.WriteFile(shortcutPath, defaultShortcut, 0644)
if err != nil {
Log.Error("Cannot write default shortcut:", err)
}

// Update default shortcut
err = CreateShortcut(WindowsShortcut{
ShortcutPath: shortcutPath,
TargetPath: Papp.Process,
Arguments: WindowsShortcutProperty{Clear: true},
Description: WindowsShortcutProperty{Value: "Skype Portable by Portapps"},
IconLocation: WindowsShortcutProperty{Value: Papp.Process},
WorkingDirectory: WindowsShortcutProperty{Value: Papp.AppPath},
})
if err != nil {
Log.Error("Cannot create shortcut:", err)
}

Launch(os.Args[1:])

oldAppData := path.Join(os.Getenv("APPDATA"), "Skype")
Expand Down
Binary file added res/Skype.lnk
Binary file not shown.

0 comments on commit 62af07b

Please sign in to comment.