@@ -0,0 +1,15 @@
|
||||
icon_path = ./res/appicon-500.png
|
||||
app_name = Supersonic
|
||||
|
||||
build:
|
||||
go build
|
||||
|
||||
package_macos:
|
||||
fyne package -os darwin -name $(app_name) -icon $(icon_path)
|
||||
dylibbundler -od -b -x ./Supersonic.app/Contents/MacOS/supersonic -d ./Supersonic.app/Contents/Frameworks/ -p @executable_path/../Frameworks/
|
||||
|
||||
package_windows:
|
||||
fyne package -os windows -name $(app_name) -icon $(icon_path)
|
||||
|
||||
package_linux:
|
||||
fyne package -os linux -name $(app_name) -icon $(icon_path)
|
||||
@@ -1,7 +1,5 @@
|
||||
# Supersonic
|
||||
A lightweight desktop client for Subsonic music servers (Navidrome, Gonic, Airsonic, etc). This is in early development, but currently usable for searching, browsing, and playing by albums. If you decide to use it now, expect to find a few minor bugs and missing features.
|
||||
|
||||
On first startup, the app will prompt you for your Subsonic server connection. The app currently has a searchable albums grid view, an artist discography view, list views of all artists and genres, and individual album view with tracklist.
|
||||
A lightweight cross-platform desktop client for Subsonic music servers (Navidrome, Gonic, Airsonic, etc).
|
||||
|
||||
## Screenshots
|
||||
|
||||
@@ -35,6 +33,12 @@ On first startup, the app will prompt you for your Subsonic server connection. T
|
||||
* [ ] iOS/Android support (eventually planned)
|
||||
* [ ] Lyrics support (eventually planned)
|
||||
|
||||
## Installation
|
||||
|
||||
Download the latest release for your operating system. If you prefer to build from source, or there is no release build currently offered for your OS/architecture (Apple silicon Macs), then see below.
|
||||
|
||||
**If you are on Linux** you must have libmpv installed on your system. On apt-based systems, run `sudo apt install libmpv` if it is not already installed. The Windows and Mac release builds bundle the mpv dependencies.
|
||||
|
||||
## Build instructions (Ubuntu)
|
||||
|
||||
### Install dependencies
|
||||
@@ -45,6 +49,7 @@ On first startup, the app will prompt you for your Subsonic server connection. T
|
||||
### Build
|
||||
* clone the repo, CD into the repo root, and run ``go build .``
|
||||
* (note that the first build will take some time as it will download and build the UI library)
|
||||
* run ``make package_linux`` to generate an installable .tar.xz bundle
|
||||
|
||||
## Build instructions (Mac OS)
|
||||
|
||||
@@ -60,6 +65,7 @@ On first startup, the app will prompt you for your Subsonic server connection. T
|
||||
|
||||
* clone the repo, CD into the repo root, and run ``go build .``
|
||||
* (note that the first build will take some time as it will download and build the UI library)
|
||||
* run ``make package_macos`` to generate the .app bundle
|
||||
|
||||
## Build instructions (Windows)
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import (
|
||||
const (
|
||||
appname = "supersonic"
|
||||
displayName = "Supersonic"
|
||||
appVersion = "0.0.1-alpha1"
|
||||
configFile = "config.toml"
|
||||
)
|
||||
|
||||
@@ -39,7 +40,7 @@ func main() {
|
||||
if h <= 1 {
|
||||
h = 800
|
||||
}
|
||||
mainWindow := ui.NewMainWindow(fyneApp, displayName, myApp, fyne.NewSize(w, h))
|
||||
mainWindow := ui.NewMainWindow(fyneApp, displayName, appVersion, myApp, fyne.NewSize(w, h))
|
||||
|
||||
// TODO: There is some race condition with running this initial startup
|
||||
// task immediately before showing and running the window/Fyne main loop where
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
File diff suppressed because one or more lines are too long
+6
-1
@@ -1,6 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
fyne bundle -package res -prefix Res icons/freepik/disc.png > bundled.go
|
||||
fyne bundle -package res -prefix Res appicon-250.png > bundled.go
|
||||
fyne bundle -append -prefix Res icons/freepik/disc.png >> bundled.go
|
||||
fyne bundle -append -prefix Res icons/freepik/disc-invert.png >> bundled.go
|
||||
fyne bundle -append -prefix Res icons/freepik/headphones.png >> bundled.go
|
||||
fyne bundle -append -prefix Res icons/freepik/headphones-invert.png >> bundled.go
|
||||
@@ -25,3 +26,7 @@ fyne bundle -append -prefix Res icons/freepik/theatermasks.png >> bundled.go
|
||||
fyne bundle -append -prefix Res icons/freepik/theatermasks-invert.png >> bundled.go
|
||||
fyne bundle -append -prefix Res icons/publicdomain/shuffle.svg >> bundled.go
|
||||
fyne bundle -append -prefix Res icons/publicdomain/shuffle-invert.svg >> bundled.go
|
||||
|
||||
fyne bundle -append -prefix Res ../LICENSE >> bundled.go
|
||||
fyne bundle -append -prefix Res licenses/BSDLICENSE >> bundled.go
|
||||
fyne bundle -append -prefix Res licenses/MITLICENSE >> bundled.go
|
||||
@@ -0,0 +1,28 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (C) 2018 Fyne.io developers (see AUTHORS)
|
||||
All rights reserved.
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of Fyne.io nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
|
||||
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -22,6 +22,7 @@ type Controller struct {
|
||||
// if not nil, this popup should be hidden when escape is pressed
|
||||
EscapablePopUp *widget.PopUp
|
||||
|
||||
AppVersion string
|
||||
MainWindow fyne.Window
|
||||
App *backend.App
|
||||
NavHandler NavigationHandler
|
||||
@@ -206,6 +207,14 @@ func (m *Controller) PromptForLoginAndConnect() {
|
||||
pop.Show()
|
||||
}
|
||||
|
||||
func (c *Controller) ShowAboutDialog() {
|
||||
dlg := dialogs.NewAboutDialog(c.AppVersion)
|
||||
pop := widget.NewModalPopUp(dlg, c.MainWindow.Canvas())
|
||||
dlg.OnDismiss = pop.Hide
|
||||
c.ClosePopUpOnEscape(pop)
|
||||
pop.Show()
|
||||
}
|
||||
|
||||
func (c *Controller) trySetPasswordAndConnectToServer(server *backend.ServerConfig, password string) error {
|
||||
if err := c.App.ServerManager.SetServerPassword(server, password); err != nil {
|
||||
log.Printf("error setting keyring credentials: %v", err)
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
package dialogs
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"supersonic/res"
|
||||
"supersonic/ui/layouts"
|
||||
|
||||
"fyne.io/fyne/v2"
|
||||
"fyne.io/fyne/v2/canvas"
|
||||
"fyne.io/fyne/v2/container"
|
||||
"fyne.io/fyne/v2/layout"
|
||||
"fyne.io/fyne/v2/theme"
|
||||
"fyne.io/fyne/v2/widget"
|
||||
)
|
||||
|
||||
type AboutDialog struct {
|
||||
widget.BaseWidget
|
||||
|
||||
OnDismiss func()
|
||||
|
||||
content fyne.CanvasObject
|
||||
}
|
||||
|
||||
func NewAboutDialog(version string) *AboutDialog {
|
||||
a := &AboutDialog{}
|
||||
a.ExtendBaseWidget(a)
|
||||
|
||||
a.content = container.NewVBox(
|
||||
container.NewAppTabs(
|
||||
container.NewTabItem("Supersonic", a.buildMainTabContainer(version)),
|
||||
container.NewTabItem("Credits", a.buildCreditsContainer()),
|
||||
container.NewTabItem("GPL v3", container.NewScroll(a.licenseLabel(res.ResLICENSE))),
|
||||
container.NewTabItem("BSD-3-Clause", container.NewScroll(a.licenseLabel(res.ResBSDLICENSE))),
|
||||
container.NewTabItem("MIT", container.NewScroll(a.licenseLabel(res.ResMITLICENSE))),
|
||||
),
|
||||
widget.NewSeparator(),
|
||||
container.NewHBox(
|
||||
layout.NewSpacer(),
|
||||
widget.NewButton("Close", func() {
|
||||
if a.OnDismiss != nil {
|
||||
a.OnDismiss()
|
||||
}
|
||||
}),
|
||||
),
|
||||
)
|
||||
return a
|
||||
}
|
||||
|
||||
func (a *AboutDialog) MinSize() fyne.Size {
|
||||
return fyne.NewSize(420, a.BaseWidget.MinSize().Height)
|
||||
}
|
||||
|
||||
func (a *AboutDialog) buildMainTabContainer(version string) *fyne.Container {
|
||||
iconImage := canvas.NewImageFromResource(res.ResAppicon250Png)
|
||||
iconImage.FillMode = canvas.ImageFillContain
|
||||
iconImage.SetMinSize(fyne.NewSize(64, 64))
|
||||
title := widget.NewRichTextWithText("Supersonic")
|
||||
title.Segments[0].(*widget.TextSegment).Style.TextStyle.Bold = true
|
||||
title.Segments[0].(*widget.TextSegment).Style.SizeName = theme.SizeNameSubHeadingText
|
||||
title.Segments[0].(*widget.TextSegment).Style.Alignment = fyne.TextAlignCenter
|
||||
versionLbl := newCenterAlignLabel(fmt.Sprintf("version %s", version))
|
||||
copyright := newCenterAlignLabel("Copyright © 2022–2023 Drew Weymouth and contributors")
|
||||
license := widget.NewRichTextWithText("GNU General Public License version 3 (GPL v3)")
|
||||
ts := license.Segments[0].(*widget.TextSegment)
|
||||
ts.Style.TextStyle.Bold = true
|
||||
ts.Style.Alignment = fyne.TextAlignCenter
|
||||
ghUrl, _ := url.Parse("https://github.com/dweymouth/supersonic")
|
||||
github := container.NewCenter(widget.NewHyperlink("Github page", ghUrl))
|
||||
|
||||
return container.New(&layouts.CenterPadLayout{PadTopBottom: 10},
|
||||
container.NewVBox(iconImage,
|
||||
container.New(&layouts.VboxCustomPadding{ExtraPad: -10}, title, versionLbl, copyright, license, github)))
|
||||
}
|
||||
|
||||
func (a *AboutDialog) licenseLabel(res *fyne.StaticResource) *widget.Label {
|
||||
str := string(res.StaticContent)
|
||||
lbl := widget.NewLabel(str)
|
||||
lbl.Wrapping = fyne.TextWrapWord
|
||||
return lbl
|
||||
}
|
||||
|
||||
func (a *AboutDialog) buildCreditsContainer() fyne.CanvasObject {
|
||||
fyneURL, _ := url.Parse("https://fyne.io")
|
||||
goSubsonicURL, _ := url.Parse("https://github.com/delucks/go-subsonic")
|
||||
goTomlURL, _ := url.Parse("https://github.com/pelletier/go-toml")
|
||||
freepikURL, _ := url.Parse("https://www.flaticon.com/authors/freepik")
|
||||
appIconCredit := widget.NewLabel("The Supersonic app icon is a derivative of a work created by Piotr Siedlecki and placed in the public domain.")
|
||||
appIconCredit.Wrapping = fyne.TextWrapWord
|
||||
return container.New(&layouts.VboxCustomPadding{ExtraPad: -10},
|
||||
widget.NewLabel("Major frameworks and modules used in this application include:"),
|
||||
container.NewHBox(widget.NewHyperlink("Fyne toolkit", fyneURL), widget.NewLabel("BSD 3-Clause License")),
|
||||
container.NewHBox(widget.NewHyperlink("go-subsonic", goSubsonicURL), widget.NewLabel("GPL v3 License")),
|
||||
container.NewHBox(widget.NewHyperlink("go-toml", goTomlURL), widget.NewLabel("MIT License")),
|
||||
appIconCredit,
|
||||
container.NewHBox(widget.NewLabel("Additional icons by:"), widget.NewHyperlink("Freepik on flaticon.com", freepikURL)),
|
||||
)
|
||||
}
|
||||
|
||||
func (a *AboutDialog) CreateRenderer() fyne.WidgetRenderer {
|
||||
return widget.NewSimpleRenderer(a.content)
|
||||
}
|
||||
|
||||
func newCenterAlignLabel(text string) *widget.Label {
|
||||
lbl := widget.NewLabel(text)
|
||||
lbl.Alignment = fyne.TextAlignCenter
|
||||
return lbl
|
||||
}
|
||||
+3
-1
@@ -47,7 +47,7 @@ var (
|
||||
HomePage = controller.AlbumsRoute()
|
||||
)
|
||||
|
||||
func NewMainWindow(fyneApp fyne.App, appName string, app *backend.App, size fyne.Size) MainWindow {
|
||||
func NewMainWindow(fyneApp fyne.App, appName, appVersion string, app *backend.App, size fyne.Size) MainWindow {
|
||||
m := MainWindow{
|
||||
App: app,
|
||||
Window: fyneApp.NewWindow(appName),
|
||||
@@ -55,6 +55,7 @@ func NewMainWindow(fyneApp fyne.App, appName string, app *backend.App, size fyne
|
||||
}
|
||||
|
||||
m.Controller = &controller.Controller{
|
||||
AppVersion: appVersion,
|
||||
MainWindow: m.Window,
|
||||
App: app,
|
||||
}
|
||||
@@ -84,6 +85,7 @@ func NewMainWindow(fyneApp fyne.App, appName string, app *backend.App, size fyne
|
||||
m.Controller.PromptForLoginAndConnect()
|
||||
})
|
||||
m.BrowsingPane.AddSettingsMenuItem("Log Out", app.ServerManager.Logout)
|
||||
m.BrowsingPane.AddSettingsMenuItem("About...", m.Controller.ShowAboutDialog)
|
||||
m.addNavigationButtons()
|
||||
m.BrowsingPane.DisableNavigationButtons()
|
||||
m.addShortcuts()
|
||||
|
||||
Reference in New Issue
Block a user