├── installer └── bloxshade │ ├── src │ ├── App.css │ ├── vite-env.d.ts │ ├── extravi-reshade.bmp │ ├── extravi-reshade.png │ ├── main.tsx │ ├── assets │ │ └── react.svg │ ├── script.js │ ├── index.css │ └── App.tsx │ ├── src-tauri │ ├── build.rs │ ├── icons │ │ ├── 32x32.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ ├── icon.png │ │ ├── 128x128.png │ │ ├── 128x128@2x.png │ │ ├── StoreLogo.png │ │ ├── Square30x30Logo.png │ │ ├── Square44x44Logo.png │ │ ├── Square71x71Logo.png │ │ ├── Square89x89Logo.png │ │ ├── extravi-reshade.ico │ │ ├── Square107x107Logo.png │ │ ├── Square142x142Logo.png │ │ ├── Square150x150Logo.png │ │ ├── Square284x284Logo.png │ │ └── Square310x310Logo.png │ ├── Cargo.toml │ ├── src │ │ └── main.rs │ └── tauri.conf.json │ ├── dist │ ├── assets │ │ ├── extravi-reshade-Dg1APPYY.bmp │ │ ├── index-BJe5nD8y.css │ │ ├── index-DVAdU4LS.css │ │ └── index-BIq7dLcv.css │ ├── index.html │ └── vite.svg │ ├── vite.config.ts │ ├── tsconfig.node.json │ ├── index.html │ ├── tsconfig.json │ ├── package.json │ ├── README.md │ └── public │ └── vite.svg ├── bloxshade ├── build │ ├── intermediates │ │ ├── installer.log │ │ ├── installer.Build.CppClean.log │ │ └── installer.exe.recipe │ └── start_intermediates │ │ ├── start.log │ │ ├── start.Build.CppClean.log │ │ └── start.exe.recipe ├── start │ ├── start.aps │ ├── start.rc │ ├── res │ │ ├── setup.exe │ │ ├── installer.exe │ │ └── extravi-reshade.ico │ ├── start.vcxproj.user │ ├── resource.h │ ├── start.vcxproj.filters │ ├── src │ │ └── main.cpp │ └── start.vcxproj ├── installer │ ├── src │ │ └── curl │ │ │ ├── libcurl_a.lib │ │ │ ├── libcurl_a_debug.lib │ │ │ ├── stdcheaders.h │ │ │ ├── mprintf.h │ │ │ ├── curlver.h │ │ │ ├── easy.h │ │ │ ├── urlapi.h │ │ │ ├── multi.h │ │ │ ├── system.h │ │ │ └── typecheck-gcc.h │ ├── installer.vcxproj.user │ ├── installer.vcxproj.filters │ └── installer.vcxproj └── bloxshade.sln ├── screenshots ├── Screenshot 2024-05-12 193209.png ├── Screenshot 2024-05-12 193237.png ├── Screenshot 2024-05-12 193325.png └── Screenshot 2024-05-12 193442.png ├── LICENSE └── README.md /installer/bloxshade/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bloxshade/build/intermediates/installer.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bloxshade/build/start_intermediates/start.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /installer/bloxshade/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /bloxshade/start/start.aps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/start/start.aps -------------------------------------------------------------------------------- /bloxshade/start/start.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/start/start.rc -------------------------------------------------------------------------------- /bloxshade/start/res/setup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/start/res/setup.exe -------------------------------------------------------------------------------- /bloxshade/start/res/installer.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/start/res/installer.exe -------------------------------------------------------------------------------- /bloxshade/start/res/extravi-reshade.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/start/res/extravi-reshade.ico -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/libcurl_a.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/installer/src/curl/libcurl_a.lib -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /installer/bloxshade/src/extravi-reshade.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src/extravi-reshade.bmp -------------------------------------------------------------------------------- /installer/bloxshade/src/extravi-reshade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src/extravi-reshade.png -------------------------------------------------------------------------------- /screenshots/Screenshot 2024-05-12 193209.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/screenshots/Screenshot 2024-05-12 193209.png -------------------------------------------------------------------------------- /screenshots/Screenshot 2024-05-12 193237.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/screenshots/Screenshot 2024-05-12 193237.png -------------------------------------------------------------------------------- /screenshots/Screenshot 2024-05-12 193325.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/screenshots/Screenshot 2024-05-12 193325.png -------------------------------------------------------------------------------- /screenshots/Screenshot 2024-05-12 193442.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/screenshots/Screenshot 2024-05-12 193442.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/libcurl_a_debug.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/bloxshade/installer/src/curl/libcurl_a_debug.lib -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/StoreLogo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square30x30Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square30x30Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square44x44Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square44x44Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square71x71Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square71x71Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square89x89Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square89x89Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/extravi-reshade.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/extravi-reshade.ico -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square107x107Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square107x107Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square142x142Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square142x142Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square150x150Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square150x150Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square284x284Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square284x284Logo.png -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/icons/Square310x310Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/src-tauri/icons/Square310x310Logo.png -------------------------------------------------------------------------------- /bloxshade/build/intermediates/installer.Build.CppClean.log: -------------------------------------------------------------------------------- 1 | c:\users\hecker\desktop\bloxshade-main\bloxshade\build\intermediates\installer.vcxproj.filelistabsolute.txt 2 | -------------------------------------------------------------------------------- /installer/bloxshade/dist/assets/extravi-reshade-Dg1APPYY.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Extravi/Bloxshade/main/installer/bloxshade/dist/assets/extravi-reshade-Dg1APPYY.bmp -------------------------------------------------------------------------------- /bloxshade/build/start_intermediates/start.Build.CppClean.log: -------------------------------------------------------------------------------- 1 | c:\users\hecker\desktop\bloxshade-main\bloxshade\build\start_intermediates\start.vcxproj.filelistabsolute.txt 2 | -------------------------------------------------------------------------------- /bloxshade/start/start.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | -------------------------------------------------------------------------------- /installer/bloxshade/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | server: { 8 | port: 3000 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /bloxshade/installer/installer.vcxproj.user: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | true 5 | 6 | -------------------------------------------------------------------------------- /installer/bloxshade/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom/client' 3 | import App from './App.tsx' 4 | import './index.css' 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | , 10 | ) -------------------------------------------------------------------------------- /installer/bloxshade/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /bloxshade/build/start_intermediates/start.exe.recipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:\Users\hecker\Desktop\Bloxshade-main\bloxshade\build\start.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /bloxshade/build/intermediates/installer.exe.recipe: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | C:\Users\hecker\Desktop\Bloxshade-main\bloxshade\build\installer.exe 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /installer/bloxshade/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /installer/bloxshade/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite + React + TS 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | -------------------------------------------------------------------------------- /bloxshade/start/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by start.rc 4 | // 5 | #define IDI_ICON1 101 6 | #define SETUP_BINARY 1001 7 | #define INSTALLER_BINARY 1002 8 | 9 | // Next default values for new objects 10 | // 11 | #ifdef APSTUDIO_INVOKED 12 | #ifndef APSTUDIO_READONLY_SYMBOLS 13 | #define _APS_NEXT_RESOURCE_VALUE 102 14 | #define _APS_NEXT_COMMAND_VALUE 40001 15 | #define _APS_NEXT_CONTROL_VALUE 1001 16 | #define _APS_NEXT_SYMED_VALUE 101 17 | #endif 18 | #endif 19 | -------------------------------------------------------------------------------- /installer/bloxshade/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /installer/bloxshade/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bloxshade", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@tauri-apps/api": "^1.5.4", 14 | "@tauri-apps/cli": "^1.5.13", 15 | "react": "^18.2.0", 16 | "react-dom": "^18.2.0" 17 | }, 18 | "devDependencies": { 19 | "@types/react": "^18.2.66", 20 | "@types/react-dom": "^18.2.22", 21 | "@typescript-eslint/eslint-plugin": "^7.2.0", 22 | "@typescript-eslint/parser": "^7.2.0", 23 | "@vitejs/plugin-react": "^4.2.1", 24 | "eslint": "^8.57.0", 25 | "eslint-plugin-react-hooks": "^4.6.0", 26 | "eslint-plugin-react-refresh": "^0.4.6", 27 | "typescript": "^5.2.2", 28 | "vite": "^5.2.0" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "app" 3 | version = "0.1.0" 4 | description = "A Tauri App" 5 | authors = ["you"] 6 | license = "" 7 | repository = "" 8 | default-run = "app" 9 | edition = "2021" 10 | rust-version = "1.60" 11 | 12 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 13 | 14 | [build-dependencies] 15 | tauri-build = { version = "1.5.1", features = [] } 16 | 17 | [dependencies] 18 | serde_json = "1.0" 19 | serde = { version = "1.0", features = ["derive"] } 20 | tauri = { version = "1.6.2", features = [ "fs-all", "shell-all"] } 21 | CreateProcessW = "0.1.0" 22 | 23 | # DPI fix 24 | [target."cfg(windows)".dependencies] 25 | winapi = { version = "0.3.9", features = [ "shellscalingapi" ] } 26 | 27 | [features] 28 | # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. 29 | # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. 30 | # DO NOT REMOVE!! 31 | custom-protocol = [ "tauri/custom-protocol" ] 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Extravi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | #[cfg(windows)] 5 | extern crate winapi; 6 | 7 | // execute command 8 | use std::process::Command; 9 | #[tauri::command(rename_all = "snake_case")] 10 | fn cmd(executable_path: String, arguments: String) { 11 | println!("Executing command: {} {}", executable_path, arguments); 12 | 13 | let child = Command::new(&executable_path) 14 | .args(&arguments.split_whitespace().collect::>()) 15 | .spawn() 16 | .expect("failed to start installer"); 17 | } 18 | 19 | fn main() { 20 | #[cfg(target_os = "windows")] 21 | unsafe { 22 | use winapi::um::shellscalingapi::{SetProcessDpiAwareness, PROCESS_SYSTEM_DPI_AWARE}; 23 | let result = SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE); 24 | if result != 0 { 25 | println!("Error setting DPI awareness: {}", result); 26 | } 27 | } 28 | 29 | tauri::Builder::default() 30 | .invoke_handler(tauri::generate_handler![cmd]) // custom command 31 | .run(tauri::generate_context!()) 32 | .expect("error while running tauri application"); 33 | } 34 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Bloxshade 2 | Bloxshade installer source code. 3 | 4 | [![Downloads](https://img.shields.io/github/downloads/Extravi/Bloxshade/total)](https://github.com/Extravi/Bloxshade/releases) 5 | [![Version](https://img.shields.io/github/v/release/Extravi/Bloxshade?color=5885F4)](https://github.com/Extravi/Bloxshade/releases/latest) 6 | [![Discord](https://img.shields.io/discord/1204287310204502046?logo=discord&logoColor=white&label=discord&color=5885F4)](https://discord.gg/TNG5yHsEwu) 7 | [![Stars](https://img.shields.io/github/stars/Extravi/Bloxshade?style=social)](https://github.com/Extravi/Bloxshade/stargazers) 8 | 9 | ## Note 10 | To compile the Tauri app, you will need to install the Tauri CLI package. 11 | ``` 12 | npm install @tauri-apps/cli 13 | ``` 14 | 15 | ## Screenshot preview 16 | 17 | 18 | 19 | 20 | 21 | ## Authors & contact 22 | Made by [Extravi](https://extravi.dev/). 23 | 24 | Email: dante@extravi.dev 25 | -------------------------------------------------------------------------------- /installer/bloxshade/README.md: -------------------------------------------------------------------------------- 1 | # React + TypeScript + Vite 2 | 3 | This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. 4 | 5 | Currently, two official plugins are available: 6 | 7 | - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh 8 | - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh 9 | 10 | ## Expanding the ESLint configuration 11 | 12 | If you are developing a production application, we recommend updating the configuration to enable type aware lint rules: 13 | 14 | - Configure the top-level `parserOptions` property like this: 15 | 16 | ```js 17 | export default { 18 | // other rules... 19 | parserOptions: { 20 | ecmaVersion: 'latest', 21 | sourceType: 'module', 22 | project: ['./tsconfig.json', './tsconfig.node.json'], 23 | tsconfigRootDir: __dirname, 24 | }, 25 | } 26 | ``` 27 | 28 | - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` 29 | - Optionally add `plugin:@typescript-eslint/stylistic-type-checked` 30 | - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list 31 | -------------------------------------------------------------------------------- /installer/bloxshade/dist/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /installer/bloxshade/public/vite.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/stdcheaders.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_STDCHEADERS_H 2 | #define CURLINC_STDCHEADERS_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | 27 | size_t fread(void *, size_t, size_t, FILE *); 28 | size_t fwrite(const void *, size_t, size_t, FILE *); 29 | 30 | int strcasecmp(const char *, const char *); 31 | int strncasecmp(const char *, const char *, size_t); 32 | 33 | #endif /* CURLINC_STDCHEADERS_H */ 34 | -------------------------------------------------------------------------------- /bloxshade/start/start.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | Resource Files 29 | 30 | 31 | 32 | 33 | Header Files 34 | 35 | 36 | 37 | 38 | Resource Files 39 | 40 | 41 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/mprintf.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MPRINTF_H 2 | #define CURLINC_MPRINTF_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include 26 | #include /* needed for FILE */ 27 | #include "curl.h" /* for CURL_EXTERN */ 28 | 29 | #ifdef __cplusplus 30 | extern "C" { 31 | #endif 32 | 33 | CURL_EXTERN int curl_mprintf(const char *format, ...); 34 | CURL_EXTERN int curl_mfprintf(FILE *fd, const char *format, ...); 35 | CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...); 36 | CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength, 37 | const char *format, ...); 38 | CURL_EXTERN int curl_mvprintf(const char *format, va_list args); 39 | CURL_EXTERN int curl_mvfprintf(FILE *fd, const char *format, va_list args); 40 | CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args); 41 | CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength, 42 | const char *format, va_list args); 43 | CURL_EXTERN char *curl_maprintf(const char *format, ...); 44 | CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); 45 | 46 | #ifdef __cplusplus 47 | } 48 | #endif 49 | 50 | #endif /* CURLINC_MPRINTF_H */ 51 | -------------------------------------------------------------------------------- /installer/bloxshade/src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../node_modules/@tauri-apps/cli/schema.json", 3 | "build": { 4 | "beforeBuildCommand": "npm run build", 5 | "beforeDevCommand": "npm run dev", 6 | "devPath": "http://localhost:3000", 7 | "distDir": "../dist" 8 | }, 9 | "package": { 10 | "productName": "Setup - Bloxshade", 11 | "version": "2.8.11" 12 | }, 13 | "tauri": { 14 | "allowlist": { 15 | "shell": { 16 | "all": true, 17 | "execute": true, 18 | "sidecar": true, 19 | "open": true 20 | }, 21 | "fs": { 22 | "all": true, 23 | "readFile": true, 24 | "writeFile": true, 25 | "readDir": true, 26 | "copyFile": true, 27 | "createDir": true, 28 | "removeDir": true, 29 | "removeFile": true, 30 | "renameFile": true, 31 | "exists": true, 32 | "scope": [ 33 | "C:/Program Files/**", 34 | "resources/installer" 35 | ] 36 | } 37 | }, 38 | "bundle": { 39 | "active": true, 40 | "category": "DeveloperTool", 41 | "copyright": "Copyright © 2024 Extravi", 42 | "deb": { 43 | "depends": [] 44 | }, 45 | "externalBin": [], 46 | "icon": [ 47 | "icons/extravi-reshade.ico" 48 | ], 49 | "identifier": "com.bloxshade.tauri", 50 | "longDescription": "", 51 | "macOS": { 52 | "entitlements": null, 53 | "exceptionDomain": "", 54 | "frameworks": [], 55 | "providerShortName": null, 56 | "signingIdentity": null 57 | }, 58 | "resources": [], 59 | "shortDescription": "", 60 | "targets": "all", 61 | "windows": { 62 | "certificateThumbprint": null, 63 | "digestAlgorithm": "sha256", 64 | "timestampUrl": "" 65 | } 66 | }, 67 | "security": { 68 | "csp": null 69 | }, 70 | "updater": { 71 | "active": false 72 | }, 73 | "windows": [ 74 | { 75 | "fullscreen": false, 76 | "height": 360, 77 | "resizable": false, 78 | "title": "Setup - Bloxshade", 79 | "width": 500, 80 | "theme": "Dark", 81 | "center": true, 82 | "minWidth": 500, 83 | "minHeight": 360 84 | } 85 | ] 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /bloxshade/bloxshade.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.9.34622.214 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "installer", "installer\installer.vcxproj", "{1335516E-06F0-4DB6-B265-EDDBC1526AFC}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "start", "start\start.vcxproj", "{45710A38-AA3B-4D36-8A20-961467DF42EB}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|x64 = Debug|x64 13 | Debug|x86 = Debug|x86 14 | Release|x64 = Release|x64 15 | Release|x86 = Release|x86 16 | EndGlobalSection 17 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 18 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Debug|x64.ActiveCfg = Debug|x64 19 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Debug|x64.Build.0 = Debug|x64 20 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Debug|x86.ActiveCfg = Debug|Win32 21 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Debug|x86.Build.0 = Debug|Win32 22 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Release|x64.ActiveCfg = Release|x64 23 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Release|x64.Build.0 = Release|x64 24 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Release|x86.ActiveCfg = Release|Win32 25 | {1335516E-06F0-4DB6-B265-EDDBC1526AFC}.Release|x86.Build.0 = Release|Win32 26 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Debug|x64.ActiveCfg = Debug|x64 27 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Debug|x64.Build.0 = Debug|x64 28 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Debug|x86.ActiveCfg = Debug|Win32 29 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Debug|x86.Build.0 = Debug|Win32 30 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Release|x64.ActiveCfg = Release|x64 31 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Release|x64.Build.0 = Release|x64 32 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Release|x86.ActiveCfg = Release|Win32 33 | {45710A38-AA3B-4D36-8A20-961467DF42EB}.Release|x86.Build.0 = Release|Win32 34 | EndGlobalSection 35 | GlobalSection(SolutionProperties) = preSolution 36 | HideSolutionNode = FALSE 37 | EndGlobalSection 38 | GlobalSection(ExtensibilityGlobals) = postSolution 39 | SolutionGuid = {82A18181-769B-45F4-AC3B-35BC3BFB44FA} 40 | EndGlobalSection 41 | EndGlobal 42 | -------------------------------------------------------------------------------- /installer/bloxshade/dist/assets/index-BJe5nD8y.css: -------------------------------------------------------------------------------- 1 | @import"https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Inter:wght@400;700&family=Lato:wght@100;400&family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,600;6..12,700&display=swap";@import"https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital@0;1&display=swap";:root{font-family:Inter,Arial,Helvetica,sans-serif;color-scheme:dark}*{box-sizing:border-box}body{margin:0;scroll-behavior:smooth}html{background-color:#111;font-family:Inter,Arial,Helvetica,sans-serif;font-size:16px;scroll-behavior:smooth}h1{font-size:1.2rem;color:#dae5ec;font-family:Inter,sans-serif;margin:0 0 1rem}p{font-size:13px;font-weight:300;max-width:620px;margin:0 0 1rem;color:#dae5ec;font-family:Inter,sans-serif}.side-img{background-image:url(/assets/extravi-reshade-Dg1APPYY.bmp);background-size:cover;background-position:center;width:170px;height:100%;position:fixed;left:0;top:0}.content{margin-left:170px;padding:12px;padding-right:30px!important;position:fixed;background-color:#111;height:100%}.btn{background-color:#1f1f1f;color:#dae5ec;font-family:Inter,sans-serif;font-weight:lighter;font-size:16px;padding:3px 20px;border:1px solid #1f1f1f;border-radius:6px;transition:all .3s ease;float:right;margin-top:25px;margin-right:-20px}.btn:hover{border:1px solid #36383C;cursor:pointer}a{font-size:13px;font-weight:300;max-width:620px;margin:0 0 1rem;color:#8ab4f8;font-family:Inter,sans-serif}a:hover{text-decoration:underline;cursor:pointer}.settings{position:fixed;margin-top:25px}.installing{margin-top:-10px;margin-bottom:10px}.textbox{background-color:#1f1f1f;height:180px;max-height:180px;width:280px;max-height:280px;overflow:auto}.textbox p{font-family:Source Code Pro,monospace;font-optical-sizing:auto;font-weight:400;font-style:normal}.btn-2{margin-top:12px;color:#9ca3af!important}.box{font-size:13px;font-weight:300;color:#dae5ec;font-family:Inter,sans-serif;margin-left:4px}.container{margin-bottom:12px}.btn-settings{background-color:#1f1f1f;color:#dae5ec;font-family:Inter,sans-serif;font-weight:lighter;font-size:14px;padding:3px 20px 6px;border:1px solid #1f1f1f;border-radius:6px;transition:all .3s ease;margin-top:0;margin-bottom:4px;width:100%}.btn-settings:hover{border:1px solid #36383C;cursor:pointer}.p-settings{margin-top:6px}.settings-settings{margin-top:5px;float:right}.extravi{float:right!important;margin-right:10px}.uwu{float:left!important}.hide{display:none}.show{display:block} 2 | -------------------------------------------------------------------------------- /bloxshade/installer/installer.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Source Files 20 | 21 | 22 | Source Files 23 | 24 | 25 | 26 | 27 | Header Files 28 | 29 | 30 | Header Files 31 | 32 | 33 | Header Files 34 | 35 | 36 | Header Files 37 | 38 | 39 | Header Files 40 | 41 | 42 | Header Files 43 | 44 | 45 | Header Files 46 | 47 | 48 | Header Files 49 | 50 | 51 | Header Files 52 | 53 | 54 | Header Files 55 | 56 | 57 | Header Files 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /installer/bloxshade/dist/assets/index-DVAdU4LS.css: -------------------------------------------------------------------------------- 1 | @import"https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Inter:wght@400;700&family=Lato:wght@100;400&family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,600;6..12,700&display=swap";@import"https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital@0;1&display=swap";:root{font-family:Inter,Arial,Helvetica,sans-serif;color-scheme:dark}*{box-sizing:border-box}body{margin:0;scroll-behavior:smooth}html{background-color:#111;font-family:Inter,Arial,Helvetica,sans-serif;font-size:16px;scroll-behavior:smooth}h1{font-size:1.2rem;color:#dae5ec;font-family:Inter,sans-serif;margin:0 0 1rem}p{font-size:13px;font-weight:300;max-width:620px;margin:0 0 1rem;color:#dae5ec;font-family:Inter,sans-serif}.side-img{background-image:url(/assets/extravi-reshade-Dg1APPYY.bmp);background-size:cover;background-position:center;width:170px;height:100%;position:fixed;left:0;top:0}.content{margin-left:170px;padding:12px;padding-right:30px!important;position:fixed;background-color:#111;height:100%}.btn{background-color:#1f1f1f;color:#dae5ec;font-family:Inter,sans-serif;font-weight:lighter;font-size:16px;padding:3px 20px;border:1px solid #1f1f1f;border-radius:6px;transition:all .3s ease;float:right;margin-top:25px;margin-right:-20px}.btn:hover{border:1px solid #36383C;cursor:pointer}a{font-size:13px;font-weight:300;max-width:620px;margin:0 0 1rem;color:#8ab4f8;font-family:Inter,sans-serif}a:hover{text-decoration:underline;cursor:pointer}.settings{position:fixed;margin-top:25px}.installing{margin-top:-10px;margin-bottom:10px}.textbox{background-color:#1f1f1f;height:180px;max-height:180px;width:280px;max-height:280px;overflow:auto}.textbox p{font-family:Source Code Pro,monospace;font-optical-sizing:auto;font-weight:400;font-style:normal}.btn-2{margin-top:12px;color:#9ca3af!important}.box{font-size:13px;font-weight:300;color:#dae5ec;font-family:Inter,sans-serif;margin-left:4px}.container{margin-bottom:12px}.btn-settings{background-color:#1f1f1f;color:#dae5ec;font-family:Inter,sans-serif;font-weight:lighter;font-size:14px;padding:3px 20px 6px;border:1px solid #1f1f1f;border-radius:6px;transition:all .3s ease;margin-top:0;margin-bottom:4px;width:100%}.btn-settings:hover{border:1px solid #36383C;cursor:pointer}.p-settings{margin-top:6px}.highlight{color:var(--highlight);font-weight:700;font-style:normal}.c-settings{margin-top:-6px}.settings-settings{margin-top:5px;float:right}.extravi{float:right!important;margin-right:10px}.uwu{float:left!important}.hide{display:none}.show{display:block}.results-row{padding:0;margin:0;width:100%}.results-row p{padding:0;margin:0 0 4px;max-width:300px}.results-div{border-bottom:1px solid #363a3c;padding-left:12px;padding-bottom:4px;padding-top:4px;width:200%!important;margin-left:-12px}.results-div-1{border-top:1px solid #363a3c;border-bottom:1px solid #363a3c;padding-left:12px;padding-bottom:4px;padding-top:4px;width:200%!important;margin-left:-12px}.results{background-color:#1f1f1f;height:230px;width:300px;max-height:300px;overflow-x:hidden;overflow-y:auto}.btn-p{margin-top:12px;margin-right:0}.uwu-rar{float:right;margin-right:20px} 2 | -------------------------------------------------------------------------------- /installer/bloxshade/dist/assets/index-BIq7dLcv.css: -------------------------------------------------------------------------------- 1 | @import"https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Inter:wght@400;700&family=Lato:wght@100;400&family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,600;6..12,700&display=swap";@import"https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital@0;1&display=swap";:root{font-family:Inter,Arial,Helvetica,sans-serif;color-scheme:dark}*{box-sizing:border-box}body{margin:0;scroll-behavior:smooth}html{background-color:#111;font-family:Inter,Arial,Helvetica,sans-serif;font-size:16px;scroll-behavior:smooth}h1{font-size:1.2rem;color:#dae5ec;font-family:Inter,sans-serif;margin:0 0 1rem}p{font-size:13px;font-weight:300;max-width:620px;margin:0 0 1rem;color:#dae5ec;font-family:Inter,sans-serif}.side-img{background-image:url(/assets/extravi-reshade-Dg1APPYY.bmp);background-size:cover;background-position:center;width:170px;height:100%;position:fixed;left:0;top:0}.content{margin-left:170px;padding:12px;padding-right:30px!important;position:fixed;background-color:#111;height:100%}.btn{background-color:#1f1f1f;color:#dae5ec;font-family:Inter,sans-serif;font-weight:lighter;font-size:16px;padding:3px 20px;border:1px solid #1f1f1f;border-radius:6px;transition:all .3s ease;float:right;margin-top:25px;margin-right:-20px}.btn:hover{border:1px solid #36383C;cursor:pointer}a{font-size:13px;font-weight:300;max-width:620px;margin:0 0 1rem;color:#8ab4f8;font-family:Inter,sans-serif}a:hover{text-decoration:underline;cursor:pointer}.settings{position:fixed;margin-top:25px}.installing{margin-top:-10px;margin-bottom:10px}.textbox{background-color:#1f1f1f;height:180px;max-height:180px;width:280px;max-height:280px;overflow:auto}.textbox p{font-family:Source Code Pro,monospace;font-optical-sizing:auto;font-weight:400;font-style:normal}.btn-2{margin-top:12px;color:#9ca3af!important}.box{font-size:13px;font-weight:300;color:#dae5ec;font-family:Inter,sans-serif;margin-left:4px}.container{margin-bottom:12px}.btn-settings{background-color:#1f1f1f;color:#dae5ec;font-family:Inter,sans-serif;font-weight:lighter;font-size:14px;padding:3px 20px 6px;border:1px solid #1f1f1f;border-radius:6px;transition:all .3s ease;margin-top:0;margin-bottom:4px;width:100%}.btn-settings:hover{border:1px solid #36383C;cursor:pointer}.p-settings{margin-top:6px}.highlight{color:var(--highlight);font-weight:700;font-style:normal}.c-settings{margin-top:-6px}.settings-settings{margin-top:5px;float:right}.extravi{float:right!important;margin-right:10px}.uwu{float:left!important}.hide{display:none}.show{display:block}.results-row{padding:0;margin:0;width:100%}.results-row p{padding:0;margin:0 0 4px;max-width:300px}.results-div{border-bottom:1px solid #363a3c;padding-left:12px;padding-bottom:4px;padding-top:4px;width:200%!important;margin-left:-12px}.results-div-1{border-top:1px solid #363a3c;border-bottom:1px solid #363a3c;padding-left:12px;padding-bottom:4px;padding-top:4px;width:200%!important;margin-left:-12px}.results{background-color:#1f1f1f;height:230px;width:300px;max-height:300px;overflow-x:hidden;overflow-y:auto}.btn-p{margin-top:12px;margin-right:0}.con-0{margin-left:60px}.uwu-rar{float:right;margin-right:20px} 2 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/curlver.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_CURLVER_H 2 | #define CURLINC_CURLVER_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* This header file contains nothing but libcurl version info, generated by 26 | a script at release-time. This was made its own header file in 7.11.2 */ 27 | 28 | /* This is the global package copyright */ 29 | #define LIBCURL_COPYRIGHT "1996 - 2019 Daniel Stenberg, ." 30 | 31 | /* This is the version number of the libcurl package from which this header 32 | file origins: */ 33 | #define LIBCURL_VERSION "7.67.0" 34 | 35 | /* The numeric version number is also available "in parts" by using these 36 | defines: */ 37 | #define LIBCURL_VERSION_MAJOR 7 38 | #define LIBCURL_VERSION_MINOR 67 39 | #define LIBCURL_VERSION_PATCH 0 40 | 41 | /* This is the numeric version of the libcurl version number, meant for easier 42 | parsing and comparions by programs. The LIBCURL_VERSION_NUM define will 43 | always follow this syntax: 44 | 45 | 0xXXYYZZ 46 | 47 | Where XX, YY and ZZ are the main version, release and patch numbers in 48 | hexadecimal (using 8 bits each). All three numbers are always represented 49 | using two digits. 1.2 would appear as "0x010200" while version 9.11.7 50 | appears as "0x090b07". 51 | 52 | This 6-digit (24 bits) hexadecimal number does not show pre-release number, 53 | and it is always a greater number in a more recent release. It makes 54 | comparisons with greater than and less than work. 55 | 56 | Note: This define is the full hex number and _does not_ use the 57 | CURL_VERSION_BITS() macro since curl's own configure script greps for it 58 | and needs it to contain the full number. 59 | */ 60 | #define LIBCURL_VERSION_NUM 0x074300 61 | 62 | /* 63 | * This is the date and time when the full source package was created. The 64 | * timestamp is not stored in git, as the timestamp is properly set in the 65 | * tarballs by the maketgz script. 66 | * 67 | * The format of the date follows this template: 68 | * 69 | * "2007-11-23" 70 | */ 71 | #define LIBCURL_TIMESTAMP "2019-11-06" 72 | 73 | #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) 74 | #define CURL_AT_LEAST_VERSION(x,y,z) \ 75 | (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z)) 76 | 77 | #endif /* CURLINC_CURLVER_H */ 78 | -------------------------------------------------------------------------------- /installer/bloxshade/src/assets/react.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/easy.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_EASY_H 2 | #define CURLINC_EASY_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | #ifdef __cplusplus 25 | extern "C" { 26 | #endif 27 | 28 | CURL_EXTERN CURL *curl_easy_init(void); 29 | CURL_EXTERN CURLcode curl_easy_setopt(CURL *curl, CURLoption option, ...); 30 | CURL_EXTERN CURLcode curl_easy_perform(CURL *curl); 31 | CURL_EXTERN void curl_easy_cleanup(CURL *curl); 32 | 33 | /* 34 | * NAME curl_easy_getinfo() 35 | * 36 | * DESCRIPTION 37 | * 38 | * Request internal information from the curl session with this function. The 39 | * third argument MUST be a pointer to a long, a pointer to a char * or a 40 | * pointer to a double (as the documentation describes elsewhere). The data 41 | * pointed to will be filled in accordingly and can be relied upon only if the 42 | * function returns CURLE_OK. This function is intended to get used *AFTER* a 43 | * performed transfer, all results from this function are undefined until the 44 | * transfer is completed. 45 | */ 46 | CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); 47 | 48 | 49 | /* 50 | * NAME curl_easy_duphandle() 51 | * 52 | * DESCRIPTION 53 | * 54 | * Creates a new curl session handle with the same options set for the handle 55 | * passed in. Duplicating a handle could only be a matter of cloning data and 56 | * options, internal state info and things like persistent connections cannot 57 | * be transferred. It is useful in multithreaded applications when you can run 58 | * curl_easy_duphandle() for each new thread to avoid a series of identical 59 | * curl_easy_setopt() invokes in every thread. 60 | */ 61 | CURL_EXTERN CURL *curl_easy_duphandle(CURL *curl); 62 | 63 | /* 64 | * NAME curl_easy_reset() 65 | * 66 | * DESCRIPTION 67 | * 68 | * Re-initializes a CURL handle to the default values. This puts back the 69 | * handle to the same state as it was in when it was just created. 70 | * 71 | * It does keep: live connections, the Session ID cache, the DNS cache and the 72 | * cookies. 73 | */ 74 | CURL_EXTERN void curl_easy_reset(CURL *curl); 75 | 76 | /* 77 | * NAME curl_easy_recv() 78 | * 79 | * DESCRIPTION 80 | * 81 | * Receives data from the connected socket. Use after successful 82 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 83 | */ 84 | CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen, 85 | size_t *n); 86 | 87 | /* 88 | * NAME curl_easy_send() 89 | * 90 | * DESCRIPTION 91 | * 92 | * Sends data over the connected socket. Use after successful 93 | * curl_easy_perform() with CURLOPT_CONNECT_ONLY option. 94 | */ 95 | CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer, 96 | size_t buflen, size_t *n); 97 | 98 | 99 | /* 100 | * NAME curl_easy_upkeep() 101 | * 102 | * DESCRIPTION 103 | * 104 | * Performs connection upkeep for the given session handle. 105 | */ 106 | CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); 107 | 108 | #ifdef __cplusplus 109 | } 110 | #endif 111 | 112 | #endif 113 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/urlapi.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_URLAPI_H 2 | #define CURLINC_URLAPI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 2018 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | #include "curl.h" 26 | 27 | #ifdef __cplusplus 28 | extern "C" { 29 | #endif 30 | 31 | /* the error codes for the URL API */ 32 | typedef enum { 33 | CURLUE_OK, 34 | CURLUE_BAD_HANDLE, /* 1 */ 35 | CURLUE_BAD_PARTPOINTER, /* 2 */ 36 | CURLUE_MALFORMED_INPUT, /* 3 */ 37 | CURLUE_BAD_PORT_NUMBER, /* 4 */ 38 | CURLUE_UNSUPPORTED_SCHEME, /* 5 */ 39 | CURLUE_URLDECODE, /* 6 */ 40 | CURLUE_OUT_OF_MEMORY, /* 7 */ 41 | CURLUE_USER_NOT_ALLOWED, /* 8 */ 42 | CURLUE_UNKNOWN_PART, /* 9 */ 43 | CURLUE_NO_SCHEME, /* 10 */ 44 | CURLUE_NO_USER, /* 11 */ 45 | CURLUE_NO_PASSWORD, /* 12 */ 46 | CURLUE_NO_OPTIONS, /* 13 */ 47 | CURLUE_NO_HOST, /* 14 */ 48 | CURLUE_NO_PORT, /* 15 */ 49 | CURLUE_NO_QUERY, /* 16 */ 50 | CURLUE_NO_FRAGMENT /* 17 */ 51 | } CURLUcode; 52 | 53 | typedef enum { 54 | CURLUPART_URL, 55 | CURLUPART_SCHEME, 56 | CURLUPART_USER, 57 | CURLUPART_PASSWORD, 58 | CURLUPART_OPTIONS, 59 | CURLUPART_HOST, 60 | CURLUPART_PORT, 61 | CURLUPART_PATH, 62 | CURLUPART_QUERY, 63 | CURLUPART_FRAGMENT, 64 | CURLUPART_ZONEID /* added in 7.65.0 */ 65 | } CURLUPart; 66 | 67 | #define CURLU_DEFAULT_PORT (1<<0) /* return default port number */ 68 | #define CURLU_NO_DEFAULT_PORT (1<<1) /* act as if no port number was set, 69 | if the port number matches the 70 | default for the scheme */ 71 | #define CURLU_DEFAULT_SCHEME (1<<2) /* return default scheme if 72 | missing */ 73 | #define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */ 74 | #define CURLU_PATH_AS_IS (1<<4) /* leave dot sequences */ 75 | #define CURLU_DISALLOW_USER (1<<5) /* no user+password allowed */ 76 | #define CURLU_URLDECODE (1<<6) /* URL decode on get */ 77 | #define CURLU_URLENCODE (1<<7) /* URL encode on set */ 78 | #define CURLU_APPENDQUERY (1<<8) /* append a form style part */ 79 | #define CURLU_GUESS_SCHEME (1<<9) /* legacy curl-style guessing */ 80 | #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the 81 | scheme is unknown. */ 82 | 83 | typedef struct Curl_URL CURLU; 84 | 85 | /* 86 | * curl_url() creates a new CURLU handle and returns a pointer to it. 87 | * Must be freed with curl_url_cleanup(). 88 | */ 89 | CURL_EXTERN CURLU *curl_url(void); 90 | 91 | /* 92 | * curl_url_cleanup() frees the CURLU handle and related resources used for 93 | * the URL parsing. It will not free strings previously returned with the URL 94 | * API. 95 | */ 96 | CURL_EXTERN void curl_url_cleanup(CURLU *handle); 97 | 98 | /* 99 | * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new 100 | * handle must also be freed with curl_url_cleanup(). 101 | */ 102 | CURL_EXTERN CURLU *curl_url_dup(CURLU *in); 103 | 104 | /* 105 | * curl_url_get() extracts a specific part of the URL from a CURLU 106 | * handle. Returns error code. The returned pointer MUST be freed with 107 | * curl_free() afterwards. 108 | */ 109 | CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what, 110 | char **part, unsigned int flags); 111 | 112 | /* 113 | * curl_url_set() sets a specific part of the URL in a CURLU handle. Returns 114 | * error code. The passed in string will be copied. Passing a NULL instead of 115 | * a part string, clears that part. 116 | */ 117 | CURL_EXTERN CURLUcode curl_url_set(CURLU *handle, CURLUPart what, 118 | const char *part, unsigned int flags); 119 | 120 | 121 | #ifdef __cplusplus 122 | } /* end of extern "C" */ 123 | #endif 124 | 125 | #endif /* CURLINC_URLAPI_H */ 126 | -------------------------------------------------------------------------------- /installer/bloxshade/src/script.js: -------------------------------------------------------------------------------- 1 | // wait for element to exist 2 | function waitForElementToExist(elementId, callback) { 3 | var element = document.getElementById(elementId); 4 | if (element) { 5 | callback(); 6 | } else { 7 | setTimeout(function () { 8 | waitForElementToExist(elementId, callback); 9 | }, 100); 10 | } 11 | } 12 | 13 | // wait for content to load 14 | document.addEventListener("DOMContentLoaded", function () { 15 | // wait for set to exist 16 | waitForElementToExist("set", function () { 17 | document.getElementById("set").addEventListener("click", function () { 18 | var element0 = document.getElementById("con-0"); 19 | var element3 = document.getElementById("con-3"); 20 | 21 | element0.classList.remove("show"); 22 | element0.classList.add("hide"); 23 | 24 | element3.classList.remove("hide"); 25 | element3.classList.add("show"); 26 | }); 27 | }); 28 | 29 | // wait for uwu 30 | waitForElementToExist("uwu", function () { 31 | document.getElementById("uwu").addEventListener("click", function () { 32 | var element0 = document.getElementById("con-0"); 33 | var element3 = document.getElementById("con-3"); 34 | 35 | element0.classList.remove("hide"); 36 | element0.classList.add("show"); 37 | 38 | element3.classList.remove("show"); 39 | element3.classList.add("hide"); 40 | }); 41 | }); 42 | 43 | // wait for install 44 | waitForElementToExist("install", function () { 45 | document.getElementById("install").addEventListener("click", function () { 46 | var element0 = document.getElementById("con-0"); 47 | var element1 = document.getElementById("con-1"); 48 | 49 | element0.classList.remove("show"); 50 | element0.classList.add("hide"); 51 | 52 | element1.classList.remove("hide"); 53 | element1.classList.add("show"); 54 | }); 55 | }); 56 | 57 | // wait for user presets 58 | waitForElementToExist("userPresets", function () { 59 | document.getElementById("userPresets").addEventListener("click", function () { 60 | var element0 = document.getElementById("con-4"); 61 | var element1 = document.getElementById("con-2"); 62 | 63 | element0.classList.remove("show"); 64 | element0.classList.add("hide"); 65 | 66 | element1.classList.remove("hide"); 67 | element1.classList.add("show"); 68 | }); 69 | }); 70 | 71 | // wait for acknowledgements 72 | waitForElementToExist("acknowledgements", function () { 73 | document.getElementById("acknowledgements").addEventListener("click", function () { 74 | var element0 = document.getElementById("con-5"); 75 | var element1 = document.getElementById("con-0"); 76 | 77 | element0.classList.remove("show"); 78 | element0.classList.add("hide"); 79 | 80 | element1.classList.remove("hide"); 81 | element1.classList.add("show"); 82 | }); 83 | }); 84 | 85 | // wait for set-acknowledgements 86 | waitForElementToExist("set-acknowledgements", function () { 87 | document.getElementById("set-acknowledgements").addEventListener("click", function () { 88 | var element0 = document.getElementById("con-0"); 89 | var element1 = document.getElementById("con-5"); 90 | 91 | element0.classList.remove("show"); 92 | element0.classList.add("hide"); 93 | 94 | element1.classList.remove("hide"); 95 | element1.classList.add("show"); 96 | }); 97 | }); 98 | 99 | // wait for nv-uwu 100 | waitForElementToExist("nv-uwu", function () { 101 | document.getElementById("nv-uwu").addEventListener("click", function () { 102 | var element0 = document.getElementById("con-3"); 103 | var element1 = document.getElementById("con-6"); 104 | 105 | element0.classList.remove("show"); 106 | element0.classList.add("hide"); 107 | 108 | element1.classList.remove("hide"); 109 | element1.classList.add("show"); 110 | }); 111 | }); 112 | 113 | // wait for checkbox 114 | waitForElementToExist("box-0", function () { 115 | document.getElementById("box-0").checked = true; 116 | }); 117 | 118 | waitForElementToExist("box-1", function () { 119 | document.getElementById("box-1").checked = true; 120 | }); 121 | 122 | waitForElementToExist("box-2", function () { 123 | document.getElementById("box-2").checked = true; 124 | }); 125 | 126 | // toggle zoom 127 | function toggleZoomScreen(event) { 128 | if (!event.ctrlKey && !event.metaKey) { 129 | event.preventDefault(); 130 | 131 | const zoomStep = 0.1; 132 | const zoomMin = 0.1; 133 | const zoomMax = 2; 134 | 135 | let currentZoom = parseFloat(document.body.style.zoom) || 1; 136 | 137 | switch (event.key) { 138 | case '+': 139 | case '=': 140 | case 'ArrowUp': 141 | currentZoom = Math.min(currentZoom + zoomStep, zoomMax); 142 | break; 143 | case '-': 144 | case '_': 145 | case 'ArrowDown': 146 | currentZoom = Math.max(currentZoom - zoomStep, zoomMin); 147 | break; 148 | case '0': 149 | case 'Escape': 150 | currentZoom = 1; 151 | break; 152 | default: 153 | } 154 | 155 | document.body.style.zoom = currentZoom.toFixed(1); 156 | //console.log(currentZoom.toFixed(1)); 157 | } 158 | } 159 | 160 | document.addEventListener('keydown', toggleZoomScreen); 161 | }); 162 | -------------------------------------------------------------------------------- /bloxshade/start/src/main.cpp: -------------------------------------------------------------------------------- 1 | // Description: Bloxshade installer source code. 2 | // Author: Dante (dante@extravi.dev) 3 | // Date: 2024-06-04 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | // resource file 15 | #include "../resource.h" 16 | 17 | // namespace for fs 18 | namespace fs = std::filesystem; 19 | 20 | // bloxshade path 21 | const std::string bloxshadePath = "C:\\Program Files\\Bloxshade"; 22 | const std::string installerPath = "C:\\Program Files\\Bloxshade\\setup.exe"; 23 | 24 | bool ExtractEmbeddedExe(HRSRC hResInfo, HGLOBAL hResData, DWORD resourceSize, 25 | const char* outputFilename) { 26 | if (!hResInfo || !hResData || !resourceSize) { 27 | // invalid resource 28 | return false; 29 | } 30 | 31 | const BYTE* pData = (const BYTE*)LockResource(hResData); 32 | if (!pData) { 33 | // could not lock resource data 34 | return false; 35 | } 36 | 37 | std::ofstream outputFile(outputFilename, std::ios::binary); 38 | if (!outputFile.is_open()) { 39 | // could not open output file 40 | return false; 41 | } 42 | 43 | outputFile.write(reinterpret_cast(pData), resourceSize); 44 | outputFile.close(); 45 | 46 | FreeResource(hResData); 47 | return true; 48 | } 49 | 50 | int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) { 51 | std::locale::global(std::locale("en_US.UTF-8")); 52 | std::cout.imbue(std::locale()); 53 | 54 | if (!IsUserAnAdmin()) { 55 | MessageBox(NULL, L"Oops! You need to run this program as admin! >.< It's okay! If you don't have perms, ask your parent or guardian on how to run it as so!", L"Error", MB_ICONERROR | MB_OK); 56 | return 0; 57 | } 58 | 59 | // edge webview2 60 | const TCHAR* hklmPath = TEXT("SOFTWARE\\WOW6432Node\\Microsoft\\EdgeUpdate\\Clients\\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"); 61 | const TCHAR* hkcuPath = TEXT("Software\\Microsoft\\EdgeUpdate\\Clients\\{F3017226-FE2A-4295-8BDF-00C3A9A7E4C5}"); 62 | 63 | HKEY hklmKey = nullptr; 64 | HKEY hkcuKey = nullptr; 65 | LONG lRes1, lRes2; 66 | 67 | // system wide key 68 | lRes1 = RegOpenKeyEx(HKEY_LOCAL_MACHINE, hklmPath, 0, KEY_READ, &hklmKey); 69 | // current user key 70 | lRes2 = RegOpenKeyEx(HKEY_CURRENT_USER, hkcuPath, 0, KEY_READ, &hkcuKey); 71 | 72 | if (lRes1 == ERROR_SUCCESS || lRes2 == ERROR_SUCCESS) { 73 | // at least one of the keys exists 74 | std::cout << "Registry key exists." << std::endl; 75 | 76 | // close the opened keys if they were opened 77 | if (hklmKey != nullptr) { 78 | RegCloseKey(hklmKey); 79 | } 80 | if (hkcuKey != nullptr) { 81 | RegCloseKey(hkcuKey); 82 | } 83 | } 84 | else { 85 | // show message box if edge webview2 runtime was not found 86 | int result = MessageBoxW(nullptr, L"You seem to be missing the Edge WebView2 runtime. Do you want to install it? The installer requires Edge WebView2 for the user interface to work correctly. Please run the Edge WebView2 runtime setup as an administrator to ensure it installs correctly.", L"Warning", MB_OKCANCEL | MB_ICONWARNING); 87 | if (result == IDOK) { 88 | ShellExecuteW(nullptr, L"open", L"https://go.microsoft.com/fwlink/p/?LinkId=2124703", nullptr, nullptr, SW_SHOWNORMAL); 89 | } 90 | return 0; 91 | } 92 | 93 | // kill any running process that may have the folder open 94 | std::wstring killCommandInstaller = L"cmd.exe /c taskkill /F /IM installer.exe"; 95 | std::wstring killCommandSetup = L"cmd.exe /c taskkill /F /IM setup.exe"; 96 | 97 | // create process parameters 98 | auto createAndCloseProcess = [](const std::wstring& command) { 99 | STARTUPINFOW si = { sizeof(STARTUPINFO) }; 100 | PROCESS_INFORMATION pi; 101 | if (CreateProcessW(NULL, const_cast(command.c_str()), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) { 102 | WaitForSingleObject(pi.hProcess, INFINITE); 103 | CloseHandle(pi.hProcess); 104 | CloseHandle(pi.hThread); 105 | } 106 | }; 107 | 108 | // wait for process to finish 109 | createAndCloseProcess(killCommandInstaller); 110 | createAndCloseProcess(killCommandSetup); 111 | 112 | if (fs::exists(bloxshadePath)) { 113 | std::cout << "Bloxshade folder true" << std::endl; 114 | fs::remove_all(bloxshadePath); 115 | fs::create_directories(bloxshadePath); 116 | } 117 | else { 118 | std::cout << "Bloxshade folder false" << std::endl; 119 | fs::create_directories(bloxshadePath); 120 | } 121 | 122 | HRSRC hResInfo; 123 | HGLOBAL hResData; 124 | DWORD resourceSize; 125 | 126 | // extract setup.exe 127 | hResInfo = FindResource(NULL, MAKEINTRESOURCE(SETUP_BINARY), L"BINARY"); 128 | if (hResInfo) { 129 | hResData = LoadResource(NULL, hResInfo); 130 | resourceSize = SizeofResource(NULL, hResInfo); 131 | if (ExtractEmbeddedExe(hResInfo, hResData, resourceSize, (bloxshadePath + "\\setup.exe").c_str())) { 132 | std::cout << "setup.exe extracted successfully." << std::endl; 133 | } 134 | } 135 | else { 136 | std::cerr << "Warning: setup.exe resource not found." << std::endl; 137 | } 138 | 139 | // extract installer.exe 140 | hResInfo = FindResource(NULL, MAKEINTRESOURCE(INSTALLER_BINARY), L"BINARY"); 141 | if (hResInfo) { 142 | hResData = LoadResource(NULL, hResInfo); 143 | resourceSize = SizeofResource(NULL, hResInfo); 144 | if (ExtractEmbeddedExe(hResInfo, hResData, resourceSize, (bloxshadePath + "\\installer.exe").c_str())) { 145 | std::cout << "installer.exe extracted successfully." << std::endl; 146 | } 147 | } 148 | else { 149 | std::cerr << "Warning: installer.exe resource not found." << std::endl; 150 | } 151 | 152 | // start installer 153 | WinExec(installerPath.c_str(), SW_HIDE); 154 | 155 | // debug wait for input 156 | //std::cin.get(); 157 | return 0; 158 | } 159 | -------------------------------------------------------------------------------- /installer/bloxshade/src/index.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Inter:wght@400;700&family=Lato:wght@100;400&family=Nunito+Sans:opsz,wght@6..12,300;6..12,400;6..12,600;6..12,700&display=swap'); 2 | @import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital@0;1&display=swap'); 3 | 4 | :root { 5 | font-family: "Inter", Arial, Helvetica, sans-serif; 6 | color-scheme: dark; 7 | } 8 | 9 | * { 10 | box-sizing: border-box; 11 | } 12 | 13 | body { 14 | margin: 0; 15 | scroll-behavior: smooth; 16 | } 17 | 18 | html { 19 | background-color: #111111; 20 | font-family: "Inter", Arial, Helvetica, sans-serif; 21 | font-size: 16px; 22 | scroll-behavior: smooth; 23 | } 24 | 25 | h1 { 26 | font-size: 1.2rem; 27 | color: #dae5ec; 28 | font-family: 'Inter', sans-serif; 29 | margin: 0 0 1rem; 30 | } 31 | 32 | p { 33 | font-size: 13px; 34 | font-weight: 300; 35 | max-width: 620px; 36 | margin: 0 0 1rem; 37 | color: #dae5ec; 38 | font-family: 'Inter', sans-serif; 39 | } 40 | 41 | .side-img { 42 | background-image: url('/src/extravi-reshade.png'); 43 | background-size: cover; 44 | background-position: center; 45 | width: 35%; 46 | height: 100%; 47 | position: fixed; 48 | left: 0; 49 | top: 0; 50 | } 51 | 52 | .content { 53 | margin-left: 34%; 54 | padding: 12px; 55 | padding-right: 6% !important; 56 | position: fixed; 57 | background-color: #111111; 58 | height: 100%; 59 | } 60 | 61 | .btn { 62 | background-color: #1f1f1f; 63 | color: #dae5ec; 64 | font-family: 'Inter', sans-serif; 65 | font-weight: lighter; 66 | font-size: 16px; 67 | padding-left: 20px; 68 | padding-right: 20px; 69 | padding-top: 3px; 70 | padding-bottom: 3px; 71 | border: 1px solid #1f1f1f; 72 | border-radius: 6px; 73 | transition: all .3s ease; 74 | float: right; 75 | margin-top: 25px; 76 | margin-right: -20px; 77 | } 78 | 79 | .btn:hover { 80 | border: 1px solid #36383C; 81 | cursor: pointer 82 | } 83 | 84 | a { 85 | font-size: 13px; 86 | font-weight: 300; 87 | max-width: 620px; 88 | margin: 0 0 1rem; 89 | color: #8AB4F8; 90 | font-family: 'Inter', sans-serif; 91 | } 92 | 93 | a:hover { 94 | text-decoration: underline; 95 | cursor: pointer; 96 | } 97 | 98 | .settings { 99 | position: fixed; 100 | margin-top: 25px; 101 | } 102 | 103 | .installing { 104 | margin-top: -10px; 105 | margin-bottom: 10px; 106 | } 107 | 108 | .textbox { 109 | background-color: #1f1f1f; 110 | height: 180px; 111 | max-height: 180px; 112 | width: 280px; 113 | max-height: 280px; 114 | overflow: auto; 115 | } 116 | 117 | .textbox p { 118 | font-family: "Source Code Pro", monospace; 119 | font-optical-sizing: auto; 120 | font-weight: 400; 121 | font-style: normal; 122 | } 123 | 124 | .textbox-2 { 125 | background-color: #1f1f1f; 126 | height: 180px; 127 | max-height: 180px; 128 | width: 280px; 129 | max-height: 280px; 130 | overflow: auto; 131 | } 132 | 133 | .textbox-2 p { 134 | font-family: "Source Code Pro", monospace; 135 | font-optical-sizing: auto; 136 | font-weight: 400; 137 | font-style: normal; 138 | } 139 | 140 | .btn-2 { 141 | margin-top: 12px; 142 | color: #9CA3AF !important; 143 | } 144 | 145 | .box { 146 | font-size: 13px; 147 | font-weight: 300; 148 | color: #dae5ec; 149 | font-family: 'Inter', sans-serif; 150 | margin-left: 4px; 151 | } 152 | 153 | .container { 154 | margin-bottom: 12px; 155 | } 156 | 157 | .btn-settings { 158 | background-color: #1f1f1f; 159 | color: #dae5ec; 160 | font-family: 'Inter', sans-serif; 161 | font-weight: lighter; 162 | font-size: 14px; 163 | padding-left: 20px; 164 | padding-right: 20px; 165 | padding-top: 3px; 166 | padding-bottom: 6px; 167 | border: 1px solid #1f1f1f; 168 | border-radius: 6px; 169 | transition: all .3s ease; 170 | margin-top: 0px; 171 | margin-bottom: 4px; 172 | width: 100%; 173 | } 174 | 175 | .btn-settings:hover { 176 | border: 1px solid #36383C; 177 | cursor: pointer 178 | } 179 | 180 | .p-settings { 181 | margin-top: 6px; 182 | } 183 | 184 | .highlight { 185 | color: var(--highlight); 186 | font-weight: 700; 187 | font-style: normal; 188 | } 189 | 190 | .c-settings { 191 | margin-top: -6px; 192 | } 193 | 194 | .settings-settings { 195 | margin-top: 5px; 196 | float: right; 197 | } 198 | 199 | .extravi { 200 | float: right !important; 201 | margin-right: 10px; 202 | } 203 | 204 | .extravi-uwu { 205 | float: right !important; 206 | margin-right: 10px; 207 | } 208 | 209 | .uwu { 210 | float: left !important; 211 | } 212 | 213 | .hide { 214 | display: none; 215 | } 216 | 217 | .show { 218 | display: block; 219 | } 220 | 221 | .results-row { 222 | padding: 0px; 223 | margin: 0px; 224 | width: 100%; 225 | } 226 | 227 | .results-row p { 228 | padding: 0px; 229 | margin: 0px; 230 | margin-bottom: 4px; 231 | max-width: 300px; 232 | } 233 | 234 | .results-div { 235 | border-bottom: 1px solid #363a3c; 236 | padding-left: 12px; 237 | padding-bottom: 4px; 238 | padding-top: 4px; 239 | width: 200% !important; 240 | margin-left: -12px; 241 | } 242 | 243 | .results-div-1 { 244 | border-top: 1px solid #363a3c; 245 | border-bottom: 1px solid #363a3c; 246 | padding-left: 12px; 247 | padding-bottom: 4px; 248 | padding-top: 4px; 249 | width: 200% !important; 250 | margin-left: -12px; 251 | } 252 | 253 | .results { 254 | background-color: #1f1f1f; 255 | height: 230px; 256 | width: 300px; 257 | max-height: 300px; 258 | overflow-x: hidden; 259 | overflow-y: auto; 260 | } 261 | 262 | .btn-p { 263 | margin-top: 12px; 264 | margin-right: 0px; 265 | } 266 | 267 | .con-0 { 268 | margin-left: 60px; 269 | } 270 | 271 | .uwu-rar { 272 | float: right; 273 | margin-right: 20px; 274 | } 275 | 276 | /* display scaling */ 277 | 278 | @media only screen and (max-width: 450px) { 279 | h1 { 280 | font-size: 0.8rem; 281 | } 282 | 283 | p { 284 | font-size: 8px; 285 | } 286 | 287 | .content { 288 | padding: 7px; 289 | } 290 | 291 | a { 292 | font-size: 8px; 293 | } 294 | 295 | .btn { 296 | font-size: 9px; 297 | padding-left: 9px; 298 | padding-right: 9px; 299 | margin-top: 12px; 300 | margin-right: -15px; 301 | } 302 | 303 | .settings { 304 | margin-top: 12px; 305 | } 306 | 307 | .con-0 { 308 | margin-left: 40px; 309 | } 310 | 311 | .results { 312 | width: 188px; 313 | height: 130px; 314 | } 315 | 316 | .btn-p { 317 | margin-right: -3px; 318 | } 319 | 320 | .uwu-rar { 321 | margin-right: 130px !important; 322 | } 323 | 324 | .textbox { 325 | width: 188px; 326 | height: 100px; 327 | margin-top: -8px; 328 | } 329 | 330 | .textbox-2 { 331 | width: 188px; 332 | height: 100px; 333 | margin-top: -8px; 334 | } 335 | 336 | .btn-2 { 337 | margin-right: -3px; 338 | margin-top: 10px; 339 | } 340 | 341 | .btn-settings { 342 | font-size: 8px; 343 | padding-left: 8px; 344 | padding-right: 8px; 345 | } 346 | 347 | .p-settings { 348 | margin-bottom: 2px; 349 | margin-top: 0px; 350 | } 351 | 352 | .container { 353 | margin-bottom: 10px; 354 | transform: scale(0.7); 355 | margin-left: -33px; 356 | margin-top: -10px; 357 | } 358 | 359 | .box { 360 | font-size: 12px; 361 | margin-top: 100px !important; 362 | } 363 | 364 | .btn-uwu { 365 | margin-top: 8px; 366 | } 367 | } 368 | -------------------------------------------------------------------------------- /bloxshade/start/start.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 17.0 23 | Win32Proj 24 | {45710a38-aa3b-4d36-8a20-961467df42eb} 25 | start 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v143 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | $(SolutionDir)build\ 75 | $(SolutionDir)build\start_intermediates\ 76 | 77 | 78 | $(SolutionDir)build\ 79 | $(SolutionDir)build\start_intermediates\ 80 | 81 | 82 | 83 | Level3 84 | true 85 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 86 | true 87 | 88 | 89 | Console 90 | true 91 | 92 | 93 | 94 | 95 | Level3 96 | true 97 | true 98 | true 99 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 100 | true 101 | 102 | 103 | Console 104 | true 105 | true 106 | true 107 | 108 | 109 | 110 | 111 | Level3 112 | true 113 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 114 | true 115 | stdcpp20 116 | MultiThreadedDebug 117 | 118 | 119 | Windows 120 | true 121 | RequireAdministrator 122 | 123 | 124 | 125 | 126 | Level3 127 | true 128 | true 129 | true 130 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 131 | true 132 | stdcpp20 133 | MultiThreadedDebug 134 | 135 | 136 | Windows 137 | true 138 | true 139 | true 140 | RequireAdministrator 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | -------------------------------------------------------------------------------- /bloxshade/installer/installer.vcxproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | Win32 7 | 8 | 9 | Release 10 | Win32 11 | 12 | 13 | Debug 14 | x64 15 | 16 | 17 | Release 18 | x64 19 | 20 | 21 | 22 | 17.0 23 | Win32Proj 24 | {1335516e-06f0-4db6-b265-eddbc1526afc} 25 | installer 26 | 10.0 27 | 28 | 29 | 30 | Application 31 | true 32 | v143 33 | Unicode 34 | 35 | 36 | Application 37 | false 38 | v143 39 | true 40 | Unicode 41 | 42 | 43 | Application 44 | true 45 | v143 46 | Unicode 47 | 48 | 49 | Application 50 | false 51 | v143 52 | true 53 | Unicode 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | $(SolutionDir)build\ 75 | $(SolutionDir)build\intermediates\ 76 | 77 | 78 | $(SolutionDir)build\ 79 | $(SolutionDir)build\intermediates\ 80 | 81 | 82 | 83 | Level3 84 | true 85 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) 86 | true 87 | 88 | 89 | Console 90 | true 91 | Normaliz.lib;Ws2_32.lib;Wldap32.lib;Crypt32.lib;advapi32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) 92 | 93 | 94 | 95 | 96 | Level3 97 | true 98 | true 99 | true 100 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 101 | true 102 | 103 | 104 | Console 105 | true 106 | true 107 | true 108 | Normaliz.lib;Ws2_32.lib;Wldap32.lib;Crypt32.lib;advapi32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) 109 | 110 | 111 | 112 | 113 | Level3 114 | true 115 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions) 116 | true 117 | stdcpp20 118 | MultiThreadedDebug 119 | 120 | 121 | Windows 122 | true 123 | RequireAdministrator 124 | Normaliz.lib;Ws2_32.lib;Wldap32.lib;Crypt32.lib;advapi32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) 125 | 126 | 127 | 128 | 129 | Level3 130 | true 131 | true 132 | true 133 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions) 134 | true 135 | stdcpp20 136 | MultiThreadedDebug 137 | 138 | 139 | Windows 140 | true 141 | true 142 | true 143 | RequireAdministrator 144 | Normaliz.lib;Ws2_32.lib;Wldap32.lib;Crypt32.lib;advapi32.lib;$(CoreLibraryDependencies);%(AdditionalDependencies) 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/multi.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_MULTI_H 2 | #define CURLINC_MULTI_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | /* 25 | This is an "external" header file. Don't give away any internals here! 26 | 27 | GOALS 28 | 29 | o Enable a "pull" interface. The application that uses libcurl decides where 30 | and when to ask libcurl to get/send data. 31 | 32 | o Enable multiple simultaneous transfers in the same thread without making it 33 | complicated for the application. 34 | 35 | o Enable the application to select() on its own file descriptors and curl's 36 | file descriptors simultaneous easily. 37 | 38 | */ 39 | 40 | /* 41 | * This header file should not really need to include "curl.h" since curl.h 42 | * itself includes this file and we expect user applications to do #include 43 | * without the need for especially including multi.h. 44 | * 45 | * For some reason we added this include here at one point, and rather than to 46 | * break existing (wrongly written) libcurl applications, we leave it as-is 47 | * but with this warning attached. 48 | */ 49 | #include "curl.h" 50 | 51 | #ifdef __cplusplus 52 | extern "C" { 53 | #endif 54 | 55 | #if defined(BUILDING_LIBCURL) || defined(CURL_STRICTER) 56 | typedef struct Curl_multi CURLM; 57 | #else 58 | typedef void CURLM; 59 | #endif 60 | 61 | typedef enum { 62 | CURLM_CALL_MULTI_PERFORM = -1, /* please call curl_multi_perform() or 63 | curl_multi_socket*() soon */ 64 | CURLM_OK, 65 | CURLM_BAD_HANDLE, /* the passed-in handle is not a valid CURLM handle */ 66 | CURLM_BAD_EASY_HANDLE, /* an easy handle was not good/valid */ 67 | CURLM_OUT_OF_MEMORY, /* if you ever get this, you're in deep sh*t */ 68 | CURLM_INTERNAL_ERROR, /* this is a libcurl bug */ 69 | CURLM_BAD_SOCKET, /* the passed in socket argument did not match */ 70 | CURLM_UNKNOWN_OPTION, /* curl_multi_setopt() with unsupported option */ 71 | CURLM_ADDED_ALREADY, /* an easy handle already added to a multi handle was 72 | attempted to get added - again */ 73 | CURLM_RECURSIVE_API_CALL, /* an api function was called from inside a 74 | callback */ 75 | CURLM_LAST 76 | } CURLMcode; 77 | 78 | /* just to make code nicer when using curl_multi_socket() you can now check 79 | for CURLM_CALL_MULTI_SOCKET too in the same style it works for 80 | curl_multi_perform() and CURLM_CALL_MULTI_PERFORM */ 81 | #define CURLM_CALL_MULTI_SOCKET CURLM_CALL_MULTI_PERFORM 82 | 83 | /* bitmask bits for CURLMOPT_PIPELINING */ 84 | #define CURLPIPE_NOTHING 0L 85 | #define CURLPIPE_HTTP1 1L 86 | #define CURLPIPE_MULTIPLEX 2L 87 | 88 | typedef enum { 89 | CURLMSG_NONE, /* first, not used */ 90 | CURLMSG_DONE, /* This easy handle has completed. 'result' contains 91 | the CURLcode of the transfer */ 92 | CURLMSG_LAST /* last, not used */ 93 | } CURLMSG; 94 | 95 | struct CURLMsg { 96 | CURLMSG msg; /* what this message means */ 97 | CURL *easy_handle; /* the handle it concerns */ 98 | union { 99 | void *whatever; /* message-specific data */ 100 | CURLcode result; /* return code for transfer */ 101 | } data; 102 | }; 103 | typedef struct CURLMsg CURLMsg; 104 | 105 | /* Based on poll(2) structure and values. 106 | * We don't use pollfd and POLL* constants explicitly 107 | * to cover platforms without poll(). */ 108 | #define CURL_WAIT_POLLIN 0x0001 109 | #define CURL_WAIT_POLLPRI 0x0002 110 | #define CURL_WAIT_POLLOUT 0x0004 111 | 112 | struct curl_waitfd { 113 | curl_socket_t fd; 114 | short events; 115 | short revents; /* not supported yet */ 116 | }; 117 | 118 | /* 119 | * Name: curl_multi_init() 120 | * 121 | * Desc: inititalize multi-style curl usage 122 | * 123 | * Returns: a new CURLM handle to use in all 'curl_multi' functions. 124 | */ 125 | CURL_EXTERN CURLM *curl_multi_init(void); 126 | 127 | /* 128 | * Name: curl_multi_add_handle() 129 | * 130 | * Desc: add a standard curl handle to the multi stack 131 | * 132 | * Returns: CURLMcode type, general multi error code. 133 | */ 134 | CURL_EXTERN CURLMcode curl_multi_add_handle(CURLM *multi_handle, 135 | CURL *curl_handle); 136 | 137 | /* 138 | * Name: curl_multi_remove_handle() 139 | * 140 | * Desc: removes a curl handle from the multi stack again 141 | * 142 | * Returns: CURLMcode type, general multi error code. 143 | */ 144 | CURL_EXTERN CURLMcode curl_multi_remove_handle(CURLM *multi_handle, 145 | CURL *curl_handle); 146 | 147 | /* 148 | * Name: curl_multi_fdset() 149 | * 150 | * Desc: Ask curl for its fd_set sets. The app can use these to select() or 151 | * poll() on. We want curl_multi_perform() called as soon as one of 152 | * them are ready. 153 | * 154 | * Returns: CURLMcode type, general multi error code. 155 | */ 156 | CURL_EXTERN CURLMcode curl_multi_fdset(CURLM *multi_handle, 157 | fd_set *read_fd_set, 158 | fd_set *write_fd_set, 159 | fd_set *exc_fd_set, 160 | int *max_fd); 161 | 162 | /* 163 | * Name: curl_multi_wait() 164 | * 165 | * Desc: Poll on all fds within a CURLM set as well as any 166 | * additional fds passed to the function. 167 | * 168 | * Returns: CURLMcode type, general multi error code. 169 | */ 170 | CURL_EXTERN CURLMcode curl_multi_wait(CURLM *multi_handle, 171 | struct curl_waitfd extra_fds[], 172 | unsigned int extra_nfds, 173 | int timeout_ms, 174 | int *ret); 175 | 176 | /* 177 | * Name: curl_multi_poll() 178 | * 179 | * Desc: Poll on all fds within a CURLM set as well as any 180 | * additional fds passed to the function. 181 | * 182 | * Returns: CURLMcode type, general multi error code. 183 | */ 184 | CURL_EXTERN CURLMcode curl_multi_poll(CURLM *multi_handle, 185 | struct curl_waitfd extra_fds[], 186 | unsigned int extra_nfds, 187 | int timeout_ms, 188 | int *ret); 189 | 190 | /* 191 | * Name: curl_multi_perform() 192 | * 193 | * Desc: When the app thinks there's data available for curl it calls this 194 | * function to read/write whatever there is right now. This returns 195 | * as soon as the reads and writes are done. This function does not 196 | * require that there actually is data available for reading or that 197 | * data can be written, it can be called just in case. It returns 198 | * the number of handles that still transfer data in the second 199 | * argument's integer-pointer. 200 | * 201 | * Returns: CURLMcode type, general multi error code. *NOTE* that this only 202 | * returns errors etc regarding the whole multi stack. There might 203 | * still have occurred problems on individual transfers even when 204 | * this returns OK. 205 | */ 206 | CURL_EXTERN CURLMcode curl_multi_perform(CURLM *multi_handle, 207 | int *running_handles); 208 | 209 | /* 210 | * Name: curl_multi_cleanup() 211 | * 212 | * Desc: Cleans up and removes a whole multi stack. It does not free or 213 | * touch any individual easy handles in any way. We need to define 214 | * in what state those handles will be if this function is called 215 | * in the middle of a transfer. 216 | * 217 | * Returns: CURLMcode type, general multi error code. 218 | */ 219 | CURL_EXTERN CURLMcode curl_multi_cleanup(CURLM *multi_handle); 220 | 221 | /* 222 | * Name: curl_multi_info_read() 223 | * 224 | * Desc: Ask the multi handle if there's any messages/informationals from 225 | * the individual transfers. Messages include informationals such as 226 | * error code from the transfer or just the fact that a transfer is 227 | * completed. More details on these should be written down as well. 228 | * 229 | * Repeated calls to this function will return a new struct each 230 | * time, until a special "end of msgs" struct is returned as a signal 231 | * that there is no more to get at this point. 232 | * 233 | * The data the returned pointer points to will not survive calling 234 | * curl_multi_cleanup(). 235 | * 236 | * The 'CURLMsg' struct is meant to be very simple and only contain 237 | * very basic information. If more involved information is wanted, 238 | * we will provide the particular "transfer handle" in that struct 239 | * and that should/could/would be used in subsequent 240 | * curl_easy_getinfo() calls (or similar). The point being that we 241 | * must never expose complex structs to applications, as then we'll 242 | * undoubtably get backwards compatibility problems in the future. 243 | * 244 | * Returns: A pointer to a filled-in struct, or NULL if it failed or ran out 245 | * of structs. It also writes the number of messages left in the 246 | * queue (after this read) in the integer the second argument points 247 | * to. 248 | */ 249 | CURL_EXTERN CURLMsg *curl_multi_info_read(CURLM *multi_handle, 250 | int *msgs_in_queue); 251 | 252 | /* 253 | * Name: curl_multi_strerror() 254 | * 255 | * Desc: The curl_multi_strerror function may be used to turn a CURLMcode 256 | * value into the equivalent human readable error string. This is 257 | * useful for printing meaningful error messages. 258 | * 259 | * Returns: A pointer to a zero-terminated error message. 260 | */ 261 | CURL_EXTERN const char *curl_multi_strerror(CURLMcode); 262 | 263 | /* 264 | * Name: curl_multi_socket() and 265 | * curl_multi_socket_all() 266 | * 267 | * Desc: An alternative version of curl_multi_perform() that allows the 268 | * application to pass in one of the file descriptors that have been 269 | * detected to have "action" on them and let libcurl perform. 270 | * See man page for details. 271 | */ 272 | #define CURL_POLL_NONE 0 273 | #define CURL_POLL_IN 1 274 | #define CURL_POLL_OUT 2 275 | #define CURL_POLL_INOUT 3 276 | #define CURL_POLL_REMOVE 4 277 | 278 | #define CURL_SOCKET_TIMEOUT CURL_SOCKET_BAD 279 | 280 | #define CURL_CSELECT_IN 0x01 281 | #define CURL_CSELECT_OUT 0x02 282 | #define CURL_CSELECT_ERR 0x04 283 | 284 | typedef int (*curl_socket_callback)(CURL *easy, /* easy handle */ 285 | curl_socket_t s, /* socket */ 286 | int what, /* see above */ 287 | void *userp, /* private callback 288 | pointer */ 289 | void *socketp); /* private socket 290 | pointer */ 291 | /* 292 | * Name: curl_multi_timer_callback 293 | * 294 | * Desc: Called by libcurl whenever the library detects a change in the 295 | * maximum number of milliseconds the app is allowed to wait before 296 | * curl_multi_socket() or curl_multi_perform() must be called 297 | * (to allow libcurl's timed events to take place). 298 | * 299 | * Returns: The callback should return zero. 300 | */ 301 | typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */ 302 | long timeout_ms, /* see above */ 303 | void *userp); /* private callback 304 | pointer */ 305 | 306 | CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, 307 | int *running_handles); 308 | 309 | CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, 310 | curl_socket_t s, 311 | int ev_bitmask, 312 | int *running_handles); 313 | 314 | CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, 315 | int *running_handles); 316 | 317 | #ifndef CURL_ALLOW_OLD_MULTI_SOCKET 318 | /* This macro below was added in 7.16.3 to push users who recompile to use 319 | the new curl_multi_socket_action() instead of the old curl_multi_socket() 320 | */ 321 | #define curl_multi_socket(x,y,z) curl_multi_socket_action(x,y,0,z) 322 | #endif 323 | 324 | /* 325 | * Name: curl_multi_timeout() 326 | * 327 | * Desc: Returns the maximum number of milliseconds the app is allowed to 328 | * wait before curl_multi_socket() or curl_multi_perform() must be 329 | * called (to allow libcurl's timed events to take place). 330 | * 331 | * Returns: CURLM error code. 332 | */ 333 | CURL_EXTERN CURLMcode curl_multi_timeout(CURLM *multi_handle, 334 | long *milliseconds); 335 | 336 | #undef CINIT /* re-using the same name as in curl.h */ 337 | 338 | #ifdef CURL_ISOCPP 339 | #define CINIT(name,type,num) CURLMOPT_ ## name = CURLOPTTYPE_ ## type + num 340 | #else 341 | /* The macro "##" is ISO C, we assume pre-ISO C doesn't support it. */ 342 | #define LONG CURLOPTTYPE_LONG 343 | #define OBJECTPOINT CURLOPTTYPE_OBJECTPOINT 344 | #define FUNCTIONPOINT CURLOPTTYPE_FUNCTIONPOINT 345 | #define OFF_T CURLOPTTYPE_OFF_T 346 | #define CINIT(name,type,number) CURLMOPT_/**/name = type + number 347 | #endif 348 | 349 | typedef enum { 350 | /* This is the socket callback function pointer */ 351 | CINIT(SOCKETFUNCTION, FUNCTIONPOINT, 1), 352 | 353 | /* This is the argument passed to the socket callback */ 354 | CINIT(SOCKETDATA, OBJECTPOINT, 2), 355 | 356 | /* set to 1 to enable pipelining for this multi handle */ 357 | CINIT(PIPELINING, LONG, 3), 358 | 359 | /* This is the timer callback function pointer */ 360 | CINIT(TIMERFUNCTION, FUNCTIONPOINT, 4), 361 | 362 | /* This is the argument passed to the timer callback */ 363 | CINIT(TIMERDATA, OBJECTPOINT, 5), 364 | 365 | /* maximum number of entries in the connection cache */ 366 | CINIT(MAXCONNECTS, LONG, 6), 367 | 368 | /* maximum number of (pipelining) connections to one host */ 369 | CINIT(MAX_HOST_CONNECTIONS, LONG, 7), 370 | 371 | /* maximum number of requests in a pipeline */ 372 | CINIT(MAX_PIPELINE_LENGTH, LONG, 8), 373 | 374 | /* a connection with a content-length longer than this 375 | will not be considered for pipelining */ 376 | CINIT(CONTENT_LENGTH_PENALTY_SIZE, OFF_T, 9), 377 | 378 | /* a connection with a chunk length longer than this 379 | will not be considered for pipelining */ 380 | CINIT(CHUNK_LENGTH_PENALTY_SIZE, OFF_T, 10), 381 | 382 | /* a list of site names(+port) that are blacklisted from 383 | pipelining */ 384 | CINIT(PIPELINING_SITE_BL, OBJECTPOINT, 11), 385 | 386 | /* a list of server types that are blacklisted from 387 | pipelining */ 388 | CINIT(PIPELINING_SERVER_BL, OBJECTPOINT, 12), 389 | 390 | /* maximum number of open connections in total */ 391 | CINIT(MAX_TOTAL_CONNECTIONS, LONG, 13), 392 | 393 | /* This is the server push callback function pointer */ 394 | CINIT(PUSHFUNCTION, FUNCTIONPOINT, 14), 395 | 396 | /* This is the argument passed to the server push callback */ 397 | CINIT(PUSHDATA, OBJECTPOINT, 15), 398 | 399 | /* maximum number of concurrent streams to support on a connection */ 400 | CINIT(MAX_CONCURRENT_STREAMS, LONG, 16), 401 | 402 | CURLMOPT_LASTENTRY /* the last unused */ 403 | } CURLMoption; 404 | 405 | 406 | /* 407 | * Name: curl_multi_setopt() 408 | * 409 | * Desc: Sets options for the multi handle. 410 | * 411 | * Returns: CURLM error code. 412 | */ 413 | CURL_EXTERN CURLMcode curl_multi_setopt(CURLM *multi_handle, 414 | CURLMoption option, ...); 415 | 416 | 417 | /* 418 | * Name: curl_multi_assign() 419 | * 420 | * Desc: This function sets an association in the multi handle between the 421 | * given socket and a private pointer of the application. This is 422 | * (only) useful for curl_multi_socket uses. 423 | * 424 | * Returns: CURLM error code. 425 | */ 426 | CURL_EXTERN CURLMcode curl_multi_assign(CURLM *multi_handle, 427 | curl_socket_t sockfd, void *sockp); 428 | 429 | 430 | /* 431 | * Name: curl_push_callback 432 | * 433 | * Desc: This callback gets called when a new stream is being pushed by the 434 | * server. It approves or denies the new stream. 435 | * 436 | * Returns: CURL_PUSH_OK or CURL_PUSH_DENY. 437 | */ 438 | #define CURL_PUSH_OK 0 439 | #define CURL_PUSH_DENY 1 440 | 441 | struct curl_pushheaders; /* forward declaration only */ 442 | 443 | CURL_EXTERN char *curl_pushheader_bynum(struct curl_pushheaders *h, 444 | size_t num); 445 | CURL_EXTERN char *curl_pushheader_byname(struct curl_pushheaders *h, 446 | const char *name); 447 | 448 | typedef int (*curl_push_callback)(CURL *parent, 449 | CURL *easy, 450 | size_t num_headers, 451 | struct curl_pushheaders *headers, 452 | void *userp); 453 | 454 | /* value for MAXIMUM CONCURRENT STREAMS upper limit */ 455 | #define INITIAL_MAX_CONCURRENT_STREAMS ((1U << 31) - 1) 456 | 457 | #ifdef __cplusplus 458 | } /* end of extern "C" */ 459 | #endif 460 | 461 | #endif 462 | -------------------------------------------------------------------------------- /installer/bloxshade/src/App.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react'; 2 | import { open } from '@tauri-apps/api/shell'; 3 | import { fs } from '@tauri-apps/api'; 4 | import { invoke } from '@tauri-apps/api/tauri'; 5 | import './script.js'; 6 | 7 | interface Preset { 8 | title: string; 9 | description: string; 10 | author: string; 11 | source: string; 12 | } 13 | 14 | function App() { 15 | const [presets, setPresets] = useState([]); 16 | 17 | useEffect(() => { 18 | fetchPresets(); 19 | }, []); 20 | 21 | const fetchPresets = async () => { 22 | try { 23 | const response = await fetch('https://extravi.dev/update/presets.json'); 24 | const data = await response.json(); 25 | setPresets(data.presets); 26 | } catch (error) { 27 | console.error('Error fetching presets:', error); 28 | } 29 | }; 30 | 31 | const openLink = async (url: string) => { 32 | try { 33 | await open(url); 34 | console.log('Link opened successfully'); 35 | } catch (error) { 36 | console.error('Error opening link:', error); 37 | } 38 | }; 39 | 40 | function checkCheckboxStatus(): void { 41 | const checkboxes = ["box-0", "box-1", "box-2", "box-3"]; 42 | const links = [ 43 | 'https://www.youtube.com/channel/UCOZnRzWstxDLyW30TjWEevQ?sub_confirmation=1', 44 | 'https://discord.gg/TNG5yHsEwu', 45 | 'https://www.roblox.com/groups/34468021/Bloxshade-Community', 46 | 'https://extravi.dev/' 47 | ]; 48 | 49 | checkboxes.forEach((box, index) => { 50 | const checkbox = document.getElementById(box) as HTMLInputElement; 51 | if (checkbox.checked) { 52 | openLink(links[index]); 53 | } 54 | }); 55 | // close installer 56 | window.close(); 57 | } 58 | 59 | async function createBloxshadeFolder() { 60 | const bloxshadeFolderPath = 'C:\\Program Files\\Bloxshade'; 61 | const installLogPath = `${bloxshadeFolderPath}\\install.txt`; // install log path 62 | 63 | try { 64 | await fs.writeFile(installLogPath, ''); // create install log file 65 | 66 | // start installer 67 | invoke('cmd', { executable_path: `${bloxshadeFolderPath}\\installer.exe`, arguments: '' }); 68 | 69 | let lastReadPosition = 0; 70 | 71 | while (true) { 72 | const fileContent = await fs.readTextFile(installLogPath); 73 | 74 | const newContent = fileContent.substring(lastReadPosition); 75 | const lines = newContent.split('\n'); 76 | 77 | let newText = ''; 78 | 79 | for (const line of lines) { 80 | if (line.trim() !== '') { 81 | newText += `${line.trim()}
`; 82 | } 83 | 84 | if (line.trim() === '0') { 85 | console.log('0'); 86 | 87 | // done installing go to last page 88 | const element1: HTMLElement | null = document.getElementById("con-1"); 89 | const element2: HTMLElement | null = document.getElementById("con-4"); 90 | 91 | if (element1 && element2) { 92 | element1.classList.remove("show"); 93 | element1.classList.add("hide"); 94 | 95 | element2.classList.remove("hide"); 96 | element2.classList.add("show"); 97 | } else { 98 | console.error("One or both elements not found."); 99 | } 100 | 101 | return; // exit loop 102 | } 103 | } 104 | 105 | // scroll down the textbox 106 | const textbox: HTMLElement | null = document.getElementById('textbox'); 107 | 108 | function scrollTextbox(): void { 109 | if (textbox) { 110 | textbox.scrollTop = textbox.scrollHeight; 111 | } 112 | } 113 | 114 | // update textbox 115 | const textBox = document.querySelector('.textbox p'); 116 | if (textBox) { 117 | textBox.innerHTML += newText; 118 | scrollTextbox(); 119 | } 120 | 121 | lastReadPosition = fileContent.length; 122 | 123 | await new Promise(resolve => setTimeout(resolve, 50)); // wait 124 | } 125 | 126 | } catch (error) { 127 | console.error('Error creating Bloxshade folder:', error); 128 | } 129 | } 130 | 131 | async function createBloxshadeNVFolder() { 132 | const bloxshadeFolderPath = 'C:\\Program Files\\Bloxshade'; 133 | const installLogPath = `${bloxshadeFolderPath}\\install.txt`; // install log path 134 | 135 | try { 136 | await fs.writeFile(installLogPath, ''); // create install log file 137 | 138 | // start installer 139 | invoke('cmd', { executable_path: `${bloxshadeFolderPath}\\installer.exe`, arguments: '-nv' }); 140 | 141 | let lastReadPosition = 0; 142 | 143 | while (true) { 144 | const fileContent = await fs.readTextFile(installLogPath); 145 | 146 | const newContent = fileContent.substring(lastReadPosition); 147 | const lines = newContent.split('\n'); 148 | 149 | let newText = ''; 150 | 151 | for (const line of lines) { 152 | if (line.trim() !== '') { 153 | newText += `${line.trim()}
`; 154 | } 155 | 156 | if (line.trim() === '0') { 157 | console.log('0'); 158 | 159 | // done installing go to last page 160 | const element1: HTMLElement | null = document.getElementById("con-6"); 161 | const element2: HTMLElement | null = document.getElementById("con-0"); 162 | 163 | if (element1 && element2) { 164 | element1.classList.remove("show"); 165 | element1.classList.add("hide"); 166 | 167 | element2.classList.remove("hide"); 168 | element2.classList.add("show"); 169 | } else { 170 | console.error("One or both elements not found."); 171 | } 172 | 173 | return; // exit loop 174 | } 175 | } 176 | 177 | // scroll down the textbox 178 | const textbox: HTMLElement | null = document.getElementById('textbox-2'); 179 | 180 | function scrollTextbox(): void { 181 | if (textbox) { 182 | textbox.scrollTop = textbox.scrollHeight; 183 | } 184 | } 185 | 186 | // update textbox 187 | const textBox = document.querySelector('.textbox-2 p'); 188 | if (textBox) { 189 | textBox.innerHTML += newText; 190 | scrollTextbox(); 191 | } 192 | 193 | lastReadPosition = fileContent.length; 194 | 195 | await new Promise(resolve => setTimeout(resolve, 50)); // wait 196 | } 197 | 198 | } catch (error) { 199 | console.error('Error creating Bloxshade folder:', error); 200 | } 201 | } 202 | 203 | async function shortcut() { 204 | const bloxshadeFolderPath = 'C:\\Program Files\\Bloxshade'; 205 | const installLogPath = `${bloxshadeFolderPath}\\install.txt`; // install log path 206 | 207 | try { 208 | await fs.writeFile(installLogPath, ''); // create install log file 209 | 210 | // start installer 211 | invoke('cmd', { executable_path: `${bloxshadeFolderPath}\\installer.exe`, arguments: '-shortcut' }); 212 | } catch (error) { 213 | console.error(error); 214 | } 215 | } 216 | 217 | async function importPreset() { 218 | const bloxshadeFolderPath = 'C:\\Program Files\\Bloxshade'; 219 | const installLogPath = `${bloxshadeFolderPath}\\install.txt`; // install log path 220 | 221 | try { 222 | await fs.writeFile(installLogPath, ''); // create install log file 223 | 224 | // start installer 225 | invoke('cmd', { executable_path: `${bloxshadeFolderPath}\\installer.exe`, arguments: '-import' }); 226 | } catch (error) { 227 | console.error(error); 228 | } 229 | } 230 | 231 | async function fix() { 232 | const bloxshadeFolderPath = 'C:\\Program Files\\Bloxshade'; 233 | const installLogPath = `${bloxshadeFolderPath}\\install.txt`; // install log path 234 | 235 | try { 236 | await fs.writeFile(installLogPath, ''); // create install log file 237 | 238 | // start installer 239 | invoke('cmd', { executable_path: `${bloxshadeFolderPath}\\installer.exe`, arguments: '-fix' }); 240 | } catch (error) { 241 | console.error(error); 242 | } 243 | } 244 | 245 | const userPreset = async (source: string) => { 246 | const bloxshadeFolderPath = 'C:\\Program Files\\Bloxshade'; 247 | try { 248 | console.log(source); 249 | // todo 250 | invoke('cmd', { executable_path: `${bloxshadeFolderPath}\\installer.exe`, arguments: `-install "${source}"` }); 251 | } catch (error) { 252 | console.error(error); 253 | } 254 | }; 255 | 256 | return ( 257 | <> 258 |
259 | {/* content 0 */} 260 |
261 |

Bloxshade - Improve Roblox

with shaders.

262 |

This installer will set up and configure ReShade 263 | FX shaders tailored for Nvidia Ansel on 264 | your computer. 265 |

266 |

267 | Before continuing, ensure that Roblox is closed. 268 | If Roblox is open, the installer will terminate 269 | the process before it begins. 270 |

271 |

272 | There may be issues with the setup. 273 | If that's the case, it's recommended that you ask 274 | your questions in Bloxshade's Discord server. 275 |

276 |

277 | Click Install to continue. 278 |

279 | Settings 280 | Acknowledgements 281 | 282 |
283 | {/* content 1 */} 284 |
285 |

Bloxshade - Improve Roblox

with shaders.

286 |

Installing...

287 |

Please wait while Bloxshade is being installed.

288 |
289 |

290 |
291 | 292 |
293 | {/* content 2 */} 294 |
295 |

Bloxshade - Improve Roblox

with shaders.

296 |

Setup has finished installing Bloxshade on your 297 | computer. The effects will be applied the next 298 | time you launch Roblox. 299 |

300 |

301 | Click Finish to exit Setup. 302 |

303 |
304 | 308 |
309 |
310 | 314 |
315 |
316 | 320 |
321 |
322 | 326 |
327 | 328 |
329 | {/* content 3 */} 330 |
331 |

Bloxshade - Improve Roblox

with shaders.

332 |

If you have already installed Bloxshade, you can manage Roblox from here or configure your installation.

333 | 334 |

Bloxshade FX issues (menu/effects not working).

335 | 336 |

Install your own Ansel presets.

337 | 338 | openLink('https://discord.com/invite/TNG5yHsEwu')}>Discord 339 | Patch Nvidia App 340 | Back 341 |
342 | {/* content 4 */} 343 |
344 |

Community presets

345 |

Download and install community presets

346 |
347 | {presets.map((preset, index) => ( 348 |
349 |
350 |

{preset.title}

351 |

{preset.description}

352 |

Author: {preset.author} userPreset(preset.source)}>Install

353 |
354 |
355 | ))} 356 |
357 | 358 |
359 | {/* content 5 */} 360 |
361 |

Acknowledgements

362 |

Open source repositories Bloxshade uses

363 |
364 |
365 |
366 |

dh-reshade-shaders

367 |

Author: AlucardDH openLink('https://github.com/AlucardDH')}>Visit

368 |
369 |
370 |
371 |
372 |

AstrayFX

373 |

Author: BlueSkyDefender openLink('https://github.com/BlueSkyDefender')}>Visit

374 |
375 |
376 |
377 |
378 |

SweetFX

379 |

Author: CeeJayDK openLink('https://github.com/CeeJayDK')}>Visit

380 |
381 |
382 |
383 |
384 |

Bloxshade

385 |

Author: Extravi openLink('https://extravi.dev/')}>Visit

386 |
387 |
388 |
389 |
390 |

fubax-shaders

391 |

Author: Fubaxiusz openLink('https://github.com/Fubaxiusz')}>Visit

392 |
393 |
394 |
395 |
396 |

reshade-shaders

397 |

Author: crosire openLink('https://github.com/crosire')}>Visit

398 |
399 |
400 |
401 |
402 |

FXShaders

403 |

Author: luluco250 openLink('https://github.com/luluco250')}>Visit

404 |
405 |
406 |
407 |
408 |

qUINT

409 |

Author: martymcmodding openLink('https://github.com/martymcmodding')}>Visit

410 |
411 |
412 |
413 |
414 |

NiceGuy-Shaders

415 |

Author: mj-ehsan openLink('https://github.com/mj-ehsan')}>Visit

416 |
417 |
418 |
419 |
420 |

ZealShaders

421 |

Author: bituq openLink('https://github.com/bituq')}>Visit

422 |
423 |
424 |
425 |
426 |

cMotionBlur

427 |

Author: papadanku openLink('https://github.com/papadanku')}>Visit

428 |
429 |
430 |
431 |
432 |

prod80-ReShade-Repository

433 |

Author: prod80 openLink('https://github.com/prod80')}>Visit

434 |
435 |
436 |
437 |
438 |

Glamarye_Fast_Effects_for_ReShade

439 |

Author: rj200 openLink('https://github.com/rj200')}>Visit

440 |
441 |
442 |
443 | Back 444 |
445 | {/* content 6 */} 446 |
447 |

Bloxshade - Improve Roblox

with shaders.

448 |

Patching the Nvidia App...

449 |

Please wait while Bloxshade is working.

450 |
451 |

452 |
453 | 454 |
455 | 456 | ) 457 | } 458 | 459 | export default App 460 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/system.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_SYSTEM_H 2 | #define CURLINC_SYSTEM_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* 26 | * Try to keep one section per platform, compiler and architecture, otherwise, 27 | * if an existing section is reused for a different one and later on the 28 | * original is adjusted, probably the piggybacking one can be adversely 29 | * changed. 30 | * 31 | * In order to differentiate between platforms/compilers/architectures use 32 | * only compiler built in predefined preprocessor symbols. 33 | * 34 | * curl_off_t 35 | * ---------- 36 | * 37 | * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit 38 | * wide signed integral data type. The width of this data type must remain 39 | * constant and independent of any possible large file support settings. 40 | * 41 | * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit 42 | * wide signed integral data type if there is no 64-bit type. 43 | * 44 | * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall 45 | * only be violated if off_t is the only 64-bit data type available and the 46 | * size of off_t is independent of large file support settings. Keep your 47 | * build on the safe side avoiding an off_t gating. If you have a 64-bit 48 | * off_t then take for sure that another 64-bit data type exists, dig deeper 49 | * and you will find it. 50 | * 51 | */ 52 | 53 | #if defined(__DJGPP__) || defined(__GO32__) 54 | # if defined(__DJGPP__) && (__DJGPP__ > 1) 55 | # define CURL_TYPEOF_CURL_OFF_T long long 56 | # define CURL_FORMAT_CURL_OFF_T "lld" 57 | # define CURL_FORMAT_CURL_OFF_TU "llu" 58 | # define CURL_SUFFIX_CURL_OFF_T LL 59 | # define CURL_SUFFIX_CURL_OFF_TU ULL 60 | # else 61 | # define CURL_TYPEOF_CURL_OFF_T long 62 | # define CURL_FORMAT_CURL_OFF_T "ld" 63 | # define CURL_FORMAT_CURL_OFF_TU "lu" 64 | # define CURL_SUFFIX_CURL_OFF_T L 65 | # define CURL_SUFFIX_CURL_OFF_TU UL 66 | # endif 67 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 68 | 69 | #elif defined(__SALFORDC__) 70 | # define CURL_TYPEOF_CURL_OFF_T long 71 | # define CURL_FORMAT_CURL_OFF_T "ld" 72 | # define CURL_FORMAT_CURL_OFF_TU "lu" 73 | # define CURL_SUFFIX_CURL_OFF_T L 74 | # define CURL_SUFFIX_CURL_OFF_TU UL 75 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 76 | 77 | #elif defined(__BORLANDC__) 78 | # if (__BORLANDC__ < 0x520) 79 | # define CURL_TYPEOF_CURL_OFF_T long 80 | # define CURL_FORMAT_CURL_OFF_T "ld" 81 | # define CURL_FORMAT_CURL_OFF_TU "lu" 82 | # define CURL_SUFFIX_CURL_OFF_T L 83 | # define CURL_SUFFIX_CURL_OFF_TU UL 84 | # else 85 | # define CURL_TYPEOF_CURL_OFF_T __int64 86 | # define CURL_FORMAT_CURL_OFF_T "I64d" 87 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 88 | # define CURL_SUFFIX_CURL_OFF_T i64 89 | # define CURL_SUFFIX_CURL_OFF_TU ui64 90 | # endif 91 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 92 | 93 | #elif defined(__TURBOC__) 94 | # define CURL_TYPEOF_CURL_OFF_T long 95 | # define CURL_FORMAT_CURL_OFF_T "ld" 96 | # define CURL_FORMAT_CURL_OFF_TU "lu" 97 | # define CURL_SUFFIX_CURL_OFF_T L 98 | # define CURL_SUFFIX_CURL_OFF_TU UL 99 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 100 | 101 | #elif defined(__WATCOMC__) 102 | # if defined(__386__) 103 | # define CURL_TYPEOF_CURL_OFF_T __int64 104 | # define CURL_FORMAT_CURL_OFF_T "I64d" 105 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 106 | # define CURL_SUFFIX_CURL_OFF_T i64 107 | # define CURL_SUFFIX_CURL_OFF_TU ui64 108 | # else 109 | # define CURL_TYPEOF_CURL_OFF_T long 110 | # define CURL_FORMAT_CURL_OFF_T "ld" 111 | # define CURL_FORMAT_CURL_OFF_TU "lu" 112 | # define CURL_SUFFIX_CURL_OFF_T L 113 | # define CURL_SUFFIX_CURL_OFF_TU UL 114 | # endif 115 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 116 | 117 | #elif defined(__POCC__) 118 | # if (__POCC__ < 280) 119 | # define CURL_TYPEOF_CURL_OFF_T long 120 | # define CURL_FORMAT_CURL_OFF_T "ld" 121 | # define CURL_FORMAT_CURL_OFF_TU "lu" 122 | # define CURL_SUFFIX_CURL_OFF_T L 123 | # define CURL_SUFFIX_CURL_OFF_TU UL 124 | # elif defined(_MSC_VER) 125 | # define CURL_TYPEOF_CURL_OFF_T __int64 126 | # define CURL_FORMAT_CURL_OFF_T "I64d" 127 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 128 | # define CURL_SUFFIX_CURL_OFF_T i64 129 | # define CURL_SUFFIX_CURL_OFF_TU ui64 130 | # else 131 | # define CURL_TYPEOF_CURL_OFF_T long long 132 | # define CURL_FORMAT_CURL_OFF_T "lld" 133 | # define CURL_FORMAT_CURL_OFF_TU "llu" 134 | # define CURL_SUFFIX_CURL_OFF_T LL 135 | # define CURL_SUFFIX_CURL_OFF_TU ULL 136 | # endif 137 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 138 | 139 | #elif defined(__LCC__) 140 | # define CURL_TYPEOF_CURL_OFF_T long 141 | # define CURL_FORMAT_CURL_OFF_T "ld" 142 | # define CURL_FORMAT_CURL_OFF_TU "lu" 143 | # define CURL_SUFFIX_CURL_OFF_T L 144 | # define CURL_SUFFIX_CURL_OFF_TU UL 145 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 146 | 147 | #elif defined(__SYMBIAN32__) 148 | # if defined(__EABI__) /* Treat all ARM compilers equally */ 149 | # define CURL_TYPEOF_CURL_OFF_T long long 150 | # define CURL_FORMAT_CURL_OFF_T "lld" 151 | # define CURL_FORMAT_CURL_OFF_TU "llu" 152 | # define CURL_SUFFIX_CURL_OFF_T LL 153 | # define CURL_SUFFIX_CURL_OFF_TU ULL 154 | # elif defined(__CW32__) 155 | # pragma longlong on 156 | # define CURL_TYPEOF_CURL_OFF_T long long 157 | # define CURL_FORMAT_CURL_OFF_T "lld" 158 | # define CURL_FORMAT_CURL_OFF_TU "llu" 159 | # define CURL_SUFFIX_CURL_OFF_T LL 160 | # define CURL_SUFFIX_CURL_OFF_TU ULL 161 | # elif defined(__VC32__) 162 | # define CURL_TYPEOF_CURL_OFF_T __int64 163 | # define CURL_FORMAT_CURL_OFF_T "lld" 164 | # define CURL_FORMAT_CURL_OFF_TU "llu" 165 | # define CURL_SUFFIX_CURL_OFF_T LL 166 | # define CURL_SUFFIX_CURL_OFF_TU ULL 167 | # endif 168 | # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int 169 | 170 | #elif defined(__MWERKS__) 171 | # define CURL_TYPEOF_CURL_OFF_T long long 172 | # define CURL_FORMAT_CURL_OFF_T "lld" 173 | # define CURL_FORMAT_CURL_OFF_TU "llu" 174 | # define CURL_SUFFIX_CURL_OFF_T LL 175 | # define CURL_SUFFIX_CURL_OFF_TU ULL 176 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 177 | 178 | #elif defined(_WIN32_WCE) 179 | # define CURL_TYPEOF_CURL_OFF_T __int64 180 | # define CURL_FORMAT_CURL_OFF_T "I64d" 181 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 182 | # define CURL_SUFFIX_CURL_OFF_T i64 183 | # define CURL_SUFFIX_CURL_OFF_TU ui64 184 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 185 | 186 | #elif defined(__MINGW32__) 187 | # define CURL_TYPEOF_CURL_OFF_T long long 188 | # define CURL_FORMAT_CURL_OFF_T "I64d" 189 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 190 | # define CURL_SUFFIX_CURL_OFF_T LL 191 | # define CURL_SUFFIX_CURL_OFF_TU ULL 192 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 193 | # define CURL_PULL_SYS_TYPES_H 1 194 | # define CURL_PULL_WS2TCPIP_H 1 195 | 196 | #elif defined(__VMS) 197 | # if defined(__VAX) 198 | # define CURL_TYPEOF_CURL_OFF_T long 199 | # define CURL_FORMAT_CURL_OFF_T "ld" 200 | # define CURL_FORMAT_CURL_OFF_TU "lu" 201 | # define CURL_SUFFIX_CURL_OFF_T L 202 | # define CURL_SUFFIX_CURL_OFF_TU UL 203 | # else 204 | # define CURL_TYPEOF_CURL_OFF_T long long 205 | # define CURL_FORMAT_CURL_OFF_T "lld" 206 | # define CURL_FORMAT_CURL_OFF_TU "llu" 207 | # define CURL_SUFFIX_CURL_OFF_T LL 208 | # define CURL_SUFFIX_CURL_OFF_TU ULL 209 | # endif 210 | # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int 211 | 212 | #elif defined(__OS400__) 213 | # if defined(__ILEC400__) 214 | # define CURL_TYPEOF_CURL_OFF_T long long 215 | # define CURL_FORMAT_CURL_OFF_T "lld" 216 | # define CURL_FORMAT_CURL_OFF_TU "llu" 217 | # define CURL_SUFFIX_CURL_OFF_T LL 218 | # define CURL_SUFFIX_CURL_OFF_TU ULL 219 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 220 | # define CURL_PULL_SYS_TYPES_H 1 221 | # define CURL_PULL_SYS_SOCKET_H 1 222 | # endif 223 | 224 | #elif defined(__MVS__) 225 | # if defined(__IBMC__) || defined(__IBMCPP__) 226 | # if defined(_ILP32) 227 | # elif defined(_LP64) 228 | # endif 229 | # if defined(_LONG_LONG) 230 | # define CURL_TYPEOF_CURL_OFF_T long long 231 | # define CURL_FORMAT_CURL_OFF_T "lld" 232 | # define CURL_FORMAT_CURL_OFF_TU "llu" 233 | # define CURL_SUFFIX_CURL_OFF_T LL 234 | # define CURL_SUFFIX_CURL_OFF_TU ULL 235 | # elif defined(_LP64) 236 | # define CURL_TYPEOF_CURL_OFF_T long 237 | # define CURL_FORMAT_CURL_OFF_T "ld" 238 | # define CURL_FORMAT_CURL_OFF_TU "lu" 239 | # define CURL_SUFFIX_CURL_OFF_T L 240 | # define CURL_SUFFIX_CURL_OFF_TU UL 241 | # else 242 | # define CURL_TYPEOF_CURL_OFF_T long 243 | # define CURL_FORMAT_CURL_OFF_T "ld" 244 | # define CURL_FORMAT_CURL_OFF_TU "lu" 245 | # define CURL_SUFFIX_CURL_OFF_T L 246 | # define CURL_SUFFIX_CURL_OFF_TU UL 247 | # endif 248 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 249 | # define CURL_PULL_SYS_TYPES_H 1 250 | # define CURL_PULL_SYS_SOCKET_H 1 251 | # endif 252 | 253 | #elif defined(__370__) 254 | # if defined(__IBMC__) || defined(__IBMCPP__) 255 | # if defined(_ILP32) 256 | # elif defined(_LP64) 257 | # endif 258 | # if defined(_LONG_LONG) 259 | # define CURL_TYPEOF_CURL_OFF_T long long 260 | # define CURL_FORMAT_CURL_OFF_T "lld" 261 | # define CURL_FORMAT_CURL_OFF_TU "llu" 262 | # define CURL_SUFFIX_CURL_OFF_T LL 263 | # define CURL_SUFFIX_CURL_OFF_TU ULL 264 | # elif defined(_LP64) 265 | # define CURL_TYPEOF_CURL_OFF_T long 266 | # define CURL_FORMAT_CURL_OFF_T "ld" 267 | # define CURL_FORMAT_CURL_OFF_TU "lu" 268 | # define CURL_SUFFIX_CURL_OFF_T L 269 | # define CURL_SUFFIX_CURL_OFF_TU UL 270 | # else 271 | # define CURL_TYPEOF_CURL_OFF_T long 272 | # define CURL_FORMAT_CURL_OFF_T "ld" 273 | # define CURL_FORMAT_CURL_OFF_TU "lu" 274 | # define CURL_SUFFIX_CURL_OFF_T L 275 | # define CURL_SUFFIX_CURL_OFF_TU UL 276 | # endif 277 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 278 | # define CURL_PULL_SYS_TYPES_H 1 279 | # define CURL_PULL_SYS_SOCKET_H 1 280 | # endif 281 | 282 | #elif defined(TPF) 283 | # define CURL_TYPEOF_CURL_OFF_T long 284 | # define CURL_FORMAT_CURL_OFF_T "ld" 285 | # define CURL_FORMAT_CURL_OFF_TU "lu" 286 | # define CURL_SUFFIX_CURL_OFF_T L 287 | # define CURL_SUFFIX_CURL_OFF_TU UL 288 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 289 | 290 | #elif defined(__TINYC__) /* also known as tcc */ 291 | 292 | # define CURL_TYPEOF_CURL_OFF_T long long 293 | # define CURL_FORMAT_CURL_OFF_T "lld" 294 | # define CURL_FORMAT_CURL_OFF_TU "llu" 295 | # define CURL_SUFFIX_CURL_OFF_T LL 296 | # define CURL_SUFFIX_CURL_OFF_TU ULL 297 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 298 | # define CURL_PULL_SYS_TYPES_H 1 299 | # define CURL_PULL_SYS_SOCKET_H 1 300 | 301 | #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Oracle Solaris Studio */ 302 | # if !defined(__LP64) && (defined(__ILP32) || \ 303 | defined(__i386) || \ 304 | defined(__sparcv8) || \ 305 | defined(__sparcv8plus)) 306 | # define CURL_TYPEOF_CURL_OFF_T long long 307 | # define CURL_FORMAT_CURL_OFF_T "lld" 308 | # define CURL_FORMAT_CURL_OFF_TU "llu" 309 | # define CURL_SUFFIX_CURL_OFF_T LL 310 | # define CURL_SUFFIX_CURL_OFF_TU ULL 311 | # elif defined(__LP64) || \ 312 | defined(__amd64) || defined(__sparcv9) 313 | # define CURL_TYPEOF_CURL_OFF_T long 314 | # define CURL_FORMAT_CURL_OFF_T "ld" 315 | # define CURL_FORMAT_CURL_OFF_TU "lu" 316 | # define CURL_SUFFIX_CURL_OFF_T L 317 | # define CURL_SUFFIX_CURL_OFF_TU UL 318 | # endif 319 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 320 | # define CURL_PULL_SYS_TYPES_H 1 321 | # define CURL_PULL_SYS_SOCKET_H 1 322 | 323 | #elif defined(__xlc__) /* IBM xlc compiler */ 324 | # if !defined(_LP64) 325 | # define CURL_TYPEOF_CURL_OFF_T long long 326 | # define CURL_FORMAT_CURL_OFF_T "lld" 327 | # define CURL_FORMAT_CURL_OFF_TU "llu" 328 | # define CURL_SUFFIX_CURL_OFF_T LL 329 | # define CURL_SUFFIX_CURL_OFF_TU ULL 330 | # else 331 | # define CURL_TYPEOF_CURL_OFF_T long 332 | # define CURL_FORMAT_CURL_OFF_T "ld" 333 | # define CURL_FORMAT_CURL_OFF_TU "lu" 334 | # define CURL_SUFFIX_CURL_OFF_T L 335 | # define CURL_SUFFIX_CURL_OFF_TU UL 336 | # endif 337 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 338 | # define CURL_PULL_SYS_TYPES_H 1 339 | # define CURL_PULL_SYS_SOCKET_H 1 340 | 341 | /* ===================================== */ 342 | /* KEEP MSVC THE PENULTIMATE ENTRY */ 343 | /* ===================================== */ 344 | 345 | #elif defined(_MSC_VER) 346 | # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) 347 | # define CURL_TYPEOF_CURL_OFF_T __int64 348 | # define CURL_FORMAT_CURL_OFF_T "I64d" 349 | # define CURL_FORMAT_CURL_OFF_TU "I64u" 350 | # define CURL_SUFFIX_CURL_OFF_T i64 351 | # define CURL_SUFFIX_CURL_OFF_TU ui64 352 | # else 353 | # define CURL_TYPEOF_CURL_OFF_T long 354 | # define CURL_FORMAT_CURL_OFF_T "ld" 355 | # define CURL_FORMAT_CURL_OFF_TU "lu" 356 | # define CURL_SUFFIX_CURL_OFF_T L 357 | # define CURL_SUFFIX_CURL_OFF_TU UL 358 | # endif 359 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 360 | 361 | /* ===================================== */ 362 | /* KEEP GENERIC GCC THE LAST ENTRY */ 363 | /* ===================================== */ 364 | 365 | #elif defined(__GNUC__) && !defined(_SCO_DS) 366 | # if !defined(__LP64__) && \ 367 | (defined(__ILP32__) || defined(__i386__) || defined(__hppa__) || \ 368 | defined(__ppc__) || defined(__powerpc__) || defined(__arm__) || \ 369 | defined(__sparc__) || defined(__mips__) || defined(__sh__) || \ 370 | defined(__XTENSA__) || \ 371 | (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4) || \ 372 | (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L)) 373 | # define CURL_TYPEOF_CURL_OFF_T long long 374 | # define CURL_FORMAT_CURL_OFF_T "lld" 375 | # define CURL_FORMAT_CURL_OFF_TU "llu" 376 | # define CURL_SUFFIX_CURL_OFF_T LL 377 | # define CURL_SUFFIX_CURL_OFF_TU ULL 378 | # elif defined(__LP64__) || \ 379 | defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \ 380 | (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \ 381 | (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L) 382 | # define CURL_TYPEOF_CURL_OFF_T long 383 | # define CURL_FORMAT_CURL_OFF_T "ld" 384 | # define CURL_FORMAT_CURL_OFF_TU "lu" 385 | # define CURL_SUFFIX_CURL_OFF_T L 386 | # define CURL_SUFFIX_CURL_OFF_TU UL 387 | # endif 388 | # define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 389 | # define CURL_PULL_SYS_TYPES_H 1 390 | # define CURL_PULL_SYS_SOCKET_H 1 391 | 392 | #else 393 | /* generic "safe guess" on old 32 bit style */ 394 | # define CURL_TYPEOF_CURL_OFF_T long 395 | # define CURL_FORMAT_CURL_OFF_T "ld" 396 | # define CURL_FORMAT_CURL_OFF_TU "lu" 397 | # define CURL_SUFFIX_CURL_OFF_T L 398 | # define CURL_SUFFIX_CURL_OFF_TU UL 399 | # define CURL_TYPEOF_CURL_SOCKLEN_T int 400 | #endif 401 | 402 | #ifdef _AIX 403 | /* AIX needs */ 404 | #define CURL_PULL_SYS_POLL_H 405 | #endif 406 | 407 | 408 | /* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file */ 409 | /* ws2tcpip.h is required here to properly make type definitions below. */ 410 | #ifdef CURL_PULL_WS2TCPIP_H 411 | # include 412 | # include 413 | # include 414 | #endif 415 | 416 | /* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ 417 | /* sys/types.h is required here to properly make type definitions below. */ 418 | #ifdef CURL_PULL_SYS_TYPES_H 419 | # include 420 | #endif 421 | 422 | /* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ 423 | /* sys/socket.h is required here to properly make type definitions below. */ 424 | #ifdef CURL_PULL_SYS_SOCKET_H 425 | # include 426 | #endif 427 | 428 | /* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file */ 429 | /* sys/poll.h is required here to properly make type definitions below. */ 430 | #ifdef CURL_PULL_SYS_POLL_H 431 | # include 432 | #endif 433 | 434 | /* Data type definition of curl_socklen_t. */ 435 | #ifdef CURL_TYPEOF_CURL_SOCKLEN_T 436 | typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; 437 | #endif 438 | 439 | /* Data type definition of curl_off_t. */ 440 | 441 | #ifdef CURL_TYPEOF_CURL_OFF_T 442 | typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; 443 | #endif 444 | 445 | /* 446 | * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow 447 | * these to be visible and exported by the external libcurl interface API, 448 | * while also making them visible to the library internals, simply including 449 | * curl_setup.h, without actually needing to include curl.h internally. 450 | * If some day this section would grow big enough, all this should be moved 451 | * to its own header file. 452 | */ 453 | 454 | /* 455 | * Figure out if we can use the ## preprocessor operator, which is supported 456 | * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ 457 | * or __cplusplus so we need to carefully check for them too. 458 | */ 459 | 460 | #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ 461 | defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ 462 | defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ 463 | defined(__ILEC400__) 464 | /* This compiler is believed to have an ISO compatible preprocessor */ 465 | #define CURL_ISOCPP 466 | #else 467 | /* This compiler is believed NOT to have an ISO compatible preprocessor */ 468 | #undef CURL_ISOCPP 469 | #endif 470 | 471 | /* 472 | * Macros for minimum-width signed and unsigned curl_off_t integer constants. 473 | */ 474 | 475 | #if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) 476 | # define CURLINC_OFF_T_C_HLPR2(x) x 477 | # define CURLINC_OFF_T_C_HLPR1(x) CURLINC_OFF_T_C_HLPR2(x) 478 | # define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \ 479 | CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) 480 | # define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \ 481 | CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) 482 | #else 483 | # ifdef CURL_ISOCPP 484 | # define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix 485 | # else 486 | # define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix 487 | # endif 488 | # define CURLINC_OFF_T_C_HLPR1(Val,Suffix) CURLINC_OFF_T_C_HLPR2(Val,Suffix) 489 | # define CURL_OFF_T_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) 490 | # define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) 491 | #endif 492 | 493 | #endif /* CURLINC_SYSTEM_H */ 494 | -------------------------------------------------------------------------------- /bloxshade/installer/src/curl/typecheck-gcc.h: -------------------------------------------------------------------------------- 1 | #ifndef CURLINC_TYPECHECK_GCC_H 2 | #define CURLINC_TYPECHECK_GCC_H 3 | /*************************************************************************** 4 | * _ _ ____ _ 5 | * Project ___| | | | _ \| | 6 | * / __| | | | |_) | | 7 | * | (__| |_| | _ <| |___ 8 | * \___|\___/|_| \_\_____| 9 | * 10 | * Copyright (C) 1998 - 2019, Daniel Stenberg, , et al. 11 | * 12 | * This software is licensed as described in the file COPYING, which 13 | * you should have received as part of this distribution. The terms 14 | * are also available at https://curl.haxx.se/docs/copyright.html. 15 | * 16 | * You may opt to use, copy, modify, merge, publish, distribute and/or sell 17 | * copies of the Software, and permit persons to whom the Software is 18 | * furnished to do so, under the terms of the COPYING file. 19 | * 20 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 21 | * KIND, either express or implied. 22 | * 23 | ***************************************************************************/ 24 | 25 | /* wraps curl_easy_setopt() with typechecking */ 26 | 27 | /* To add a new kind of warning, add an 28 | * if(curlcheck_sometype_option(_curl_opt)) 29 | * if(!curlcheck_sometype(value)) 30 | * _curl_easy_setopt_err_sometype(); 31 | * block and define curlcheck_sometype_option, curlcheck_sometype and 32 | * _curl_easy_setopt_err_sometype below 33 | * 34 | * NOTE: We use two nested 'if' statements here instead of the && operator, in 35 | * order to work around gcc bug #32061. It affects only gcc 4.3.x/4.4.x 36 | * when compiling with -Wlogical-op. 37 | * 38 | * To add an option that uses the same type as an existing option, you'll just 39 | * need to extend the appropriate _curl_*_option macro 40 | */ 41 | #define curl_easy_setopt(handle, option, value) \ 42 | __extension__({ \ 43 | __typeof__(option) _curl_opt = option; \ 44 | if(__builtin_constant_p(_curl_opt)) { \ 45 | if(curlcheck_long_option(_curl_opt)) \ 46 | if(!curlcheck_long(value)) \ 47 | _curl_easy_setopt_err_long(); \ 48 | if(curlcheck_off_t_option(_curl_opt)) \ 49 | if(!curlcheck_off_t(value)) \ 50 | _curl_easy_setopt_err_curl_off_t(); \ 51 | if(curlcheck_string_option(_curl_opt)) \ 52 | if(!curlcheck_string(value)) \ 53 | _curl_easy_setopt_err_string(); \ 54 | if(curlcheck_write_cb_option(_curl_opt)) \ 55 | if(!curlcheck_write_cb(value)) \ 56 | _curl_easy_setopt_err_write_callback(); \ 57 | if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \ 58 | if(!curlcheck_resolver_start_callback(value)) \ 59 | _curl_easy_setopt_err_resolver_start_callback(); \ 60 | if((_curl_opt) == CURLOPT_READFUNCTION) \ 61 | if(!curlcheck_read_cb(value)) \ 62 | _curl_easy_setopt_err_read_cb(); \ 63 | if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ 64 | if(!curlcheck_ioctl_cb(value)) \ 65 | _curl_easy_setopt_err_ioctl_cb(); \ 66 | if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ 67 | if(!curlcheck_sockopt_cb(value)) \ 68 | _curl_easy_setopt_err_sockopt_cb(); \ 69 | if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ 70 | if(!curlcheck_opensocket_cb(value)) \ 71 | _curl_easy_setopt_err_opensocket_cb(); \ 72 | if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ 73 | if(!curlcheck_progress_cb(value)) \ 74 | _curl_easy_setopt_err_progress_cb(); \ 75 | if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ 76 | if(!curlcheck_debug_cb(value)) \ 77 | _curl_easy_setopt_err_debug_cb(); \ 78 | if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ 79 | if(!curlcheck_ssl_ctx_cb(value)) \ 80 | _curl_easy_setopt_err_ssl_ctx_cb(); \ 81 | if(curlcheck_conv_cb_option(_curl_opt)) \ 82 | if(!curlcheck_conv_cb(value)) \ 83 | _curl_easy_setopt_err_conv_cb(); \ 84 | if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ 85 | if(!curlcheck_seek_cb(value)) \ 86 | _curl_easy_setopt_err_seek_cb(); \ 87 | if(curlcheck_cb_data_option(_curl_opt)) \ 88 | if(!curlcheck_cb_data(value)) \ 89 | _curl_easy_setopt_err_cb_data(); \ 90 | if((_curl_opt) == CURLOPT_ERRORBUFFER) \ 91 | if(!curlcheck_error_buffer(value)) \ 92 | _curl_easy_setopt_err_error_buffer(); \ 93 | if((_curl_opt) == CURLOPT_STDERR) \ 94 | if(!curlcheck_FILE(value)) \ 95 | _curl_easy_setopt_err_FILE(); \ 96 | if(curlcheck_postfields_option(_curl_opt)) \ 97 | if(!curlcheck_postfields(value)) \ 98 | _curl_easy_setopt_err_postfields(); \ 99 | if((_curl_opt) == CURLOPT_HTTPPOST) \ 100 | if(!curlcheck_arr((value), struct curl_httppost)) \ 101 | _curl_easy_setopt_err_curl_httpost(); \ 102 | if((_curl_opt) == CURLOPT_MIMEPOST) \ 103 | if(!curlcheck_ptr((value), curl_mime)) \ 104 | _curl_easy_setopt_err_curl_mimepost(); \ 105 | if(curlcheck_slist_option(_curl_opt)) \ 106 | if(!curlcheck_arr((value), struct curl_slist)) \ 107 | _curl_easy_setopt_err_curl_slist(); \ 108 | if((_curl_opt) == CURLOPT_SHARE) \ 109 | if(!curlcheck_ptr((value), CURLSH)) \ 110 | _curl_easy_setopt_err_CURLSH(); \ 111 | } \ 112 | curl_easy_setopt(handle, _curl_opt, value); \ 113 | }) 114 | 115 | /* wraps curl_easy_getinfo() with typechecking */ 116 | #define curl_easy_getinfo(handle, info, arg) \ 117 | __extension__({ \ 118 | __typeof__(info) _curl_info = info; \ 119 | if(__builtin_constant_p(_curl_info)) { \ 120 | if(curlcheck_string_info(_curl_info)) \ 121 | if(!curlcheck_arr((arg), char *)) \ 122 | _curl_easy_getinfo_err_string(); \ 123 | if(curlcheck_long_info(_curl_info)) \ 124 | if(!curlcheck_arr((arg), long)) \ 125 | _curl_easy_getinfo_err_long(); \ 126 | if(curlcheck_double_info(_curl_info)) \ 127 | if(!curlcheck_arr((arg), double)) \ 128 | _curl_easy_getinfo_err_double(); \ 129 | if(curlcheck_slist_info(_curl_info)) \ 130 | if(!curlcheck_arr((arg), struct curl_slist *)) \ 131 | _curl_easy_getinfo_err_curl_slist(); \ 132 | if(curlcheck_tlssessioninfo_info(_curl_info)) \ 133 | if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \ 134 | _curl_easy_getinfo_err_curl_tlssesssioninfo(); \ 135 | if(curlcheck_certinfo_info(_curl_info)) \ 136 | if(!curlcheck_arr((arg), struct curl_certinfo *)) \ 137 | _curl_easy_getinfo_err_curl_certinfo(); \ 138 | if(curlcheck_socket_info(_curl_info)) \ 139 | if(!curlcheck_arr((arg), curl_socket_t)) \ 140 | _curl_easy_getinfo_err_curl_socket(); \ 141 | if(curlcheck_off_t_info(_curl_info)) \ 142 | if(!curlcheck_arr((arg), curl_off_t)) \ 143 | _curl_easy_getinfo_err_curl_off_t(); \ 144 | } \ 145 | curl_easy_getinfo(handle, _curl_info, arg); \ 146 | }) 147 | 148 | /* 149 | * For now, just make sure that the functions are called with three arguments 150 | */ 151 | #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) 152 | #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) 153 | 154 | 155 | /* the actual warnings, triggered by calling the _curl_easy_setopt_err* 156 | * functions */ 157 | 158 | /* To define a new warning, use _CURL_WARNING(identifier, "message") */ 159 | #define CURLWARNING(id, message) \ 160 | static void __attribute__((__warning__(message))) \ 161 | __attribute__((__unused__)) __attribute__((__noinline__)) \ 162 | id(void) { __asm__(""); } 163 | 164 | CURLWARNING(_curl_easy_setopt_err_long, 165 | "curl_easy_setopt expects a long argument for this option") 166 | CURLWARNING(_curl_easy_setopt_err_curl_off_t, 167 | "curl_easy_setopt expects a curl_off_t argument for this option") 168 | CURLWARNING(_curl_easy_setopt_err_string, 169 | "curl_easy_setopt expects a " 170 | "string ('char *' or char[]) argument for this option" 171 | ) 172 | CURLWARNING(_curl_easy_setopt_err_write_callback, 173 | "curl_easy_setopt expects a curl_write_callback argument for this option") 174 | CURLWARNING(_curl_easy_setopt_err_resolver_start_callback, 175 | "curl_easy_setopt expects a " 176 | "curl_resolver_start_callback argument for this option" 177 | ) 178 | CURLWARNING(_curl_easy_setopt_err_read_cb, 179 | "curl_easy_setopt expects a curl_read_callback argument for this option") 180 | CURLWARNING(_curl_easy_setopt_err_ioctl_cb, 181 | "curl_easy_setopt expects a curl_ioctl_callback argument for this option") 182 | CURLWARNING(_curl_easy_setopt_err_sockopt_cb, 183 | "curl_easy_setopt expects a curl_sockopt_callback argument for this option") 184 | CURLWARNING(_curl_easy_setopt_err_opensocket_cb, 185 | "curl_easy_setopt expects a " 186 | "curl_opensocket_callback argument for this option" 187 | ) 188 | CURLWARNING(_curl_easy_setopt_err_progress_cb, 189 | "curl_easy_setopt expects a curl_progress_callback argument for this option") 190 | CURLWARNING(_curl_easy_setopt_err_debug_cb, 191 | "curl_easy_setopt expects a curl_debug_callback argument for this option") 192 | CURLWARNING(_curl_easy_setopt_err_ssl_ctx_cb, 193 | "curl_easy_setopt expects a curl_ssl_ctx_callback argument for this option") 194 | CURLWARNING(_curl_easy_setopt_err_conv_cb, 195 | "curl_easy_setopt expects a curl_conv_callback argument for this option") 196 | CURLWARNING(_curl_easy_setopt_err_seek_cb, 197 | "curl_easy_setopt expects a curl_seek_callback argument for this option") 198 | CURLWARNING(_curl_easy_setopt_err_cb_data, 199 | "curl_easy_setopt expects a " 200 | "private data pointer as argument for this option") 201 | CURLWARNING(_curl_easy_setopt_err_error_buffer, 202 | "curl_easy_setopt expects a " 203 | "char buffer of CURL_ERROR_SIZE as argument for this option") 204 | CURLWARNING(_curl_easy_setopt_err_FILE, 205 | "curl_easy_setopt expects a 'FILE *' argument for this option") 206 | CURLWARNING(_curl_easy_setopt_err_postfields, 207 | "curl_easy_setopt expects a 'void *' or 'char *' argument for this option") 208 | CURLWARNING(_curl_easy_setopt_err_curl_httpost, 209 | "curl_easy_setopt expects a 'struct curl_httppost *' " 210 | "argument for this option") 211 | CURLWARNING(_curl_easy_setopt_err_curl_mimepost, 212 | "curl_easy_setopt expects a 'curl_mime *' " 213 | "argument for this option") 214 | CURLWARNING(_curl_easy_setopt_err_curl_slist, 215 | "curl_easy_setopt expects a 'struct curl_slist *' argument for this option") 216 | CURLWARNING(_curl_easy_setopt_err_CURLSH, 217 | "curl_easy_setopt expects a CURLSH* argument for this option") 218 | 219 | CURLWARNING(_curl_easy_getinfo_err_string, 220 | "curl_easy_getinfo expects a pointer to 'char *' for this info") 221 | CURLWARNING(_curl_easy_getinfo_err_long, 222 | "curl_easy_getinfo expects a pointer to long for this info") 223 | CURLWARNING(_curl_easy_getinfo_err_double, 224 | "curl_easy_getinfo expects a pointer to double for this info") 225 | CURLWARNING(_curl_easy_getinfo_err_curl_slist, 226 | "curl_easy_getinfo expects a pointer to 'struct curl_slist *' for this info") 227 | CURLWARNING(_curl_easy_getinfo_err_curl_tlssesssioninfo, 228 | "curl_easy_getinfo expects a pointer to " 229 | "'struct curl_tlssessioninfo *' for this info") 230 | CURLWARNING(_curl_easy_getinfo_err_curl_certinfo, 231 | "curl_easy_getinfo expects a pointer to " 232 | "'struct curl_certinfo *' for this info") 233 | CURLWARNING(_curl_easy_getinfo_err_curl_socket, 234 | "curl_easy_getinfo expects a pointer to curl_socket_t for this info") 235 | CURLWARNING(_curl_easy_getinfo_err_curl_off_t, 236 | "curl_easy_getinfo expects a pointer to curl_off_t for this info") 237 | 238 | /* groups of curl_easy_setops options that take the same type of argument */ 239 | 240 | /* To add a new option to one of the groups, just add 241 | * (option) == CURLOPT_SOMETHING 242 | * to the or-expression. If the option takes a long or curl_off_t, you don't 243 | * have to do anything 244 | */ 245 | 246 | /* evaluates to true if option takes a long argument */ 247 | #define curlcheck_long_option(option) \ 248 | (0 < (option) && (option) < CURLOPTTYPE_OBJECTPOINT) 249 | 250 | #define curlcheck_off_t_option(option) \ 251 | ((option) > CURLOPTTYPE_OFF_T) 252 | 253 | /* evaluates to true if option takes a char* argument */ 254 | #define curlcheck_string_option(option) \ 255 | ((option) == CURLOPT_ABSTRACT_UNIX_SOCKET || \ 256 | (option) == CURLOPT_ACCEPT_ENCODING || \ 257 | (option) == CURLOPT_ALTSVC || \ 258 | (option) == CURLOPT_CAINFO || \ 259 | (option) == CURLOPT_CAPATH || \ 260 | (option) == CURLOPT_COOKIE || \ 261 | (option) == CURLOPT_COOKIEFILE || \ 262 | (option) == CURLOPT_COOKIEJAR || \ 263 | (option) == CURLOPT_COOKIELIST || \ 264 | (option) == CURLOPT_CRLFILE || \ 265 | (option) == CURLOPT_CUSTOMREQUEST || \ 266 | (option) == CURLOPT_DEFAULT_PROTOCOL || \ 267 | (option) == CURLOPT_DNS_INTERFACE || \ 268 | (option) == CURLOPT_DNS_LOCAL_IP4 || \ 269 | (option) == CURLOPT_DNS_LOCAL_IP6 || \ 270 | (option) == CURLOPT_DNS_SERVERS || \ 271 | (option) == CURLOPT_DOH_URL || \ 272 | (option) == CURLOPT_EGDSOCKET || \ 273 | (option) == CURLOPT_FTPPORT || \ 274 | (option) == CURLOPT_FTP_ACCOUNT || \ 275 | (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ 276 | (option) == CURLOPT_INTERFACE || \ 277 | (option) == CURLOPT_ISSUERCERT || \ 278 | (option) == CURLOPT_KEYPASSWD || \ 279 | (option) == CURLOPT_KRBLEVEL || \ 280 | (option) == CURLOPT_LOGIN_OPTIONS || \ 281 | (option) == CURLOPT_MAIL_AUTH || \ 282 | (option) == CURLOPT_MAIL_FROM || \ 283 | (option) == CURLOPT_NETRC_FILE || \ 284 | (option) == CURLOPT_NOPROXY || \ 285 | (option) == CURLOPT_PASSWORD || \ 286 | (option) == CURLOPT_PINNEDPUBLICKEY || \ 287 | (option) == CURLOPT_PRE_PROXY || \ 288 | (option) == CURLOPT_PROXY || \ 289 | (option) == CURLOPT_PROXYPASSWORD || \ 290 | (option) == CURLOPT_PROXYUSERNAME || \ 291 | (option) == CURLOPT_PROXYUSERPWD || \ 292 | (option) == CURLOPT_PROXY_CAINFO || \ 293 | (option) == CURLOPT_PROXY_CAPATH || \ 294 | (option) == CURLOPT_PROXY_CRLFILE || \ 295 | (option) == CURLOPT_PROXY_KEYPASSWD || \ 296 | (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \ 297 | (option) == CURLOPT_PROXY_SERVICE_NAME || \ 298 | (option) == CURLOPT_PROXY_SSLCERT || \ 299 | (option) == CURLOPT_PROXY_SSLCERTTYPE || \ 300 | (option) == CURLOPT_PROXY_SSLKEY || \ 301 | (option) == CURLOPT_PROXY_SSLKEYTYPE || \ 302 | (option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \ 303 | (option) == CURLOPT_PROXY_TLS13_CIPHERS || \ 304 | (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \ 305 | (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \ 306 | (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \ 307 | (option) == CURLOPT_RANDOM_FILE || \ 308 | (option) == CURLOPT_RANGE || \ 309 | (option) == CURLOPT_REFERER || \ 310 | (option) == CURLOPT_REQUEST_TARGET || \ 311 | (option) == CURLOPT_RTSP_SESSION_ID || \ 312 | (option) == CURLOPT_RTSP_STREAM_URI || \ 313 | (option) == CURLOPT_RTSP_TRANSPORT || \ 314 | (option) == CURLOPT_SASL_AUTHZID || \ 315 | (option) == CURLOPT_SERVICE_NAME || \ 316 | (option) == CURLOPT_SOCKS5_GSSAPI_SERVICE || \ 317 | (option) == CURLOPT_SSH_HOST_PUBLIC_KEY_MD5 || \ 318 | (option) == CURLOPT_SSH_KNOWNHOSTS || \ 319 | (option) == CURLOPT_SSH_PRIVATE_KEYFILE || \ 320 | (option) == CURLOPT_SSH_PUBLIC_KEYFILE || \ 321 | (option) == CURLOPT_SSLCERT || \ 322 | (option) == CURLOPT_SSLCERTTYPE || \ 323 | (option) == CURLOPT_SSLENGINE || \ 324 | (option) == CURLOPT_SSLKEY || \ 325 | (option) == CURLOPT_SSLKEYTYPE || \ 326 | (option) == CURLOPT_SSL_CIPHER_LIST || \ 327 | (option) == CURLOPT_TLS13_CIPHERS || \ 328 | (option) == CURLOPT_TLSAUTH_PASSWORD || \ 329 | (option) == CURLOPT_TLSAUTH_TYPE || \ 330 | (option) == CURLOPT_TLSAUTH_USERNAME || \ 331 | (option) == CURLOPT_UNIX_SOCKET_PATH || \ 332 | (option) == CURLOPT_URL || \ 333 | (option) == CURLOPT_USERAGENT || \ 334 | (option) == CURLOPT_USERNAME || \ 335 | (option) == CURLOPT_USERPWD || \ 336 | (option) == CURLOPT_XOAUTH2_BEARER || \ 337 | 0) 338 | 339 | /* evaluates to true if option takes a curl_write_callback argument */ 340 | #define curlcheck_write_cb_option(option) \ 341 | ((option) == CURLOPT_HEADERFUNCTION || \ 342 | (option) == CURLOPT_WRITEFUNCTION) 343 | 344 | /* evaluates to true if option takes a curl_conv_callback argument */ 345 | #define curlcheck_conv_cb_option(option) \ 346 | ((option) == CURLOPT_CONV_TO_NETWORK_FUNCTION || \ 347 | (option) == CURLOPT_CONV_FROM_NETWORK_FUNCTION || \ 348 | (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION) 349 | 350 | /* evaluates to true if option takes a data argument to pass to a callback */ 351 | #define curlcheck_cb_data_option(option) \ 352 | ((option) == CURLOPT_CHUNK_DATA || \ 353 | (option) == CURLOPT_CLOSESOCKETDATA || \ 354 | (option) == CURLOPT_DEBUGDATA || \ 355 | (option) == CURLOPT_FNMATCH_DATA || \ 356 | (option) == CURLOPT_HEADERDATA || \ 357 | (option) == CURLOPT_INTERLEAVEDATA || \ 358 | (option) == CURLOPT_IOCTLDATA || \ 359 | (option) == CURLOPT_OPENSOCKETDATA || \ 360 | (option) == CURLOPT_PRIVATE || \ 361 | (option) == CURLOPT_PROGRESSDATA || \ 362 | (option) == CURLOPT_READDATA || \ 363 | (option) == CURLOPT_SEEKDATA || \ 364 | (option) == CURLOPT_SOCKOPTDATA || \ 365 | (option) == CURLOPT_SSH_KEYDATA || \ 366 | (option) == CURLOPT_SSL_CTX_DATA || \ 367 | (option) == CURLOPT_WRITEDATA || \ 368 | (option) == CURLOPT_RESOLVER_START_DATA || \ 369 | (option) == CURLOPT_TRAILERDATA || \ 370 | 0) 371 | 372 | /* evaluates to true if option takes a POST data argument (void* or char*) */ 373 | #define curlcheck_postfields_option(option) \ 374 | ((option) == CURLOPT_POSTFIELDS || \ 375 | (option) == CURLOPT_COPYPOSTFIELDS || \ 376 | 0) 377 | 378 | /* evaluates to true if option takes a struct curl_slist * argument */ 379 | #define curlcheck_slist_option(option) \ 380 | ((option) == CURLOPT_HTTP200ALIASES || \ 381 | (option) == CURLOPT_HTTPHEADER || \ 382 | (option) == CURLOPT_MAIL_RCPT || \ 383 | (option) == CURLOPT_POSTQUOTE || \ 384 | (option) == CURLOPT_PREQUOTE || \ 385 | (option) == CURLOPT_PROXYHEADER || \ 386 | (option) == CURLOPT_QUOTE || \ 387 | (option) == CURLOPT_RESOLVE || \ 388 | (option) == CURLOPT_TELNETOPTIONS || \ 389 | (option) == CURLOPT_CONNECT_TO || \ 390 | 0) 391 | 392 | /* groups of curl_easy_getinfo infos that take the same type of argument */ 393 | 394 | /* evaluates to true if info expects a pointer to char * argument */ 395 | #define curlcheck_string_info(info) \ 396 | (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG) 397 | 398 | /* evaluates to true if info expects a pointer to long argument */ 399 | #define curlcheck_long_info(info) \ 400 | (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE) 401 | 402 | /* evaluates to true if info expects a pointer to double argument */ 403 | #define curlcheck_double_info(info) \ 404 | (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST) 405 | 406 | /* true if info expects a pointer to struct curl_slist * argument */ 407 | #define curlcheck_slist_info(info) \ 408 | (((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST)) 409 | 410 | /* true if info expects a pointer to struct curl_tlssessioninfo * argument */ 411 | #define curlcheck_tlssessioninfo_info(info) \ 412 | (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION)) 413 | 414 | /* true if info expects a pointer to struct curl_certinfo * argument */ 415 | #define curlcheck_certinfo_info(info) ((info) == CURLINFO_CERTINFO) 416 | 417 | /* true if info expects a pointer to struct curl_socket_t argument */ 418 | #define curlcheck_socket_info(info) \ 419 | (CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T) 420 | 421 | /* true if info expects a pointer to curl_off_t argument */ 422 | #define curlcheck_off_t_info(info) \ 423 | (CURLINFO_OFF_T < (info)) 424 | 425 | 426 | /* typecheck helpers -- check whether given expression has requested type*/ 427 | 428 | /* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros, 429 | * otherwise define a new macro. Search for __builtin_types_compatible_p 430 | * in the GCC manual. 431 | * NOTE: these macros MUST NOT EVALUATE their arguments! The argument is 432 | * the actual expression passed to the curl_easy_setopt macro. This 433 | * means that you can only apply the sizeof and __typeof__ operators, no 434 | * == or whatsoever. 435 | */ 436 | 437 | /* XXX: should evaluate to true if expr is a pointer */ 438 | #define curlcheck_any_ptr(expr) \ 439 | (sizeof(expr) == sizeof(void *)) 440 | 441 | /* evaluates to true if expr is NULL */ 442 | /* XXX: must not evaluate expr, so this check is not accurate */ 443 | #define curlcheck_NULL(expr) \ 444 | (__builtin_types_compatible_p(__typeof__(expr), __typeof__(NULL))) 445 | 446 | /* evaluates to true if expr is type*, const type* or NULL */ 447 | #define curlcheck_ptr(expr, type) \ 448 | (curlcheck_NULL(expr) || \ 449 | __builtin_types_compatible_p(__typeof__(expr), type *) || \ 450 | __builtin_types_compatible_p(__typeof__(expr), const type *)) 451 | 452 | /* evaluates to true if expr is one of type[], type*, NULL or const type* */ 453 | #define curlcheck_arr(expr, type) \ 454 | (curlcheck_ptr((expr), type) || \ 455 | __builtin_types_compatible_p(__typeof__(expr), type [])) 456 | 457 | /* evaluates to true if expr is a string */ 458 | #define curlcheck_string(expr) \ 459 | (curlcheck_arr((expr), char) || \ 460 | curlcheck_arr((expr), signed char) || \ 461 | curlcheck_arr((expr), unsigned char)) 462 | 463 | /* evaluates to true if expr is a long (no matter the signedness) 464 | * XXX: for now, int is also accepted (and therefore short and char, which 465 | * are promoted to int when passed to a variadic function) */ 466 | #define curlcheck_long(expr) \ 467 | (__builtin_types_compatible_p(__typeof__(expr), long) || \ 468 | __builtin_types_compatible_p(__typeof__(expr), signed long) || \ 469 | __builtin_types_compatible_p(__typeof__(expr), unsigned long) || \ 470 | __builtin_types_compatible_p(__typeof__(expr), int) || \ 471 | __builtin_types_compatible_p(__typeof__(expr), signed int) || \ 472 | __builtin_types_compatible_p(__typeof__(expr), unsigned int) || \ 473 | __builtin_types_compatible_p(__typeof__(expr), short) || \ 474 | __builtin_types_compatible_p(__typeof__(expr), signed short) || \ 475 | __builtin_types_compatible_p(__typeof__(expr), unsigned short) || \ 476 | __builtin_types_compatible_p(__typeof__(expr), char) || \ 477 | __builtin_types_compatible_p(__typeof__(expr), signed char) || \ 478 | __builtin_types_compatible_p(__typeof__(expr), unsigned char)) 479 | 480 | /* evaluates to true if expr is of type curl_off_t */ 481 | #define curlcheck_off_t(expr) \ 482 | (__builtin_types_compatible_p(__typeof__(expr), curl_off_t)) 483 | 484 | /* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */ 485 | /* XXX: also check size of an char[] array? */ 486 | #define curlcheck_error_buffer(expr) \ 487 | (curlcheck_NULL(expr) || \ 488 | __builtin_types_compatible_p(__typeof__(expr), char *) || \ 489 | __builtin_types_compatible_p(__typeof__(expr), char[])) 490 | 491 | /* evaluates to true if expr is of type (const) void* or (const) FILE* */ 492 | #if 0 493 | #define curlcheck_cb_data(expr) \ 494 | (curlcheck_ptr((expr), void) || \ 495 | curlcheck_ptr((expr), FILE)) 496 | #else /* be less strict */ 497 | #define curlcheck_cb_data(expr) \ 498 | curlcheck_any_ptr(expr) 499 | #endif 500 | 501 | /* evaluates to true if expr is of type FILE* */ 502 | #define curlcheck_FILE(expr) \ 503 | (curlcheck_NULL(expr) || \ 504 | (__builtin_types_compatible_p(__typeof__(expr), FILE *))) 505 | 506 | /* evaluates to true if expr can be passed as POST data (void* or char*) */ 507 | #define curlcheck_postfields(expr) \ 508 | (curlcheck_ptr((expr), void) || \ 509 | curlcheck_arr((expr), char) || \ 510 | curlcheck_arr((expr), unsigned char)) 511 | 512 | /* helper: __builtin_types_compatible_p distinguishes between functions and 513 | * function pointers, hide it */ 514 | #define curlcheck_cb_compatible(func, type) \ 515 | (__builtin_types_compatible_p(__typeof__(func), type) || \ 516 | __builtin_types_compatible_p(__typeof__(func) *, type)) 517 | 518 | /* evaluates to true if expr is of type curl_resolver_start_callback */ 519 | #define curlcheck_resolver_start_callback(expr) \ 520 | (curlcheck_NULL(expr) || \ 521 | curlcheck_cb_compatible((expr), curl_resolver_start_callback)) 522 | 523 | /* evaluates to true if expr is of type curl_read_callback or "similar" */ 524 | #define curlcheck_read_cb(expr) \ 525 | (curlcheck_NULL(expr) || \ 526 | curlcheck_cb_compatible((expr), __typeof__(fread) *) || \ 527 | curlcheck_cb_compatible((expr), curl_read_callback) || \ 528 | curlcheck_cb_compatible((expr), _curl_read_callback1) || \ 529 | curlcheck_cb_compatible((expr), _curl_read_callback2) || \ 530 | curlcheck_cb_compatible((expr), _curl_read_callback3) || \ 531 | curlcheck_cb_compatible((expr), _curl_read_callback4) || \ 532 | curlcheck_cb_compatible((expr), _curl_read_callback5) || \ 533 | curlcheck_cb_compatible((expr), _curl_read_callback6)) 534 | typedef size_t (*_curl_read_callback1)(char *, size_t, size_t, void *); 535 | typedef size_t (*_curl_read_callback2)(char *, size_t, size_t, const void *); 536 | typedef size_t (*_curl_read_callback3)(char *, size_t, size_t, FILE *); 537 | typedef size_t (*_curl_read_callback4)(void *, size_t, size_t, void *); 538 | typedef size_t (*_curl_read_callback5)(void *, size_t, size_t, const void *); 539 | typedef size_t (*_curl_read_callback6)(void *, size_t, size_t, FILE *); 540 | 541 | /* evaluates to true if expr is of type curl_write_callback or "similar" */ 542 | #define curlcheck_write_cb(expr) \ 543 | (curlcheck_read_cb(expr) || \ 544 | curlcheck_cb_compatible((expr), __typeof__(fwrite) *) || \ 545 | curlcheck_cb_compatible((expr), curl_write_callback) || \ 546 | curlcheck_cb_compatible((expr), _curl_write_callback1) || \ 547 | curlcheck_cb_compatible((expr), _curl_write_callback2) || \ 548 | curlcheck_cb_compatible((expr), _curl_write_callback3) || \ 549 | curlcheck_cb_compatible((expr), _curl_write_callback4) || \ 550 | curlcheck_cb_compatible((expr), _curl_write_callback5) || \ 551 | curlcheck_cb_compatible((expr), _curl_write_callback6)) 552 | typedef size_t (*_curl_write_callback1)(const char *, size_t, size_t, void *); 553 | typedef size_t (*_curl_write_callback2)(const char *, size_t, size_t, 554 | const void *); 555 | typedef size_t (*_curl_write_callback3)(const char *, size_t, size_t, FILE *); 556 | typedef size_t (*_curl_write_callback4)(const void *, size_t, size_t, void *); 557 | typedef size_t (*_curl_write_callback5)(const void *, size_t, size_t, 558 | const void *); 559 | typedef size_t (*_curl_write_callback6)(const void *, size_t, size_t, FILE *); 560 | 561 | /* evaluates to true if expr is of type curl_ioctl_callback or "similar" */ 562 | #define curlcheck_ioctl_cb(expr) \ 563 | (curlcheck_NULL(expr) || \ 564 | curlcheck_cb_compatible((expr), curl_ioctl_callback) || \ 565 | curlcheck_cb_compatible((expr), _curl_ioctl_callback1) || \ 566 | curlcheck_cb_compatible((expr), _curl_ioctl_callback2) || \ 567 | curlcheck_cb_compatible((expr), _curl_ioctl_callback3) || \ 568 | curlcheck_cb_compatible((expr), _curl_ioctl_callback4)) 569 | typedef curlioerr (*_curl_ioctl_callback1)(CURL *, int, void *); 570 | typedef curlioerr (*_curl_ioctl_callback2)(CURL *, int, const void *); 571 | typedef curlioerr (*_curl_ioctl_callback3)(CURL *, curliocmd, void *); 572 | typedef curlioerr (*_curl_ioctl_callback4)(CURL *, curliocmd, const void *); 573 | 574 | /* evaluates to true if expr is of type curl_sockopt_callback or "similar" */ 575 | #define curlcheck_sockopt_cb(expr) \ 576 | (curlcheck_NULL(expr) || \ 577 | curlcheck_cb_compatible((expr), curl_sockopt_callback) || \ 578 | curlcheck_cb_compatible((expr), _curl_sockopt_callback1) || \ 579 | curlcheck_cb_compatible((expr), _curl_sockopt_callback2)) 580 | typedef int (*_curl_sockopt_callback1)(void *, curl_socket_t, curlsocktype); 581 | typedef int (*_curl_sockopt_callback2)(const void *, curl_socket_t, 582 | curlsocktype); 583 | 584 | /* evaluates to true if expr is of type curl_opensocket_callback or 585 | "similar" */ 586 | #define curlcheck_opensocket_cb(expr) \ 587 | (curlcheck_NULL(expr) || \ 588 | curlcheck_cb_compatible((expr), curl_opensocket_callback) || \ 589 | curlcheck_cb_compatible((expr), _curl_opensocket_callback1) || \ 590 | curlcheck_cb_compatible((expr), _curl_opensocket_callback2) || \ 591 | curlcheck_cb_compatible((expr), _curl_opensocket_callback3) || \ 592 | curlcheck_cb_compatible((expr), _curl_opensocket_callback4)) 593 | typedef curl_socket_t (*_curl_opensocket_callback1) 594 | (void *, curlsocktype, struct curl_sockaddr *); 595 | typedef curl_socket_t (*_curl_opensocket_callback2) 596 | (void *, curlsocktype, const struct curl_sockaddr *); 597 | typedef curl_socket_t (*_curl_opensocket_callback3) 598 | (const void *, curlsocktype, struct curl_sockaddr *); 599 | typedef curl_socket_t (*_curl_opensocket_callback4) 600 | (const void *, curlsocktype, const struct curl_sockaddr *); 601 | 602 | /* evaluates to true if expr is of type curl_progress_callback or "similar" */ 603 | #define curlcheck_progress_cb(expr) \ 604 | (curlcheck_NULL(expr) || \ 605 | curlcheck_cb_compatible((expr), curl_progress_callback) || \ 606 | curlcheck_cb_compatible((expr), _curl_progress_callback1) || \ 607 | curlcheck_cb_compatible((expr), _curl_progress_callback2)) 608 | typedef int (*_curl_progress_callback1)(void *, 609 | double, double, double, double); 610 | typedef int (*_curl_progress_callback2)(const void *, 611 | double, double, double, double); 612 | 613 | /* evaluates to true if expr is of type curl_debug_callback or "similar" */ 614 | #define curlcheck_debug_cb(expr) \ 615 | (curlcheck_NULL(expr) || \ 616 | curlcheck_cb_compatible((expr), curl_debug_callback) || \ 617 | curlcheck_cb_compatible((expr), _curl_debug_callback1) || \ 618 | curlcheck_cb_compatible((expr), _curl_debug_callback2) || \ 619 | curlcheck_cb_compatible((expr), _curl_debug_callback3) || \ 620 | curlcheck_cb_compatible((expr), _curl_debug_callback4) || \ 621 | curlcheck_cb_compatible((expr), _curl_debug_callback5) || \ 622 | curlcheck_cb_compatible((expr), _curl_debug_callback6) || \ 623 | curlcheck_cb_compatible((expr), _curl_debug_callback7) || \ 624 | curlcheck_cb_compatible((expr), _curl_debug_callback8)) 625 | typedef int (*_curl_debug_callback1) (CURL *, 626 | curl_infotype, char *, size_t, void *); 627 | typedef int (*_curl_debug_callback2) (CURL *, 628 | curl_infotype, char *, size_t, const void *); 629 | typedef int (*_curl_debug_callback3) (CURL *, 630 | curl_infotype, const char *, size_t, void *); 631 | typedef int (*_curl_debug_callback4) (CURL *, 632 | curl_infotype, const char *, size_t, const void *); 633 | typedef int (*_curl_debug_callback5) (CURL *, 634 | curl_infotype, unsigned char *, size_t, void *); 635 | typedef int (*_curl_debug_callback6) (CURL *, 636 | curl_infotype, unsigned char *, size_t, const void *); 637 | typedef int (*_curl_debug_callback7) (CURL *, 638 | curl_infotype, const unsigned char *, size_t, void *); 639 | typedef int (*_curl_debug_callback8) (CURL *, 640 | curl_infotype, const unsigned char *, size_t, const void *); 641 | 642 | /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */ 643 | /* this is getting even messier... */ 644 | #define curlcheck_ssl_ctx_cb(expr) \ 645 | (curlcheck_NULL(expr) || \ 646 | curlcheck_cb_compatible((expr), curl_ssl_ctx_callback) || \ 647 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback1) || \ 648 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback2) || \ 649 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback3) || \ 650 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback4) || \ 651 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback5) || \ 652 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback6) || \ 653 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback7) || \ 654 | curlcheck_cb_compatible((expr), _curl_ssl_ctx_callback8)) 655 | typedef CURLcode (*_curl_ssl_ctx_callback1)(CURL *, void *, void *); 656 | typedef CURLcode (*_curl_ssl_ctx_callback2)(CURL *, void *, const void *); 657 | typedef CURLcode (*_curl_ssl_ctx_callback3)(CURL *, const void *, void *); 658 | typedef CURLcode (*_curl_ssl_ctx_callback4)(CURL *, const void *, 659 | const void *); 660 | #ifdef HEADER_SSL_H 661 | /* hack: if we included OpenSSL's ssl.h, we know about SSL_CTX 662 | * this will of course break if we're included before OpenSSL headers... 663 | */ 664 | typedef CURLcode (*_curl_ssl_ctx_callback5)(CURL *, SSL_CTX, void *); 665 | typedef CURLcode (*_curl_ssl_ctx_callback6)(CURL *, SSL_CTX, const void *); 666 | typedef CURLcode (*_curl_ssl_ctx_callback7)(CURL *, const SSL_CTX, void *); 667 | typedef CURLcode (*_curl_ssl_ctx_callback8)(CURL *, const SSL_CTX, 668 | const void *); 669 | #else 670 | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback5; 671 | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback6; 672 | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback7; 673 | typedef _curl_ssl_ctx_callback1 _curl_ssl_ctx_callback8; 674 | #endif 675 | 676 | /* evaluates to true if expr is of type curl_conv_callback or "similar" */ 677 | #define curlcheck_conv_cb(expr) \ 678 | (curlcheck_NULL(expr) || \ 679 | curlcheck_cb_compatible((expr), curl_conv_callback) || \ 680 | curlcheck_cb_compatible((expr), _curl_conv_callback1) || \ 681 | curlcheck_cb_compatible((expr), _curl_conv_callback2) || \ 682 | curlcheck_cb_compatible((expr), _curl_conv_callback3) || \ 683 | curlcheck_cb_compatible((expr), _curl_conv_callback4)) 684 | typedef CURLcode (*_curl_conv_callback1)(char *, size_t length); 685 | typedef CURLcode (*_curl_conv_callback2)(const char *, size_t length); 686 | typedef CURLcode (*_curl_conv_callback3)(void *, size_t length); 687 | typedef CURLcode (*_curl_conv_callback4)(const void *, size_t length); 688 | 689 | /* evaluates to true if expr is of type curl_seek_callback or "similar" */ 690 | #define curlcheck_seek_cb(expr) \ 691 | (curlcheck_NULL(expr) || \ 692 | curlcheck_cb_compatible((expr), curl_seek_callback) || \ 693 | curlcheck_cb_compatible((expr), _curl_seek_callback1) || \ 694 | curlcheck_cb_compatible((expr), _curl_seek_callback2)) 695 | typedef CURLcode (*_curl_seek_callback1)(void *, curl_off_t, int); 696 | typedef CURLcode (*_curl_seek_callback2)(const void *, curl_off_t, int); 697 | 698 | 699 | #endif /* CURLINC_TYPECHECK_GCC_H */ 700 | --------------------------------------------------------------------------------