File tree Expand file tree Collapse file tree 4 files changed +24
-18
lines changed Expand file tree Collapse file tree 4 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 7
7
" org.freedesktop.Sdk.Extension.openjdk17"
8
8
],
9
9
"command" : " gtk-meteo.sh" ,
10
+ "finish-args" : [
11
+ " --share=network" ,
12
+ " --share=ipc" ,
13
+ " --socket=wayland" ,
14
+ " --socket=fallback-x11" ,
15
+ " --device=dri" ,
16
+ " --env=GIO_EXTRA_MODULES=/app/lib/gio/modules" ,
17
+ " --env=JAVA_HOME=/app/jre" ,
18
+ " --env=LIBO_FLATPAK=1" ,
19
+ " --env=PATH=/app/bin:/app/jre/bin"
20
+ ],
10
21
"modules" : [
11
22
{
12
23
"name" : " openjdk" ,
22
33
{
23
34
"type" : " git" ,
24
35
"url" : " https://github.com/bailuk/gtk-meteo.git" ,
25
- "branch " : " 543eb0a5ff40b57d70277fb6c7ac9b3e6f9fb431"
36
+ "commit " : " 543eb0a5ff40b57d70277fb6c7ac9b3e6f9fb431"
26
37
},
27
38
" gradle-sources.json"
28
39
],
36
47
" install -Dm644 src/main/resources/svg/app-icon.svg /app/share/icons/hicolor/scalable/apps/ch.bailu.gtk_meteo.svg"
37
48
]
38
49
}
39
- ],
40
- "finish-args" : [
41
- " --share=network" ,
42
- " --share=ipc" ,
43
- " --socket=wayland" ,
44
- " --socket=fallback-x11" ,
45
- " --device=dri" ,
46
- " --env=GIO_EXTRA_MODULES=/app/lib/gio/modules" ,
47
- " --env=JAVA_HOME=/app/jre" ,
48
- " --env=LIBO_FLATPAK=1" ,
49
- " --env=PATH=/app/bin:/app/jre/bin" ,
50
- " --filesystem=~/.config/gtk-meteo" ,
51
- " --filesystem=~/.java/.userPrefs/gtk-meteo"
52
50
]
53
51
}
Original file line number Diff line number Diff line change @@ -5,4 +5,4 @@ git_hash=$(git show --format="%H" --no-patch)
5
5
6
6
echo " _"
7
7
echo " update '${out_file} ' (commit: $git_hash )"
8
- sed -i ' s/"branch ": .*"/"branch ": ' \" ${git_hash} \" ' /g' " ${out_file} "
8
+ sed -i ' s/"commit ": .*"/"commit ": ' \" ${git_hash} \" ' /g' " ${out_file} "
Original file line number Diff line number Diff line change @@ -4,10 +4,13 @@ import config.Strings.userAgent
4
4
import java.io.File
5
5
6
6
object Files {
7
- val configDirectory =
8
- File (System .getProperty(" user.home" ) + " /.config/$userAgent /" )
7
+
8
+ private val configHome = (System .getenv(" XDG_CONFIG_HOME" )
9
+ ? : (System .getProperty(" user.home" ) + " /.config" )) + " /$userAgent "
10
+ val configDirectory = File (configHome)
9
11
10
12
init {
13
+ println (" CONFIG_HOME: $configHome " )
11
14
configDirectory.mkdirs()
12
15
}
13
16
Original file line number Diff line number Diff line change 1
1
package controller
2
2
3
+ import config.Files
3
4
import config.Keys
4
5
import java.util.prefs.Preferences
5
6
6
7
object Prefs {
7
- private val prefs = Preferences .userRoot().node( " gtk-meteo " )
8
+ private val prefs: Preferences
8
9
10
+ init {
11
+ System .setProperty(" java.util.prefs.userRoot" , Files .configDirectory.path)
12
+ prefs = Preferences .userRoot().node(" gtk-meteo" )
13
+ }
9
14
fun putAutoCycle (value : Boolean ) {
10
15
prefs.putBoolean(Keys .AUTO_CYCLE , value)
11
16
}
You can’t perform that action at this time.
0 commit comments