diff --git a/latest.json b/latest.json new file mode 100644 index 0000000..a21cede --- /dev/null +++ b/latest.json @@ -0,0 +1,23 @@ +{ + "version": "0.3.0", + "notes": "Updater Works version", + "pub_date": "2022-11-25T00:50:57Z", + "platforms": { + "darwin-x86_64": { + "signature": "", + "url": "https://victorguyard-git-dev-flipfloop.vercel.app/public/releases/macos/Test.app.tar.gz" + }, + "darwin-aarch64": { + "signature": "", + "url": "https://github.com/FlipFloop/GaTechCourseChecker/releases/download/v0.3.0-beta/Georgia.Tech.Course.Checker.app.tar.gz" + }, + "linux-x86_64": { + "signature": "", + "url": "https://github.com/lemarier/tauri-test/releases/download/v1.0.0/app.AppImage.tar.gz" + }, + "windows-x86_64": { + "signature": "", + "url": "https://github.com/lemarier/tauri-test/releases/download/v1.0.0/app.x64.msi.zip" + } + } +} diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 93a3b3a..0f83bb4 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -16,7 +16,7 @@ tauri-build = { version = "1.1", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.1", features = ["api-all"] } +tauri = { version = "1.1", features = ["api-all", "updater"] } reqwest = {version = "0.11", features = ["blocking"] } scraper = "0.13.0" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index bf1979f..26d3ef3 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -16,7 +16,7 @@ struct Course { } #[tauri::command] -fn get_courses(courses: String) -> Vec> { +fn get_courses(courses: String) -> Vec> { println!("Courses searched: {}", courses); let mut free_courses: Vec> = vec![vec![], vec![]]; @@ -157,8 +157,17 @@ fn check_course_exists(course_id: String) -> bool { return true; } +use tauri::Manager; fn main() { tauri::Builder::default() + .setup(|app| { + #[cfg(debug_assertions)] // only include this code on debug builds + { + let window = app.get_window("main").unwrap(); + window.open_devtools(); + } + Ok(()) + }) .invoke_handler(tauri::generate_handler![get_courses, check_course_exists]) .run(tauri::generate_context!()) .expect("error while running tauri application"); diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 2d80bd6..4ab5d8d 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -7,8 +7,8 @@ "withGlobalTauri": false }, "package": { - "productName": "gatech-course-checker", - "version": "0.1.0" + "productName": "Georgia Tech Course Checker", + "version": "0.2.0" }, "tauri": { "allowlist": { @@ -51,15 +51,20 @@ "csp": null }, "updater": { - "active": false + "active": true, + "endpoints": [ + "https://raw.githubusercontent.com/FlipFloop/GaTechCourseChecker/updater/latest.json" + ], + "dialog": true, + "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDQ0RjhDRDg4QTRCOURFRTEKUldUaDNybWtpTTM0UkhYcHptMzFsTU5CS2FWZmRrcmM5aVRGMWo1MzhkRG9JZWV3SzFEWXZJTkMK" }, "windows": [ { "fullscreen": false, - "height": 600, + "height": 700, "resizable": true, - "title": "gatech-course-checker", - "width": 800 + "title": "Georgia Tech Course Checker", + "width": 900 } ] } diff --git a/src/App.tsx b/src/App.tsx index 3a1bac0..ed049f1 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -54,6 +54,7 @@ const App = () => {

Georgia Tech self-course checker!

+

Version number 0.2.0

{(course: Course) => }