mirror of
https://github.com/taigrr/crocgui
synced 2025-01-18 04:03:16 -08:00
add license info
This commit is contained in:
parent
e01cda480b
commit
f9c5813713
2
Makefile
2
Makefile
@ -3,7 +3,7 @@
|
||||
all: crocgui.apk crocgui
|
||||
|
||||
crocgui.apk: main.go send.go recv.go settings.go about.go AndroidManifest.xml
|
||||
ANDROID_HOME=~/android ./fyne-mobile-save/fyne package -os android -appID com.github.howeyc.crocgui -icon metadata/en-US/images/icon.png
|
||||
ANDROID_HOME=~/android ./fyne-uri-name/fyne package -os android -appID com.github.howeyc.crocgui -icon metadata/en-US/images/icon.png
|
||||
|
||||
crocgui: main.go send.go recv.go settings.go about.go
|
||||
go build
|
||||
|
17
about.go
17
about.go
@ -19,11 +19,26 @@ func parseURL(s string) *url.URL {
|
||||
//go:embed metadata/en-US/full_description.txt
|
||||
var longdesc string
|
||||
|
||||
//go:embed LICENSE
|
||||
var crocguiLicense string
|
||||
|
||||
//go:embed third-party-licenses.txt
|
||||
var thirdPartyLicenses string
|
||||
|
||||
func aboutTabItem() *container.TabItem {
|
||||
longdesc = strings.ReplaceAll(longdesc, "<b>", "")
|
||||
longdesc = strings.ReplaceAll(longdesc, "</b>", "")
|
||||
aboutInfo := widget.NewLabel(longdesc)
|
||||
aboutInfo.Wrapping = fyne.TextWrapWord
|
||||
licenseInfo := widget.NewLabel(crocguiLicense + thirdPartyLicenses)
|
||||
licenseInfo.Hide()
|
||||
licenseToggle := widget.NewButton("Toggle License Info", func() {
|
||||
if licenseInfo.Visible() {
|
||||
licenseInfo.Hide()
|
||||
} else {
|
||||
licenseInfo.Show()
|
||||
}
|
||||
})
|
||||
return container.NewTabItemWithIcon("About", theme.InfoIcon(), container.NewBorder(nil,
|
||||
widget.NewForm(
|
||||
widget.NewFormItem("croc GUI", widget.NewHyperlink("v1.4.1", parseURL("https://github.com/howeyc/crocgui"))),
|
||||
@ -31,6 +46,6 @@ func aboutTabItem() *container.TabItem {
|
||||
),
|
||||
nil,
|
||||
nil,
|
||||
aboutInfo,
|
||||
container.NewVScroll(container.NewVBox(aboutInfo, licenseToggle, licenseInfo)),
|
||||
))
|
||||
}
|
||||
|
@ -11,11 +11,11 @@ export GO_COMPILED="$PWD/bin"
|
||||
export PATH="$GO_LANG:$GO_COMPILED:$PATH"
|
||||
export PATH=$(pwd)/go/bin:$PATH
|
||||
go version
|
||||
curl -Lso fyne-mobile-save.zip https://github.com/howeyc/fyne/archive/mobile-save.zip
|
||||
unzip fyne-mobile-save
|
||||
pushd fyne-mobile-save
|
||||
curl -Lso fyne-uri-name.zip https://github.com/howeyc/fyne/archive/uri-name.zip
|
||||
unzip fyne-uri-name
|
||||
pushd fyne-uri-name
|
||||
go build fyne.io/fyne/v2/cmd/fyne
|
||||
popd
|
||||
./fyne-mobile-save/fyne package -os android -release -appID com.github.howeyc.crocgui -icon metadata/en-US/images/icon.png
|
||||
./fyne-uri-name/fyne package -os android -release -appID com.github.howeyc.crocgui -icon metadata/en-US/images/icon.png
|
||||
zip -d crocgui.apk "META-INF/*"
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -7,4 +7,4 @@ require (
|
||||
github.com/schollz/croc/v8 v8.6.7
|
||||
)
|
||||
|
||||
replace fyne.io/fyne/v2 => ./fyne-mobile-save
|
||||
replace fyne.io/fyne/v2 => ./fyne-uri-name
|
||||
|
2
metadata/en-US/changelogs/9.txt
Normal file
2
metadata/en-US/changelogs/9.txt
Normal file
@ -0,0 +1,2 @@
|
||||
- Add license info
|
||||
- Update to show filename for content:// URI on android
|
7
send.go
7
send.go
@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"log"
|
||||
"net/url"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
@ -49,11 +48,7 @@ func sendTabItem(a fyne.App, w fyne.Window) *container.TabItem {
|
||||
return
|
||||
}
|
||||
if f != nil {
|
||||
upath, _ := url.PathUnescape(f.URI().Path())
|
||||
if colidx := strings.Index(upath, ":"); colidx != -1 {
|
||||
upath = upath[colidx+1:]
|
||||
}
|
||||
nfile, oerr := os.Create(filepath.Join(sendDir, filepath.Base(upath)))
|
||||
nfile, oerr := os.Create(filepath.Join(sendDir, f.URI().Name()))
|
||||
if oerr != nil {
|
||||
status.SetText(fmt.Sprintf("Unable to copy file, error: %s - %s", sendDir, oerr.Error()))
|
||||
return
|
||||
|
2075
third-party-licenses.txt
Normal file
2075
third-party-licenses.txt
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user