diff --git a/.github/workflows/tauri-action.yml b/.github/workflows/tauri-action.yml index 714015a..b9411ba 100644 --- a/.github/workflows/tauri-action.yml +++ b/.github/workflows/tauri-action.yml @@ -17,8 +17,6 @@ jobs: include: - platform: 'macos-latest' # for Arm based macs (M1 and above). args: '--target aarch64-apple-darwin' - - platform: 'macos-latest' # for Intel based macs. - args: '--target x86_64-apple-darwin' - platform: 'ubuntu-22.04' # for Tauri v1 you could replace this with ubuntu-20.04. args: '' - platform: 'windows-latest' diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2cf4b49 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2024 Awarebayes + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index b66988f..3575f03 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,8 @@ Automate your Nexus mod downloads using a botted Google Chrome instance. Support - 📦 Single self contained binary - 🖥️ Optional [TUI](https://github.com/awarebayes/wabbaauto/tree/release/src-tauri/cli) w [RataTui](https://ratatui.rs/) - +![Modlists](https://private-user-images.githubusercontent.com/42784580/389278785-1364be2c-5ac6-4ac6-a18f-289bb40f4f0c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzI0NTczODQsIm5iZiI6MTczMjQ1NzA4NCwicGF0aCI6Ii80Mjc4NDU4MC8zODkyNzg3ODUtMTM2NGJlMmMtNWFjNi00YWM2LWExOGYtMjg5YmI0MGY0ZjBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDExMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMTI0VDE0MDQ0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4Mjk5MDY3Y2ViZWVjMTgzYmY2NjVmYjVjNzc1YzJjMjU2ZjM0MjBiM2NiZWZkMzNiYjZlYTg0ZjdhYzgzZTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.sUgOudYJsxaXwuHY0R-qWhRi5iWVSuEOkKyOmgRGLQ4) +![Downloading](https://private-user-images.githubusercontent.com/42784580/389278968-8e5e9729-bb5d-46a4-9a3c-4adac2cbc3e6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzI0NTk2NzAsIm5iZiI6MTczMjQ1OTM3MCwicGF0aCI6Ii80Mjc4NDU4MC8zODkyNzg5NjgtOGU1ZTk3MjktYmI1ZC00NmE0LTlhM2MtNGFkYWMyY2JjM2U2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDExMjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQxMTI0VDE0NDI1MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc5Yjc1ZjliMDZkZmM2OWFlOGFjNTg5NjA5ZGUyZDVjZWQ5NzAxNGJmOTY1ZDQwM2JjYWVkZDViODU2YjcyNjUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.cqNNvzOBATpX-mYVCY-sM3H9WaiaIi7sjqU8a92lvBU) ## 🚀 Quick Start Guide @@ -43,6 +44,8 @@ Start-Process "C:\Users\[YourUsername]\Downloads\Chrome\GoogleChromePortable\Goo Start-Process "C:\Users\[YourUsername]\Downloads\Chrome\GoogleChromePortable\GoogleChromePortable.exe" -ArgumentList "--remote-debugging-port=9222 --headless" ``` +Adjust path to match your installation dir if needed. + ### 4. Start Downloading 1. Launch Wabba Auto Downloader @@ -50,9 +53,17 @@ Start-Process "C:\Users\[YourUsername]\Downloads\Chrome\GoogleChromePortable\Goo 3. Begin the download process 4. Verify everything works as expected +### 5. Run Wabbajack + +1. Launch wabbajack +2. Select downloaded modlist +3. Choose wabbajack downloads folder to match WabbaAuto downloads folder +4. Wait for wabbajack to complete downloading other files and installing + ## 💡 Pro Tips - Use headless mode for background operation +- Use Non-Headless mode for debugging why something does not work ## 🤝 Contributing diff --git a/src-tauri/lib-wabbaauto/src/downloader/headless/headless.rs b/src-tauri/lib-wabbaauto/src/downloader/headless/headless.rs index a92a026..5f80904 100644 --- a/src-tauri/lib-wabbaauto/src/downloader/headless/headless.rs +++ b/src-tauri/lib-wabbaauto/src/downloader/headless/headless.rs @@ -35,17 +35,30 @@ pub async fn connect_to_browser() -> Result { pub async fn nexus_login() -> Result { let browser = connect_to_browser().await?; + let tab = browser - .new_tab() - .map_err(|_| WabbaAutoError::HeadlessChromeError)?; + .new_tab_with_options(CreateTarget { + url: "http://nexusmods.com".to_owned(), + background: Some(false), + width: Some(1920), + height: Some(1080), + browser_context_id: None, + enable_begin_frame_control: None, + new_window: None, + }) + .expect("Could not open a new tab after connecting to chrome"); - tab.navigate_to("http://nexusmods.com") - .map_err(|_| WabbaAutoError::HeadlessChromeError)?; + let jpeg_data = tab.capture_screenshot( + Page::CaptureScreenshotFormatOption::Jpeg, + None, + None, + true).unwrap(); + std::fs::write("screenshot.jpeg", jpeg_data).unwrap(); tab.wait_for_element("header#head") .map_err(|_| WabbaAutoError::HeadlessChromeError)?; - let is_logged_in = tab.find_element("a#login").is_err(); - Ok(is_logged_in) + let is_logged_in = tab.find_element("a#login").is_ok(); + Ok(!is_logged_in) } pub async fn get_nexus_download_url( diff --git a/src/lib/requests.ts b/src/lib/requests.ts index 05b8ad1..dfa6683 100644 --- a/src/lib/requests.ts +++ b/src/lib/requests.ts @@ -43,8 +43,7 @@ export async function checkBrowser() { let loginStatus = result.data; console.log(loginStatus); chromeRunning.set(true); - nexusLoggedIn.set(loginStatus.nexusmods); - loversLoggedIn.set(loginStatus.loverslab); + nexusLoggedIn.set(loginStatus.website); errorMsg.set(loginStatus.error); }