passgo package: modernize for go 1.24; reset store.Empty in GetStore.
- Update to //go:build tags, gofmt, and the android-35 javac template in //go:generate. - GetStore: reset store.Empty when the store directory exists (it was only set true when the dir was missing, so a reconfigured store kept the stale 'Empty' state and showed the configure button). - Rebuild PgpConnect.jar (android-35).
This commit is contained in:
parent
edb38a6b85
commit
af1b878308
BIN
PgpConnect.jar
BIN
PgpConnect.jar
Binary file not shown.
|
|
@ -1,6 +1,8 @@
|
|||
//+build android
|
||||
//go:build android
|
||||
// +build android
|
||||
|
||||
//go:generate mkdir -p classes
|
||||
//go:generate javac -bootclasspath $ANDROID_HOME/platforms/android-29/android.jar -classpath openpgp-api.jar -d classes PgpConnect.java Foo.java
|
||||
//go:generate javac -nowarn -classpath $ANDROID_HOME/platforms/android-35/android.jar:openpgp-api.jar -d classes PgpConnect.java
|
||||
//go:generate jar cf PgpConnect.jar -C classes .
|
||||
//go:generate rm -rf classes
|
||||
|
||||
|
|
@ -15,8 +17,8 @@ import "C"
|
|||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"path"
|
||||
"log"
|
||||
"path"
|
||||
"strings"
|
||||
"sync"
|
||||
"unsafe"
|
||||
|
|
@ -64,7 +66,7 @@ func connect() {
|
|||
<-waitch
|
||||
}
|
||||
|
||||
//Clip copies a string to the clipboard
|
||||
// Clip copies a string to the clipboard
|
||||
func Clip(x string) {
|
||||
pgp.Clip(x)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
//+build darwin
|
||||
//go:build darwin
|
||||
// +build darwin
|
||||
|
||||
package passgo
|
||||
|
||||
|
|
@ -119,7 +120,7 @@ func init() {
|
|||
setAgentInfo()
|
||||
}
|
||||
|
||||
//Clip copies a string to the clipboard
|
||||
// Clip copies a string to the clipboard
|
||||
func Clip(x string) {
|
||||
clip.Set(x)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
//+build !android,linux
|
||||
//go:build !android && linux
|
||||
// +build !android,linux
|
||||
|
||||
package passgo
|
||||
|
||||
|
|
@ -7,7 +8,7 @@ import (
|
|||
"os/exec"
|
||||
)
|
||||
|
||||
//Clip copies a string to the clipboard
|
||||
// Clip copies a string to the clipboard
|
||||
func Clip(x string) {
|
||||
b := bytes.NewBuffer([]byte(x))
|
||||
cmd := exec.Command("xclip")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
//+build darwin !android,linux
|
||||
//go:build darwin || (!android && linux)
|
||||
// +build darwin !android,linux
|
||||
|
||||
package passgo
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,12 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"runtime"
|
||||
"unsafe"
|
||||
"sync"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var theJVM *C.JavaVM
|
||||
|
||||
type JNIEnv = C.JNIEnv
|
||||
|
||||
func SetJVM(jvm uintptr) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user