@ahqstore/cli 0.3.4 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +24 -16
- package/bundle +4 -0
- package/bundle.ps1 +4 -0
- package/index.js +82 -159
- package/latest.md +3 -0
- package/package.json +11 -13
- package/src/app/build/macros.rs +95 -0
- package/src/app/build/mod.rs +64 -60
- package/src/app/create/inquire.rs +30 -77
- package/src/app/create/mod.rs +7 -1
- package/src/app/create/readme.es.md +80 -0
- package/src/app/create/readme.hi.md +80 -0
- package/src/app/create/readme.md +30 -21
- package/src/app/shared/file_sorter.rs +14 -6
- package/src/app/shared/mod.rs +5 -1
- package/src/app/shared/platforms.rs +26 -50
- package/cli-rs/Cargo.toml +0 -45
- package/cli-rs/README.md +0 -41
- package/cli-rs/build.rs +0 -4
- package/cli-rs/finalize.js +0 -25
- package/cli-rs/rust-toolchain.toml +0 -2
- package/cli-rs/src/app/build/config.rs +0 -54
- package/cli-rs/src/app/build/icon.rs +0 -48
- package/cli-rs/src/app/build/mod.rs +0 -217
- package/cli-rs/src/app/build/release.rs +0 -50
- package/cli-rs/src/app/create/icon.png +0 -0
- package/cli-rs/src/app/create/inquire.rs +0 -189
- package/cli-rs/src/app/create/mod.rs +0 -74
- package/cli-rs/src/app/create/readme.md +0 -71
- package/cli-rs/src/app/help.rs +0 -77
- package/cli-rs/src/app/mod.rs +0 -39
- package/cli-rs/src/app/shared/file_sorter.rs +0 -34
- package/cli-rs/src/app/shared/mod.rs +0 -62
- package/cli-rs/src/app/shared/platforms.rs +0 -69
- package/cli-rs/src/lib.rs +0 -13
- package/cli-rs/src/main.rs +0 -10
- package/cli-rs/tslink.toml +0 -2
package/src/app/build/mod.rs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
use ahqstore_types::{
|
|
2
|
-
AHQStoreApplication, DownloadUrl,
|
|
3
|
-
InstallerOptionsLinux, InstallerOptionsWin32, Str,
|
|
2
|
+
AHQStoreApplication, DownloadUrl, InstallerFormat, InstallerOptions, InstallerOptionsAndroid, InstallerOptionsLinux, InstallerOptionsWindows, Str
|
|
4
3
|
};
|
|
5
4
|
use lazy_static::lazy_static;
|
|
6
5
|
use reqwest::blocking::{Client, ClientBuilder};
|
|
@@ -8,7 +7,7 @@ use serde::{Deserialize, Serialize};
|
|
|
8
7
|
use serde_json::{from_str, to_string, to_string_pretty};
|
|
9
8
|
use std::{collections::HashMap, env, fs, process};
|
|
10
9
|
|
|
11
|
-
use crate::app::
|
|
10
|
+
use crate::app::ERR;
|
|
12
11
|
|
|
13
12
|
use super::INFO;
|
|
14
13
|
|
|
@@ -19,6 +18,9 @@ use config::*;
|
|
|
19
18
|
use icon::*;
|
|
20
19
|
use release::*;
|
|
21
20
|
|
|
21
|
+
#[macro_use]
|
|
22
|
+
mod macros;
|
|
23
|
+
|
|
22
24
|
lazy_static! {
|
|
23
25
|
pub static ref CLIENT: Client = ClientBuilder::new()
|
|
24
26
|
.user_agent("AHQ Store / App Builder")
|
|
@@ -91,94 +93,96 @@ pub fn build_config(upload: bool, gh_action: bool) {
|
|
|
91
93
|
downloadUrls: HashMap::default(),
|
|
92
94
|
icon,
|
|
93
95
|
displayImages,
|
|
96
|
+
app_page: config.source,
|
|
97
|
+
license_or_tos: config.license_or_tos,
|
|
94
98
|
install: InstallerOptions {
|
|
95
|
-
installType: config.platform.installType,
|
|
96
99
|
linux: None,
|
|
100
|
+
android: None,
|
|
101
|
+
linuxArm64: None,
|
|
102
|
+
linuxArm7: None,
|
|
103
|
+
winarm: None,
|
|
97
104
|
win32: None,
|
|
98
105
|
},
|
|
99
106
|
repo: config.repo,
|
|
100
107
|
version,
|
|
101
|
-
site:
|
|
102
|
-
source:
|
|
108
|
+
site: config.site,
|
|
109
|
+
source: config.redistributed,
|
|
103
110
|
};
|
|
104
111
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
(_, &InstallType::PerUser | &InstallType::Computer) => {
|
|
109
|
-
WARN.println(
|
|
110
|
-
&"Setting PerUser or Computer in a non WindowsZip install type does not have any effect",
|
|
111
|
-
);
|
|
112
|
-
process::exit(1);
|
|
113
|
-
}
|
|
114
|
-
_ => {}
|
|
115
|
-
};
|
|
116
|
-
let Some(options) = config.platform.win32Options else {
|
|
117
|
-
ERR.println(&"Win32 Options not found!");
|
|
118
|
-
process::exit(1);
|
|
119
|
-
};
|
|
120
|
-
let Some(finder) = config.finder.windowsFinder else {
|
|
121
|
-
ERR.println(&"Win32 Finder Config not found!");
|
|
122
|
-
process::exit(1);
|
|
123
|
-
};
|
|
112
|
+
let mut num = 0;
|
|
113
|
+
// Win x86_64
|
|
114
|
+
windowsPlatform!(num, win32, config, gh_r, final_config, winAmd64Platform, winAmd64Options, windowsAmd64Finder);
|
|
124
115
|
|
|
125
|
-
|
|
116
|
+
// Win Arm64
|
|
117
|
+
windowsPlatform!(num, winarm, config, gh_r, final_config, winArm64Platform, winArm64Options, windowsArm64Finder);
|
|
126
118
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
process::exit(1);
|
|
130
|
-
}
|
|
131
|
-
if assets.len() == 0 {
|
|
132
|
-
ERR.println(&"No assets found");
|
|
133
|
-
process::exit(1);
|
|
134
|
-
}
|
|
119
|
+
// Linux x86_64
|
|
120
|
+
linuxPlatform!(num, linux, config, gh_r, final_config, linuxAmd64Platform, linuxAmd64Finder);
|
|
135
121
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
DownloadUrl {
|
|
139
|
-
installerType: platform,
|
|
140
|
-
url: assets[0].browser_download_url.clone(),
|
|
141
|
-
},
|
|
142
|
-
);
|
|
122
|
+
// Linux Arm64
|
|
123
|
+
linuxPlatform!(num, linuxArm64, config, gh_r, final_config, linuxArm64Platform, linuxArm64Finder);
|
|
143
124
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
installerArgs: options
|
|
149
|
-
.exe_installer_args
|
|
150
|
-
.map_or(None, |a| Some(a.iter().map(|x| x.to_string()).collect())),
|
|
151
|
-
});
|
|
152
|
-
}
|
|
125
|
+
// Linux Armv7
|
|
126
|
+
linuxPlatform!(num, linuxArm7, config, gh_r, final_config, linuxArm32Platform, linuxArm32Finder);
|
|
127
|
+
|
|
128
|
+
num += 1;
|
|
153
129
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
130
|
+
// Android Universal
|
|
131
|
+
if let Some(platform) = config.platform.androidUniversal {
|
|
132
|
+
if !matches!(platform, InstallerFormat::AndroidApkZip) {
|
|
133
|
+
ERR.println(&"Invalid File Format, expected AndroidApkZip");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
let Some(finder) = config.finder.androidUniversalFinder else {
|
|
137
|
+
ERR.println(&"Android Finder Config not found!");
|
|
157
138
|
process::exit(1);
|
|
158
139
|
};
|
|
159
140
|
|
|
160
141
|
let assets = find_assets(&gh_r, &finder);
|
|
161
|
-
|
|
142
|
+
|
|
162
143
|
if assets.len() > 1 {
|
|
163
|
-
ERR.println(&"Multiple assets found");
|
|
144
|
+
ERR.println(&"Multiple assets found while parsing android");
|
|
164
145
|
process::exit(1);
|
|
165
146
|
}
|
|
166
147
|
|
|
167
148
|
final_config.downloadUrls.insert(
|
|
168
|
-
|
|
149
|
+
num,
|
|
169
150
|
DownloadUrl {
|
|
170
151
|
installerType: platform,
|
|
171
152
|
url: assets[0].browser_download_url.clone(),
|
|
172
153
|
},
|
|
173
154
|
);
|
|
174
155
|
|
|
175
|
-
final_config.install.
|
|
176
|
-
assetId:
|
|
156
|
+
final_config.install.android = Some(InstallerOptionsAndroid {
|
|
157
|
+
assetId: num
|
|
177
158
|
});
|
|
178
159
|
}
|
|
179
160
|
|
|
180
|
-
|
|
181
|
-
|
|
161
|
+
// if let Some(platform) = config.platform.linuxArm64Platform {
|
|
162
|
+
// let Some(finder) = config.finder.linuxFinder else {
|
|
163
|
+
// ERR.println(&"Linux Finder Config not found!");
|
|
164
|
+
// process::exit(1);
|
|
165
|
+
// };
|
|
166
|
+
|
|
167
|
+
// let assets = find_assets(&gh_r, &finder);
|
|
168
|
+
|
|
169
|
+
// if assets.len() > 1 {
|
|
170
|
+
// ERR.println(&"Multiple assets found");
|
|
171
|
+
// process::exit(1);
|
|
172
|
+
// }
|
|
173
|
+
|
|
174
|
+
// final_config.downloadUrls.insert(
|
|
175
|
+
// 2,
|
|
176
|
+
// DownloadUrl {
|
|
177
|
+
// installerType: platform,
|
|
178
|
+
// url: assets[0].browser_download_url.clone(),
|
|
179
|
+
// },
|
|
180
|
+
// );
|
|
181
|
+
|
|
182
|
+
// final_config.install.linux = Some(InstallerOptionsLinux {
|
|
183
|
+
// assetId: 2
|
|
184
|
+
// });
|
|
185
|
+
// }
|
|
182
186
|
|
|
183
187
|
let config_file = to_string_pretty(&final_config).unwrap();
|
|
184
188
|
let config_file = to_string(config_file.as_bytes()).unwrap();
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
use std::process;
|
|
2
2
|
|
|
3
|
-
use ahqstore_types::
|
|
3
|
+
use ahqstore_types::AppRepo;
|
|
4
4
|
use inquire::{
|
|
5
|
-
list_option::ListOption,
|
|
6
5
|
validator::{ErrorMessage, Validation},
|
|
7
|
-
Editor,
|
|
6
|
+
Editor, Text,
|
|
8
7
|
};
|
|
9
8
|
use serde::{Deserialize, Serialize};
|
|
10
9
|
|
|
11
10
|
use crate::app::{
|
|
12
|
-
build::CLIENT,
|
|
13
11
|
shared::{Config, IMetadata, IPlatform},
|
|
14
12
|
ERR, INFO,
|
|
15
13
|
};
|
|
@@ -78,78 +76,33 @@ pub fn inquire<'a>() -> (String, Config<'a>) {
|
|
|
78
76
|
|
|
79
77
|
INFO.println(&"Validating author id & repo");
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
- The account id provided is not valid
|
|
102
|
-
- The account id has developer mode disabled
|
|
103
|
-
- The GitHub repo owner doesn't seem to be in the list of linked_accounts
|
|
104
|
-
- The GitHub repo is invalid"#,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
let validator = |input: &[ListOption<&InstallerFormat>]| {
|
|
110
|
-
if input.len() == 0 {
|
|
111
|
-
return Ok(Validation::Invalid(
|
|
112
|
-
"You must select at least one target".into(),
|
|
113
|
-
));
|
|
114
|
-
}
|
|
115
|
-
if input.len() > 2 {
|
|
116
|
-
return Ok(Validation::Invalid(
|
|
117
|
-
"You can only select two targets".into(),
|
|
118
|
-
));
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
let flagged = vec![0, 1, 2, 3];
|
|
122
|
-
if input
|
|
123
|
-
.iter()
|
|
124
|
-
.filter(|a| flagged.contains(&a.index))
|
|
125
|
-
.collect::<Vec<_>>()
|
|
126
|
-
.len()
|
|
127
|
-
> 1
|
|
128
|
-
{
|
|
129
|
-
return Ok(Validation::Invalid(
|
|
130
|
-
"You can only select one bundle target for a platform".into(),
|
|
131
|
-
));
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
Ok(Validation::Valid)
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
let Ok(platforms) = MultiSelect::new(
|
|
138
|
-
"Which platforms do you intend to support?",
|
|
139
|
-
vec![
|
|
140
|
-
InstallerFormat::WindowsZip,
|
|
141
|
-
InstallerFormat::WindowsInstallerMsi,
|
|
142
|
-
InstallerFormat::WindowsInstallerExe,
|
|
143
|
-
InstallerFormat::WindowsUWPMsix,
|
|
144
|
-
InstallerFormat::LinuxAppImage,
|
|
145
|
-
],
|
|
146
|
-
)
|
|
147
|
-
.with_default(&[0])
|
|
148
|
-
.with_validator(validator)
|
|
149
|
-
.prompt() else {
|
|
150
|
-
ERR.println(&"Must Select a platform");
|
|
151
|
-
process::exit(1);
|
|
152
|
-
};
|
|
79
|
+
// let val: Option<()> = (|| {
|
|
80
|
+
// let data: ServerUserResp = CLIENT
|
|
81
|
+
// .get(format!(
|
|
82
|
+
// "https://ahqstore-server.onrender.com/users/{}",
|
|
83
|
+
// &user_id
|
|
84
|
+
// ))
|
|
85
|
+
// .send()
|
|
86
|
+
// .ok()?
|
|
87
|
+
// .json()
|
|
88
|
+
// .ok()?;
|
|
89
|
+
|
|
90
|
+
// if data.linked_acc.contains(&owner.into()) {
|
|
91
|
+
// return Some(());
|
|
92
|
+
// }
|
|
93
|
+
// None
|
|
94
|
+
// })();
|
|
95
|
+
|
|
96
|
+
// if let None = val {
|
|
97
|
+
// ERR.println(
|
|
98
|
+
// &r#"Could not validate author id with github username. It may be because:
|
|
99
|
+
// - The account id provided is not valid
|
|
100
|
+
// - The account id has developer mode disabled
|
|
101
|
+
// - The GitHub repo owner doesn't seem to be in the list of linked_accounts
|
|
102
|
+
// - The GitHub repo is invalid"#,
|
|
103
|
+
// );
|
|
104
|
+
// process::exit(1);
|
|
105
|
+
// }
|
|
153
106
|
|
|
154
107
|
(
|
|
155
108
|
app_id.clone(),
|
|
@@ -163,7 +116,7 @@ pub fn inquire<'a>() -> (String, Config<'a>) {
|
|
|
163
116
|
author: owner.into(),
|
|
164
117
|
repo: repo.into(),
|
|
165
118
|
},
|
|
166
|
-
IPlatform::new(
|
|
119
|
+
IPlatform::new()
|
|
167
120
|
),
|
|
168
121
|
)
|
|
169
122
|
}
|
package/src/app/create/mod.rs
CHANGED
|
@@ -23,7 +23,13 @@ pub fn create(force: bool) {
|
|
|
23
23
|
fs::write(format!("{}/icon.png", &base_img), icon).ok()?;
|
|
24
24
|
|
|
25
25
|
let readme = include_str!("./readme.md");
|
|
26
|
-
fs::write("./.ahqstore/README.md", readme).ok()
|
|
26
|
+
fs::write("./.ahqstore/README.md", readme).ok()?;
|
|
27
|
+
|
|
28
|
+
let readme = include_str!("./readme.es.md");
|
|
29
|
+
fs::write("./.ahqstore/README.es.md", readme).ok()?;
|
|
30
|
+
|
|
31
|
+
let readme = include_str!("./readme.hi.md");
|
|
32
|
+
fs::write("./.ahqstore/README.hi.md", readme).ok()
|
|
27
33
|
})()
|
|
28
34
|
.is_some();
|
|
29
35
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# AHQ Store Cli
|
|
2
|
+
|
|
3
|
+
Edita el archivo config.json
|
|
4
|
+
|
|
5
|
+
El esquema se muestra a continuación
|
|
6
|
+
|
|
7
|
+
## config.json
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
type Platform =
|
|
11
|
+
// Plataformas Windows + Soporte para Actualizador y Desinstalador
|
|
12
|
+
| "WindowsZip"
|
|
13
|
+
| "WindowsInstallerMsi"
|
|
14
|
+
|
|
15
|
+
// No Implementado
|
|
16
|
+
| "WindowsInstallerExe"
|
|
17
|
+
| "WindowsUWPMsix"
|
|
18
|
+
|
|
19
|
+
// Plataforma Linux + Soporte para Actualizador y Desinstalador
|
|
20
|
+
| "LinuxAppImage"
|
|
21
|
+
|
|
22
|
+
// Android (En Desarrollo)
|
|
23
|
+
| "AndroidLinuxZip";
|
|
24
|
+
|
|
25
|
+
interface ConfigJSON {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
appId: string; // ID de la aplicación proporcionado por los desarrolladores de AHQ Store
|
|
28
|
+
appInstalledName: string; // Nombre de la entrada en el menú de inicio + acceso directo en el escritorio
|
|
29
|
+
appDisplayName: string; // Nombre de la aplicación
|
|
30
|
+
authorId: string; // Tu ID de usuario
|
|
31
|
+
shortDesc: string; // Descripción corta (máximo 48 palabras)
|
|
32
|
+
description: string; // Descripción de la aplicación en varias líneas
|
|
33
|
+
repo: {
|
|
34
|
+
author: string; // Tu nombre de usuario en GitHub
|
|
35
|
+
repo: string; // URL del repositorio
|
|
36
|
+
};
|
|
37
|
+
finder: {
|
|
38
|
+
[platform: ""]: {
|
|
39
|
+
startsWith?: string; // ¿Con qué debe comenzar la aplicación empaquetada?
|
|
40
|
+
contains?: string; // ¿Qué debe incluir la aplicación empaquetada?
|
|
41
|
+
endsWith?: string; // ¿Con qué debe terminar la aplicación empaquetada?
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
platform: {
|
|
45
|
+
// Debe ser "WindowsZip"| "WindowsInstallerMsi" |"WindowsInstallerExe" | "WindowsUWPMsix"
|
|
46
|
+
winAmd64Platform?: Platform; // ¿Qué tipo de binario proporciona tu aplicación a AHQ Store?
|
|
47
|
+
winArm64Platform?: Platform; // <-- Igual que winAmd64Platform -->
|
|
48
|
+
|
|
49
|
+
linuxAmd64Platform?: Platform; // Debe ser LinuxAppImage
|
|
50
|
+
linuxArm64Platform?: Platform; // Debe ser LinuxAppImage
|
|
51
|
+
linuxArm64Platform?: Platform; // Debe ser LinuxAppImage
|
|
52
|
+
linuxArm32Platform?: Platform; // Debe ser LinuxAppImage
|
|
53
|
+
|
|
54
|
+
androidUniversalPlatform?: Platform; // Debe ser AndroidApkZip
|
|
55
|
+
|
|
56
|
+
winAmd64Options?: {
|
|
57
|
+
zip_file_exec?: string; // Exe para enlazar a través de nuestro instalador (WindowsZIP)
|
|
58
|
+
exe_installer_args?: string[]; // Argumentos para ejecutar tu instalador personalizado (WindowsInstallerExe)
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
winArm64Options?: {
|
|
62
|
+
zip_file_exec?: string; // Exe para enlazar a través de nuestro instalador (WindowsZIP)
|
|
63
|
+
exe_installer_args?: string[]; // Argumentos para ejecutar tu instalador personalizado (WindowsInstallerExe)
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
site?: string; // Sitio web de tu aplicación
|
|
67
|
+
source?: string; // Sitio web de tu aplicación (que contiene el código fuente)
|
|
68
|
+
redistributed?: string; // No puedes establecer esto
|
|
69
|
+
license_or_tos?: string; // Nombre de la licencia o sitio de los términos de servicio
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## images/<app-id>/icon.png
|
|
75
|
+
|
|
76
|
+
El icono de tu aplicación que se incluirá en el archivo de metadatos de la aplicación
|
|
77
|
+
|
|
78
|
+
## images/<app-id>/\*
|
|
79
|
+
|
|
80
|
+
Coloca cualquier imagen (hasta 10) que se colocará en el modal de la aplicación en AHQ Store
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# AHQ Store Cli
|
|
2
|
+
|
|
3
|
+
config.json को संपादित करें
|
|
4
|
+
|
|
5
|
+
नीचे स्कीमा दिखाया गया है
|
|
6
|
+
|
|
7
|
+
## config.json
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
type Platform =
|
|
11
|
+
// विंडोज प्लेटफॉर्म + अपडेटर और अनइंस्टॉलर समर्थन
|
|
12
|
+
| "WindowsZip"
|
|
13
|
+
| "WindowsInstallerMsi"
|
|
14
|
+
|
|
15
|
+
// लागू नहीं किया गया
|
|
16
|
+
| "WindowsInstallerExe"
|
|
17
|
+
| "WindowsUWPMsix"
|
|
18
|
+
|
|
19
|
+
// लिनक्स प्लेटफॉर्म + अपडेटर और अनइंस्टॉलर समर्थन
|
|
20
|
+
| "LinuxAppImage"
|
|
21
|
+
|
|
22
|
+
// एंड्रॉइड (विकासाधीन)
|
|
23
|
+
| "AndroidLinuxZip";
|
|
24
|
+
|
|
25
|
+
interface ConfigJSON {
|
|
26
|
+
[key: string]: {
|
|
27
|
+
appId: string; // AHQ स्टोर DEVS द्वारा प्रदान किया गया एप्लिकेशन आईडी
|
|
28
|
+
appInstalledName: string; // ऐप स्टार्ट मेनू एंट्री + डेस्कटॉप शॉर्टकट नाम
|
|
29
|
+
appDisplayName: string; // ऐप डिस्प्ले नाम
|
|
30
|
+
authorId: string; // आपका यूजर आईडी
|
|
31
|
+
shortDesc: string; // संक्षिप्त विवरण (अधिकतम 48 शब्द)
|
|
32
|
+
description: string; // बहु-लाइन ऐप विवरण
|
|
33
|
+
repo: {
|
|
34
|
+
author: string; // आपका GitHub उपयोगकर्ता नाम
|
|
35
|
+
repo: string; // रिपो URL
|
|
36
|
+
};
|
|
37
|
+
finder: {
|
|
38
|
+
[platform: ""]: {
|
|
39
|
+
startsWith?: string; // बंडल किया गया ऐप किससे शुरू होना चाहिए?
|
|
40
|
+
contains?: string; // बंडल किया गया ऐप क्या शामिल होना चाहिए?
|
|
41
|
+
endsWith?: string; // बंडल किया गया ऐप किससे समाप्त होना चाहिए?
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
platform: {
|
|
45
|
+
// "WindowsZip"| "WindowsInstallerMsi" |"WindowsInstallerExe" | "WindowsUWPMsix" होना चाहिए
|
|
46
|
+
winAmd64Platform?: Platform; // आपका ऐप AHQ स्टोर को किस प्रकार का बाइनरी प्रदान करता है
|
|
47
|
+
winArm64Platform?: Platform; // <-- winAmd64Platform के समान -->
|
|
48
|
+
|
|
49
|
+
linuxAmd64Platform?: Platform; // LinuxAppImage होना चाहिए
|
|
50
|
+
linuxArm64Platform?: Platform; // LinuxAppImage होना चाहिए
|
|
51
|
+
linuxArm64Platform?: Platform; // LinuxAppImage होना चाहिए
|
|
52
|
+
linuxArm32Platform?: Platform; // LinuxAppImage होना चाहिए
|
|
53
|
+
|
|
54
|
+
androidUniversalPlatform?: Platform; // AndroidApkZip होना चाहिए
|
|
55
|
+
|
|
56
|
+
winAmd64Options?: {
|
|
57
|
+
zip_file_exec?: string; // हमारे इंस्टॉलर के माध्यम से लिंक करने के लिए Exe (WindowsZIP)
|
|
58
|
+
exe_installer_args?: string[]; // आपके कस्टम इंस्टॉलर को चलाने के लिए Args (WindowsInstallerExe)
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
winArm64Options?: {
|
|
62
|
+
zip_file_exec?: string; // हमारे इंस्टॉलर के माध्यम से लिंक करने के लिए Exe (WindowsZIP)
|
|
63
|
+
exe_installer_args?: string[]; // आपके कस्टम इंस्टॉलर को चलाने के लिए Args (WindowsInstallerExe)
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
site?: string; // आपके ऐप की वेबसाइट
|
|
67
|
+
source?: string; // आपके ऐप की वेबसाइट (जिसमें स्रोत कोड शामिल है)
|
|
68
|
+
redistributed?: string; // आप इसे सेट नहीं कर सकते
|
|
69
|
+
license_or_tos?: string; // लाइसेंस का नाम या TOS की साइट
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## images/<app-id>/icon.png
|
|
75
|
+
|
|
76
|
+
आपका एप्लिकेशन आइकन जो ऐप मेटाडेटा फ़ाइल में बंडल किया जाएगा
|
|
77
|
+
|
|
78
|
+
## images/<app-id>/\*
|
|
79
|
+
|
|
80
|
+
कोई भी छवि (अधिकतम 10) रखें जो AHQ स्टोर में ऐप मोडल में रखी जाएगी
|
package/src/app/create/readme.md
CHANGED
|
@@ -8,7 +8,7 @@ The schema has been shown below
|
|
|
8
8
|
|
|
9
9
|
```ts
|
|
10
10
|
type Platform =
|
|
11
|
-
// Windows Platforms + Updater &
|
|
11
|
+
// Windows Platforms + Updater & Uninstaller Support
|
|
12
12
|
| "WindowsZip"
|
|
13
13
|
| "WindowsInstallerMsi"
|
|
14
14
|
|
|
@@ -16,10 +16,11 @@ type Platform =
|
|
|
16
16
|
| "WindowsInstallerExe"
|
|
17
17
|
| "WindowsUWPMsix"
|
|
18
18
|
|
|
19
|
-
// Linux Platform + Updater &
|
|
20
|
-
| "LinuxAppImage"
|
|
19
|
+
// Linux Platform + Updater & Uninstaller Support
|
|
20
|
+
| "LinuxAppImage"
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
// Android (Under Development)
|
|
23
|
+
| "AndroidLinuxZip";
|
|
23
24
|
|
|
24
25
|
interface ConfigJSON {
|
|
25
26
|
[key: string]: {
|
|
@@ -34,35 +35,43 @@ interface ConfigJSON {
|
|
|
34
35
|
repo: string; //Repo URL
|
|
35
36
|
};
|
|
36
37
|
finder: {
|
|
37
|
-
|
|
38
|
-
startsWith?: string; // The
|
|
39
|
-
contains?: string; // The
|
|
40
|
-
endsWith?: string; // The
|
|
41
|
-
};
|
|
42
|
-
linuxFinder?: {
|
|
43
|
-
startsWith?: string; // The Linux Bundled app should startWith?
|
|
44
|
-
contains?: string; // The Linux Bundled app should include?
|
|
45
|
-
endsWith?: string; // The Linux Bundled app should endWith?
|
|
38
|
+
[platform: ""]: {
|
|
39
|
+
startsWith?: string; // The Bundled app should startWith?
|
|
40
|
+
contains?: string; // The Bundled app should include?
|
|
41
|
+
endsWith?: string; // The Bundled app should endWith?
|
|
46
42
|
};
|
|
47
43
|
};
|
|
48
44
|
platform: {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
45
|
+
// Must be "WindowsZip"| "WindowsInstallerMsi" |"WindowsInstallerExe" | "WindowsUWPMsix"
|
|
46
|
+
winAmd64Platform?: Platform; // What type of binary does your app provide to AHQ Store
|
|
47
|
+
winArm64Platform?: Platform; // <-- Same as winAmd64Platform -->
|
|
48
|
+
|
|
49
|
+
linuxAmd64Platform?: Platform; // Must be LinuxAppImage
|
|
50
|
+
linuxArm64Platform?: Platform; // Must be LinuxAppImage
|
|
51
|
+
linuxArm64Platform?: Platform; // Must be LinuxAppImage
|
|
52
|
+
linuxArm32Platform?: Platform; // Must be LinuxAppImage
|
|
53
|
+
|
|
54
|
+
androidUniversalPlatform?: Platform; // Must be AndroidApkZip
|
|
55
|
+
|
|
56
|
+
winAmd64Options?: {
|
|
57
|
+
zip_file_exec?: string; // Exe to Link via our installer (WindowsZIP)
|
|
58
|
+
exe_installer_args?: string[]; // Args to run to your custom installer (WindowsInstallerExe)
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
winArm64Options?: {
|
|
54
62
|
zip_file_exec?: string; // Exe to Link via our installer (WindowsZIP)
|
|
55
63
|
exe_installer_args?: string[]; // Args to run to your custom installer (WindowsInstallerExe)
|
|
56
64
|
};
|
|
57
|
-
linuxOptions?: {};
|
|
58
65
|
};
|
|
59
66
|
site?: string; // Your app's website
|
|
60
|
-
|
|
67
|
+
source?: string; // Your app's website (that contains source code)
|
|
68
|
+
redistributed?: string; // You just **cannot** set this
|
|
69
|
+
license_or_tos?: string; // Name of License or site of TOS
|
|
61
70
|
};
|
|
62
71
|
}
|
|
63
72
|
```
|
|
64
73
|
|
|
65
|
-
## icon.png
|
|
74
|
+
## images/<app-id>/icon.png
|
|
66
75
|
|
|
67
76
|
Your application icon that'll be bundled in the app metadata file
|
|
68
77
|
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
use serde::{Deserialize, Serialize};
|
|
2
2
|
|
|
3
|
-
#[derive(Debug, Serialize, Deserialize)]
|
|
3
|
+
#[derive(Debug, Serialize, Deserialize, Default)]
|
|
4
4
|
#[allow(non_snake_case)]
|
|
5
5
|
pub struct FileFinder<'a> {
|
|
6
6
|
#[serde(borrow)]
|
|
7
|
-
pub
|
|
7
|
+
pub windowsAmd64Finder: Option<Finder<'a>>,
|
|
8
8
|
#[serde(borrow)]
|
|
9
|
-
pub
|
|
9
|
+
pub windowsArm64Finder: Option<Finder<'a>>,
|
|
10
|
+
#[serde(borrow)]
|
|
11
|
+
pub linuxAmd64Finder: Option<Finder<'a>>,
|
|
12
|
+
#[serde(borrow)]
|
|
13
|
+
pub linuxArm64Finder: Option<Finder<'a>>,
|
|
14
|
+
#[serde(borrow)]
|
|
15
|
+
pub linuxArm32Finder: Option<Finder<'a>>,
|
|
16
|
+
#[serde(borrow)]
|
|
17
|
+
pub androidUniversalFinder: Option<Finder<'a>>,
|
|
10
18
|
}
|
|
11
19
|
|
|
12
|
-
#[derive(Debug, Serialize, Deserialize)]
|
|
20
|
+
#[derive(Debug, Serialize, Deserialize, Default)]
|
|
13
21
|
#[allow(non_snake_case)]
|
|
14
22
|
pub struct Finder<'a> {
|
|
15
23
|
#[serde(borrow)]
|
|
@@ -23,12 +31,12 @@ pub struct Finder<'a> {
|
|
|
23
31
|
impl<'a> FileFinder<'a> {
|
|
24
32
|
pub fn new() -> Self {
|
|
25
33
|
Self {
|
|
26
|
-
|
|
34
|
+
windowsAmd64Finder: Some(Finder {
|
|
27
35
|
startsWith: Some("This-is"),
|
|
28
36
|
contains: Some("an"),
|
|
29
37
|
endsWith: Some(".example"),
|
|
30
38
|
}),
|
|
31
|
-
|
|
39
|
+
..Default::default()
|
|
32
40
|
}
|
|
33
41
|
}
|
|
34
42
|
}
|
package/src/app/shared/mod.rs
CHANGED
|
@@ -25,7 +25,9 @@ pub struct IMetadata<'a> {
|
|
|
25
25
|
#[serde[borrow]]
|
|
26
26
|
pub finder: FileFinder<'a>,
|
|
27
27
|
pub site: Option<Str>,
|
|
28
|
+
pub source: Option<Str>,
|
|
28
29
|
pub redistributed: Option<Str>,
|
|
30
|
+
pub license_or_tos: Option<Str>,
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
impl<'a> IMetadata<'a> {
|
|
@@ -53,7 +55,9 @@ impl<'a> IMetadata<'a> {
|
|
|
53
55
|
platform,
|
|
54
56
|
finder: FileFinder::new(),
|
|
55
57
|
site: None,
|
|
56
|
-
|
|
58
|
+
source: None,
|
|
59
|
+
redistributed: None,
|
|
60
|
+
license_or_tos: None
|
|
57
61
|
},
|
|
58
62
|
);
|
|
59
63
|
|