@@ -30,6 +30,7 @@ lazy_static! {
30
30
31
31
#[ derive( Debug , Deserialize , Serialize ) ]
32
32
struct GHRelease {
33
+ pub tag_name : String ,
33
34
pub upload_url : String ,
34
35
pub assets : Vec < GHAsset > ,
35
36
}
@@ -79,20 +80,30 @@ pub fn build_config(upload: bool, gh_action: bool) {
79
80
let ( version, gh_r) = fetch_release ( & repo, & r_id, & gh_token) ;
80
81
81
82
let icon = get_icon ( & config. appId ) ;
83
+ let dspl_images = get_images ( & config. appId ) ;
84
+
85
+ let mut resources = HashMap :: new ( ) ;
86
+ resources. insert ( 0 , icon) ;
87
+
82
88
#[ allow( non_snake_case) ]
83
- let displayImages = get_images ( & config. appId ) ;
89
+ let displayImages = dspl_images. into_iter ( ) . enumerate ( ) . map ( |( uid, icon) | {
90
+ resources. insert ( uid as u8 + 1u8 , icon) ;
91
+
92
+ uid as u8
93
+ } ) . collect ( ) ;
84
94
85
95
let app_id = config. appId . clone ( ) ;
86
96
87
97
let mut final_config: AHQStoreApplication = AHQStoreApplication {
98
+ releaseTagName : gh_r. tag_name . clone ( ) ,
88
99
appDisplayName : config. appDisplayName ,
89
100
appId : config. appId ,
90
101
appShortcutName : config. appShortcutName ,
91
102
authorId : config. authorId ,
92
103
description : config. description ,
93
104
downloadUrls : HashMap :: default ( ) ,
94
- icon,
95
105
displayImages,
106
+ resources : Some ( resources) ,
96
107
app_page : config. source ,
97
108
license_or_tos : config. license_or_tos ,
98
109
install : InstallerOptions {
@@ -149,7 +160,8 @@ pub fn build_config(upload: bool, gh_action: bool) {
149
160
num,
150
161
DownloadUrl {
151
162
installerType : platform,
152
- url : assets[ 0 ] . browser_download_url . clone ( ) ,
163
+ asset : assets[ 0 ] . name . clone ( ) ,
164
+ url : "" . into ( )
153
165
} ,
154
166
) ;
155
167
0 commit comments