diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml deleted file mode 100644 index 4006fc9..0000000 --- a/.github/workflows/build-android.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Build Android App - -on: - push: - branches: [ deploy ] - pull_request: - branches: [ deploy ] - workflow_dispatch: - -permissions: - actions: write - checks: write - contents: write - deployments: write - discussions: write - id-token: write - issues: write - packages: write - pages: write - pull-requests: write - repository-projects: write - security-events: write - statuses: write - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Set up JDK - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y pkg-config libcairo2-dev python3-dev - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - # Install briefcase without extras to avoid introspection dependencies - pip install briefcase==0.3.16 - # Install toga directly without trying to install its gtk/gobject dependencies - pip install "toga-core>=0.4.0" "toga-android>=0.4.0" - - - name: Create Android app - working-directory: ./standalone - run: | - briefcase create android - # Make sure we're not trying to install toga-gtk on Android - briefcase build android --update-resources - # Package the app to create the final versioned APK - briefcase package android -p apk - - - name: Upload APK - uses: actions/upload-artifact@v4 - with: - name: castle-android - path: | - standalone/dist/Castle-*.apk - if-no-files-found: warn \ No newline at end of file diff --git a/.github/workflows/build-flatpak.yml b/.github/workflows/build-flatpak.yml deleted file mode 100644 index d60eb97..0000000 --- a/.github/workflows/build-flatpak.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Build Flatpak - -on: - workflow_dispatch: - inputs: - disabled: - description: 'This workflow is disabled' - -permissions: - actions: write - checks: write - contents: write - deployments: write - discussions: write - id-token: write - issues: write - packages: write - pages: write - pull-requests: write - repository-projects: write - security-events: write - statuses: write - - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libgirepository1.0-dev libgirepository-2.0-dev libcairo2-dev pkg-config python3-dev - # Install WebKit dependencies for Ubuntu 24.04 - sudo apt-get install -y gir1.2-webkit2-4.1 libwebkit2gtk-4.1-dev - # Install system PyGobject - sudo apt-get install -y python3-gi python3-gi-cairo - # Install GLib dev (needed for GTK applications) - sudo apt-get install -y libglib2.0-dev desktop-file-utils - # Install Flatpak tooling - sudo apt-get install -y flatpak flatpak-builder gnome-software-plugin-flatpak - sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.12.3' - - - name: Install Python dependencies - run: | - python -m pip install --upgrade pip - python -m pip install "briefcase>=0.4.1" - - - name: Copy PNG icon for Flatpak - run: cp app/static/logo.png standalone/src/castle/resources/logo.png - - - name: Create Flatpak package - working-directory: ./standalone - run: | - python -m briefcase create linux flatpak --no-input -vv - python -m briefcase build linux flatpak --no-input --update-resources -vv - python -m briefcase package linux flatpak --no-input -vv - - - name: Upload Flatpak bundle - uses: actions/upload-artifact@v4 - with: - name: castle-flatpak-bundle - path: standalone/dist/Castle-*.flatpak - if-no-files-found: warn - - - name: Upload build log on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: flatpak-build-logs - path: ./standalone/logs/ \ No newline at end of file diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml deleted file mode 100644 index b06a413..0000000 --- a/.github/workflows/build-ios.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Build iOS App - -on: - push: - branches: [ deploy ] - pull_request: - branches: [ deploy ] - workflow_dispatch: - -permissions: - actions: write - checks: write - contents: write - deployments: write - discussions: write - id-token: write - issues: write - packages: write - pages: write - pull-requests: write - repository-projects: write - security-events: write - statuses: write - -jobs: - build: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install briefcase - pip install toga - - - name: Create iOS app - working-directory: ./standalone - run: | - briefcase create iOS - briefcase build iOS --update-resources - briefcase package iOS - env: - XCODE_DEVELOPMENT_TEAM: ${{ secrets.XCODE_DEVELOPMENT_TEAM }} - - - name: Upload IPA - uses: actions/upload-artifact@v4 - with: - name: castle-ios - path: standalone/build/castle/ios/xcode/build/Debug-iphonesimulator/Castle.app \ No newline at end of file diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml deleted file mode 100644 index d40b2e3..0000000 --- a/.github/workflows/build-linux.yml +++ /dev/null @@ -1,71 +0,0 @@ -name: Build Linux App - -on: - workflow_dispatch: - inputs: - disabled: - description: 'This workflow is disabled' - -permissions: - contents: write - packages: write - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y \ - libgirepository1.0-dev \ - libgirepository-2.0-dev \ - libcairo2-dev \ - pkg-config \ - python3-dev \ - python3-pip \ - python3-cairo \ - gir1.2-webkit2-4.1 \ - libwebkit2gtk-4.1-dev \ - python3-gi \ - python3-gi-cairo \ - libglib2.0-dev \ - desktop-file-utils - - - name: Install Briefcase - run: python3 -m pip install --break-system-packages "briefcase>=0.4.1" - - - name: Copy PNG icon for Flatpak - run: cp app/static/logo.png standalone/src/castle/resources/logo.png - - - name: Build DEB package - working-directory: ./standalone - env: - PIP_BREAK_SYSTEM_PACKAGES: "1" - run: | - python3 -m briefcase create linux system - python3 -m briefcase build linux system - python3 -m briefcase package linux system -p deb - - - name: List build artifacts - working-directory: ./standalone - run: | - echo "Contents of dist directory:" - ls -lah dist/ || echo "No dist directory found" - - - name: Upload DEB package - if: success() - uses: actions/upload-artifact@v4 - with: - name: castle-deb-package - path: ./standalone/dist/*.deb - - - name: Upload logs on failure - if: failure() - uses: actions/upload-artifact@v4 - with: - name: build-logs - path: ./standalone/logs/ diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml deleted file mode 100644 index 7885b80..0000000 --- a/.github/workflows/build-macos.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Build macOS App - -on: - push: - branches: [ deploy ] - pull_request: - branches: [ deploy ] - workflow_dispatch: - -permissions: - actions: write - checks: write - contents: write - deployments: write - discussions: write - id-token: write - issues: write - packages: write - pages: write - pull-requests: write - repository-projects: write - security-events: write - statuses: write - -jobs: - build: - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install briefcase - pip install toga - - - name: Create macOS app - working-directory: ./standalone - run: | - briefcase create macos - briefcase build macos --update-resources - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: castle-macos - path: standalone/build/castle/macos/app/Castle.app \ No newline at end of file diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml deleted file mode 100644 index 3dac523..0000000 --- a/.github/workflows/build-windows.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Build Windows App - -on: - push: - branches: [ deploy ] - pull_request: - branches: [ deploy ] - workflow_dispatch: - -permissions: - actions: write - checks: write - contents: write - deployments: write - discussions: write - id-token: write - issues: write - packages: write - pages: write - pull-requests: write - repository-projects: write - security-events: write - statuses: write - -jobs: - build: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: '3.10' - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install briefcase - pip install toga - - - name: Create Windows app - working-directory: ./standalone - run: | - briefcase create windows - briefcase build windows --update-resources - briefcase package windows - - - name: Upload MSI installer - uses: actions/upload-artifact@v4 - with: - name: castle-windows-installer - path: standalone/dist/Castle-*.msi - if-no-files-found: warn diff --git a/.vercelignore b/.vercelignore index d739898..b18f4d8 100644 --- a/.vercelignore +++ b/.vercelignore @@ -1,8 +1,3 @@ -# Exclude standalone directory from deployment -standalone/ -standalone/** -**/standalone/** - # Common files to ignore .git .gitignore diff --git a/standalone/.gitignore b/standalone/.gitignore deleted file mode 100644 index f6c30e2..0000000 --- a/standalone/.gitignore +++ /dev/null @@ -1,62 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# OSX useful to ignore -*.DS_Store -.AppleDouble -.LSOverride - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.dist-info/ -*.egg-info/ -.installed.cfg -*.egg - -# IntelliJ Idea family of suites -.idea -*.iml -## File-based project format: -*.ipr -*.iws -## mpeltonen/sbt-idea plugin -.idea_modules/ - -# Briefcase log files -logs/ diff --git a/standalone/CHANGELOG b/standalone/CHANGELOG deleted file mode 100644 index 1c02977..0000000 --- a/standalone/CHANGELOG +++ /dev/null @@ -1,5 +0,0 @@ -# Castle Release Notes - -## 0.0.1 (16 Mar 2025) - -* Initial release diff --git a/standalone/LICENSE b/standalone/LICENSE deleted file mode 100644 index b446846..0000000 --- a/standalone/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2025, Jane Developer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/standalone/README.rst b/standalone/README.rst deleted file mode 100644 index d42ae80..0000000 --- a/standalone/README.rst +++ /dev/null @@ -1,12 +0,0 @@ -Castle -====== - -**This cross-platform app was generated by** `Briefcase`_ **- part of** -`The BeeWare Project`_. **If you want to see more tools like Briefcase, please -consider** `becoming a financial member of BeeWare`_. - -Scouting App for Team 334 - -.. _`Briefcase`: https://briefcase.readthedocs.io/ -.. _`The BeeWare Project`: https://beeware.org/ -.. _`becoming a financial member of BeeWare`: https://beeware.org/contributing/membership diff --git a/standalone/pyproject.toml b/standalone/pyproject.toml deleted file mode 100644 index 7c467c5..0000000 --- a/standalone/pyproject.toml +++ /dev/null @@ -1,196 +0,0 @@ -# This project was generated with 0.3.22 using template: https://github.com/beeware/briefcase-template@v0.3.22 -[tool.briefcase] -project_name = "Castle" -bundle = "com.team334.castle" -version = "25.1.3" -url = "https://castlescouting.com" -license.file = "LICENSE" -author = "Cherriae" -author_email = "techrobotics334@gmail.com" - -[tool.briefcase.app.castle] -formal_name = "Castle" -description = "Scouting App for Team 334" -long_description = """All In One Scouting App for FIRST Robotics Competition by Team 334. -""" -icon = "src/castle/resources/logo" - -sources = [ - "src/castle", -] -test_sources = [ - "tests", -] - -# Use a basic set of core dependencies that won't pull in platform-specific UI backends -requires = [ - "travertino==0.3.0", -] -test_requires = [ - "pytest", -] - -# Then specify platform-specific UI backends -[tool.briefcase.app.castle.macOS] -universal_build = true -requires = [ - "toga-cocoa~=0.4.0", - "std-nslog~=1.0.3", -] - -[tool.briefcase.app.castle.linux] -requires = [ - "toga-core==0.4.6", - "toga-gtk==0.4.6", - "pycairo>=1.17.0", - # Pin PyGObject to avoid build errors with missing girepository-2.0 in Flatpak - "pygobject==3.48.2", -] - -[tool.briefcase.app.castle.linux.system.debian] -system_requires = [ - # Needed to compile pycairo wheel - "libcairo2-dev", - # Needed to compile PyGObject wheel - "libgirepository1.0-dev", -] - -system_runtime_requires = [ - # Needed to provide GTK and its GI bindings - "gir1.2-gtk-3.0", - "libgirepository-1.0-1", - # Dependencies that GTK looks for at runtime - "libcanberra-gtk3-module", - # Needed to provide WebKit2 at runtime - # Note: Ubuntu 24.04 requires gir1.2-webkit2-4.1 - "gir1.2-webkit2-4.1", -] - -[tool.briefcase.app.castle.linux.system.rhel] -system_requires = [ - # Needed to compile pycairo wheel - "cairo-gobject-devel", - # Needed to compile PyGObject wheel - "gobject-introspection-devel", -] - -system_runtime_requires = [ - # Needed to support Python bindings to GTK - "gobject-introspection", - # Needed to provide GTK - "gtk3", - # Dependencies that GTK looks for at runtime - "libcanberra-gtk3", - # Needed to provide WebKit2 at runtime - "webkit2gtk3", -] - -[tool.briefcase.app.castle.linux.system.suse] -system_requires = [ - # Needed to compile pycairo wheel - "cairo-devel", - # Needed to compile PyGObject wheel - "gobject-introspection-devel", -] - -system_runtime_requires = [ - # Needed to provide GTK - "gtk3", - # Needed to support Python bindings to GTK - "gobject-introspection", "typelib(Gtk) = 3.0", - # Dependencies that GTK looks for at runtime - "libcanberra-gtk3-module", - # Needed to provide WebKit2 at runtime - "libwebkit2gtk3", "typelib(WebKit2)", -] - -[tool.briefcase.app.castle.linux.system.arch] -system_requires = [ - # Needed to compile pycairo wheel - "cairo", - # Needed to compile PyGObject wheel - "gobject-introspection", - # Runtime dependencies that need to exist so that the - # Arch package passes final validation. - # Needed to provide GTK - "gtk3", - # Dependencies that GTK looks for at runtime - "libcanberra", - # Needed to provide WebKit2 - "webkit2gtk", -] - -system_runtime_requires = [ - # Needed to provide GTK - "gtk3", - # Needed to provide PyGObject bindings - "gobject-introspection-runtime", - # Dependencies that GTK looks for at runtime - "libcanberra", - # Needed to provide WebKit2 at runtime - "webkit2gtk", -] - -[tool.briefcase.app.castle.linux.appimage] -manylinux = "manylinux_2_28" - -system_requires = [ - # Needed to compile pycairo wheel - "cairo-gobject-devel", - # Needed to compile PyGObject wheel - "gobject-introspection-devel", - # Needed to provide GTK - "gtk3-devel", - # Dependencies that GTK looks for at runtime, that need to be - # in the build environment to be picked up by linuxdeploy - "libcanberra-gtk3", - "PackageKit-gtk3-module", - "gvfs-client", -] - -linuxdeploy_plugins = [ - "DEPLOY_GTK_VERSION=3 gtk", -] - -[tool.briefcase.app.castle.linux.flatpak] -flatpak_runtime = "org.gnome.Platform" -flatpak_runtime_version = "44" -flatpak_sdk = "org.gnome.Sdk" - -[tool.briefcase.app.castle.windows] -requires = [ - "toga-core~=0.4.0", - "toga-winforms~=0.4.0", -] - -# Mobile deployments -[tool.briefcase.app.castle.iOS] -requires = [ - "toga-iOS~=0.4.0", - "std-nslog~=1.0.3", -] - -[tool.briefcase.app.castle.android] -requires = [ - "toga-core~=0.4.0", - "toga-android~=0.4.0", -] - -base_theme = "Theme.MaterialComponents.Light.DarkActionBar" - -build_gradle_dependencies = [ - "com.google.android.material:material:1.12.0", - # Needed for DetailedList - # "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0", - # Needed for MapView - # "org.osmdroid:osmdroid-android:6.1.20", -] - -# Web deployments -[tool.briefcase.app.castle.web] -requires = [ - "toga-core~=0.4.0", - "toga-web~=0.4.0", -] -style_framework = "Shoelace v2.3" - diff --git a/standalone/src/castle/__init__.py b/standalone/src/castle/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/standalone/src/castle/__main__.py b/standalone/src/castle/__main__.py deleted file mode 100644 index 16a95f9..0000000 --- a/standalone/src/castle/__main__.py +++ /dev/null @@ -1,4 +0,0 @@ -from castle.app import main - -if __name__ == "__main__": - main().main_loop() diff --git a/standalone/src/castle/app.py b/standalone/src/castle/app.py deleted file mode 100644 index 2740306..0000000 --- a/standalone/src/castle/app.py +++ /dev/null @@ -1,40 +0,0 @@ -""" -Scouting App for Team 334 -""" - -import toga -from toga.style import Pack -from toga.style.pack import COLUMN, ROW - - -class Castle(toga.App): - def startup(self): - """Construct and show the Toga application. - - Usually, you would add your application to a main content box. - We then create a main window (with a name matching the app), and - show the main window. - """ - # Completely clear the command set to remove all menus - self._impl.create_menus = lambda *x, **y: None - - # Create the main box with a COLUMN direction - main_box = toga.Box(style=Pack(direction=COLUMN, flex=1)) - - # Create the WebView - web_view = toga.WebView( - style=Pack(flex=1), - url='https://castlescouting.com' - ) - - # Add the WebView to the main box - main_box.add(web_view) - - # Create the main window and set its content - self.main_window = toga.MainWindow(title=self.formal_name) - self.main_window.content = main_box - self.main_window.show() - - -def main(): - return Castle() diff --git a/standalone/src/castle/resources/README b/standalone/src/castle/resources/README deleted file mode 100644 index 4ef2794..0000000 --- a/standalone/src/castle/resources/README +++ /dev/null @@ -1,2 +0,0 @@ -Put any application resources (e.g., icons and resources) here; -they can be referenced in code as "resources/filename". diff --git a/standalone/src/castle/resources/logo.ico b/standalone/src/castle/resources/logo.ico deleted file mode 100644 index c40a695..0000000 Binary files a/standalone/src/castle/resources/logo.ico and /dev/null differ diff --git a/standalone/src/castle/resources/logo.png b/standalone/src/castle/resources/logo.png deleted file mode 100644 index cc11c4a..0000000 Binary files a/standalone/src/castle/resources/logo.png and /dev/null differ diff --git a/standalone/tests/__init__.py b/standalone/tests/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/standalone/tests/castle.py b/standalone/tests/castle.py deleted file mode 100644 index d59e9f3..0000000 --- a/standalone/tests/castle.py +++ /dev/null @@ -1,35 +0,0 @@ -import os -import sys -import tempfile -from pathlib import Path - -import pytest - - -def run_tests(): - project_path = Path(__file__).parent.parent - os.chdir(project_path) - - # Determine any args to pass to pytest. If there aren't any, - # default to running the whole test suite. - args = sys.argv[1:] - if len(args) == 0: - args = ["tests"] - - returncode = pytest.main( - [ - # Turn up verbosity - "-vv", - # Disable color - "--color=no", - # Overwrite the cache directory to somewhere writable - "-o", - f"cache_dir={tempfile.gettempdir()}/.pytest_cache", - ] + args - ) - - print(f">>>>>>>>>> EXIT {returncode} <<<<<<<<<<") - - -if __name__ == "__main__": - run_tests()