added a new test map, migrated the project to bevy_game_template by NiklasEi, enabled gitea actions, added some more resources
|
|
@ -1,3 +0,0 @@
|
|||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = ["-Clink-arg=-fuse-ld=mold"]
|
||||
74
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
name: CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.toml') }}
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install alsa and udev
|
||||
run: apt-get update; apt-get install --no-install-recommends -y libasound2-dev libudev-dev
|
||||
if: runner.os == 'linux'
|
||||
- name: Build & run tests
|
||||
run: cargo test
|
||||
all-doc-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ubuntu-latest-cargo-all-doc-tests-${{ hashFiles('**/Cargo.toml') }}
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install alsa and udev
|
||||
run: apt-get update; apt-get install --no-install-recommends -y libasound2-dev libudev-dev
|
||||
- name: Run doc tests with all features (this also compiles README examples)
|
||||
run: cargo test --doc --all-features
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ubuntu-latest-cargo-lint-${{ hashFiles('**/Cargo.toml') }}
|
||||
- uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
components: rustfmt, clippy
|
||||
- name: Install alsa and udev
|
||||
run: apt-get update; apt-get install --no-install-recommends -y libasound2-dev libudev-dev
|
||||
- name: Run clippy
|
||||
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
|
||||
- name: Check format
|
||||
run: cargo fmt --all -- --check
|
||||
40
.github/workflows/deploy-page.yaml
vendored
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
name: deploy-github-page
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-web:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev
|
||||
- name: Install trunk
|
||||
uses: jetli/trunk-action@v0.4.0
|
||||
with:
|
||||
version: 'latest'
|
||||
- name: Add wasm target
|
||||
run: |
|
||||
rustup target add wasm32-unknown-unknown
|
||||
- name: Build Release
|
||||
run: |
|
||||
trunk build --release
|
||||
- name: optimize Wasm
|
||||
uses: NiklasEi/wasm-opt-action@v2
|
||||
with:
|
||||
file: dist/*.wasm
|
||||
- name: Deploy to GitHub Pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4.2.5
|
||||
with:
|
||||
branch: gitea-pages
|
||||
folder: dist
|
||||
76
.github/workflows/release-android-google-play.yaml
vendored
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
# For setup instructions regarding this workflow, see https://www.nikl.me/blog/2023/github_workflow_to_publish_android_app/
|
||||
|
||||
name: release-android-google-play
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'GitHub Release'
|
||||
required: true
|
||||
type: string
|
||||
play_release:
|
||||
description: 'Release name from google play console'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# ToDo: adapt names
|
||||
env:
|
||||
# used for uploading the app to a GitHub release
|
||||
GAME_EXECUTABLE_NAME: ttt-ce
|
||||
BUNDLE_PATH: "target/x/release/android/mobile.aab"
|
||||
PACKAGE_NAME: "com.opencodebox.tttce"
|
||||
# release track; you can promote a build to "higher" tracks in the play console or publish to a different track directly
|
||||
# see track at https://github.com/r0adkll/upload-google-play#inputs for more options
|
||||
TRACK: internal
|
||||
MOBILE_DIRECTORY: mobile
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
bundle-sign-release:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev lld llvm
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Add Android targets
|
||||
run: rustup target add aarch64-linux-android armv7-linux-androideabi
|
||||
- name: Install cargo-binstall
|
||||
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
- name: Install xbuild
|
||||
run: cargo binstall --git https://github.com/NiklasEi/xbuild --bin-dir x xbuild -y
|
||||
- name: Build app bundle
|
||||
run: |
|
||||
cd ${{ env.MOBILE_DIRECTORY }}
|
||||
x doctor
|
||||
x build --release --platform android --store play
|
||||
- name: sign app bundle
|
||||
run: |
|
||||
KEYSTORE_PATH=${{ runner.temp }}/upload-keystore.jks
|
||||
echo -n "${{ secrets.PLAYSTORE_KEYSTORE }}" | base64 --decode > $KEYSTORE_PATH
|
||||
jarsigner -verbose -sigalg SHA256withRSA -digestalg SHA-256 -keystore $KEYSTORE_PATH -storepass "${{ secrets.PLAYSTORE_KEYSTORE_PASSWORD }}" ${{ env.BUNDLE_PATH }} upload
|
||||
- name: Upload self-signed bundle to GitHub
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.BUNDLE_PATH }}
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ inputs.version }}_android.aab
|
||||
release_name: ${{ inputs.version }}
|
||||
tag: ${{ inputs.version }}
|
||||
overwrite: true
|
||||
- name: prepare Google play store secrets
|
||||
run: |
|
||||
SERVICE_ACCOUNT=${{ runner.temp }}/service-account.json
|
||||
echo -n "${{ secrets.PLAYSTORE_SERVICE_ACCOUNT }}" | base64 --decode > $SERVICE_ACCOUNT
|
||||
- name: upload bundle to Google play store
|
||||
uses: r0adkll/upload-google-play@v1
|
||||
with:
|
||||
serviceAccountJson: ${{ runner.temp }}/service-account.json
|
||||
packageName: ${{ env.PACKAGE_NAME }}
|
||||
releaseName: ${{ inputs.play_release }}
|
||||
releaseFiles: ${{ env.BUNDLE_PATH }}
|
||||
track: ${{ env.TRACK }}
|
||||
98
.github/workflows/release-ios-testflight.yaml
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
name: release-ios-testflight
|
||||
|
||||
# This workflow builds, archives, exports, validates and uploads your ios app.
|
||||
# The version from input is only used for artifact names and as the release to upload the final ipa to.
|
||||
# Bump the versions in `mobile/ios-src/Info.plist` to change the version of your app bundle.
|
||||
|
||||
# Special setup and Apple Developer Program membership (99$/year) is required for this workflow!
|
||||
|
||||
# For setup instructions, see https://www.nikl.me/blog/2023/github_workflow_to_publish_ios_app/
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version - in the form of v1.2.3'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# ToDo: adapt names
|
||||
env:
|
||||
# used for uploading the app to a GitHub release
|
||||
GAME_EXECUTABLE_NAME: ttt-ce
|
||||
XCODE_PROJECT: mobile
|
||||
MOBILE_DIRECTORY: mobile
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-for-iOS:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Add iOS targets
|
||||
run: rustup target add aarch64-apple-ios
|
||||
- name: Install the Apple certificate and provisioning profile
|
||||
id: profile
|
||||
env:
|
||||
IOS_CERTIFICATE: ${{ secrets.IOS_CERTIFICATE }}
|
||||
IOS_CERTIFICATE_PASSWORD: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
|
||||
IOS_PROVISION_PROFILE: ${{ secrets.IOS_PROVISION_PROFILE }}
|
||||
IOS_KEYCHAIN_PASSWORD: ${{ secrets.IOS_KEYCHAIN_PASSWORD }}
|
||||
run: |
|
||||
# create variables
|
||||
CERTIFICATE_PATH=${{ runner.temp }}/build_certificate.p12
|
||||
PP_PATH=${{ runner.temp }}/profile.mobileprovision
|
||||
KEYCHAIN_PATH=${{ runner.temp }}/app-signing.keychain-db
|
||||
|
||||
# import certificate and provisioning profile from secrets
|
||||
echo -n "$IOS_CERTIFICATE" | base64 --decode -o $CERTIFICATE_PATH
|
||||
echo -n "$IOS_PROVISION_PROFILE" | base64 --decode -o $PP_PATH
|
||||
uuid=`grep UUID -A1 -a $PP_PATH | grep -io "[-A-F0-9]\{36\}"`
|
||||
echo "uuid=$uuid" >> $GITHUB_OUTPUT
|
||||
|
||||
# create temporary keychain
|
||||
security create-keychain -p "$IOS_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
security set-keychain-settings -lut 21600 $KEYCHAIN_PATH
|
||||
security unlock-keychain -p "$IOS_KEYCHAIN_PASSWORD" $KEYCHAIN_PATH
|
||||
|
||||
# import certificate to keychain
|
||||
security import $CERTIFICATE_PATH -P "$IOS_CERTIFICATE_PASSWORD" -A -t cert -f pkcs12 -k $KEYCHAIN_PATH
|
||||
security list-keychain -d user -s $KEYCHAIN_PATH
|
||||
|
||||
# apply provisioning profile
|
||||
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
|
||||
cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles/$uuid.mobileprovision
|
||||
- name: Build app for iOS
|
||||
run: |
|
||||
cd ${{ env.MOBILE_DIRECTORY }}
|
||||
xcodebuild PROVISIONING_PROFILE=${{ steps.profile.outputs.uuid }} -scheme ${{ env.XCODE_PROJECT }} clean archive -archivePath "Actions" -configuration Release -arch arm64
|
||||
- name: export ipa
|
||||
env:
|
||||
EXPORT_PLIST: ${{ secrets.IOS_EXPORT_PRODUCTION }}
|
||||
run: |
|
||||
EXPORT_PLIST_PATH=${{ runner.temp }}/ExportOptions.plist
|
||||
echo -n "$EXPORT_PLIST" | base64 --decode --output $EXPORT_PLIST_PATH
|
||||
xcodebuild PROVISIONING_PROFILE=${{ steps.profile.outputs.uuid }} -exportArchive -archivePath ${{ env.MOBILE_DIRECTORY }}/Actions.xcarchive -exportOptionsPlist $EXPORT_PLIST_PATH -exportPath ${{ runner.temp }}/export
|
||||
- name: decode API key
|
||||
env:
|
||||
API_KEY_BASE64: ${{ secrets.IOS_APPSTORE_API_PRIVATE_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/private_keys
|
||||
echo -n "$API_KEY_BASE64" | base64 --decode --output ~/private_keys/AuthKey_${{ secrets.IOS_APPSTORE_API_KEY_ID }}.p8
|
||||
- name: Upload to testflight
|
||||
run: |
|
||||
xcrun altool --validate-app -f ${{ runner.temp }}/export/${{ env.XCODE_PROJECT }}.ipa -t ios --apiKey ${{ secrets.IOS_APPSTORE_API_KEY_ID }} --apiIssuer ${{ secrets.IOS_APPSTORE_ISSUER_ID }}
|
||||
xcrun altool --upload-app -f ${{ runner.temp }}/export/${{ env.XCODE_PROJECT }}.ipa -t ios --apiKey ${{ secrets.IOS_APPSTORE_API_KEY_ID }} --apiIssuer ${{ secrets.IOS_APPSTORE_ISSUER_ID }}
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ runner.temp }}/export/${{ env.XCODE_PROJECT }}.ipa
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ inputs.version }}_ios.ipa
|
||||
release_name: ${{ inputs.version }}
|
||||
tag: ${{ inputs.version }}
|
||||
overwrite: true
|
||||
268
.github/workflows/release.yaml
vendored
Normal file
|
|
@ -0,0 +1,268 @@
|
|||
name: release-flow
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version - in the form of v1.2.3'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# ToDo: adapt names
|
||||
env:
|
||||
# This variable is used to name release output files.
|
||||
GAME_EXECUTABLE_NAME: ttt-ce
|
||||
GAME_OSX_APP_NAME: TTTCE
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
get-version:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Get tag
|
||||
id: tag
|
||||
run: echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
|
||||
outputs:
|
||||
version: ${{ inputs.version || steps.tag.outputs.tag }}
|
||||
|
||||
build-macOS:
|
||||
runs-on: macos-latest
|
||||
needs: get-version
|
||||
env:
|
||||
# macOS 11.0 Big Sur is the first version to support universal binaries
|
||||
MACOSX_DEPLOYMENT_TARGET: 11.0
|
||||
VERSION: ${{needs.get-version.outputs.version}}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Remove build script
|
||||
run: |
|
||||
rm build.rs
|
||||
- name: Install rust toolchain for Apple Silicon
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: aarch64-apple-darwin
|
||||
- name: Build release for Apple Silicon
|
||||
run: |
|
||||
SDKROOT=$(xcrun -sdk macosx --show-sdk-path) cargo build --profile dist --target=aarch64-apple-darwin
|
||||
- name: Install rust toolchain for Apple x86
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
targets: x86_64-apple-darwin
|
||||
- name: Build release for x86 Apple
|
||||
run: |
|
||||
SDKROOT=$(xcrun -sdk macosx --show-sdk-path) cargo build --profile dist --target=x86_64-apple-darwin
|
||||
- name: Create Universal Binary
|
||||
run: |
|
||||
lipo -create -output target/dist/${{ env.GAME_EXECUTABLE_NAME }} target/aarch64-apple-darwin/dist/${{ env.GAME_EXECUTABLE_NAME }} target/x86_64-apple-darwin/dist/${{ env.GAME_EXECUTABLE_NAME }}
|
||||
- name: Create release
|
||||
run: |
|
||||
mkdir -p build/macos/src/Game.app/Contents/MacOS/assets
|
||||
cp -r assets/ build/macos/src/Game.app/Contents/MacOS/assets
|
||||
cp -r credits/ build/macos/src/Game.app/Contents/MacOS/credits
|
||||
cp target/dist/${{ env.GAME_EXECUTABLE_NAME }} build/macos/src/Game.app/Contents/MacOS/
|
||||
mv build/macos/src/Game.app build/macos/src/${{ env.GAME_OSX_APP_NAME }}.app
|
||||
ln -s /Applications build/macos/src/
|
||||
hdiutil create -fs HFS+ -volname "${{ env.GAME_OSX_APP_NAME }}" -srcfolder build/macos/src ${{ env.GAME_EXECUTABLE_NAME }}.dmg
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.GAME_EXECUTABLE_NAME }}.dmg
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_macOS.dmg
|
||||
release_name: ${{ env.VERSION }}
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-latest
|
||||
needs: get-version
|
||||
env:
|
||||
VERSION: ${{needs.get-version.outputs.version}}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev
|
||||
- name: Build release
|
||||
run: |
|
||||
cargo build --profile dist
|
||||
- name: Prepare release
|
||||
run: |
|
||||
chmod +x target/dist/${{ env.GAME_EXECUTABLE_NAME }}
|
||||
mv target/dist/${{ env.GAME_EXECUTABLE_NAME }} .
|
||||
- name: Bundle release
|
||||
run: |
|
||||
tar -czf ${{ env.GAME_EXECUTABLE_NAME }}_linux.tar.gz ${{ env.GAME_EXECUTABLE_NAME }} assets credits
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.GAME_EXECUTABLE_NAME }}_linux.tar.gz
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_linux.tar.gz
|
||||
release_name: ${{ env.VERSION }}
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
needs: get-version
|
||||
env:
|
||||
VERSION: ${{needs.get-version.outputs.version}}
|
||||
BUILD_INSTALLER: ${{ false }}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install dotnet
|
||||
if: ${{ env.BUILD_INSTALLER }}
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
global-json-file: build/windows/installer/global.json
|
||||
- name: Build release
|
||||
run: |
|
||||
cargo build --profile dist
|
||||
- name: Prepare release
|
||||
run: |
|
||||
mkdir target/dist/assets && cp -r assets target/dist/assets
|
||||
mkdir target/dist/credits && cp -r credits target/dist/credits
|
||||
- name: Zip release
|
||||
uses: vimtor/action-zip@v1.1
|
||||
with:
|
||||
files: target/dist/assets/ target/dist/credits/ target/dist/${{ env.GAME_EXECUTABLE_NAME }}.exe
|
||||
dest: ${{ env.GAME_EXECUTABLE_NAME }}_windows.zip
|
||||
- name: Create Installer
|
||||
if: ${{ env.BUILD_INSTALLER }}
|
||||
run: dotnet build -p:Version=${{ env.VERSION }} -c Release build/windows/installer/Installer.wixproj --output installer
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.GAME_EXECUTABLE_NAME }}_windows.zip
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_windows.zip
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
- name: Upload installer
|
||||
if: ${{ env.BUILD_INSTALLER }}
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: installer/en-US/installer.msi
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_windows.msi
|
||||
release_name: ${{ env.VERSION }}
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
|
||||
build-web:
|
||||
runs-on: ubuntu-latest
|
||||
needs: get-version
|
||||
env:
|
||||
VERSION: ${{needs.get-version.outputs.version}}
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
- name: Install rust toolchain
|
||||
uses: dtolnay/rust-toolchain@master
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Install Dependencies
|
||||
run: sudo apt-get update; sudo apt-get install pkg-config libx11-dev libasound2-dev libudev-dev
|
||||
- name: Install trunk
|
||||
uses: jetli/trunk-action@v0.4.0
|
||||
with:
|
||||
version: latest
|
||||
- name: Add wasm target
|
||||
run: |
|
||||
rustup target add wasm32-unknown-unknown
|
||||
- name: Build Release
|
||||
run: |
|
||||
trunk build --release
|
||||
- name: Optimize Wasm
|
||||
uses: NiklasEi/wasm-opt-action@v2
|
||||
with:
|
||||
file: dist/*.wasm
|
||||
- name: Zip release
|
||||
uses: vimtor/action-zip@v1.1
|
||||
with:
|
||||
files: dist/
|
||||
dest: ${{ env.GAME_EXECUTABLE_NAME }}_web.zip
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: ${{ env.GAME_EXECUTABLE_NAME }}_web.zip
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_web.zip
|
||||
release_name: ${{ env.VERSION }}
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
|
||||
build-for-iOS:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
needs: get-version
|
||||
env:
|
||||
VERSION: ${{needs.get-version.outputs.version}}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Add iOS targets
|
||||
run: rustup target add aarch64-apple-ios x86_64-apple-ios
|
||||
- name: Build app for iOS
|
||||
run: |
|
||||
cd mobile
|
||||
make xcodebuild-iphone-release
|
||||
mkdir Payload
|
||||
mv build/Build/Products/Release-iphoneos/*.app Payload
|
||||
zip -r ${{ env.GAME_EXECUTABLE_NAME }}.zip Payload
|
||||
mv ${{ env.GAME_EXECUTABLE_NAME }}.zip ${{ env.GAME_EXECUTABLE_NAME }}.ipa
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: mobile/${{ env.GAME_EXECUTABLE_NAME }}.ipa
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_unsigned_ios.ipa
|
||||
release_name: ${{ env.VERSION }}
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
|
||||
build-for-Android:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
needs: get-version
|
||||
env:
|
||||
VERSION: ${{needs.get-version.outputs.version}}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Add Android targets
|
||||
# could add more targets like armv7-linux-androideabi here (then also add to cargo-apk config)
|
||||
run: rustup target add aarch64-linux-android
|
||||
- name: Install Cargo APK
|
||||
run: cargo install --force cargo-apk
|
||||
- name: Build app for Android
|
||||
# This uses a debug build, since release builds require keystore configuration
|
||||
# For AAB builds that can be pushed to the Play store, see the release-android-google-play workflow.
|
||||
run: ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME cargo apk build --package mobile
|
||||
- name: Upload release
|
||||
uses: svenstaro/upload-release-action@v2
|
||||
with:
|
||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
file: target/debug/apk/${{ env.GAME_OSX_APP_NAME }}.apk
|
||||
asset_name: ${{ env.GAME_EXECUTABLE_NAME }}_${{ env.VERSION }}_android.apk
|
||||
release_name: ${{ env.VERSION }}
|
||||
tag: ${{ env.VERSION }}
|
||||
overwrite: true
|
||||
6
.gitignore
vendored
|
|
@ -1 +1,5 @@
|
|||
/target
|
||||
target/
|
||||
.idea/
|
||||
.DS_Store
|
||||
|
||||
dist/
|
||||
|
|
|
|||
77
.vscode/launch.json
vendored
|
|
@ -1,25 +1,76 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
// this config bypasses waiting for debugger attachment, increasing speed
|
||||
{
|
||||
"name": "Quick Launch (nix-shell)",
|
||||
"type": "node-terminal",
|
||||
"request": "launch",
|
||||
"command": "nix-shell --run 'cargo run --features dev'",
|
||||
},
|
||||
{
|
||||
"command": "steam-run ./target/debug/ttt-ce",
|
||||
"name": "Run program",
|
||||
"name": "Run compiled (steam-run)",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
},
|
||||
{
|
||||
"command": "nix-shell --run 'cargo run'",
|
||||
"name": "Build and Run program",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
},
|
||||
{
|
||||
"command": "nix-shell --run 'cargo run --features bevy/dynamic_linking'",
|
||||
"name": "Mold build and run program",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
},
|
||||
|
||||
"name": "Debug",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=ttt-ce",
|
||||
"--package=ttt-ce",
|
||||
"--features",
|
||||
"dev"
|
||||
],
|
||||
"compounds": []
|
||||
"filter": {
|
||||
"name": "ttt-ce",
|
||||
"kind": "bin"
|
||||
},
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
|
||||
},
|
||||
"linux": {
|
||||
"env": {
|
||||
// platform-specific launch config overwrites (rather than merges with) existing config, so need to specify CARGO_MANIFEST_DIR again
|
||||
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
|
||||
"LD_LIBRARY_PATH": "${env:LD_LIBRARY_PATH}:${workspaceFolder}/target/debug:${env:HOME}/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:${env:HOME}/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug unit tests",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"test",
|
||||
"--no-run",
|
||||
"--bin=ttt-ce",
|
||||
"--package=ttt-ce",
|
||||
"--features",
|
||||
"dev"
|
||||
],
|
||||
"filter": {
|
||||
"name": "ttt-ce",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": {
|
||||
"CARGO_MANIFEST_DIR": "${workspaceFolder}",
|
||||
"LD_LIBRARY_PATH": "${env:LD_LIBRARY_PATH}:${workspaceFolder}/target/debug:${env:HOME}/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib:${env:HOME}/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
16
.vscode/tasks.json
vendored
|
|
@ -4,7 +4,21 @@
|
|||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "nix-shell-cargo-build",
|
||||
"label": "nix-shell-cargo-build-dev",
|
||||
"type": "shell",
|
||||
"command": "nix-shell",
|
||||
"args": [
|
||||
"--run",
|
||||
"cargo build --features dev"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"problemMatcher": []
|
||||
},
|
||||
{
|
||||
"label": "nix-shell-cargo-build-release",
|
||||
"type": "shell",
|
||||
"command": "nix-shell",
|
||||
"args": [
|
||||
|
|
|
|||
100
Bevy-template-README.md
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
# A Bevy game template
|
||||
|
||||
Template for a Game using the awesome [Bevy engine][bevy] featuring out of the box builds for Windows, Linux, macOS, Web (Wasm), Android, and iOS.
|
||||
|
||||
# What does this template give you?
|
||||
|
||||
* small example ["game"](https://niklasei.github.io/ttt-ce_template/)
|
||||
* easy setup for running the web build using [trunk] (`trunk serve`)
|
||||
* run the native version with `cargo run`
|
||||
* workflow for GitHub actions creating releases for Windows, Linux, macOS, and Web (Wasm) ready for distribution
|
||||
* the same workflow creates development builds for the mobile platforms (two separate workflows can push to the stores after [some setup](#deploy-mobile-platforms))
|
||||
* push a tag in the form of `v[0-9]+.[0-9]+.[0-9]+*` (e.g. `v1.1.42`) to trigger the flow
|
||||
* WARNING: if you work in a private repository, please be aware that macOS and Windows runners cost more build minutes. **For public repositories the builds are free!**
|
||||
|
||||
# How to use this template?
|
||||
|
||||
1. Click "Use this template" on the repository's page
|
||||
2. Look for `ToDo` to use your own game name everywhere
|
||||
3. [Update the icons as described below](#updating-the-icons)
|
||||
4. Start coding :tada:
|
||||
* Start the native app: `cargo run`
|
||||
* Start the web build: `trunk serve`
|
||||
* requires [trunk]: `cargo install --locked trunk`
|
||||
* requires `wasm32-unknown-unknown` target: `rustup target add wasm32-unknown-unknown`
|
||||
* this will serve your app on `8080` and automatically rebuild + reload it after code changes
|
||||
* Start the android app: `cargo apk run -p mobile`
|
||||
* requires following the instructions in the [bevy example readme for android setup][android-instructions]
|
||||
* Start the iOS app (see the [bevy example readme for ios setup instructions][ios-instructions])
|
||||
* Install Xcode through the app store
|
||||
* Launch Xcode and install the iOS simulator (check the box upon first start, or install it through `Preferences > Platforms` later)
|
||||
* Install the iOS and iOS simulator Rust targets with `rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim`
|
||||
* run `make run` inside the `/mobile` directory
|
||||
|
||||
You should keep the `credits` directory up to date. The release workflow automatically includes the directory in every build.
|
||||
|
||||
### Updating the icons
|
||||
1. Replace `build/macos/icon_1024x1024.png` with a `1024` times `1024` pixel png icon and run `create_icns.sh` or `create_icns_linux.sh` if you use linux (make sure to run the script inside the `build/macos` directory) - _Note: `create_icns.sh` requires a mac, and `create_icns_linux.sh` requires imagemagick and png2icns_
|
||||
2. Replace `build/windows/icon.ico` (used for windows executable and as favicon for the web-builds)
|
||||
* You can create an `.ico` file for windows by following these steps:
|
||||
1. Open `macos/AppIcon.iconset/icon_256x256.png` in [Gimp](https://www.gimp.org/downloads/)
|
||||
2. Select the `File > Export As` menu item.
|
||||
3. Change the file extension to `.ico` (or click `Select File Type (By Extension)` and select `Microsoft Windows Icon`)
|
||||
4. Save as `build/windows/icon.ico`
|
||||
3. Replace `build/android/res/mipmap-mdpi/icon.png` with `macos/AppIcon.iconset/icon_256x256.png`, but rename it to `icon.png`
|
||||
|
||||
### Deploy web build to GitHub pages
|
||||
|
||||
1. Trigger the `deploy-github-page` workflow
|
||||
2. Activate [GitHub pages](https://pages.github.com/) for your repository
|
||||
1. Source from the `gh-pages` branch (created by the just executed action)
|
||||
3. After a few minutes your game is live at `http://username.github.io/repository`
|
||||
|
||||
To deploy newer versions, just run the `deploy-github-page` workflow again.
|
||||
|
||||
# Deploy mobile platforms
|
||||
|
||||
For general info on mobile support, you can take a look at [one of my blog posts about mobile development with Bevy][mobile_dev_with_bevy_2] which is relevant to the current setup.
|
||||
|
||||
## Android
|
||||
|
||||
Currently, `cargo-apk` is used to run the development app. But APKs can no longer be published in the store and `cargo-apk` cannot produce the required AAB. This is why there is setup for two android related tools. In [`mobile/Cargo.toml`](./mobile/Cargo.toml), the `package.metadata.android` section configures `cargo-apk` while [`mobile/manifest.yaml`](./mobile/manifest.yaml) configures a custom fork of `xbuild` which is used in the `release-android-google-play` workflow to create an AAB.
|
||||
|
||||
There is a [post about how to set up the android release workflow][workflow_bevy_android] on my blog.
|
||||
|
||||
## iOS
|
||||
|
||||
The setup is pretty much what Bevy does for the mobile example.
|
||||
|
||||
There is a [post about how to set up the iOS release workflow][workflow_bevy_ios] on my blog.
|
||||
|
||||
# Removing mobile platforms
|
||||
|
||||
If you don't want to target Android or iOS, you can just delete the `/mobile`, `/build/android`, and `/build/ios` directories.
|
||||
Then delete the `[workspace]` section from `Cargo.toml`.
|
||||
|
||||
# Getting started with Bevy
|
||||
|
||||
You should check out the Bevy website for [links to resources][bevy-learn] and the [Bevy Cheat Book] for a bunch of helpful documentation and examples. I can also recommend the [official Bevy Discord server][bevy-discord] for keeping up to date with the development and getting help from other Bevy users.
|
||||
|
||||
# Known issues
|
||||
|
||||
Audio in web-builds can have issues in some browsers. This seems to be a general performance issue and not due to the audio itself (see [bevy_kira_audio/#9][firefox-sound-issue]).
|
||||
|
||||
# License
|
||||
|
||||
This project is licensed under [CC0 1.0 Universal](LICENSE) except some content of `assets` and the Bevy icons in the `build` directory (see [Credits](credits/CREDITS.md)). Go crazy and feel free to show me whatever you build with this ([@nikl_me][nikl-twitter] / [@nikl_me@mastodon.online][nikl-mastodon] ).
|
||||
|
||||
[bevy]: https://bevyengine.org/
|
||||
[bevy-learn]: https://bevyengine.org/learn/
|
||||
[bevy-discord]: https://discord.gg/bevy
|
||||
[nikl-twitter]: https://twitter.com/nikl_me
|
||||
[nikl-mastodon]: https://mastodon.online/@nikl_me
|
||||
[firefox-sound-issue]: https://github.com/NiklasEi/bevy_kira_audio/issues/9
|
||||
[Bevy Cheat Book]: https://bevy-cheatbook.github.io/introduction.html
|
||||
[trunk]: https://trunkrs.dev/
|
||||
[android-instructions]: https://github.com/bevyengine/bevy/blob/latest/examples/README.md#setup
|
||||
[ios-instructions]: https://github.com/bevyengine/bevy/blob/latest/examples/README.md#setup-1
|
||||
[mobile_dev_with_bevy_2]: https://www.nikl.me/blog/2023/notes_on_mobile_development_with_bevy_2/
|
||||
[workflow_bevy_android]: https://www.nikl.me/blog/2023/github_workflow_to_publish_android_app/
|
||||
[workflow_bevy_ios]: https://www.nikl.me/blog/2023/github_workflow_to_publish_ios_app/
|
||||
628
Cargo.lock
generated
73
Cargo.toml
|
|
@ -1,22 +1,77 @@
|
|||
[package]
|
||||
name = "ttt-ce"
|
||||
name = "ttt-ce" # ToDo
|
||||
version = "0.1.0"
|
||||
publish = false
|
||||
authors = ["Mikolaj Wojciech 'Nimfer' Gorski"] # ToDo: you are the author ;)
|
||||
edition = "2021"
|
||||
exclude = ["dist", "build", "assets", "credits"]
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
[workspace]
|
||||
members = ["mobile"]
|
||||
|
||||
# Enable a small amount of optimization in debug mode
|
||||
[profile.dev]
|
||||
opt-level = 1
|
||||
|
||||
# Enable high optimizations for dependencies (incl. Bevy), but not for our code:
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
||||
|
||||
[profile.dev]
|
||||
opt-level = 1
|
||||
|
||||
# This is used by trunk as it doesn't support custom profiles: https://github.com/trunk-rs/trunk/issues/605
|
||||
# xbuild also uses this profile for building android AABs because I couldn't find a configuration for it
|
||||
[profile.release]
|
||||
opt-level = "s"
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
|
||||
# Profile for distribution
|
||||
[profile.dist]
|
||||
inherits = "release"
|
||||
opt-level = 3
|
||||
lto = true
|
||||
codegen-units = 1
|
||||
strip = true
|
||||
|
||||
[features]
|
||||
dev = [
|
||||
"bevy/dynamic_linking",
|
||||
]
|
||||
|
||||
# All of Bevy's default features exept for the audio related ones (bevy_audio, vorbis), since they clash with bevy_kira_audio
|
||||
# and android_shared_stdcxx, since that is covered in `mobile`
|
||||
[dependencies]
|
||||
bevy = { version = "0.13.1", features = ["wayland"]}
|
||||
bevy_dylib = "0.13.1"
|
||||
bevy = { version = "0.13", default-features = false, features = [
|
||||
"animation",
|
||||
"bevy_asset",
|
||||
"bevy_gilrs",
|
||||
"bevy_scene",
|
||||
"bevy_winit",
|
||||
"bevy_core_pipeline",
|
||||
"bevy_pbr",
|
||||
"bevy_gltf",
|
||||
"bevy_render",
|
||||
"bevy_sprite",
|
||||
"bevy_text",
|
||||
"bevy_ui",
|
||||
"multi-threaded",
|
||||
"png",
|
||||
"hdr",
|
||||
"x11",
|
||||
"bevy_gizmos",
|
||||
"tonemapping_luts",
|
||||
"default_font",
|
||||
"webgl2",
|
||||
"bevy_debug_stepping",
|
||||
] }
|
||||
bevy_kira_audio = { version = "0.19" }
|
||||
bevy_asset_loader = { version = "0.20" }
|
||||
rand = { version = "0.8.3" }
|
||||
webbrowser = { version = "0.8", features = ["hardened"] }
|
||||
|
||||
# keep the following in sync with Bevy's dependencies
|
||||
winit = { version = "0.29", default-features = false }
|
||||
image = { version = "0.24", default-features = false }
|
||||
bevy_editor_pls = "0.8.1"
|
||||
bevy_xpbd_3d = {git = "https://git.opencodebox.com/MikolajG/bevy_xpbd", branch = "reflect-serialize"}
|
||||
|
||||
[build-dependencies]
|
||||
embed-resource = "1"
|
||||
|
|
|
|||
795
LICENSE
|
|
@ -1,674 +1,121 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<https://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
||||
Creative Commons Legal Code
|
||||
|
||||
CC0 1.0 Universal
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||
HEREUNDER.
|
||||
|
||||
Statement of Purpose
|
||||
|
||||
The laws of most jurisdictions throughout the world automatically confer
|
||||
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||
authorship and/or a database (each, a "Work").
|
||||
|
||||
Certain owners wish to permanently relinquish those rights to a Work for
|
||||
the purpose of contributing to a commons of creative, cultural and
|
||||
scientific works ("Commons") that the public can reliably and without fear
|
||||
of later claims of infringement build upon, modify, incorporate in other
|
||||
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||
and for any purposes, including without limitation commercial purposes.
|
||||
These owners may contribute to the Commons to promote the ideal of a free
|
||||
culture and the further production of creative, cultural and scientific
|
||||
works, or to gain reputation or greater distribution for their Work in
|
||||
part through the use and efforts of others.
|
||||
|
||||
For these and/or other purposes and motivations, and without any
|
||||
expectation of additional consideration or compensation, the person
|
||||
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||
|
||||
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||
protected by copyright and related or neighboring rights ("Copyright and
|
||||
Related Rights"). Copyright and Related Rights include, but are not
|
||||
limited to, the following:
|
||||
|
||||
i. the right to reproduce, adapt, distribute, perform, display,
|
||||
communicate, and translate a Work;
|
||||
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||
iii. publicity and privacy rights pertaining to a person's image or
|
||||
likeness depicted in a Work;
|
||||
iv. rights protecting against unfair competition in regards to a Work,
|
||||
subject to the limitations in paragraph 4(a), below;
|
||||
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||
in a Work;
|
||||
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||
European Parliament and of the Council of 11 March 1996 on the legal
|
||||
protection of databases, and under any national implementation
|
||||
thereof, including any amended or successor version of such
|
||||
directive); and
|
||||
vii. other similar, equivalent or corresponding rights throughout the
|
||||
world based on applicable law or treaty, and any national
|
||||
implementations thereof.
|
||||
|
||||
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||
of action, whether now known or unknown (including existing as well as
|
||||
future claims and causes of action), in the Work (i) in all territories
|
||||
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||
treaty (including future time extensions), (iii) in any current or future
|
||||
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||
including without limitation commercial, advertising or promotional
|
||||
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||
member of the public at large and to the detriment of Affirmer's heirs and
|
||||
successors, fully intending that such Waiver shall not be subject to
|
||||
revocation, rescission, cancellation, termination, or any other legal or
|
||||
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||
as contemplated by Affirmer's express Statement of Purpose.
|
||||
|
||||
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||
be judged legally invalid or ineffective under applicable law, then the
|
||||
Waiver shall be preserved to the maximum extent permitted taking into
|
||||
account Affirmer's express Statement of Purpose. In addition, to the
|
||||
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||
maximum duration provided by applicable law or treaty (including future
|
||||
time extensions), (iii) in any current or future medium and for any number
|
||||
of copies, and (iv) for any purpose whatsoever, including without
|
||||
limitation commercial, advertising or promotional purposes (the
|
||||
"License"). The License shall be deemed effective as of the date CC0 was
|
||||
applied by Affirmer to the Work. Should any part of the License for any
|
||||
reason be judged legally invalid or ineffective under applicable law, such
|
||||
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||
of the License, and in such case Affirmer hereby affirms that he or she
|
||||
will not (i) exercise any of his or her remaining Copyright and Related
|
||||
Rights in the Work or (ii) assert any associated claims and causes of
|
||||
action with respect to the Work, in either case contrary to Affirmer's
|
||||
express Statement of Purpose.
|
||||
|
||||
4. Limitations and Disclaimers.
|
||||
|
||||
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||
surrendered, licensed or otherwise affected by this document.
|
||||
b. Affirmer offers the Work as-is and makes no representations or
|
||||
warranties of any kind concerning the Work, express, implied,
|
||||
statutory or otherwise, including without limitation warranties of
|
||||
title, merchantability, fitness for a particular purpose, non
|
||||
infringement, or the absence of latent or other defects, accuracy, or
|
||||
the present or absence of errors, whether or not discoverable, all to
|
||||
the greatest extent permissible under applicable law.
|
||||
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||
that may apply to the Work or any use thereof, including without
|
||||
limitation any person's Copyright and Related Rights in the Work.
|
||||
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||
consents, permissions or other rights required for any use of the
|
||||
Work.
|
||||
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||
party to this document and has no duty or obligation with respect to
|
||||
this CC0 or use of the Work.
|
||||
|
|
|
|||
5
Trunk.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[build]
|
||||
public_url = "./"
|
||||
|
||||
[serve]
|
||||
port = 8080
|
||||
BIN
assets/icon.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
6270
assets/test_map.gltf
10
build.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
extern crate embed_resource;
|
||||
use std::env;
|
||||
|
||||
fn main() {
|
||||
let target = env::var("TARGET").unwrap();
|
||||
if target.contains("windows") {
|
||||
// on windows we will set our game icon as icon for the executable
|
||||
embed_resource::compile("build/windows/icon.rc");
|
||||
}
|
||||
}
|
||||
BIN
build/android/res/mipmap-mdpi/icon.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
build/icon_1024x1024.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
build/macos/AppIcon.iconset/icon_128x128.png
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
build/macos/AppIcon.iconset/icon_128x128@2x.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
build/macos/AppIcon.iconset/icon_16x16.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
build/macos/AppIcon.iconset/icon_16x16@2x.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
build/macos/AppIcon.iconset/icon_256x256.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
build/macos/AppIcon.iconset/icon_256x256@2x.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
build/macos/AppIcon.iconset/icon_32x32.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
BIN
build/macos/AppIcon.iconset/icon_32x32@2x.png
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
build/macos/AppIcon.iconset/icon_512x512.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
build/macos/AppIcon.iconset/icon_512x512@2x.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
17
build/macos/create_icns.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
rm -rf AppIcon.iconset/*
|
||||
mkdir -p AppIcon.iconset
|
||||
sips -z 16 16 ../icon_1024x1024.png --out AppIcon.iconset/icon_16x16.png
|
||||
sips -z 32 32 ../icon_1024x1024.png --out AppIcon.iconset/icon_16x16@2x.png
|
||||
sips -z 32 32 ../icon_1024x1024.png --out AppIcon.iconset/icon_32x32.png
|
||||
sips -z 64 64 ../icon_1024x1024.png --out AppIcon.iconset/icon_32x32@2x.png
|
||||
sips -z 128 128 ../icon_1024x1024.png --out AppIcon.iconset/icon_128x128.png
|
||||
sips -z 256 256 ../icon_1024x1024.png --out AppIcon.iconset/icon_128x128@2x.png
|
||||
sips -z 256 256 ../icon_1024x1024.png --out AppIcon.iconset/icon_256x256.png
|
||||
sips -z 512 512 ../icon_1024x1024.png --out AppIcon.iconset/icon_256x256@2x.png
|
||||
sips -z 512 512 ../icon_1024x1024.png --out AppIcon.iconset/icon_512x512.png
|
||||
cp ../icon_1024x1024.png AppIcon.iconset/icon_512x512@2x.png
|
||||
iconutil -c icns AppIcon.iconset
|
||||
mkdir -p src/Game.app/Contents/Resources
|
||||
mv AppIcon.icns src/Game.app/Contents/Resources/
|
||||
17
build/macos/create_icns_linux.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
rm -rf AppIcon.iconset/*
|
||||
mkdir -p AppIcon.iconset
|
||||
convert ../icon_1024x1024.png -resize 16x16 AppIcon.iconset/icon_16x16.png
|
||||
convert ../icon_1024x1024.png -resize 32x32 AppIcon.iconset/icon_16x16@2x.png
|
||||
convert ../icon_1024x1024.png -resize 32x32 AppIcon.iconset/icon_32x32.png
|
||||
convert ../icon_1024x1024.png -resize 64x64 AppIcon.iconset/icon_32x32@2x.png
|
||||
convert ../icon_1024x1024.png -resize 128x128 AppIcon.iconset/icon_128x128.png
|
||||
convert ../icon_1024x1024.png -resize 256x256 AppIcon.iconset/icon_128x128@2x.png
|
||||
convert ../icon_1024x1024.png -resize 256x256 AppIcon.iconset/icon_256x256.png
|
||||
convert ../icon_1024x1024.png -resize 512x512 AppIcon.iconset/icon_256x256@2x.png
|
||||
convert ../icon_1024x1024.png -resize 512x512 AppIcon.iconset/icon_512x512.png
|
||||
cp ../icon_1024x1024.png AppIcon.iconset/icon_512x512@2x.png
|
||||
png2icns ./AppIcon.icns AppIcon.iconset/icon_16x16.png AppIcon.iconset/icon_32x32.png AppIcon.iconset/icon_128x128.png AppIcon.iconset/icon_256x256.png AppIcon.iconset/icon_512x512.png
|
||||
mkdir -p src/Game.app/Contents/Resources
|
||||
mv AppIcon.icns src/Game.app/Contents/Resources/
|
||||
62
build/web/sound.js
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
// Insert hack to make sound autoplay on Chrome as soon as the user interacts with the tab:
|
||||
// https://developers.google.com/web/updates/2018/11/web-audio-autoplay#moving-forward
|
||||
|
||||
// the following function keeps track of all AudioContexts and resumes them on the first user
|
||||
// interaction with the page. If the function is called and all contexts are already running,
|
||||
// it will remove itself from all event listeners.
|
||||
(function () {
|
||||
// An array of all contexts to resume on the page
|
||||
const audioContextList = [];
|
||||
|
||||
// An array of various user interaction events we should listen for
|
||||
const userInputEventNames = [
|
||||
"click",
|
||||
"contextmenu",
|
||||
"auxclick",
|
||||
"dblclick",
|
||||
"mousedown",
|
||||
"mouseup",
|
||||
"pointerup",
|
||||
"touchend",
|
||||
"keydown",
|
||||
"keyup",
|
||||
];
|
||||
|
||||
// A proxy object to intercept AudioContexts and
|
||||
// add them to the array for tracking and resuming later
|
||||
self.AudioContext = new Proxy(self.AudioContext, {
|
||||
construct(target, args) {
|
||||
const result = new target(...args);
|
||||
audioContextList.push(result);
|
||||
return result;
|
||||
},
|
||||
});
|
||||
|
||||
// To resume all AudioContexts being tracked
|
||||
function resumeAllContexts(_event) {
|
||||
let count = 0;
|
||||
|
||||
audioContextList.forEach((context) => {
|
||||
if (context.state !== "running") {
|
||||
context.resume();
|
||||
} else {
|
||||
count++;
|
||||
}
|
||||
});
|
||||
|
||||
// If all the AudioContexts have now resumed then we unbind all
|
||||
// the event listeners from the page to prevent unnecessary resume attempts
|
||||
// Checking count > 0 ensures that the user interaction happens AFTER the game started up
|
||||
if (count > 0 && count === audioContextList.length) {
|
||||
userInputEventNames.forEach((eventName) => {
|
||||
document.removeEventListener(eventName, resumeAllContexts);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// We bind the resume function for each user interaction
|
||||
// event on the page
|
||||
userInputEventNames.forEach((eventName) => {
|
||||
document.addEventListener(eventName, resumeAllContexts);
|
||||
});
|
||||
})();
|
||||
53
build/web/styles.css
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
body, html {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: lightgray;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.game-container {
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lds-dual-ring {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.lds-dual-ring:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
border: 6px solid #fff;
|
||||
border-color: #fff transparent #fff transparent;
|
||||
animation: lds-dual-ring 1.2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes lds-dual-ring {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#bevy {
|
||||
z-index: 2;
|
||||
}
|
||||
BIN
build/windows/icon.ico
Normal file
|
After Width: | Height: | Size: 153 KiB |
1
build/windows/icon.rc
Normal file
|
|
@ -0,0 +1 @@
|
|||
app_icon ICON "icon.ico"
|
||||
2
build/windows/installer/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
/bin/
|
||||
/obj/
|
||||
60
build/windows/installer/InstallDirUi.wxs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
|
||||
<!-- Copied from https://github.com/wixtoolset/wix4/blob/6f2511f58f60e63a15357a2fe37f83343dea3090/src/ext/UI/wixlib/WixUI_InstallDir.wxs#L9
|
||||
but with the license dialog disabled.
|
||||
See: https://wixtoolset.org/docs/v3/wixui/wixui_customizations/#changing-the-ui-sequence-of-a-built-in-dialog-set. -->
|
||||
<Fragment>
|
||||
<UI Id="WixUI_CustomInstallDir">
|
||||
<TextStyle Id="WixUI_Font_Normal" FaceName="Tahoma" Size="8" />
|
||||
<TextStyle Id="WixUI_Font_Bigger" FaceName="Tahoma" Size="12" />
|
||||
<TextStyle Id="WixUI_Font_Title" FaceName="Tahoma" Size="9" Bold="yes" />
|
||||
|
||||
<Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
|
||||
|
||||
<DialogRef Id="BrowseDlg" />
|
||||
<DialogRef Id="DiskCostDlg" />
|
||||
<DialogRef Id="ErrorDlg" />
|
||||
<DialogRef Id="FatalError" />
|
||||
<DialogRef Id="FilesInUse" />
|
||||
<DialogRef Id="MsiRMFilesInUse" />
|
||||
<DialogRef Id="PrepareDlg" />
|
||||
<DialogRef Id="ProgressDlg" />
|
||||
<DialogRef Id="ResumeDlg" />
|
||||
<DialogRef Id="UserExit" />
|
||||
<Publish Dialog="BrowseDlg" Control="OK" Event="SpawnDialog" Value="InvalidDirDlg" Order="4" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" />
|
||||
|
||||
<Publish Dialog="ExitDialog" Control="Finish" Event="EndDialog" Value="Return" Order="999" />
|
||||
|
||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="InstallDirDlg" Condition="NOT Installed" />
|
||||
<Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Condition="Installed AND PATCH" />
|
||||
|
||||
<Publish Dialog="InstallDirDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" />
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SetTargetPath" Value="[WIXUI_INSTALLDIR]" Order="1" />
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="SpawnDialog" Value="InvalidDirDlg" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH AND WIXUI_INSTALLDIR_VALID<>"1"" />
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" Order="4" Condition="WIXUI_DONTVALIDATEPATH OR WIXUI_INSTALLDIR_VALID="1"" />
|
||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Property="_BrowseProperty" Value="[WIXUI_INSTALLDIR]" Order="1" />
|
||||
<Publish Dialog="InstallDirDlg" Control="ChangeFolder" Event="SpawnDialog" Value="BrowseDlg" Order="2" />
|
||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="InstallDirDlg" Order="1" Condition="NOT Installed" />
|
||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
|
||||
<Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="2" Condition="Installed AND PATCH" />
|
||||
|
||||
<Publish Dialog="MaintenanceWelcomeDlg" Control="Next" Event="NewDialog" Value="MaintenanceTypeDlg" />
|
||||
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="RepairButton" Event="NewDialog" Value="VerifyReadyDlg" />
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="RemoveButton" Event="NewDialog" Value="VerifyReadyDlg" />
|
||||
<Publish Dialog="MaintenanceTypeDlg" Control="Back" Event="NewDialog" Value="MaintenanceWelcomeDlg" />
|
||||
|
||||
<Property Id="ARPNOMODIFY" Value="1" />
|
||||
</UI>
|
||||
|
||||
<UIRef Id="WixUI_Common" />
|
||||
</Fragment>
|
||||
<?foreach WIXUIARCH in X86;X64;A64 ?>
|
||||
<Fragment>
|
||||
<UI Id="WixUI_CustomInstallDir_$(WIXUIARCH)">
|
||||
<Publish Dialog="BrowseDlg" Control="OK" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="3" Condition="NOT WIXUI_DONTVALIDATEPATH" />
|
||||
<Publish Dialog="InstallDirDlg" Control="Next" Event="DoAction" Value="WixUIValidatePath_$(WIXUIARCH)" Order="2" Condition="NOT WIXUI_DONTVALIDATEPATH" />
|
||||
</UI>
|
||||
</Fragment>
|
||||
<?endforeach?>
|
||||
</Wix>
|
||||
40
build/windows/installer/Installer.sln
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31903.59
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{B7DD6F7E-DEF8-4E67-B5B7-07EF123DB6F0}") = "Installer", "Installer.wixproj", "{340293B0-F46C-46A0-88D8-4BB2F3465C53}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|Any CPU.ActiveCfg = Debug|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|Any CPU.Build.0 = Debug|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|x64.Build.0 = Debug|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Debug|x86.Build.0 = Debug|x86
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|Any CPU.ActiveCfg = Release|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|Any CPU.Build.0 = Release|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|x64.ActiveCfg = Release|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|x64.Build.0 = Release|x64
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|x86.ActiveCfg = Release|x86
|
||||
{340293B0-F46C-46A0-88D8-4BB2F3465C53}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
29
build/windows/installer/Installer.wixproj
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" Sdk="WixToolset.Sdk/4.0.0-rc.2">
|
||||
<PropertyGroup>
|
||||
<DebugType>none</DebugType>
|
||||
<OutputName>installer</OutputName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.0-rc.2" />
|
||||
<PackageReference Include="WixToolset.Heat" Version="4.0.0-rc.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HarvestDirectory Include="..\..\..\assets">
|
||||
<ComponentGroupName>AssetsDirectory</ComponentGroupName>
|
||||
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
||||
<SuppressRootDirectory>false</SuppressRootDirectory>
|
||||
</HarvestDirectory>
|
||||
<BindPath Include="..\..\..\assets" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<HarvestDirectory Include="..\..\..\credits">
|
||||
<ComponentGroupName>CreditsDirectory</ComponentGroupName>
|
||||
<DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
|
||||
<SuppressRootDirectory>false</SuppressRootDirectory>
|
||||
</HarvestDirectory>
|
||||
<BindPath Include="..\..\..\credits" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
6
build/windows/installer/Package.en-us.wxl
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<!--
|
||||
This file contains the declaration of all the localizable strings.
|
||||
-->
|
||||
<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
|
||||
<String Id="DowngradeError" Value="A newer version of [ProductName] is already installed." />
|
||||
</WixLocalization>
|
||||
51
build/windows/installer/Package.wxs
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">
|
||||
<!-- ToDo use your own keys for Name and Manufacturer, as well as a new UUID for UpgradeCode -->
|
||||
<Package
|
||||
Name="BevyGame"
|
||||
Manufacturer="My Name"
|
||||
UpgradeCode="12345678-de4f-4893-a535-93dfd0597731"
|
||||
Version="0.1.0"
|
||||
|
||||
Scope="perUserOrMachine">
|
||||
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
|
||||
|
||||
<Media Id="1" Cabinet="myapplication.cab" EmbedCab="yes" />
|
||||
|
||||
<Property Id="ApplicationFolderName" Value="!(bind.Property.ProductName)" />
|
||||
|
||||
<!-- Installer Icon -->
|
||||
<Icon Id="icon.ico" SourceFile="..\icon.ico"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="icon.ico" />
|
||||
|
||||
<!-- Sets the default installation folder -->
|
||||
<StandardDirectory Id="ProgramFiles6432Folder">
|
||||
<Directory Id="INSTALLFOLDER" Name="!(bind.Property.ProductName)" />
|
||||
</StandardDirectory>
|
||||
|
||||
<!-- Shows a UI that allows customizing the install location -->
|
||||
<ui:WixUI Id="WixUI_CustomInstallDir" InstallDirectory="INSTALLFOLDER" />
|
||||
|
||||
<Feature Id="Main">
|
||||
<ComponentGroupRef Id="MainComponent" />
|
||||
<ComponentRef Id="StartMenuShortcut" />
|
||||
<ComponentGroupRef Id="AssetsDirectory" />
|
||||
<ComponentGroupRef Id="CreditsDirectory" />
|
||||
</Feature>
|
||||
|
||||
<!-- Installs the actual files -->
|
||||
<ComponentGroup Id="MainComponent" Directory="INSTALLFOLDER">
|
||||
<Component>
|
||||
<File Id="Executable" Source="..\..\..\target\dist\ttt-ce.exe" Vital="true" /> <!-- ToDo this should point to your executable -->
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
|
||||
<!-- Start menu shortcut -->
|
||||
<!-- Source: https://wixtoolset.org/docs/v3/howtos/files_and_registry/create_start_menu_shortcut/ -->
|
||||
<StandardDirectory Id="ProgramMenuFolder">
|
||||
<Component Id="StartMenuShortcut" Guid="*">
|
||||
<Shortcut Id="ApplicationStartMenuShortcut" Name="!(bind.Property.ProductName)" Target="[!Executable]" WorkingDirectory="INSTALLFOLDER" />
|
||||
<RegistryValue Root="HKCU" Key="Software\!(bind.Property.ProductName)" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
|
||||
</Component>
|
||||
</StandardDirectory>
|
||||
</Package>
|
||||
</Wix>
|
||||
6
build/windows/installer/global.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"sdk": {
|
||||
"version": "7.0.102",
|
||||
"rollForward": "latestFeature"
|
||||
}
|
||||
}
|
||||
5
credits/CREDITS.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Credits
|
||||
|
||||
## Assets
|
||||
|
||||
* Bevy icon: [MIT License](licenses/Bevy_MIT_License.md);
|
||||
19
credits/licenses/Bevy_MIT_License.md
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
22
index.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<title>TTT:CE</title> <!-- ToDo -->
|
||||
<link data-trunk rel="copy-dir" href="assets"/>
|
||||
<link data-trunk rel="copy-dir" href="credits"/>
|
||||
<link data-trunk rel="copy-file" href="build/windows/icon.ico"/>
|
||||
<link rel="icon" href="icon.ico">
|
||||
<link data-trunk rel="inline" href="build/web/styles.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<link data-trunk rel="inline" href="build/web/sound.js"/>
|
||||
<div class="game-container">
|
||||
<div class="lds-dual-ring"></div>
|
||||
<canvas id="bevy">
|
||||
Javascript and support for canvas is required
|
||||
</canvas>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
5
mobile/.cargo/config.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Flag to notify the compiler we're building for the iOS simulator from an Apple silicon mac
|
||||
# This needs some workarounds for now
|
||||
# See https://github.com/bevyengine/bevy/pull/10178 - remove if it's not needed anymore.
|
||||
[target.aarch64-apple-ios-sim]
|
||||
rustflags = ["--cfg=ios_simulator"]
|
||||
3
mobile/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
mobile.xcodeproj/xcuserdata/
|
||||
mobile.xcodeproj/project.xcworkspace/
|
||||
build/
|
||||
34
mobile/Cargo.toml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[package]
|
||||
name = "mobile"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
publish = false
|
||||
|
||||
[lib]
|
||||
name = "mobile"
|
||||
crate-type = ["staticlib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
ttt-ce = { path = ".." } # ToDo
|
||||
bevy = { version = "0.13", default-features = false }
|
||||
|
||||
# As long as Kira doesn't expose a feature for this, we need to enable it
|
||||
# See https://github.com/tesselode/kira/pull/51
|
||||
[target."cfg(target_os = \"android\")".dependencies.cpal]
|
||||
version = "0.15"
|
||||
features = ["oboe-shared-stdcxx"]
|
||||
|
||||
[package.metadata.android]
|
||||
package = "me.nikl.bevygame" # ToDo
|
||||
apk_name = "BevyGame" # ToDo same as GAME_OSX_APP_NAME in release workflow
|
||||
assets = "../assets"
|
||||
strip = "strip"
|
||||
resources = "../build/android/res"
|
||||
build_targets = ["aarch64-linux-android"]
|
||||
|
||||
[package.metadata.android.sdk]
|
||||
target_sdk_version = 33
|
||||
|
||||
[package.metadata.android.application]
|
||||
icon = "@mipmap/icon"
|
||||
label = "Bevy Game" # ToDo
|
||||
29
mobile/Makefile
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
.PHONY: xcodebuild run install boot-sim generate clean
|
||||
|
||||
DEVICE = ${DEVICE_ID}
|
||||
ifndef DEVICE_ID
|
||||
DEVICE=$(shell xcrun simctl list devices 'iOS' | grep -v 'unavailable' | grep -v '^--' | grep -v '==' | head -n 1 | grep -E -o -i "([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})")
|
||||
endif
|
||||
|
||||
run: install
|
||||
# Todo: change the bundle identifier (then remove this comment :P)
|
||||
xcrun simctl launch --console $(DEVICE) me.nikl.bevygame
|
||||
|
||||
boot-sim:
|
||||
xcrun simctl boot $(DEVICE) || true
|
||||
|
||||
install: xcodebuild-simulator boot-sim
|
||||
xcrun simctl install $(DEVICE) build/Build/Products/Debug-iphonesimulator/mobile.app
|
||||
|
||||
xcodebuild-simulator:
|
||||
IOS_TARGETS=x86_64-apple-ios xcodebuild -scheme mobile -configuration Debug -derivedDataPath build -destination "id=$(DEVICE)"
|
||||
|
||||
xcodebuild-iphone:
|
||||
IOS_TARGETS=aarch64-apple-ios xcodebuild -scheme mobile -configuration Debug -derivedDataPath build -arch arm64
|
||||
|
||||
xcodebuild-iphone-release:
|
||||
IOS_TARGETS=aarch64-apple-ios xcodebuild -scheme mobile -configuration Release -derivedDataPath build -arch arm64
|
||||
|
||||
clean:
|
||||
rm -r build
|
||||
cargo clean
|
||||
55
mobile/build_rust_deps.sh
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# based on https://github.com/mozilla/glean/blob/main/build-scripts/xc-universal-binary.sh
|
||||
|
||||
set -eux
|
||||
|
||||
PATH=$PATH:$HOME/.cargo/bin
|
||||
|
||||
RELFLAG=
|
||||
if [[ "$CONFIGURATION" != "Debug" ]]; then
|
||||
RELFLAG="--profile dist"
|
||||
fi
|
||||
|
||||
set -euvx
|
||||
|
||||
if [[ -n "${DEVELOPER_SDK_DIR:-}" ]]; then
|
||||
# Assume we're in Xcode, which means we're probably cross-compiling.
|
||||
# In this case, we need to add an extra library search path for build scripts and proc-macros,
|
||||
# which run on the host instead of the target.
|
||||
# (macOS Big Sur does not have linkable libraries in /usr/lib/.)
|
||||
export LIBRARY_PATH="${DEVELOPER_SDK_DIR}/MacOSX.sdk/usr/lib:${LIBRARY_PATH:-}"
|
||||
fi
|
||||
|
||||
# add homebrew bin path, as it's the most commonly used package manager on macOS
|
||||
# this is needed for cmake on apple arm processors as it's not available by default
|
||||
export PATH="$PATH:/opt/homebrew/bin"
|
||||
|
||||
IS_SIMULATOR=0
|
||||
if [ "${LLVM_TARGET_TRIPLE_SUFFIX-}" = "-simulator" ]; then
|
||||
IS_SIMULATOR=1
|
||||
fi
|
||||
|
||||
for arch in $ARCHS; do
|
||||
case "$arch" in
|
||||
x86_64)
|
||||
if [ $IS_SIMULATOR -eq 0 ]; then
|
||||
echo "Building for x86_64, but not a simulator build. What's going on?" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
# Intel iOS simulator
|
||||
export CFLAGS_x86_64_apple_ios="-target x86_64-apple-ios"
|
||||
cargo rustc --crate-type staticlib --lib $RELFLAG --target x86_64-apple-ios
|
||||
;;
|
||||
|
||||
arm64)
|
||||
if [ $IS_SIMULATOR -eq 0 ]; then
|
||||
# Hardware iOS targets
|
||||
cargo rustc --crate-type staticlib --lib $RELFLAG --target aarch64-apple-ios
|
||||
else
|
||||
# M1 iOS simulator -- currently in Nightly only and requires to build `libstd`
|
||||
cargo rustc --crate-type staticlib --lib $RELFLAG --target aarch64-apple-ios-sim
|
||||
fi
|
||||
esac
|
||||
done
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "icon_1024x1024.png",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 49 KiB |
6
mobile/ios-src/Assets.xcassets/Contents.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
35
mobile/ios-src/Info.plist
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>0.1.1</string>
|
||||
<key>CFBundleIconName</key>
|
||||
<string>AppIcon</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>0.1.1</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiresFullScreen</key>
|
||||
<false/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
37
mobile/ios-src/LaunchScreen.storyboard
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina6_12" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="393" height="842"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" fixedFrame="YES" image="bevy.png" translatesAutoresizingMaskIntoConstraints="NO" id="sic-lC-kjy">
|
||||
<rect key="frame" x="113" y="346" width="164" height="153"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<viewLayoutGuide key="safeArea" id="Bcu-3y-fUS"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<modalPageSheetSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="bevy.png" width="152.33058166503906" height="152.33058166503906"/>
|
||||
</resources>
|
||||
</document>
|
||||
1
mobile/ios-src/bindings.h
Normal file
|
|
@ -0,0 +1 @@
|
|||
void main_rs(void);
|
||||
6
mobile/ios-src/main.m
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#import "bindings.h"
|
||||
|
||||
int main() {
|
||||
main_rs();
|
||||
return 0;
|
||||
}
|
||||
11
mobile/manifest.yaml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
android:
|
||||
gradle: true
|
||||
# this assets configuration is currently only used without gradle!
|
||||
#assets:
|
||||
# - "../assets/*"
|
||||
icon: "ios-src/Assets.xcassets/AppIcon.appiconset/icon_1024x1024.png"
|
||||
manifest:
|
||||
package: "com.opencodebox.tttce" # Todo
|
||||
version_code: 3 # Todo you should start at 1
|
||||
application:
|
||||
label: "Trouble in Terror Town: Community Edition" # Todo
|
||||
465
mobile/mobile.xcodeproj/project.pbxproj
Normal file
|
|
@ -0,0 +1,465 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 51;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
134866208A035F8615C99114 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 96A1E5B62F48B379829E8A0D /* Metal.framework */; };
|
||||
2469A4292A6F9AC200ACF4EF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2469A4282A6F9AC200ACF4EF /* Assets.xcassets */; };
|
||||
2469A42B2A6FAC7000ACF4EF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2469A42A2A6FAC7000ACF4EF /* LaunchScreen.storyboard */; };
|
||||
2604C99FAB5A8322EDCABB9F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FE71FBCAA714DB4F42459106 /* UIKit.framework */; };
|
||||
442540D056ADB9AE61A0A590 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F1B41978FA53999AA836D0F /* Security.framework */; };
|
||||
55892F1396056740E1AF9685 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AF7DE91055EBD05ED77E57F9 /* main.m */; };
|
||||
55B7188F81C3C4183F81D3AE /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A39528EB2CCB182F5328223A /* libc++.tbd */; };
|
||||
57CD6306253C7A940098CD4A /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 57CD6305253C7A940098CD4A /* AudioToolbox.framework */; };
|
||||
57CD630E253C80EC0098CD4A /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 57CD630A253C7F5F0098CD4A /* assets */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
26BF2C4863C966DABAB40DC8 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 8DBF1E2B5C613DA41701F6D9 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = D08AEBE0B1A9C9A7B8C7B33F;
|
||||
remoteInfo = cargo_ios;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
160DB77300A3F1806F024D47 /* bindings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = bindings.h; sourceTree = "<group>"; };
|
||||
2469A4282A6F9AC200ACF4EF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "ios-src/Assets.xcassets"; sourceTree = SOURCE_ROOT; };
|
||||
2469A42A2A6FAC7000ACF4EF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = ios-src/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
55EAC02897847195D2F44C15 /* mobile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = mobile.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
57CD6305253C7A940098CD4A /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
|
||||
57CD630A253C7F5F0098CD4A /* assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = assets; path = ../../assets; sourceTree = "<group>"; };
|
||||
8EE7F1E3B0303533925D7E33 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
96A1E5B62F48B379829E8A0D /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
|
||||
9F1B41978FA53999AA836D0F /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
|
||||
A39528EB2CCB182F5328223A /* libc++.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
|
||||
AF7DE91055EBD05ED77E57F9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
|
||||
FE71FBCAA714DB4F42459106 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
D5A822CB2D6847BA8800BE4C /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
442540D056ADB9AE61A0A590 /* Security.framework in Frameworks */,
|
||||
134866208A035F8615C99114 /* Metal.framework in Frameworks */,
|
||||
2604C99FAB5A8322EDCABB9F /* UIKit.framework in Frameworks */,
|
||||
55B7188F81C3C4183F81D3AE /* libc++.tbd in Frameworks */,
|
||||
57CD6306253C7A940098CD4A /* AudioToolbox.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
321F7D6A765B38E746C35105 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
55EAC02897847195D2F44C15 /* mobile.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4F1D6F28B8A5D1927AB0ADED /* ios-src */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2469A4282A6F9AC200ACF4EF /* Assets.xcassets */,
|
||||
57CD630A253C7F5F0098CD4A /* assets */,
|
||||
160DB77300A3F1806F024D47 /* bindings.h */,
|
||||
8EE7F1E3B0303533925D7E33 /* Info.plist */,
|
||||
AF7DE91055EBD05ED77E57F9 /* main.m */,
|
||||
);
|
||||
path = "ios-src";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8F2E3E6040EAD2EC9F3FA530 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2469A42A2A6FAC7000ACF4EF /* LaunchScreen.storyboard */,
|
||||
4F1D6F28B8A5D1927AB0ADED /* ios-src */,
|
||||
EB028409C2D0655412DA6E44 /* Frameworks */,
|
||||
321F7D6A765B38E746C35105 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EB028409C2D0655412DA6E44 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
57CD6305253C7A940098CD4A /* AudioToolbox.framework */,
|
||||
A39528EB2CCB182F5328223A /* libc++.tbd */,
|
||||
96A1E5B62F48B379829E8A0D /* Metal.framework */,
|
||||
9F1B41978FA53999AA836D0F /* Security.framework */,
|
||||
FE71FBCAA714DB4F42459106 /* UIKit.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXLegacyTarget section */
|
||||
D08AEBE0B1A9C9A7B8C7B33F /* cargo_ios */ = {
|
||||
isa = PBXLegacyTarget;
|
||||
buildArgumentsString = build_rust_deps.sh;
|
||||
buildConfigurationList = AA00A0CFDB11F37F2BA3FC2E /* Build configuration list for PBXLegacyTarget "cargo_ios" */;
|
||||
buildPhases = (
|
||||
FE045B3D04D57B713A565FF8 /* Sources */,
|
||||
);
|
||||
buildToolPath = /bin/sh;
|
||||
buildWorkingDirectory = .;
|
||||
dependencies = (
|
||||
);
|
||||
name = cargo_ios;
|
||||
passBuildSettingsInEnvironment = 1;
|
||||
productName = cargo_ios;
|
||||
};
|
||||
/* End PBXLegacyTarget section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
3BDB8152E4962373181B4FE5 /* mobile */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = E714A1AEAAE517C348B5BD27 /* Build configuration list for PBXNativeTarget "mobile" */;
|
||||
buildPhases = (
|
||||
9F13800790AD9DBC2BC0F116 /* Sources */,
|
||||
D5A822CB2D6847BA8800BE4C /* Frameworks */,
|
||||
57CD630D253C80E60098CD4A /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
19D4B9C22ADC6705B5132B4C /* PBXTargetDependency */,
|
||||
);
|
||||
name = mobile;
|
||||
productName = mobile;
|
||||
productReference = 55EAC02897847195D2F44C15 /* mobile.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
8DBF1E2B5C613DA41701F6D9 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1240;
|
||||
};
|
||||
buildConfigurationList = 9D43D41707A5C30B227B83F9 /* Build configuration list for PBXProject "mobile" */;
|
||||
compatibilityVersion = "Xcode 10.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
);
|
||||
mainGroup = 8F2E3E6040EAD2EC9F3FA530;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
3BDB8152E4962373181B4FE5 /* mobile */,
|
||||
D08AEBE0B1A9C9A7B8C7B33F /* cargo_ios */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
57CD630D253C80E60098CD4A /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
2469A42B2A6FAC7000ACF4EF /* LaunchScreen.storyboard in Resources */,
|
||||
2469A4292A6F9AC200ACF4EF /* Assets.xcassets in Resources */,
|
||||
57CD630E253C80EC0098CD4A /* assets in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
9F13800790AD9DBC2BC0F116 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
55892F1396056740E1AF9685 /* main.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FE045B3D04D57B713A565FF8 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
19D4B9C22ADC6705B5132B4C /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = D08AEBE0B1A9C9A7B8C7B33F /* cargo_ios */;
|
||||
targetProxy = 26BF2C4863C966DABAB40DC8 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
4AD7BC6FDD56FF18FA6DA7D7 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"DEBUG=1",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
5B14EC4ADC81FBF1F8CF20E9 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++11";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_BITCODE = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"ios-src/",
|
||||
);
|
||||
INFOPLIST_FILE = "ios-src/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"../target/aarch64-apple-ios/dist",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"../target/aarch64-apple-ios-sim/dist",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = (
|
||||
"$(inherited)",
|
||||
"../target/x86_64-apple-ios/dist",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-lmobile",
|
||||
"-lc++abi",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER /* Todo */ = com.opencodebox.tttce;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
79E3C28F06346EA58420A93D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_COMPILATION_MODE = wholemodule;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
8265913A25816D964A847F1B /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.rust.cargo-ios";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
A2D5B73DD30D562B6F366526 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "c++11";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
DEVELOPMENT_TEAM = "";
|
||||
ENABLE_BITCODE = NO;
|
||||
HEADER_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"ios-src/",
|
||||
);
|
||||
INFOPLIST_FILE = "ios-src/Info.plist";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphoneos*][arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"../target/aarch64-apple-ios/debug",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=arm64]" = (
|
||||
"$(inherited)",
|
||||
"../target/aarch64-apple-ios-sim/debug",
|
||||
);
|
||||
"LIBRARY_SEARCH_PATHS[sdk=iphonesimulator*][arch=x86_64]" = (
|
||||
"$(inherited)",
|
||||
"../target/x86_64-apple-ios/debug",
|
||||
);
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-lmobile",
|
||||
"-lc++abi",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER /* Todo */ = com.opencodebox.tttce;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FEA9B18D9236F9F6DC6DF799 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.rust.cargo-ios";
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
9D43D41707A5C30B227B83F9 /* Build configuration list for PBXProject "mobile" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
4AD7BC6FDD56FF18FA6DA7D7 /* Debug */,
|
||||
79E3C28F06346EA58420A93D /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
AA00A0CFDB11F37F2BA3FC2E /* Build configuration list for PBXLegacyTarget "cargo_ios" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
8265913A25816D964A847F1B /* Debug */,
|
||||
FEA9B18D9236F9F6DC6DF799 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
E714A1AEAAE517C348B5BD27 /* Build configuration list for PBXNativeTarget "mobile" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
A2D5B73DD30D562B6F366526 /* Debug */,
|
||||
5B14EC4ADC81FBF1F8CF20E9 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 8DBF1E2B5C613DA41701F6D9 /* Project object */;
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1310"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3BDB8152E4962373181B4FE5"
|
||||
BuildableName = "mobile.app"
|
||||
BlueprintName = "mobile"
|
||||
ReferencedContainer = "container:mobile.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3BDB8152E4962373181B4FE5"
|
||||
BuildableName = "mobile.app"
|
||||
BlueprintName = "mobile"
|
||||
ReferencedContainer = "container:mobile.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "3BDB8152E4962373181B4FE5"
|
||||
BuildableName = "mobile.app"
|
||||
BlueprintName = "mobile"
|
||||
ReferencedContainer = "container:mobile.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
20
mobile/src/lib.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use bevy::prelude::*;
|
||||
use bevy::window::WindowMode;
|
||||
use ttt-ce::GamePlugin; // ToDo: Replace ttt-ce with your new crate name.
|
||||
|
||||
#[bevy_main]
|
||||
fn main() {
|
||||
App::new()
|
||||
.add_plugins((
|
||||
DefaultPlugins.set(WindowPlugin {
|
||||
primary_window: Some(Window {
|
||||
resizable: false,
|
||||
mode: WindowMode::BorderlessFullscreen,
|
||||
..default()
|
||||
}),
|
||||
..default()
|
||||
}),
|
||||
GamePlugin,
|
||||
))
|
||||
.run()
|
||||
}
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
taken from Unity Assetstore https://assetstore.unity.com/packages/2d/textures-materials/gridbox-prototype-materials-129127
|
||||
creator: Ciathyza
|
||||
website: https://www.ciathyza.com/
|
||||
license: https://unity.com/legal/as-terms
|
||||
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 4.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 2.2 KiB |