@@ -6,24 +6,27 @@ import platform
66import subprocess
77import aw_core
88import flask_restx
9+ import shlex
10+ from pathlib import Path
911
10- git_cmd = "git describe --tags --abbrev=0"
11- current_release = subprocess .run (git_cmd .split (" " ), stdout = subprocess .PIPE , stderr = subprocess .STDOUT , encoding = "utf8" ).stdout .strip ()
12+ current_release = subprocess .run (shlex .split ("git describe --tags --abbrev=0" ), stdout = subprocess .PIPE , stderr = subprocess .STDOUT , encoding = "utf8" ).stdout .strip ()
1213print ("bundling activitywatch version " + current_release )
1314
14- aw_core_path = os .path .dirname (aw_core .__file__ )
15- restx_path = os .path .dirname (flask_restx .__file__ )
15+ aw_core_path = Path ( os .path .dirname (aw_core .__file__ ) )
16+ restx_path = Path ( os .path .dirname (flask_restx .__file__ ) )
1617
17- aws_location = "aw-server/"
18- aw_server_rust_bin = "aw-server-rust/target/package/aw-server-rust"
19- aw_qt_location = "aw-qt/"
20- awa_location = "aw-watcher-afk/"
21- aww_location = "aw-watcher-window/"
18+ aws_location = Path ("aw-server" )
19+ aw_server_rust_location = Path ("aw-server-rust" )
20+ aw_server_rust_bin = aw_server_rust_location / "target/package/aw-server-rust"
21+ aw_server_rust_webui = aw_server_rust_location / "target/package/static"
22+ aw_qt_location = Path ("aw-qt" )
23+ awa_location = Path ("aw-watcher-afk" )
24+ aww_location = Path ("aw-watcher-window" )
2225
2326if platform .system () == "Darwin" :
24- icon = aw_qt_location + 'media/logo/logo.icns'
27+ icon = aw_qt_location / 'media/logo/logo.icns'
2528else :
26- icon = aw_qt_location + 'media/logo/logo.ico'
29+ icon = aw_qt_location / 'media/logo/logo.ico'
2730block_cipher = None
2831
2932extra_pathex = []
@@ -40,11 +43,11 @@ aw_server_a = Analysis(['aw-server/__main__.py'],
4043 pathex = [],
4144 binaries = None ,
4245 datas = [
43- (aws_location + 'aw_server/static' , 'aw_server/static' ),
46+ (aws_location / 'aw_server/static' , 'aw_server/static' ),
4447
45- (os . path . join ( restx_path , 'templates' ) , 'flask_restx/templates' ),
46- (os . path . join ( restx_path , 'static' ) , 'flask_restx/static' ),
47- (os . path . join ( aw_core_path , 'schemas' ) , 'aw_core/schemas' )
48+ (restx_path / 'templates' , 'flask_restx/templates' ),
49+ (restx_path / 'static' , 'flask_restx/static' ),
50+ (aw_core_path / 'schemas' , 'aw_core/schemas' )
4851 ],
4952 hiddenimports = [],
5053 hookspath = [],
@@ -54,10 +57,13 @@ aw_server_a = Analysis(['aw-server/__main__.py'],
5457 win_private_assemblies = False ,
5558 cipher = block_cipher )
5659
57- aw_qt_a = Analysis ([aw_qt_location + 'aw_qt/__main__.py' ],
60+ aw_qt_a = Analysis ([aw_qt_location / 'aw_qt/__main__.py' ],
5861 pathex = [] + extra_pathex ,
5962 binaries = [(aw_server_rust_bin , '.' )],
60- datas = [(aw_qt_location + 'resources/aw-qt.desktop' , 'aw_qt/resources' )],
63+ datas = [
64+ (aw_qt_location / 'resources/aw-qt.desktop' , 'aw_qt/resources' ),
65+ (aw_server_rust_webui , 'aw_server_rust/static' ),
66+ ],
6167 hiddenimports = [],
6268 hookspath = [],
6369 runtime_hooks = [],
@@ -66,7 +72,7 @@ aw_qt_a = Analysis([aw_qt_location + 'aw_qt/__main__.py'],
6672 win_private_assemblies = False ,
6773 cipher = block_cipher )
6874
69- aw_watcher_afk_a = Analysis ([awa_location + 'aw_watcher_afk/__main__.py' ],
75+ aw_watcher_afk_a = Analysis ([awa_location / 'aw_watcher_afk/__main__.py' ],
7076 pathex = [],
7177 binaries = None ,
7278 datas = None ,
@@ -93,10 +99,10 @@ aw_watcher_afk_a = Analysis([awa_location + 'aw_watcher_afk/__main__.py'],
9399 win_private_assemblies = False ,
94100 cipher = block_cipher )
95101
96- aw_watcher_window_a = Analysis ([aww_location + 'aw_watcher_window/__main__.py' ],
102+ aw_watcher_window_a = Analysis ([aww_location / 'aw_watcher_window/__main__.py' ],
97103 pathex = [],
98104 binaries = None ,
99- datas = [(aww_location + "aw_watcher_window/printAppTitle.scpt" , 'aw_watcher_window' )],
105+ datas = [(aww_location / "aw_watcher_window/printAppTitle.scpt" , 'aw_watcher_window' )],
100106 hiddenimports = [],
101107 hookspath = [],
102108 runtime_hooks = [],
0 commit comments