Skip to content

Commit

Permalink
Add: categorized windows versions (#105)
Browse files Browse the repository at this point in the history
* Add: categorized windows versions

* changes
  • Loading branch information
kevinly77 committed Apr 6, 2024
1 parent a5261fe commit a5d1646
Showing 1 changed file with 91 additions and 0 deletions.
91 changes: 91 additions & 0 deletions src/data/it/windows_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@ use wasm_bindgen::prelude::*;
pub fn windows_version() -> String {
WINDOWS_VERSIONS[seeder::gen_range(0..WINDOWS_VERSIONS_LEN)].to_string()
}

#[wasm_bindgen(js_name = windows_client_version)]
pub fn client_version() -> String {
CLIENT_VERSIONS[seeder::gen_range(0..CLIENT_VERSIONS_LEN)].to_string()
}

#[wasm_bindgen(js_name = windows_server_version)]
pub fn server_version() -> String {
SERVER_VERSIONS[seeder::gen_range(0..SERVER_VERSIONS_LEN)].to_string()
}

#[wasm_bindgen(js_name = windows_specialized_version)]
pub fn specialized_version() -> String {
SPECIALIZED_VERSIONS[seeder::gen_range(0..SPECIALIZED_VERSIONS_LEN)].to_string()
}

#[wasm_bindgen(js_name = windows_device_version)]
pub fn device_version() -> String {
DEVICE_VERSIONS[seeder::gen_range(0..DEVICE_VERSIONS_LEN)].to_string()
}
static WINDOWS_VERSIONS: [&'static str; 88] = [
"Windows 1.0",
"Windows 2.x",
Expand Down Expand Up @@ -96,3 +116,74 @@ static WINDOWS_VERSIONS: [&'static str; 88] = [
"Windows 2000",
];
static WINDOWS_VERSIONS_LEN: usize = WINDOWS_VERSIONS.len();

static CLIENT_VERSIONS: [&'static str; 22] = [
"Windows 1.0",
"Windows 2.0",
"Windows 2.1",
"Windows 3.0",
"Windows 3.1",
"Windows 3.2",
"Windows NT 3.1",
"Windows NT 3.5",
"Windows NT 3.51",
"Windows 95",
"Windows NT 4.0",
"Windows 98",
"Windows Me",
"Windows 2000",
"Windows XP",
"Windows XP Professional x64 Edition",
"Windows Vista",
"Windows 7",
"Windows 8",
"Windows 8.1",
"Windows 10",
"Windows 11",
];
static CLIENT_VERSIONS_LEN: usize = CLIENT_VERSIONS.len();

static SERVER_VERSIONS: [&'static str; 14] = [
"Windows NT 3.1",
"Windows NT 3.5",
"Windows NT 3.51",
"Windows 2000 Server",
"Windows NT 4.0",
"Windows Server 2003",
"Windows Server 2003 R2",
"Windows Server 2008",
"Windows Server 2008 R2",
"Windows Server 2012",
"Windows Server 2012 R2",
"Windows Server 2016",
"Windows Server 2019",
"Windows Server 2022",
];
static SERVER_VERSIONS_LEN: usize = SERVER_VERSIONS.len();

static SPECIALIZED_VERSIONS: [&'static str; 3] = [
"Windows Embedded",
"Windows PE",
"Windows Fundamentals for Legacy PCs",
];
static SPECIALIZED_VERSIONS_LEN: usize = SPECIALIZED_VERSIONS.len();

static DEVICE_VERSIONS: [&'static str; 16] = [
"Windows RT 8.1",
"Windows RT 8",
"Windows 7 Starter",
"Windows Vista Starter",
"Windows XP Media Center Edition",
"Windows Embedded Industry",
"Windows NT 4.0 Embedded",
"Windows XP Embedded",
"Windows Embedded for Point of Service",
"Windows Embedded Standard 2009",
"Windows Embedded POSReady 2009",
"Windows Embedded Standard 7",
"Windows Embedded POSReady 7",
"Windows Embedded 8 Industry",
"Windows Embedded 8.1 Industry",
"Windows 10 IoT",
];
static DEVICE_VERSIONS_LEN: usize = DEVICE_VERSIONS.len();

0 comments on commit a5d1646

Please sign in to comment.