Skip to content

Commit

Permalink
gogio: [android] make singleInstance if schemes in use
Browse files Browse the repository at this point in the history
Signed-off-by: inkeliz <[email protected]>
  • Loading branch information
inkeliz committed Jun 10, 2024
1 parent 3e8335e commit 45c150b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions gogio/androidbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ func exeAndroid(tmpDir string, tools *androidTools, bi *buildInfo, extraJars, pe
android:theme="@style/Theme.GioApp"
android:configChanges="screenSize|screenLayout|smallestScreenSize|orientation|keyboardHidden"
android:windowSoftInputMode="adjustResize"
android:launchMode= "singleInstance"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
4 changes: 2 additions & 2 deletions gogio/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ for details. If not provided, the password will be prompted.
The -notaryteamid flag specifies the team ID to use for notarization of MacOS app, ignored if
-notaryid is not provided.
The -schemes flag specifies a list of comma separated URI schemes, which the program can
handle. For example, use -schemes yourAppName to get transfer.URLEvent when access URI
The -schemes flag specifies a list of comma separated URI schemes that the program can
handle. For example, use -schemes yourAppName to receive a transfer.URLEvent for URIs
starting with yourAppName://. It is only supported on Android, iOS, macOS and Windows.
On Windows, it will restrict the program to a single instance.
`
4 changes: 2 additions & 2 deletions gogio/iosbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -400,12 +400,12 @@ func buildInfoPlist(bi *buildInfo) (string, error) {
</dict>
</plist>`)
if err != nil {
return "", err
panic(err)
}

var manifestBuffer bytes.Buffer
if err := tmpl.Execute(&manifestBuffer, manifestSrc); err != nil {
return "", err
panic(err)
}

return manifestBuffer.String(), nil
Expand Down
4 changes: 2 additions & 2 deletions gogio/macosbuild.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,12 @@ func (b *macBuilder) setInfo(buildInfo *buildInfo, name string) error {
</dict>
</plist>`)
if err != nil {
return err
panic(err)
}

var manifest bytes.Buffer
if err := t.Execute(&manifest, manifestSrc); err != nil {
return err
panic(err)
}
b.Manifest = manifest.Bytes()

Expand Down

0 comments on commit 45c150b

Please sign in to comment.