diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 18ce4881f9..962e946b8d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -20,7 +20,7 @@ jobs:
include:
- profile: ubuntu-bionic-double-standard-unity-makefile
- os: ubuntu-20.04
+ os: ubuntu-22.04
config: Standard
unity: YES
generator: Unix Makefiles
@@ -29,9 +29,10 @@ jobs:
python: YES
eigen: NO
double: YES
+ asan: YES
- profile: ubuntu-bionic-coverage-ninja
- os: ubuntu-20.04
+ os: ubuntu-22.04
config: Coverage
unity: NO
generator: Ninja
@@ -40,9 +41,10 @@ jobs:
python: YES
eigen: NO
double: NO
+ asan: YES
#- profile: macos-coverage-unity-xcode
- # os: macOS-13
+ # os: macOS-15
# config: Coverage
# unity: YES
# generator: Xcode
@@ -53,7 +55,7 @@ jobs:
# double: NO
- profile: macos-nometa-standard-makefile
- os: macOS-13
+ os: macOS-15
config: Standard
unity: NO
generator: Unix Makefiles
@@ -62,6 +64,7 @@ jobs:
python: YES
eigen: NO
double: NO
+ asan: YES
- profile: windows-standard-unity-msvc
os: windows-2022
@@ -88,7 +91,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
with:
fetch-depth: 10
@@ -110,7 +113,7 @@ jobs:
- name: Set up XCode (macOS)
if: runner.os == 'macOS'
- run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
+ run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
@@ -127,7 +130,7 @@ jobs:
- name: Cache dependencies (Windows)
if: runner.os == 'Windows'
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: thirdparty
key: ci-cmake-${{ runner.OS }}-thirdparty-v1.10.15-r1
@@ -144,7 +147,7 @@ jobs:
- name: ccache (non-Windows)
if: runner.os != 'Windows'
- uses: actions/cache@v4
+ uses: actions/cache@v5
with:
path: ccache
key: ci-cmake-ccache-${{ matrix.profile }}
@@ -182,8 +185,13 @@ jobs:
-D HAVE_PYTHON=${{ runner.os != 'Windows' && matrix.python || 'NO' }}
-D HAVE_EIGEN=${{ matrix.eigen }}
-D STDFLOAT_DOUBLE=${{ matrix.double }}
+ -D ENABLE_ASAN=${{ matrix.asan || 'NO' }}
..
+ echo "$PWD/${{ matrix.config }}/bin" >> $GITHUB_PATH
+
+ echo "$PWD/bin" >> $GITHUB_PATH
+
- name: Build (no Python)
if: contains(matrix.python, 'NO')
# BEGIN A
@@ -193,7 +201,7 @@ jobs:
- name: Setup Python (Python 3.8)
if: contains(matrix.python, 'YES')
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.8'
- name: Configure (Python 3.8)
@@ -216,16 +224,17 @@ jobs:
shell: bash
env:
PYTHONPATH: ${{ matrix.config }}
+ ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0:log_path=asan.log.py38
run: |
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
$PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
- $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ run_pytest ../tests --cov=.
# END B
- name: Setup Python (Python 3.9)
if: contains(matrix.python, 'YES')
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Configure (Python 3.9)
@@ -248,16 +257,17 @@ jobs:
shell: bash
env:
PYTHONPATH: ${{ matrix.config }}
+ ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0:log_path=asan.log.py39
run: |
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
$PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
- $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ run_pytest ../tests --cov=.
# END B
- name: Setup Python (Python 3.10)
if: contains(matrix.python, 'YES')
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Configure (Python 3.10)
@@ -280,16 +290,17 @@ jobs:
shell: bash
env:
PYTHONPATH: ${{ matrix.config }}
+ ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0:log_path=asan.log.py310
run: |
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
$PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
- $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ run_pytest ../tests --cov=.
# END B
- name: Setup Python (Python 3.11)
if: contains(matrix.python, 'YES')
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Configure (Python 3.11)
@@ -312,16 +323,17 @@ jobs:
shell: bash
env:
PYTHONPATH: ${{ matrix.config }}
+ ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0:log_path=asan.log.py311
run: |
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
$PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
- $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ run_pytest ../tests --cov=.
# END B
- name: Setup Python (Python 3.12)
if: contains(matrix.python, 'YES')
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Configure (Python 3.12)
@@ -344,13 +356,26 @@ jobs:
shell: bash
env:
PYTHONPATH: ${{ matrix.config }}
+ ASAN_OPTIONS: detect_leaks=0:detect_odr_violation=0:log_path=asan.log.py312
run: |
PYTHON_EXECUTABLE=$(grep 'Python_EXECUTABLE:' CMakeCache.txt | sed 's/.*=//')
$PYTHON_EXECUTABLE -m pip install -r ../requirements-test.txt
export COVERAGE_FILE=.coverage.$RANDOM LLVM_PROFILE_FILE=$PWD/pid-%p.profraw
- $PYTHON_EXECUTABLE -m pytest ../tests --cov=.
+ run_pytest ../tests --cov=.
# END B
+ - name: Show ASan errors
+ if: failure() && contains(matrix.asan, 'YES')
+ working-directory: build
+ run: |
+ ls -lAh asan.log.* || true
+ if cat asan.log.* 2>/dev/null | grep -q .; then
+ echo '### Address Sanitizer Report' >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ cat asan.log.* >> $GITHUB_STEP_SUMMARY 2>/dev/null || echo "No ASan errors found"
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ fi
+
- name: Upload coverage reports
if: always() && matrix.config == 'Coverage'
working-directory: build
@@ -364,6 +389,13 @@ jobs:
python -m pip install coverage
python -m coverage combine $(find . -name '.coverage.*')
+ TOTAL=$(python -m coverage report --format=total)
+ echo '### Coverage Report' >> $GITHUB_STEP_SUMMARY
+ echo "Coverage: ${TOTAL}%
" >> $GITHUB_STEP_SUMMARY
+ echo '' >> $GITHUB_STEP_SUMMARY
+ python -m coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
+ echo ' ' >> $GITHUB_STEP_SUMMARY
+
llvm-profdata merge pid-*.profraw -o coverage.profdata
llvm-cov show $(grep -Rl LLVM_PROFILE_FILE . | sed 's/^/-object /') -instr-profile=coverage.profdata > coverage.txt
bash <(curl -s https://codecov.io/bash) -y ../.github/codecov.yml
@@ -372,12 +404,12 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
strategy:
matrix:
- os: [ubuntu-20.04, windows-2019, macOS-13]
+ os: [ubuntu-22.04, windows-2022, macOS-15]
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install dependencies (Ubuntu)
- if: matrix.os == 'ubuntu-20.04'
+ if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install build-essential bison flex libfreetype6-dev libgl1-mesa-dev libjpeg-dev libode-dev libopenal-dev libpng-dev libssl-dev libvorbis-dev libx11-dev libxcursor-dev libxrandr-dev nvidia-cg-toolkit zlib1g-dev
@@ -386,30 +418,30 @@ jobs:
shell: powershell
run: |
$wc = New-Object System.Net.WebClient
- $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip", "thirdparty-tools.zip")
+ $wc.DownloadFile("https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win64.zip", "thirdparty-tools.zip")
Expand-Archive -Path thirdparty-tools.zip
- Move-Item -Path thirdparty-tools/panda3d-1.10.15/thirdparty -Destination .
+ Move-Item -Path thirdparty-tools/panda3d-1.10.16/thirdparty -Destination .
- name: Get thirdparty packages (macOS)
if: runner.os == 'macOS'
run: |
- curl -O https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz
- tar -xf panda3d-1.10.15-tools-mac.tar.gz
- mv panda3d-1.10.15/thirdparty thirdparty
- rmdir panda3d-1.10.15
+ curl -O https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-mac.tar.gz
+ tar -xf panda3d-1.10.16-tools-mac.tar.gz
+ mv panda3d-1.10.16/thirdparty thirdparty
+ rmdir panda3d-1.10.16
(cd thirdparty/darwin-libs-a && rm -rf rocket)
- name: Set up XCode (macOS)
if: runner.os == 'macOS'
- run: sudo xcode-select -s /Applications/Xcode_14.3.1.app/Contents/Developer
+ run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer
- name: Set up Python 3.13
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Build Python 3.13
shell: bash
run: |
- python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
- name: Test Python 3.13
shell: bash
run: |
@@ -417,13 +449,13 @@ jobs:
PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
- name: Set up Python 3.12
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Build Python 3.12 (double)
shell: bash
run: |
- python makepanda/makepanda.py --override STDFLOAT_DOUBLE=1 --git-commit=${{github.sha}} --outputdir=built_dbl --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ python makepanda/makepanda.py --override STDFLOAT_DOUBLE=1 --git-commit=${{github.sha}} --outputdir=built_dbl --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
- name: Test Python 3.12 (double)
shell: bash
run: |
@@ -435,13 +467,13 @@ jobs:
python makepanda/makepackage.py --verbose --lzma --outputdir=built_dbl
- name: Set up Python 3.11
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Build Python 3.11
shell: bash
run: |
- python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
- name: Test Python 3.11
shell: bash
run: |
@@ -449,13 +481,13 @@ jobs:
PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
- name: Set up Python 3.10
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Build Python 3.10
shell: bash
run: |
- python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
- name: Test Python 3.10
shell: bash
run: |
@@ -463,13 +495,13 @@ jobs:
PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
- name: Set up Python 3.9
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.9'
- name: Build Python 3.9
shell: bash
run: |
- python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
- name: Test Python 3.9
shell: bash
run: |
@@ -477,13 +509,13 @@ jobs:
PYTHONPATH=built LD_LIBRARY_PATH=built/lib:$pythonLocation/lib DYLD_LIBRARY_PATH=built/lib python -m pytest
- name: Set up Python 3.8
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: '3.8'
- name: Build Python 3.8
shell: bash
run: |
- python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.2
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --outputdir=built --everything --no-eigen --python-incdir="$pythonLocation/include" --python-libdir="$pythonLocation/lib" --verbose --threads=4 --windows-sdk=10 --msvc-version=14.3
- name: Test Python 3.8
shell: bash
run: |
@@ -498,7 +530,7 @@ jobs:
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
runs-on: ubuntu-24.04
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Install dependencies
run: |
@@ -508,32 +540,32 @@ jobs:
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v14
with:
- version: 3.1.70
+ version: 4.0.2
actions-cache-folder: 'emsdk-cache'
- name: Restore Python build cache
id: cache-emscripten-python-restore
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@v5
with:
path: ~/python
- key: cache-emscripten-python-3.12.7
+ key: cache-emscripten-python-3.12.8
- name: Build Python 3.12
if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true'
run: |
- wget https://www.python.org/ftp/python/3.12.7/Python-3.12.7.tar.xz
- tar -xJf Python-3.12.7.tar.xz
- (cd Python-3.12.7 && EM_CONFIG=$EMSDK/.emscripten python3 Tools/wasm/wasm_build.py emscripten-browser)
- (cd Python-3.12.7/builddir/emscripten-browser && make install DESTDIR=~/python)
- cp Python-3.12.7/builddir/emscripten-browser/Modules/_hacl/libHacl_Hash_SHA2.a ~/python/usr/local/lib
- cp Python-3.12.7/builddir/emscripten-browser/Modules/_decimal/libmpdec/libmpdec.a ~/python/usr/local/lib
- cp Python-3.12.7/builddir/emscripten-browser/Modules/expat/libexpat.a ~/python/usr/local/lib
- rm -rf Python-3.12.7
+ wget https://www.python.org/ftp/python/3.12.8/Python-3.12.8.tar.xz
+ tar -xJf Python-3.12.8.tar.xz
+ (cd Python-3.12.8 && EM_CONFIG=$EMSDK/.emscripten python3 Tools/wasm/wasm_build.py emscripten-browser)
+ (cd Python-3.12.8/builddir/emscripten-browser && make install DESTDIR=~/python)
+ cp Python-3.12.8/builddir/emscripten-browser/Modules/_hacl/libHacl_Hash_SHA2.a ~/python/usr/local/lib
+ cp Python-3.12.8/builddir/emscripten-browser/Modules/_decimal/libmpdec/libmpdec.a ~/python/usr/local/lib
+ cp Python-3.12.8/builddir/emscripten-browser/Modules/expat/libexpat.a ~/python/usr/local/lib
+ rm -rf Python-3.12.8
- name: Save Python build cache
id: cache-emscripten-python-save
if: steps.cache-emscripten-python-restore.outputs.cache-hit != 'true'
- uses: actions/cache/save@v4
+ uses: actions/cache/save@v5
with:
path: ~/python
key: ${{ steps.cache-emscripten-python-restore.outputs.cache-primary-key }}
@@ -552,3 +584,156 @@ jobs:
shell: bash
run: |
PYTHONHOME=~/python/usr/local PYTHONPATH=built node built/bin/run_tests.js tests
+
+ android:
+ if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
+
+ strategy:
+ fail-fast: false
+
+ matrix:
+ include:
+ - android-abi: arm64-v8a
+ android-arch: arm64
+ android-triple: aarch64-linux-android
+ ndk-version: 29.0.14206865
+ runner: ubuntu-latest
+
+ - android-abi: armeabi-v7a
+ android-arch: arm
+ android-triple: arm-linux-androideabi
+ ndk-version: 29.0.14206865
+ runner: ubuntu-latest
+
+ - android-abi: x86_64
+ android-arch: x86_64
+ android-triple: x86_64-linux-android
+ ndk-version: 29.0.14206865
+ runner: ubuntu-latest
+
+ - android-abi: x86
+ android-arch: x86
+ android-triple: i686-linux-android
+ ndk-version: 29.0.14206865
+ runner: ubuntu-latest
+
+ runs-on: ${{ matrix.runner }}
+ steps:
+ - uses: actions/checkout@v6
+
+ - name: Setup Android SDK
+ uses: android-actions/setup-android@v3
+ with:
+ packages: 'tools platform-tools platforms;android-21 ndk;${{ matrix.ndk-version }}'
+
+ - name: Set up Android NDK
+ run: |
+ echo "ANDROID_NDK_ROOT=$ANDROID_SDK_ROOT/ndk/${{ matrix.ndk-version }}" >> $GITHUB_ENV
+
+ - uses: actions/setup-python@v6
+ with:
+ python-version: '3.13'
+
+ - name: Restore Python build cache
+ id: cache-android-python-restore
+ uses: actions/cache/restore@v5
+ with:
+ path: ~/python-prefix
+ key: cache-android-python-3.13.9-${{ matrix.android-abi }}-ndk${{ matrix.ndk-version }}
+
+ - name: Build Python 3.13
+ if: steps.cache-android-python-restore.outputs.cache-hit != 'true'
+ run: |
+ wget https://www.python.org/ftp/python/3.13.9/Python-3.13.9.tar.xz
+ tar -xJf Python-3.13.9.tar.xz
+ sed -i.bak "s/aarch64-linux-android/${{ matrix.android-triple }}/" Python-3.13.9/Android/android.py
+ sed -i.bak "s/ndk_version=[0-9.]\{1,\}/ndk_version=${{ matrix.ndk-version }}/" Python-3.13.9/Android/android-env.sh
+ (cd Python-3.13.9/Android && python3 android.py build ${{ matrix.android-triple }})
+ cp -R Python-3.13.9/cross-build/${{ matrix.android-triple }}/prefix ~/python-prefix
+ rm -rf Python-3.13.9
+
+ - name: Save Python build cache
+ id: cache-android-python-save
+ if: steps.cache-android-python-restore.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: ~/python-prefix
+ key: ${{ steps.cache-android-python-restore.outputs.cache-primary-key }}
+
+ - name: Restore thirdparty build cache
+ id: cache-android-thirdparty-restore
+ uses: actions/cache/restore@v5
+ with:
+ path: ./thirdparty
+ key: cache-android-thirdparty-935c80380ca171e08587c570e9dad678d29db3c8-${{ matrix.android-abi }}-ndk${{ matrix.ndk-version }}
+
+ - name: Install yasm
+ if: steps.cache-android-thirdparty-restore.outputs.cache-hit != 'true'
+ run: ${{runner.os == 'macOS' && 'brew' || 'sudo apt-get'}} install yasm
+
+ - name: Build thirdparty packages
+ if: steps.cache-android-thirdparty-restore.outputs.cache-hit != 'true'
+ run: |
+ git clone --revision=935c80380ca171e08587c570e9dad678d29db3c8 --depth=1 https://github.com/rdb/panda3d-thirdparty.git thirdparty
+ cd thirdparty
+ cmake -B build \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK_ROOT/build/cmake/android.toolchain.cmake \
+ -DCMAKE_ANDROID_ARCH_ABI=${{ matrix.android-abi }} \
+ -DCMAKE_ANDROID_ARCH=${{ matrix.android-arch }} \
+ -DCMAKE_SYSTEM_VERSION=21 \
+ -DANDROID_ABI=${{ matrix.android-abi }} \
+ -DANDROID_PLATFORM=android-21 \
+ -DBUILD_FCOLLADA=OFF \
+ -DBUILD_OPENSSL=OFF \
+ -DBUILD_VRPN=OFF \
+ -DBUILD_ARTOOLKIT=OFF
+ cmake --build build --config Release -j4
+ rm -rf build
+
+ - name: Save thirdparty build cache
+ id: cache-android-thirdparty-save
+ if: steps.cache-android-thirdparty-restore.outputs.cache-hit != 'true'
+ uses: actions/cache/save@v5
+ with:
+ path: ./thirdparty
+ key: ${{ steps.cache-android-thirdparty-restore.outputs.cache-primary-key }}
+
+ - name: Build for Android
+ shell: bash
+ run: |
+ python makepanda/makepanda.py --git-commit=${{github.sha}} --target android-21 --python-incdir=~/python-prefix/include --python-libdir=~/python-prefix/lib --arch ${{ matrix.android-arch }} --everything --no-openssl --no-tinydisplay --no-pandatool --verbose --threads=4
+
+ - name: Install test dependencies
+ shell: bash
+ run: |
+ python -m pip install -t ~/python-prefix/lib/python3.13/site-packages -r requirements-test.txt
+
+ - name: Enable KVM group perms
+ if: startsWith(matrix.runner, 'ubuntu')
+ run: |
+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
+ sudo udevadm control --reload-rules
+ sudo udevadm trigger --name-match=kvm
+
+ - name: Setup Android Emulator and Run Tests
+ if: startsWith(matrix.android-abi, 'x86')
+ uses: reactivecircus/android-emulator-runner@v2
+ with:
+ api-level: 27
+ arch: ${{ matrix.android-abi }}
+ target: default
+ profile: pixel_6
+ script: |
+ adb shell "rm -rf /data/local/tmp/panda3d-tests"
+ adb push built/bin/run_tests /data/local/tmp/panda3d-tests/run_tests
+ adb shell "mkdir /data/local/tmp/panda3d-tests/lib"
+ adb push built/lib/*.so /data/local/tmp/panda3d-tests/lib
+ adb push ~/python-prefix/lib/*.so /data/local/tmp/panda3d-tests/lib
+ adb push ~/python-prefix/lib/python3.13 /data/local/tmp/panda3d-tests/lib/python3.13
+ adb push built/panda3d /data/local/tmp/panda3d-tests/lib/python3.13/site-packages/
+ adb push built/direct /data/local/tmp/panda3d-tests/lib/python3.13/site-packages/
+ adb push built/models /data/local/tmp/panda3d-tests/models
+ adb push built/etc /data/local/tmp/panda3d-tests/etc
+ adb push tests /data/local/tmp/panda3d-tests/tests
+ adb shell "cd /data/local/tmp/panda3d-tests && LD_LIBRARY_PATH=/data/local/tmp/panda3d-tests/lib PYTHONPATH=/data/local/tmp/panda3d-tests/lib/python3.13/site-packages ./run_tests -v tests"
diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml
index 6e70577204..83a9d8138f 100644
--- a/.github/workflows/mypy.yml
+++ b/.github/workflows/mypy.yml
@@ -7,17 +7,17 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
- python-version: ['3.8', '3.11']
+ python-version: ['3.9', '3.13']
fail-fast: false
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v5
+ uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
- pip install mypy==1.4.0
+ pip install mypy==1.14.1
- name: Run mypy on direct
run: python tests/run_mypy.py
diff --git a/BACKERS.md b/BACKERS.md
index 2b48940fc3..269e617d67 100644
--- a/BACKERS.md
+++ b/BACKERS.md
@@ -5,10 +5,12 @@ This is a list of all the people who are contributing financially to Panda3D. I
## Bronze Sponsors
[
](https://route4me.com/)
+[
](https://www.testmu.ai/?utm_source=panda3d&utm_medium=sponsor)
* [Daniel Stokes](https://opencollective.com/daniel-stokes)
* [David Rose](https://opencollective.com/david-rose)
* [Route4Me](https://route4me.com/)
+* [TestMu AI](https://www.testmu.ai/?utm_source=panda3d&utm_medium=sponsor)
## Benefactors
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fba23f92d6..6a3362badb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,6 +109,7 @@ option(BUILD_DIRECT "Build the direct source tree." ON)
option(BUILD_PANDATOOL "Build the pandatool source tree." ON)
option(BUILD_CONTRIB "Build the contrib source tree." ON)
option(BUILD_MODELS "Build/install the built-in models." ON)
+option(BUILD_TESTS "Build unit test runner." ON)
option(BUILD_TOOLS "Build binary tools." ON)
# Include Panda3D packages
@@ -166,17 +167,8 @@ if(BUILD_MODELS)
COMPONENT Models DESTINATION ${CMAKE_INSTALL_DATADIR}/panda3d)
endif()
-if(INTERROGATE_PYTHON_INTERFACE)
- # If we built the Python interface, run the test suite. Note, we do NOT test
- # for pytest before adding this test. If the user doesn't have pytest, we'd
- # like for the tests to fail.
-
- # In the Coverage configuration, we also require pytest-cov
-
- add_test(NAME pytest
- COMMAND "${PYTHON_EXECUTABLE}" -m pytest "${PROJECT_SOURCE_DIR}/tests"
- $<$:--cov=.>
- WORKING_DIRECTORY "${PANDA_OUTPUT_DIR}")
+if(BUILD_TESTS)
+ add_subdirectory(tests "${CMAKE_BINARY_DIR}/tests")
endif()
# Generate the Panda3DConfig.cmake file so find_package(Panda3D) works, and
diff --git a/README.md b/README.md
index 6e4e78784b..cbfd7fc84d 100644
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ Installing Panda3D
==================
The latest Panda3D SDK can be downloaded from
-[this page](https://www.panda3d.org/download/sdk-1-10-15/).
+[this page](https://www.panda3d.org/download/sdk-1-10-16/).
If you are familiar with installing Python packages, you can use
the following command:
@@ -64,8 +64,8 @@ depending on whether you are on a 32-bit or 64-bit system, or you can
[click here](https://github.com/rdb/panda3d-thirdparty) for instructions on
building them from source.
-- https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win64.zip
-- https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-win32.zip
+- https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win64.zip
+- https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-win32.zip
After acquiring these dependencies, you can build Panda3D from the command
prompt using the following command. Change the `--msvc-version` option based
@@ -136,7 +136,7 @@ macOS
-----
On macOS, you will need to download a set of precompiled thirdparty packages in order to
-compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.15/panda3d-1.10.15-tools-mac.tar.gz).
+compile Panda3D, which can be acquired from [here](https://www.panda3d.org/download/panda3d-1.10.16/panda3d-1.10.16-tools-mac.tar.gz).
After placing the thirdparty directory inside the panda3d source directory,
you may build Panda3D using a command like the following:
@@ -181,22 +181,21 @@ Although it's possible to build Panda3D on an Android device using the
[termux](https://termux.com/) shell, the recommended route is to cross-compile
.whl files using the SDK and NDK, which can then be used by the `build_apps`
command to build a Python application into an .apk or .aab bundle. You will
-need to get the latest thirdparty packages, which can be obtained from the
-artifacts page of the last successful run here:
+need to get the latest thirdparty packages, which can be obtained from here:
-https://github.com/rdb/panda3d-thirdparty/actions?query=branch%3Amain+is%3Asuccess+event%3Apush
+https://rdb.name/thirdparty-android.tar.gz
-This does not include Python at the moment, which can be extracted from
-[this archive](https://rdb.name/thirdparty-android.tar.gz) instead.
+This includes a copy of Python 3.13 compiled for Android. You will need to
+use Python 3.13 on the host as well.
These commands show how to compile wheels for the supported Android ABIs:
```bash
export ANDROID_SDK_ROOT=/home/rdb/local/android
-python3.8 makepanda/makepanda.py --everything --outputdir built-droid-arm64 --arch arm64 --target android-21 --threads 6 --wheel
-python3.8 makepanda/makepanda.py --everything --outputdir built-droid-armv7a --arch armv7a --target android-19 --threads 6 --wheel
-python3.8 makepanda/makepanda.py --everything --outputdir built-droid-x86_64 --arch x86_64 --target android-21 --threads 6 --wheel
-python3.8 makepanda/makepanda.py --everything --outputdir built-droid-x86 --arch x86 --target android-19 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-arm64 --arch arm64 --target android-21 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-armv7a --arch arm --target android-21 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-x86_64 --arch x86_64 --target android-21 --threads 6 --wheel
+python3.13 makepanda/makepanda.py --everything --outputdir built-droid-x86 --arch x86 --target android-21 --threads 6 --wheel
```
It is now possible to use the generated wheels with `build_apps`, as explained
@@ -229,8 +228,8 @@ information as possible to help the developers track down the issue, such as
your version of Panda3D, operating system, architecture, and any code and
models that are necessary for the developers to reproduce the issue.
-If you're not sure whether you've encountered a bug, feel free to ask about
-it in the forums or the IRC channel first.
+If you're unsure whether you've encountered a bug, feel free to ask in the [forums](https://discourse.panda3d.org) or the [IRC channel](https://web.libera.chat/#panda3d) before opening an issue.
+
Supporting the Project
======================
@@ -239,9 +238,12 @@ If you would like to support the project financially, visit
[our campaign on OpenCollective](https://opencollective.com/panda3d). Your
contributions help us accelerate the development of Panda3D.
-For the list of backers, see the [BACKERS.md](BACKERS.md) file or visit the
-[Sponsors page](https://www.panda3d.org/sponsors) on our web site. Thank you
-to everyone who has donated!
+For the complete list of backers, see the [BACKERS.md](BACKERS.md) file or
+visit the [Sponsors page](https://www.panda3d.org/sponsors) on our web site.
+Thank you to everyone who has donated!
+
+[
](https://route4me.com/)
+[
](https://www.testmu.ai/?utm_source=panda3d&utm_medium=sponsor)
diff --git a/cmake/macros/Interrogate.cmake b/cmake/macros/Interrogate.cmake
index 5f26cebbe9..7533be7564 100644
--- a/cmake/macros/Interrogate.cmake
+++ b/cmake/macros/Interrogate.cmake
@@ -283,7 +283,7 @@ endfunction(interrogate_sources)
#
# Function: add_python_module(module [lib1 [lib2 ...]] [LINK lib1 ...]
-# [IMPORT mod1 ...])
+# [IMPORT mod1 ...] [INIT func1 ...])
# Uses interrogate to create a Python module. If the LINK keyword is specified,
# the Python module is linked against the specified libraries instead of those
# listed before. The IMPORT keyword makes the output module import another
@@ -305,7 +305,7 @@ function(add_python_module module)
set(keyword)
foreach(arg ${ARGN})
- if(arg STREQUAL "LINK" OR arg STREQUAL "IMPORT" OR arg STREQUAL "COMPONENT")
+ if(arg STREQUAL "LINK" OR arg STREQUAL "IMPORT" OR arg STREQUAL "INIT" OR arg STREQUAL "COMPONENT")
set(keyword "${arg}")
elseif(keyword STREQUAL "LINK")
@@ -316,6 +316,10 @@ function(add_python_module module)
list(APPEND import_flags "-import" "${arg}")
set(keyword)
+ elseif(keyword STREQUAL "INIT")
+ list(APPEND import_flags "-init" "${arg}")
+ set(keyword)
+
elseif(keyword STREQUAL "COMPONENT")
set(component "${arg}")
set(keyword)
diff --git a/contrib/src/sceneeditor/seParticlePanel.py b/contrib/src/sceneeditor/seParticlePanel.py
index 6ea49cc3b1..3791c62381 100644
--- a/contrib/src/sceneeditor/seParticlePanel.py
+++ b/contrib/src/sceneeditor/seParticlePanel.py
@@ -1,6 +1,7 @@
"""PANDA3D Particle Panel"""
# Import Tkinter, Pmw, and the floater code from this directory tree.
+from panda3d.core import ConfigVariableSearchPath, Point2, Point3, Vec3, Vec4
from direct.tkwidgets.AppShell import AppShell
import os, Pmw
from direct.tkwidgets.Dial import AngleDial
@@ -17,6 +18,10 @@ from tkinter.filedialog import *
from tkinter.simpledialog import askstring
+particlePath = ConfigVariableSearchPath("particle-path",
+ "The directories to search for particle files to be loaded.")
+
+
class ParticlePanel(AppShell):
# Override class variables
appname = 'Particle Panel'
@@ -1041,7 +1046,7 @@ class ParticlePanel(AppShell):
def loadParticleEffectFromFile(self):
# Find path to particle directory
- pPath = getParticlePath()
+ pPath = particlePath
if pPath.getNumDirectories() > 0:
if repr(pPath.getDirectory(0)) == '.':
path = '.'
@@ -1070,7 +1075,7 @@ class ParticlePanel(AppShell):
def saveParticleEffectToFile(self):
# Find path to particle directory
- pPath = getParticlePath()
+ pPath = particlePath
if pPath.getNumDirectories() > 0:
if repr(pPath.getDirectory(0)) == '.':
path = '.'
diff --git a/direct/src/dcparser/dcClass_ext.cxx b/direct/src/dcparser/dcClass_ext.cxx
index c7135cfabb..0fc2ba3c14 100644
--- a/direct/src/dcparser/dcClass_ext.cxx
+++ b/direct/src/dcparser/dcClass_ext.cxx
@@ -113,7 +113,7 @@ receive_update(PyObject *distobj, DatagramIterator &di) const {
int field_id = packer.raw_unpack_uint16();
DCField *field = _this->get_field_by_index(field_id);
if (field == nullptr) {
- ostringstream strm;
+ std::ostringstream strm;
strm
<< "Received update for field " << field_id << ", not in class "
<< _this->get_name();
diff --git a/direct/src/directnotify/DirectNotify.py b/direct/src/directnotify/DirectNotify.py
index f7c7e6c964..8b93088362 100644
--- a/direct/src/directnotify/DirectNotify.py
+++ b/direct/src/directnotify/DirectNotify.py
@@ -42,25 +42,25 @@ class DirectNotify:
"""
return list(self.__categories.keys())
- def getCategory(self, categoryName: str) -> Notifier.Notifier | None:
+ def getCategory(self, name: str) -> Notifier.Notifier | None:
"""getCategory(self, string)
Return the category with given name if present, None otherwise
"""
- return self.__categories.get(categoryName, None)
+ return self.__categories.get(name, None)
- def newCategory(self, categoryName: str, logger: Logger.Logger | None = None) -> Notifier.Notifier:
+ def newCategory(self, name: str, logger: Logger.Logger | None = None) -> Notifier.Notifier:
"""newCategory(self, string)
- Make a new notify category named categoryName. Return new category
+ Make a new notify category named name. Return new category
if no such category exists, else return existing category
"""
- if categoryName not in self.__categories:
- self.__categories[categoryName] = Notifier.Notifier(categoryName, logger)
- self.setDconfigLevel(categoryName)
- notifier = self.getCategory(categoryName)
+ if name not in self.__categories:
+ self.__categories[name] = Notifier.Notifier(name, logger)
+ self.setDconfigLevel(name)
+ notifier = self.getCategory(name)
assert notifier is not None
return notifier
- def setDconfigLevel(self, categoryName: str) -> None:
+ def setDconfigLevel(self, name: str) -> None:
"""
Check to see if this category has a dconfig variable
to set the notify severity and then set that level. You cannot
@@ -71,7 +71,7 @@ class DirectNotify:
# we're running before ShowBase has finished initializing
from panda3d.core import ConfigVariableString
- dconfigParam = ("notify-level-" + categoryName)
+ dconfigParam = ("notify-level-" + name)
cvar = ConfigVariableString(dconfigParam, "")
level = cvar.getValue()
@@ -82,11 +82,11 @@ class DirectNotify:
if not level:
level = 'error'
- category = self.getCategory(categoryName)
- assert category is not None, f'failed to find category: {categoryName!r}'
+ category = self.getCategory(name)
+ assert category is not None, f'failed to find category: {name!r}'
# Note - this print statement is making it difficult to
# achieve "no output unless there's an error" operation - Josh
- # print ("Setting DirectNotify category: " + categoryName +
+ # print ("Setting DirectNotify category: " + name +
# " to severity: " + level)
if level == "error":
category.setWarning(False)
@@ -106,7 +106,7 @@ class DirectNotify:
category.setDebug(True)
else:
print("DirectNotify: unknown notify level: " + str(level)
- + " for category: " + str(categoryName))
+ + " for category: " + str(name))
def setDconfigLevels(self) -> None:
for categoryName in self.getCategories():
@@ -129,3 +129,12 @@ class DirectNotify:
def giveNotify(self, cls) -> None:
cls.notify = self.newCategory(cls.__name__)
+
+ get_categories = getCategories
+ get_category = getCategory
+ new_category = newCategory
+ set_dconfig_level = setDconfigLevel
+ set_dconfig_levels = setDconfigLevels
+ set_verbose = setVerbose
+ popup_controls = popupControls
+ give_notify = giveNotify
diff --git a/direct/src/directtools/DirectGeometry.py b/direct/src/directtools/DirectGeometry.py
index 141d263c40..86ee2646b2 100644
--- a/direct/src/directtools/DirectGeometry.py
+++ b/direct/src/directtools/DirectGeometry.py
@@ -79,8 +79,8 @@ class LineNodePath(NodePath):
def getVertex(self, index):
return self.lineSegs.getVertex(index)
- def getVertexColor(self):
- return self.lineSegs.getVertexColor()
+ def getVertexColor(self, index):
+ return self.lineSegs.getVertexColor(index)
def drawArrow(self, sv, ev, arrowAngle, arrowLength):
"""
diff --git a/direct/src/directtools/DirectGrid.py b/direct/src/directtools/DirectGrid.py
index 33c6ac58dc..b1c578d692 100644
--- a/direct/src/directtools/DirectGrid.py
+++ b/direct/src/directtools/DirectGrid.py
@@ -33,7 +33,7 @@ class DirectGrid(NodePath, DirectObject):
self.centerLines = LineNodePath(self.lines)
self.centerLines.lineNode.setName('centerLines')
- self.centerLines.setColor(VBase4(1, 0, 0, 0))
+ self.centerLines.setColor(VBase4(1, 0, 0, 1))
self.centerLines.setThickness(3)
# Small marker to hilight snap-to-grid point
diff --git a/direct/src/directtools/DirectUtil.py b/direct/src/directtools/DirectUtil.py
index 134832973d..7017f7b44a 100644
--- a/direct/src/directtools/DirectUtil.py
+++ b/direct/src/directtools/DirectUtil.py
@@ -1,4 +1,4 @@
-from panda3d.core import VBase4
+from panda3d.core import NodePath, VBase4
from direct.task.Task import Task
from direct.task.TaskManagerGlobal import taskMgr
@@ -55,7 +55,7 @@ def lerpBackgroundColor(r, g, b, duration):
# Set direct drawing style for an object
# Never light object or draw in wireframe
-def useDirectRenderStyle(nodePath, priority = 0):
+def useDirectRenderStyle(nodePath: NodePath, priority: int = 0) -> None:
"""
Function to force a node path to use direct render style:
no lighting, and no wireframe
diff --git a/direct/src/dist/FreezeTool.py b/direct/src/dist/FreezeTool.py
index aad6dc4b24..a883ec5fa2 100644
--- a/direct/src/dist/FreezeTool.py
+++ b/direct/src/dist/FreezeTool.py
@@ -88,6 +88,7 @@ defaultHiddenImports = {
'numpy.core._dtype_ctypes',
'numpy.core._methods',
],
+ 'panda3d.core': ['enum'],
'pandas.compat': ['lzma', 'cmath'],
'pandas._libs.tslibs.conversion': ['pandas._libs.tslibs.base'],
'plyer': ['plyer.platforms'],
@@ -101,6 +102,7 @@ defaultHiddenImports = {
'scipy.stats._stats': ['scipy.special.cython_special'],
'setuptools.monkey': ['setuptools.msvc'],
'shapely._geometry_helpers': ['shapely._geos'],
+ 'jnius': ['jnius_config'],
}
@@ -113,7 +115,7 @@ ignoreImports = {
'toml.encoder': ['numpy'],
'py._builtin': ['__builtin__'],
- 'site': ['android_log'],
+ 'site': ['android_support'],
}
if sys.version_info >= (3, 8):
@@ -138,12 +140,23 @@ def getline(filename, lineno, module_globals=None):
return ''
def clearcache():
- global cache
- cache = {}
+ cache.clear()
def getlines(filename, module_globals=None):
return []
+def _getline_from_code(filename, lineno):
+ return ''
+
+def _make_key(code):
+ return (code.co_filename, code.co_qualname, code.co_firstlineno)
+
+def _getlines_from_code(code):
+ return []
+
+def _source_unavailable(filename):
+ return True
+
def checkcache(filename=None):
pass
@@ -1236,8 +1249,12 @@ class Freezer:
pass
# Check if any new modules we found have "hidden" imports
- for origName in list(self.mf.modules.keys()):
+ checkHiddenImports = set(self.mf.modules.keys())
+ while checkHiddenImports:
+ origName = next(iter(checkHiddenImports))
+ checkHiddenImports.discard(origName)
hidden = self.hiddenImports.get(origName, [])
+ preModules = frozenset(self.mf.modules.keys())
for modname in hidden:
if modname.endswith('.*'):
mdefs = self._gatherSubmodules(modname, implicit = True)
@@ -1251,6 +1268,9 @@ class Freezer:
self.__loadModule(self.ModuleDef(modname, implicit = True))
except ImportError:
pass
+ addedModules = set(self.mf.modules.keys())
+ addedModules -= preModules
+ checkHiddenImports |= addedModules
# Special case for sysconfig, which depends on a platform-specific
# sysconfigdata module on POSIX systems.
@@ -1834,7 +1854,8 @@ class Freezer:
return target
def generateRuntimeFromStub(self, target, stub_file, use_console, fields={},
- log_append=False, log_filename_strftime=False):
+ log_append=False, log_filename_strftime=False,
+ blob_path=None):
self.__replacePaths()
# We must have a __main__ module to make an exe file.
@@ -1969,6 +1990,9 @@ class Freezer:
elif self.platform.endswith('_aarch64') or self.platform.endswith('_arm64'):
# Most arm64 operating systems are configured with 16 KiB pages.
blob_align = 16384
+ elif self.platform.replace('-', '_') == 'android_x86_64':
+ # Android nowadays requires 16 KiB pages on 64-bit Intel as well.
+ blob_align = 16384
else:
# Align to page size, so that it can be mmapped.
blob_align = 4096
@@ -1979,29 +2003,33 @@ class Freezer:
pad = (blob_align - (blob_size & (blob_align - 1)))
blob_size += pad
- # TODO: Support creating custom sections in universal binaries.
- append_blob = True
- if self.platform.startswith('macosx') and len(bitnesses) == 1:
- # If our deploy-stub has a __PANDA segment, we know we're meant to
- # put our blob there rather than attach it to the end.
- load_commands = self._parse_macho_load_commands(stub_data)
- if b'__PANDA' in load_commands.keys():
- append_blob = False
-
- if self.platform.startswith("macosx") and not append_blob:
- # Take this time to shift any Mach-O structures around to fit our
- # blob. We don't need to worry about aligning the offset since the
- # compiler already took care of that when creating the segment.
- blob_offset = self._shift_macho_structures(stub_data, load_commands, blob_size)
+ if blob_path is not None:
+ # We'll be writing the blob to a separate location.
+ blob_offset = 0
else:
- # Add padding before the blob if necessary.
- blob_offset = len(stub_data)
- if (blob_offset & (blob_align - 1)) != 0:
- pad = (blob_align - (blob_offset & (blob_align - 1)))
- stub_data += (b'\0' * pad)
- blob_offset += pad
- assert (blob_offset % blob_align) == 0
- assert blob_offset == len(stub_data)
+ # TODO: Support creating custom sections in universal binaries.
+ append_blob = True
+ if self.platform.startswith('macosx') and len(bitnesses) == 1:
+ # If our deploy-stub has a __PANDA segment, we know we're meant to
+ # put our blob there rather than attach it to the end.
+ load_commands = self._parse_macho_load_commands(stub_data)
+ if b'__PANDA' in load_commands.keys():
+ append_blob = False
+
+ if self.platform.startswith("macosx") and not append_blob:
+ # Take this time to shift any Mach-O structures around to fit our
+ # blob. We don't need to worry about aligning the offset since the
+ # compiler already took care of that when creating the segment.
+ blob_offset = self._shift_macho_structures(stub_data, load_commands, blob_size)
+ else:
+ # Add padding before the blob if necessary.
+ blob_offset = len(stub_data)
+ if (blob_offset & (blob_align - 1)) != 0:
+ pad = (blob_align - (blob_offset & (blob_align - 1)))
+ stub_data += (b'\0' * pad)
+ blob_offset += pad
+ assert (blob_offset % blob_align) == 0
+ assert blob_offset == len(stub_data)
# Calculate the offsets for the variables. These are pointers,
# relative to the beginning of the blob.
@@ -2087,7 +2115,9 @@ class Freezer:
blob += struct.pack('\n\x08StagedId\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x11\n\tstaged_id\x18\x02 \x01(\r\"\x15\n\x07\x45ntryId\x12\n\n\x02id\x18\x01 \x01(\r\"\x8e\x02\n\x05\x45ntry\x12\"\n\x08\x65ntry_id\x18\x01 \x01(\x0b\x32\x10.aapt.pb.EntryId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\'\n\nvisibility\x18\x03 \x01(\x0b\x32\x13.aapt.pb.Visibility\x12$\n\tallow_new\x18\x04 \x01(\x0b\x32\x11.aapt.pb.AllowNew\x12\x32\n\x10overlayable_item\x18\x05 \x01(\x0b\x32\x18.aapt.pb.OverlayableItem\x12*\n\x0c\x63onfig_value\x18\x06 \x03(\x0b\x32\x14.aapt.pb.ConfigValue\x12$\n\tstaged_id\x18\x07 \x01(\x0b\x32\x11.aapt.pb.StagedId\"T\n\x0b\x43onfigValue\x12&\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x16.aapt.pb.Configuration\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.aapt.pb.Value\"\xa1\x01\n\x05Value\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x0c\n\x04weak\x18\x03 \x01(\x08\x12\x1d\n\x04item\x18\x04 \x01(\x0b\x32\r.aapt.pb.ItemH\x00\x12\x30\n\x0e\x63ompound_value\x18\x05 \x01(\x0b\x32\x16.aapt.pb.CompoundValueH\x00\x42\x07\n\x05value\"\x8d\x02\n\x04Item\x12!\n\x03ref\x18\x01 \x01(\x0b\x32\x12.aapt.pb.ReferenceH\x00\x12\x1e\n\x03str\x18\x02 \x01(\x0b\x32\x0f.aapt.pb.StringH\x00\x12%\n\x07raw_str\x18\x03 \x01(\x0b\x32\x12.aapt.pb.RawStringH\x00\x12+\n\nstyled_str\x18\x04 \x01(\x0b\x32\x15.aapt.pb.StyledStringH\x00\x12&\n\x04\x66ile\x18\x05 \x01(\x0b\x32\x16.aapt.pb.FileReferenceH\x00\x12\x19\n\x02id\x18\x06 \x01(\x0b\x32\x0b.aapt.pb.IdH\x00\x12\"\n\x04prim\x18\x07 \x01(\x0b\x32\x12.aapt.pb.PrimitiveH\x00\x42\x07\n\x05value\"\xef\x01\n\rCompoundValue\x12\"\n\x04\x61ttr\x18\x01 \x01(\x0b\x32\x12.aapt.pb.AttributeH\x00\x12\x1f\n\x05style\x18\x02 \x01(\x0b\x32\x0e.aapt.pb.StyleH\x00\x12\'\n\tstyleable\x18\x03 \x01(\x0b\x32\x12.aapt.pb.StyleableH\x00\x12\x1f\n\x05\x61rray\x18\x04 \x01(\x0b\x32\x0e.aapt.pb.ArrayH\x00\x12!\n\x06plural\x18\x05 \x01(\x0b\x32\x0f.aapt.pb.PluralH\x00\x12#\n\x05macro\x18\x06 \x01(\x0b\x32\x12.aapt.pb.MacroBodyH\x00\x42\x07\n\x05value\"\x18\n\x07\x42oolean\x12\r\n\x05value\x18\x01 \x01(\x08\"\xd0\x01\n\tReference\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x17.aapt.pb.Reference.Type\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07private\x18\x04 \x01(\x08\x12$\n\nis_dynamic\x18\x05 \x01(\x0b\x32\x10.aapt.pb.Boolean\x12\x12\n\ntype_flags\x18\x06 \x01(\r\x12\x11\n\tallow_raw\x18\x07 \x01(\x08\"$\n\x04Type\x12\r\n\tREFERENCE\x10\x00\x12\r\n\tATTRIBUTE\x10\x01\"\x04\n\x02Id\"\x17\n\x06String\x12\r\n\x05value\x18\x01 \x01(\t\"\x1a\n\tRawString\x12\r\n\x05value\x18\x01 \x01(\t\"\x83\x01\n\x0cStyledString\x12\r\n\x05value\x18\x01 \x01(\t\x12(\n\x04span\x18\x02 \x03(\x0b\x32\x1a.aapt.pb.StyledString.Span\x1a:\n\x04Span\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x12\n\nfirst_char\x18\x02 \x01(\r\x12\x11\n\tlast_char\x18\x03 \x01(\r\"\x85\x01\n\rFileReference\x12\x0c\n\x04path\x18\x01 \x01(\t\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.aapt.pb.FileReference.Type\";\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03PNG\x10\x01\x12\x0e\n\nBINARY_XML\x10\x02\x12\r\n\tPROTO_XML\x10\x03\"\x83\x04\n\tPrimitive\x12\x31\n\nnull_value\x18\x01 \x01(\x0b\x32\x1b.aapt.pb.Primitive.NullTypeH\x00\x12\x33\n\x0b\x65mpty_value\x18\x02 \x01(\x0b\x32\x1c.aapt.pb.Primitive.EmptyTypeH\x00\x12\x15\n\x0b\x66loat_value\x18\x03 \x01(\x02H\x00\x12\x19\n\x0f\x64imension_value\x18\r \x01(\rH\x00\x12\x18\n\x0e\x66raction_value\x18\x0e \x01(\rH\x00\x12\x1b\n\x11int_decimal_value\x18\x06 \x01(\x05H\x00\x12\x1f\n\x15int_hexadecimal_value\x18\x07 \x01(\rH\x00\x12\x17\n\rboolean_value\x18\x08 \x01(\x08H\x00\x12\x1b\n\x11\x63olor_argb8_value\x18\t \x01(\rH\x00\x12\x1a\n\x10\x63olor_rgb8_value\x18\n \x01(\rH\x00\x12\x1b\n\x11\x63olor_argb4_value\x18\x0b \x01(\rH\x00\x12\x1a\n\x10\x63olor_rgb4_value\x18\x0c \x01(\rH\x00\x12(\n\x1a\x64imension_value_deprecated\x18\x04 \x01(\x02\x42\x02\x18\x01H\x00\x12\'\n\x19\x66raction_value_deprecated\x18\x05 \x01(\x02\x42\x02\x18\x01H\x00\x1a\n\n\x08NullType\x1a\x0b\n\tEmptyTypeB\r\n\x0boneof_value\"\x90\x03\n\tAttribute\x12\x14\n\x0c\x66ormat_flags\x18\x01 \x01(\r\x12\x0f\n\x07min_int\x18\x02 \x01(\x05\x12\x0f\n\x07max_int\x18\x03 \x01(\x05\x12)\n\x06symbol\x18\x04 \x03(\x0b\x32\x19.aapt.pb.Attribute.Symbol\x1ay\n\x06Symbol\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12 \n\x04name\x18\x03 \x01(\x0b\x32\x12.aapt.pb.Reference\x12\r\n\x05value\x18\x04 \x01(\r\x12\x0c\n\x04type\x18\x05 \x01(\r\"\xa4\x01\n\x0b\x46ormatFlags\x12\x08\n\x04NONE\x10\x00\x12\t\n\x03\x41NY\x10\xff\xff\x03\x12\r\n\tREFERENCE\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x0b\n\x07INTEGER\x10\x04\x12\x0b\n\x07\x42OOLEAN\x10\x08\x12\t\n\x05\x43OLOR\x10\x10\x12\t\n\x05\x46LOAT\x10 \x12\r\n\tDIMENSION\x10@\x12\r\n\x08\x46RACTION\x10\x80\x01\x12\n\n\x04\x45NUM\x10\x80\x80\x04\x12\x0b\n\x05\x46LAGS\x10\x80\x80\x08\"\xf1\x01\n\x05Style\x12\"\n\x06parent\x18\x01 \x01(\x0b\x32\x12.aapt.pb.Reference\x12&\n\rparent_source\x18\x02 \x01(\x0b\x32\x0f.aapt.pb.Source\x12#\n\x05\x65ntry\x18\x03 \x03(\x0b\x32\x14.aapt.pb.Style.Entry\x1aw\n\x05\x45ntry\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x1f\n\x03key\x18\x03 \x01(\x0b\x32\x12.aapt.pb.Reference\x12\x1b\n\x04item\x18\x04 \x01(\x0b\x32\r.aapt.pb.Item\"\x91\x01\n\tStyleable\x12\'\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x18.aapt.pb.Styleable.Entry\x1a[\n\x05\x45ntry\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12 \n\x04\x61ttr\x18\x03 \x01(\x0b\x32\x12.aapt.pb.Reference\"\x8a\x01\n\x05\x41rray\x12\'\n\x07\x65lement\x18\x01 \x03(\x0b\x32\x16.aapt.pb.Array.Element\x1aX\n\x07\x45lement\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x1b\n\x04item\x18\x03 \x01(\x0b\x32\r.aapt.pb.Item\"\xef\x01\n\x06Plural\x12$\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x15.aapt.pb.Plural.Entry\x1a|\n\x05\x45ntry\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12$\n\x05\x61rity\x18\x03 \x01(\x0e\x32\x15.aapt.pb.Plural.Arity\x12\x1b\n\x04item\x18\x04 \x01(\x0b\x32\r.aapt.pb.Item\"A\n\x05\x41rity\x12\x08\n\x04ZERO\x10\x00\x12\x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02\x12\x07\n\x03\x46\x45W\x10\x03\x12\x08\n\x04MANY\x10\x04\x12\t\n\x05OTHER\x10\x05\"r\n\x07XmlNode\x12&\n\x07\x65lement\x18\x01 \x01(\x0b\x32\x13.aapt.pb.XmlElementH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\'\n\x06source\x18\x03 \x01(\x0b\x32\x17.aapt.pb.SourcePositionB\x06\n\x04node\"\xb2\x01\n\nXmlElement\x12\x34\n\x15namespace_declaration\x18\x01 \x03(\x0b\x32\x15.aapt.pb.XmlNamespace\x12\x15\n\rnamespace_uri\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12(\n\tattribute\x18\x04 \x03(\x0b\x32\x15.aapt.pb.XmlAttribute\x12\x1f\n\x05\x63hild\x18\x05 \x03(\x0b\x32\x10.aapt.pb.XmlNode\"T\n\x0cXmlNamespace\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\'\n\x06source\x18\x03 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\"\xa6\x01\n\x0cXmlAttribute\x12\x15\n\rnamespace_uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\'\n\x06source\x18\x04 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\x12\x13\n\x0bresource_id\x18\x05 \x01(\r\x12$\n\rcompiled_item\x18\x06 \x01(\x0b\x32\r.aapt.pb.Item\"\xe7\x01\n\tMacroBody\x12\x12\n\nraw_string\x18\x01 \x01(\t\x12*\n\x0cstyle_string\x18\x02 \x01(\x0b\x32\x14.aapt.pb.StyleString\x12?\n\x17untranslatable_sections\x18\x03 \x03(\x0b\x32\x1e.aapt.pb.UntranslatableSection\x12\x30\n\x0fnamespace_stack\x18\x04 \x03(\x0b\x32\x17.aapt.pb.NamespaceAlias\x12\'\n\x06source\x18\x05 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\"J\n\x0eNamespaceAlias\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x14\n\x0cpackage_name\x18\x02 \x01(\t\x12\x12\n\nis_private\x18\x03 \x01(\x08\"\x82\x01\n\x0bStyleString\x12\x0b\n\x03str\x18\x01 \x01(\t\x12(\n\x05spans\x18\x02 \x03(\x0b\x32\x19.aapt.pb.StyleString.Span\x1a<\n\x04Span\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bstart_index\x18\x02 \x01(\r\x12\x11\n\tend_index\x18\x03 \x01(\r\"?\n\x15UntranslatableSection\x12\x13\n\x0bstart_index\x18\x01 \x01(\x04\x12\x11\n\tend_index\x18\x02 \x01(\x04\x42\x12\n\x10\x63om.android.aaptb\x06proto3'
- ,
- dependencies=[frameworks_dot_base_dot_tools_dot_aapt2_dot_Configuration__pb2.DESCRIPTOR,])
-
-
-
-_VISIBILITY_LEVEL = _descriptor.EnumDescriptor(
- name='Level',
- full_name='aapt.pb.Visibility.Level',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNKNOWN', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PRIVATE', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PUBLIC', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=869,
- serialized_end=914,
-)
-_sym_db.RegisterEnumDescriptor(_VISIBILITY_LEVEL)
-
-_OVERLAYABLEITEM_POLICY = _descriptor.EnumDescriptor(
- name='Policy',
- full_name='aapt.pb.OverlayableItem.Policy',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='NONE', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PUBLIC', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='SYSTEM', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='VENDOR', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PRODUCT', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='SIGNATURE', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ODM', index=6, number=6,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='OEM', index=7, number=7,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ACTOR', index=8, number=8,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='CONFIG_SIGNATURE', index=9, number=9,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1200,
- serialized_end=1333,
-)
-_sym_db.RegisterEnumDescriptor(_OVERLAYABLEITEM_POLICY)
-
-_REFERENCE_TYPE = _descriptor.EnumDescriptor(
- name='Type',
- full_name='aapt.pb.Reference.Type',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='REFERENCE', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ATTRIBUTE', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=2658,
- serialized_end=2694,
-)
-_sym_db.RegisterEnumDescriptor(_REFERENCE_TYPE)
-
-_FILEREFERENCE_TYPE = _descriptor.EnumDescriptor(
- name='Type',
- full_name='aapt.pb.FileReference.Type',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNKNOWN', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PNG', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='BINARY_XML', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PROTO_XML', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=2964,
- serialized_end=3023,
-)
-_sym_db.RegisterEnumDescriptor(_FILEREFERENCE_TYPE)
-
-_ATTRIBUTE_FORMATFLAGS = _descriptor.EnumDescriptor(
- name='FormatFlags',
- full_name='aapt.pb.Attribute.FormatFlags',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='NONE', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ANY', index=1, number=65535,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='REFERENCE', index=2, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='STRING', index=3, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='INTEGER', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='BOOLEAN', index=5, number=8,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='COLOR', index=6, number=16,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='FLOAT', index=7, number=32,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='DIMENSION', index=8, number=64,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='FRACTION', index=9, number=128,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ENUM', index=10, number=65536,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='FLAGS', index=11, number=131072,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=3780,
- serialized_end=3944,
-)
-_sym_db.RegisterEnumDescriptor(_ATTRIBUTE_FORMATFLAGS)
-
-_PLURAL_ARITY = _descriptor.EnumDescriptor(
- name='Arity',
- full_name='aapt.pb.Plural.Arity',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='ZERO', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ONE', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='TWO', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='FEW', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='MANY', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='OTHER', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=4654,
- serialized_end=4719,
-)
-_sym_db.RegisterEnumDescriptor(_PLURAL_ARITY)
-
-
-_STRINGPOOL = _descriptor.Descriptor(
- name='StringPool',
- full_name='aapt.pb.StringPool',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='data', full_name='aapt.pb.StringPool.data', index=0,
- number=1, type=12, cpp_type=9, label=1,
- has_default_value=False, default_value=b"",
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=105,
- serialized_end=131,
-)
-
-
-_SOURCEPOSITION = _descriptor.Descriptor(
- name='SourcePosition',
- full_name='aapt.pb.SourcePosition',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='line_number', full_name='aapt.pb.SourcePosition.line_number', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='column_number', full_name='aapt.pb.SourcePosition.column_number', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=133,
- serialized_end=193,
-)
-
-
-_SOURCE = _descriptor.Descriptor(
- name='Source',
- full_name='aapt.pb.Source',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='path_idx', full_name='aapt.pb.Source.path_idx', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='position', full_name='aapt.pb.Source.position', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=195,
- serialized_end=264,
-)
-
-
-_TOOLFINGERPRINT = _descriptor.Descriptor(
- name='ToolFingerprint',
- full_name='aapt.pb.ToolFingerprint',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='tool', full_name='aapt.pb.ToolFingerprint.tool', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='version', full_name='aapt.pb.ToolFingerprint.version', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=266,
- serialized_end=314,
-)
-
-
-_RESOURCETABLE = _descriptor.Descriptor(
- name='ResourceTable',
- full_name='aapt.pb.ResourceTable',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source_pool', full_name='aapt.pb.ResourceTable.source_pool', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='package', full_name='aapt.pb.ResourceTable.package', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='overlayable', full_name='aapt.pb.ResourceTable.overlayable', index=2,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='tool_fingerprint', full_name='aapt.pb.ResourceTable.tool_fingerprint', index=3,
- number=4, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=317,
- serialized_end=504,
-)
-
-
-_PACKAGEID = _descriptor.Descriptor(
- name='PackageId',
- full_name='aapt.pb.PackageId',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='id', full_name='aapt.pb.PackageId.id', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=506,
- serialized_end=529,
-)
-
-
-_PACKAGE = _descriptor.Descriptor(
- name='Package',
- full_name='aapt.pb.Package',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='package_id', full_name='aapt.pb.Package.package_id', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='package_name', full_name='aapt.pb.Package.package_name', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type', full_name='aapt.pb.Package.type', index=2,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=531,
- serialized_end=631,
-)
-
-
-_TYPEID = _descriptor.Descriptor(
- name='TypeId',
- full_name='aapt.pb.TypeId',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='id', full_name='aapt.pb.TypeId.id', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=633,
- serialized_end=653,
-)
-
-
-_TYPE = _descriptor.Descriptor(
- name='Type',
- full_name='aapt.pb.Type',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='type_id', full_name='aapt.pb.Type.type_id', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.Type.name', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='entry', full_name='aapt.pb.Type.entry', index=2,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=655,
- serialized_end=740,
-)
-
-
-_VISIBILITY = _descriptor.Descriptor(
- name='Visibility',
- full_name='aapt.pb.Visibility',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='level', full_name='aapt.pb.Visibility.level', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Visibility.source', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Visibility.comment', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='staged_api', full_name='aapt.pb.Visibility.staged_api', index=3,
- number=4, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _VISIBILITY_LEVEL,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=743,
- serialized_end=914,
-)
-
-
-_ALLOWNEW = _descriptor.Descriptor(
- name='AllowNew',
- full_name='aapt.pb.AllowNew',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.AllowNew.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.AllowNew.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=916,
- serialized_end=976,
-)
-
-
-_OVERLAYABLE = _descriptor.Descriptor(
- name='Overlayable',
- full_name='aapt.pb.Overlayable',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.Overlayable.name', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Overlayable.source', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='actor', full_name='aapt.pb.Overlayable.actor', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=978,
- serialized_end=1053,
-)
-
-
-_OVERLAYABLEITEM = _descriptor.Descriptor(
- name='OverlayableItem',
- full_name='aapt.pb.OverlayableItem',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.OverlayableItem.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.OverlayableItem.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='policy', full_name='aapt.pb.OverlayableItem.policy', index=2,
- number=3, type=14, cpp_type=8, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='overlayable_idx', full_name='aapt.pb.OverlayableItem.overlayable_idx', index=3,
- number=4, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _OVERLAYABLEITEM_POLICY,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1056,
- serialized_end=1333,
-)
-
-
-_STAGEDID = _descriptor.Descriptor(
- name='StagedId',
- full_name='aapt.pb.StagedId',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.StagedId.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='staged_id', full_name='aapt.pb.StagedId.staged_id', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1335,
- serialized_end=1397,
-)
-
-
-_ENTRYID = _descriptor.Descriptor(
- name='EntryId',
- full_name='aapt.pb.EntryId',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='id', full_name='aapt.pb.EntryId.id', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1399,
- serialized_end=1420,
-)
-
-
-_ENTRY = _descriptor.Descriptor(
- name='Entry',
- full_name='aapt.pb.Entry',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='entry_id', full_name='aapt.pb.Entry.entry_id', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.Entry.name', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='visibility', full_name='aapt.pb.Entry.visibility', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='allow_new', full_name='aapt.pb.Entry.allow_new', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='overlayable_item', full_name='aapt.pb.Entry.overlayable_item', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='config_value', full_name='aapt.pb.Entry.config_value', index=5,
- number=6, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='staged_id', full_name='aapt.pb.Entry.staged_id', index=6,
- number=7, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1423,
- serialized_end=1693,
-)
-
-
-_CONFIGVALUE = _descriptor.Descriptor(
- name='ConfigValue',
- full_name='aapt.pb.ConfigValue',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='config', full_name='aapt.pb.ConfigValue.config', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.ConfigValue.value', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1695,
- serialized_end=1779,
-)
-
-
-_VALUE = _descriptor.Descriptor(
- name='Value',
- full_name='aapt.pb.Value',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Value.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Value.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='weak', full_name='aapt.pb.Value.weak', index=2,
- number=3, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='item', full_name='aapt.pb.Value.item', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='compound_value', full_name='aapt.pb.Value.compound_value', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='value', full_name='aapt.pb.Value.value',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=1782,
- serialized_end=1943,
-)
-
-
-_ITEM = _descriptor.Descriptor(
- name='Item',
- full_name='aapt.pb.Item',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='ref', full_name='aapt.pb.Item.ref', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='str', full_name='aapt.pb.Item.str', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='raw_str', full_name='aapt.pb.Item.raw_str', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='styled_str', full_name='aapt.pb.Item.styled_str', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='file', full_name='aapt.pb.Item.file', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='id', full_name='aapt.pb.Item.id', index=5,
- number=6, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='prim', full_name='aapt.pb.Item.prim', index=6,
- number=7, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='value', full_name='aapt.pb.Item.value',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=1946,
- serialized_end=2215,
-)
-
-
-_COMPOUNDVALUE = _descriptor.Descriptor(
- name='CompoundValue',
- full_name='aapt.pb.CompoundValue',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='attr', full_name='aapt.pb.CompoundValue.attr', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='style', full_name='aapt.pb.CompoundValue.style', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='styleable', full_name='aapt.pb.CompoundValue.styleable', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='array', full_name='aapt.pb.CompoundValue.array', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='plural', full_name='aapt.pb.CompoundValue.plural', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='macro', full_name='aapt.pb.CompoundValue.macro', index=5,
- number=6, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='value', full_name='aapt.pb.CompoundValue.value',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=2218,
- serialized_end=2457,
-)
-
-
-_BOOLEAN = _descriptor.Descriptor(
- name='Boolean',
- full_name='aapt.pb.Boolean',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.Boolean.value', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2459,
- serialized_end=2483,
-)
-
-
-_REFERENCE = _descriptor.Descriptor(
- name='Reference',
- full_name='aapt.pb.Reference',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='type', full_name='aapt.pb.Reference.type', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='id', full_name='aapt.pb.Reference.id', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.Reference.name', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='private', full_name='aapt.pb.Reference.private', index=3,
- number=4, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='is_dynamic', full_name='aapt.pb.Reference.is_dynamic', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type_flags', full_name='aapt.pb.Reference.type_flags', index=5,
- number=6, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='allow_raw', full_name='aapt.pb.Reference.allow_raw', index=6,
- number=7, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _REFERENCE_TYPE,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2486,
- serialized_end=2694,
-)
-
-
-_ID = _descriptor.Descriptor(
- name='Id',
- full_name='aapt.pb.Id',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2696,
- serialized_end=2700,
-)
-
-
-_STRING = _descriptor.Descriptor(
- name='String',
- full_name='aapt.pb.String',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.String.value', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2702,
- serialized_end=2725,
-)
-
-
-_RAWSTRING = _descriptor.Descriptor(
- name='RawString',
- full_name='aapt.pb.RawString',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.RawString.value', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2727,
- serialized_end=2753,
-)
-
-
-_STYLEDSTRING_SPAN = _descriptor.Descriptor(
- name='Span',
- full_name='aapt.pb.StyledString.Span',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='tag', full_name='aapt.pb.StyledString.Span.tag', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='first_char', full_name='aapt.pb.StyledString.Span.first_char', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='last_char', full_name='aapt.pb.StyledString.Span.last_char', index=2,
- number=3, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2829,
- serialized_end=2887,
-)
-
-_STYLEDSTRING = _descriptor.Descriptor(
- name='StyledString',
- full_name='aapt.pb.StyledString',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.StyledString.value', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='span', full_name='aapt.pb.StyledString.span', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_STYLEDSTRING_SPAN, ],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2756,
- serialized_end=2887,
-)
-
-
-_FILEREFERENCE = _descriptor.Descriptor(
- name='FileReference',
- full_name='aapt.pb.FileReference',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='path', full_name='aapt.pb.FileReference.path', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type', full_name='aapt.pb.FileReference.type', index=1,
- number=2, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _FILEREFERENCE_TYPE,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2890,
- serialized_end=3023,
-)
-
-
-_PRIMITIVE_NULLTYPE = _descriptor.Descriptor(
- name='NullType',
- full_name='aapt.pb.Primitive.NullType',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3503,
- serialized_end=3513,
-)
-
-_PRIMITIVE_EMPTYTYPE = _descriptor.Descriptor(
- name='EmptyType',
- full_name='aapt.pb.Primitive.EmptyType',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3515,
- serialized_end=3526,
-)
-
-_PRIMITIVE = _descriptor.Descriptor(
- name='Primitive',
- full_name='aapt.pb.Primitive',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='null_value', full_name='aapt.pb.Primitive.null_value', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='empty_value', full_name='aapt.pb.Primitive.empty_value', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='float_value', full_name='aapt.pb.Primitive.float_value', index=2,
- number=3, type=2, cpp_type=6, label=1,
- has_default_value=False, default_value=float(0),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='dimension_value', full_name='aapt.pb.Primitive.dimension_value', index=3,
- number=13, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='fraction_value', full_name='aapt.pb.Primitive.fraction_value', index=4,
- number=14, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='int_decimal_value', full_name='aapt.pb.Primitive.int_decimal_value', index=5,
- number=6, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='int_hexadecimal_value', full_name='aapt.pb.Primitive.int_hexadecimal_value', index=6,
- number=7, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='boolean_value', full_name='aapt.pb.Primitive.boolean_value', index=7,
- number=8, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='color_argb8_value', full_name='aapt.pb.Primitive.color_argb8_value', index=8,
- number=9, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='color_rgb8_value', full_name='aapt.pb.Primitive.color_rgb8_value', index=9,
- number=10, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='color_argb4_value', full_name='aapt.pb.Primitive.color_argb4_value', index=10,
- number=11, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='color_rgb4_value', full_name='aapt.pb.Primitive.color_rgb4_value', index=11,
- number=12, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='dimension_value_deprecated', full_name='aapt.pb.Primitive.dimension_value_deprecated', index=12,
- number=4, type=2, cpp_type=6, label=1,
- has_default_value=False, default_value=float(0),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='fraction_value_deprecated', full_name='aapt.pb.Primitive.fraction_value_deprecated', index=13,
- number=5, type=2, cpp_type=6, label=1,
- has_default_value=False, default_value=float(0),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=b'\030\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_PRIMITIVE_NULLTYPE, _PRIMITIVE_EMPTYTYPE, ],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='oneof_value', full_name='aapt.pb.Primitive.oneof_value',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=3026,
- serialized_end=3541,
-)
-
-
-_ATTRIBUTE_SYMBOL = _descriptor.Descriptor(
- name='Symbol',
- full_name='aapt.pb.Attribute.Symbol',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Attribute.Symbol.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Attribute.Symbol.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.Attribute.Symbol.name', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.Attribute.Symbol.value', index=3,
- number=4, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type', full_name='aapt.pb.Attribute.Symbol.type', index=4,
- number=5, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3656,
- serialized_end=3777,
-)
-
-_ATTRIBUTE = _descriptor.Descriptor(
- name='Attribute',
- full_name='aapt.pb.Attribute',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='format_flags', full_name='aapt.pb.Attribute.format_flags', index=0,
- number=1, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='min_int', full_name='aapt.pb.Attribute.min_int', index=1,
- number=2, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='max_int', full_name='aapt.pb.Attribute.max_int', index=2,
- number=3, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='symbol', full_name='aapt.pb.Attribute.symbol', index=3,
- number=4, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_ATTRIBUTE_SYMBOL, ],
- enum_types=[
- _ATTRIBUTE_FORMATFLAGS,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3544,
- serialized_end=3944,
-)
-
-
-_STYLE_ENTRY = _descriptor.Descriptor(
- name='Entry',
- full_name='aapt.pb.Style.Entry',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Style.Entry.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Style.Entry.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='key', full_name='aapt.pb.Style.Entry.key', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='item', full_name='aapt.pb.Style.Entry.item', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4069,
- serialized_end=4188,
-)
-
-_STYLE = _descriptor.Descriptor(
- name='Style',
- full_name='aapt.pb.Style',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='parent', full_name='aapt.pb.Style.parent', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='parent_source', full_name='aapt.pb.Style.parent_source', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='entry', full_name='aapt.pb.Style.entry', index=2,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_STYLE_ENTRY, ],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3947,
- serialized_end=4188,
-)
-
-
-_STYLEABLE_ENTRY = _descriptor.Descriptor(
- name='Entry',
- full_name='aapt.pb.Styleable.Entry',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Styleable.Entry.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Styleable.Entry.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='attr', full_name='aapt.pb.Styleable.Entry.attr', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4245,
- serialized_end=4336,
-)
-
-_STYLEABLE = _descriptor.Descriptor(
- name='Styleable',
- full_name='aapt.pb.Styleable',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='entry', full_name='aapt.pb.Styleable.entry', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_STYLEABLE_ENTRY, ],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4191,
- serialized_end=4336,
-)
-
-
-_ARRAY_ELEMENT = _descriptor.Descriptor(
- name='Element',
- full_name='aapt.pb.Array.Element',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Array.Element.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Array.Element.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='item', full_name='aapt.pb.Array.Element.item', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4389,
- serialized_end=4477,
-)
-
-_ARRAY = _descriptor.Descriptor(
- name='Array',
- full_name='aapt.pb.Array',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='element', full_name='aapt.pb.Array.element', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_ARRAY_ELEMENT, ],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4339,
- serialized_end=4477,
-)
-
-
-_PLURAL_ENTRY = _descriptor.Descriptor(
- name='Entry',
- full_name='aapt.pb.Plural.Entry',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.Plural.Entry.source', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='comment', full_name='aapt.pb.Plural.Entry.comment', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='arity', full_name='aapt.pb.Plural.Entry.arity', index=2,
- number=3, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='item', full_name='aapt.pb.Plural.Entry.item', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4528,
- serialized_end=4652,
-)
-
-_PLURAL = _descriptor.Descriptor(
- name='Plural',
- full_name='aapt.pb.Plural',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='entry', full_name='aapt.pb.Plural.entry', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_PLURAL_ENTRY, ],
- enum_types=[
- _PLURAL_ARITY,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4480,
- serialized_end=4719,
-)
-
-
-_XMLNODE = _descriptor.Descriptor(
- name='XmlNode',
- full_name='aapt.pb.XmlNode',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='element', full_name='aapt.pb.XmlNode.element', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='text', full_name='aapt.pb.XmlNode.text', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.XmlNode.source', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='node', full_name='aapt.pb.XmlNode.node',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=4721,
- serialized_end=4835,
-)
-
-
-_XMLELEMENT = _descriptor.Descriptor(
- name='XmlElement',
- full_name='aapt.pb.XmlElement',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='namespace_declaration', full_name='aapt.pb.XmlElement.namespace_declaration', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='namespace_uri', full_name='aapt.pb.XmlElement.namespace_uri', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.XmlElement.name', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='attribute', full_name='aapt.pb.XmlElement.attribute', index=3,
- number=4, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='child', full_name='aapt.pb.XmlElement.child', index=4,
- number=5, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=4838,
- serialized_end=5016,
-)
-
-
-_XMLNAMESPACE = _descriptor.Descriptor(
- name='XmlNamespace',
- full_name='aapt.pb.XmlNamespace',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='prefix', full_name='aapt.pb.XmlNamespace.prefix', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='uri', full_name='aapt.pb.XmlNamespace.uri', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.XmlNamespace.source', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5018,
- serialized_end=5102,
-)
-
-
-_XMLATTRIBUTE = _descriptor.Descriptor(
- name='XmlAttribute',
- full_name='aapt.pb.XmlAttribute',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='namespace_uri', full_name='aapt.pb.XmlAttribute.namespace_uri', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.XmlAttribute.name', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='value', full_name='aapt.pb.XmlAttribute.value', index=2,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.XmlAttribute.source', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='resource_id', full_name='aapt.pb.XmlAttribute.resource_id', index=4,
- number=5, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='compiled_item', full_name='aapt.pb.XmlAttribute.compiled_item', index=5,
- number=6, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5105,
- serialized_end=5271,
-)
-
-
-_MACROBODY = _descriptor.Descriptor(
- name='MacroBody',
- full_name='aapt.pb.MacroBody',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='raw_string', full_name='aapt.pb.MacroBody.raw_string', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='style_string', full_name='aapt.pb.MacroBody.style_string', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='untranslatable_sections', full_name='aapt.pb.MacroBody.untranslatable_sections', index=2,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='namespace_stack', full_name='aapt.pb.MacroBody.namespace_stack', index=3,
- number=4, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='source', full_name='aapt.pb.MacroBody.source', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5274,
- serialized_end=5505,
-)
-
-
-_NAMESPACEALIAS = _descriptor.Descriptor(
- name='NamespaceAlias',
- full_name='aapt.pb.NamespaceAlias',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='prefix', full_name='aapt.pb.NamespaceAlias.prefix', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='package_name', full_name='aapt.pb.NamespaceAlias.package_name', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='is_private', full_name='aapt.pb.NamespaceAlias.is_private', index=2,
- number=3, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5507,
- serialized_end=5581,
-)
-
-
-_STYLESTRING_SPAN = _descriptor.Descriptor(
- name='Span',
- full_name='aapt.pb.StyleString.Span',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='name', full_name='aapt.pb.StyleString.Span.name', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='start_index', full_name='aapt.pb.StyleString.Span.start_index', index=1,
- number=2, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='end_index', full_name='aapt.pb.StyleString.Span.end_index', index=2,
- number=3, type=13, cpp_type=3, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5654,
- serialized_end=5714,
-)
-
-_STYLESTRING = _descriptor.Descriptor(
- name='StyleString',
- full_name='aapt.pb.StyleString',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='str', full_name='aapt.pb.StyleString.str', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='spans', full_name='aapt.pb.StyleString.spans', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[_STYLESTRING_SPAN, ],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5584,
- serialized_end=5714,
-)
-
-
-_UNTRANSLATABLESECTION = _descriptor.Descriptor(
- name='UntranslatableSection',
- full_name='aapt.pb.UntranslatableSection',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='start_index', full_name='aapt.pb.UntranslatableSection.start_index', index=0,
- number=1, type=4, cpp_type=4, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='end_index', full_name='aapt.pb.UntranslatableSection.end_index', index=1,
- number=2, type=4, cpp_type=4, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=5716,
- serialized_end=5779,
-)
-
-_SOURCE.fields_by_name['position'].message_type = _SOURCEPOSITION
-_RESOURCETABLE.fields_by_name['source_pool'].message_type = _STRINGPOOL
-_RESOURCETABLE.fields_by_name['package'].message_type = _PACKAGE
-_RESOURCETABLE.fields_by_name['overlayable'].message_type = _OVERLAYABLE
-_RESOURCETABLE.fields_by_name['tool_fingerprint'].message_type = _TOOLFINGERPRINT
-_PACKAGE.fields_by_name['package_id'].message_type = _PACKAGEID
-_PACKAGE.fields_by_name['type'].message_type = _TYPE
-_TYPE.fields_by_name['type_id'].message_type = _TYPEID
-_TYPE.fields_by_name['entry'].message_type = _ENTRY
-_VISIBILITY.fields_by_name['level'].enum_type = _VISIBILITY_LEVEL
-_VISIBILITY.fields_by_name['source'].message_type = _SOURCE
-_VISIBILITY_LEVEL.containing_type = _VISIBILITY
-_ALLOWNEW.fields_by_name['source'].message_type = _SOURCE
-_OVERLAYABLE.fields_by_name['source'].message_type = _SOURCE
-_OVERLAYABLEITEM.fields_by_name['source'].message_type = _SOURCE
-_OVERLAYABLEITEM.fields_by_name['policy'].enum_type = _OVERLAYABLEITEM_POLICY
-_OVERLAYABLEITEM_POLICY.containing_type = _OVERLAYABLEITEM
-_STAGEDID.fields_by_name['source'].message_type = _SOURCE
-_ENTRY.fields_by_name['entry_id'].message_type = _ENTRYID
-_ENTRY.fields_by_name['visibility'].message_type = _VISIBILITY
-_ENTRY.fields_by_name['allow_new'].message_type = _ALLOWNEW
-_ENTRY.fields_by_name['overlayable_item'].message_type = _OVERLAYABLEITEM
-_ENTRY.fields_by_name['config_value'].message_type = _CONFIGVALUE
-_ENTRY.fields_by_name['staged_id'].message_type = _STAGEDID
-_CONFIGVALUE.fields_by_name['config'].message_type = frameworks_dot_base_dot_tools_dot_aapt2_dot_Configuration__pb2._CONFIGURATION
-_CONFIGVALUE.fields_by_name['value'].message_type = _VALUE
-_VALUE.fields_by_name['source'].message_type = _SOURCE
-_VALUE.fields_by_name['item'].message_type = _ITEM
-_VALUE.fields_by_name['compound_value'].message_type = _COMPOUNDVALUE
-_VALUE.oneofs_by_name['value'].fields.append(
- _VALUE.fields_by_name['item'])
-_VALUE.fields_by_name['item'].containing_oneof = _VALUE.oneofs_by_name['value']
-_VALUE.oneofs_by_name['value'].fields.append(
- _VALUE.fields_by_name['compound_value'])
-_VALUE.fields_by_name['compound_value'].containing_oneof = _VALUE.oneofs_by_name['value']
-_ITEM.fields_by_name['ref'].message_type = _REFERENCE
-_ITEM.fields_by_name['str'].message_type = _STRING
-_ITEM.fields_by_name['raw_str'].message_type = _RAWSTRING
-_ITEM.fields_by_name['styled_str'].message_type = _STYLEDSTRING
-_ITEM.fields_by_name['file'].message_type = _FILEREFERENCE
-_ITEM.fields_by_name['id'].message_type = _ID
-_ITEM.fields_by_name['prim'].message_type = _PRIMITIVE
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['ref'])
-_ITEM.fields_by_name['ref'].containing_oneof = _ITEM.oneofs_by_name['value']
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['str'])
-_ITEM.fields_by_name['str'].containing_oneof = _ITEM.oneofs_by_name['value']
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['raw_str'])
-_ITEM.fields_by_name['raw_str'].containing_oneof = _ITEM.oneofs_by_name['value']
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['styled_str'])
-_ITEM.fields_by_name['styled_str'].containing_oneof = _ITEM.oneofs_by_name['value']
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['file'])
-_ITEM.fields_by_name['file'].containing_oneof = _ITEM.oneofs_by_name['value']
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['id'])
-_ITEM.fields_by_name['id'].containing_oneof = _ITEM.oneofs_by_name['value']
-_ITEM.oneofs_by_name['value'].fields.append(
- _ITEM.fields_by_name['prim'])
-_ITEM.fields_by_name['prim'].containing_oneof = _ITEM.oneofs_by_name['value']
-_COMPOUNDVALUE.fields_by_name['attr'].message_type = _ATTRIBUTE
-_COMPOUNDVALUE.fields_by_name['style'].message_type = _STYLE
-_COMPOUNDVALUE.fields_by_name['styleable'].message_type = _STYLEABLE
-_COMPOUNDVALUE.fields_by_name['array'].message_type = _ARRAY
-_COMPOUNDVALUE.fields_by_name['plural'].message_type = _PLURAL
-_COMPOUNDVALUE.fields_by_name['macro'].message_type = _MACROBODY
-_COMPOUNDVALUE.oneofs_by_name['value'].fields.append(
- _COMPOUNDVALUE.fields_by_name['attr'])
-_COMPOUNDVALUE.fields_by_name['attr'].containing_oneof = _COMPOUNDVALUE.oneofs_by_name['value']
-_COMPOUNDVALUE.oneofs_by_name['value'].fields.append(
- _COMPOUNDVALUE.fields_by_name['style'])
-_COMPOUNDVALUE.fields_by_name['style'].containing_oneof = _COMPOUNDVALUE.oneofs_by_name['value']
-_COMPOUNDVALUE.oneofs_by_name['value'].fields.append(
- _COMPOUNDVALUE.fields_by_name['styleable'])
-_COMPOUNDVALUE.fields_by_name['styleable'].containing_oneof = _COMPOUNDVALUE.oneofs_by_name['value']
-_COMPOUNDVALUE.oneofs_by_name['value'].fields.append(
- _COMPOUNDVALUE.fields_by_name['array'])
-_COMPOUNDVALUE.fields_by_name['array'].containing_oneof = _COMPOUNDVALUE.oneofs_by_name['value']
-_COMPOUNDVALUE.oneofs_by_name['value'].fields.append(
- _COMPOUNDVALUE.fields_by_name['plural'])
-_COMPOUNDVALUE.fields_by_name['plural'].containing_oneof = _COMPOUNDVALUE.oneofs_by_name['value']
-_COMPOUNDVALUE.oneofs_by_name['value'].fields.append(
- _COMPOUNDVALUE.fields_by_name['macro'])
-_COMPOUNDVALUE.fields_by_name['macro'].containing_oneof = _COMPOUNDVALUE.oneofs_by_name['value']
-_REFERENCE.fields_by_name['type'].enum_type = _REFERENCE_TYPE
-_REFERENCE.fields_by_name['is_dynamic'].message_type = _BOOLEAN
-_REFERENCE_TYPE.containing_type = _REFERENCE
-_STYLEDSTRING_SPAN.containing_type = _STYLEDSTRING
-_STYLEDSTRING.fields_by_name['span'].message_type = _STYLEDSTRING_SPAN
-_FILEREFERENCE.fields_by_name['type'].enum_type = _FILEREFERENCE_TYPE
-_FILEREFERENCE_TYPE.containing_type = _FILEREFERENCE
-_PRIMITIVE_NULLTYPE.containing_type = _PRIMITIVE
-_PRIMITIVE_EMPTYTYPE.containing_type = _PRIMITIVE
-_PRIMITIVE.fields_by_name['null_value'].message_type = _PRIMITIVE_NULLTYPE
-_PRIMITIVE.fields_by_name['empty_value'].message_type = _PRIMITIVE_EMPTYTYPE
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['null_value'])
-_PRIMITIVE.fields_by_name['null_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['empty_value'])
-_PRIMITIVE.fields_by_name['empty_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['float_value'])
-_PRIMITIVE.fields_by_name['float_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['dimension_value'])
-_PRIMITIVE.fields_by_name['dimension_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['fraction_value'])
-_PRIMITIVE.fields_by_name['fraction_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['int_decimal_value'])
-_PRIMITIVE.fields_by_name['int_decimal_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['int_hexadecimal_value'])
-_PRIMITIVE.fields_by_name['int_hexadecimal_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['boolean_value'])
-_PRIMITIVE.fields_by_name['boolean_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['color_argb8_value'])
-_PRIMITIVE.fields_by_name['color_argb8_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['color_rgb8_value'])
-_PRIMITIVE.fields_by_name['color_rgb8_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['color_argb4_value'])
-_PRIMITIVE.fields_by_name['color_argb4_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['color_rgb4_value'])
-_PRIMITIVE.fields_by_name['color_rgb4_value'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['dimension_value_deprecated'])
-_PRIMITIVE.fields_by_name['dimension_value_deprecated'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_PRIMITIVE.oneofs_by_name['oneof_value'].fields.append(
- _PRIMITIVE.fields_by_name['fraction_value_deprecated'])
-_PRIMITIVE.fields_by_name['fraction_value_deprecated'].containing_oneof = _PRIMITIVE.oneofs_by_name['oneof_value']
-_ATTRIBUTE_SYMBOL.fields_by_name['source'].message_type = _SOURCE
-_ATTRIBUTE_SYMBOL.fields_by_name['name'].message_type = _REFERENCE
-_ATTRIBUTE_SYMBOL.containing_type = _ATTRIBUTE
-_ATTRIBUTE.fields_by_name['symbol'].message_type = _ATTRIBUTE_SYMBOL
-_ATTRIBUTE_FORMATFLAGS.containing_type = _ATTRIBUTE
-_STYLE_ENTRY.fields_by_name['source'].message_type = _SOURCE
-_STYLE_ENTRY.fields_by_name['key'].message_type = _REFERENCE
-_STYLE_ENTRY.fields_by_name['item'].message_type = _ITEM
-_STYLE_ENTRY.containing_type = _STYLE
-_STYLE.fields_by_name['parent'].message_type = _REFERENCE
-_STYLE.fields_by_name['parent_source'].message_type = _SOURCE
-_STYLE.fields_by_name['entry'].message_type = _STYLE_ENTRY
-_STYLEABLE_ENTRY.fields_by_name['source'].message_type = _SOURCE
-_STYLEABLE_ENTRY.fields_by_name['attr'].message_type = _REFERENCE
-_STYLEABLE_ENTRY.containing_type = _STYLEABLE
-_STYLEABLE.fields_by_name['entry'].message_type = _STYLEABLE_ENTRY
-_ARRAY_ELEMENT.fields_by_name['source'].message_type = _SOURCE
-_ARRAY_ELEMENT.fields_by_name['item'].message_type = _ITEM
-_ARRAY_ELEMENT.containing_type = _ARRAY
-_ARRAY.fields_by_name['element'].message_type = _ARRAY_ELEMENT
-_PLURAL_ENTRY.fields_by_name['source'].message_type = _SOURCE
-_PLURAL_ENTRY.fields_by_name['arity'].enum_type = _PLURAL_ARITY
-_PLURAL_ENTRY.fields_by_name['item'].message_type = _ITEM
-_PLURAL_ENTRY.containing_type = _PLURAL
-_PLURAL.fields_by_name['entry'].message_type = _PLURAL_ENTRY
-_PLURAL_ARITY.containing_type = _PLURAL
-_XMLNODE.fields_by_name['element'].message_type = _XMLELEMENT
-_XMLNODE.fields_by_name['source'].message_type = _SOURCEPOSITION
-_XMLNODE.oneofs_by_name['node'].fields.append(
- _XMLNODE.fields_by_name['element'])
-_XMLNODE.fields_by_name['element'].containing_oneof = _XMLNODE.oneofs_by_name['node']
-_XMLNODE.oneofs_by_name['node'].fields.append(
- _XMLNODE.fields_by_name['text'])
-_XMLNODE.fields_by_name['text'].containing_oneof = _XMLNODE.oneofs_by_name['node']
-_XMLELEMENT.fields_by_name['namespace_declaration'].message_type = _XMLNAMESPACE
-_XMLELEMENT.fields_by_name['attribute'].message_type = _XMLATTRIBUTE
-_XMLELEMENT.fields_by_name['child'].message_type = _XMLNODE
-_XMLNAMESPACE.fields_by_name['source'].message_type = _SOURCEPOSITION
-_XMLATTRIBUTE.fields_by_name['source'].message_type = _SOURCEPOSITION
-_XMLATTRIBUTE.fields_by_name['compiled_item'].message_type = _ITEM
-_MACROBODY.fields_by_name['style_string'].message_type = _STYLESTRING
-_MACROBODY.fields_by_name['untranslatable_sections'].message_type = _UNTRANSLATABLESECTION
-_MACROBODY.fields_by_name['namespace_stack'].message_type = _NAMESPACEALIAS
-_MACROBODY.fields_by_name['source'].message_type = _SOURCEPOSITION
-_STYLESTRING_SPAN.containing_type = _STYLESTRING
-_STYLESTRING.fields_by_name['spans'].message_type = _STYLESTRING_SPAN
-DESCRIPTOR.message_types_by_name['StringPool'] = _STRINGPOOL
-DESCRIPTOR.message_types_by_name['SourcePosition'] = _SOURCEPOSITION
-DESCRIPTOR.message_types_by_name['Source'] = _SOURCE
-DESCRIPTOR.message_types_by_name['ToolFingerprint'] = _TOOLFINGERPRINT
-DESCRIPTOR.message_types_by_name['ResourceTable'] = _RESOURCETABLE
-DESCRIPTOR.message_types_by_name['PackageId'] = _PACKAGEID
-DESCRIPTOR.message_types_by_name['Package'] = _PACKAGE
-DESCRIPTOR.message_types_by_name['TypeId'] = _TYPEID
-DESCRIPTOR.message_types_by_name['Type'] = _TYPE
-DESCRIPTOR.message_types_by_name['Visibility'] = _VISIBILITY
-DESCRIPTOR.message_types_by_name['AllowNew'] = _ALLOWNEW
-DESCRIPTOR.message_types_by_name['Overlayable'] = _OVERLAYABLE
-DESCRIPTOR.message_types_by_name['OverlayableItem'] = _OVERLAYABLEITEM
-DESCRIPTOR.message_types_by_name['StagedId'] = _STAGEDID
-DESCRIPTOR.message_types_by_name['EntryId'] = _ENTRYID
-DESCRIPTOR.message_types_by_name['Entry'] = _ENTRY
-DESCRIPTOR.message_types_by_name['ConfigValue'] = _CONFIGVALUE
-DESCRIPTOR.message_types_by_name['Value'] = _VALUE
-DESCRIPTOR.message_types_by_name['Item'] = _ITEM
-DESCRIPTOR.message_types_by_name['CompoundValue'] = _COMPOUNDVALUE
-DESCRIPTOR.message_types_by_name['Boolean'] = _BOOLEAN
-DESCRIPTOR.message_types_by_name['Reference'] = _REFERENCE
-DESCRIPTOR.message_types_by_name['Id'] = _ID
-DESCRIPTOR.message_types_by_name['String'] = _STRING
-DESCRIPTOR.message_types_by_name['RawString'] = _RAWSTRING
-DESCRIPTOR.message_types_by_name['StyledString'] = _STYLEDSTRING
-DESCRIPTOR.message_types_by_name['FileReference'] = _FILEREFERENCE
-DESCRIPTOR.message_types_by_name['Primitive'] = _PRIMITIVE
-DESCRIPTOR.message_types_by_name['Attribute'] = _ATTRIBUTE
-DESCRIPTOR.message_types_by_name['Style'] = _STYLE
-DESCRIPTOR.message_types_by_name['Styleable'] = _STYLEABLE
-DESCRIPTOR.message_types_by_name['Array'] = _ARRAY
-DESCRIPTOR.message_types_by_name['Plural'] = _PLURAL
-DESCRIPTOR.message_types_by_name['XmlNode'] = _XMLNODE
-DESCRIPTOR.message_types_by_name['XmlElement'] = _XMLELEMENT
-DESCRIPTOR.message_types_by_name['XmlNamespace'] = _XMLNAMESPACE
-DESCRIPTOR.message_types_by_name['XmlAttribute'] = _XMLATTRIBUTE
-DESCRIPTOR.message_types_by_name['MacroBody'] = _MACROBODY
-DESCRIPTOR.message_types_by_name['NamespaceAlias'] = _NAMESPACEALIAS
-DESCRIPTOR.message_types_by_name['StyleString'] = _STYLESTRING
-DESCRIPTOR.message_types_by_name['UntranslatableSection'] = _UNTRANSLATABLESECTION
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-StringPool = _reflection.GeneratedProtocolMessageType('StringPool', (_message.Message,), {
- 'DESCRIPTOR' : _STRINGPOOL,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.StringPool)
- })
-_sym_db.RegisterMessage(StringPool)
-
-SourcePosition = _reflection.GeneratedProtocolMessageType('SourcePosition', (_message.Message,), {
- 'DESCRIPTOR' : _SOURCEPOSITION,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.SourcePosition)
- })
-_sym_db.RegisterMessage(SourcePosition)
-
-Source = _reflection.GeneratedProtocolMessageType('Source', (_message.Message,), {
- 'DESCRIPTOR' : _SOURCE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Source)
- })
-_sym_db.RegisterMessage(Source)
-
-ToolFingerprint = _reflection.GeneratedProtocolMessageType('ToolFingerprint', (_message.Message,), {
- 'DESCRIPTOR' : _TOOLFINGERPRINT,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.ToolFingerprint)
- })
-_sym_db.RegisterMessage(ToolFingerprint)
-
-ResourceTable = _reflection.GeneratedProtocolMessageType('ResourceTable', (_message.Message,), {
- 'DESCRIPTOR' : _RESOURCETABLE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.ResourceTable)
- })
-_sym_db.RegisterMessage(ResourceTable)
-
-PackageId = _reflection.GeneratedProtocolMessageType('PackageId', (_message.Message,), {
- 'DESCRIPTOR' : _PACKAGEID,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.PackageId)
- })
-_sym_db.RegisterMessage(PackageId)
-
-Package = _reflection.GeneratedProtocolMessageType('Package', (_message.Message,), {
- 'DESCRIPTOR' : _PACKAGE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Package)
- })
-_sym_db.RegisterMessage(Package)
-
-TypeId = _reflection.GeneratedProtocolMessageType('TypeId', (_message.Message,), {
- 'DESCRIPTOR' : _TYPEID,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.TypeId)
- })
-_sym_db.RegisterMessage(TypeId)
-
-Type = _reflection.GeneratedProtocolMessageType('Type', (_message.Message,), {
- 'DESCRIPTOR' : _TYPE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Type)
- })
-_sym_db.RegisterMessage(Type)
-
-Visibility = _reflection.GeneratedProtocolMessageType('Visibility', (_message.Message,), {
- 'DESCRIPTOR' : _VISIBILITY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Visibility)
- })
-_sym_db.RegisterMessage(Visibility)
-
-AllowNew = _reflection.GeneratedProtocolMessageType('AllowNew', (_message.Message,), {
- 'DESCRIPTOR' : _ALLOWNEW,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.AllowNew)
- })
-_sym_db.RegisterMessage(AllowNew)
-
-Overlayable = _reflection.GeneratedProtocolMessageType('Overlayable', (_message.Message,), {
- 'DESCRIPTOR' : _OVERLAYABLE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Overlayable)
- })
-_sym_db.RegisterMessage(Overlayable)
-
-OverlayableItem = _reflection.GeneratedProtocolMessageType('OverlayableItem', (_message.Message,), {
- 'DESCRIPTOR' : _OVERLAYABLEITEM,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.OverlayableItem)
- })
-_sym_db.RegisterMessage(OverlayableItem)
-
-StagedId = _reflection.GeneratedProtocolMessageType('StagedId', (_message.Message,), {
- 'DESCRIPTOR' : _STAGEDID,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.StagedId)
- })
-_sym_db.RegisterMessage(StagedId)
-
-EntryId = _reflection.GeneratedProtocolMessageType('EntryId', (_message.Message,), {
- 'DESCRIPTOR' : _ENTRYID,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.EntryId)
- })
-_sym_db.RegisterMessage(EntryId)
-
-Entry = _reflection.GeneratedProtocolMessageType('Entry', (_message.Message,), {
- 'DESCRIPTOR' : _ENTRY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Entry)
- })
-_sym_db.RegisterMessage(Entry)
-
-ConfigValue = _reflection.GeneratedProtocolMessageType('ConfigValue', (_message.Message,), {
- 'DESCRIPTOR' : _CONFIGVALUE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.ConfigValue)
- })
-_sym_db.RegisterMessage(ConfigValue)
-
-Value = _reflection.GeneratedProtocolMessageType('Value', (_message.Message,), {
- 'DESCRIPTOR' : _VALUE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Value)
- })
-_sym_db.RegisterMessage(Value)
-
-Item = _reflection.GeneratedProtocolMessageType('Item', (_message.Message,), {
- 'DESCRIPTOR' : _ITEM,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Item)
- })
-_sym_db.RegisterMessage(Item)
-
-CompoundValue = _reflection.GeneratedProtocolMessageType('CompoundValue', (_message.Message,), {
- 'DESCRIPTOR' : _COMPOUNDVALUE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.CompoundValue)
- })
-_sym_db.RegisterMessage(CompoundValue)
-
-Boolean = _reflection.GeneratedProtocolMessageType('Boolean', (_message.Message,), {
- 'DESCRIPTOR' : _BOOLEAN,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Boolean)
- })
-_sym_db.RegisterMessage(Boolean)
-
-Reference = _reflection.GeneratedProtocolMessageType('Reference', (_message.Message,), {
- 'DESCRIPTOR' : _REFERENCE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Reference)
- })
-_sym_db.RegisterMessage(Reference)
-
-Id = _reflection.GeneratedProtocolMessageType('Id', (_message.Message,), {
- 'DESCRIPTOR' : _ID,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Id)
- })
-_sym_db.RegisterMessage(Id)
-
-String = _reflection.GeneratedProtocolMessageType('String', (_message.Message,), {
- 'DESCRIPTOR' : _STRING,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.String)
- })
-_sym_db.RegisterMessage(String)
-
-RawString = _reflection.GeneratedProtocolMessageType('RawString', (_message.Message,), {
- 'DESCRIPTOR' : _RAWSTRING,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.RawString)
- })
-_sym_db.RegisterMessage(RawString)
-
-StyledString = _reflection.GeneratedProtocolMessageType('StyledString', (_message.Message,), {
-
- 'Span' : _reflection.GeneratedProtocolMessageType('Span', (_message.Message,), {
- 'DESCRIPTOR' : _STYLEDSTRING_SPAN,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.StyledString.Span)
- })
- ,
- 'DESCRIPTOR' : _STYLEDSTRING,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.StyledString)
- })
-_sym_db.RegisterMessage(StyledString)
-_sym_db.RegisterMessage(StyledString.Span)
-
-FileReference = _reflection.GeneratedProtocolMessageType('FileReference', (_message.Message,), {
- 'DESCRIPTOR' : _FILEREFERENCE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.FileReference)
- })
-_sym_db.RegisterMessage(FileReference)
-
-Primitive = _reflection.GeneratedProtocolMessageType('Primitive', (_message.Message,), {
-
- 'NullType' : _reflection.GeneratedProtocolMessageType('NullType', (_message.Message,), {
- 'DESCRIPTOR' : _PRIMITIVE_NULLTYPE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Primitive.NullType)
- })
- ,
-
- 'EmptyType' : _reflection.GeneratedProtocolMessageType('EmptyType', (_message.Message,), {
- 'DESCRIPTOR' : _PRIMITIVE_EMPTYTYPE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Primitive.EmptyType)
- })
- ,
- 'DESCRIPTOR' : _PRIMITIVE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Primitive)
- })
-_sym_db.RegisterMessage(Primitive)
-_sym_db.RegisterMessage(Primitive.NullType)
-_sym_db.RegisterMessage(Primitive.EmptyType)
-
-Attribute = _reflection.GeneratedProtocolMessageType('Attribute', (_message.Message,), {
-
- 'Symbol' : _reflection.GeneratedProtocolMessageType('Symbol', (_message.Message,), {
- 'DESCRIPTOR' : _ATTRIBUTE_SYMBOL,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Attribute.Symbol)
- })
- ,
- 'DESCRIPTOR' : _ATTRIBUTE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Attribute)
- })
-_sym_db.RegisterMessage(Attribute)
-_sym_db.RegisterMessage(Attribute.Symbol)
-
-Style = _reflection.GeneratedProtocolMessageType('Style', (_message.Message,), {
-
- 'Entry' : _reflection.GeneratedProtocolMessageType('Entry', (_message.Message,), {
- 'DESCRIPTOR' : _STYLE_ENTRY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Style.Entry)
- })
- ,
- 'DESCRIPTOR' : _STYLE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Style)
- })
-_sym_db.RegisterMessage(Style)
-_sym_db.RegisterMessage(Style.Entry)
-
-Styleable = _reflection.GeneratedProtocolMessageType('Styleable', (_message.Message,), {
-
- 'Entry' : _reflection.GeneratedProtocolMessageType('Entry', (_message.Message,), {
- 'DESCRIPTOR' : _STYLEABLE_ENTRY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Styleable.Entry)
- })
- ,
- 'DESCRIPTOR' : _STYLEABLE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Styleable)
- })
-_sym_db.RegisterMessage(Styleable)
-_sym_db.RegisterMessage(Styleable.Entry)
-
-Array = _reflection.GeneratedProtocolMessageType('Array', (_message.Message,), {
-
- 'Element' : _reflection.GeneratedProtocolMessageType('Element', (_message.Message,), {
- 'DESCRIPTOR' : _ARRAY_ELEMENT,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Array.Element)
- })
- ,
- 'DESCRIPTOR' : _ARRAY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Array)
- })
-_sym_db.RegisterMessage(Array)
-_sym_db.RegisterMessage(Array.Element)
-
-Plural = _reflection.GeneratedProtocolMessageType('Plural', (_message.Message,), {
-
- 'Entry' : _reflection.GeneratedProtocolMessageType('Entry', (_message.Message,), {
- 'DESCRIPTOR' : _PLURAL_ENTRY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Plural.Entry)
- })
- ,
- 'DESCRIPTOR' : _PLURAL,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.Plural)
- })
-_sym_db.RegisterMessage(Plural)
-_sym_db.RegisterMessage(Plural.Entry)
-
-XmlNode = _reflection.GeneratedProtocolMessageType('XmlNode', (_message.Message,), {
- 'DESCRIPTOR' : _XMLNODE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.XmlNode)
- })
-_sym_db.RegisterMessage(XmlNode)
-
-XmlElement = _reflection.GeneratedProtocolMessageType('XmlElement', (_message.Message,), {
- 'DESCRIPTOR' : _XMLELEMENT,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.XmlElement)
- })
-_sym_db.RegisterMessage(XmlElement)
-
-XmlNamespace = _reflection.GeneratedProtocolMessageType('XmlNamespace', (_message.Message,), {
- 'DESCRIPTOR' : _XMLNAMESPACE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.XmlNamespace)
- })
-_sym_db.RegisterMessage(XmlNamespace)
-
-XmlAttribute = _reflection.GeneratedProtocolMessageType('XmlAttribute', (_message.Message,), {
- 'DESCRIPTOR' : _XMLATTRIBUTE,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.XmlAttribute)
- })
-_sym_db.RegisterMessage(XmlAttribute)
-
-MacroBody = _reflection.GeneratedProtocolMessageType('MacroBody', (_message.Message,), {
- 'DESCRIPTOR' : _MACROBODY,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.MacroBody)
- })
-_sym_db.RegisterMessage(MacroBody)
-
-NamespaceAlias = _reflection.GeneratedProtocolMessageType('NamespaceAlias', (_message.Message,), {
- 'DESCRIPTOR' : _NAMESPACEALIAS,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.NamespaceAlias)
- })
-_sym_db.RegisterMessage(NamespaceAlias)
-
-StyleString = _reflection.GeneratedProtocolMessageType('StyleString', (_message.Message,), {
-
- 'Span' : _reflection.GeneratedProtocolMessageType('Span', (_message.Message,), {
- 'DESCRIPTOR' : _STYLESTRING_SPAN,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.StyleString.Span)
- })
- ,
- 'DESCRIPTOR' : _STYLESTRING,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.StyleString)
- })
-_sym_db.RegisterMessage(StyleString)
-_sym_db.RegisterMessage(StyleString.Span)
-
-UntranslatableSection = _reflection.GeneratedProtocolMessageType('UntranslatableSection', (_message.Message,), {
- 'DESCRIPTOR' : _UNTRANSLATABLESECTION,
- '__module__' : 'frameworks.base.tools.aapt2.Resources_pb2'
- # @@protoc_insertion_point(class_scope:aapt.pb.UntranslatableSection)
- })
-_sym_db.RegisterMessage(UntranslatableSection)
-
-
-DESCRIPTOR._options = None
-_PRIMITIVE.fields_by_name['dimension_value_deprecated']._options = None
-_PRIMITIVE.fields_by_name['fraction_value_deprecated']._options = None
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n+frameworks/base/tools/aapt2/Resources.proto\x12\x07\x61\x61pt.pb\x1a/frameworks/base/tools/aapt2/Configuration.proto\"\x1a\n\nStringPool\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\"<\n\x0eSourcePosition\x12\x13\n\x0bline_number\x18\x01 \x01(\r\x12\x15\n\rcolumn_number\x18\x02 \x01(\r\"E\n\x06Source\x12\x10\n\x08path_idx\x18\x01 \x01(\r\x12)\n\x08position\x18\x02 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\"0\n\x0fToolFingerprint\x12\x0c\n\x04tool\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\"O\n\x0f\x44ynamicRefTable\x12&\n\npackage_id\x18\x01 \x01(\x0b\x32\x12.aapt.pb.PackageId\x12\x14\n\x0cpackage_name\x18\x02 \x01(\t\"\xf0\x01\n\rResourceTable\x12(\n\x0bsource_pool\x18\x01 \x01(\x0b\x32\x13.aapt.pb.StringPool\x12!\n\x07package\x18\x02 \x03(\x0b\x32\x10.aapt.pb.Package\x12)\n\x0boverlayable\x18\x03 \x03(\x0b\x32\x14.aapt.pb.Overlayable\x12\x32\n\x10tool_fingerprint\x18\x04 \x03(\x0b\x32\x18.aapt.pb.ToolFingerprint\x12\x33\n\x11\x64ynamic_ref_table\x18\x05 \x03(\x0b\x32\x18.aapt.pb.DynamicRefTable\"\x17\n\tPackageId\x12\n\n\x02id\x18\x01 \x01(\r\"d\n\x07Package\x12&\n\npackage_id\x18\x01 \x01(\x0b\x32\x12.aapt.pb.PackageId\x12\x14\n\x0cpackage_name\x18\x02 \x01(\t\x12\x1b\n\x04type\x18\x03 \x03(\x0b\x32\r.aapt.pb.Type\"\x14\n\x06TypeId\x12\n\n\x02id\x18\x01 \x01(\r\"U\n\x04Type\x12 \n\x07type_id\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.TypeId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x1d\n\x05\x65ntry\x18\x03 \x03(\x0b\x32\x0e.aapt.pb.Entry\"\xab\x01\n\nVisibility\x12(\n\x05level\x18\x01 \x01(\x0e\x32\x19.aapt.pb.Visibility.Level\x12\x1f\n\x06source\x18\x02 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x03 \x01(\t\x12\x12\n\nstaged_api\x18\x04 \x01(\x08\"-\n\x05Level\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0b\n\x07PRIVATE\x10\x01\x12\n\n\x06PUBLIC\x10\x02\"<\n\x08\x41llowNew\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\"K\n\x0bOverlayable\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x1f\n\x06source\x18\x02 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\r\n\x05\x61\x63tor\x18\x03 \x01(\t\"\x95\x02\n\x0fOverlayableItem\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12/\n\x06policy\x18\x03 \x03(\x0e\x32\x1f.aapt.pb.OverlayableItem.Policy\x12\x17\n\x0foverlayable_idx\x18\x04 \x01(\r\"\x85\x01\n\x06Policy\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06PUBLIC\x10\x01\x12\n\n\x06SYSTEM\x10\x02\x12\n\n\x06VENDOR\x10\x03\x12\x0b\n\x07PRODUCT\x10\x04\x12\r\n\tSIGNATURE\x10\x05\x12\x07\n\x03ODM\x10\x06\x12\x07\n\x03OEM\x10\x07\x12\t\n\x05\x41\x43TOR\x10\x08\x12\x14\n\x10\x43ONFIG_SIGNATURE\x10\t\">\n\x08StagedId\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x11\n\tstaged_id\x18\x02 \x01(\r\"\x15\n\x07\x45ntryId\x12\n\n\x02id\x18\x01 \x01(\r\"\xc8\x02\n\x05\x45ntry\x12\"\n\x08\x65ntry_id\x18\x01 \x01(\x0b\x32\x10.aapt.pb.EntryId\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\'\n\nvisibility\x18\x03 \x01(\x0b\x32\x13.aapt.pb.Visibility\x12$\n\tallow_new\x18\x04 \x01(\x0b\x32\x11.aapt.pb.AllowNew\x12\x32\n\x10overlayable_item\x18\x05 \x01(\x0b\x32\x18.aapt.pb.OverlayableItem\x12*\n\x0c\x63onfig_value\x18\x06 \x03(\x0b\x32\x14.aapt.pb.ConfigValue\x12$\n\tstaged_id\x18\x07 \x01(\x0b\x32\x11.aapt.pb.StagedId\x12\x38\n\x1a\x66lag_disabled_config_value\x18\x08 \x03(\x0b\x32\x14.aapt.pb.ConfigValue\"Z\n\x0b\x43onfigValue\x12&\n\x06\x63onfig\x18\x01 \x01(\x0b\x32\x16.aapt.pb.Configuration\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.aapt.pb.ValueJ\x04\x08\x03\x10\x04\"\xa1\x01\n\x05Value\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x0c\n\x04weak\x18\x03 \x01(\x08\x12\x1d\n\x04item\x18\x04 \x01(\x0b\x32\r.aapt.pb.ItemH\x00\x12\x30\n\x0e\x63ompound_value\x18\x05 \x01(\x0b\x32\x16.aapt.pb.CompoundValueH\x00\x42\x07\n\x05value\"\xcb\x02\n\x04Item\x12!\n\x03ref\x18\x01 \x01(\x0b\x32\x12.aapt.pb.ReferenceH\x00\x12\x1e\n\x03str\x18\x02 \x01(\x0b\x32\x0f.aapt.pb.StringH\x00\x12%\n\x07raw_str\x18\x03 \x01(\x0b\x32\x12.aapt.pb.RawStringH\x00\x12+\n\nstyled_str\x18\x04 \x01(\x0b\x32\x15.aapt.pb.StyledStringH\x00\x12&\n\x04\x66ile\x18\x05 \x01(\x0b\x32\x16.aapt.pb.FileReferenceH\x00\x12\x19\n\x02id\x18\x06 \x01(\x0b\x32\x0b.aapt.pb.IdH\x00\x12\"\n\x04prim\x18\x07 \x01(\x0b\x32\x12.aapt.pb.PrimitiveH\x00\x12\x13\n\x0b\x66lag_status\x18\x08 \x01(\r\x12\x14\n\x0c\x66lag_negated\x18\t \x01(\x08\x12\x11\n\tflag_name\x18\n \x01(\tB\x07\n\x05value\"\xad\x02\n\rCompoundValue\x12\"\n\x04\x61ttr\x18\x01 \x01(\x0b\x32\x12.aapt.pb.AttributeH\x00\x12\x1f\n\x05style\x18\x02 \x01(\x0b\x32\x0e.aapt.pb.StyleH\x00\x12\'\n\tstyleable\x18\x03 \x01(\x0b\x32\x12.aapt.pb.StyleableH\x00\x12\x1f\n\x05\x61rray\x18\x04 \x01(\x0b\x32\x0e.aapt.pb.ArrayH\x00\x12!\n\x06plural\x18\x05 \x01(\x0b\x32\x0f.aapt.pb.PluralH\x00\x12#\n\x05macro\x18\x06 \x01(\x0b\x32\x12.aapt.pb.MacroBodyH\x00\x12\x13\n\x0b\x66lag_status\x18\x07 \x01(\r\x12\x14\n\x0c\x66lag_negated\x18\x08 \x01(\x08\x12\x11\n\tflag_name\x18\t \x01(\tB\x07\n\x05value\"\x18\n\x07\x42oolean\x12\r\n\x05value\x18\x01 \x01(\x08\"\xd0\x01\n\tReference\x12%\n\x04type\x18\x01 \x01(\x0e\x32\x17.aapt.pb.Reference.Type\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x0f\n\x07private\x18\x04 \x01(\x08\x12$\n\nis_dynamic\x18\x05 \x01(\x0b\x32\x10.aapt.pb.Boolean\x12\x12\n\ntype_flags\x18\x06 \x01(\r\x12\x11\n\tallow_raw\x18\x07 \x01(\x08\"$\n\x04Type\x12\r\n\tREFERENCE\x10\x00\x12\r\n\tATTRIBUTE\x10\x01\"\x04\n\x02Id\"\x17\n\x06String\x12\r\n\x05value\x18\x01 \x01(\t\"\x1a\n\tRawString\x12\r\n\x05value\x18\x01 \x01(\t\"\x83\x01\n\x0cStyledString\x12\r\n\x05value\x18\x01 \x01(\t\x12(\n\x04span\x18\x02 \x03(\x0b\x32\x1a.aapt.pb.StyledString.Span\x1a:\n\x04Span\x12\x0b\n\x03tag\x18\x01 \x01(\t\x12\x12\n\nfirst_char\x18\x02 \x01(\r\x12\x11\n\tlast_char\x18\x03 \x01(\r\"\x85\x01\n\rFileReference\x12\x0c\n\x04path\x18\x01 \x01(\t\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.aapt.pb.FileReference.Type\";\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x07\n\x03PNG\x10\x01\x12\x0e\n\nBINARY_XML\x10\x02\x12\r\n\tPROTO_XML\x10\x03\"\x83\x04\n\tPrimitive\x12\x31\n\nnull_value\x18\x01 \x01(\x0b\x32\x1b.aapt.pb.Primitive.NullTypeH\x00\x12\x33\n\x0b\x65mpty_value\x18\x02 \x01(\x0b\x32\x1c.aapt.pb.Primitive.EmptyTypeH\x00\x12\x15\n\x0b\x66loat_value\x18\x03 \x01(\x02H\x00\x12\x19\n\x0f\x64imension_value\x18\r \x01(\rH\x00\x12\x18\n\x0e\x66raction_value\x18\x0e \x01(\rH\x00\x12\x1b\n\x11int_decimal_value\x18\x06 \x01(\x05H\x00\x12\x1f\n\x15int_hexadecimal_value\x18\x07 \x01(\rH\x00\x12\x17\n\rboolean_value\x18\x08 \x01(\x08H\x00\x12\x1b\n\x11\x63olor_argb8_value\x18\t \x01(\rH\x00\x12\x1a\n\x10\x63olor_rgb8_value\x18\n \x01(\rH\x00\x12\x1b\n\x11\x63olor_argb4_value\x18\x0b \x01(\rH\x00\x12\x1a\n\x10\x63olor_rgb4_value\x18\x0c \x01(\rH\x00\x12(\n\x1a\x64imension_value_deprecated\x18\x04 \x01(\x02\x42\x02\x18\x01H\x00\x12\'\n\x19\x66raction_value_deprecated\x18\x05 \x01(\x02\x42\x02\x18\x01H\x00\x1a\n\n\x08NullType\x1a\x0b\n\tEmptyTypeB\r\n\x0boneof_value\"\x90\x03\n\tAttribute\x12\x14\n\x0c\x66ormat_flags\x18\x01 \x01(\r\x12\x0f\n\x07min_int\x18\x02 \x01(\x05\x12\x0f\n\x07max_int\x18\x03 \x01(\x05\x12)\n\x06symbol\x18\x04 \x03(\x0b\x32\x19.aapt.pb.Attribute.Symbol\x1ay\n\x06Symbol\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12 \n\x04name\x18\x03 \x01(\x0b\x32\x12.aapt.pb.Reference\x12\r\n\x05value\x18\x04 \x01(\r\x12\x0c\n\x04type\x18\x05 \x01(\r\"\xa4\x01\n\x0b\x46ormatFlags\x12\x08\n\x04NONE\x10\x00\x12\t\n\x03\x41NY\x10\xff\xff\x03\x12\r\n\tREFERENCE\x10\x01\x12\n\n\x06STRING\x10\x02\x12\x0b\n\x07INTEGER\x10\x04\x12\x0b\n\x07\x42OOLEAN\x10\x08\x12\t\n\x05\x43OLOR\x10\x10\x12\t\n\x05\x46LOAT\x10 \x12\r\n\tDIMENSION\x10@\x12\r\n\x08\x46RACTION\x10\x80\x01\x12\n\n\x04\x45NUM\x10\x80\x80\x04\x12\x0b\n\x05\x46LAGS\x10\x80\x80\x08\"\xf1\x01\n\x05Style\x12\"\n\x06parent\x18\x01 \x01(\x0b\x32\x12.aapt.pb.Reference\x12&\n\rparent_source\x18\x02 \x01(\x0b\x32\x0f.aapt.pb.Source\x12#\n\x05\x65ntry\x18\x03 \x03(\x0b\x32\x14.aapt.pb.Style.Entry\x1aw\n\x05\x45ntry\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x1f\n\x03key\x18\x03 \x01(\x0b\x32\x12.aapt.pb.Reference\x12\x1b\n\x04item\x18\x04 \x01(\x0b\x32\r.aapt.pb.Item\"\x91\x01\n\tStyleable\x12\'\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x18.aapt.pb.Styleable.Entry\x1a[\n\x05\x45ntry\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12 \n\x04\x61ttr\x18\x03 \x01(\x0b\x32\x12.aapt.pb.Reference\"\x8a\x01\n\x05\x41rray\x12\'\n\x07\x65lement\x18\x01 \x03(\x0b\x32\x16.aapt.pb.Array.Element\x1aX\n\x07\x45lement\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12\x1b\n\x04item\x18\x03 \x01(\x0b\x32\r.aapt.pb.Item\"\xef\x01\n\x06Plural\x12$\n\x05\x65ntry\x18\x01 \x03(\x0b\x32\x15.aapt.pb.Plural.Entry\x1a|\n\x05\x45ntry\x12\x1f\n\x06source\x18\x01 \x01(\x0b\x32\x0f.aapt.pb.Source\x12\x0f\n\x07\x63omment\x18\x02 \x01(\t\x12$\n\x05\x61rity\x18\x03 \x01(\x0e\x32\x15.aapt.pb.Plural.Arity\x12\x1b\n\x04item\x18\x04 \x01(\x0b\x32\r.aapt.pb.Item\"A\n\x05\x41rity\x12\x08\n\x04ZERO\x10\x00\x12\x07\n\x03ONE\x10\x01\x12\x07\n\x03TWO\x10\x02\x12\x07\n\x03\x46\x45W\x10\x03\x12\x08\n\x04MANY\x10\x04\x12\t\n\x05OTHER\x10\x05\"r\n\x07XmlNode\x12&\n\x07\x65lement\x18\x01 \x01(\x0b\x32\x13.aapt.pb.XmlElementH\x00\x12\x0e\n\x04text\x18\x02 \x01(\tH\x00\x12\'\n\x06source\x18\x03 \x01(\x0b\x32\x17.aapt.pb.SourcePositionB\x06\n\x04node\"\xb2\x01\n\nXmlElement\x12\x34\n\x15namespace_declaration\x18\x01 \x03(\x0b\x32\x15.aapt.pb.XmlNamespace\x12\x15\n\rnamespace_uri\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12(\n\tattribute\x18\x04 \x03(\x0b\x32\x15.aapt.pb.XmlAttribute\x12\x1f\n\x05\x63hild\x18\x05 \x03(\x0b\x32\x10.aapt.pb.XmlNode\"T\n\x0cXmlNamespace\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x0b\n\x03uri\x18\x02 \x01(\t\x12\'\n\x06source\x18\x03 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\"\xa6\x01\n\x0cXmlAttribute\x12\x15\n\rnamespace_uri\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05value\x18\x03 \x01(\t\x12\'\n\x06source\x18\x04 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\x12\x13\n\x0bresource_id\x18\x05 \x01(\r\x12$\n\rcompiled_item\x18\x06 \x01(\x0b\x32\r.aapt.pb.Item\"\xe7\x01\n\tMacroBody\x12\x12\n\nraw_string\x18\x01 \x01(\t\x12*\n\x0cstyle_string\x18\x02 \x01(\x0b\x32\x14.aapt.pb.StyleString\x12?\n\x17untranslatable_sections\x18\x03 \x03(\x0b\x32\x1e.aapt.pb.UntranslatableSection\x12\x30\n\x0fnamespace_stack\x18\x04 \x03(\x0b\x32\x17.aapt.pb.NamespaceAlias\x12\'\n\x06source\x18\x05 \x01(\x0b\x32\x17.aapt.pb.SourcePosition\"J\n\x0eNamespaceAlias\x12\x0e\n\x06prefix\x18\x01 \x01(\t\x12\x14\n\x0cpackage_name\x18\x02 \x01(\t\x12\x12\n\nis_private\x18\x03 \x01(\x08\"\x82\x01\n\x0bStyleString\x12\x0b\n\x03str\x18\x01 \x01(\t\x12(\n\x05spans\x18\x02 \x03(\x0b\x32\x19.aapt.pb.StyleString.Span\x1a<\n\x04Span\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0bstart_index\x18\x02 \x01(\r\x12\x11\n\tend_index\x18\x03 \x01(\r\"?\n\x15UntranslatableSection\x12\x13\n\x0bstart_index\x18\x01 \x01(\x04\x12\x11\n\tend_index\x18\x02 \x01(\x04\x42\x12\n\x10\x63om.android.aaptb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'frameworks.base.tools.aapt2.Resources_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\020com.android.aapt'
+ _globals['_PRIMITIVE'].fields_by_name['dimension_value_deprecated']._loaded_options = None
+ _globals['_PRIMITIVE'].fields_by_name['dimension_value_deprecated']._serialized_options = b'\030\001'
+ _globals['_PRIMITIVE'].fields_by_name['fraction_value_deprecated']._loaded_options = None
+ _globals['_PRIMITIVE'].fields_by_name['fraction_value_deprecated']._serialized_options = b'\030\001'
+ _globals['_STRINGPOOL']._serialized_start=105
+ _globals['_STRINGPOOL']._serialized_end=131
+ _globals['_SOURCEPOSITION']._serialized_start=133
+ _globals['_SOURCEPOSITION']._serialized_end=193
+ _globals['_SOURCE']._serialized_start=195
+ _globals['_SOURCE']._serialized_end=264
+ _globals['_TOOLFINGERPRINT']._serialized_start=266
+ _globals['_TOOLFINGERPRINT']._serialized_end=314
+ _globals['_DYNAMICREFTABLE']._serialized_start=316
+ _globals['_DYNAMICREFTABLE']._serialized_end=395
+ _globals['_RESOURCETABLE']._serialized_start=398
+ _globals['_RESOURCETABLE']._serialized_end=638
+ _globals['_PACKAGEID']._serialized_start=640
+ _globals['_PACKAGEID']._serialized_end=663
+ _globals['_PACKAGE']._serialized_start=665
+ _globals['_PACKAGE']._serialized_end=765
+ _globals['_TYPEID']._serialized_start=767
+ _globals['_TYPEID']._serialized_end=787
+ _globals['_TYPE']._serialized_start=789
+ _globals['_TYPE']._serialized_end=874
+ _globals['_VISIBILITY']._serialized_start=877
+ _globals['_VISIBILITY']._serialized_end=1048
+ _globals['_VISIBILITY_LEVEL']._serialized_start=1003
+ _globals['_VISIBILITY_LEVEL']._serialized_end=1048
+ _globals['_ALLOWNEW']._serialized_start=1050
+ _globals['_ALLOWNEW']._serialized_end=1110
+ _globals['_OVERLAYABLE']._serialized_start=1112
+ _globals['_OVERLAYABLE']._serialized_end=1187
+ _globals['_OVERLAYABLEITEM']._serialized_start=1190
+ _globals['_OVERLAYABLEITEM']._serialized_end=1467
+ _globals['_OVERLAYABLEITEM_POLICY']._serialized_start=1334
+ _globals['_OVERLAYABLEITEM_POLICY']._serialized_end=1467
+ _globals['_STAGEDID']._serialized_start=1469
+ _globals['_STAGEDID']._serialized_end=1531
+ _globals['_ENTRYID']._serialized_start=1533
+ _globals['_ENTRYID']._serialized_end=1554
+ _globals['_ENTRY']._serialized_start=1557
+ _globals['_ENTRY']._serialized_end=1885
+ _globals['_CONFIGVALUE']._serialized_start=1887
+ _globals['_CONFIGVALUE']._serialized_end=1977
+ _globals['_VALUE']._serialized_start=1980
+ _globals['_VALUE']._serialized_end=2141
+ _globals['_ITEM']._serialized_start=2144
+ _globals['_ITEM']._serialized_end=2475
+ _globals['_COMPOUNDVALUE']._serialized_start=2478
+ _globals['_COMPOUNDVALUE']._serialized_end=2779
+ _globals['_BOOLEAN']._serialized_start=2781
+ _globals['_BOOLEAN']._serialized_end=2805
+ _globals['_REFERENCE']._serialized_start=2808
+ _globals['_REFERENCE']._serialized_end=3016
+ _globals['_REFERENCE_TYPE']._serialized_start=2980
+ _globals['_REFERENCE_TYPE']._serialized_end=3016
+ _globals['_ID']._serialized_start=3018
+ _globals['_ID']._serialized_end=3022
+ _globals['_STRING']._serialized_start=3024
+ _globals['_STRING']._serialized_end=3047
+ _globals['_RAWSTRING']._serialized_start=3049
+ _globals['_RAWSTRING']._serialized_end=3075
+ _globals['_STYLEDSTRING']._serialized_start=3078
+ _globals['_STYLEDSTRING']._serialized_end=3209
+ _globals['_STYLEDSTRING_SPAN']._serialized_start=3151
+ _globals['_STYLEDSTRING_SPAN']._serialized_end=3209
+ _globals['_FILEREFERENCE']._serialized_start=3212
+ _globals['_FILEREFERENCE']._serialized_end=3345
+ _globals['_FILEREFERENCE_TYPE']._serialized_start=3286
+ _globals['_FILEREFERENCE_TYPE']._serialized_end=3345
+ _globals['_PRIMITIVE']._serialized_start=3348
+ _globals['_PRIMITIVE']._serialized_end=3863
+ _globals['_PRIMITIVE_NULLTYPE']._serialized_start=3825
+ _globals['_PRIMITIVE_NULLTYPE']._serialized_end=3835
+ _globals['_PRIMITIVE_EMPTYTYPE']._serialized_start=3837
+ _globals['_PRIMITIVE_EMPTYTYPE']._serialized_end=3848
+ _globals['_ATTRIBUTE']._serialized_start=3866
+ _globals['_ATTRIBUTE']._serialized_end=4266
+ _globals['_ATTRIBUTE_SYMBOL']._serialized_start=3978
+ _globals['_ATTRIBUTE_SYMBOL']._serialized_end=4099
+ _globals['_ATTRIBUTE_FORMATFLAGS']._serialized_start=4102
+ _globals['_ATTRIBUTE_FORMATFLAGS']._serialized_end=4266
+ _globals['_STYLE']._serialized_start=4269
+ _globals['_STYLE']._serialized_end=4510
+ _globals['_STYLE_ENTRY']._serialized_start=4391
+ _globals['_STYLE_ENTRY']._serialized_end=4510
+ _globals['_STYLEABLE']._serialized_start=4513
+ _globals['_STYLEABLE']._serialized_end=4658
+ _globals['_STYLEABLE_ENTRY']._serialized_start=4567
+ _globals['_STYLEABLE_ENTRY']._serialized_end=4658
+ _globals['_ARRAY']._serialized_start=4661
+ _globals['_ARRAY']._serialized_end=4799
+ _globals['_ARRAY_ELEMENT']._serialized_start=4711
+ _globals['_ARRAY_ELEMENT']._serialized_end=4799
+ _globals['_PLURAL']._serialized_start=4802
+ _globals['_PLURAL']._serialized_end=5041
+ _globals['_PLURAL_ENTRY']._serialized_start=4850
+ _globals['_PLURAL_ENTRY']._serialized_end=4974
+ _globals['_PLURAL_ARITY']._serialized_start=4976
+ _globals['_PLURAL_ARITY']._serialized_end=5041
+ _globals['_XMLNODE']._serialized_start=5043
+ _globals['_XMLNODE']._serialized_end=5157
+ _globals['_XMLELEMENT']._serialized_start=5160
+ _globals['_XMLELEMENT']._serialized_end=5338
+ _globals['_XMLNAMESPACE']._serialized_start=5340
+ _globals['_XMLNAMESPACE']._serialized_end=5424
+ _globals['_XMLATTRIBUTE']._serialized_start=5427
+ _globals['_XMLATTRIBUTE']._serialized_end=5593
+ _globals['_MACROBODY']._serialized_start=5596
+ _globals['_MACROBODY']._serialized_end=5827
+ _globals['_NAMESPACEALIAS']._serialized_start=5829
+ _globals['_NAMESPACEALIAS']._serialized_end=5903
+ _globals['_STYLESTRING']._serialized_start=5906
+ _globals['_STYLESTRING']._serialized_end=6036
+ _globals['_STYLESTRING_SPAN']._serialized_start=5976
+ _globals['_STYLESTRING_SPAN']._serialized_end=6036
+ _globals['_UNTRANSLATABLESECTION']._serialized_start=6038
+ _globals['_UNTRANSLATABLESECTION']._serialized_end=6101
# @@protoc_insertion_point(module_scope)
diff --git a/direct/src/dist/_proto/config_pb2.py b/direct/src/dist/_proto/config_pb2.py
index dde4c7165c..67a2c7cc95 100644
--- a/direct/src/dist/_proto/config_pb2.py
+++ b/direct/src/dist/_proto/config_pb2.py
@@ -1,11 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
# source: config.proto
+# Protobuf Python Version: 6.33.0
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 0,
+ '',
+ 'config.proto'
+)
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -13,1033 +24,74 @@ _sym_db = _symbol_database.Default()
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='config.proto',
- package='android.bundle',
- syntax='proto3',
- serialized_options=b'\n\022com.android.bundle',
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x0c\x63onfig.proto\x12\x0e\x61ndroid.bundle\"\x91\x04\n\x0c\x42undleConfig\x12.\n\nbundletool\x18\x01 \x01(\x0b\x32\x1a.android.bundle.Bundletool\x12\x34\n\roptimizations\x18\x02 \x01(\x0b\x32\x1d.android.bundle.Optimizations\x12\x30\n\x0b\x63ompression\x18\x03 \x01(\x0b\x32\x1b.android.bundle.Compression\x12\x39\n\x10master_resources\x18\x04 \x01(\x0b\x32\x1f.android.bundle.MasterResources\x12/\n\x0b\x61pex_config\x18\x05 \x01(\x0b\x32\x1a.android.bundle.ApexConfig\x12O\n\x1cunsigned_embedded_apk_config\x18\x06 \x03(\x0b\x32).android.bundle.UnsignedEmbeddedApkConfig\x12@\n\x14\x61sset_modules_config\x18\x07 \x01(\x0b\x32\".android.bundle.AssetModulesConfig\x12\x35\n\x04type\x18\x08 \x01(\x0e\x32\'.android.bundle.BundleConfig.BundleType\"3\n\nBundleType\x12\x0b\n\x07REGULAR\x10\x00\x12\x08\n\x04\x41PEX\x10\x01\x12\x0e\n\nASSET_ONLY\x10\x02\"#\n\nBundletool\x12\x0f\n\x07version\x18\x02 \x01(\tJ\x04\x08\x01\x10\x02\"\xe0\x01\n\x0b\x43ompression\x12\x19\n\x11uncompressed_glob\x18\x01 \x03(\t\x12i\n-install_time_asset_module_default_compression\x18\x02 \x01(\x0e\x32\x32.android.bundle.Compression.AssetModuleCompression\"K\n\x16\x41ssetModuleCompression\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"?\n\x0fMasterResources\x12\x14\n\x0cresource_ids\x18\x01 \x03(\x05\x12\x16\n\x0eresource_names\x18\x02 \x03(\t\"\x8f\x03\n\rOptimizations\x12\x33\n\rsplits_config\x18\x01 \x01(\x0b\x32\x1c.android.bundle.SplitsConfig\x12N\n\x1buncompress_native_libraries\x18\x02 \x01(\x0b\x32).android.bundle.UncompressNativeLibraries\x12@\n\x14uncompress_dex_files\x18\x03 \x01(\x0b\x32\".android.bundle.UncompressDexFiles\x12;\n\x11standalone_config\x18\x04 \x01(\x0b\x32 .android.bundle.StandaloneConfig\x12\x45\n\x16resource_optimizations\x18\x05 \x01(\x0b\x32%.android.bundle.ResourceOptimizations\x12\x33\n\rstore_archive\x18\x06 \x01(\x0b\x32\x1c.android.bundle.StoreArchive\"\x97\x01\n\x15ResourceOptimizations\x12M\n\x0fsparse_encoding\x18\x01 \x01(\x0e\x32\x34.android.bundle.ResourceOptimizations.SparseEncoding\"/\n\x0eSparseEncoding\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x0c\n\x08\x45NFORCED\x10\x01\",\n\x19UncompressNativeLibraries\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"%\n\x12UncompressDexFiles\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\x1f\n\x0cStoreArchive\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"G\n\x0cSplitsConfig\x12\x37\n\x0fsplit_dimension\x18\x01 \x03(\x0b\x32\x1e.android.bundle.SplitDimension\"\xfa\x01\n\x10StandaloneConfig\x12\x37\n\x0fsplit_dimension\x18\x01 \x03(\x0b\x32\x1e.android.bundle.SplitDimension\x12\x1e\n\x16strip_64_bit_libraries\x18\x02 \x01(\x08\x12Q\n\x14\x64\x65x_merging_strategy\x18\x03 \x01(\x0e\x32\x33.android.bundle.StandaloneConfig.DexMergingStrategy\":\n\x12\x44\x65xMergingStrategy\x12\x13\n\x0fMERGE_IF_NEEDED\x10\x00\x12\x0f\n\x0bNEVER_MERGE\x10\x01\"\x8c\x02\n\x0eSplitDimension\x12\x33\n\x05value\x18\x01 \x01(\x0e\x32$.android.bundle.SplitDimension.Value\x12\x0e\n\x06negate\x18\x02 \x01(\x08\x12\x39\n\x10suffix_stripping\x18\x03 \x01(\x0b\x32\x1f.android.bundle.SuffixStripping\"z\n\x05Value\x12\x15\n\x11UNSPECIFIED_VALUE\x10\x00\x12\x07\n\x03\x41\x42I\x10\x01\x12\x12\n\x0eSCREEN_DENSITY\x10\x02\x12\x0c\n\x08LANGUAGE\x10\x03\x12\x1e\n\x1aTEXTURE_COMPRESSION_FORMAT\x10\x04\x12\x0f\n\x0b\x44\x45VICE_TIER\x10\x06\":\n\x0fSuffixStripping\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0e\x64\x65\x66\x61ult_suffix\x18\x02 \x01(\t\"U\n\nApexConfig\x12G\n\x18\x61pex_embedded_apk_config\x18\x01 \x03(\x0b\x32%.android.bundle.ApexEmbeddedApkConfig\";\n\x15\x41pexEmbeddedApkConfig\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\")\n\x19UnsignedEmbeddedApkConfig\x12\x0c\n\x04path\x18\x01 \x01(\t\"D\n\x12\x41ssetModulesConfig\x12\x13\n\x0b\x61pp_version\x18\x01 \x03(\x03\x12\x19\n\x11\x61sset_version_tag\x18\x02 \x01(\tB\x14\n\x12\x63om.android.bundleb\x06proto3'
-)
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0c\x63onfig.proto\x12\x0e\x61ndroid.bundle\"\xbb\x04\n\x0c\x42undleConfig\x12.\n\nbundletool\x18\x01 \x01(\x0b\x32\x1a.android.bundle.Bundletool\x12\x34\n\roptimizations\x18\x02 \x01(\x0b\x32\x1d.android.bundle.Optimizations\x12\x30\n\x0b\x63ompression\x18\x03 \x01(\x0b\x32\x1b.android.bundle.Compression\x12\x39\n\x10master_resources\x18\x04 \x01(\x0b\x32\x1f.android.bundle.MasterResources\x12/\n\x0b\x61pex_config\x18\x05 \x01(\x0b\x32\x1a.android.bundle.ApexConfig\x12O\n\x1cunsigned_embedded_apk_config\x18\x06 \x03(\x0b\x32).android.bundle.UnsignedEmbeddedApkConfig\x12@\n\x14\x61sset_modules_config\x18\x07 \x01(\x0b\x32\".android.bundle.AssetModulesConfig\x12\x35\n\x04type\x18\x08 \x01(\x0e\x32\'.android.bundle.BundleConfig.BundleType\x12(\n\x07locales\x18\t \x01(\x0b\x32\x17.android.bundle.Locales\"3\n\nBundleType\x12\x0b\n\x07REGULAR\x10\x00\x12\x08\n\x04\x41PEX\x10\x01\x12\x0e\n\nASSET_ONLY\x10\x02\"#\n\nBundletool\x12\x0f\n\x07version\x18\x02 \x01(\tJ\x04\x08\x01\x10\x02\"\x85\x03\n\x0b\x43ompression\x12\x19\n\x11uncompressed_glob\x18\x01 \x03(\t\x12i\n-install_time_asset_module_default_compression\x18\x02 \x01(\x0e\x32\x32.android.bundle.Compression.AssetModuleCompression\x12V\n\x19\x61pk_compression_algorithm\x18\x03 \x01(\x0e\x32\x33.android.bundle.Compression.ApkCompressionAlgorithm\"K\n\x16\x41ssetModuleCompression\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x10\n\x0cUNCOMPRESSED\x10\x01\x12\x0e\n\nCOMPRESSED\x10\x02\"K\n\x17\x41pkCompressionAlgorithm\x12%\n!DEFAULT_APK_COMPRESSION_ALGORITHM\x10\x00\x12\t\n\x05P7ZIP\x10\x01\"?\n\x0fMasterResources\x12\x14\n\x0cresource_ids\x18\x01 \x03(\x05\x12\x16\n\x0eresource_names\x18\x02 \x03(\t\"\xa7\x03\n\rOptimizations\x12\x33\n\rsplits_config\x18\x01 \x01(\x0b\x32\x1c.android.bundle.SplitsConfig\x12N\n\x1buncompress_native_libraries\x18\x02 \x01(\x0b\x32).android.bundle.UncompressNativeLibraries\x12@\n\x14uncompress_dex_files\x18\x03 \x01(\x0b\x32\".android.bundle.UncompressDexFiles\x12;\n\x11standalone_config\x18\x04 \x01(\x0b\x32 .android.bundle.StandaloneConfig\x12\x45\n\x16resource_optimizations\x18\x05 \x01(\x0b\x32%.android.bundle.ResourceOptimizations\x12\x33\n\rstore_archive\x18\x06 \x01(\x0b\x32\x1c.android.bundle.StoreArchive\x12\x16\n\x0einject_min_sdk\x18\x07 \x01(\x08\"\xa4\x04\n\x15ResourceOptimizations\x12M\n\x0fsparse_encoding\x18\x01 \x01(\x0e\x32\x34.android.bundle.ResourceOptimizations.SparseEncoding\x12^\n\x18\x63ollapsed_resource_names\x18\x02 \x01(\x0b\x32<.android.bundle.ResourceOptimizations.CollapsedResourceNames\x1a\x31\n\x13ResourceTypeAndName\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x1a\xdd\x01\n\x16\x43ollapsedResourceNames\x12\x1f\n\x17\x63ollapse_resource_names\x18\x01 \x01(\x08\x12X\n\x15no_collapse_resources\x18\x02 \x03(\x0b\x32\x39.android.bundle.ResourceOptimizations.ResourceTypeAndName\x12\"\n\x1ano_collapse_resource_types\x18\x04 \x03(\t\x12$\n\x1c\x64\x65\x64uplicate_resource_entries\x18\x03 \x01(\x08\"I\n\x0eSparseEncoding\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x16\n\x12VARIANT_FOR_SDK_32\x10\x02\"\x04\x08\x01\x10\x01*\x08\x45NFORCED\"\xf0\x01\n\x19UncompressNativeLibraries\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12J\n\talignment\x18\x02 \x01(\x0e\x32\x37.android.bundle.UncompressNativeLibraries.PageAlignment\"v\n\rPageAlignment\x12\x1e\n\x1aPAGE_ALIGNMENT_UNSPECIFIED\x10\x00\x12\x15\n\x11PAGE_ALIGNMENT_4K\x10\x01\x12\x16\n\x12PAGE_ALIGNMENT_16K\x10\x02\x12\x16\n\x12PAGE_ALIGNMENT_64K\x10\x03\"\xd2\x01\n\x12UncompressDexFiles\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12`\n\x1buncompressed_dex_target_sdk\x18\x02 \x01(\x0e\x32;.android.bundle.UncompressDexFiles.UncompressedDexTargetSdk\"I\n\x18UncompressedDexTargetSdk\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06SDK_31\x10\x01\x12\n\n\x06SDK_33\x10\x03\"\x04\x08\x02\x10\x02\"\x1f\n\x0cStoreArchive\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"\'\n\x07Locales\x12\x1c\n\x14inject_locale_config\x18\x01 \x01(\x08\"G\n\x0cSplitsConfig\x12\x37\n\x0fsplit_dimension\x18\x01 \x03(\x0b\x32\x1e.android.bundle.SplitDimension\"\x9c\x03\n\x10StandaloneConfig\x12\x37\n\x0fsplit_dimension\x18\x01 \x03(\x0b\x32\x1e.android.bundle.SplitDimension\x12\x1e\n\x16strip_64_bit_libraries\x18\x02 \x01(\x08\x12Q\n\x14\x64\x65x_merging_strategy\x18\x03 \x01(\x0e\x32\x33.android.bundle.StandaloneConfig.DexMergingStrategy\x12Q\n\x14\x66\x65\x61ture_modules_mode\x18\x04 \x01(\x0e\x32\x33.android.bundle.StandaloneConfig.FeatureModulesMode\":\n\x12\x44\x65xMergingStrategy\x12\x13\n\x0fMERGE_IF_NEEDED\x10\x00\x12\x0f\n\x0bNEVER_MERGE\x10\x01\"M\n\x12\x46\x65\x61tureModulesMode\x12\x19\n\x15\x46USED_FEATURE_MODULES\x10\x00\x12\x1c\n\x18SEPARATE_FEATURE_MODULES\x10\x01\"\xca\x02\n\x0eSplitDimension\x12\x33\n\x05value\x18\x01 \x01(\x0e\x32$.android.bundle.SplitDimension.Value\x12\x0e\n\x06negate\x18\x02 \x01(\x08\x12\x39\n\x10suffix_stripping\x18\x03 \x01(\x0b\x32\x1f.android.bundle.SuffixStripping\"\xb7\x01\n\x05Value\x12\x15\n\x11UNSPECIFIED_VALUE\x10\x00\x12\x07\n\x03\x41\x42I\x10\x01\x12\x12\n\x0eSCREEN_DENSITY\x10\x02\x12\x0c\n\x08LANGUAGE\x10\x03\x12\x1e\n\x1aTEXTURE_COMPRESSION_FORMAT\x10\x04\x12\x13\n\x0b\x44\x45VICE_TIER\x10\x06\x1a\x02\x08\x01\x12\x0f\n\x0b\x43OUNTRY_SET\x10\x07\x12\x14\n\x10\x41I_MODEL_VERSION\x10\x08\x12\x10\n\x0c\x44\x45VICE_GROUP\x10\t\":\n\x0fSuffixStripping\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\x12\x16\n\x0e\x64\x65\x66\x61ult_suffix\x18\x02 \x01(\t\"\x91\x01\n\nApexConfig\x12G\n\x18\x61pex_embedded_apk_config\x18\x01 \x03(\x0b\x32%.android.bundle.ApexEmbeddedApkConfig\x12:\n\x11supported_abi_set\x18\x02 \x03(\x0b\x32\x1f.android.bundle.SupportedAbiSet\"\x1e\n\x0fSupportedAbiSet\x12\x0b\n\x03\x61\x62i\x18\x01 \x03(\t\";\n\x15\x41pexEmbeddedApkConfig\x12\x14\n\x0cpackage_name\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\")\n\x19UnsignedEmbeddedApkConfig\x12\x0c\n\x04path\x18\x01 \x01(\t\"D\n\x12\x41ssetModulesConfig\x12\x13\n\x0b\x61pp_version\x18\x01 \x03(\x03\x12\x19\n\x11\x61sset_version_tag\x18\x02 \x01(\tB\x14\n\x12\x63om.android.bundleb\x06proto3')
-
-
-_BUNDLECONFIG_BUNDLETYPE = _descriptor.EnumDescriptor(
- name='BundleType',
- full_name='android.bundle.BundleConfig.BundleType',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='REGULAR', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='APEX', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ASSET_ONLY', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=511,
- serialized_end=562,
-)
-_sym_db.RegisterEnumDescriptor(_BUNDLECONFIG_BUNDLETYPE)
-
-_COMPRESSION_ASSETMODULECOMPRESSION = _descriptor.EnumDescriptor(
- name='AssetModuleCompression',
- full_name='android.bundle.Compression.AssetModuleCompression',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNSPECIFIED', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='UNCOMPRESSED', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='COMPRESSED', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=751,
- serialized_end=826,
-)
-_sym_db.RegisterEnumDescriptor(_COMPRESSION_ASSETMODULECOMPRESSION)
-
-_RESOURCEOPTIMIZATIONS_SPARSEENCODING = _descriptor.EnumDescriptor(
- name='SparseEncoding',
- full_name='android.bundle.ResourceOptimizations.SparseEncoding',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNSPECIFIED', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ENFORCED', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1400,
- serialized_end=1447,
-)
-_sym_db.RegisterEnumDescriptor(_RESOURCEOPTIMIZATIONS_SPARSEENCODING)
-
-_STANDALONECONFIG_DEXMERGINGSTRATEGY = _descriptor.EnumDescriptor(
- name='DexMergingStrategy',
- full_name='android.bundle.StandaloneConfig.DexMergingStrategy',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='MERGE_IF_NEEDED', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='NEVER_MERGE', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1833,
- serialized_end=1891,
-)
-_sym_db.RegisterEnumDescriptor(_STANDALONECONFIG_DEXMERGINGSTRATEGY)
-
-_SPLITDIMENSION_VALUE = _descriptor.EnumDescriptor(
- name='Value',
- full_name='android.bundle.SplitDimension.Value',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNSPECIFIED_VALUE', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ABI', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='SCREEN_DENSITY', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='LANGUAGE', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='TEXTURE_COMPRESSION_FORMAT', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='DEVICE_TIER', index=5, number=6,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=2040,
- serialized_end=2162,
-)
-_sym_db.RegisterEnumDescriptor(_SPLITDIMENSION_VALUE)
-
-
-_BUNDLECONFIG = _descriptor.Descriptor(
- name='BundleConfig',
- full_name='android.bundle.BundleConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='bundletool', full_name='android.bundle.BundleConfig.bundletool', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='optimizations', full_name='android.bundle.BundleConfig.optimizations', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='compression', full_name='android.bundle.BundleConfig.compression', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='master_resources', full_name='android.bundle.BundleConfig.master_resources', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='apex_config', full_name='android.bundle.BundleConfig.apex_config', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='unsigned_embedded_apk_config', full_name='android.bundle.BundleConfig.unsigned_embedded_apk_config', index=5,
- number=6, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='asset_modules_config', full_name='android.bundle.BundleConfig.asset_modules_config', index=6,
- number=7, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='type', full_name='android.bundle.BundleConfig.type', index=7,
- number=8, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _BUNDLECONFIG_BUNDLETYPE,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=33,
- serialized_end=562,
-)
-
-
-_BUNDLETOOL = _descriptor.Descriptor(
- name='Bundletool',
- full_name='android.bundle.Bundletool',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='version', full_name='android.bundle.Bundletool.version', index=0,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=564,
- serialized_end=599,
-)
-
-
-_COMPRESSION = _descriptor.Descriptor(
- name='Compression',
- full_name='android.bundle.Compression',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='uncompressed_glob', full_name='android.bundle.Compression.uncompressed_glob', index=0,
- number=1, type=9, cpp_type=9, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='install_time_asset_module_default_compression', full_name='android.bundle.Compression.install_time_asset_module_default_compression', index=1,
- number=2, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _COMPRESSION_ASSETMODULECOMPRESSION,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=602,
- serialized_end=826,
-)
-
-
-_MASTERRESOURCES = _descriptor.Descriptor(
- name='MasterResources',
- full_name='android.bundle.MasterResources',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='resource_ids', full_name='android.bundle.MasterResources.resource_ids', index=0,
- number=1, type=5, cpp_type=1, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='resource_names', full_name='android.bundle.MasterResources.resource_names', index=1,
- number=2, type=9, cpp_type=9, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=828,
- serialized_end=891,
-)
-
-
-_OPTIMIZATIONS = _descriptor.Descriptor(
- name='Optimizations',
- full_name='android.bundle.Optimizations',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='splits_config', full_name='android.bundle.Optimizations.splits_config', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='uncompress_native_libraries', full_name='android.bundle.Optimizations.uncompress_native_libraries', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='uncompress_dex_files', full_name='android.bundle.Optimizations.uncompress_dex_files', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='standalone_config', full_name='android.bundle.Optimizations.standalone_config', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='resource_optimizations', full_name='android.bundle.Optimizations.resource_optimizations', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='store_archive', full_name='android.bundle.Optimizations.store_archive', index=5,
- number=6, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=894,
- serialized_end=1293,
-)
-
-
-_RESOURCEOPTIMIZATIONS = _descriptor.Descriptor(
- name='ResourceOptimizations',
- full_name='android.bundle.ResourceOptimizations',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='sparse_encoding', full_name='android.bundle.ResourceOptimizations.sparse_encoding', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _RESOURCEOPTIMIZATIONS_SPARSEENCODING,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1296,
- serialized_end=1447,
-)
-
-
-_UNCOMPRESSNATIVELIBRARIES = _descriptor.Descriptor(
- name='UncompressNativeLibraries',
- full_name='android.bundle.UncompressNativeLibraries',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='enabled', full_name='android.bundle.UncompressNativeLibraries.enabled', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1449,
- serialized_end=1493,
-)
-
-
-_UNCOMPRESSDEXFILES = _descriptor.Descriptor(
- name='UncompressDexFiles',
- full_name='android.bundle.UncompressDexFiles',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='enabled', full_name='android.bundle.UncompressDexFiles.enabled', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1495,
- serialized_end=1532,
-)
-
-
-_STOREARCHIVE = _descriptor.Descriptor(
- name='StoreArchive',
- full_name='android.bundle.StoreArchive',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='enabled', full_name='android.bundle.StoreArchive.enabled', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1534,
- serialized_end=1565,
-)
-
-
-_SPLITSCONFIG = _descriptor.Descriptor(
- name='SplitsConfig',
- full_name='android.bundle.SplitsConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='split_dimension', full_name='android.bundle.SplitsConfig.split_dimension', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1567,
- serialized_end=1638,
-)
-
-
-_STANDALONECONFIG = _descriptor.Descriptor(
- name='StandaloneConfig',
- full_name='android.bundle.StandaloneConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='split_dimension', full_name='android.bundle.StandaloneConfig.split_dimension', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='strip_64_bit_libraries', full_name='android.bundle.StandaloneConfig.strip_64_bit_libraries', index=1,
- number=2, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='dex_merging_strategy', full_name='android.bundle.StandaloneConfig.dex_merging_strategy', index=2,
- number=3, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _STANDALONECONFIG_DEXMERGINGSTRATEGY,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1641,
- serialized_end=1891,
-)
-
-
-_SPLITDIMENSION = _descriptor.Descriptor(
- name='SplitDimension',
- full_name='android.bundle.SplitDimension',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.SplitDimension.value', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='negate', full_name='android.bundle.SplitDimension.negate', index=1,
- number=2, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='suffix_stripping', full_name='android.bundle.SplitDimension.suffix_stripping', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _SPLITDIMENSION_VALUE,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1894,
- serialized_end=2162,
-)
-
-
-_SUFFIXSTRIPPING = _descriptor.Descriptor(
- name='SuffixStripping',
- full_name='android.bundle.SuffixStripping',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='enabled', full_name='android.bundle.SuffixStripping.enabled', index=0,
- number=1, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='default_suffix', full_name='android.bundle.SuffixStripping.default_suffix', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2164,
- serialized_end=2222,
-)
-
-
-_APEXCONFIG = _descriptor.Descriptor(
- name='ApexConfig',
- full_name='android.bundle.ApexConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='apex_embedded_apk_config', full_name='android.bundle.ApexConfig.apex_embedded_apk_config', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2224,
- serialized_end=2309,
-)
-
-
-_APEXEMBEDDEDAPKCONFIG = _descriptor.Descriptor(
- name='ApexEmbeddedApkConfig',
- full_name='android.bundle.ApexEmbeddedApkConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='package_name', full_name='android.bundle.ApexEmbeddedApkConfig.package_name', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='path', full_name='android.bundle.ApexEmbeddedApkConfig.path', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2311,
- serialized_end=2370,
-)
-
-
-_UNSIGNEDEMBEDDEDAPKCONFIG = _descriptor.Descriptor(
- name='UnsignedEmbeddedApkConfig',
- full_name='android.bundle.UnsignedEmbeddedApkConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='path', full_name='android.bundle.UnsignedEmbeddedApkConfig.path', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2372,
- serialized_end=2413,
-)
-
-
-_ASSETMODULESCONFIG = _descriptor.Descriptor(
- name='AssetModulesConfig',
- full_name='android.bundle.AssetModulesConfig',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='app_version', full_name='android.bundle.AssetModulesConfig.app_version', index=0,
- number=1, type=3, cpp_type=2, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='asset_version_tag', full_name='android.bundle.AssetModulesConfig.asset_version_tag', index=1,
- number=2, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2415,
- serialized_end=2483,
-)
-
-_BUNDLECONFIG.fields_by_name['bundletool'].message_type = _BUNDLETOOL
-_BUNDLECONFIG.fields_by_name['optimizations'].message_type = _OPTIMIZATIONS
-_BUNDLECONFIG.fields_by_name['compression'].message_type = _COMPRESSION
-_BUNDLECONFIG.fields_by_name['master_resources'].message_type = _MASTERRESOURCES
-_BUNDLECONFIG.fields_by_name['apex_config'].message_type = _APEXCONFIG
-_BUNDLECONFIG.fields_by_name['unsigned_embedded_apk_config'].message_type = _UNSIGNEDEMBEDDEDAPKCONFIG
-_BUNDLECONFIG.fields_by_name['asset_modules_config'].message_type = _ASSETMODULESCONFIG
-_BUNDLECONFIG.fields_by_name['type'].enum_type = _BUNDLECONFIG_BUNDLETYPE
-_BUNDLECONFIG_BUNDLETYPE.containing_type = _BUNDLECONFIG
-_COMPRESSION.fields_by_name['install_time_asset_module_default_compression'].enum_type = _COMPRESSION_ASSETMODULECOMPRESSION
-_COMPRESSION_ASSETMODULECOMPRESSION.containing_type = _COMPRESSION
-_OPTIMIZATIONS.fields_by_name['splits_config'].message_type = _SPLITSCONFIG
-_OPTIMIZATIONS.fields_by_name['uncompress_native_libraries'].message_type = _UNCOMPRESSNATIVELIBRARIES
-_OPTIMIZATIONS.fields_by_name['uncompress_dex_files'].message_type = _UNCOMPRESSDEXFILES
-_OPTIMIZATIONS.fields_by_name['standalone_config'].message_type = _STANDALONECONFIG
-_OPTIMIZATIONS.fields_by_name['resource_optimizations'].message_type = _RESOURCEOPTIMIZATIONS
-_OPTIMIZATIONS.fields_by_name['store_archive'].message_type = _STOREARCHIVE
-_RESOURCEOPTIMIZATIONS.fields_by_name['sparse_encoding'].enum_type = _RESOURCEOPTIMIZATIONS_SPARSEENCODING
-_RESOURCEOPTIMIZATIONS_SPARSEENCODING.containing_type = _RESOURCEOPTIMIZATIONS
-_SPLITSCONFIG.fields_by_name['split_dimension'].message_type = _SPLITDIMENSION
-_STANDALONECONFIG.fields_by_name['split_dimension'].message_type = _SPLITDIMENSION
-_STANDALONECONFIG.fields_by_name['dex_merging_strategy'].enum_type = _STANDALONECONFIG_DEXMERGINGSTRATEGY
-_STANDALONECONFIG_DEXMERGINGSTRATEGY.containing_type = _STANDALONECONFIG
-_SPLITDIMENSION.fields_by_name['value'].enum_type = _SPLITDIMENSION_VALUE
-_SPLITDIMENSION.fields_by_name['suffix_stripping'].message_type = _SUFFIXSTRIPPING
-_SPLITDIMENSION_VALUE.containing_type = _SPLITDIMENSION
-_APEXCONFIG.fields_by_name['apex_embedded_apk_config'].message_type = _APEXEMBEDDEDAPKCONFIG
-DESCRIPTOR.message_types_by_name['BundleConfig'] = _BUNDLECONFIG
-DESCRIPTOR.message_types_by_name['Bundletool'] = _BUNDLETOOL
-DESCRIPTOR.message_types_by_name['Compression'] = _COMPRESSION
-DESCRIPTOR.message_types_by_name['MasterResources'] = _MASTERRESOURCES
-DESCRIPTOR.message_types_by_name['Optimizations'] = _OPTIMIZATIONS
-DESCRIPTOR.message_types_by_name['ResourceOptimizations'] = _RESOURCEOPTIMIZATIONS
-DESCRIPTOR.message_types_by_name['UncompressNativeLibraries'] = _UNCOMPRESSNATIVELIBRARIES
-DESCRIPTOR.message_types_by_name['UncompressDexFiles'] = _UNCOMPRESSDEXFILES
-DESCRIPTOR.message_types_by_name['StoreArchive'] = _STOREARCHIVE
-DESCRIPTOR.message_types_by_name['SplitsConfig'] = _SPLITSCONFIG
-DESCRIPTOR.message_types_by_name['StandaloneConfig'] = _STANDALONECONFIG
-DESCRIPTOR.message_types_by_name['SplitDimension'] = _SPLITDIMENSION
-DESCRIPTOR.message_types_by_name['SuffixStripping'] = _SUFFIXSTRIPPING
-DESCRIPTOR.message_types_by_name['ApexConfig'] = _APEXCONFIG
-DESCRIPTOR.message_types_by_name['ApexEmbeddedApkConfig'] = _APEXEMBEDDEDAPKCONFIG
-DESCRIPTOR.message_types_by_name['UnsignedEmbeddedApkConfig'] = _UNSIGNEDEMBEDDEDAPKCONFIG
-DESCRIPTOR.message_types_by_name['AssetModulesConfig'] = _ASSETMODULESCONFIG
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-BundleConfig = _reflection.GeneratedProtocolMessageType('BundleConfig', (_message.Message,), {
- 'DESCRIPTOR' : _BUNDLECONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.BundleConfig)
- })
-_sym_db.RegisterMessage(BundleConfig)
-
-Bundletool = _reflection.GeneratedProtocolMessageType('Bundletool', (_message.Message,), {
- 'DESCRIPTOR' : _BUNDLETOOL,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.Bundletool)
- })
-_sym_db.RegisterMessage(Bundletool)
-
-Compression = _reflection.GeneratedProtocolMessageType('Compression', (_message.Message,), {
- 'DESCRIPTOR' : _COMPRESSION,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.Compression)
- })
-_sym_db.RegisterMessage(Compression)
-
-MasterResources = _reflection.GeneratedProtocolMessageType('MasterResources', (_message.Message,), {
- 'DESCRIPTOR' : _MASTERRESOURCES,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.MasterResources)
- })
-_sym_db.RegisterMessage(MasterResources)
-
-Optimizations = _reflection.GeneratedProtocolMessageType('Optimizations', (_message.Message,), {
- 'DESCRIPTOR' : _OPTIMIZATIONS,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.Optimizations)
- })
-_sym_db.RegisterMessage(Optimizations)
-
-ResourceOptimizations = _reflection.GeneratedProtocolMessageType('ResourceOptimizations', (_message.Message,), {
- 'DESCRIPTOR' : _RESOURCEOPTIMIZATIONS,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ResourceOptimizations)
- })
-_sym_db.RegisterMessage(ResourceOptimizations)
-
-UncompressNativeLibraries = _reflection.GeneratedProtocolMessageType('UncompressNativeLibraries', (_message.Message,), {
- 'DESCRIPTOR' : _UNCOMPRESSNATIVELIBRARIES,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.UncompressNativeLibraries)
- })
-_sym_db.RegisterMessage(UncompressNativeLibraries)
-
-UncompressDexFiles = _reflection.GeneratedProtocolMessageType('UncompressDexFiles', (_message.Message,), {
- 'DESCRIPTOR' : _UNCOMPRESSDEXFILES,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.UncompressDexFiles)
- })
-_sym_db.RegisterMessage(UncompressDexFiles)
-
-StoreArchive = _reflection.GeneratedProtocolMessageType('StoreArchive', (_message.Message,), {
- 'DESCRIPTOR' : _STOREARCHIVE,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.StoreArchive)
- })
-_sym_db.RegisterMessage(StoreArchive)
-
-SplitsConfig = _reflection.GeneratedProtocolMessageType('SplitsConfig', (_message.Message,), {
- 'DESCRIPTOR' : _SPLITSCONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.SplitsConfig)
- })
-_sym_db.RegisterMessage(SplitsConfig)
-
-StandaloneConfig = _reflection.GeneratedProtocolMessageType('StandaloneConfig', (_message.Message,), {
- 'DESCRIPTOR' : _STANDALONECONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.StandaloneConfig)
- })
-_sym_db.RegisterMessage(StandaloneConfig)
-
-SplitDimension = _reflection.GeneratedProtocolMessageType('SplitDimension', (_message.Message,), {
- 'DESCRIPTOR' : _SPLITDIMENSION,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.SplitDimension)
- })
-_sym_db.RegisterMessage(SplitDimension)
-
-SuffixStripping = _reflection.GeneratedProtocolMessageType('SuffixStripping', (_message.Message,), {
- 'DESCRIPTOR' : _SUFFIXSTRIPPING,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.SuffixStripping)
- })
-_sym_db.RegisterMessage(SuffixStripping)
-
-ApexConfig = _reflection.GeneratedProtocolMessageType('ApexConfig', (_message.Message,), {
- 'DESCRIPTOR' : _APEXCONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ApexConfig)
- })
-_sym_db.RegisterMessage(ApexConfig)
-
-ApexEmbeddedApkConfig = _reflection.GeneratedProtocolMessageType('ApexEmbeddedApkConfig', (_message.Message,), {
- 'DESCRIPTOR' : _APEXEMBEDDEDAPKCONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ApexEmbeddedApkConfig)
- })
-_sym_db.RegisterMessage(ApexEmbeddedApkConfig)
-
-UnsignedEmbeddedApkConfig = _reflection.GeneratedProtocolMessageType('UnsignedEmbeddedApkConfig', (_message.Message,), {
- 'DESCRIPTOR' : _UNSIGNEDEMBEDDEDAPKCONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.UnsignedEmbeddedApkConfig)
- })
-_sym_db.RegisterMessage(UnsignedEmbeddedApkConfig)
-
-AssetModulesConfig = _reflection.GeneratedProtocolMessageType('AssetModulesConfig', (_message.Message,), {
- 'DESCRIPTOR' : _ASSETMODULESCONFIG,
- '__module__' : 'config_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.AssetModulesConfig)
- })
-_sym_db.RegisterMessage(AssetModulesConfig)
-
-
-DESCRIPTOR._options = None
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'config_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\022com.android.bundle'
+ _globals['_SPLITDIMENSION_VALUE'].values_by_name["DEVICE_TIER"]._loaded_options = None
+ _globals['_SPLITDIMENSION_VALUE'].values_by_name["DEVICE_TIER"]._serialized_options = b'\010\001'
+ _globals['_BUNDLECONFIG']._serialized_start=33
+ _globals['_BUNDLECONFIG']._serialized_end=604
+ _globals['_BUNDLECONFIG_BUNDLETYPE']._serialized_start=553
+ _globals['_BUNDLECONFIG_BUNDLETYPE']._serialized_end=604
+ _globals['_BUNDLETOOL']._serialized_start=606
+ _globals['_BUNDLETOOL']._serialized_end=641
+ _globals['_COMPRESSION']._serialized_start=644
+ _globals['_COMPRESSION']._serialized_end=1033
+ _globals['_COMPRESSION_ASSETMODULECOMPRESSION']._serialized_start=881
+ _globals['_COMPRESSION_ASSETMODULECOMPRESSION']._serialized_end=956
+ _globals['_COMPRESSION_APKCOMPRESSIONALGORITHM']._serialized_start=958
+ _globals['_COMPRESSION_APKCOMPRESSIONALGORITHM']._serialized_end=1033
+ _globals['_MASTERRESOURCES']._serialized_start=1035
+ _globals['_MASTERRESOURCES']._serialized_end=1098
+ _globals['_OPTIMIZATIONS']._serialized_start=1101
+ _globals['_OPTIMIZATIONS']._serialized_end=1524
+ _globals['_RESOURCEOPTIMIZATIONS']._serialized_start=1527
+ _globals['_RESOURCEOPTIMIZATIONS']._serialized_end=2075
+ _globals['_RESOURCEOPTIMIZATIONS_RESOURCETYPEANDNAME']._serialized_start=1727
+ _globals['_RESOURCEOPTIMIZATIONS_RESOURCETYPEANDNAME']._serialized_end=1776
+ _globals['_RESOURCEOPTIMIZATIONS_COLLAPSEDRESOURCENAMES']._serialized_start=1779
+ _globals['_RESOURCEOPTIMIZATIONS_COLLAPSEDRESOURCENAMES']._serialized_end=2000
+ _globals['_RESOURCEOPTIMIZATIONS_SPARSEENCODING']._serialized_start=2002
+ _globals['_RESOURCEOPTIMIZATIONS_SPARSEENCODING']._serialized_end=2075
+ _globals['_UNCOMPRESSNATIVELIBRARIES']._serialized_start=2078
+ _globals['_UNCOMPRESSNATIVELIBRARIES']._serialized_end=2318
+ _globals['_UNCOMPRESSNATIVELIBRARIES_PAGEALIGNMENT']._serialized_start=2200
+ _globals['_UNCOMPRESSNATIVELIBRARIES_PAGEALIGNMENT']._serialized_end=2318
+ _globals['_UNCOMPRESSDEXFILES']._serialized_start=2321
+ _globals['_UNCOMPRESSDEXFILES']._serialized_end=2531
+ _globals['_UNCOMPRESSDEXFILES_UNCOMPRESSEDDEXTARGETSDK']._serialized_start=2458
+ _globals['_UNCOMPRESSDEXFILES_UNCOMPRESSEDDEXTARGETSDK']._serialized_end=2531
+ _globals['_STOREARCHIVE']._serialized_start=2533
+ _globals['_STOREARCHIVE']._serialized_end=2564
+ _globals['_LOCALES']._serialized_start=2566
+ _globals['_LOCALES']._serialized_end=2605
+ _globals['_SPLITSCONFIG']._serialized_start=2607
+ _globals['_SPLITSCONFIG']._serialized_end=2678
+ _globals['_STANDALONECONFIG']._serialized_start=2681
+ _globals['_STANDALONECONFIG']._serialized_end=3093
+ _globals['_STANDALONECONFIG_DEXMERGINGSTRATEGY']._serialized_start=2956
+ _globals['_STANDALONECONFIG_DEXMERGINGSTRATEGY']._serialized_end=3014
+ _globals['_STANDALONECONFIG_FEATUREMODULESMODE']._serialized_start=3016
+ _globals['_STANDALONECONFIG_FEATUREMODULESMODE']._serialized_end=3093
+ _globals['_SPLITDIMENSION']._serialized_start=3096
+ _globals['_SPLITDIMENSION']._serialized_end=3426
+ _globals['_SPLITDIMENSION_VALUE']._serialized_start=3243
+ _globals['_SPLITDIMENSION_VALUE']._serialized_end=3426
+ _globals['_SUFFIXSTRIPPING']._serialized_start=3428
+ _globals['_SUFFIXSTRIPPING']._serialized_end=3486
+ _globals['_APEXCONFIG']._serialized_start=3489
+ _globals['_APEXCONFIG']._serialized_end=3634
+ _globals['_SUPPORTEDABISET']._serialized_start=3636
+ _globals['_SUPPORTEDABISET']._serialized_end=3666
+ _globals['_APEXEMBEDDEDAPKCONFIG']._serialized_start=3668
+ _globals['_APEXEMBEDDEDAPKCONFIG']._serialized_end=3727
+ _globals['_UNSIGNEDEMBEDDEDAPKCONFIG']._serialized_start=3729
+ _globals['_UNSIGNEDEMBEDDEDAPKCONFIG']._serialized_end=3770
+ _globals['_ASSETMODULESCONFIG']._serialized_start=3772
+ _globals['_ASSETMODULESCONFIG']._serialized_end=3840
# @@protoc_insertion_point(module_scope)
diff --git a/direct/src/dist/_proto/files_pb2.py b/direct/src/dist/_proto/files_pb2.py
index f4ac2a9275..368f088bbc 100644
--- a/direct/src/dist/_proto/files_pb2.py
+++ b/direct/src/dist/_proto/files_pb2.py
@@ -1,11 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
# source: files.proto
+# Protobuf Python Version: 6.33.0
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 0,
+ '',
+ 'files.proto'
+)
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -14,294 +25,24 @@ _sym_db = _symbol_database.Default()
from . import targeting_pb2 as targeting__pb2
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='files.proto',
- package='android.bundle',
- syntax='proto3',
- serialized_options=b'\n\022com.android.bundle',
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x0b\x66iles.proto\x12\x0e\x61ndroid.bundle\x1a\x0ftargeting.proto\"D\n\x06\x41ssets\x12:\n\tdirectory\x18\x01 \x03(\x0b\x32\'.android.bundle.TargetedAssetsDirectory\"M\n\x0fNativeLibraries\x12:\n\tdirectory\x18\x01 \x03(\x0b\x32\'.android.bundle.TargetedNativeDirectory\"D\n\nApexImages\x12\x30\n\x05image\x18\x01 \x03(\x0b\x32!.android.bundle.TargetedApexImageJ\x04\x08\x02\x10\x03\"d\n\x17TargetedAssetsDirectory\x12\x0c\n\x04path\x18\x01 \x01(\t\x12;\n\ttargeting\x18\x02 \x01(\x0b\x32(.android.bundle.AssetsDirectoryTargeting\"d\n\x17TargetedNativeDirectory\x12\x0c\n\x04path\x18\x01 \x01(\t\x12;\n\ttargeting\x18\x02 \x01(\x0b\x32(.android.bundle.NativeDirectoryTargeting\"q\n\x11TargetedApexImage\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0f\x62uild_info_path\x18\x03 \x01(\t\x12\x35\n\ttargeting\x18\x02 \x01(\x0b\x32\".android.bundle.ApexImageTargetingB\x14\n\x12\x63om.android.bundleb\x06proto3'
- ,
- dependencies=[targeting__pb2.DESCRIPTOR,])
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x66iles.proto\x12\x0e\x61ndroid.bundle\x1a\x0ftargeting.proto\"D\n\x06\x41ssets\x12:\n\tdirectory\x18\x01 \x03(\x0b\x32\'.android.bundle.TargetedAssetsDirectory\"M\n\x0fNativeLibraries\x12:\n\tdirectory\x18\x01 \x03(\x0b\x32\'.android.bundle.TargetedNativeDirectory\"D\n\nApexImages\x12\x30\n\x05image\x18\x01 \x03(\x0b\x32!.android.bundle.TargetedApexImageJ\x04\x08\x02\x10\x03\"d\n\x17TargetedAssetsDirectory\x12\x0c\n\x04path\x18\x01 \x01(\t\x12;\n\ttargeting\x18\x02 \x01(\x0b\x32(.android.bundle.AssetsDirectoryTargeting\"d\n\x17TargetedNativeDirectory\x12\x0c\n\x04path\x18\x01 \x01(\t\x12;\n\ttargeting\x18\x02 \x01(\x0b\x32(.android.bundle.NativeDirectoryTargeting\"q\n\x11TargetedApexImage\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\x17\n\x0f\x62uild_info_path\x18\x03 \x01(\t\x12\x35\n\ttargeting\x18\x02 \x01(\x0b\x32\".android.bundle.ApexImageTargetingB\x14\n\x12\x63om.android.bundleb\x06proto3')
-
-
-
-_ASSETS = _descriptor.Descriptor(
- name='Assets',
- full_name='android.bundle.Assets',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='directory', full_name='android.bundle.Assets.directory', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=48,
- serialized_end=116,
-)
-
-
-_NATIVELIBRARIES = _descriptor.Descriptor(
- name='NativeLibraries',
- full_name='android.bundle.NativeLibraries',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='directory', full_name='android.bundle.NativeLibraries.directory', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=118,
- serialized_end=195,
-)
-
-
-_APEXIMAGES = _descriptor.Descriptor(
- name='ApexImages',
- full_name='android.bundle.ApexImages',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='image', full_name='android.bundle.ApexImages.image', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=197,
- serialized_end=265,
-)
-
-
-_TARGETEDASSETSDIRECTORY = _descriptor.Descriptor(
- name='TargetedAssetsDirectory',
- full_name='android.bundle.TargetedAssetsDirectory',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='path', full_name='android.bundle.TargetedAssetsDirectory.path', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='targeting', full_name='android.bundle.TargetedAssetsDirectory.targeting', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=267,
- serialized_end=367,
-)
-
-
-_TARGETEDNATIVEDIRECTORY = _descriptor.Descriptor(
- name='TargetedNativeDirectory',
- full_name='android.bundle.TargetedNativeDirectory',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='path', full_name='android.bundle.TargetedNativeDirectory.path', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='targeting', full_name='android.bundle.TargetedNativeDirectory.targeting', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=369,
- serialized_end=469,
-)
-
-
-_TARGETEDAPEXIMAGE = _descriptor.Descriptor(
- name='TargetedApexImage',
- full_name='android.bundle.TargetedApexImage',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='path', full_name='android.bundle.TargetedApexImage.path', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='build_info_path', full_name='android.bundle.TargetedApexImage.build_info_path', index=1,
- number=3, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='targeting', full_name='android.bundle.TargetedApexImage.targeting', index=2,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=471,
- serialized_end=584,
-)
-
-_ASSETS.fields_by_name['directory'].message_type = _TARGETEDASSETSDIRECTORY
-_NATIVELIBRARIES.fields_by_name['directory'].message_type = _TARGETEDNATIVEDIRECTORY
-_APEXIMAGES.fields_by_name['image'].message_type = _TARGETEDAPEXIMAGE
-_TARGETEDASSETSDIRECTORY.fields_by_name['targeting'].message_type = targeting__pb2._ASSETSDIRECTORYTARGETING
-_TARGETEDNATIVEDIRECTORY.fields_by_name['targeting'].message_type = targeting__pb2._NATIVEDIRECTORYTARGETING
-_TARGETEDAPEXIMAGE.fields_by_name['targeting'].message_type = targeting__pb2._APEXIMAGETARGETING
-DESCRIPTOR.message_types_by_name['Assets'] = _ASSETS
-DESCRIPTOR.message_types_by_name['NativeLibraries'] = _NATIVELIBRARIES
-DESCRIPTOR.message_types_by_name['ApexImages'] = _APEXIMAGES
-DESCRIPTOR.message_types_by_name['TargetedAssetsDirectory'] = _TARGETEDASSETSDIRECTORY
-DESCRIPTOR.message_types_by_name['TargetedNativeDirectory'] = _TARGETEDNATIVEDIRECTORY
-DESCRIPTOR.message_types_by_name['TargetedApexImage'] = _TARGETEDAPEXIMAGE
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-Assets = _reflection.GeneratedProtocolMessageType('Assets', (_message.Message,), {
- 'DESCRIPTOR' : _ASSETS,
- '__module__' : 'files_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.Assets)
- })
-_sym_db.RegisterMessage(Assets)
-
-NativeLibraries = _reflection.GeneratedProtocolMessageType('NativeLibraries', (_message.Message,), {
- 'DESCRIPTOR' : _NATIVELIBRARIES,
- '__module__' : 'files_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.NativeLibraries)
- })
-_sym_db.RegisterMessage(NativeLibraries)
-
-ApexImages = _reflection.GeneratedProtocolMessageType('ApexImages', (_message.Message,), {
- 'DESCRIPTOR' : _APEXIMAGES,
- '__module__' : 'files_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ApexImages)
- })
-_sym_db.RegisterMessage(ApexImages)
-
-TargetedAssetsDirectory = _reflection.GeneratedProtocolMessageType('TargetedAssetsDirectory', (_message.Message,), {
- 'DESCRIPTOR' : _TARGETEDASSETSDIRECTORY,
- '__module__' : 'files_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.TargetedAssetsDirectory)
- })
-_sym_db.RegisterMessage(TargetedAssetsDirectory)
-
-TargetedNativeDirectory = _reflection.GeneratedProtocolMessageType('TargetedNativeDirectory', (_message.Message,), {
- 'DESCRIPTOR' : _TARGETEDNATIVEDIRECTORY,
- '__module__' : 'files_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.TargetedNativeDirectory)
- })
-_sym_db.RegisterMessage(TargetedNativeDirectory)
-
-TargetedApexImage = _reflection.GeneratedProtocolMessageType('TargetedApexImage', (_message.Message,), {
- 'DESCRIPTOR' : _TARGETEDAPEXIMAGE,
- '__module__' : 'files_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.TargetedApexImage)
- })
-_sym_db.RegisterMessage(TargetedApexImage)
-
-
-DESCRIPTOR._options = None
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'files_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\022com.android.bundle'
+ _globals['_ASSETS']._serialized_start=48
+ _globals['_ASSETS']._serialized_end=116
+ _globals['_NATIVELIBRARIES']._serialized_start=118
+ _globals['_NATIVELIBRARIES']._serialized_end=195
+ _globals['_APEXIMAGES']._serialized_start=197
+ _globals['_APEXIMAGES']._serialized_end=265
+ _globals['_TARGETEDASSETSDIRECTORY']._serialized_start=267
+ _globals['_TARGETEDASSETSDIRECTORY']._serialized_end=367
+ _globals['_TARGETEDNATIVEDIRECTORY']._serialized_start=369
+ _globals['_TARGETEDNATIVEDIRECTORY']._serialized_end=469
+ _globals['_TARGETEDAPEXIMAGE']._serialized_start=471
+ _globals['_TARGETEDAPEXIMAGE']._serialized_end=584
# @@protoc_insertion_point(module_scope)
diff --git a/direct/src/dist/_proto/targeting_pb2.py b/direct/src/dist/_proto/targeting_pb2.py
index b475f55af4..895eb1d1da 100644
--- a/direct/src/dist/_proto/targeting_pb2.py
+++ b/direct/src/dist/_proto/targeting_pb2.py
@@ -1,11 +1,22 @@
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
+# NO CHECKED-IN PROTOBUF GENCODE
# source: targeting.proto
+# Protobuf Python Version: 6.33.0
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
-from google.protobuf import message as _message
-from google.protobuf import reflection as _reflection
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import runtime_version as _runtime_version
from google.protobuf import symbol_database as _symbol_database
+from google.protobuf.internal import builder as _builder
+_runtime_version.ValidateProtobufRuntimeVersion(
+ _runtime_version.Domain.PUBLIC,
+ 6,
+ 33,
+ 0,
+ '',
+ 'targeting.proto'
+)
# @@protoc_insertion_point(imports)
_sym_db = _symbol_database.Default()
@@ -14,1457 +25,84 @@ _sym_db = _symbol_database.Default()
from google.protobuf import wrappers_pb2 as google_dot_protobuf_dot_wrappers__pb2
-DESCRIPTOR = _descriptor.FileDescriptor(
- name='targeting.proto',
- package='android.bundle',
- syntax='proto3',
- serialized_options=b'\n\022com.android.bundle',
- create_key=_descriptor._internal_create_key,
- serialized_pb=b'\n\x0ftargeting.proto\x12\x0e\x61ndroid.bundle\x1a\x1egoogle/protobuf/wrappers.proto\"\xf6\x02\n\x10VariantTargeting\x12\x42\n\x15sdk_version_targeting\x18\x01 \x01(\x0b\x32#.android.bundle.SdkVersionTargeting\x12\x33\n\rabi_targeting\x18\x02 \x01(\x0b\x32\x1c.android.bundle.AbiTargeting\x12H\n\x18screen_density_targeting\x18\x03 \x01(\x0b\x32&.android.bundle.ScreenDensityTargeting\x12>\n\x13multi_abi_targeting\x18\x04 \x01(\x0b\x32!.android.bundle.MultiAbiTargeting\x12_\n$texture_compression_format_targeting\x18\x05 \x01(\x0b\x32\x31.android.bundle.TextureCompressionFormatTargeting\"\xbc\x04\n\x0c\x41pkTargeting\x12\x33\n\rabi_targeting\x18\x01 \x01(\x0b\x32\x1c.android.bundle.AbiTargeting\x12=\n\x12language_targeting\x18\x03 \x01(\x0b\x32!.android.bundle.LanguageTargeting\x12H\n\x18screen_density_targeting\x18\x04 \x01(\x0b\x32&.android.bundle.ScreenDensityTargeting\x12\x42\n\x15sdk_version_targeting\x18\x05 \x01(\x0b\x32#.android.bundle.SdkVersionTargeting\x12_\n$texture_compression_format_targeting\x18\x06 \x01(\x0b\x32\x31.android.bundle.TextureCompressionFormatTargeting\x12>\n\x13multi_abi_targeting\x18\x07 \x01(\x0b\x32!.android.bundle.MultiAbiTargeting\x12?\n\x13sanitizer_targeting\x18\x08 \x01(\x0b\x32\".android.bundle.SanitizerTargeting\x12\x42\n\x15\x64\x65vice_tier_targeting\x18\t \x01(\x0b\x32#.android.bundle.DeviceTierTargetingJ\x04\x08\x02\x10\x03\"\xbb\x02\n\x0fModuleTargeting\x12\x42\n\x15sdk_version_targeting\x18\x01 \x01(\x0b\x32#.android.bundle.SdkVersionTargeting\x12H\n\x18\x64\x65vice_feature_targeting\x18\x02 \x03(\x0b\x32&.android.bundle.DeviceFeatureTargeting\x12H\n\x18user_countries_targeting\x18\x03 \x01(\x0b\x32&.android.bundle.UserCountriesTargeting\x12J\n\x16\x64\x65vice_group_targeting\x18\x05 \x01(\x0b\x32*.android.bundle.DeviceGroupModuleTargetingJ\x04\x08\x04\x10\x05\"@\n\x16UserCountriesTargeting\x12\x15\n\rcountry_codes\x18\x01 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x02 \x01(\x08\"\xfd\x01\n\rScreenDensity\x12\x43\n\rdensity_alias\x18\x01 \x01(\x0e\x32*.android.bundle.ScreenDensity.DensityAliasH\x00\x12\x15\n\x0b\x64\x65nsity_dpi\x18\x02 \x01(\x05H\x00\"\x7f\n\x0c\x44\x65nsityAlias\x12\x17\n\x13\x44\x45NSITY_UNSPECIFIED\x10\x00\x12\t\n\x05NODPI\x10\x01\x12\x08\n\x04LDPI\x10\x02\x12\x08\n\x04MDPI\x10\x03\x12\t\n\x05TVDPI\x10\x04\x12\x08\n\x04HDPI\x10\x05\x12\t\n\x05XHDPI\x10\x06\x12\n\n\x06XXHDPI\x10\x07\x12\x0b\n\x07XXXHDPI\x10\x08\x42\x0f\n\rdensity_oneof\"6\n\nSdkVersion\x12(\n\x03min\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\"\xb0\x02\n\x18TextureCompressionFormat\x12U\n\x05\x61lias\x18\x01 \x01(\x0e\x32\x46.android.bundle.TextureCompressionFormat.TextureCompressionFormatAlias\"\xbc\x01\n\x1dTextureCompressionFormatAlias\x12*\n&UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT\x10\x00\x12\r\n\tETC1_RGB8\x10\x01\x12\x0c\n\x08PALETTED\x10\x02\x12\x0c\n\x08THREE_DC\x10\x03\x12\x07\n\x03\x41TC\x10\x04\x12\x08\n\x04LATC\x10\x05\x12\x08\n\x04\x44XT1\x10\x06\x12\x08\n\x04S3TC\x10\x07\x12\t\n\x05PVRTC\x10\x08\x12\x08\n\x04\x41STC\x10\t\x12\x08\n\x04\x45TC2\x10\n\"\xb9\x01\n\x03\x41\x62i\x12+\n\x05\x61lias\x18\x01 \x01(\x0e\x32\x1c.android.bundle.Abi.AbiAlias\"\x84\x01\n\x08\x41\x62iAlias\x12 \n\x1cUNSPECIFIED_CPU_ARCHITECTURE\x10\x00\x12\x0b\n\x07\x41RMEABI\x10\x01\x12\x0f\n\x0b\x41RMEABI_V7A\x10\x02\x12\r\n\tARM64_V8A\x10\x03\x12\x07\n\x03X86\x10\x04\x12\n\n\x06X86_64\x10\x05\x12\x08\n\x04MIPS\x10\x06\x12\n\n\x06MIPS64\x10\x07\",\n\x08MultiAbi\x12 \n\x03\x61\x62i\x18\x01 \x03(\x0b\x32\x13.android.bundle.Abi\"o\n\tSanitizer\x12\x37\n\x05\x61lias\x18\x01 \x01(\x0e\x32(.android.bundle.Sanitizer.SanitizerAlias\")\n\x0eSanitizerAlias\x12\x08\n\x04NONE\x10\x00\x12\r\n\tHWADDRESS\x10\x01\">\n\rDeviceFeature\x12\x14\n\x0c\x66\x65\x61ture_name\x18\x01 \x01(\t\x12\x17\n\x0f\x66\x65\x61ture_version\x18\x02 \x01(\x05\"\x91\x02\n\x18\x41ssetsDirectoryTargeting\x12)\n\x03\x61\x62i\x18\x01 \x01(\x0b\x32\x1c.android.bundle.AbiTargeting\x12U\n\x1atexture_compression_format\x18\x03 \x01(\x0b\x32\x31.android.bundle.TextureCompressionFormatTargeting\x12\x33\n\x08language\x18\x04 \x01(\x0b\x32!.android.bundle.LanguageTargeting\x12\x38\n\x0b\x64\x65vice_tier\x18\x05 \x01(\x0b\x32#.android.bundle.DeviceTierTargetingJ\x04\x08\x02\x10\x03\"\xbe\x01\n\x18NativeDirectoryTargeting\x12 \n\x03\x61\x62i\x18\x01 \x01(\x0b\x32\x13.android.bundle.Abi\x12L\n\x1atexture_compression_format\x18\x03 \x01(\x0b\x32(.android.bundle.TextureCompressionFormat\x12,\n\tsanitizer\x18\x04 \x01(\x0b\x32\x19.android.bundle.SanitizerJ\x04\x08\x02\x10\x03\"J\n\x12\x41pexImageTargeting\x12\x34\n\tmulti_abi\x18\x01 \x01(\x0b\x32!.android.bundle.MultiAbiTargeting\"]\n\x0c\x41\x62iTargeting\x12\"\n\x05value\x18\x01 \x03(\x0b\x32\x13.android.bundle.Abi\x12)\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x13.android.bundle.Abi\"l\n\x11MultiAbiTargeting\x12\'\n\x05value\x18\x01 \x03(\x0b\x32\x18.android.bundle.MultiAbi\x12.\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x18.android.bundle.MultiAbi\"{\n\x16ScreenDensityTargeting\x12,\n\x05value\x18\x01 \x03(\x0b\x32\x1d.android.bundle.ScreenDensity\x12\x33\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x1d.android.bundle.ScreenDensity\"8\n\x11LanguageTargeting\x12\r\n\x05value\x18\x01 \x03(\t\x12\x14\n\x0c\x61lternatives\x18\x02 \x03(\t\"r\n\x13SdkVersionTargeting\x12)\n\x05value\x18\x01 \x03(\x0b\x32\x1a.android.bundle.SdkVersion\x12\x30\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x1a.android.bundle.SdkVersion\"\x9c\x01\n!TextureCompressionFormatTargeting\x12\x37\n\x05value\x18\x01 \x03(\x0b\x32(.android.bundle.TextureCompressionFormat\x12>\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32(.android.bundle.TextureCompressionFormat\">\n\x12SanitizerTargeting\x12(\n\x05value\x18\x01 \x03(\x0b\x32\x19.android.bundle.Sanitizer\"Q\n\x16\x44\x65viceFeatureTargeting\x12\x37\n\x10required_feature\x18\x01 \x01(\x0b\x32\x1d.android.bundle.DeviceFeature\"\x80\x01\n\x13\x44\x65viceTierTargeting\x12*\n\x05value\x18\x03 \x03(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\x0c\x61lternatives\x18\x04 \x03(\x0b\x32\x1b.google.protobuf.Int32ValueJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\"+\n\x1a\x44\x65viceGroupModuleTargeting\x12\r\n\x05value\x18\x01 \x03(\tB\x14\n\x12\x63om.android.bundleb\x06proto3'
- ,
- dependencies=[google_dot_protobuf_dot_wrappers__pb2.DESCRIPTOR,])
-
-
-
-_SCREENDENSITY_DENSITYALIAS = _descriptor.EnumDescriptor(
- name='DensityAlias',
- full_name='android.bundle.ScreenDensity.DensityAlias',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='DENSITY_UNSPECIFIED', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='NODPI', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='LDPI', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='MDPI', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='TVDPI', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='HDPI', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='XHDPI', index=6, number=6,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='XXHDPI', index=7, number=7,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='XXXHDPI', index=8, number=8,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1513,
- serialized_end=1640,
-)
-_sym_db.RegisterEnumDescriptor(_SCREENDENSITY_DENSITYALIAS)
-
-_TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS = _descriptor.EnumDescriptor(
- name='TextureCompressionFormatAlias',
- full_name='android.bundle.TextureCompressionFormat.TextureCompressionFormatAlias',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ETC1_RGB8', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PALETTED', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='THREE_DC', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ATC', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='LATC', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='DXT1', index=6, number=6,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='S3TC', index=7, number=7,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='PVRTC', index=8, number=8,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ASTC', index=9, number=9,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ETC2', index=10, number=10,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=1832,
- serialized_end=2020,
-)
-_sym_db.RegisterEnumDescriptor(_TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS)
-
-_ABI_ABIALIAS = _descriptor.EnumDescriptor(
- name='AbiAlias',
- full_name='android.bundle.Abi.AbiAlias',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='UNSPECIFIED_CPU_ARCHITECTURE', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ARMEABI', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ARMEABI_V7A', index=2, number=2,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='ARM64_V8A', index=3, number=3,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='X86', index=4, number=4,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='X86_64', index=5, number=5,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='MIPS', index=6, number=6,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='MIPS64', index=7, number=7,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=2076,
- serialized_end=2208,
-)
-_sym_db.RegisterEnumDescriptor(_ABI_ABIALIAS)
-
-_SANITIZER_SANITIZERALIAS = _descriptor.EnumDescriptor(
- name='SanitizerAlias',
- full_name='android.bundle.Sanitizer.SanitizerAlias',
- filename=None,
- file=DESCRIPTOR,
- create_key=_descriptor._internal_create_key,
- values=[
- _descriptor.EnumValueDescriptor(
- name='NONE', index=0, number=0,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- _descriptor.EnumValueDescriptor(
- name='HWADDRESS', index=1, number=1,
- serialized_options=None,
- type=None,
- create_key=_descriptor._internal_create_key),
- ],
- containing_type=None,
- serialized_options=None,
- serialized_start=2326,
- serialized_end=2367,
-)
-_sym_db.RegisterEnumDescriptor(_SANITIZER_SANITIZERALIAS)
-
-
-_VARIANTTARGETING = _descriptor.Descriptor(
- name='VariantTargeting',
- full_name='android.bundle.VariantTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='sdk_version_targeting', full_name='android.bundle.VariantTargeting.sdk_version_targeting', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='abi_targeting', full_name='android.bundle.VariantTargeting.abi_targeting', index=1,
- number=2, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='screen_density_targeting', full_name='android.bundle.VariantTargeting.screen_density_targeting', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='multi_abi_targeting', full_name='android.bundle.VariantTargeting.multi_abi_targeting', index=3,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='texture_compression_format_targeting', full_name='android.bundle.VariantTargeting.texture_compression_format_targeting', index=4,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=68,
- serialized_end=442,
-)
-
-
-_APKTARGETING = _descriptor.Descriptor(
- name='ApkTargeting',
- full_name='android.bundle.ApkTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='abi_targeting', full_name='android.bundle.ApkTargeting.abi_targeting', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='language_targeting', full_name='android.bundle.ApkTargeting.language_targeting', index=1,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='screen_density_targeting', full_name='android.bundle.ApkTargeting.screen_density_targeting', index=2,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='sdk_version_targeting', full_name='android.bundle.ApkTargeting.sdk_version_targeting', index=3,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='texture_compression_format_targeting', full_name='android.bundle.ApkTargeting.texture_compression_format_targeting', index=4,
- number=6, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='multi_abi_targeting', full_name='android.bundle.ApkTargeting.multi_abi_targeting', index=5,
- number=7, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='sanitizer_targeting', full_name='android.bundle.ApkTargeting.sanitizer_targeting', index=6,
- number=8, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='device_tier_targeting', full_name='android.bundle.ApkTargeting.device_tier_targeting', index=7,
- number=9, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=445,
- serialized_end=1017,
-)
-
-
-_MODULETARGETING = _descriptor.Descriptor(
- name='ModuleTargeting',
- full_name='android.bundle.ModuleTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='sdk_version_targeting', full_name='android.bundle.ModuleTargeting.sdk_version_targeting', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='device_feature_targeting', full_name='android.bundle.ModuleTargeting.device_feature_targeting', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='user_countries_targeting', full_name='android.bundle.ModuleTargeting.user_countries_targeting', index=2,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='device_group_targeting', full_name='android.bundle.ModuleTargeting.device_group_targeting', index=3,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1020,
- serialized_end=1335,
-)
-
-
-_USERCOUNTRIESTARGETING = _descriptor.Descriptor(
- name='UserCountriesTargeting',
- full_name='android.bundle.UserCountriesTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='country_codes', full_name='android.bundle.UserCountriesTargeting.country_codes', index=0,
- number=1, type=9, cpp_type=9, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='exclude', full_name='android.bundle.UserCountriesTargeting.exclude', index=1,
- number=2, type=8, cpp_type=7, label=1,
- has_default_value=False, default_value=False,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1337,
- serialized_end=1401,
-)
-
-
-_SCREENDENSITY = _descriptor.Descriptor(
- name='ScreenDensity',
- full_name='android.bundle.ScreenDensity',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='density_alias', full_name='android.bundle.ScreenDensity.density_alias', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='density_dpi', full_name='android.bundle.ScreenDensity.density_dpi', index=1,
- number=2, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _SCREENDENSITY_DENSITYALIAS,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- _descriptor.OneofDescriptor(
- name='density_oneof', full_name='android.bundle.ScreenDensity.density_oneof',
- index=0, containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[]),
- ],
- serialized_start=1404,
- serialized_end=1657,
-)
-
-
-_SDKVERSION = _descriptor.Descriptor(
- name='SdkVersion',
- full_name='android.bundle.SdkVersion',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='min', full_name='android.bundle.SdkVersion.min', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1659,
- serialized_end=1713,
-)
-
-
-_TEXTURECOMPRESSIONFORMAT = _descriptor.Descriptor(
- name='TextureCompressionFormat',
- full_name='android.bundle.TextureCompressionFormat',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='alias', full_name='android.bundle.TextureCompressionFormat.alias', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=1716,
- serialized_end=2020,
-)
-
-
-_ABI = _descriptor.Descriptor(
- name='Abi',
- full_name='android.bundle.Abi',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='alias', full_name='android.bundle.Abi.alias', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _ABI_ABIALIAS,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2023,
- serialized_end=2208,
-)
-
-
-_MULTIABI = _descriptor.Descriptor(
- name='MultiAbi',
- full_name='android.bundle.MultiAbi',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='abi', full_name='android.bundle.MultiAbi.abi', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2210,
- serialized_end=2254,
-)
-
-
-_SANITIZER = _descriptor.Descriptor(
- name='Sanitizer',
- full_name='android.bundle.Sanitizer',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='alias', full_name='android.bundle.Sanitizer.alias', index=0,
- number=1, type=14, cpp_type=8, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- _SANITIZER_SANITIZERALIAS,
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2256,
- serialized_end=2367,
-)
-
-
-_DEVICEFEATURE = _descriptor.Descriptor(
- name='DeviceFeature',
- full_name='android.bundle.DeviceFeature',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='feature_name', full_name='android.bundle.DeviceFeature.feature_name', index=0,
- number=1, type=9, cpp_type=9, label=1,
- has_default_value=False, default_value=b"".decode('utf-8'),
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='feature_version', full_name='android.bundle.DeviceFeature.feature_version', index=1,
- number=2, type=5, cpp_type=1, label=1,
- has_default_value=False, default_value=0,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2369,
- serialized_end=2431,
-)
-
-
-_ASSETSDIRECTORYTARGETING = _descriptor.Descriptor(
- name='AssetsDirectoryTargeting',
- full_name='android.bundle.AssetsDirectoryTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='abi', full_name='android.bundle.AssetsDirectoryTargeting.abi', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='texture_compression_format', full_name='android.bundle.AssetsDirectoryTargeting.texture_compression_format', index=1,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='language', full_name='android.bundle.AssetsDirectoryTargeting.language', index=2,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='device_tier', full_name='android.bundle.AssetsDirectoryTargeting.device_tier', index=3,
- number=5, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2434,
- serialized_end=2707,
-)
-
-
-_NATIVEDIRECTORYTARGETING = _descriptor.Descriptor(
- name='NativeDirectoryTargeting',
- full_name='android.bundle.NativeDirectoryTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='abi', full_name='android.bundle.NativeDirectoryTargeting.abi', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='texture_compression_format', full_name='android.bundle.NativeDirectoryTargeting.texture_compression_format', index=1,
- number=3, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='sanitizer', full_name='android.bundle.NativeDirectoryTargeting.sanitizer', index=2,
- number=4, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2710,
- serialized_end=2900,
-)
-
-
-_APEXIMAGETARGETING = _descriptor.Descriptor(
- name='ApexImageTargeting',
- full_name='android.bundle.ApexImageTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='multi_abi', full_name='android.bundle.ApexImageTargeting.multi_abi', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2902,
- serialized_end=2976,
-)
-
-
-_ABITARGETING = _descriptor.Descriptor(
- name='AbiTargeting',
- full_name='android.bundle.AbiTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.AbiTargeting.value', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.AbiTargeting.alternatives', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=2978,
- serialized_end=3071,
-)
-
-
-_MULTIABITARGETING = _descriptor.Descriptor(
- name='MultiAbiTargeting',
- full_name='android.bundle.MultiAbiTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.MultiAbiTargeting.value', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.MultiAbiTargeting.alternatives', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3073,
- serialized_end=3181,
-)
-
-
-_SCREENDENSITYTARGETING = _descriptor.Descriptor(
- name='ScreenDensityTargeting',
- full_name='android.bundle.ScreenDensityTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.ScreenDensityTargeting.value', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.ScreenDensityTargeting.alternatives', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3183,
- serialized_end=3306,
-)
-
-
-_LANGUAGETARGETING = _descriptor.Descriptor(
- name='LanguageTargeting',
- full_name='android.bundle.LanguageTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.LanguageTargeting.value', index=0,
- number=1, type=9, cpp_type=9, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.LanguageTargeting.alternatives', index=1,
- number=2, type=9, cpp_type=9, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3308,
- serialized_end=3364,
-)
-
-
-_SDKVERSIONTARGETING = _descriptor.Descriptor(
- name='SdkVersionTargeting',
- full_name='android.bundle.SdkVersionTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.SdkVersionTargeting.value', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.SdkVersionTargeting.alternatives', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3366,
- serialized_end=3480,
-)
-
-
-_TEXTURECOMPRESSIONFORMATTARGETING = _descriptor.Descriptor(
- name='TextureCompressionFormatTargeting',
- full_name='android.bundle.TextureCompressionFormatTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.TextureCompressionFormatTargeting.value', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.TextureCompressionFormatTargeting.alternatives', index=1,
- number=2, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3483,
- serialized_end=3639,
-)
-
-
-_SANITIZERTARGETING = _descriptor.Descriptor(
- name='SanitizerTargeting',
- full_name='android.bundle.SanitizerTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.SanitizerTargeting.value', index=0,
- number=1, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3641,
- serialized_end=3703,
-)
-
-
-_DEVICEFEATURETARGETING = _descriptor.Descriptor(
- name='DeviceFeatureTargeting',
- full_name='android.bundle.DeviceFeatureTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='required_feature', full_name='android.bundle.DeviceFeatureTargeting.required_feature', index=0,
- number=1, type=11, cpp_type=10, label=1,
- has_default_value=False, default_value=None,
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3705,
- serialized_end=3786,
-)
-
-
-_DEVICETIERTARGETING = _descriptor.Descriptor(
- name='DeviceTierTargeting',
- full_name='android.bundle.DeviceTierTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.DeviceTierTargeting.value', index=0,
- number=3, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- _descriptor.FieldDescriptor(
- name='alternatives', full_name='android.bundle.DeviceTierTargeting.alternatives', index=1,
- number=4, type=11, cpp_type=10, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3789,
- serialized_end=3917,
-)
-
-
-_DEVICEGROUPMODULETARGETING = _descriptor.Descriptor(
- name='DeviceGroupModuleTargeting',
- full_name='android.bundle.DeviceGroupModuleTargeting',
- filename=None,
- file=DESCRIPTOR,
- containing_type=None,
- create_key=_descriptor._internal_create_key,
- fields=[
- _descriptor.FieldDescriptor(
- name='value', full_name='android.bundle.DeviceGroupModuleTargeting.value', index=0,
- number=1, type=9, cpp_type=9, label=3,
- has_default_value=False, default_value=[],
- message_type=None, enum_type=None, containing_type=None,
- is_extension=False, extension_scope=None,
- serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key),
- ],
- extensions=[
- ],
- nested_types=[],
- enum_types=[
- ],
- serialized_options=None,
- is_extendable=False,
- syntax='proto3',
- extension_ranges=[],
- oneofs=[
- ],
- serialized_start=3919,
- serialized_end=3962,
-)
-
-_VARIANTTARGETING.fields_by_name['sdk_version_targeting'].message_type = _SDKVERSIONTARGETING
-_VARIANTTARGETING.fields_by_name['abi_targeting'].message_type = _ABITARGETING
-_VARIANTTARGETING.fields_by_name['screen_density_targeting'].message_type = _SCREENDENSITYTARGETING
-_VARIANTTARGETING.fields_by_name['multi_abi_targeting'].message_type = _MULTIABITARGETING
-_VARIANTTARGETING.fields_by_name['texture_compression_format_targeting'].message_type = _TEXTURECOMPRESSIONFORMATTARGETING
-_APKTARGETING.fields_by_name['abi_targeting'].message_type = _ABITARGETING
-_APKTARGETING.fields_by_name['language_targeting'].message_type = _LANGUAGETARGETING
-_APKTARGETING.fields_by_name['screen_density_targeting'].message_type = _SCREENDENSITYTARGETING
-_APKTARGETING.fields_by_name['sdk_version_targeting'].message_type = _SDKVERSIONTARGETING
-_APKTARGETING.fields_by_name['texture_compression_format_targeting'].message_type = _TEXTURECOMPRESSIONFORMATTARGETING
-_APKTARGETING.fields_by_name['multi_abi_targeting'].message_type = _MULTIABITARGETING
-_APKTARGETING.fields_by_name['sanitizer_targeting'].message_type = _SANITIZERTARGETING
-_APKTARGETING.fields_by_name['device_tier_targeting'].message_type = _DEVICETIERTARGETING
-_MODULETARGETING.fields_by_name['sdk_version_targeting'].message_type = _SDKVERSIONTARGETING
-_MODULETARGETING.fields_by_name['device_feature_targeting'].message_type = _DEVICEFEATURETARGETING
-_MODULETARGETING.fields_by_name['user_countries_targeting'].message_type = _USERCOUNTRIESTARGETING
-_MODULETARGETING.fields_by_name['device_group_targeting'].message_type = _DEVICEGROUPMODULETARGETING
-_SCREENDENSITY.fields_by_name['density_alias'].enum_type = _SCREENDENSITY_DENSITYALIAS
-_SCREENDENSITY_DENSITYALIAS.containing_type = _SCREENDENSITY
-_SCREENDENSITY.oneofs_by_name['density_oneof'].fields.append(
- _SCREENDENSITY.fields_by_name['density_alias'])
-_SCREENDENSITY.fields_by_name['density_alias'].containing_oneof = _SCREENDENSITY.oneofs_by_name['density_oneof']
-_SCREENDENSITY.oneofs_by_name['density_oneof'].fields.append(
- _SCREENDENSITY.fields_by_name['density_dpi'])
-_SCREENDENSITY.fields_by_name['density_dpi'].containing_oneof = _SCREENDENSITY.oneofs_by_name['density_oneof']
-_SDKVERSION.fields_by_name['min'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT32VALUE
-_TEXTURECOMPRESSIONFORMAT.fields_by_name['alias'].enum_type = _TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS
-_TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS.containing_type = _TEXTURECOMPRESSIONFORMAT
-_ABI.fields_by_name['alias'].enum_type = _ABI_ABIALIAS
-_ABI_ABIALIAS.containing_type = _ABI
-_MULTIABI.fields_by_name['abi'].message_type = _ABI
-_SANITIZER.fields_by_name['alias'].enum_type = _SANITIZER_SANITIZERALIAS
-_SANITIZER_SANITIZERALIAS.containing_type = _SANITIZER
-_ASSETSDIRECTORYTARGETING.fields_by_name['abi'].message_type = _ABITARGETING
-_ASSETSDIRECTORYTARGETING.fields_by_name['texture_compression_format'].message_type = _TEXTURECOMPRESSIONFORMATTARGETING
-_ASSETSDIRECTORYTARGETING.fields_by_name['language'].message_type = _LANGUAGETARGETING
-_ASSETSDIRECTORYTARGETING.fields_by_name['device_tier'].message_type = _DEVICETIERTARGETING
-_NATIVEDIRECTORYTARGETING.fields_by_name['abi'].message_type = _ABI
-_NATIVEDIRECTORYTARGETING.fields_by_name['texture_compression_format'].message_type = _TEXTURECOMPRESSIONFORMAT
-_NATIVEDIRECTORYTARGETING.fields_by_name['sanitizer'].message_type = _SANITIZER
-_APEXIMAGETARGETING.fields_by_name['multi_abi'].message_type = _MULTIABITARGETING
-_ABITARGETING.fields_by_name['value'].message_type = _ABI
-_ABITARGETING.fields_by_name['alternatives'].message_type = _ABI
-_MULTIABITARGETING.fields_by_name['value'].message_type = _MULTIABI
-_MULTIABITARGETING.fields_by_name['alternatives'].message_type = _MULTIABI
-_SCREENDENSITYTARGETING.fields_by_name['value'].message_type = _SCREENDENSITY
-_SCREENDENSITYTARGETING.fields_by_name['alternatives'].message_type = _SCREENDENSITY
-_SDKVERSIONTARGETING.fields_by_name['value'].message_type = _SDKVERSION
-_SDKVERSIONTARGETING.fields_by_name['alternatives'].message_type = _SDKVERSION
-_TEXTURECOMPRESSIONFORMATTARGETING.fields_by_name['value'].message_type = _TEXTURECOMPRESSIONFORMAT
-_TEXTURECOMPRESSIONFORMATTARGETING.fields_by_name['alternatives'].message_type = _TEXTURECOMPRESSIONFORMAT
-_SANITIZERTARGETING.fields_by_name['value'].message_type = _SANITIZER
-_DEVICEFEATURETARGETING.fields_by_name['required_feature'].message_type = _DEVICEFEATURE
-_DEVICETIERTARGETING.fields_by_name['value'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT32VALUE
-_DEVICETIERTARGETING.fields_by_name['alternatives'].message_type = google_dot_protobuf_dot_wrappers__pb2._INT32VALUE
-DESCRIPTOR.message_types_by_name['VariantTargeting'] = _VARIANTTARGETING
-DESCRIPTOR.message_types_by_name['ApkTargeting'] = _APKTARGETING
-DESCRIPTOR.message_types_by_name['ModuleTargeting'] = _MODULETARGETING
-DESCRIPTOR.message_types_by_name['UserCountriesTargeting'] = _USERCOUNTRIESTARGETING
-DESCRIPTOR.message_types_by_name['ScreenDensity'] = _SCREENDENSITY
-DESCRIPTOR.message_types_by_name['SdkVersion'] = _SDKVERSION
-DESCRIPTOR.message_types_by_name['TextureCompressionFormat'] = _TEXTURECOMPRESSIONFORMAT
-DESCRIPTOR.message_types_by_name['Abi'] = _ABI
-DESCRIPTOR.message_types_by_name['MultiAbi'] = _MULTIABI
-DESCRIPTOR.message_types_by_name['Sanitizer'] = _SANITIZER
-DESCRIPTOR.message_types_by_name['DeviceFeature'] = _DEVICEFEATURE
-DESCRIPTOR.message_types_by_name['AssetsDirectoryTargeting'] = _ASSETSDIRECTORYTARGETING
-DESCRIPTOR.message_types_by_name['NativeDirectoryTargeting'] = _NATIVEDIRECTORYTARGETING
-DESCRIPTOR.message_types_by_name['ApexImageTargeting'] = _APEXIMAGETARGETING
-DESCRIPTOR.message_types_by_name['AbiTargeting'] = _ABITARGETING
-DESCRIPTOR.message_types_by_name['MultiAbiTargeting'] = _MULTIABITARGETING
-DESCRIPTOR.message_types_by_name['ScreenDensityTargeting'] = _SCREENDENSITYTARGETING
-DESCRIPTOR.message_types_by_name['LanguageTargeting'] = _LANGUAGETARGETING
-DESCRIPTOR.message_types_by_name['SdkVersionTargeting'] = _SDKVERSIONTARGETING
-DESCRIPTOR.message_types_by_name['TextureCompressionFormatTargeting'] = _TEXTURECOMPRESSIONFORMATTARGETING
-DESCRIPTOR.message_types_by_name['SanitizerTargeting'] = _SANITIZERTARGETING
-DESCRIPTOR.message_types_by_name['DeviceFeatureTargeting'] = _DEVICEFEATURETARGETING
-DESCRIPTOR.message_types_by_name['DeviceTierTargeting'] = _DEVICETIERTARGETING
-DESCRIPTOR.message_types_by_name['DeviceGroupModuleTargeting'] = _DEVICEGROUPMODULETARGETING
-_sym_db.RegisterFileDescriptor(DESCRIPTOR)
-
-VariantTargeting = _reflection.GeneratedProtocolMessageType('VariantTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _VARIANTTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.VariantTargeting)
- })
-_sym_db.RegisterMessage(VariantTargeting)
-
-ApkTargeting = _reflection.GeneratedProtocolMessageType('ApkTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _APKTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ApkTargeting)
- })
-_sym_db.RegisterMessage(ApkTargeting)
-
-ModuleTargeting = _reflection.GeneratedProtocolMessageType('ModuleTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _MODULETARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ModuleTargeting)
- })
-_sym_db.RegisterMessage(ModuleTargeting)
-
-UserCountriesTargeting = _reflection.GeneratedProtocolMessageType('UserCountriesTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _USERCOUNTRIESTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.UserCountriesTargeting)
- })
-_sym_db.RegisterMessage(UserCountriesTargeting)
-
-ScreenDensity = _reflection.GeneratedProtocolMessageType('ScreenDensity', (_message.Message,), {
- 'DESCRIPTOR' : _SCREENDENSITY,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ScreenDensity)
- })
-_sym_db.RegisterMessage(ScreenDensity)
-
-SdkVersion = _reflection.GeneratedProtocolMessageType('SdkVersion', (_message.Message,), {
- 'DESCRIPTOR' : _SDKVERSION,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.SdkVersion)
- })
-_sym_db.RegisterMessage(SdkVersion)
-
-TextureCompressionFormat = _reflection.GeneratedProtocolMessageType('TextureCompressionFormat', (_message.Message,), {
- 'DESCRIPTOR' : _TEXTURECOMPRESSIONFORMAT,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.TextureCompressionFormat)
- })
-_sym_db.RegisterMessage(TextureCompressionFormat)
-
-Abi = _reflection.GeneratedProtocolMessageType('Abi', (_message.Message,), {
- 'DESCRIPTOR' : _ABI,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.Abi)
- })
-_sym_db.RegisterMessage(Abi)
-
-MultiAbi = _reflection.GeneratedProtocolMessageType('MultiAbi', (_message.Message,), {
- 'DESCRIPTOR' : _MULTIABI,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.MultiAbi)
- })
-_sym_db.RegisterMessage(MultiAbi)
-
-Sanitizer = _reflection.GeneratedProtocolMessageType('Sanitizer', (_message.Message,), {
- 'DESCRIPTOR' : _SANITIZER,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.Sanitizer)
- })
-_sym_db.RegisterMessage(Sanitizer)
-
-DeviceFeature = _reflection.GeneratedProtocolMessageType('DeviceFeature', (_message.Message,), {
- 'DESCRIPTOR' : _DEVICEFEATURE,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.DeviceFeature)
- })
-_sym_db.RegisterMessage(DeviceFeature)
-
-AssetsDirectoryTargeting = _reflection.GeneratedProtocolMessageType('AssetsDirectoryTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _ASSETSDIRECTORYTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.AssetsDirectoryTargeting)
- })
-_sym_db.RegisterMessage(AssetsDirectoryTargeting)
-
-NativeDirectoryTargeting = _reflection.GeneratedProtocolMessageType('NativeDirectoryTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _NATIVEDIRECTORYTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.NativeDirectoryTargeting)
- })
-_sym_db.RegisterMessage(NativeDirectoryTargeting)
-
-ApexImageTargeting = _reflection.GeneratedProtocolMessageType('ApexImageTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _APEXIMAGETARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ApexImageTargeting)
- })
-_sym_db.RegisterMessage(ApexImageTargeting)
-
-AbiTargeting = _reflection.GeneratedProtocolMessageType('AbiTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _ABITARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.AbiTargeting)
- })
-_sym_db.RegisterMessage(AbiTargeting)
-
-MultiAbiTargeting = _reflection.GeneratedProtocolMessageType('MultiAbiTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _MULTIABITARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.MultiAbiTargeting)
- })
-_sym_db.RegisterMessage(MultiAbiTargeting)
-
-ScreenDensityTargeting = _reflection.GeneratedProtocolMessageType('ScreenDensityTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _SCREENDENSITYTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.ScreenDensityTargeting)
- })
-_sym_db.RegisterMessage(ScreenDensityTargeting)
-
-LanguageTargeting = _reflection.GeneratedProtocolMessageType('LanguageTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _LANGUAGETARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.LanguageTargeting)
- })
-_sym_db.RegisterMessage(LanguageTargeting)
-
-SdkVersionTargeting = _reflection.GeneratedProtocolMessageType('SdkVersionTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _SDKVERSIONTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.SdkVersionTargeting)
- })
-_sym_db.RegisterMessage(SdkVersionTargeting)
-
-TextureCompressionFormatTargeting = _reflection.GeneratedProtocolMessageType('TextureCompressionFormatTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _TEXTURECOMPRESSIONFORMATTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.TextureCompressionFormatTargeting)
- })
-_sym_db.RegisterMessage(TextureCompressionFormatTargeting)
-
-SanitizerTargeting = _reflection.GeneratedProtocolMessageType('SanitizerTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _SANITIZERTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.SanitizerTargeting)
- })
-_sym_db.RegisterMessage(SanitizerTargeting)
-
-DeviceFeatureTargeting = _reflection.GeneratedProtocolMessageType('DeviceFeatureTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _DEVICEFEATURETARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.DeviceFeatureTargeting)
- })
-_sym_db.RegisterMessage(DeviceFeatureTargeting)
-
-DeviceTierTargeting = _reflection.GeneratedProtocolMessageType('DeviceTierTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _DEVICETIERTARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.DeviceTierTargeting)
- })
-_sym_db.RegisterMessage(DeviceTierTargeting)
-
-DeviceGroupModuleTargeting = _reflection.GeneratedProtocolMessageType('DeviceGroupModuleTargeting', (_message.Message,), {
- 'DESCRIPTOR' : _DEVICEGROUPMODULETARGETING,
- '__module__' : 'targeting_pb2'
- # @@protoc_insertion_point(class_scope:android.bundle.DeviceGroupModuleTargeting)
- })
-_sym_db.RegisterMessage(DeviceGroupModuleTargeting)
-
-
-DESCRIPTOR._options = None
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0ftargeting.proto\x12\x0e\x61ndroid.bundle\x1a\x1egoogle/protobuf/wrappers.proto\"\xba\x03\n\x10VariantTargeting\x12\x42\n\x15sdk_version_targeting\x18\x01 \x01(\x0b\x32#.android.bundle.SdkVersionTargeting\x12\x33\n\rabi_targeting\x18\x02 \x01(\x0b\x32\x1c.android.bundle.AbiTargeting\x12H\n\x18screen_density_targeting\x18\x03 \x01(\x0b\x32&.android.bundle.ScreenDensityTargeting\x12>\n\x13multi_abi_targeting\x18\x04 \x01(\x0b\x32!.android.bundle.MultiAbiTargeting\x12_\n$texture_compression_format_targeting\x18\x05 \x01(\x0b\x32\x31.android.bundle.TextureCompressionFormatTargeting\x12\x42\n\x15sdk_runtime_targeting\x18\x06 \x01(\x0b\x32#.android.bundle.SdkRuntimeTargeting\"\xce\x05\n\x0c\x41pkTargeting\x12\x33\n\rabi_targeting\x18\x01 \x01(\x0b\x32\x1c.android.bundle.AbiTargeting\x12=\n\x12language_targeting\x18\x03 \x01(\x0b\x32!.android.bundle.LanguageTargeting\x12H\n\x18screen_density_targeting\x18\x04 \x01(\x0b\x32&.android.bundle.ScreenDensityTargeting\x12\x42\n\x15sdk_version_targeting\x18\x05 \x01(\x0b\x32#.android.bundle.SdkVersionTargeting\x12_\n$texture_compression_format_targeting\x18\x06 \x01(\x0b\x32\x31.android.bundle.TextureCompressionFormatTargeting\x12>\n\x13multi_abi_targeting\x18\x07 \x01(\x0b\x32!.android.bundle.MultiAbiTargeting\x12?\n\x13sanitizer_targeting\x18\x08 \x01(\x0b\x32\".android.bundle.SanitizerTargeting\x12\x46\n\x15\x64\x65vice_tier_targeting\x18\t \x01(\x0b\x32#.android.bundle.DeviceTierTargetingB\x02\x18\x01\x12\x46\n\x15\x63ountry_set_targeting\x18\n \x01(\x0b\x32#.android.bundle.CountrySetTargetingB\x02\x18\x01\x12\x44\n\x16\x64\x65vice_group_targeting\x18\x0b \x01(\x0b\x32$.android.bundle.DeviceGroupTargetingJ\x04\x08\x02\x10\x03\"\xbb\x02\n\x0fModuleTargeting\x12\x42\n\x15sdk_version_targeting\x18\x01 \x01(\x0b\x32#.android.bundle.SdkVersionTargeting\x12H\n\x18\x64\x65vice_feature_targeting\x18\x02 \x03(\x0b\x32&.android.bundle.DeviceFeatureTargeting\x12H\n\x18user_countries_targeting\x18\x03 \x01(\x0b\x32&.android.bundle.UserCountriesTargeting\x12J\n\x16\x64\x65vice_group_targeting\x18\x05 \x01(\x0b\x32*.android.bundle.DeviceGroupModuleTargetingJ\x04\x08\x04\x10\x05\"\xac\x01\n\x14\x41ssetModuleTargeting\x12H\n\x18user_countries_targeting\x18\x01 \x01(\x0b\x32&.android.bundle.UserCountriesTargeting\x12J\n\x16\x64\x65vice_group_targeting\x18\x02 \x01(\x0b\x32*.android.bundle.DeviceGroupModuleTargeting\"@\n\x16UserCountriesTargeting\x12\x15\n\rcountry_codes\x18\x01 \x03(\t\x12\x0f\n\x07\x65xclude\x18\x02 \x01(\x08\"\xfd\x01\n\rScreenDensity\x12\x43\n\rdensity_alias\x18\x01 \x01(\x0e\x32*.android.bundle.ScreenDensity.DensityAliasH\x00\x12\x15\n\x0b\x64\x65nsity_dpi\x18\x02 \x01(\x05H\x00\"\x7f\n\x0c\x44\x65nsityAlias\x12\x17\n\x13\x44\x45NSITY_UNSPECIFIED\x10\x00\x12\t\n\x05NODPI\x10\x01\x12\x08\n\x04LDPI\x10\x02\x12\x08\n\x04MDPI\x10\x03\x12\t\n\x05TVDPI\x10\x04\x12\x08\n\x04HDPI\x10\x05\x12\t\n\x05XHDPI\x10\x06\x12\n\n\x06XXHDPI\x10\x07\x12\x0b\n\x07XXXHDPI\x10\x08\x42\x0f\n\rdensity_oneof\"6\n\nSdkVersion\x12(\n\x03min\x18\x01 \x01(\x0b\x32\x1b.google.protobuf.Int32Value\"\xb0\x02\n\x18TextureCompressionFormat\x12U\n\x05\x61lias\x18\x01 \x01(\x0e\x32\x46.android.bundle.TextureCompressionFormat.TextureCompressionFormatAlias\"\xbc\x01\n\x1dTextureCompressionFormatAlias\x12*\n&UNSPECIFIED_TEXTURE_COMPRESSION_FORMAT\x10\x00\x12\r\n\tETC1_RGB8\x10\x01\x12\x0c\n\x08PALETTED\x10\x02\x12\x0c\n\x08THREE_DC\x10\x03\x12\x07\n\x03\x41TC\x10\x04\x12\x08\n\x04LATC\x10\x05\x12\x08\n\x04\x44XT1\x10\x06\x12\x08\n\x04S3TC\x10\x07\x12\t\n\x05PVRTC\x10\x08\x12\x08\n\x04\x41STC\x10\t\x12\x08\n\x04\x45TC2\x10\n\"\xc6\x01\n\x03\x41\x62i\x12+\n\x05\x61lias\x18\x01 \x01(\x0e\x32\x1c.android.bundle.Abi.AbiAlias\"\x91\x01\n\x08\x41\x62iAlias\x12 \n\x1cUNSPECIFIED_CPU_ARCHITECTURE\x10\x00\x12\x0b\n\x07\x41RMEABI\x10\x01\x12\x0f\n\x0b\x41RMEABI_V7A\x10\x02\x12\r\n\tARM64_V8A\x10\x03\x12\x07\n\x03X86\x10\x04\x12\n\n\x06X86_64\x10\x05\x12\x08\n\x04MIPS\x10\x06\x12\n\n\x06MIPS64\x10\x07\x12\x0b\n\x07RISCV64\x10\x08\",\n\x08MultiAbi\x12 \n\x03\x61\x62i\x18\x01 \x03(\x0b\x32\x13.android.bundle.Abi\"o\n\tSanitizer\x12\x37\n\x05\x61lias\x18\x01 \x01(\x0e\x32(.android.bundle.Sanitizer.SanitizerAlias\")\n\x0eSanitizerAlias\x12\x08\n\x04NONE\x10\x00\x12\r\n\tHWADDRESS\x10\x01\">\n\rDeviceFeature\x12\x14\n\x0c\x66\x65\x61ture_name\x18\x01 \x01(\t\x12\x17\n\x0f\x66\x65\x61ture_version\x18\x02 \x01(\x05\"\x8f\x03\n\x18\x41ssetsDirectoryTargeting\x12)\n\x03\x61\x62i\x18\x01 \x01(\x0b\x32\x1c.android.bundle.AbiTargeting\x12U\n\x1atexture_compression_format\x18\x03 \x01(\x0b\x32\x31.android.bundle.TextureCompressionFormatTargeting\x12\x33\n\x08language\x18\x04 \x01(\x0b\x32!.android.bundle.LanguageTargeting\x12<\n\x0b\x64\x65vice_tier\x18\x05 \x01(\x0b\x32#.android.bundle.DeviceTierTargetingB\x02\x18\x01\x12<\n\x0b\x63ountry_set\x18\x06 \x01(\x0b\x32#.android.bundle.CountrySetTargetingB\x02\x18\x01\x12:\n\x0c\x64\x65vice_group\x18\x07 \x01(\x0b\x32$.android.bundle.DeviceGroupTargetingJ\x04\x08\x02\x10\x03\"\xbe\x01\n\x18NativeDirectoryTargeting\x12 \n\x03\x61\x62i\x18\x01 \x01(\x0b\x32\x13.android.bundle.Abi\x12L\n\x1atexture_compression_format\x18\x03 \x01(\x0b\x32(.android.bundle.TextureCompressionFormat\x12,\n\tsanitizer\x18\x04 \x01(\x0b\x32\x19.android.bundle.SanitizerJ\x04\x08\x02\x10\x03\"J\n\x12\x41pexImageTargeting\x12\x34\n\tmulti_abi\x18\x01 \x01(\x0b\x32!.android.bundle.MultiAbiTargeting\"]\n\x0c\x41\x62iTargeting\x12\"\n\x05value\x18\x01 \x03(\x0b\x32\x13.android.bundle.Abi\x12)\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x13.android.bundle.Abi\"l\n\x11MultiAbiTargeting\x12\'\n\x05value\x18\x01 \x03(\x0b\x32\x18.android.bundle.MultiAbi\x12.\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x18.android.bundle.MultiAbi\"{\n\x16ScreenDensityTargeting\x12,\n\x05value\x18\x01 \x03(\x0b\x32\x1d.android.bundle.ScreenDensity\x12\x33\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x1d.android.bundle.ScreenDensity\"8\n\x11LanguageTargeting\x12\r\n\x05value\x18\x01 \x03(\t\x12\x14\n\x0c\x61lternatives\x18\x02 \x03(\t\"r\n\x13SdkVersionTargeting\x12)\n\x05value\x18\x01 \x03(\x0b\x32\x1a.android.bundle.SdkVersion\x12\x30\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32\x1a.android.bundle.SdkVersion\"\x9c\x01\n!TextureCompressionFormatTargeting\x12\x37\n\x05value\x18\x01 \x03(\x0b\x32(.android.bundle.TextureCompressionFormat\x12>\n\x0c\x61lternatives\x18\x02 \x03(\x0b\x32(.android.bundle.TextureCompressionFormat\">\n\x12SanitizerTargeting\x12(\n\x05value\x18\x01 \x03(\x0b\x32\x19.android.bundle.Sanitizer\"Q\n\x16\x44\x65viceFeatureTargeting\x12\x37\n\x10required_feature\x18\x01 \x01(\x0b\x32\x1d.android.bundle.DeviceFeature\"\x80\x01\n\x13\x44\x65viceTierTargeting\x12*\n\x05value\x18\x03 \x03(\x0b\x32\x1b.google.protobuf.Int32Value\x12\x31\n\x0c\x61lternatives\x18\x04 \x03(\x0b\x32\x1b.google.protobuf.Int32ValueJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03\":\n\x13\x43ountrySetTargeting\x12\r\n\x05value\x18\x01 \x03(\t\x12\x14\n\x0c\x61lternatives\x18\x02 \x03(\t\";\n\x14\x44\x65viceGroupTargeting\x12\r\n\x05value\x18\x01 \x03(\t\x12\x14\n\x0c\x61lternatives\x18\x02 \x03(\t\"+\n\x1a\x44\x65viceGroupModuleTargeting\x12\r\n\x05value\x18\x01 \x03(\t\"3\n\x13SdkRuntimeTargeting\x12\x1c\n\x14requires_sdk_runtime\x18\x01 \x01(\x08\x42\x14\n\x12\x63om.android.bundleb\x06proto3')
+
+_globals = globals()
+_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
+_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'targeting_pb2', _globals)
+if not _descriptor._USE_C_DESCRIPTORS:
+ _globals['DESCRIPTOR']._loaded_options = None
+ _globals['DESCRIPTOR']._serialized_options = b'\n\022com.android.bundle'
+ _globals['_APKTARGETING'].fields_by_name['device_tier_targeting']._loaded_options = None
+ _globals['_APKTARGETING'].fields_by_name['device_tier_targeting']._serialized_options = b'\030\001'
+ _globals['_APKTARGETING'].fields_by_name['country_set_targeting']._loaded_options = None
+ _globals['_APKTARGETING'].fields_by_name['country_set_targeting']._serialized_options = b'\030\001'
+ _globals['_ASSETSDIRECTORYTARGETING'].fields_by_name['device_tier']._loaded_options = None
+ _globals['_ASSETSDIRECTORYTARGETING'].fields_by_name['device_tier']._serialized_options = b'\030\001'
+ _globals['_ASSETSDIRECTORYTARGETING'].fields_by_name['country_set']._loaded_options = None
+ _globals['_ASSETSDIRECTORYTARGETING'].fields_by_name['country_set']._serialized_options = b'\030\001'
+ _globals['_VARIANTTARGETING']._serialized_start=68
+ _globals['_VARIANTTARGETING']._serialized_end=510
+ _globals['_APKTARGETING']._serialized_start=513
+ _globals['_APKTARGETING']._serialized_end=1231
+ _globals['_MODULETARGETING']._serialized_start=1234
+ _globals['_MODULETARGETING']._serialized_end=1549
+ _globals['_ASSETMODULETARGETING']._serialized_start=1552
+ _globals['_ASSETMODULETARGETING']._serialized_end=1724
+ _globals['_USERCOUNTRIESTARGETING']._serialized_start=1726
+ _globals['_USERCOUNTRIESTARGETING']._serialized_end=1790
+ _globals['_SCREENDENSITY']._serialized_start=1793
+ _globals['_SCREENDENSITY']._serialized_end=2046
+ _globals['_SCREENDENSITY_DENSITYALIAS']._serialized_start=1902
+ _globals['_SCREENDENSITY_DENSITYALIAS']._serialized_end=2029
+ _globals['_SDKVERSION']._serialized_start=2048
+ _globals['_SDKVERSION']._serialized_end=2102
+ _globals['_TEXTURECOMPRESSIONFORMAT']._serialized_start=2105
+ _globals['_TEXTURECOMPRESSIONFORMAT']._serialized_end=2409
+ _globals['_TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS']._serialized_start=2221
+ _globals['_TEXTURECOMPRESSIONFORMAT_TEXTURECOMPRESSIONFORMATALIAS']._serialized_end=2409
+ _globals['_ABI']._serialized_start=2412
+ _globals['_ABI']._serialized_end=2610
+ _globals['_ABI_ABIALIAS']._serialized_start=2465
+ _globals['_ABI_ABIALIAS']._serialized_end=2610
+ _globals['_MULTIABI']._serialized_start=2612
+ _globals['_MULTIABI']._serialized_end=2656
+ _globals['_SANITIZER']._serialized_start=2658
+ _globals['_SANITIZER']._serialized_end=2769
+ _globals['_SANITIZER_SANITIZERALIAS']._serialized_start=2728
+ _globals['_SANITIZER_SANITIZERALIAS']._serialized_end=2769
+ _globals['_DEVICEFEATURE']._serialized_start=2771
+ _globals['_DEVICEFEATURE']._serialized_end=2833
+ _globals['_ASSETSDIRECTORYTARGETING']._serialized_start=2836
+ _globals['_ASSETSDIRECTORYTARGETING']._serialized_end=3235
+ _globals['_NATIVEDIRECTORYTARGETING']._serialized_start=3238
+ _globals['_NATIVEDIRECTORYTARGETING']._serialized_end=3428
+ _globals['_APEXIMAGETARGETING']._serialized_start=3430
+ _globals['_APEXIMAGETARGETING']._serialized_end=3504
+ _globals['_ABITARGETING']._serialized_start=3506
+ _globals['_ABITARGETING']._serialized_end=3599
+ _globals['_MULTIABITARGETING']._serialized_start=3601
+ _globals['_MULTIABITARGETING']._serialized_end=3709
+ _globals['_SCREENDENSITYTARGETING']._serialized_start=3711
+ _globals['_SCREENDENSITYTARGETING']._serialized_end=3834
+ _globals['_LANGUAGETARGETING']._serialized_start=3836
+ _globals['_LANGUAGETARGETING']._serialized_end=3892
+ _globals['_SDKVERSIONTARGETING']._serialized_start=3894
+ _globals['_SDKVERSIONTARGETING']._serialized_end=4008
+ _globals['_TEXTURECOMPRESSIONFORMATTARGETING']._serialized_start=4011
+ _globals['_TEXTURECOMPRESSIONFORMATTARGETING']._serialized_end=4167
+ _globals['_SANITIZERTARGETING']._serialized_start=4169
+ _globals['_SANITIZERTARGETING']._serialized_end=4231
+ _globals['_DEVICEFEATURETARGETING']._serialized_start=4233
+ _globals['_DEVICEFEATURETARGETING']._serialized_end=4314
+ _globals['_DEVICETIERTARGETING']._serialized_start=4317
+ _globals['_DEVICETIERTARGETING']._serialized_end=4445
+ _globals['_COUNTRYSETTARGETING']._serialized_start=4447
+ _globals['_COUNTRYSETTARGETING']._serialized_end=4505
+ _globals['_DEVICEGROUPTARGETING']._serialized_start=4507
+ _globals['_DEVICEGROUPTARGETING']._serialized_end=4566
+ _globals['_DEVICEGROUPMODULETARGETING']._serialized_start=4568
+ _globals['_DEVICEGROUPMODULETARGETING']._serialized_end=4611
+ _globals['_SDKRUNTIMETARGETING']._serialized_start=4613
+ _globals['_SDKRUNTIMETARGETING']._serialized_end=4664
# @@protoc_insertion_point(module_scope)
diff --git a/direct/src/dist/commands.py b/direct/src/dist/commands.py
index cfddcd89af..259ce58289 100644
--- a/direct/src/dist/commands.py
+++ b/direct/src/dist/commands.py
@@ -79,6 +79,10 @@ def _model_to_bam(_build_cmd, srcpath, dstpath):
_register_python_loaders()
+ if src_fn.get_extension() == 'egg' and zipfile.is_zipfile(src_fn.to_os_specific()):
+ _build_cmd.warn('Skipping %s as it appears to be a Python .egg archive, was this included by mistake?' % (src_fn.to_os_specific()))
+ return
+
loader = p3d.Loader.get_global_ptr()
options = p3d.LoaderOptions(p3d.LoaderOptions.LF_report_errors |
p3d.LoaderOptions.LF_no_ram_cache)
@@ -192,14 +196,14 @@ SITE_PY_ANDROID = """
# module.
import sys, os
from importlib import _bootstrap, _bootstrap_external
+from android_support import log_write as android_log_write
+from android_support import find_library
class AndroidExtensionFinder:
@classmethod
def find_spec(cls, fullname, path=None, target=None):
- soname = 'libpy.' + fullname + '.so'
- path = os.path.join(sys.platlibdir, soname)
-
- if os.path.exists(path):
+ path = find_library('py.' + fullname)
+ if path:
loader = _bootstrap_external.ExtensionFileLoader(fullname, path)
return _bootstrap.ModuleSpec(fullname, loader, origin=path)
@@ -210,8 +214,6 @@ sys.meta_path.append(AndroidExtensionFinder)
from _frozen_importlib import _imp, FrozenImporter
from io import RawIOBase, TextIOWrapper
-from android_log import write as android_log_write
-
sys.frozen = True
@@ -300,7 +302,8 @@ class build_apps(setuptools.Command):
self.android_version_code = 1
self.android_min_sdk_version = 21
self.android_max_sdk_version = None
- self.android_target_sdk_version = 30
+ self.android_target_sdk_version = 35
+ self.android_manifest_file = None
self.gui_apps = {}
self.console_apps = {}
self.macos_main_app = None
@@ -316,7 +319,10 @@ class build_apps(setuptools.Command):
'win_amd64',
]
- if sys.version_info >= (3, 13):
+ if sys.version_info >= (3, 14):
+ # This version of Python is only available for 10.15+.
+ self.platforms[1] = 'macosx_10_15_x86_64'
+ elif sys.version_info >= (3, 13):
# This version of Python is only available for 10.13+.
self.platforms[1] = 'macosx_10_13_x86_64'
@@ -586,6 +592,10 @@ class build_apps(setuptools.Command):
data_dir = os.path.join(build_dir, 'assets')
os.makedirs(data_dir, exist_ok=True)
+ res_dir = os.path.join(build_dir, 'res')
+ res_raw_dir = os.path.join(res_dir, 'raw')
+ os.makedirs(res_raw_dir, exist_ok=True)
+
for abi in self.android_abis:
lib_dir = os.path.join(build_dir, 'lib', abi)
os.makedirs(lib_dir, exist_ok=True)
@@ -602,7 +612,7 @@ class build_apps(setuptools.Command):
# We end up copying the data multiple times to the same
# directory, but that's probably fine for now.
- self.build_binaries(platform + suffix, lib_dir, data_dir)
+ self.build_binaries(platform + suffix, lib_dir, data_dir, res_raw_dir)
# Write out the icons to the res directory.
for appname, icon in self.icon_objects.items():
@@ -610,9 +620,9 @@ class build_apps(setuptools.Command):
# Conventional name for icon on Android.
basename = 'ic_launcher.png'
else:
- basename = f'ic_{appname}.png'
+ appname_sane = appname.replace(' ', '_')
+ basename = f'ic_{appname_sane}.png'
- res_dir = os.path.join(build_dir, 'res')
icon.writeSize(48, os.path.join(res_dir, 'mipmap-mdpi-v4', basename))
icon.writeSize(72, os.path.join(res_dir, 'mipmap-hdpi-v4', basename))
icon.writeSize(96, os.path.join(res_dir, 'mipmap-xhdpi-v4', basename))
@@ -623,8 +633,17 @@ class build_apps(setuptools.Command):
self.build_assets(platform, data_dir)
- # Generate an AndroidManifest.xml
- self.generate_android_manifest(os.path.join(build_dir, 'AndroidManifest.xml'))
+ # Generate an AndroidManifest.xml if none was provided
+ manifest_path = os.path.join(build_dir, 'AndroidManifest.xml')
+ if self.android_manifest_file:
+ try:
+ self.check_android_manifest(self.android_manifest_file)
+ except Exception as e:
+ self.announce(f"Failed to use provided manifest file from {self.android_manifest_file}", distutils.log.FATAL)
+ raise
+ self.copy(self.android_manifest_file, manifest_path)
+ else:
+ self.generate_android_manifest(manifest_path)
else:
self.build_binaries(platform, build_dir, build_dir)
self.build_assets(platform, build_dir)
@@ -691,8 +710,14 @@ class build_apps(setuptools.Command):
subprocess.check_call([sys.executable, '-m', 'pip'] + pip_args)
except:
# Display a more helpful message for these common issues.
- if platform.startswith('macosx_10_9_') and sys.version_info >= (3, 13):
- new_platform = platform.replace('macosx_10_9_', 'macosx_10_13_')
+ if platform.startswith('macosx_10_13_') and sys.version_info >= (3, 14):
+ new_platform = platform.replace('macosx_10_13_', 'macosx_10_15_')
+ self.announce('This error likely occurs because {} is not a supported target as of Python 3.14.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
+ elif platform.startswith('macosx_10_9_') and sys.version_info >= (3, 13):
+ if sys.version_info >= (3, 14):
+ new_platform = platform.replace('macosx_10_9_', 'macosx_10_15_')
+ else:
+ new_platform = platform.replace('macosx_10_9_', 'macosx_10_13_')
self.announce('This error likely occurs because {} is not a supported target as of Python 3.13.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
elif platform.startswith('manylinux2010_') and sys.version_info >= (3, 11):
new_platform = platform.replace('manylinux2010_', 'manylinux2014_')
@@ -701,7 +726,9 @@ class build_apps(setuptools.Command):
new_platform = platform.replace('manylinux1_', 'manylinux2014_')
self.announce('This error likely occurs because {} is not a supported target as of Python 3.10.\nChange the target platform to {} instead.'.format(platform, new_platform), distutils.log.ERROR)
elif platform.startswith('macosx_10_6_') and sys.version_info >= (3, 8):
- if sys.version_info >= (3, 13):
+ if sys.version_info >= (3, 14):
+ new_platform = platform.replace('macosx_10_6_', 'macosx_10_15_')
+ elif sys.version_info >= (3, 13):
new_platform = platform.replace('macosx_10_6_', 'macosx_10_13_')
else:
new_platform = platform.replace('macosx_10_6_', 'macosx_10_9_')
@@ -855,7 +882,7 @@ class build_apps(setuptools.Command):
if category:
application.set('android:appCategory', category)
application.set('android:debuggable', ('false', 'true')[self.android_debuggable])
- application.set('android:extractNativeLibs', 'true')
+ application.set('android:extractNativeLibs', 'false')
application.set('android:hardwareAccelerated', 'true')
app_icon = self.icon_objects.get('*', self.icon_objects.get(self.macos_main_app))
@@ -863,6 +890,8 @@ class build_apps(setuptools.Command):
application.set('android:icon', '@mipmap/ic_launcher')
for appname in self.gui_apps:
+ appname_sane = appname.replace(' ', '_')
+
activity = ET.SubElement(application, 'activity')
activity.set('android:name', 'org.panda3d.android.PythonActivity')
activity.set('android:label', appname)
@@ -871,14 +900,19 @@ class build_apps(setuptools.Command):
activity.set('android:configChanges', 'layoutDirection|locale|grammaticalGender|fontScale|fontWeightAdjustment|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation')
activity.set('android:launchMode', 'singleInstance')
activity.set('android:preferMinimalPostProcessing', 'true')
+ activity.set('android:exported', 'true')
act_icon = self.icon_objects.get(appname)
if act_icon and act_icon is not app_icon:
- activity.set('android:icon', '@mipmap/ic_' + appname)
+ activity.set('android:icon', '@mipmap/ic_' + appname_sane)
meta_data = ET.SubElement(activity, 'meta-data')
meta_data.set('android:name', 'android.app.lib_name')
- meta_data.set('android:value', appname)
+ meta_data.set('android:value', appname_sane)
+
+ meta_data = ET.SubElement(activity, 'meta-data')
+ meta_data.set('android:name', 'org.panda3d.android.BLOB_RESOURCE')
+ meta_data.set('android:resource', '@raw/' + appname_sane + '.so')
intent_filter = ET.SubElement(activity, 'intent-filter')
ET.SubElement(intent_filter, 'action').set('android:name', 'android.intent.action.MAIN')
@@ -886,10 +920,44 @@ class build_apps(setuptools.Command):
ET.SubElement(intent_filter, 'category').set('android:name', 'android.intent.category.LEANBACK_LAUNCHER')
tree = ET.ElementTree(manifest)
+ if sys.version_info >= (3, 9):
+ ET.indent(tree)
with open(path, 'wb') as fh:
tree.write(fh, encoding='utf-8', xml_declaration=True)
- def build_binaries(self, platform, binary_dir, data_dir=None):
+ def check_android_manifest(self, path):
+ """ Checks that the user-provided manifest file seems OK. """
+
+ # This function doesn't aim to check everything as it's the user's
+ # responsibility, just a basic sanity check, but if we change anything
+ # in our own generation logic then it would be good to check those
+ # things here and warn if anything needs to be updated.
+
+ import xml.etree.ElementTree as ET
+
+ android = '{http://schemas.android.com/apk/res/android}'
+
+ tree = ET.parse(path)
+ root = tree.getroot()
+ if root.tag != 'manifest':
+ raise RuntimeError(f"Expected in {path}")
+
+ if root.attrib['package'] != self.application_id:
+ raise RuntimeError(f" package attribute does not match given application_id {self.application_id}")
+
+ apps = root.findall('application')
+ if len(apps) != 1:
+ raise RuntimeError(" must contain exactly one ")
+
+ application = apps[0]
+ for activity in application.iter('activity'):
+ if f'{android}name' not in activity.attrib:
+ raise RuntimeError(" element must have android:name attribute")
+
+ if self.android_target_sdk_version >= 31 and f'{android}exported' not in activity.attrib:
+ raise RuntimeError(" element must have android:exported attribute when targeting Android API 31+")
+
+ def build_binaries(self, platform, binary_dir, data_dir=None, blob_dir=None):
""" Builds the binary data for the given platform. """
use_wheels = True
@@ -1085,13 +1153,26 @@ class build_apps(setuptools.Command):
stub_name = 'deploy-stub'
target_name = appname
+ appname_sane = appname
if platform.startswith('win') or 'macosx' in platform:
if not use_console:
stub_name = 'deploy-stubw'
elif platform.startswith('android'):
if not use_console:
stub_name = 'libdeploy-stubw.so'
- target_name = 'lib' + target_name + '.so'
+ appname_sane = appname.replace(' ', '_')
+ target_name = 'lib' + appname_sane + '.so'
+
+ if use_wheels:
+ dexfile = os.path.join(binary_dir, '..', '..', 'classes.dex')
+ self.copy(os.path.join(p3dwhlfn, 'deploy_libs', 'classes.dex'), dexfile)
+
+ # Can this wheel load the blob as a raw resource?
+ with open(dexfile, 'rb') as fh:
+ supports_blob_resource = b'org.panda3d.android.BLOB_RESOURCE' in fh.read()
+
+ assert supports_blob_resource, \
+ "Please use a newer Panda3D wheel to build for Android using this version of build_apps"
if platform.startswith('win'):
stub_name += '.exe'
@@ -1123,6 +1204,14 @@ class build_apps(setuptools.Command):
if not self.log_filename or '%' not in self.log_filename:
use_strftime = False
+ blob_path = None
+ if blob_dir is not None:
+ if platform.startswith('android'):
+ # Not really a .so file, but it forces bundletool to align it
+ blob_path = os.path.join(blob_dir, appname_sane + '.so')
+ else:
+ blob_path = os.path.join(blob_dir, appname_sane)
+
target_path = os.path.join(binary_dir, target_name)
freezer.generateRuntimeFromStub(target_path, stub_file, use_console, {
'prc_data': prcexport if self.embed_prc_data else None,
@@ -1136,7 +1225,7 @@ class build_apps(setuptools.Command):
'prc_executable_args_envvar': None,
'main_dir': None,
'log_filename': self.expand_path(self.log_filename, platform),
- }, self.log_append, use_strftime)
+ }, self.log_append, use_strftime, blob_path)
stub_file.close()
if temp_file:
@@ -1251,11 +1340,6 @@ class build_apps(setuptools.Command):
search_path = get_search_path_for(source_path)
self.copy_with_dependencies(source_path, target_path, search_path)
- # Copy classes.dex on Android
- if use_wheels and platform.startswith('android'):
- self.copy(os.path.join(p3dwhlfn, 'deploy_libs', 'classes.dex'),
- os.path.join(binary_dir, '..', '..', 'classes.dex'))
-
# Extract any other data files from dependency packages.
if data_dir is None:
return
diff --git a/direct/src/dist/installers.py b/direct/src/dist/installers.py
index f09cef7841..c5b1475190 100644
--- a/direct/src/dist/installers.py
+++ b/direct/src/dist/installers.py
@@ -207,7 +207,7 @@ def create_aab(command, basename, build_dir):
and use it to convert an .aab into an .apk.
"""
- from ._android import AndroidManifest, AbiAlias, BundleConfig, NativeLibraries, ResourceTable
+ from ._android import AndroidManifest, AbiAlias, BundleConfig, NativeLibraries, ResourceTable, UncompressNativeLibraries
bundle_fn = p3d.Filename.from_os_specific(command.dist_dir) / (basename + '.aab')
build_dir_fn = p3d.Filename.from_os_specific(build_dir)
@@ -230,7 +230,13 @@ def create_aab(command, basename, build_dir):
config = BundleConfig()
config.bundletool.version = '1.1.0'
config.optimizations.splits_config.Clear()
- config.optimizations.uncompress_native_libraries.enabled = False
+ if axml.extract_native_libs:
+ config.optimizations.uncompress_native_libraries.enabled = False
+ else:
+ config.optimizations.uncompress_native_libraries.enabled = True
+ config.optimizations.uncompress_native_libraries.alignment = \
+ UncompressNativeLibraries.PageAlignment.PAGE_ALIGNMENT_16K
+ config.compression.uncompressed_glob.append('res/raw/**')
bundle.add_subfile('BundleConfig.pb', p3d.StringStream(config.SerializeToString()), 9)
resources = ResourceTable()
@@ -251,13 +257,25 @@ def create_aab(command, basename, build_dir):
entry.entry_id.id = entry_id
entry.name = res_name
- for density, tag in (160, 'mdpi'), (240, 'hdpi'), (320, 'xhdpi'), (480, 'xxhdpi'), (640, 'xxxhdpi'):
- path = f'res/mipmap-{tag}-v4/{res_name}.png'
- if (build_dir_fn / path).exists():
- bundle.add_subfile('base/' + path, build_dir_fn / path, 0)
- config_value = entry.config_value.add()
- config_value.config.density = density
- config_value.value.item.file.path = path
+ if type_name == 'raw':
+ path = f'res/raw/{res_name}'
+ if not (build_dir_fn / path).exists():
+ command.announce(
+ f'\tRaw resource {path} was not found on disk', distutils.log.ERROR)
+ return
+
+ # These are aligned to page size for mmap.
+ bundle.add_subfile('base/' + path, build_dir_fn / path, 0, 16384)
+ config_value = entry.config_value.add()
+ config_value.value.item.file.path = path
+ else:
+ for density, tag in (120, 'ldpi'), (160, 'mdpi'), (240, 'hdpi'), (320, 'xhdpi'), (480, 'xxhdpi'), (640, 'xxxhdpi'):
+ path = f'res/mipmap-{tag}-v4/{res_name}.png'
+ if (build_dir_fn / path).exists():
+ bundle.add_subfile('base/' + path, build_dir_fn / path, 0)
+ config_value = entry.config_value.add()
+ config_value.config.density = density
+ config_value.value.item.file.path = path
bundle.add_subfile('base/resources.pb', p3d.StringStream(resources.SerializeToString()), 9)
@@ -273,13 +291,25 @@ def create_aab(command, basename, build_dir):
# Add the classes.dex.
bundle.add_subfile('base/dex/classes.dex', build_dir_fn / 'classes.dex', 9)
- # Add libraries, compressed.
+ # Add libraries, compressed, unless extractNativeLibs is false, in which
+ # case they have to be aligned to page boundaries (16 KiB on 64-bit).
+ lib_compress = 9 if axml.extract_native_libs else 0
+
for abi in os.listdir(os.path.join(build_dir, 'lib')):
abi_dir = os.path.join(build_dir, 'lib', abi)
+ if axml.extract_native_libs:
+ lib_align = 0
+ elif '64' in abi:
+ lib_align = 16384
+ else:
+ lib_align = 4096
+
for lib in os.listdir(abi_dir):
if lib.startswith('lib') and lib.endswith('.so'):
- bundle.add_subfile(f'base/lib/{abi}/{lib}', build_dir_fn / 'lib' / abi / lib, 9)
+ bundle.add_subfile(f'base/lib/{abi}/{lib}',
+ build_dir_fn / 'lib' / abi / lib,
+ lib_compress, lib_align)
# Add assets, compressed.
assets_dir = os.path.join(build_dir, 'assets')
diff --git a/direct/src/distributed/ClockDelta.py b/direct/src/distributed/ClockDelta.py
index 7f8da75706..ebba8a7c97 100644
--- a/direct/src/distributed/ClockDelta.py
+++ b/direct/src/distributed/ClockDelta.py
@@ -48,7 +48,7 @@ class ClockDelta(DirectObject.DirectObject):
notify = DirectNotifyGlobal.directNotify.newCategory('ClockDelta')
- def __init__(self):
+ def __init__(self) -> None:
self.globalClock = ClockObject.getGlobalClock()
# self.delta is the relative delta from our clock to the
diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py
index a29c61cafa..f3ddc96f4f 100644
--- a/direct/src/distributed/ConnectionRepository.py
+++ b/direct/src/distributed/ConnectionRepository.py
@@ -1,4 +1,4 @@
-from panda3d.core import DocumentSpec, Filename, HTTPClient, VirtualFileSystem, getModelPath
+from panda3d.core import DocumentSpec, Filename, VirtualFileSystem, getModelPath
from panda3d.direct import CConnectionRepository, DCPacker
from direct.task import Task
from direct.task.TaskManagerGlobal import taskMgr
@@ -590,6 +590,7 @@ class ConnectionRepository(
if self.http is None:
try:
+ from panda3d.core import HTTPClient
self.http = HTTPClient()
except Exception:
pass
diff --git a/direct/src/distributed/DistributedObjectAI.py b/direct/src/distributed/DistributedObjectAI.py
index baacb4e998..c467845e68 100644
--- a/direct/src/distributed/DistributedObjectAI.py
+++ b/direct/src/distributed/DistributedObjectAI.py
@@ -317,7 +317,7 @@ class DistributedObjectAI(DistributedObjectBase):
# setLocation destroys self._zoneData if we move away to
# a different zone
if self._zoneData is None:
- from otp.ai.AIZoneData import AIZoneData # type: ignore[import]
+ from otp.ai.AIZoneData import AIZoneData # type: ignore[import-not-found]
self._zoneData = AIZoneData(self.air, self.parentId, self.zoneId)
return self._zoneData
@@ -515,7 +515,7 @@ class DistributedObjectAI(DistributedObjectBase):
# simultaneously on different lists of avatars, although they
# should have different names.
- from otp.ai import Barrier # type: ignore[import]
+ from otp.ai import Barrier # type: ignore[import-not-found]
context = self.__nextBarrierContext
# We assume the context number is passed as a uint16.
self.__nextBarrierContext = (self.__nextBarrierContext + 1) & 0xffff
diff --git a/direct/src/distributed/DistributedObjectUD.py b/direct/src/distributed/DistributedObjectUD.py
index bd473a9c54..3b02e032f4 100755
--- a/direct/src/distributed/DistributedObjectUD.py
+++ b/direct/src/distributed/DistributedObjectUD.py
@@ -432,7 +432,7 @@ class DistributedObjectUD(DistributedObjectBase):
# simultaneously on different lists of avatars, although they
# should have different names.
- from otp.ai import Barrier # type: ignore[import]
+ from otp.ai import Barrier # type: ignore[import-not-found]
context = self.__nextBarrierContext
# We assume the context number is passed as a uint16.
self.__nextBarrierContext = (self.__nextBarrierContext + 1) & 0xffff
diff --git a/direct/src/distributed/direct.dc b/direct/src/distributed/direct.dc
index 6468d91b29..b9387b20dc 100644
--- a/direct/src/distributed/direct.dc
+++ b/direct/src/distributed/direct.dc
@@ -84,8 +84,8 @@ dclass DistributedSmoothNode: DistributedNode {
suggestResync(uint32 avId, int16 timestampA, int16 timestampB,
int32 serverTimeSec, uint16 serverTimeUSec,
- uint16 / 100 uncertainty);
+ int16 / 100 uncertainty);
returnResync(uint32 avId, int16 timestampB,
int32 serverTimeSec, uint16 serverTimeUSec,
- uint16 / 100 uncertainty);
+ int16 / 100 uncertainty);
};
diff --git a/direct/src/extensions_native/extension_native_helpers.py b/direct/src/extensions_native/extension_native_helpers.py
index 2a302f415e..59176d6851 100644
--- a/direct/src/extensions_native/extension_native_helpers.py
+++ b/direct/src/extensions_native/extension_native_helpers.py
@@ -1,15 +1,19 @@
+from __future__ import annotations
+
__all__ = ["Dtool_ObjectToDict", "Dtool_funcToMethod"]
+from collections.abc import Callable
+
def Dtool_ObjectToDict(cls, name, obj):
cls.DtoolClassDict[name] = obj
-def Dtool_funcToMethod(func, cls, method_name=None):
+def Dtool_funcToMethod(func: Callable, cls, method_name: str | None = None) -> None:
"""Adds func to class so it is an accessible method; use method_name to specify the name to be used for calling the method.
The new method is accessible to any instance immediately."""
- func.__func__ = func
- func.__self__ = None
+ func.__func__ = func # type: ignore[attr-defined]
+ func.__self__ = None # type: ignore[attr-defined]
if not method_name:
method_name = func.__name__
cls.DtoolClassDict[method_name] = func
diff --git a/direct/src/gui/DirectButton.py b/direct/src/gui/DirectButton.py
index 0ed5523854..c4d3a819d1 100644
--- a/direct/src/gui/DirectButton.py
+++ b/direct/src/gui/DirectButton.py
@@ -44,6 +44,7 @@ class DirectButton(DirectFrame):
# Sounds to be used for button events
('rolloverSound', DGG.getDefaultRolloverSound(), self.setRolloverSound),
('clickSound', DGG.getDefaultClickSound(), self.setClickSound),
+ ('releaseSound', DGG.getDefaultReleaseSound(), self.setReleaseSound),
# Can only be specified at time of widget contruction
# Do the text/graphics appear to move when the button is clicked
('pressEffect', 1, DGG.INITOPT),
@@ -108,6 +109,13 @@ class DirectButton(DirectFrame):
# Pass any extra args to command
self['command'](*self['extraArgs'])
+ def setRolloverSound(self):
+ rolloverSound = self['rolloverSound']
+ if rolloverSound:
+ self.guiItem.setSound(DGG.ENTER + self.guiId, rolloverSound)
+ else:
+ self.guiItem.clearSound(DGG.ENTER + self.guiId)
+
def setClickSound(self):
clickSound = self['clickSound']
# Clear out sounds
@@ -122,9 +130,16 @@ class DirectButton(DirectFrame):
if DGG.RMB in self['commandButtons']:
self.guiItem.setSound(DGG.B3PRESS + self.guiId, clickSound)
- def setRolloverSound(self):
- rolloverSound = self['rolloverSound']
- if rolloverSound:
- self.guiItem.setSound(DGG.ENTER + self.guiId, rolloverSound)
- else:
- self.guiItem.clearSound(DGG.ENTER + self.guiId)
+ def setReleaseSound(self):
+ releaseSound = self['releaseSound']
+ # Clear out sounds
+ self.guiItem.clearSound(DGG.B1RELEASE + self.guiId)
+ self.guiItem.clearSound(DGG.B2RELEASE + self.guiId)
+ self.guiItem.clearSound(DGG.B3RELEASE + self.guiId)
+ if releaseSound:
+ if DGG.LMB in self['commandButtons']:
+ self.guiItem.setSound(DGG.B1RELEASE + self.guiId, releaseSound)
+ if DGG.MMB in self['commandButtons']:
+ self.guiItem.setSound(DGG.B2RELEASE + self.guiId, releaseSound)
+ if DGG.RMB in self['commandButtons']:
+ self.guiItem.setSound(DGG.B3RELEASE + self.guiId, releaseSound)
diff --git a/direct/src/gui/DirectCheckBox.py b/direct/src/gui/DirectCheckBox.py
index fc0ce5f5ca..d1cff642a8 100755
--- a/direct/src/gui/DirectCheckBox.py
+++ b/direct/src/gui/DirectCheckBox.py
@@ -28,6 +28,7 @@ class DirectCheckBox(DirectButton):
# Sounds to be used for button events
('rolloverSound', DGG.getDefaultRolloverSound(), self.setRolloverSound),
('clickSound', DGG.getDefaultClickSound(), self.setClickSound),
+ ('releaseSound', DGG.getDefaultReleaseSound(), self.setReleaseSound),
# Can only be specified at time of widget contruction
# Do the text/graphics appear to move when the button is clicked
('pressEffect', 1, DGG.INITOPT),
diff --git a/direct/src/gui/DirectGuiGlobals.py b/direct/src/gui/DirectGuiGlobals.py
index d41199af0e..1048f8d724 100644
--- a/direct/src/gui/DirectGuiGlobals.py
+++ b/direct/src/gui/DirectGuiGlobals.py
@@ -17,8 +17,9 @@ from panda3d.core import (
defaultFont = None
defaultFontFunc = TextNode.getDefaultFont
-defaultClickSound = None
defaultRolloverSound = None
+defaultClickSound = None
+defaultReleaseSound = None
defaultDialogGeom = None
defaultDialogRelief = PGFrameStyle.TBevelOut
drawOrder = 100
@@ -129,6 +130,13 @@ def setDefaultClickSound(newSound):
global defaultClickSound
defaultClickSound = newSound
+def getDefaultReleaseSound():
+ return defaultReleaseSound
+
+def setDefaultReleaseSound(newSound):
+ global defaultReleaseSound
+ defaultReleaseSound = newSound
+
def getDefaultFont():
global defaultFont
if defaultFont is None:
diff --git a/direct/src/interval/IntervalManager.py b/direct/src/interval/IntervalManager.py
index f3e3f7d13d..57476dc347 100644
--- a/direct/src/interval/IntervalManager.py
+++ b/direct/src/interval/IntervalManager.py
@@ -1,11 +1,14 @@
"""Defines the IntervalManager class as well as the global instance of
this class, ivalMgr."""
+from __future__ import annotations
+
__all__ = ['IntervalManager', 'ivalMgr']
from panda3d.core import EventQueue
-from panda3d.direct import CIntervalManager, Dtool_BorrowThisReference
+from panda3d.direct import CInterval, CIntervalManager, Dtool_BorrowThisReference
from direct.showbase import EventManager
+from . import Interval
import fnmatch
class IntervalManager(CIntervalManager):
@@ -15,7 +18,7 @@ class IntervalManager(CIntervalManager):
# the Python extensions is to add support for Python-based
# intervals (like MetaIntervals).
- def __init__(self, globalPtr = 0):
+ def __init__(self, globalPtr: bool = False) -> None:
# Pass globalPtr == 1 to the constructor to trick it into
# "constructing" a Python wrapper around the global
# CIntervalManager object.
@@ -28,8 +31,8 @@ class IntervalManager(CIntervalManager):
self.eventQueue = EventQueue()
self.MyEventmanager = EventManager.EventManager(self.eventQueue)
self.setEventQueue(self.eventQueue)
- self.ivals = []
- self.removedIvals = {}
+ self.ivals: list[Interval.Interval | CInterval | None] = []
+ self.removedIvals: dict = {}
def addInterval(self, interval):
index = self.addCInterval(interval, 1)
@@ -86,7 +89,7 @@ class IntervalManager(CIntervalManager):
ival.pause()
return len(ivals)
- def step(self):
+ def step(self) -> None:
# This method should be called once per frame to perform all
# of the per-frame processing on the active intervals.
# Call C++ step, then do the Python stuff.
@@ -101,7 +104,7 @@ class IntervalManager(CIntervalManager):
CIntervalManager.interrupt(self)
self.__doPythonCallbacks()
- def __doPythonCallbacks(self):
+ def __doPythonCallbacks(self) -> None:
# This method does all of the required Python post-processing
# after performing some C++-level action.
# It is important to call all of the python callbacks on the
@@ -137,4 +140,4 @@ class IntervalManager(CIntervalManager):
self.ivals[index] = interval
#: The global IntervalManager object.
-ivalMgr = IntervalManager(1)
+ivalMgr = IntervalManager(True)
diff --git a/direct/src/interval/LerpInterval.py b/direct/src/interval/LerpInterval.py
index e303b3a5d1..3058395d22 100644
--- a/direct/src/interval/LerpInterval.py
+++ b/direct/src/interval/LerpInterval.py
@@ -122,7 +122,7 @@ class LerpPosInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
LerpNodePathInterval.privDoEvent(self, t, event)
@@ -153,7 +153,7 @@ class LerpHprInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndHpr, self.endHpr)
self.setupParam(self.setStartHpr, self.startHpr)
self.setupParam(self.setStartQuat, self.startQuat)
@@ -192,7 +192,7 @@ class LerpQuatInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndQuat, self.endQuat)
self.setupParam(self.setStartHpr, self.startHpr)
self.setupParam(self.setStartQuat, self.startQuat)
@@ -219,7 +219,7 @@ class LerpScaleInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndScale, self.endScale)
self.setupParam(self.setStartScale, self.startScale)
LerpNodePathInterval.privDoEvent(self, t, event)
@@ -245,7 +245,7 @@ class LerpShearInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndShear, self.endShear)
self.setupParam(self.setStartShear, self.startShear)
LerpNodePathInterval.privDoEvent(self, t, event)
@@ -280,7 +280,7 @@ class LerpPosHprInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
self.setupParam(self.setEndHpr, self.endHpr)
@@ -326,7 +326,7 @@ class LerpPosQuatInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
self.setupParam(self.setEndQuat, self.endQuat)
@@ -365,7 +365,7 @@ class LerpHprScaleInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndHpr, self.endHpr)
self.setupParam(self.setStartHpr, self.startHpr)
self.setupParam(self.setStartQuat, self.startQuat)
@@ -414,7 +414,7 @@ class LerpQuatScaleInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndQuat, self.endQuat)
self.setupParam(self.setStartHpr, self.startHpr)
self.setupParam(self.setStartQuat, self.startQuat)
@@ -459,7 +459,7 @@ class LerpPosHprScaleInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
self.setupParam(self.setEndHpr, self.endHpr)
@@ -516,7 +516,7 @@ class LerpPosQuatScaleInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
self.setupParam(self.setEndQuat, self.endQuat)
@@ -569,7 +569,7 @@ class LerpPosHprScaleShearInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
self.setupParam(self.setEndHpr, self.endHpr)
@@ -636,7 +636,7 @@ class LerpPosQuatScaleShearInterval(LerpNodePathInterval):
def privDoEvent(self, t, event):
# This function is only used if Python functors were passed in
# for some of the input parameters.
- if self.paramSetup and event == CInterval.ETInitialize:
+ if self.paramSetup and (event == CInterval.ETInitialize or event == CInterval.ETInstant):
self.setupParam(self.setEndPos, self.endPos)
self.setupParam(self.setStartPos, self.startPos)
self.setupParam(self.setEndQuat, self.endQuat)
diff --git a/direct/src/showbase/BufferViewer.py b/direct/src/showbase/BufferViewer.py
index 4a7babcbc2..9afdbccdb7 100644
--- a/direct/src/showbase/BufferViewer.py
+++ b/direct/src/showbase/BufferViewer.py
@@ -12,6 +12,8 @@ Or, you can enable the following variable in your Config.prc::
show-buffers true
"""
+from __future__ import annotations
+
__all__ = ['BufferViewer']
from panda3d.core import (
@@ -39,14 +41,19 @@ from direct.task.TaskManagerGlobal import taskMgr
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.showbase.DirectObject import DirectObject
import math
+from typing import Literal, Union
+
+# The following variables are typing constructs used in annotations
+# to succinctly express complex type structures.
+_Texture = Union[Texture, GraphicsOutput, Literal['all']]
class BufferViewer(DirectObject):
notify = directNotify.newCategory('BufferViewer')
- def __init__(self, win, parent):
+ def __init__(self, win: GraphicsOutput | None, parent: NodePath) -> None:
"""Access: private. Constructor."""
- self.enabled = 0
+ self.enabled = False
size = ConfigVariableDouble('buffer-viewer-size', '0 0')
self.sizex = size[0]
self.sizey = size[1]
@@ -59,23 +66,23 @@ class BufferViewer(DirectObject):
self.win = win
self.engine = GraphicsEngine.getGlobalPtr()
self.renderParent = parent
- self.cards = []
+ self.cards: list[NodePath] = []
self.cardindex = 0
self.cardmaker = CardMaker("cubemaker")
self.cardmaker.setFrame(-1,1,-1,1)
self.task = 0
- self.dirty = 1
+ self.dirty = True
self.accept("render-texture-targets-changed", self.refreshReadout)
if ConfigVariableBool("show-buffers", 0):
- self.enable(1)
+ self.enable(True)
- def refreshReadout(self):
+ def refreshReadout(self) -> None:
"""Force the readout to be refreshed. This is usually invoked
by GraphicsOutput::add_render_texture (via an event handler).
However, it is also possible to invoke it manually. Currently,
the only time I know of that this is necessary is after a
window resize (and I ought to fix that)."""
- self.dirty = 1
+ self.dirty = True
# Call enabled again, mainly to ensure that the task has been
# started.
@@ -95,14 +102,14 @@ class BufferViewer(DirectObject):
"""Returns true if the buffer viewer is currently enabled."""
return self.enabled
- def enable(self, x):
+ def enable(self, x: bool) -> None:
"""Turn the buffer viewer on or off. The initial state of the
buffer viewer depends on the Config variable 'show-buffers'."""
if x != 0 and x != 1:
BufferViewer.notify.error('invalid parameter to BufferViewer.enable')
return
self.enabled = x
- self.dirty = 1
+ self.dirty = True
if (x and self.task == 0):
self.task = taskMgr.add(self.maintainReadout, "buffer-viewer-maintain-readout",
priority=1)
@@ -218,7 +225,11 @@ class BufferViewer(DirectObject):
self.renderParent = renderParent
self.dirty = 1
- def analyzeTextureSet(self, x, set):
+ def analyzeTextureSet(
+ self,
+ x: _Texture | GraphicsEngine | list[_Texture | GraphicsEngine],
+ set: dict[Texture, int],
+ ) -> None:
"""Access: private. Converts a list of GraphicsObject,
GraphicsEngine, and Texture into a table of Textures."""
@@ -240,7 +251,7 @@ class BufferViewer(DirectObject):
else:
return
- def makeFrame(self, sizex, sizey):
+ def makeFrame(self, sizex: int, sizey: int) -> NodePath:
"""Access: private. Each texture card is displayed with
a two-pixel wide frame (a ring of black and a ring of white).
This routine builds the frame geometry. It is necessary to
@@ -287,7 +298,7 @@ class BufferViewer(DirectObject):
geomnode.addGeom(geom)
return NodePath(geomnode)
- def maintainReadout(self, task):
+ def maintainReadout(self, task: object) -> int:
"""Access: private. Whenever necessary, rebuilds the entire
display from scratch. This is only done when the configuration
parameters have changed."""
@@ -295,7 +306,7 @@ class BufferViewer(DirectObject):
# If nothing has changed, don't update.
if not self.dirty:
return Task.cont
- self.dirty = 0
+ self.dirty = False
# Delete the old set of cards.
for card in self.cards:
@@ -308,8 +319,8 @@ class BufferViewer(DirectObject):
return Task.done
# Generate the include and exclude sets.
- exclude = {}
- include = {}
+ exclude: dict[Texture, int] = {}
+ include: dict[Texture, int] = {}
self.analyzeTextureSet(self.exclude, exclude)
self.analyzeTextureSet(self.include, include)
@@ -407,6 +418,7 @@ class BufferViewer(DirectObject):
bordersize = 4.0
+ assert self.win is not None
if float(self.sizex) == 0.0 and float(self.sizey) == 0.0:
sizey = int(0.4266666667 * self.win.getYSize())
sizex = (sizey * aspectx) // aspecty
diff --git a/direct/src/showbase/DirectObject.py b/direct/src/showbase/DirectObject.py
index 8365d9f94f..bdbae6fc3f 100644
--- a/direct/src/showbase/DirectObject.py
+++ b/direct/src/showbase/DirectObject.py
@@ -1,8 +1,14 @@
"""Defines the DirectObject class, a convenient class to inherit from if the
object needs to be able to respond to events."""
+from __future__ import annotations
+
__all__ = ['DirectObject']
+from typing import Callable
+
+from panda3d.core import AsyncTask
+
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.task.TaskManagerGlobal import taskMgr
from .MessengerGlobal import messenger
@@ -12,6 +18,9 @@ class DirectObject:
"""
This is the class that all Direct/SAL classes should inherit from
"""
+ _MSGRmessengerId: tuple[str, int]
+ _taskList: dict[int, AsyncTask]
+
#def __del__(self):
# This next line is useful for debugging leaks
#print "Destructing: ", self.__class__.__name__
@@ -19,16 +28,16 @@ class DirectObject:
# Wrapper functions to have a cleaner, more object oriented approach to
# the messenger functionality.
- def accept(self, event, method, extraArgs=[]):
- return messenger.accept(event, self, method, extraArgs, 1)
+ def accept(self, event: str, method: Callable, extraArgs: list = []) -> None:
+ return messenger.accept(event, self, method, extraArgs, True)
def acceptOnce(self, event, method, extraArgs=[]):
return messenger.accept(event, self, method, extraArgs, 0)
- def ignore(self, event):
+ def ignore(self, event: str) -> None:
return messenger.ignore(event, self)
- def ignoreAll(self):
+ def ignoreAll(self) -> None:
return messenger.ignoreAll(self)
def isAccepting(self, event):
@@ -41,7 +50,7 @@ class DirectObject:
return messenger.isIgnoring(event, self)
#This function must be used if you want a managed task
- def addTask(self, *args, **kwargs):
+ def addTask(self, *args, **kwargs) -> AsyncTask:
if not hasattr(self, "_taskList"):
self._taskList = {}
kwargs['owner'] = self
diff --git a/direct/src/showbase/EventManager.py b/direct/src/showbase/EventManager.py
index e603633810..14465120cb 100644
--- a/direct/src/showbase/EventManager.py
+++ b/direct/src/showbase/EventManager.py
@@ -1,21 +1,33 @@
"""Contains the EventManager class. See :mod:`.EventManagerGlobal` for the
global eventMgr instance."""
+from __future__ import annotations
+
__all__ = ['EventManager']
+from typing import Any
+
from direct.directnotify.DirectNotifyGlobal import directNotify
+from direct.directnotify.Notifier import Notifier
from direct.task.TaskManagerGlobal import taskMgr
from direct.showbase.MessengerGlobal import messenger
-from panda3d.core import PStatCollector, EventQueue, EventHandler
-from panda3d.core import ConfigVariableBool
+from panda3d.core import (
+ ConfigVariableBool,
+ Event,
+ EventHandler,
+ EventParameter,
+ EventQueue,
+ PStatCollector,
+ PythonTask,
+)
class EventManager:
- notify = None
+ notify: Notifier | None = None
- def __init__(self, eventQueue = None):
+ def __init__(self, eventQueue: EventQueue | None = None) -> None:
"""
Create a C++ event queue and handler
"""
@@ -24,11 +36,11 @@ class EventManager:
EventManager.notify = directNotify.newCategory("EventManager")
self.eventQueue = eventQueue
- self.eventHandler = None
+ self.eventHandler: EventHandler | None = None
self._wantPstats = ConfigVariableBool('pstats-eventmanager', False)
- def doEvents(self):
+ def doEvents(self) -> None:
"""
Process all the events on the C++ event queue
"""
@@ -38,12 +50,13 @@ class EventManager:
processFunc = self.processEventPstats
else:
processFunc = self.processEvent
+ assert self.eventQueue is not None
isEmptyFunc = self.eventQueue.isQueueEmpty
dequeueFunc = self.eventQueue.dequeueEvent
while not isEmptyFunc():
processFunc(dequeueFunc())
- def eventLoopTask(self, task):
+ def eventLoopTask(self, task: PythonTask) -> int:
"""
Process all the events on the C++ event queue
"""
@@ -51,7 +64,7 @@ class EventManager:
messenger.send("event-loop-done")
return task.cont
- def parseEventParameter(self, eventParameter):
+ def parseEventParameter(self, eventParameter: EventParameter) -> Any:
"""
Extract the actual data from the eventParameter
"""
@@ -63,6 +76,8 @@ class EventManager:
return eventParameter.getStringValue()
elif eventParameter.isWstring():
return eventParameter.getWstringValue()
+ elif hasattr(eventParameter, 'isBytes') and eventParameter.isBytes():
+ return eventParameter.getBytesValue()
elif eventParameter.isTypedRefCount():
return eventParameter.getTypedRefCountValue()
elif eventParameter.isEmpty():
@@ -72,7 +87,7 @@ class EventManager:
# which will be downcast to that type.
return eventParameter.getPtr()
- def processEvent(self, event):
+ def processEvent(self, event: Event) -> None:
"""
Process a C++ event
Duplicate any changes in processEventPstats
@@ -89,6 +104,7 @@ class EventManager:
paramList.append(eventParameterData)
# Do not print the new frame debug, it is too noisy!
+ assert EventManager.notify is not None
if EventManager.notify.getDebug() and eventName != 'NewFrame':
EventManager.notify.debug('received C++ event named: ' + eventName +
' parameters: ' + repr(paramList))
@@ -106,9 +122,10 @@ class EventManager:
else:
# An unnamed event from C++ is probably a bad thing
+ assert EventManager.notify is not None
EventManager.notify.warning('unnamed event in processEvent')
- def processEventPstats(self, event):
+ def processEventPstats(self, event: Event) -> None:
"""
Process a C++ event with pstats tracking
Duplicate any changes in processEvent
@@ -125,6 +142,7 @@ class EventManager:
paramList.append(eventParameterData)
# Do not print the new frame debug, it is too noisy!
+ assert EventManager.notify is not None
if EventManager.notify.getDebug() and eventName != 'NewFrame':
EventManager.notify.debug('received C++ event named: ' + eventName +
' parameters: ' + repr(paramList))
@@ -156,9 +174,10 @@ class EventManager:
else:
# An unnamed event from C++ is probably a bad thing
+ assert EventManager.notify is not None
EventManager.notify.warning('unnamed event in processEvent')
- def restart(self):
+ def restart(self) -> None:
if self.eventQueue is None:
self.eventQueue = EventQueue.getGlobalEventQueue()
@@ -173,7 +192,7 @@ class EventManager:
taskMgr.add(self.eventLoopTask, 'eventManager')
- def shutdown(self):
+ def shutdown(self) -> None:
taskMgr.remove('eventManager')
# Flush the event queue. We do this after removing the task
diff --git a/direct/src/showbase/ExceptionVarDump.py b/direct/src/showbase/ExceptionVarDump.py
index aad5850e6f..308c368701 100755
--- a/direct/src/showbase/ExceptionVarDump.py
+++ b/direct/src/showbase/ExceptionVarDump.py
@@ -35,7 +35,7 @@ def _varDump__init__(self, *args, **kArgs):
sReentry = 0
-def _varDump__print(exc):
+def _varDump__print(exc) -> None:
global sReentry
global notify
if sReentry > 0:
@@ -176,7 +176,7 @@ def _excepthookDumpVars(eType, eValue, tb):
oldExcepthook(eType, eValue, origTb)
-def install(log, upload):
+def install(log: bool, upload: bool) -> None:
"""Installs the exception hook."""
global oldExcepthook
global wantStackDumpLog
@@ -192,8 +192,8 @@ def install(log, upload):
# thrown by the interpreter don't get created until the
# stack has been unwound and an except block has been reached
if not hasattr(Exception, '_moved__init__'):
- Exception._moved__init__ = Exception.__init__
- Exception.__init__ = _varDump__init__
+ Exception._moved__init__ = Exception.__init__ # type: ignore[attr-defined]
+ Exception.__init__ = _varDump__init__ # type: ignore[method-assign]
else:
if sys.excepthook is not _excepthookDumpVars:
oldExcepthook = sys.excepthook
diff --git a/direct/src/showbase/GarbageReport.py b/direct/src/showbase/GarbageReport.py
index ca3d02b36a..d04892b1ff 100644
--- a/direct/src/showbase/GarbageReport.py
+++ b/direct/src/showbase/GarbageReport.py
@@ -1,5 +1,7 @@
"""Contains utility classes for debugging memory leaks."""
+from __future__ import annotations
+
__all__ = ['FakeObject', '_createGarbage', 'GarbageReport', 'GarbageLogger']
from direct.directnotify.DirectNotifyGlobal import directNotify
@@ -10,6 +12,7 @@ from direct.showbase.JobManagerGlobal import jobMgr
from direct.showbase.MessengerGlobal import messenger
from panda3d.core import ConfigVariableBool
import gc
+from collections.abc import Callable
GarbageCycleCountAnnounceEvent = 'announceGarbageCycleDesc2num'
@@ -41,9 +44,21 @@ class GarbageReport(Job):
If you just want to dump the report to the log, use GarbageLogger."""
notify = directNotify.newCategory("GarbageReport")
- def __init__(self, name, log=True, verbose=False, fullReport=False, findCycles=True,
- threaded=False, doneCallback=None, autoDestroy=False, priority=None,
- safeMode=False, delOnly=False, collect=True):
+ def __init__(
+ self,
+ name: str,
+ log: bool = True,
+ verbose: bool = False,
+ fullReport: bool = False,
+ findCycles: bool = True,
+ threaded: bool = False,
+ doneCallback: Callable[[GarbageReport], object] | None = None,
+ autoDestroy: bool = False,
+ priority: int | None = None,
+ safeMode: bool = False,
+ delOnly: bool = False,
+ collect: bool = True
+ ) -> None:
# if autoDestroy is True, GarbageReport will self-destroy after logging
# if false, caller is responsible for calling destroy()
# if threaded is True, processing will be performed over multiple frames
@@ -399,7 +414,7 @@ class GarbageReport(Job):
if self._args.autoDestroy:
self.destroy()
- def destroy(self):
+ def destroy(self) -> None:
#print 'GarbageReport.destroy'
del self._args
del self.garbage
@@ -417,13 +432,13 @@ class GarbageReport(Job):
del self._reportStr
Job.destroy(self)
- def getNumCycles(self):
+ def getNumCycles(self) -> int:
# if the job hasn't run yet, we don't have a numCycles yet
return self.numCycles
- def getDesc2numDict(self):
+ def getDesc2numDict(self) -> dict[str, int]:
# dict of python-syntax leak -> number of that type of leak
- desc2num = {}
+ desc2num: dict[str, int] = {}
for cycleBySyntax in self.cyclesBySyntax:
desc2num.setdefault(cycleBySyntax, 0)
desc2num[cycleBySyntax] += 1
@@ -563,7 +578,7 @@ class _CFGLGlobals:
LastNumCycles = 0
-def checkForGarbageLeaks():
+def checkForGarbageLeaks() -> int:
gc.collect()
numGarbage = len(gc.garbage)
if numGarbage > 0 and ConfigVariableBool('auto-garbage-logging', False):
@@ -576,6 +591,7 @@ def checkForGarbageLeaks():
messenger.send(GarbageCycleCountAnnounceEvent, [gr.getDesc2numDict()])
gr.destroy()
notify = directNotify.newCategory("GarbageDetect")
+ func: Callable[[str], object]
if ConfigVariableBool('allow-garbage-cycles', True):
func = notify.warning
else:
@@ -584,7 +600,8 @@ def checkForGarbageLeaks():
return numGarbage
-def b_checkForGarbageLeaks(wantReply=False):
+def b_checkForGarbageLeaks(wantReply: bool = False) -> int:
+ from direct.showbase.ShowBaseGlobal import base, __dev__
if not __dev__:
return 0
# does a garbage collect on the client and the AI
@@ -592,10 +609,10 @@ def b_checkForGarbageLeaks(wantReply=False):
# logs leak info and terminates (if configured to do so)
try:
# if this is the client, tell the AI to check for leaks too
- base.cr.timeManager
+ base.cr.timeManager # type: ignore[attr-defined]
except Exception:
pass
else:
- if base.cr.timeManager:
- base.cr.timeManager.d_checkForGarbageLeaks(wantReply=wantReply)
+ if base.cr.timeManager: # type: ignore[attr-defined]
+ base.cr.timeManager.d_checkForGarbageLeaks(wantReply=wantReply) # type: ignore[attr-defined]
return checkForGarbageLeaks()
diff --git a/direct/src/showbase/JobManager.py b/direct/src/showbase/JobManager.py
index e6f034f08c..c491be941d 100755
--- a/direct/src/showbase/JobManager.py
+++ b/direct/src/showbase/JobManager.py
@@ -1,3 +1,7 @@
+from __future__ import annotations
+
+from collections.abc import Iterator
+
from panda3d.core import ConfigVariableBool, ConfigVariableDouble, ClockObject
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.task.TaskManagerGlobal import taskMgr
@@ -17,28 +21,28 @@ class JobManager:
# there's one task for the JobManager, all jobs run in this task
TaskName = 'jobManager'
- def __init__(self, timeslice=None):
+ def __init__(self, timeslice: float | None = None) -> None:
# how long do we run per frame
self._timeslice = timeslice
# store the jobs in these structures to allow fast lookup by various keys
# priority -> jobId -> job
- self._pri2jobId2job = {}
+ self._pri2jobId2job: dict[int, dict[int, Job]] = {}
# priority -> chronological list of jobIds
- self._pri2jobIds = {}
+ self._pri2jobIds: dict[int, list[int]] = {}
# jobId -> priority
- self._jobId2pri = {}
+ self._jobId2pri: dict[int, int] = {}
# how many timeslices to give each job; this is used to efficiently implement
# the relative job priorities
- self._jobId2timeslices = {}
+ self._jobId2timeslices: dict[int, int] = {}
# how much time did the job use beyond the allotted timeslice, used to balance
# out CPU usage
- self._jobId2overflowTime = {}
- self._useOverflowTime = None
+ self._jobId2overflowTime: dict[int, float] = {}
+ self._useOverflowTime: bool | None = None
# this is a generator that we use to give high-priority jobs more timeslices,
# it yields jobIds in a sequence that includes high-priority jobIds more often
# than low-priority
- self._jobIdGenerator = None
- self._highestPriority = Job.Priorities.Normal
+ self._jobIdGenerator: Iterator[int] | None = None
+ self._highestPriority: int = Job.Priorities.Normal # type: ignore[attr-defined]
def destroy(self):
taskMgr.remove(JobManager.TaskName)
diff --git a/direct/src/showbase/Loader.py b/direct/src/showbase/Loader.py
index 141c71a368..9381c8f4e7 100644
--- a/direct/src/showbase/Loader.py
+++ b/direct/src/showbase/Loader.py
@@ -2,9 +2,13 @@
sound, music, shaders and fonts from disk.
"""
+from __future__ import annotations
+
__all__ = ['Loader']
from panda3d.core import (
+ AsyncTask,
+ AudioManager,
ConfigVariableBool,
Filename,
FontPool,
@@ -13,6 +17,7 @@ from panda3d.core import (
ModelFlattenRequest,
ModelNode,
ModelPool,
+ MovieAudio,
NodePath,
PandaNode,
SamplerState,
@@ -24,13 +29,20 @@ from panda3d.core import (
from panda3d.core import Loader as PandaLoader
from direct.directnotify.DirectNotifyGlobal import directNotify
from direct.showbase.DirectObject import DirectObject
+from . import ShowBase
import warnings
import sys
+import os
+from typing import Any, Callable, Iterable, Union
+
+# Type aliases for loadModel, loadSound, etc. annotations
+_ModelPath = Union[str, Filename, os.PathLike]
+_SoundPath = Union[str, Filename, os.PathLike, MovieAudio]
# You can specify a phaseChecker callback to check
# a modelPath to see if it is being loaded in the correct
# phase
-phaseChecker = None
+phaseChecker: Callable[[_ModelPath, LoaderOptions], object] | None = None
class Loader(DirectObject):
@@ -49,16 +61,23 @@ class Loader(DirectObject):
# This indicates that this class behaves like a Future.
_asyncio_future_blocking = False
- def __init__(self, loader, numObjects, gotList, callback, extraArgs):
+ def __init__(
+ self,
+ loader: Loader | None,
+ numObjects: int,
+ gotList: bool,
+ callback: Callable[..., object] | None,
+ extraArgs: list,
+ ) -> None:
self._loader = loader
- self.objects = [None] * numObjects
+ self.objects: list[Any | None] = [None] * numObjects
self.gotList = gotList
self.callback = callback
self.extraArgs = extraArgs
- self.requests = set()
- self.requestList = []
+ self.requests: set[AsyncTask] = set()
+ self.requestList: list[AsyncTask] = []
- def gotObject(self, index, object):
+ def gotObject(self, index: int, object) -> None:
self.objects[index] = object
if not self.requests:
@@ -79,7 +98,7 @@ class Loader(DirectObject):
self.requests = None
self.requestList = None
- def cancelled(self):
+ def cancelled(self) -> bool:
"Returns true if the request was cancelled."
return self.requestList is None
@@ -87,7 +106,7 @@ class Loader(DirectObject):
"Returns true if all the requests were finished or cancelled."
return not self.requests
- def result(self):
+ def result(self) -> Any:
"Returns the results, suspending the thread to wait if necessary."
for r in list(self.requests):
r.wait()
@@ -126,26 +145,26 @@ class Loader(DirectObject):
yield await req
# special methods
- def __init__(self, base):
+ def __init__(self, base: ShowBase.ShowBase | None = None) -> None:
self.base = base
self.loader = PandaLoader.getGlobalPtr()
- self._requests = {}
+ self._requests: dict[AsyncTask, tuple[Loader._Callback, int]] = {}
self.hook = "async_loader_%s" % (Loader.loaderIndex)
Loader.loaderIndex += 1
- self.accept(self.hook, self.__gotAsyncObject)
- self._loadPythonFileTypes()
-
- def destroy(self):
+ def destroy(self) -> None:
self.ignore(self.hook)
self.loader.stopThreads()
del self.base
- del self.loader
+
+ def _init_base(self, base: ShowBase.ShowBase) -> None:
+ self.base = base
+ self.accept(self.hook, self.__gotAsyncObject)
@classmethod
- def _loadPythonFileTypes(cls):
+ def _loadPythonFileTypes(cls) -> None:
if cls._loadedPythonFileTypes:
return
@@ -168,10 +187,18 @@ class Loader(DirectObject):
cls._loadedPythonFileTypes = True
# model loading funcs
- def loadModel(self, modelPath, loaderOptions = None, noCache = None,
- allowInstance = False, okMissing = None,
- callback = None, extraArgs = [], priority = None,
- blocking = None):
+ def loadModel(
+ self,
+ modelPath: _ModelPath | list[_ModelPath] | tuple[_ModelPath, ...] | set[_ModelPath],
+ loaderOptions: LoaderOptions | None = None,
+ noCache: bool | None = None,
+ allowInstance: bool = False,
+ okMissing: bool | None = None,
+ callback: Callable[..., object] | None = None,
+ extraArgs: list = [],
+ priority: int | None = None,
+ blocking: bool | None = None,
+ ) -> Any:
"""
Attempts to load a model or models from one or more relative
pathnames. If the input modelPath is a string (a single model
@@ -229,6 +256,10 @@ class Loader(DirectObject):
"""
assert Loader.notify.debug("Loading model: %s" % (modelPath,))
+
+ if not self._loadedPythonFileTypes:
+ self._loadPythonFileTypes()
+
if loaderOptions is None:
loaderOptions = LoaderOptions()
else:
@@ -251,6 +282,7 @@ class Loader(DirectObject):
if allowInstance:
loaderOptions.setFlags(loaderOptions.getFlags() | LoaderOptions.LFAllowInstance)
+ modelList: Iterable[_ModelPath]
if not isinstance(modelPath, (tuple, list, set)):
# We were given a single model pathname.
modelList = [modelPath]
@@ -416,6 +448,9 @@ class Loader(DirectObject):
a callback is used, the model is saved asynchronously, and the
true/false status is passed to the callback function. """
+ if not self._loadedPythonFileTypes:
+ self._loadPythonFileTypes()
+
if loaderOptions is None:
loaderOptions = LoaderOptions()
else:
@@ -942,7 +977,13 @@ class Loader(DirectObject):
TexturePool.releaseTexture(texture)
# sound loading funcs
- def loadSfx(self, *args, **kw):
+ def loadSfx(
+ self,
+ soundPath: _SoundPath | tuple[_SoundPath, ...] | list[_SoundPath] | set[_SoundPath],
+ positional: bool = False,
+ callback: Callable[..., object] | None = None,
+ extraArgs: list = [],
+ ) -> Any:
"""Loads one or more sound files, specifically designated as a
"sound effect" file (that is, uses the sfxManager to load the
sound). There is no distinction between sound effect files
@@ -952,11 +993,18 @@ class Loader(DirectObject):
independently of the other group."""
# showbase-created sfxManager should always be at front of list
+ assert self.base is not None
if self.base.sfxManagerList:
- return self.loadSound(self.base.sfxManagerList[0], *args, **kw)
+ return self.loadSound(self.base.sfxManagerList[0], soundPath, positional, callback, extraArgs)
return None
- def loadMusic(self, *args, **kw):
+ def loadMusic(
+ self,
+ soundPath: _SoundPath | tuple[_SoundPath, ...] | list[_SoundPath] | set[_SoundPath],
+ positional: bool = False,
+ callback: Callable[..., object] | None = None,
+ extraArgs: list = [],
+ ) -> Any:
"""Loads one or more sound files, specifically designated as a
"music" file (that is, uses the musicManager to load the
sound). There is no distinction between sound effect files
@@ -964,13 +1012,20 @@ class Loader(DirectObject):
to load the sound file, but this distinction allows the sound
effects and/or the music files to be adjusted as a group,
independently of the other group."""
+ assert self.base is not None
if self.base.musicManager:
- return self.loadSound(self.base.musicManager, *args, **kw)
+ return self.loadSound(self.base.musicManager, soundPath, positional, callback, extraArgs)
else:
return None
- def loadSound(self, manager, soundPath, positional = False,
- callback = None, extraArgs = []):
+ def loadSound(
+ self,
+ manager: AudioManager,
+ soundPath: _SoundPath | tuple[_SoundPath, ...] | list[_SoundPath] | set[_SoundPath],
+ positional: bool = False,
+ callback: Callable[..., object] | None = None,
+ extraArgs: list = [],
+ ) -> Any:
"""Loads one or more sound files, specifying the particular
AudioManager that should be used to load them. The soundPath
may be either a single filename, or a list of filenames. If a
@@ -980,6 +1035,7 @@ class Loader(DirectObject):
from panda3d.core import AudioLoadRequest
+ soundList: Iterable[_SoundPath]
if not isinstance(soundPath, (tuple, list, set)):
# We were given a single sound pathname or a MovieAudio instance.
soundList = [soundPath]
@@ -1105,7 +1161,7 @@ class Loader(DirectObject):
else:
callback(*(origModelList + extraArgs))
- def __gotAsyncObject(self, request):
+ def __gotAsyncObject(self, request: AsyncTask) -> None:
"""A model or sound file or some such thing has just been
loaded asynchronously by the sub-thread. Add it to the list
of loaded objects, and call the appropriate callback when it's
diff --git a/direct/src/showbase/Messenger.py b/direct/src/showbase/Messenger.py
index e6ef2153c2..c6957819ea 100644
--- a/direct/src/showbase/Messenger.py
+++ b/direct/src/showbase/Messenger.py
@@ -2,19 +2,40 @@
:ref:`event handling ` that happens on the Python side.
"""
+from __future__ import annotations
+
__all__ = ['Messenger']
+import types
+from collections.abc import Callable
+from typing import Protocol
+# These can be replaced with their builtin counterparts once support for Python 3.8 is dropped.
+from typing import Dict, Tuple
+
+from panda3d.core import AsyncTask
+
from direct.stdpy.threading import Lock
from direct.directnotify import DirectNotifyGlobal
from .PythonUtil import safeRepr
-import types
+
+# The following variables are typing constructs used in annotations
+# to succinctly express complex type structures.
+_ObjMsgrId = Tuple[str, int]
+_CallbackInfo = list # [Callable, list, bool]
+_ListenerObject = list # [int, DirectObject]
+_AcceptorDict = Dict[_ObjMsgrId, _CallbackInfo]
+_EventTuple = Tuple[_AcceptorDict, str, list, bool]
+
+
+class _HasMessengerID(Protocol):
+ _MSGRmessengerId: _ObjMsgrId
class Messenger:
notify = DirectNotifyGlobal.directNotify.newCategory("Messenger")
- def __init__(self):
+ def __init__(self) -> None:
"""
One is keyed off the event name. It has the following structure::
@@ -34,16 +55,16 @@ class Messenger:
{'mouseDown': {avatar: [avatar.jump, [2.0], 1]}}
"""
# eventName->objMsgrId->callbackInfo
- self.__callbacks = {}
+ self.__callbacks: dict[str, _AcceptorDict] = {}
# objMsgrId->set(eventName)
- self.__objectEvents = {}
+ self.__objectEvents: dict[_ObjMsgrId, dict[str, None]] = {}
self._messengerIdGen = 0
# objMsgrId->listenerObject
- self._id2object = {}
+ self._id2object: dict[_ObjMsgrId, _ListenerObject] = {}
# A mapping of taskChain -> eventList, used for sending events
# across task chains (and therefore across threads).
- self._eventQueuesByTaskChain = {}
+ self._eventQueuesByTaskChain: dict[str, list[_EventTuple]] = {}
# This protects the data structures within this object from
# multithreaded access.
@@ -51,7 +72,7 @@ class Messenger:
if __debug__:
self.__isWatching=0
- self.__watching={}
+ self.__watching: dict[str, bool] = {}
# I'd like this to be in the __debug__, but I fear that someone will
# want this in a release build. If you're sure that that will not be
# then please remove this comment and put the quiet/verbose stuff
@@ -62,7 +83,7 @@ class Messenger:
'collisionLoopFinished':1,
} # see def quiet()
- def _getMessengerId(self, object):
+ def _getMessengerId(self, object: _HasMessengerID) -> _ObjMsgrId:
# TODO: allocate this id in DirectObject.__init__ and get derived
# classes to call down (speed optimization, assuming objects
# accept/ignore more than once over their lifetime)
@@ -73,7 +94,7 @@ class Messenger:
self._messengerIdGen += 1
return object._MSGRmessengerId
- def _storeObject(self, object):
+ def _storeObject(self, object: _HasMessengerID) -> None:
# store reference-counted reference to object in case we need to
# retrieve it later. assumes lock is held.
id = self._getMessengerId(object)
@@ -82,7 +103,7 @@ class Messenger:
else:
self._id2object[id][0] += 1
- def _getObject(self, id):
+ def _getObject(self, id: _ObjMsgrId) -> _HasMessengerID:
return self._id2object[id][1]
def _getObjects(self):
@@ -101,7 +122,7 @@ class Messenger:
def _getEvents(self):
return list(self.__callbacks.keys())
- def _releaseObject(self, object):
+ def _releaseObject(self, object: _HasMessengerID) -> None:
# assumes lock is held.
id = self._getMessengerId(object)
if id in self._id2object:
@@ -117,7 +138,14 @@ class Messenger:
from .EventManagerGlobal import eventMgr
return eventMgr.eventHandler.get_future(event)
- def accept(self, event, object, method, extraArgs=[], persistent=1):
+ def accept(
+ self,
+ event: str,
+ object: _HasMessengerID,
+ method: Callable,
+ extraArgs: list = [],
+ persistent: bool = True,
+ ) -> None:
""" accept(self, string, DirectObject, Function, List, Boolean)
Make this object accept this event. When the event is
@@ -174,7 +202,7 @@ class Messenger:
finally:
self.lock.release()
- def ignore(self, event, object):
+ def ignore(self, event: str, object: _HasMessengerID) -> None:
""" ignore(self, string, DirectObject)
Make this object no longer respond to this event.
It is safe to call even if it was not already accepting
@@ -208,7 +236,7 @@ class Messenger:
finally:
self.lock.release()
- def ignoreAll(self, object):
+ def ignoreAll(self, object: _HasMessengerID) -> None:
"""
Make this object no longer respond to any events it was accepting
Useful for cleanup
@@ -283,7 +311,7 @@ class Messenger:
"""
return not self.isAccepting(event, object)
- def send(self, event, sentArgs=[], taskChain=None):
+ def send(self, event: str, sentArgs: list = [], taskChain: str | None = None) -> None:
"""
Send this event, optionally passing in arguments.
@@ -305,12 +333,12 @@ class Messenger:
self.lock.acquire()
try:
- foundWatch = 0
+ foundWatch = False
if __debug__:
if self.__isWatching:
for i in self.__watching:
if str(event).find(i) >= 0:
- foundWatch = 1
+ foundWatch = True
break
acceptorDict = self.__callbacks.get(event)
if not acceptorDict:
@@ -336,7 +364,7 @@ class Messenger:
finally:
self.lock.release()
- def __taskChainDispatch(self, taskChain, task):
+ def __taskChainDispatch(self, taskChain: str, task: AsyncTask) -> int:
""" This task is spawned each time an event is sent across
task chains. Its job is to empty the task events on the queue
for this particular task chain. This guarantees that events
@@ -365,7 +393,13 @@ class Messenger:
return task.done
- def __dispatch(self, acceptorDict, event, sentArgs, foundWatch):
+ def __dispatch(
+ self,
+ acceptorDict: _AcceptorDict,
+ event: str,
+ sentArgs: list,
+ foundWatch: bool,
+ ) -> None:
for id in list(acceptorDict.keys()):
# We have to make this apparently redundant check, because
# it is possible that one object removes its own hooks
@@ -562,7 +596,7 @@ class Messenger:
break
return matches
- def __methodRepr(self, method):
+ def __methodRepr(self, method: object) -> str:
"""
return string version of class.method or method.
"""
diff --git a/direct/src/showbase/OnScreenDebug.py b/direct/src/showbase/OnScreenDebug.py
index 0d690e3806..16292fa628 100755
--- a/direct/src/showbase/OnScreenDebug.py
+++ b/direct/src/showbase/OnScreenDebug.py
@@ -1,7 +1,11 @@
"""Contains the OnScreenDebug class."""
+from __future__ import annotations
+
__all__ = ['OnScreenDebug']
+from typing import Any
+
from panda3d.core import (
ConfigVariableBool,
ConfigVariableDouble,
@@ -18,13 +22,13 @@ class OnScreenDebug:
enabled = ConfigVariableBool("on-screen-debug-enabled", False)
- def __init__(self):
- self.onScreenText = None
+ def __init__(self) -> None:
+ self.onScreenText: OnscreenText.OnscreenText | None = None
self.frame = 0
self.text = ""
- self.data = {}
+ self.data: dict[str, tuple[int, Any]] = {}
- def load(self):
+ def load(self) -> None:
if self.onScreenText:
return
@@ -40,6 +44,7 @@ class OnScreenDebug:
fgColor.setW(ConfigVariableDouble("on-screen-debug-fg-alpha", 0.85).value)
bgColor.setW(ConfigVariableDouble("on-screen-debug-bg-alpha", 0.85).value)
+ from direct.showbase.ShowBaseGlobal import base
font = base.loader.loadFont(fontPath)
if not font.isValid():
print("failed to load OnScreenDebug font %s" % fontPath)
@@ -47,15 +52,16 @@ class OnScreenDebug:
self.onScreenText = OnscreenText.OnscreenText(
parent = base.a2dTopLeft, pos = (0.0, -0.1),
fg=fgColor, bg=bgColor, scale = (fontScale, fontScale, 0.0),
- align = TextNode.ALeft, mayChange = 1, font = font)
+ align = TextNode.ALeft, mayChange = True, font = font)
# Make sure readout is never lit or drawn in wireframe
DirectUtil.useDirectRenderStyle(self.onScreenText)
- def render(self):
+ def render(self) -> None:
if not self.enabled:
return
if not self.onScreenText:
self.load()
+ assert self.onScreenText is not None
self.onScreenText.clearText()
for k, v in sorted(self.data.items()):
if v[0] == self.frame:
@@ -75,7 +81,7 @@ class OnScreenDebug:
self.onScreenText.appendText(self.text)
self.frame += 1
- def clear(self):
+ def clear(self) -> None:
self.text = ""
if self.onScreenText:
self.onScreenText.clearText()
diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py
index d9ffa2aa35..2d37df1284 100644
--- a/direct/src/showbase/PythonUtil.py
+++ b/direct/src/showbase/PythonUtil.py
@@ -41,13 +41,17 @@ import time
import builtins
import importlib
import functools
-from typing import Callable
+from collections.abc import Callable, Container, Iterable, Mapping
+from typing import Any, Generic, TypeVar
__report_indent = 3
from panda3d.core import ConfigVariableBool, ConfigVariableString, ConfigFlags
from panda3d.core import ClockObject
+_T = TypeVar('_T')
+_KT = TypeVar('_KT')
+_VT = TypeVar('_VT')
## with one integer positional arg, this uses about 4/5 of the memory of the Functor class below
#def Functor(function, *args, **kArgs):
@@ -100,9 +104,9 @@ class Functor:
return s
-class Stack:
- def __init__(self):
- self.__list = []
+class Stack(Generic[_T]):
+ def __init__(self) -> None:
+ self.__list: list[_T] = []
def push(self, item):
self.__list.append(item)
@@ -229,7 +233,7 @@ if __debug__:
#-----------------------------------------------------------------------------
- def traceFunctionCall(frame):
+ def traceFunctionCall(frame: types.FrameType) -> str:
"""
return a string that shows the call frame with calling arguments.
e.g.
@@ -270,7 +274,7 @@ if __debug__:
r+="*** undefined ***"
return r+')'
- def traceParentCall():
+ def traceParentCall() -> str:
return traceFunctionCall(sys._getframe(2))
def printThisCall():
@@ -411,7 +415,7 @@ def list2dict(L, value=None):
return dict([(k, value) for k in L])
-def listToIndex2item(L):
+def listToIndex2item(L: Iterable[_VT]) -> dict[int, _VT]:
"""converts list to dict of list index->list item"""
d = {}
for i, item in enumerate(L):
@@ -422,7 +426,7 @@ def listToIndex2item(L):
assert listToIndex2item(['a','b']) == {0: 'a', 1: 'b',}
-def listToItem2index(L):
+def listToItem2index(L: Iterable[_KT]) -> dict[_KT, int]:
"""converts list to dict of list item->list index
This is lossy if there are duplicate list items"""
d = {}
@@ -451,7 +455,7 @@ def invertDict(D, lossy=False):
return n
-def invertDictLossless(D):
+def invertDictLossless(D: Mapping[_KT, _VT]) -> dict[_VT, list[_KT]]:
"""similar to invertDict, but values of new dict are lists of keys from
old dict. No information is lost.
@@ -459,7 +463,7 @@ def invertDictLossless(D):
>>> invertDictLossless(old)
{1: ['key1'], 2: ['key2', 'keyA']}
"""
- n = {}
+ n: dict[_VT, list[_KT]] = {}
for key, value in D.items():
n.setdefault(value, [])
n[value].append(key)
@@ -706,7 +710,7 @@ if __debug__:
movedDumpFuncs: list[Callable] = []
movedLoadFuncs: list[Callable] = []
profileFilenames = set()
- profileFilenameList = Stack()
+ profileFilenameList = Stack[str]()
profileFilename2file = {}
profileFilename2marshalData = {}
@@ -998,7 +1002,7 @@ def lineupPos(i, num, spacing):
return pos - ((float(spacing) * (num-1))/2.)
-def formatElapsedSeconds(seconds):
+def formatElapsedSeconds(seconds: float) -> str:
"""
Returns a string of the form "mm:ss" or "hh:mm:ss" or "n days",
representing the indicated elapsed time in seconds.
@@ -1278,7 +1282,7 @@ def randInt32(rng=random.random):
class SerialNumGen:
"""generates serial numbers"""
- def __init__(self, start=None):
+ def __init__(self, start: int | None = None) -> None:
if start is None:
start = 0
self.__counter = start-1
@@ -1305,7 +1309,7 @@ class SerialMaskedGen(SerialNumGen):
_serialGen = SerialNumGen()
-def serialNum():
+def serialNum() -> int:
return _serialGen.next()
@@ -1404,14 +1408,16 @@ def _getSafeReprNotify():
return safeReprNotify
-def safeRepr(obj):
+def safeRepr(obj: object) -> str:
global dtoolSuperBase
if dtoolSuperBase is None:
_getDtoolSuperBase()
+ assert dtoolSuperBase is not None
global safeReprNotify
if safeReprNotify is None:
_getSafeReprNotify()
+ assert safeReprNotify is not None
if isinstance(obj, dtoolSuperBase):
# repr of C++ object could crash, particularly if the object has been deleted
@@ -1443,7 +1449,12 @@ def safeReprTypeOnFail(obj):
return '<** FAILED REPR OF %s instance at %s **>' % (obj.__class__.__name__, hex(id(obj)))
-def fastRepr(obj, maxLen=200, strFactor=10, _visitedIds=None):
+def fastRepr(
+ obj: object,
+ maxLen: int = 200,
+ strFactor: int = 10,
+ _visitedIds: set[int] | None = None,
+) -> str:
""" caps the length of iterable types, so very large objects will print faster.
also prevents infinite recursion """
try:
@@ -1452,9 +1463,9 @@ def fastRepr(obj, maxLen=200, strFactor=10, _visitedIds=None):
if id(obj) in _visitedIds:
return '' % itype(obj)
if type(obj) in (tuple, list):
+ assert isinstance(obj, (tuple, list))
s = ''
- s += {tuple: '(',
- list: '[',}[type(obj)]
+ s += '(' if type(obj) == tuple else '['
if maxLen is not None and len(obj) > maxLen:
o = obj[:maxLen]
ellips = '...'
@@ -1467,8 +1478,7 @@ def fastRepr(obj, maxLen=200, strFactor=10, _visitedIds=None):
s += ', '
_visitedIds.remove(id(obj))
s += ellips
- s += {tuple: ')',
- list: ']',}[type(obj)]
+ s += ')' if type(obj) == tuple else ']'
return s
elif type(obj) is dict:
s = '{'
@@ -1588,7 +1598,7 @@ class ScratchPad:
class Sync:
_SeriesGen = SerialNumGen()
- def __init__(self, name, other=None):
+ def __init__(self, name: str, other: Sync | None = None) -> None:
self._name = name
if other is None:
self._series = self._SeriesGen.next()
@@ -1620,7 +1630,7 @@ class Sync:
self._name, self._series, self._value)
-def itype(obj):
+def itype(obj: object) -> type | str:
# version of type that gives more complete information about instance types
global dtoolSuperBase
t = type(obj)
@@ -1628,6 +1638,7 @@ def itype(obj):
# check if this is a C++ object
if dtoolSuperBase is None:
_getDtoolSuperBase()
+ assert dtoolSuperBase is not None
if isinstance(obj, dtoolSuperBase):
return "" % (obj.__class__)
return t
@@ -1972,7 +1983,13 @@ def pstatcollect(scope, level = None):
__report_indent = 0
-def report(types = [], prefix = '', xform = None, notifyFunc = None, dConfigParam = []):
+def report(
+ types: Container[str] = [],
+ prefix: str = '',
+ xform: Callable[[Any], object] | None = None,
+ notifyFunc: Callable[[str], object] | None = None,
+ dConfigParam: str | list[str] | tuple[str, ...] = [],
+) -> Callable[[_T], _T]:
"""
This is a decorator generating function. Use is similar to
a @decorator, except you must be sure to call it as a function.
@@ -2031,7 +2048,7 @@ def report(types = [], prefix = '', xform = None, notifyFunc = None, dConfigPara
return f
try:
- if not __dev__ and not ConfigVariableBool('force-reports', False):
+ if not __dev__ and not ConfigVariableBool('force-reports', False): # type: ignore[name-defined]
return decorator
# determine whether we should use the decorator
@@ -2041,6 +2058,7 @@ def report(types = [], prefix = '', xform = None, notifyFunc = None, dConfigPara
if not dConfigParam:
doPrint = True
else:
+ dConfigParams: list[str] | tuple[str, ...]
if not isinstance(dConfigParam, (list,tuple)):
dConfigParams = (dConfigParam,)
else:
@@ -2070,7 +2088,7 @@ def report(types = [], prefix = '', xform = None, notifyFunc = None, dConfigPara
globalClockDelta = importlib.import_module("direct.distributed.ClockDelta").globalClockDelta
- def decorator(f):
+ def decorator(f): # type: ignore[no-redef]
def wrap(*args, **kwargs):
if args:
rArgs = [args[0].__class__.__name__ + ', ']
diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py
index 0ffbc6fba8..78ecaaf763 100644
--- a/direct/src/showbase/ShowBase.py
+++ b/direct/src/showbase/ShowBase.py
@@ -62,6 +62,7 @@ from panda3d.core import (
DepthTestAttrib,
DepthWriteAttrib,
DriveInterface,
+ EventQueue,
ExecutionEnvironment,
Filename,
FisheyeMaker,
@@ -114,7 +115,7 @@ from panda3d.core import (
WindowProperties,
getModelPath,
)
-from panda3d.direct import throw_new_frame, init_app_for_gui
+from panda3d.direct import init_app_for_gui
from panda3d.direct import storeAccessibilityShortcutKeys, allowAccessibilityShortcutKeys
from . import DConfig
@@ -177,6 +178,10 @@ class ShowBase(DirectObject.DirectObject):
aspect2d: NodePath
pixel2d: NodePath
+ a2dTopLeft: NodePath
+
+ cluster: Any | None
+
def __init__(self, fStartDirect: bool = True, windowType: str | None = None) -> None:
"""Opens a window, sets up a 3-D and several 2-D scene graphs, and
everything else needed to render the scene graph to the window.
@@ -380,7 +385,7 @@ class ShowBase(DirectObject.DirectObject):
#: yourself every frame.
self.cTrav: CollisionTraverser | Literal[0] = 0
self.shadowTrav: CollisionTraverser | Literal[0] = 0
- self.cTravStack = Stack()
+ self.cTravStack = Stack[CollisionTraverser]()
# Ditto for an AppTraverser.
self.appTrav: Any | Literal[0] = 0
@@ -436,9 +441,9 @@ class ShowBase(DirectObject.DirectObject):
self.useTrackball()
#: `.Loader.Loader` object.
- self.loader = Loader.Loader(self)
+ self.loader: Loader.Loader = ShowBaseGlobal.loader
+ self.loader._init_base(self)
self.graphicsEngine.setDefaultLoader(self.loader.loader)
- ShowBaseGlobal.loader = self.loader
#: The global event manager, as imported from `.EventManagerGlobal`.
self.eventMgr = eventMgr
@@ -652,7 +657,7 @@ class ShowBase(DirectObject.DirectObject):
def getExitErrorCode(self):
return 0
- def printEnvDebugInfo(self):
+ def printEnvDebugInfo(self) -> None:
"""Print some information about the environment that we are running
in. Stuff like the model paths and other paths. Feel free to
add stuff to this.
@@ -706,7 +711,8 @@ class ShowBase(DirectObject.DirectObject):
allowAccessibilityShortcutKeys(True)
self.__disabledStickyKeys = False
- self.__directObject.ignoreAll()
+ if hasattr(self, '__directObject'):
+ self.__directObject.ignoreAll()
self.ignoreAll()
self.shutdown()
@@ -1208,7 +1214,7 @@ class ShowBase(DirectObject.DirectObject):
self.taskMgr.remove('clientSleep')
self.taskMgr.add(self.__sleepCycleTask, 'clientSleep', sort = 55)
- def __sleepCycleTask(self, task):
+ def __sleepCycleTask(self, task: object) -> int:
Thread.sleep(self.clientSleep)
#time.sleep(self.clientSleep)
return Task.cont
@@ -1444,7 +1450,7 @@ class ShowBase(DirectObject.DirectObject):
self.__configAspectRatio = aspectRatio
self.adjustWindowAspectRatio(self.getAspectRatio())
- def getAspectRatio(self, win = None):
+ def getAspectRatio(self, win: GraphicsOutput | None = None) -> float:
# Returns the actual aspect ratio of the indicated (or main
# window), or the default aspect ratio if there is not yet a
# main window.
@@ -1453,7 +1459,7 @@ class ShowBase(DirectObject.DirectObject):
if self.__configAspectRatio:
return self.__configAspectRatio
- aspectRatio = 1
+ aspectRatio: float = 1
if win is None:
win = self.win
@@ -1476,7 +1482,7 @@ class ShowBase(DirectObject.DirectObject):
return aspectRatio
- def getSize(self, win = None):
+ def getSize(self, win: GraphicsOutput | None = None) -> tuple[int, int]:
"""
Returns the actual size of the indicated (or main window), or the
default size if there is not yet a main window.
@@ -2176,7 +2182,7 @@ class ShowBase(DirectObject.DirectObject):
music.setLoop(looping)
music.play()
- def __resetPrevTransform(self, state):
+ def __resetPrevTransform(self, state: object) -> int:
# Clear out the previous velocity deltas now, after we have
# rendered (the previous frame). We do this after the render,
# so that we have a chance to draw a representation of spheres
@@ -2187,7 +2193,7 @@ class ShowBase(DirectObject.DirectObject):
PandaNode.resetAllPrevTransform()
return Task.cont
- def __dataLoop(self, state):
+ def __dataLoop(self, state: object) -> int:
# Check if there were newly connected devices.
self.devices.update()
@@ -2197,7 +2203,7 @@ class ShowBase(DirectObject.DirectObject):
self.dgTrav.traverse(self.dataRootNode)
return Task.cont
- def __ivalLoop(self, state):
+ def __ivalLoop(self, state: object) -> int:
# Execute all intervals in the global ivalMgr.
IntervalManager.ivalMgr.step()
return Task.cont
@@ -2215,7 +2221,7 @@ class ShowBase(DirectObject.DirectObject):
self.shadowTrav.traverse(self.render)
return Task.cont
- def __collisionLoop(self, state):
+ def __collisionLoop(self, state: object) -> int:
# run the collision traversal if we have a
# CollisionTraverser set.
if self.cTrav:
@@ -2227,14 +2233,14 @@ class ShowBase(DirectObject.DirectObject):
messenger.send("collisionLoopFinished")
return Task.cont
- def __audioLoop(self, state):
+ def __audioLoop(self, state: object) -> int:
if self.musicManager is not None:
self.musicManager.update()
for x in self.sfxManagerList:
x.update()
return Task.cont
- def __garbageCollectStates(self, state):
+ def __garbageCollectStates(self, state: object) -> int:
""" This task is started only when we have
garbage-collect-states set in the Config.prc file, in which
case we're responsible for taking out Panda's garbage from
@@ -2245,7 +2251,7 @@ class ShowBase(DirectObject.DirectObject):
RenderState.garbageCollect()
return Task.cont
- def __igLoop(self, state):
+ def __igLoop(self, state: object) -> int:
if __debug__:
# We render the watch variables for the onScreenDebug as soon
# as we reasonably can before the renderFrame().
@@ -2280,12 +2286,11 @@ class ShowBase(DirectObject.DirectObject):
# now until someone complains.
time.sleep(0.1)
- # Lerp stuff needs this event, and it must be generated in
- # C++, not in Python.
- throw_new_frame()
+ # Lerp stuff needs this event, thrown directly on the C++ queue.
+ EventQueue.getGlobalEventQueue().queueEvent("NewFrame")
return Task.cont
- def __igLoopSync(self, state):
+ def __igLoopSync(self, state: object) -> int:
if __debug__:
# We render the watch variables for the onScreenDebug as soon
# as we reasonably can before the renderFrame().
@@ -2294,6 +2299,7 @@ class ShowBase(DirectObject.DirectObject):
if self.recorder:
self.recorder.recordFrame()
+ assert self.cluster is not None
self.cluster.collectData()
# Finally, render the frame.
@@ -2323,12 +2329,12 @@ class ShowBase(DirectObject.DirectObject):
time.sleep(0.1)
self.graphicsEngine.readyFlip()
+ assert self.cluster is not None
self.cluster.waitForFlipCommand()
self.graphicsEngine.flipFrame()
- # Lerp stuff needs this event, and it must be generated in
- # C++, not in Python.
- throw_new_frame()
+ # Lerp stuff needs this event, thrown directly on the C++ queue.
+ EventQueue.getGlobalEventQueue().queueEvent("NewFrame")
return Task.cont
def restart(self, clusterSync: bool = False, cluster=None) -> None:
@@ -2753,7 +2759,7 @@ class ShowBase(DirectObject.DirectObject):
self.oobeVis.reparentTo(self.camera)
self.oobeMode = 1
- def __oobeButton(self, suffix, button):
+ def __oobeButton(self, suffix: str, button: str) -> None:
if button.startswith('mouse'):
# Eat mouse buttons.
return
@@ -3073,7 +3079,7 @@ class ShowBase(DirectObject.DirectObject):
else:
return Task.cont
- def windowEvent(self, win):
+ def windowEvent(self, win: GraphicsOutput) -> None:
if win != self.win:
# This event isn't about our window.
return
@@ -3092,9 +3098,9 @@ class ShowBase(DirectObject.DirectObject):
self.userExit()
if properties.getForeground() and not self.mainWinForeground:
- self.mainWinForeground = 1
+ self.mainWinForeground = True
elif not properties.getForeground() and self.mainWinForeground:
- self.mainWinForeground = 0
+ self.mainWinForeground = False
if __debug__:
if self.__autoGarbageLogging:
GarbageReport.b_checkForGarbageLeaks()
@@ -3102,12 +3108,12 @@ class ShowBase(DirectObject.DirectObject):
if properties.getMinimized() and not self.mainWinMinimized:
# If the main window is minimized, throw an event to
# stop the music.
- self.mainWinMinimized = 1
+ self.mainWinMinimized = True
messenger.send('PandaPaused')
elif not properties.getMinimized() and self.mainWinMinimized:
# If the main window is restored, throw an event to
# restart the music.
- self.mainWinMinimized = 0
+ self.mainWinMinimized = False
messenger.send('PandaRestarted')
# If we have not forced the aspect ratio, let's see if it has
@@ -3125,7 +3131,7 @@ class ShowBase(DirectObject.DirectObject):
if self.wantRender2dp:
self.pixel2dp.setScale(2.0 / xsize, 1.0, 2.0 / ysize)
- def adjustWindowAspectRatio(self, aspectRatio):
+ def adjustWindowAspectRatio(self, aspectRatio: float) -> None:
""" This function is normally called internally by
`windowEvent()`, but it may also be called to explicitly adjust
the aspect ratio of the render/render2d DisplayRegion, by a
@@ -3512,6 +3518,7 @@ class ShowBase(DirectObject.DirectObject):
remove_camera_frustum = removeCameraFrustum
save_cube_map = saveCubeMap
save_sphere_map = saveSphereMap
+ user_exit = userExit
start_wx = startWx
start_tk = startTk
start_direct = startDirect
diff --git a/direct/src/showbase/ShowBaseGlobal.py b/direct/src/showbase/ShowBaseGlobal.py
index 4cd4e8623b..fe891e9c1b 100644
--- a/direct/src/showbase/ShowBaseGlobal.py
+++ b/direct/src/showbase/ShowBaseGlobal.py
@@ -62,7 +62,8 @@ aspect2d = render2d.attachNewNode(PGTop("aspect2d"))
#: A dummy scene graph that is not being rendered by anything.
hidden = NodePath("hidden")
-loader: Loader
+#: The global Loader instance for models, textures, etc.
+loader = Loader()
# Set direct notify categories now that we have config
directNotify.setDconfigLevels()
diff --git a/direct/src/showbase/VFSImporter.py b/direct/src/showbase/VFSImporter.py
index c6e69c5ca7..3bfa2336f1 100644
--- a/direct/src/showbase/VFSImporter.py
+++ b/direct/src/showbase/VFSImporter.py
@@ -5,477 +5,267 @@ Calling the :func:`register()` function to register the import hooks should be
sufficient to enable this functionality.
"""
-__all__ = ['register', 'sharedPackages',
- 'reloadSharedPackage', 'reloadSharedPackages']
+from __future__ import annotations
-from panda3d.core import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream
-from direct.stdpy.file import open
+__all__ = ['register']
+
+from panda3d.core import Filename, VirtualFile, VirtualFileSystem, VirtualFileMountSystem
+from panda3d.core import OFileStream, copy_stream
import sys
import marshal
-import imp
-import types
+import _imp
+import atexit
+from importlib.abc import Loader, SourceLoader
+from importlib.util import MAGIC_NUMBER, decode_source
+from importlib.machinery import ModuleSpec, EXTENSION_SUFFIXES, BYTECODE_SUFFIXES
+from types import ModuleType
+from typing import Any
-#: The sharedPackages dictionary lists all of the "shared packages",
-#: special Python packages that automatically span multiple directories
-#: via magic in the VFSImporter. You can make a package "shared"
-#: simply by adding its name into this dictionary (and then calling
-#: reloadSharedPackages() if it's already been imported).
-#:
-#: When a package name is in this dictionary at import time, *all*
-#: instances of the package are located along sys.path, and merged into
-#: a single Python module with a __path__ setting that represents the
-#: union. Thus, you can have a direct.showbase.foo in your own
-#: application, and loading it won't shadow the system
-#: direct.showbase.ShowBase which is in a different directory on disk.
-sharedPackages = {}
-
-vfs = VirtualFileSystem.getGlobalPtr()
-
-compiledExtensions = ['pyc', 'pyo']
-if not __debug__:
- # In optimized mode, we prefer loading .pyo files over .pyc files.
- # We implement that by reversing the extension names.
- compiledExtensions = ['pyo', 'pyc']
+vfs = VirtualFileSystem.get_global_ptr()
-class VFSImporter:
+def _make_spec(fullname: str, loader: VFSLoader, *, is_package: bool) -> ModuleSpec:
+ filename = loader._vfile.get_filename()
+ spec = ModuleSpec(fullname, loader, origin=filename.to_os_specific(), is_package=is_package)
+ if is_package:
+ assert spec.submodule_search_locations is not None
+ spec.submodule_search_locations.append(Filename(filename.get_dirname()).to_os_specific())
+ spec.has_location = True
+ return spec
+
+
+class VFSFinder:
""" This class serves as a Python importer to support loading
Python .py and .pyc/.pyo files from Panda's Virtual File System,
which allows loading Python source files from mounted .mf files
(among other places). """
- def __init__(self, path):
- if isinstance(path, Filename):
- self.dir_path = Filename(path)
- else:
- self.dir_path = Filename.fromOsSpecific(path)
+ def __init__(self, path: str) -> None:
+ self.path = path
- def find_module(self, fullname, path = None):
- if path is None:
- dir_path = self.dir_path
- else:
- dir_path = path
- #print >>sys.stderr, "find_module(%s), dir_path = %s" % (fullname, dir_path)
+ def find_spec(self, fullname: str, target: ModuleType | None = None) -> ModuleSpec | None:
+ #print(f"find_spec({fullname}), dir_path = {dir_path}", file=sys.stderr)
basename = fullname.split('.')[-1]
- path = Filename(dir_path, basename)
+ filename = Filename(Filename.from_os_specific(self.path), basename)
+
+ loader: VFSLoader
# First, look for Python files.
- filename = Filename(path)
- filename.setExtension('py')
- vfile = vfs.getFile(filename, True)
+ vfile = vfs.get_file(filename + '.py', True)
if vfile:
- return VFSLoader(dir_path, vfile, filename,
- desc=('.py', 'r', imp.PY_SOURCE))
+ loader = VFSSourceLoader(fullname, vfile)
+ return _make_spec(fullname, loader, is_package=False)
# If there's no .py file, but there's a .pyc file, load that
# anyway.
- for ext in compiledExtensions:
- filename = Filename(path)
- filename.setExtension(ext)
- vfile = vfs.getFile(filename, True)
+ for suffix in BYTECODE_SUFFIXES:
+ vfile = vfs.get_file(filename + suffix, True)
if vfile:
- return VFSLoader(dir_path, vfile, filename,
- desc=('.'+ext, 'rb', imp.PY_COMPILED))
+ loader = VFSCompiledLoader(fullname, vfile)
+ return _make_spec(fullname, loader, is_package=False)
# Look for a C/C++ extension module.
- for desc in imp.get_suffixes():
- if desc[2] != imp.C_EXTENSION:
- continue
-
- filename = Filename(path + desc[0])
- vfile = vfs.getFile(filename, True)
+ for suffix in EXTENSION_SUFFIXES:
+ vfile = vfs.get_file(filename + suffix, True)
if vfile:
- return VFSLoader(dir_path, vfile, filename, desc=desc)
+ loader = VFSExtensionLoader(fullname, vfile)
+ return _make_spec(fullname, loader, is_package=False)
- # Finally, consider a package, i.e. a directory containing
- # __init__.py.
- filename = Filename(path, '__init__.py')
- vfile = vfs.getFile(filename, True)
+ # Consider a package, i.e. a directory containing __init__.py.
+ init_filename = Filename(filename, '__init__.py')
+ vfile = vfs.get_file(init_filename, True)
if vfile:
- return VFSLoader(dir_path, vfile, filename, packagePath=path,
- desc=('.py', 'r', imp.PY_SOURCE))
- for ext in compiledExtensions:
- filename = Filename(path, '__init__.' + ext)
- vfile = vfs.getFile(filename, True)
- if vfile:
- return VFSLoader(dir_path, vfile, filename, packagePath=path,
- desc=('.'+ext, 'rb', imp.PY_COMPILED))
+ loader = VFSSourceLoader(fullname, vfile)
+ return _make_spec(fullname, loader, is_package=True)
- #print >>sys.stderr, "not found."
+ for suffix in BYTECODE_SUFFIXES:
+ init_filename = Filename(filename, '__init__' + suffix)
+ vfile = vfs.get_file(init_filename, True)
+ if vfile:
+ loader = VFSCompiledLoader(fullname, vfile)
+ return _make_spec(fullname, loader, is_package=True)
+
+ # Consider a namespace package.
+ if vfs.is_directory(filename):
+ spec = ModuleSpec(fullname, VFSNamespaceLoader(), is_package=True)
+ assert spec.submodule_search_locations is not None
+ spec.submodule_search_locations.append(filename.to_os_specific())
+ return spec
+
+ #print("not found.", file=sys.stderr)
return None
-class VFSLoader:
- """ The second part of VFSImporter, this is created for a
- particular .py file or directory. """
-
- def __init__(self, dir_path, vfile, filename, desc, packagePath=None):
- self.dir_path = dir_path
- self.timestamp = None
- if vfile:
- self.timestamp = vfile.getTimestamp()
- self.filename = filename
- self.desc = desc
- self.packagePath = packagePath
-
- def load_module(self, fullname, loadingShared = False):
- #print >>sys.stderr, "load_module(%s), dir_path = %s, filename = %s" % (fullname, self.dir_path, self.filename)
- if self.desc[2] == imp.PY_FROZEN:
- return self._import_frozen_module(fullname)
- if self.desc[2] == imp.C_EXTENSION:
- return self._import_extension_module(fullname)
-
- # Check if this is a child of a shared package.
- if not loadingShared and self.packagePath and '.' in fullname:
- parentname = fullname.rsplit('.', 1)[0]
- if parentname in sharedPackages:
- # It is. That means it's a shared package too.
- parent = sys.modules[parentname]
- path = getattr(parent, '__path__', None)
- importer = VFSSharedImporter()
- sharedPackages[fullname] = True
- loader = importer.find_module(fullname, path = path)
- assert loader
- return loader.load_module(fullname)
-
- code = self._read_code()
- if not code:
- raise ImportError('No Python code in %s' % (fullname))
-
- mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
- mod.__file__ = self.filename.toOsSpecific()
- mod.__loader__ = self
- if self.packagePath:
- mod.__path__ = [self.packagePath.toOsSpecific()]
- #print >> sys.stderr, "loaded %s, path = %s" % (fullname, mod.__path__)
-
- exec(code, mod.__dict__)
- return sys.modules[fullname]
-
- def getdata(self, path):
- path = Filename(self.dir_path, Filename.fromOsSpecific(path))
- vfile = vfs.getFile(path)
- if not vfile:
- raise IOError("Could not find '%s'" % (path))
- return vfile.readFile(True)
+class VFSLoader(Loader):
+ def __init__(self, fullname: str, vfile: VirtualFile) -> None:
+ self.name = fullname
+ self._vfile = vfile
def is_package(self, fullname):
- return bool(self.packagePath)
+ if fullname is not None and self.name != fullname:
+ raise ImportError
+ filename = self._vfile.get_filename().get_basename()
+ filename_base = filename.rsplit('.', 1)[0]
+ tail_name = fullname.rpartition('.')[2]
+ return filename_base == '__init__' and tail_name != '__init__'
+
+ def create_module(self, spec: ModuleSpec) -> ModuleType | None:
+ """Use default semantics for module creation."""
+
+ def exec_module(self, module: ModuleType) -> None:
+ """Execute the module."""
+ code = self.get_code(module.__name__) # type: ignore[attr-defined]
+ exec(code, module.__dict__)
+
+ def get_filename(self, fullname: str) -> str:
+ if fullname is not None and self.name != fullname:
+ raise ImportError
+
+ return self._vfile.get_filename().to_os_specific()
+
+ @staticmethod
+ def get_data(path: str) -> bytes:
+ vfile = vfs.get_file(Filename.from_os_specific(path))
+ if vfile:
+ return vfile.read_file(True)
+ else:
+ raise OSError
+
+ @staticmethod
+ def path_stats(path: str) -> dict[str, Any]:
+ vfile = vfs.get_file(Filename.from_os_specific(path))
+ if vfile:
+ return {'mtime': vfile.get_timestamp(), 'size': vfile.get_file_size()}
+ else:
+ raise OSError
+
+ @staticmethod
+ def path_mtime(path):
+ vfile = vfs.get_file(Filename.from_os_specific(path))
+ if vfile:
+ return vfile.get_timestamp()
+ else:
+ raise OSError
+
+
+class VFSSourceLoader(VFSLoader, SourceLoader): # type: ignore[misc]
+ def get_source(self, fullname):
+ if fullname is not None and self.name != fullname:
+ raise ImportError
+
+ return decode_source(self._vfile.read_file(True))
+
+
+class VFSCompiledLoader(VFSLoader):
def get_code(self, fullname):
- return self._read_code()
+ if fullname is not None and self.name != fullname:
+ raise ImportError
+
+ vfile = self._vfile
+ data = vfile.read_file(True)
+ if data[:4] != MAGIC_NUMBER:
+ raise ImportError("Bad magic number in %s" % (vfile))
+
+ return marshal.loads(data[16:])
def get_source(self, fullname):
- return self._read_source()
+ return None
- def get_filename(self, fullname):
- return self.filename.toOsSpecific()
- def _read_source(self):
- """ Returns the Python source for this file, if it is
- available, or None if it is not. May raise IOError. """
-
- if self.desc[2] == imp.PY_COMPILED or \
- self.desc[2] == imp.C_EXTENSION:
- return None
-
- filename = Filename(self.filename)
- filename.setExtension('py')
- filename.setText()
-
- # Use the tokenize module to detect the encoding.
- import tokenize
- fh = open(self.filename, 'rb')
- encoding, lines = tokenize.detect_encoding(fh.readline)
- return (b''.join(lines) + fh.read()).decode(encoding)
-
- def _import_extension_module(self, fullname):
- """ Loads the binary shared object as a Python module, and
- returns it. """
-
- vfile = vfs.getFile(self.filename, False)
+class VFSExtensionLoader(VFSLoader):
+ def create_module(self, spec):
+ vfile = self._vfile
+ filename = vfile.get_filename()
# We can only import an extension module if it already exists on
# disk. This means if it's a truly virtual file that has no
# on-disk equivalent, we have to write it to a temporary file
# first.
- if hasattr(vfile, 'getMount') and \
- isinstance(vfile.getMount(), VirtualFileMountSystem):
+ if isinstance(vfile.get_mount(), VirtualFileMountSystem):
# It's a real file.
- filename = self.filename
- elif self.filename.exists():
+ pass
+ elif filename.exists():
# It's a virtual file, but it's shadowing a real file in
# the same directory. Assume they're the same, and load
# the real one.
- filename = self.filename
- else:
- # It's a virtual file with no real-world existence. Dump
- # it to disk. TODO: clean up this filename.
- filename = Filename.temporary('', self.filename.getBasenameWoExtension(),
- '.' + self.filename.getExtension(),
- type = Filename.TDso)
- filename.setExtension(self.filename.getExtension())
- filename.setBinary()
- sin = vfile.openReadFile(True)
- sout = OFileStream()
- if not filename.openWrite(sout):
- raise IOError
- if not copyStream(sin, sout):
- raise IOError
- vfile.closeReadFile(sin)
- del sout
-
- module = imp.load_module(fullname, None, filename.toOsSpecific(),
- self.desc)
- module.__file__ = self.filename.toOsSpecific()
- return module
-
- def _import_frozen_module(self, fullname):
- """ Imports the frozen module without messing around with
- searching any more. """
- #print >>sys.stderr, "importing frozen %s" % (fullname)
- module = imp.load_module(fullname, None, fullname,
- ('', '', imp.PY_FROZEN))
- module.__path__ = []
- return module
-
- def _read_code(self):
- """ Returns the Python compiled code object for this file, if
- it is available, or None if it is not. May raise IOError,
- ValueError, SyntaxError, or a number of other errors generated
- by the low-level system. """
-
- if self.desc[2] == imp.PY_COMPILED:
- # It's a pyc file; just read it directly.
- pycVfile = vfs.getFile(self.filename, False)
- if pycVfile:
- return self._loadPyc(pycVfile, None)
- raise IOError('Could not read %s' % (self.filename))
-
- elif self.desc[2] == imp.C_EXTENSION:
- return None
-
- # It's a .py file (or an __init__.py file; same thing). Read
- # the .pyc file if it is available and current; otherwise read
- # the .py file and compile it.
- t_pyc = None
- for ext in compiledExtensions:
- pycFilename = Filename(self.filename)
- pycFilename.setExtension(ext)
- pycVfile = vfs.getFile(pycFilename, False)
- if pycVfile:
- t_pyc = pycVfile.getTimestamp()
- break
-
- code = None
- if t_pyc and t_pyc >= self.timestamp:
- try:
- code = self._loadPyc(pycVfile, self.timestamp)
- except ValueError:
- code = None
-
- if not code:
- source = self._read_source()
- filename = Filename(self.filename)
- filename.setExtension('py')
- code = self._compile(filename, source)
-
- return code
-
- def _loadPyc(self, vfile, timestamp):
- """ Reads and returns the marshal data from a .pyc file.
- Raises ValueError if there is a problem. """
-
- code = None
- data = vfile.readFile(True)
- if data[:4] != imp.get_magic():
- raise ValueError("Bad magic number in %s" % (vfile))
-
- t = int.from_bytes(data[4:8], 'little')
- data = data[12:]
-
- if not timestamp or t == timestamp:
- return marshal.loads(data)
- else:
- raise ValueError("Timestamp wrong on %s" % (vfile))
-
- def _compile(self, filename, source):
- """ Compiles the Python source code to a code object and
- attempts to write it to an appropriate .pyc file. May raise
- SyntaxError or other errors generated by the compiler. """
-
- if source and source[-1] != '\n':
- source = source + '\n'
- code = compile(source, filename.toOsSpecific(), 'exec')
-
- # try to cache the compiled code
- pycFilename = Filename(filename)
- pycFilename.setExtension(compiledExtensions[0])
- try:
- f = open(pycFilename.toOsSpecific(), 'wb')
- except IOError:
pass
else:
- f.write(imp.get_magic())
- f.write((self.timestamp & 0xffffffff).to_bytes(4, 'little'))
- f.write(b'\0\0\0\0')
- f.write(marshal.dumps(code))
- f.close()
-
- return code
-
-
-class VFSSharedImporter:
- """ This is a special importer that is added onto the meta_path
- list, so that it is called before sys.path is traversed. It uses
- special logic to load one of the "shared" packages, by searching
- the entire sys.path for all instances of this shared package, and
- merging them. """
-
- def __init__(self):
- pass
-
- def find_module(self, fullname, path = None, reload = False):
- #print >>sys.stderr, "shared find_module(%s), path = %s" % (fullname, path)
-
- if fullname not in sharedPackages:
- # Not a shared package; fall back to normal import.
- return None
-
- if path is None:
- path = sys.path
-
- excludePaths = []
- if reload:
- # If reload is true, we are simply reloading the module,
- # looking for new paths to add.
- mod = sys.modules[fullname]
- excludePaths = getattr(mod, '_vfs_shared_path', None)
- if excludePaths is None:
- # If there isn't a _vfs_shared_path symbol already,
- # the module must have been loaded through
- # conventional means. Try to guess which path it was
- # found on.
- d = self.getLoadedDirname(mod)
- excludePaths = [d]
-
- loaders = []
- for dir in path:
- if dir in excludePaths:
- continue
-
- importer = sys.path_importer_cache.get(dir, None)
- if importer is None:
- try:
- importer = VFSImporter(dir)
- except ImportError:
- continue
-
- sys.path_importer_cache[dir] = importer
-
+ # It's a virtual file with no real-world existence. Dump
+ # it to disk.
+ ext = filename.get_extension()
+ tmp_filename = Filename.temporary('', filename.get_basename_wo_extension(),
+ '.' + ext,
+ type = Filename.T_dso)
+ tmp_filename.set_extension(ext)
+ tmp_filename.set_binary()
+ sin = vfile.open_read_file(True)
try:
- loader = importer.find_module(fullname)
- if not loader:
- continue
- except ImportError:
- continue
+ sout = OFileStream()
+ if not tmp_filename.open_write(sout):
+ raise IOError
+ if not copy_stream(sin, sout):
+ raise IOError
+ finally:
+ vfile.close_read_file(sin)
+ del sout
- loaders.append(loader)
+ # Delete when the process ends.
+ atexit.register(tmp_filename.unlink)
- if not loaders:
- return None
- return VFSSharedLoader(loaders, reload = reload)
+ # Make a dummy spec to pass to create_dynamic with the path to
+ # our temporary file.
+ spec = ModuleSpec(spec.name, spec.loader,
+ origin=tmp_filename.to_os_specific(),
+ is_package=False)
- def getLoadedDirname(self, mod):
- """ Returns the directory name that the indicated
- conventionally-loaded module must have been loaded from. """
+ module = _imp.create_dynamic(spec)
+ module.__file__ = filename.to_os_specific()
+ return module
- if not getattr(mod, '__file__', None):
- return None
+ def exec_module(self, module):
+ _imp.exec_dynamic(module)
- fullname = mod.__name__
- dirname = Filename.fromOsSpecific(mod.__file__).getDirname()
+ def is_package(self, fullname):
+ return False
- parentname = None
- basename = fullname
- if '.' in fullname:
- parentname, basename = fullname.rsplit('.', 1)
+ def get_code(self, fullname):
+ return None
- path = None
- if parentname:
- parent = sys.modules[parentname]
- path = parent.__path__
- if path is None:
- path = sys.path
-
- for dir in path:
- pdir = str(Filename.fromOsSpecific(dir))
- if pdir + '/' + basename == dirname:
- # We found it!
- return dir
-
- # Couldn't figure it out.
+ def get_source(self, fullname):
return None
-class VFSSharedLoader:
- """ The second part of VFSSharedImporter, this imports a list of
- packages and combines them. """
+class VFSNamespaceLoader(Loader):
+ def create_module(self, spec: ModuleSpec) -> ModuleType | None:
+ """Use default semantics for module creation."""
- def __init__(self, loaders, reload):
- self.loaders = loaders
- self.reload = reload
+ def exec_module(self, module: ModuleType) -> None:
+ pass
- def load_module(self, fullname):
- #print >>sys.stderr, "shared load_module(%s), loaders = %s" % (fullname, map(lambda l: l.dir_path, self.loaders))
+ def is_package(self, fullname):
+ return True
- mod = None
- message = None
- path = []
- vfs_shared_path = []
- if self.reload:
- mod = sys.modules[fullname]
- path = mod.__path__ or []
- if path == fullname:
- # Work around Python bug setting __path__ of frozen modules.
- path = []
- vfs_shared_path = getattr(mod, '_vfs_shared_path', [])
+ def get_source(self, fullname):
+ return ''
- for loader in self.loaders:
- try:
- mod = loader.load_module(fullname, loadingShared = True)
- except ImportError:
- etype, evalue, etraceback = sys.exc_info()
- print("%s on %s: %s" % (etype.__name__, fullname, evalue))
- if not message:
- message = '%s: %s' % (fullname, evalue)
- continue
- for dir in getattr(mod, '__path__', []):
- if dir not in path:
- path.append(dir)
+ def get_code(self, fullname):
+ return compile('', '', 'exec', dont_inherit=True)
- if mod is None:
- # If all of them failed to load, raise ImportError.
- raise ImportError(message)
- # If at least one of them loaded successfully, return the
- # union of loaded modules.
- mod.__path__ = path
- mod.__package__ = fullname
-
- # Also set this special symbol, which records that this is a
- # shared package, and also lists the paths we have already
- # loaded.
- mod._vfs_shared_path = vfs_shared_path + [l.dir_path for l in self.loaders]
-
- return mod
+def _path_hook(entry: str) -> VFSFinder:
+ # If this is a directory in the VFS, create a VFSFinder for this entry.
+ vfile = vfs.get_file(Filename.from_os_specific(entry), False)
+ if vfile and vfile.is_directory() and not isinstance(vfile.get_mount(), VirtualFileMountSystem):
+ return VFSFinder(entry)
+ else:
+ raise ImportError
_registered = False
-
-def register():
- """ Register the VFSImporter on the path_hooks, if it has not
+def register() -> None:
+ """ Register the VFSFinder on the path_hooks, if it has not
already been registered, so that future Python import statements
will vector through here (and therefore will take advantage of
Panda's virtual file system). """
@@ -483,55 +273,9 @@ def register():
global _registered
if not _registered:
_registered = True
- sys.path_hooks.insert(0, VFSImporter)
- sys.meta_path.insert(0, VFSSharedImporter())
+ sys.path_hooks.insert(0, _path_hook)
# Blow away the importer cache, so we'll come back through the
- # VFSImporter for every folder in the future, even those
+ # VFSFinder for every folder in the future, even those
# folders that previously were loaded directly.
sys.path_importer_cache = {}
-
-
-def reloadSharedPackage(mod):
- """ Reloads the specific module as a shared package, adding any
- new directories that might have appeared on the search path. """
-
- fullname = mod.__name__
- path = None
- if '.' in fullname:
- parentname = fullname.rsplit('.', 1)[0]
- parent = sys.modules[parentname]
- path = parent.__path__
-
- importer = VFSSharedImporter()
- loader = importer.find_module(fullname, path = path, reload = True)
- if loader:
- loader.load_module(fullname)
-
- # Also force any child packages to become shared packages, if
- # they aren't already.
- for basename, child in list(mod.__dict__.items()):
- if isinstance(child, types.ModuleType):
- childname = child.__name__
- if childname == fullname + '.' + basename and \
- hasattr(child, '__path__') and \
- childname not in sharedPackages:
- sharedPackages[childname] = True
- reloadSharedPackage(child)
-
-
-def reloadSharedPackages():
- """ Walks through the sharedPackages list, and forces a reload of
- any modules on that list that have already been loaded. This
- allows new directories to be added to the search path. """
-
- #print >> sys.stderr, "reloadSharedPackages, path = %s, sharedPackages = %s" % (sys.path, sharedPackages.keys())
-
- # Sort the list, just to make sure parent packages are reloaded
- # before child packages are.
- for fullname in sorted(sharedPackages.keys()):
- mod = sys.modules.get(fullname, None)
- if not mod:
- continue
-
- reloadSharedPackage(mod)
diff --git a/direct/src/showbase/showBase.cxx b/direct/src/showbase/showBase.cxx
index c4aa38b7d5..43a8a16f8e 100644
--- a/direct/src/showbase/showBase.cxx
+++ b/direct/src/showbase/showBase.cxx
@@ -45,15 +45,6 @@ ConfigureDef(config_showbase);
ConfigureFn(config_showbase) {
}
-ConfigVariableSearchPath particle_path
-("particle-path",
- PRC_DESC("The directories to search for particle files to be loaded."));
-
-ConfigVariableSearchPath &
-get_particle_path() {
- return particle_path;
-}
-
// Throw the "NewFrame" event in the C++ world. Some of the lerp code depends
// on receiving this.
void
diff --git a/direct/src/showbase/showBase.h b/direct/src/showbase/showBase.h
index a578c5159c..25cf5fdf14 100644
--- a/direct/src/showbase/showBase.h
+++ b/direct/src/showbase/showBase.h
@@ -22,8 +22,6 @@
#include "animControl.h"
#include "pointerTo.h"
#include "dconfig.h"
-#include "dSearchPath.h"
-#include "configVariableSearchPath.h"
#include "nodePath.h"
ConfigureDecl(config_showbase, EXPCL_DIRECT_SHOWBASE, EXPTP_DIRECT_SHOWBASE);
@@ -34,8 +32,6 @@ class GraphicsEngine;
BEGIN_PUBLISH
-EXPCL_DIRECT_SHOWBASE ConfigVariableSearchPath &get_particle_path();
-
EXPCL_DIRECT_SHOWBASE void throw_new_frame();
EXPCL_DIRECT_SHOWBASE void init_app_for_gui();
diff --git a/direct/src/stdpy/thread.py b/direct/src/stdpy/thread.py
index f20a2a54bc..7439ba5492 100644
--- a/direct/src/stdpy/thread.py
+++ b/direct/src/stdpy/thread.py
@@ -5,6 +5,8 @@ in some compilation models, Panda's threading constructs are
incompatible with the OS-provided threads used by Python's thread
module. """
+from __future__ import annotations
+
__all__ = [
'error', 'LockType',
'start_new_thread',
@@ -19,6 +21,9 @@ __all__ = [
from panda3d import core
import sys
+from collections.abc import Callable, Iterable, Mapping
+from typing import Any
+
if sys.platform == "win32":
TIMEOUT_MAX = float(0xffffffff // 1000)
else:
@@ -41,12 +46,12 @@ class LockType:
allows a different thread to release the lock than the one that
acquired it. """
- def __init__(self):
+ def __init__(self) -> None:
self.__lock = core.Mutex('PythonLock')
self.__cvar = core.ConditionVar(self.__lock)
self.__locked = False
- def acquire(self, waitflag = 1, timeout = -1):
+ def acquire(self, waitflag: bool = True, timeout: float = -1) -> bool:
self.__lock.acquire()
try:
if self.__locked and not waitflag:
@@ -65,7 +70,7 @@ class LockType:
finally:
self.__lock.release()
- def release(self):
+ def release(self) -> None:
self.__lock.acquire()
try:
if not self.__locked:
@@ -90,18 +95,23 @@ class LockType:
_counter = 0
-def _newname(template="Thread-%d"):
+def _newname(template: str = "Thread-%d") -> str:
global _counter
_counter = _counter + 1
return template % _counter
-_threads = {}
+_threads: dict[int, tuple[core.Thread, dict[int, dict[str, Any]], Any | None]] = {}
_nextThreadId = 0
_threadsLock = core.Mutex('thread._threadsLock')
-def start_new_thread(function, args, kwargs = {}, name = None):
+def start_new_thread(
+ function: Callable[..., object],
+ args: Iterable[Any],
+ kwargs: Mapping[str, Any] = {},
+ name: str | None = None,
+) -> int:
def threadFunc(threadId, function = function, args = args, kwargs = kwargs):
try:
try:
@@ -132,7 +142,7 @@ def start_new_thread(function, args, kwargs = {}, name = None):
_threadsLock.release()
-def _add_thread(thread, wrapper):
+def _add_thread(thread: core.Thread, wrapper: Any) -> int:
""" Adds the indicated core.Thread object, with the indicated Python
wrapper, to the thread list. Returns the new thread ID. """
@@ -150,7 +160,7 @@ def _add_thread(thread, wrapper):
_threadsLock.release()
-def _get_thread_wrapper(thread, wrapperClass):
+def _get_thread_wrapper(thread: core.Thread, wrapperClass: Callable[[core.Thread, int], Any]) -> Any:
""" Returns the thread wrapper for the indicated thread. If there
is not one, creates an instance of the indicated wrapperClass
instead. """
@@ -222,7 +232,7 @@ def _get_thread_locals(thread, i):
_threadsLock.release()
-def _remove_thread_id(threadId):
+def _remove_thread_id(threadId: int) -> None:
""" Removes the thread with the indicated ID from the thread list. """
# On interpreter shutdown, Python may set module globals to None.
@@ -250,11 +260,11 @@ def exit():
raise SystemExit
-def allocate_lock():
+def allocate_lock() -> LockType:
return LockType()
-def get_ident():
+def get_ident() -> int:
return core.Thread.getCurrentThread().this
diff --git a/direct/src/stdpy/threading.py b/direct/src/stdpy/threading.py
index 3b82b61466..e34b24342c 100644
--- a/direct/src/stdpy/threading.py
+++ b/direct/src/stdpy/threading.py
@@ -21,12 +21,17 @@ easier to use and understand.
It is permissible to mix-and-match both threading and threading2
within the same application. """
+from __future__ import annotations
+
from panda3d import core
from direct.stdpy import thread as _thread
import sys as _sys
import weakref
+from collections.abc import Callable, Iterable, Mapping
+from typing import Any, NoReturn
+
__all__ = [
'Thread',
'Lock', 'RLock',
@@ -54,10 +59,14 @@ class ThreadBase:
""" A base class for both Thread and ExternalThread in this
module. """
- def __init__(self):
+ name: str
+ ident: int
+ daemon: bool
+
+ def __init__(self) -> None:
pass
- def getName(self):
+ def getName(self) -> str:
return self.name
def isDaemon(self):
@@ -92,7 +101,15 @@ class Thread(ThreadBase):
object. The wrapper is designed to emulate Python's own
threading.Thread object. """
- def __init__(self, group=None, target=None, name=None, args=(), kwargs={}, daemon=None):
+ def __init__(
+ self,
+ group: None = None,
+ target: Callable[..., object] | None = None,
+ name: str | None = None,
+ args: Iterable[Any] = (),
+ kwargs: Mapping[str, Any] = {},
+ daemon: bool | None = None,
+ ) -> None:
ThreadBase.__init__(self)
assert group is None
@@ -131,7 +148,7 @@ class Thread(ThreadBase):
isAlive = is_alive
- def start(self):
+ def start(self) -> None:
thread = self.__thread
if thread is None or thread.is_started():
raise RuntimeError
@@ -147,7 +164,7 @@ class Thread(ThreadBase):
self.__target(*self.__args, **self.__kwargs)
- def join(self, timeout = None):
+ def join(self, timeout: float | None = None) -> None:
# We don't support a timed join here, sorry.
assert timeout is None
thread = self.__thread
@@ -157,7 +174,7 @@ class Thread(ThreadBase):
self.__thread = None
_thread._remove_thread_id(self.ident)
- def setName(self, name):
+ def setName(self, name: str) -> None:
self.__dict__['name'] = name
self.__thread.setName(name)
@@ -166,7 +183,7 @@ class ExternalThread(ThreadBase):
""" Returned for a Thread object that wasn't created by this
interface. """
- def __init__(self, extThread, threadId):
+ def __init__(self, extThread: core.Thread, threadId: int) -> None:
ThreadBase.__init__(self)
self.__thread = extThread
@@ -196,7 +213,7 @@ class ExternalThread(ThreadBase):
class MainThread(ExternalThread):
""" Returned for the MainThread object. """
- def __init__(self, extThread, threadId):
+ def __init__(self, extThread: core.Thread, threadId: int) -> None:
ExternalThread.__init__(self, extThread, threadId)
self.__dict__['daemon'] = False
@@ -206,7 +223,7 @@ class Lock(core.Mutex):
The wrapper is designed to emulate Python's own threading.Lock
object. """
- def __init__(self, name = "PythonLock"):
+ def __init__(self, name: str = "PythonLock") -> None:
core.Mutex.__init__(self, name)
@@ -224,7 +241,7 @@ class Condition(core.ConditionVar):
object. The wrapper is designed to emulate Python's own
threading.Condition object. """
- def __init__(self, lock = None):
+ def __init__(self, lock: Lock | RLock | None = None) -> None:
if not lock:
lock = Lock()
@@ -241,7 +258,7 @@ class Condition(core.ConditionVar):
def release(self):
self.__lock.release()
- def wait(self, timeout = None):
+ def wait(self, timeout: float | None = None) -> None:
if timeout is None:
core.ConditionVar.wait(self)
else:
@@ -373,8 +390,9 @@ class Timer(Thread):
self.finished.set()
-def _create_thread_wrapper(t, threadId):
+def _create_thread_wrapper(t: core.Thread, threadId: int) -> ExternalThread:
""" Creates a thread wrapper for the indicated external thread. """
+ pyt: ExternalThread
if isinstance(t, core.MainThread):
pyt = MainThread(t, threadId)
else:
@@ -383,7 +401,7 @@ def _create_thread_wrapper(t, threadId):
return pyt
-def current_thread():
+def current_thread() -> ThreadBase:
t = core.Thread.getCurrentThread()
return _thread._get_thread_wrapper(t, _create_thread_wrapper)
@@ -430,5 +448,5 @@ def setprofile(func):
_setprofile_func = func
-def stack_size(size = None):
+def stack_size(size: object = None) -> NoReturn:
raise ThreadError
diff --git a/direct/src/stdpy/threading2.py b/direct/src/stdpy/threading2.py
index 09d0a8d083..cde6e0aa7e 100644
--- a/direct/src/stdpy/threading2.py
+++ b/direct/src/stdpy/threading2.py
@@ -13,6 +13,8 @@ to import Panda's thread reimplementation instead of the system thread
module, and so it is therefore layered on top of Panda's thread
implementation. """
+from __future__ import annotations
+
import sys as _sys
import atexit as _atexit
@@ -21,8 +23,10 @@ from direct.stdpy.thread import stack_size, _newname, _local as local
from panda3d import core
_sleep = core.Thread.sleep
+from collections.abc import Callable, Iterable, Mapping
from time import time as _time
from traceback import format_exc as _format_exc
+from typing import Any
__all__ = ['get_ident', 'active_count', 'Condition', 'current_thread',
'enumerate', 'main_thread', 'TIMEOUT_MAX',
@@ -51,12 +55,12 @@ if __debug__:
class _Verbose(object):
- def __init__(self, verbose=None):
+ def __init__(self, verbose: bool | None = None) -> None:
if verbose is None:
verbose = _VERBOSE
self.__verbose = verbose
- def _note(self, format, *args):
+ def _note(self, format: str, *args: Any) -> None:
if self.__verbose:
format = format % args
format = "%s: %s\n" % (
@@ -66,9 +70,9 @@ if __debug__:
else:
# Disable this when using "python -O"
class _Verbose(object): # type: ignore[no-redef]
- def __init__(self, verbose=None):
+ def __init__(self, verbose: bool | None = None) -> None:
pass
- def _note(self, *args):
+ def _note(self, *args) -> None:
pass
# Support for profile and trace hooks
@@ -88,15 +92,15 @@ def settrace(func):
Lock = _allocate_lock
-def RLock(*args, **kwargs):
- return _RLock(*args, **kwargs)
+def RLock(verbose: bool | None = None) -> _RLock:
+ return _RLock(verbose)
class _RLock(_Verbose):
- def __init__(self, verbose=None):
+ def __init__(self, verbose: bool | None = None) -> None:
_Verbose.__init__(self, verbose)
self.__block = _allocate_lock()
- self.__owner = None
+ self.__owner: Thread | None = None
self.__count = 0
def __repr__(self):
@@ -105,13 +109,13 @@ class _RLock(_Verbose):
self.__owner and self.__owner.getName(),
self.__count)
- def acquire(self, blocking=1):
+ def acquire(self, blocking: bool = True) -> bool:
me = currentThread()
if self.__owner is me:
self.__count = self.__count + 1
if __debug__:
self._note("%s.acquire(%s): recursive success", self, blocking)
- return 1
+ return True
rc = self.__block.acquire(blocking)
if rc:
self.__owner = me
@@ -125,7 +129,7 @@ class _RLock(_Verbose):
__enter__ = acquire
- def release(self):
+ def release(self) -> None:
me = currentThread()
assert self.__owner is me, "release() of un-acquire()d lock"
self.__count = count = self.__count - 1
@@ -163,12 +167,12 @@ class _RLock(_Verbose):
return self.__owner is currentThread()
-def Condition(*args, **kwargs):
- return _Condition(*args, **kwargs)
+def Condition(lock: _thread.LockType | _RLock | None = None, verbose: bool | None = None) -> _Condition:
+ return _Condition(lock, verbose)
class _Condition(_Verbose):
- def __init__(self, lock=None, verbose=None):
+ def __init__(self, lock: _thread.LockType | _RLock | None = None, verbose: bool | None = None) -> None:
_Verbose.__init__(self, verbose)
if lock is None:
lock = RLock()
@@ -180,18 +184,18 @@ class _Condition(_Verbose):
# these override the default implementations (which just call
# release() and acquire() on the lock). Ditto for _is_owned().
try:
- self._release_save = lock._release_save
+ self._release_save = lock._release_save # type: ignore[method-assign, union-attr]
except AttributeError:
pass
try:
- self._acquire_restore = lock._acquire_restore
+ self._acquire_restore = lock._acquire_restore # type: ignore[method-assign, union-attr]
except AttributeError:
pass
try:
- self._is_owned = lock._is_owned
+ self._is_owned = lock._is_owned # type: ignore[method-assign, union-attr]
except AttributeError:
pass
- self.__waiters = []
+ self.__waiters: list[_thread.LockType] = []
def __enter__(self):
return self.__lock.__enter__()
@@ -202,22 +206,22 @@ class _Condition(_Verbose):
def __repr__(self):
return "" % (self.__lock, len(self.__waiters))
- def _release_save(self): # pylint: disable=method-hidden
+ def _release_save(self) -> Any: # pylint: disable=method-hidden
self.__lock.release() # No state to save
- def _acquire_restore(self, x): # pylint: disable=method-hidden
+ def _acquire_restore(self, x) -> None: # pylint: disable=method-hidden
self.__lock.acquire() # Ignore saved state
- def _is_owned(self): # pylint: disable=method-hidden
+ def _is_owned(self) -> bool: # pylint: disable=method-hidden
# Return True if lock is owned by currentThread.
# This method is called only if __lock doesn't have _is_owned().
- if self.__lock.acquire(0):
+ if self.__lock.acquire(False):
self.__lock.release()
return False
else:
return True
- def wait(self, timeout=None):
+ def wait(self, timeout: float | None = None) -> None:
assert self._is_owned(), "wait() of un-acquire()d lock"
waiter = _allocate_lock()
waiter.acquire()
@@ -237,7 +241,7 @@ class _Condition(_Verbose):
endtime = _time() + timeout
delay = 0.0005 # 500 us -> initial delay of 1 ms
while True:
- gotit = waiter.acquire(0)
+ gotit = waiter.acquire(False)
if gotit:
break
remaining = endtime - _time()
@@ -258,7 +262,7 @@ class _Condition(_Verbose):
finally:
self._acquire_restore(saved_state)
- def notify(self, n=1):
+ def notify(self, n: int = 1) -> None:
assert self._is_owned(), "notify() of un-acquire()d lock"
__waiters = self.__waiters
waiters = __waiters[:n]
@@ -275,7 +279,7 @@ class _Condition(_Verbose):
except ValueError:
pass
- def notifyAll(self):
+ def notifyAll(self) -> None:
self.notify(len(self.__waiters))
@@ -381,7 +385,7 @@ class _Event(_Verbose):
# Active thread administration
_active_limbo_lock = _allocate_lock()
-_active = {} # maps thread id to Thread object
+_active: dict[int, Thread] = {} # maps thread id to Thread object
_limbo = {}
@@ -400,8 +404,16 @@ class Thread(_Verbose):
# Protected by _active_limbo_lock.
__registered_atexit = False
- def __init__(self, group=None, target=None, name=None,
- args=(), kwargs=None, verbose=None, daemon=None):
+ def __init__(
+ self,
+ group: None = None,
+ target: Callable[..., object] | None = None,
+ name: object = None,
+ args: Iterable[Any] = (),
+ kwargs: Mapping[str, Any] | None = None,
+ verbose: bool | None = None,
+ daemon: bool | None = None,
+ ) -> None:
assert group is None, "group argument must be None for now"
_Verbose.__init__(self, verbose)
if kwargs is None:
@@ -422,7 +434,7 @@ class Thread(_Verbose):
# sys.exc_info since it can be changed between instances
self.__stderr = _sys.stderr
- def _set_daemon(self):
+ def _set_daemon(self) -> bool:
# Overridden in _MainThread and _DummyThread
return currentThread().isDaemon()
@@ -437,7 +449,7 @@ class Thread(_Verbose):
status = status + " daemon"
return "<%s(%s, %s)>" % (self.__class__.__name__, self.__name, status)
- def start(self):
+ def start(self) -> None:
assert self.__initialized, "Thread.__init__() not called"
assert not self.__started, "thread already started"
if __debug__:
@@ -457,11 +469,11 @@ class Thread(_Verbose):
self.__started = True
_sleep(0.000001) # 1 usec, to let the thread run (Solaris hack)
- def run(self):
+ def run(self) -> None:
if self.__target:
self.__target(*self.__args, **self.__kwargs)
- def __bootstrap(self):
+ def __bootstrap(self) -> None:
try:
self.__started = True
_active_limbo_lock.acquire()
@@ -497,7 +509,7 @@ class Thread(_Verbose):
# Do the best job possible w/o a huge amt. of code to
# approximate a traceback (code ideas from
# Lib/traceback.py)
- exc_type, exc_value, exc_tb = self.__exc_info()
+ exc_type, exc_value, exc_tb = self.__exc_info() # type: ignore[misc]
try:
self.__stderr.write("Exception in thread " + self.getName() +
" (most likely raised during interpreter shutdown):\n")
@@ -523,13 +535,13 @@ class Thread(_Verbose):
except:
pass
- def __stop(self):
+ def __stop(self) -> None:
self.__block.acquire()
self.__stopped = True
self.__block.notifyAll()
self.__block.release()
- def __delete(self):
+ def __delete(self) -> None:
"Remove current thread from the dict of currently running threads."
# Notes about running with dummy_thread:
@@ -563,7 +575,7 @@ class Thread(_Verbose):
finally:
_active_limbo_lock.release()
- def join(self, timeout=None):
+ def join(self, timeout: float | None = None) -> None:
assert self.__initialized, "Thread.__init__() not called"
assert self.__started, "cannot join thread before it is started"
assert self is not currentThread(), "cannot join current thread"
@@ -592,11 +604,11 @@ class Thread(_Verbose):
finally:
self.__block.release()
- def getName(self):
+ def getName(self) -> str:
assert self.__initialized, "Thread.__init__() not called"
return self.__name
- def setName(self, name):
+ def setName(self, name: object) -> None:
assert self.__initialized, "Thread.__init__() not called"
self.__name = str(name)
@@ -606,7 +618,7 @@ class Thread(_Verbose):
isAlive = is_alive
- def isDaemon(self):
+ def isDaemon(self) -> bool:
assert self.__initialized, "Thread.__init__() not called"
return self.__daemonic
@@ -654,7 +666,7 @@ class _Timer(Thread):
class _MainThread(Thread):
- def __init__(self):
+ def __init__(self) -> None:
Thread.__init__(self, name="MainThread")
self._Thread__started = True
_active_limbo_lock.acquire()
@@ -688,13 +700,13 @@ class _MainThread(Thread):
class _DummyThread(Thread):
- def __init__(self):
+ def __init__(self) -> None:
Thread.__init__(self, name=_newname("Dummy-%d"), daemon=True)
# Thread.__block consumes an OS-level locking primitive, which
# can never be used by a _DummyThread. Since a _DummyThread
# instance is immortal, that's bad, so release this resource.
- del self._Thread__block
+ del self._Thread__block # type: ignore[attr-defined]
self._Thread__started = True
_active_limbo_lock.acquire()
@@ -710,7 +722,7 @@ class _DummyThread(Thread):
# Global API functions
-def current_thread():
+def current_thread() -> Thread:
try:
return _active[get_ident()]
except KeyError:
diff --git a/direct/src/task/Task.py b/direct/src/task/Task.py
index 9896b9c5ee..f879cbd542 100644
--- a/direct/src/task/Task.py
+++ b/direct/src/task/Task.py
@@ -28,7 +28,7 @@ if hasattr(sys, 'getandroidapilevel'):
signal = None
else:
try:
- import _signal as signal # type: ignore[import, no-redef]
+ import _signal as signal # type: ignore[import-not-found, no-redef]
except ImportError:
signal = None
diff --git a/direct/src/tkpanels/Inspector.py b/direct/src/tkpanels/Inspector.py
index 51e448f30d..5dbf79c1f9 100644
--- a/direct/src/tkpanels/Inspector.py
+++ b/direct/src/tkpanels/Inspector.py
@@ -48,7 +48,7 @@ def inspectorFor(anObject):
### initializing
-def initializeInspectorMap():
+def initializeInspectorMap() -> None:
global _InspectorMap
notFinishedTypes = ['BufferType', 'EllipsisType', 'FrameType', 'TracebackType', 'XRangeType']
diff --git a/direct/src/tkpanels/ParticlePanel.py b/direct/src/tkpanels/ParticlePanel.py
index 6d41ba808f..f17e9f022f 100644
--- a/direct/src/tkpanels/ParticlePanel.py
+++ b/direct/src/tkpanels/ParticlePanel.py
@@ -3,7 +3,7 @@
__all__ = ['ParticlePanel']
# Import Tkinter, Pmw, and the floater code from this directory tree.
-from panda3d.core import ColorBlendAttrib, Filename, Point2, Point3, Vec3, Vec4, getModelPath
+from panda3d.core import ColorBlendAttrib, ConfigVariableSearchPath, Filename, Point2, Point3, Vec3, Vec4, getModelPath
from panda3d.physics import (
BaseParticleEmitter,
BaseParticleRenderer,
@@ -36,7 +36,6 @@ from panda3d.physics import (
SpriteParticleRenderer,
TangentRingEmitter,
)
-from panda3d.direct import getParticlePath
from direct.tkwidgets.AppShell import AppShell
from direct.tkwidgets import Dial
from direct.tkwidgets import Floater
@@ -53,6 +52,10 @@ import os
import tkinter as tk
+particlePath = ConfigVariableSearchPath("particle-path",
+ "The directories to search for particle files to be loaded.")
+
+
class ParticlePanel(AppShell):
# Override class variables
appname = 'Particle Panel'
@@ -1275,7 +1278,7 @@ class ParticlePanel(AppShell):
def loadParticleEffectFromFile(self):
# Find path to particle directory
- pPath = getParticlePath()
+ pPath = particlePath
if pPath.getNumDirectories() > 0:
if repr(pPath.getDirectory(0)) == '.':
path = '.'
@@ -1303,7 +1306,7 @@ class ParticlePanel(AppShell):
def saveParticleEffectToFile(self):
# Find path to particle directory
- pPath = getParticlePath()
+ pPath = particlePath
if pPath.getNumDirectories() > 0:
if repr(pPath.getDirectory(0)) == '.':
path = '.'
@@ -2872,6 +2875,12 @@ class ParticlePanel(AppShell):
if type == 'FT_ONE_OVER_R_CUBED':
#f.setFalloffType(LinearDistanceForce.FTONEOVERRCUBED)
f.setFalloffType(2)
+ if type == 'FT_ONE_OVER_R_OVER_DISTANCE':
+ f.setFalloffType(3)
+ if type == 'FT_ONE_OVER_R_OVER_DISTANCE_SQUARED':
+ f.setFalloffType(4)
+ if type == 'FT_ONE_OVER_R_OVER_DISTANCE_CUBED':
+ f.setFalloffType(5)
def setForceCenter(vec, f = force):
f.setForceCenter(Point3(vec[0], vec[1], vec[2]))
@@ -2886,7 +2895,10 @@ class ParticlePanel(AppShell):
'Set force falloff type',
('FT_ONE_OVER_R',
'FT_ONE_OVER_R_SQUARED',
- 'FT_ONE_OVER_R_CUBED'),
+ 'FT_ONE_OVER_R_CUBED',
+ 'FT_ONE_OVER_R_OVER_DISTANCE',
+ 'FT_ONE_OVER_R_OVER_DISTANCE_SQUARED',
+ 'FT_ONE_OVER_R_OVER_DISTANCE_CUBED'),
command = setFalloffType)
self.getWidget(pageName, forceName + ' Falloff').configure(
label_width = 16)
@@ -2897,6 +2909,12 @@ class ParticlePanel(AppShell):
var.set('FT_ONE_OVER_R_SQUARED')
elif falloff == LinearDistanceForce.FTONEOVERRCUBED:
var.set('FT_ONE_OVER_R_CUBED')
+ elif falloff == LinearDistanceForce.FTONEOVERROVERDISTANCE:
+ var.set('FT_ONE_OVER_R_OVER_DISTANCE')
+ elif falloff == LinearDistanceForce.FTONEOVERROVERDISTANCESQUARED:
+ var.set('FT_ONE_OVER_R_OVER_DISTANCE_SQUARED')
+ elif falloff == LinearDistanceForce.FTONEOVERROVERDISTANCECUBED:
+ var.set('FT_ONE_OVER_R_OVER_DISTANCE_CUBED')
vec = force.getForceCenter()
self.createVector3Entry(frame, pageName, forceName + ' Center',
'Set center of force',
diff --git a/doc/ReleaseNotes b/doc/ReleaseNotes
index e5651145b7..d0769cd785 100644
--- a/doc/ReleaseNotes
+++ b/doc/ReleaseNotes
@@ -1,3 +1,32 @@
+----------------------- RELEASE 1.10.16 -----------------------
+
+This maintenance release fixes some minor defects and stability issues.
+
+* OpenAL: Support non-default coordinate systems when playing 3D audio
+* Tasks: Coroutine detect now also handles coroutine subclass to support Nuitka
+* Tasks: Now properly handles generators without send()
+* Windows: Fixes a hang when adjusting Z-order in some situations
+* Fix SparseArray methods get_lowest_off_bit() and get_lowest_on_bit()
+* Fix linecache error when distributing for newer Python versions
+* Fix `await AsyncFuture.gather()` returning first item instead of tuple (#1738)
+* Fix use-after-free in collision system with transform cache disabled (#1733)
+* Egg: Add limited forward compatibility for metallic-roughness textures
+* OpenGL: fix error blitting depth texture on macOS (#1719)
+* OpenGL: fix SSBO not being rebound if deleted and recreated immediately
+* OpenGL: fix SSBO support not being detected in certain situations
+* GLSL: Add p3d_MetallicRoughnessTexture input mapped to M_metallic_roughness
+* X11: Add config variable to enable detection of autorepeat key events (#1735)
+* GUI: Fix bug with PGSliderBar dragging (#1722)
+* Minor thread safety things for free-threaded Python builds
+* Add forward compatibility for bam version 6.46
+* Fixes a harmless buffer overflow in pdtoa
+* Fix compilation issues with SDL version of tinydisplay (#1708)
+* bam2egg: Fix issue when having more than two tags (#1725)
+* Fix "Detected leak for ... which interrogate cannot delete." error (#1743)
+* Fix PythonCallbackObject crash upon destruction in some cases
+* PStats: Fix crash when receiving frames out of order
+* PandaFramework::close_framework() now clears task manager of tasks
+
----------------------- RELEASE 1.10.15 -----------------------
This release adds support for Python 3.13, and fixes some significant bugs.
diff --git a/dtool/CompilerFlags.cmake b/dtool/CompilerFlags.cmake
index 31d96279e3..d50e5e2238 100644
--- a/dtool/CompilerFlags.cmake
+++ b/dtool/CompilerFlags.cmake
@@ -51,6 +51,16 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GCC")
endif()
+# AddressSanitizer
+if(ENABLE_ASAN)
+ if(CMAKE_CXX_COMPILER_ID MATCHES "(AppleClang|Clang|GNU)")
+ add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
+ add_link_options(-fsanitize=address)
+ else()
+ message(FATAL_ERROR "ENABLE_ASAN requires GCC or Clang")
+ endif()
+endif()
+
# Panda3D is now a C++14 project.
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
diff --git a/dtool/Config.cmake b/dtool/Config.cmake
index f3063d86ad..cfc2dbfca3 100644
--- a/dtool/Config.cmake
+++ b/dtool/Config.cmake
@@ -265,7 +265,7 @@ if(BUILD_INTERROGATE)
panda3d-interrogate
GIT_REPOSITORY https://github.com/panda3d/interrogate.git
- GIT_TAG 03418d6d7ddda7fb99abf27230aa42d1d8bd607e
+ GIT_TAG 7cf2550d2c8d95b8c268aa4bb0b5602e85a086dc
PREFIX ${_interrogate_dir}
CMAKE_ARGS
@@ -425,6 +425,14 @@ endif()
unset(_prefer_mimalloc)
+#
+# Sanitizers
+#
+
+option(ENABLE_ASAN
+ "Enable AddressSanitizer for detecting memory errors such as
+buffer overflows, use-after-free, etc. Requires GCC or Clang." OFF)
+
#
# This section relates to mobile-device/phone support and options
#
diff --git a/dtool/LocalSetup.cmake b/dtool/LocalSetup.cmake
index b92fb8614c..5ddea90f9a 100644
--- a/dtool/LocalSetup.cmake
+++ b/dtool/LocalSetup.cmake
@@ -133,6 +133,7 @@ check_include_file_cxx(dirent.h PHAVE_DIRENT_H)
check_include_file_cxx(ucontext.h PHAVE_UCONTEXT_H) #TODO doesn't work on OSX, use sys/ucontext.h
check_include_file_cxx(linux/input.h PHAVE_LINUX_INPUT_H)
check_include_file_cxx(stdint.h PHAVE_STDINT_H)
+check_include_file_cxx(execinfo.h PHAVE_EXECINFO_H)
# Do we have Posix threads?
#set(HAVE_POSIX_THREADS ${CMAKE_USE_PTHREADS_INIT})
diff --git a/dtool/src/dtoolbase/atomicAdjust.h b/dtool/src/dtoolbase/atomicAdjust.h
index 804224e5c3..014c4c4445 100644
--- a/dtool/src/dtoolbase/atomicAdjust.h
+++ b/dtool/src/dtoolbase/atomicAdjust.h
@@ -30,7 +30,7 @@ struct AtomicAdjust {
#include "atomicAdjustDummyImpl.h"
typedef AtomicAdjustDummyImpl AtomicAdjust;
-#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (defined(__clang__) && (__clang_major__ >= 3))
+#elif (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))) || (defined(__clang__) && (__clang_major__ >= 3) && !defined(WIN32_VC) )
// GCC 4.7 and above has built-in __atomic functions for atomic operations.
// Clang 3.0 and above also supports them.
diff --git a/dtool/src/dtoolbase/deletedBufferChain.cxx b/dtool/src/dtoolbase/deletedBufferChain.cxx
index 9821129254..13df8a8b71 100644
--- a/dtool/src/dtoolbase/deletedBufferChain.cxx
+++ b/dtool/src/dtoolbase/deletedBufferChain.cxx
@@ -88,7 +88,14 @@ allocate(size_t size, TypeHandle type_handle) {
return ptr;
#else // USE_DELETED_CHAIN
- return PANDA_MALLOC_SINGLE(_buffer_size);
+ void *ptr = PANDA_MALLOC_SINGLE(_buffer_size);
+
+#ifdef DO_MEMORY_USAGE
+ type_handle.inc_memory_usage(TypeHandle::MC_singleton, _buffer_size);
+#endif // DO_MEMORY_USAGE
+
+ return ptr;
+
#endif // USE_DELETED_CHAIN
}
@@ -133,6 +140,11 @@ deallocate(void *ptr, TypeHandle type_handle) {
_lock.unlock();
#else // USE_DELETED_CHAIN
+
+#ifdef DO_MEMORY_USAGE
+ type_handle.dec_memory_usage(TypeHandle::MC_singleton, _buffer_size);
+#endif // DO_MEMORY_USAGE
+
PANDA_FREE_SINGLE(ptr);
#endif // USE_DELETED_CHAIN
}
@@ -155,8 +167,9 @@ get_deleted_chain(size_t buffer_size) {
static MutexImpl lock;
lock.lock();
- static std::set deleted_chains;
- DeletedBufferChain *result = (DeletedBufferChain *)&*deleted_chains.insert(DeletedBufferChain(buffer_size)).first;
+ alignas(std::set) static char storage[sizeof(std::set)];
+ static auto *deleted_chains = new (storage) std::set;
+ DeletedBufferChain *result = (DeletedBufferChain *)&*deleted_chains->insert(DeletedBufferChain(buffer_size)).first;
lock.unlock();
return result;
}
diff --git a/dtool/src/dtoolbase/deletedChain.h b/dtool/src/dtoolbase/deletedChain.h
index a1b08a31bf..f418d4ee59 100644
--- a/dtool/src/dtoolbase/deletedChain.h
+++ b/dtool/src/dtoolbase/deletedChain.h
@@ -122,6 +122,50 @@ public:
#define ALLOC_DELETED_CHAIN_DEF(Type) \
DeletedChain< Type > Type::_deleted_chain;
+#elif defined(DO_MEMORY_USAGE)
+
+#define ALLOC_DELETED_CHAIN(Type) \
+ inline void *operator new(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT) { \
+ void *ptr = PANDA_MALLOC_SINGLE(size); \
+ get_type_handle(Type).inc_memory_usage(TypeHandle::MC_singleton, sizeof(Type)); \
+ return ptr; \
+ } \
+ inline void *operator new(size_t size, void *ptr) { \
+ (void) size; \
+ return ptr; \
+ } \
+ inline void operator delete(void *ptr) { \
+ if (ptr != nullptr) { \
+ get_type_handle(Type).dec_memory_usage(TypeHandle::MC_singleton, sizeof(Type)); \
+ PANDA_FREE_SINGLE(ptr); \
+ } \
+ } \
+ inline void operator delete(void *, void *) { \
+ } \
+ inline void *operator new[](size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT) { \
+ void *ptr = PANDA_MALLOC_SINGLE(size); \
+ get_type_handle(Type).inc_memory_usage(TypeHandle::MC_array, sizeof(Type)); \
+ return ptr; \
+ } \
+ inline void *operator new[](size_t size, void *ptr) { \
+ (void) size; \
+ return ptr; \
+ } \
+ inline void operator delete[](void *ptr) { \
+ if (ptr != nullptr) { \
+ get_type_handle(Type).dec_memory_usage(TypeHandle::MC_array, sizeof(Type)); \
+ PANDA_FREE_SINGLE(ptr); \
+ } \
+ } \
+ inline void operator delete[](void *, void *) { \
+ } \
+ inline static bool validate_ptr(const void *ptr) { \
+ return (ptr != nullptr); \
+ }
+
+#define ALLOC_DELETED_CHAIN_DECL(Type) ALLOC_DELETED_CHAIN(Type)
+#define ALLOC_DELETED_CHAIN_DEF(Type)
+
#else // USE_DELETED_CHAIN
#define ALLOC_DELETED_CHAIN(Type) \
diff --git a/dtool/src/dtoolbase/dtool_platform.h b/dtool/src/dtoolbase/dtool_platform.h
index dbfcb26556..dce9e989f3 100644
--- a/dtool/src/dtoolbase/dtool_platform.h
+++ b/dtool/src/dtoolbase/dtool_platform.h
@@ -96,6 +96,9 @@
#elif defined(__arm__)
#define DTOOL_PLATFORM "linux_arm"
+#elif defined(__riscv)
+#define DTOOL_PLATFORM "linux_riscv"
+
#elif defined(__ppc__)
#define DTOOL_PLATFORM "linux_ppc"
diff --git a/dtool/src/dtoolbase/memoryHook.cxx b/dtool/src/dtoolbase/memoryHook.cxx
index 37b36d8633..b2c51c06a0 100644
--- a/dtool/src/dtoolbase/memoryHook.cxx
+++ b/dtool/src/dtoolbase/memoryHook.cxx
@@ -618,6 +618,9 @@ determine_page_size() const {
_page_size = (size_t)sysinfo.dwPageSize;
+#elif defined(ANDROID)
+ _page_size = getpagesize();
+
#else
// Posix case.
_page_size = sysconf(_SC_PAGESIZE);
diff --git a/dtool/src/dtoolbase/patomic.I b/dtool/src/dtoolbase/patomic.I
index d1395c9e90..b679834713 100644
--- a/dtool/src/dtoolbase/patomic.I
+++ b/dtool/src/dtoolbase/patomic.I
@@ -454,6 +454,12 @@ patomic_notify_one(volatile uint32_t *value) {
#elif defined(_WIN32)
_patomic_wake_one_func((void *)value);
#elif defined(__APPLE__)
+#ifndef __arm64__
+ if (UNLIKELY(__ulock_wake == nullptr || __ulock_wait == nullptr)) {
+ _patomic_notify_all(value);
+ return;
+ }
+#endif
__ulock_wake(UL_COMPARE_AND_WAIT, (void *)value, 0);
#elif defined(HAVE_POSIX_THREADS)
_patomic_notify_all(value);
@@ -472,6 +478,12 @@ patomic_notify_all(volatile uint32_t *value) {
#elif defined(_WIN32)
_patomic_wake_all_func((void *)value);
#elif defined(__APPLE__)
+#ifndef __arm64__
+ if (UNLIKELY(__ulock_wake == nullptr || __ulock_wait == nullptr)) {
+ _patomic_notify_all(value);
+ return;
+ }
+#endif
__ulock_wake(UL_COMPARE_AND_WAIT | ULF_WAKE_ALL, (void *)value, 0);
#elif defined(HAVE_POSIX_THREADS)
_patomic_notify_all(value);
diff --git a/dtool/src/dtoolbase/patomic.cxx b/dtool/src/dtoolbase/patomic.cxx
index 1b939a58c6..26949e564a 100644
--- a/dtool/src/dtoolbase/patomic.cxx
+++ b/dtool/src/dtoolbase/patomic.cxx
@@ -125,7 +125,7 @@ initialize_wait(volatile VOID *addr, PVOID cmp, SIZE_T size, DWORD timeout) {
return emulated_wait(addr, cmp, size, timeout);
}
-#elif !defined(CPPPARSER) && !defined(__linux__) && !defined(__APPLE__) && defined(HAVE_POSIX_THREADS)
+#elif !defined(CPPPARSER) && !defined(__linux__) && (!defined(__APPLE__) || !defined(__arm64__)) && defined(HAVE_POSIX_THREADS)
// Same as above, but using pthreads.
struct alignas(64) WaitTableEntry {
diff --git a/dtool/src/dtoolbase/patomic.h b/dtool/src/dtoolbase/patomic.h
index 02d1ab6ebc..2b0fdaacc0 100644
--- a/dtool/src/dtoolbase/patomic.h
+++ b/dtool/src/dtoolbase/patomic.h
@@ -36,9 +36,6 @@
// Undocumented API, see https://outerproduct.net/futex-dictionary.html
#define UL_COMPARE_AND_WAIT 1
#define ULF_WAKE_ALL 0x00000100
-
-extern "C" int __ulock_wait(uint32_t op, void *addr, uint64_t value, uint32_t timeout);
-extern "C" int __ulock_wake(uint32_t op, void *addr, uint64_t wake_value);
#endif
#if defined(THREAD_DUMMY_IMPL) || defined(THREAD_SIMPLE_IMPL)
@@ -173,9 +170,17 @@ ALWAYS_INLINE void patomic_notify_all(volatile uint32_t *value);
EXPCL_DTOOL_DTOOLBASE extern BOOL (__stdcall *_patomic_wait_func)(volatile VOID *, PVOID, SIZE_T, DWORD);
EXPCL_DTOOL_DTOOLBASE extern void (__stdcall *_patomic_wake_one_func)(PVOID);
EXPCL_DTOOL_DTOOLBASE extern void (__stdcall *_patomic_wake_all_func)(PVOID);
-#elif !defined(__linux__) && !defined(__APPLE__) && defined(HAVE_POSIX_THREADS)
+#elif defined(__APPLE__) && defined(__arm64__)
+extern "C" int __ulock_wait(uint32_t op, void *addr, uint64_t value, uint32_t timeout);
+extern "C" int __ulock_wake(uint32_t op, void *addr, uint64_t wake_value);
+#elif !defined(__linux__) && defined(HAVE_POSIX_THREADS)
EXPCL_DTOOL_DTOOLBASE void _patomic_wait(const volatile uint32_t *value, uint32_t old);
EXPCL_DTOOL_DTOOLBASE void _patomic_notify_all(volatile uint32_t *value);
+#ifdef __APPLE__
+// Use conditionally since we can't count on support before 10.12.
+extern "C" int __ulock_wait(uint32_t op, void *addr, uint64_t value, uint32_t timeout) __attribute__((weak_import));
+extern "C" int __ulock_wake(uint32_t op, void *addr, uint64_t wake_value) __attribute__((weak_import));
+#endif
#endif
#include "patomic.I"
diff --git a/dtool/src/dtoolbase/pdtoa.cxx b/dtool/src/dtoolbase/pdtoa.cxx
index 552391a6fc..ce47acb339 100644
--- a/dtool/src/dtoolbase/pdtoa.cxx
+++ b/dtool/src/dtoolbase/pdtoa.cxx
@@ -252,7 +252,7 @@ inline static unsigned CountDecimalDigit32(uint32_t n) {
}
inline static void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) {
- static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 0, 0, 0, 0, 0 };
+ static const uint32_t kPow10[] = { 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000, 0, 0, 0, 0, 0, 0 };
const DiyFp one(uint64_t(1) << -Mp.e, Mp.e);
const DiyFp wp_w = Mp - W;
uint32_t p1 = static_cast(Mp.f >> -one.e);
diff --git a/dtool/src/dtoolbase/pvector.h b/dtool/src/dtoolbase/pvector.h
index be60897d21..edd6cca579 100644
--- a/dtool/src/dtoolbase/pvector.h
+++ b/dtool/src/dtoolbase/pvector.h
@@ -46,13 +46,16 @@ public:
typedef std::vector base_class;
typedef typename base_class::size_type size_type;
- explicit pvector(TypeHandle type_handle = pvector_type_handle) : base_class(allocator(type_handle)) { }
+ pvector() : base_class(allocator(get_type_handle(pvector))) { }
+ explicit pvector(TypeHandle type_handle) : base_class(allocator(type_handle)) { }
pvector(const pvector ©) : base_class(copy) { }
pvector(pvector &&from) noexcept : base_class(std::move(from)) {};
- explicit pvector(size_type n, TypeHandle type_handle = pvector_type_handle) : base_class(n, Type(), allocator(type_handle)) { }
- explicit pvector(size_type n, const Type &value, TypeHandle type_handle = pvector_type_handle) : base_class(n, value, allocator(type_handle)) { }
- pvector(const Type *begin, const Type *end, TypeHandle type_handle = pvector_type_handle) : base_class(begin, end, allocator(type_handle)) { }
- pvector(std::initializer_list init, TypeHandle type_handle = pvector_type_handle) : base_class(std::move(init), allocator(type_handle)) { }
+ explicit pvector(size_type n, TypeHandle type_handle = get_type_handle(pvector)) : base_class(n, Type(), allocator(type_handle)) { }
+ explicit pvector(size_type n, const Type &value, TypeHandle type_handle = get_type_handle(pvector)) : base_class(n, value, allocator(type_handle)) { }
+ pvector(const Type *begin, const Type *end, TypeHandle type_handle = get_type_handle(pvector)) : base_class(allocator(type_handle)) {
+ this->insert(this->end(), begin, end);
+ }
+ pvector(std::initializer_list init, TypeHandle type_handle = get_type_handle(pvector)) : base_class(std::move(init), allocator(type_handle)) { }
pvector &operator =(const pvector ©) {
base_class::operator =(copy);
diff --git a/dtool/src/dtoolbase/register_type.cxx b/dtool/src/dtoolbase/register_type.cxx
index b67475e4f6..649c4ebe11 100644
--- a/dtool/src/dtoolbase/register_type.cxx
+++ b/dtool/src/dtoolbase/register_type.cxx
@@ -26,6 +26,7 @@ TypeHandle double_type_handle;
TypeHandle float_type_handle;
TypeHandle string_type_handle;
TypeHandle wstring_type_handle;
+TypeHandle vector_uchar_type_handle;
TypeHandle long_p_type_handle;
TypeHandle int_p_type_handle;
@@ -59,6 +60,7 @@ void init_system_type_handles() {
register_type(float_type_handle, "float");
register_type(string_type_handle, "string");
register_type(wstring_type_handle, "wstring");
+ register_type(vector_uchar_type_handle, "vector_uchar");
register_type(int_p_type_handle, "int*");
register_type(short_p_type_handle, "short*");
diff --git a/dtool/src/dtoolbase/register_type.h b/dtool/src/dtoolbase/register_type.h
index a15cc9ddb1..95b2c48548 100644
--- a/dtool/src/dtoolbase/register_type.h
+++ b/dtool/src/dtoolbase/register_type.h
@@ -19,6 +19,9 @@
#include "typeHandle.h"
#include "typeRegistry.h"
+template
+class pvector;
+
/**
* This inline function is just a convenient way to call
* TypeRegistry::register_type(), along with zero to four
@@ -88,6 +91,7 @@ extern TypeHandle EXPCL_DTOOL_DTOOLBASE double_type_handle;
extern TypeHandle EXPCL_DTOOL_DTOOLBASE float_type_handle;
extern TypeHandle EXPCL_DTOOL_DTOOLBASE string_type_handle;
extern TypeHandle EXPCL_DTOOL_DTOOLBASE wstring_type_handle;
+extern TypeHandle EXPCL_DTOOL_DTOOLBASE vector_uchar_type_handle;
extern TypeHandle long_p_type_handle;
extern TypeHandle int_p_type_handle;
@@ -175,6 +179,16 @@ INLINE TypeHandle _get_type_handle(const std::wstring *) {
return wstring_type_handle;
}
+template
+INLINE TypeHandle _get_type_handle(const pvector *) {
+ return pvector_type_handle;
+}
+
+template<>
+INLINE TypeHandle _get_type_handle(const pvector *) {
+ return vector_uchar_type_handle;
+}
+
template<>
INLINE TypeHandle _get_type_handle(const long * const *) {
return long_p_type_handle;
diff --git a/dtool/src/dtoolutil/CMakeLists.txt b/dtool/src/dtoolutil/CMakeLists.txt
index 5885534178..fdab210e14 100644
--- a/dtool/src/dtoolutil/CMakeLists.txt
+++ b/dtool/src/dtoolutil/CMakeLists.txt
@@ -69,6 +69,8 @@ set(P3DTOOLUTIL_IGATEEXT
globPattern_ext.h
iostream_ext.cxx
iostream_ext.h
+ pyenv_init.cxx
+ pyenv_init.h
textEncoder_ext.cxx
textEncoder_ext.h
)
diff --git a/dtool/src/dtoolutil/console_preamble.js b/dtool/src/dtoolutil/console_preamble.js
new file mode 100644
index 0000000000..151f5c1e03
--- /dev/null
+++ b/dtool/src/dtoolutil/console_preamble.js
@@ -0,0 +1,50 @@
+/**
+ * PANDA 3D SOFTWARE
+ * Copyright (c) Carnegie Mellon University. All rights reserved.
+ *
+ * All use of this software is subject to the terms of the revised BSD
+ * license. You should have received a copy of this license along
+ * with this source code in a file named "LICENSE."
+ *
+ * @file console_preamble.js
+ * @author rdb
+ * @date 2025-02-03
+ */
+
+if (ENVIRONMENT_IS_NODE) {
+ Module["preInit"] = Module["preInit"] || [];
+ Module["preInit"].push(function() {
+ if (typeof process === "object" && typeof process.env === "object") {
+ // These are made up by emscripten if we don't set them to undefined
+ ENV['USER'] = undefined;
+ ENV['LOGNAME'] = undefined;
+ ENV['PATH'] = undefined;
+ ENV['PWD'] = undefined;
+ ENV['HOME'] = undefined;
+ ENV['LANG'] = undefined;
+ ENV['_'] = undefined;
+ for (var variable in process.env) {
+ ENV[variable] = process.env[variable];
+ }
+ }
+
+ addOnPreMain(function preloadNodeEnv() {
+ var sp = stackSave();
+ var set_binary_name = wasmExports["_set_binary_name"];
+ if (set_binary_name && typeof __filename === "string") {
+ set_binary_name(stringToUTF8OnStack(__filename));
+ }
+
+ var set_env_var = wasmExports["_set_env_var"];
+ if (set_env_var) {
+ for (var variable in ENV) {
+ var value = ENV[variable];
+ if (value !== undefined) {
+ set_env_var(stringToUTF8OnStack(variable), stringToUTF8OnStack(value));
+ }
+ }
+ }
+ stackRestore(sp);
+ });
+ });
+}
diff --git a/dtool/src/dtoolutil/executionEnvironment.cxx b/dtool/src/dtoolutil/executionEnvironment.cxx
index 71083fa7ab..371a211612 100644
--- a/dtool/src/dtoolutil/executionEnvironment.cxx
+++ b/dtool/src/dtoolutil/executionEnvironment.cxx
@@ -125,12 +125,18 @@ static const char *const libp3dtool_filenames[] = {
#if defined(__EMSCRIPTEN__) && !defined(CPPPARSER)
extern "C" void EMSCRIPTEN_KEEPALIVE
-_set_env_var(ExecutionEnvironment *ptr, const char *var, const char *value) {
+_set_env_var(const char *var, const char *value) {
+ ExecutionEnvironment *ptr = ExecutionEnvironment::get_ptr();
ptr->_variables[std::string(var)] = std::string(value);
}
+
+extern "C" void EMSCRIPTEN_KEEPALIVE
+_set_binary_name(const char *path) {
+ ExecutionEnvironment::set_binary_name(std::string(path));
+}
#endif
-// Linux with GNU libc does have global argvargc variables, but we can't
+// Linux with GNU libc does have global argv/argc variables, but we can't
// safely access them at stat init time--at least, not in libc5. (It does seem
// to work with glibc2, however.)
@@ -584,17 +590,10 @@ read_environment_variables() {
}
}
#elif defined(__EMSCRIPTEN__)
- // We only have environment variables if we're running in node.js.
-#ifndef CPPPARSER
- EM_ASM({
- if (typeof process === 'object' && typeof process.env === 'object') {
- for (var variable in process.env) {
- __set_env_var($0, stringToUTF8OnStack(variable),
- stringToUTF8OnStack(process.env[variable]));
- }
- }
- }, this);
-#endif
+ // The environment variables get loaded in by the .js file before main()
+ // using the _set_env_var exported function, defined above. Trying to load
+ // env vars at static init time otherwise makes some optimizations more
+ // difficult, notably wasm-ctor-eval/wizer.
#elif defined(HAVE_PROC_SELF_ENVIRON)
// In some cases, we may have a file called procselfenviron that may be read
diff --git a/dtool/src/dtoolutil/executionEnvironment.h b/dtool/src/dtoolutil/executionEnvironment.h
index e54f87c40f..ddb83fcecc 100644
--- a/dtool/src/dtoolutil/executionEnvironment.h
+++ b/dtool/src/dtoolutil/executionEnvironment.h
@@ -22,10 +22,10 @@
#include