diff --git a/.github/workflows/ci-docker.yml b/.github/workflows/ci-docker.yml index ef955c806..66946cf91 100644 --- a/.github/workflows/ci-docker.yml +++ b/.github/workflows/ci-docker.yml @@ -5,7 +5,7 @@ jobs: docker: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - name: Build the Docker image diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index e3725534f..96d2e36c5 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -21,7 +21,7 @@ jobs: fxcg: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - name: Install dependencies @@ -36,7 +36,7 @@ jobs: id: get-latest-commit-hash - name: Cache gint/fxsdk installation id: cache-gint - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: | ~/.local/*/* @@ -72,7 +72,7 @@ jobs: path: 'output/release/simulator/fxcg/epsilon.g3a' destination: 'upsilon-binfiles.appspot.com/dev/simulator/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon.g3a path: output/release/simulator/fxcg/epsilon.g3a @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest container: devkitpro/devkitarm:latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 with: submodules: true - run: sudo apt-get update @@ -94,20 +94,25 @@ jobs: - run: echo "PATH=.:$PATH" >> $GITHUB_ENV - run: make -j2 PLATFORM=simulator TARGET=3ds - run: make -j2 PLATFORM=simulator TARGET=3ds epsilon.cia - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-3ds.3dsx path: output/release/simulator/3ds/epsilon.3dsx - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-3ds.cia path: output/release/simulator/3ds/epsilon.cia android: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'temurin' - run: wget -nv https://dl.google.com/android/repository/android-ndk-r21e-linux-x86_64.zip - run: unzip -q android-ndk-r21e-linux-x86_64.zip - run: make -j2 PLATFORM=simulator TARGET=android NDK_PATH=./android-ndk-r21e @@ -123,7 +128,7 @@ jobs: path: 'output/release/simulator/android/epsilon.apk' destination: 'upsilon-binfiles.appspot.com/dev/simulator/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-android.apk path: output/release/simulator/android/epsilon.apk @@ -132,7 +137,7 @@ jobs: steps: - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config - uses: numworks/setup-arm-toolchain@2020-q2 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: mkdir final-output @@ -176,7 +181,7 @@ jobs: path: 'final-output/' destination: 'upsilon-binfiles.appspot.com/dev/n100/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-binpack-n0100.tgz path: binpack-n0100.tgz @@ -185,7 +190,7 @@ jobs: steps: - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config - uses: numworks/setup-arm-toolchain@2020-q2 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: make -j2 MODEL=n0110 epsilon.dfu @@ -211,7 +216,7 @@ jobs: path: 'output/release/device/n0110/binpack/' destination: 'upsilon-binfiles.appspot.com/dev/n110/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-binpack-n0110.tgz path: output/release/device/n0110/binpack-n0110.tgz @@ -220,7 +225,7 @@ jobs: steps: - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config - uses: numworks/setup-arm-toolchain@2022-08 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: make -j2 MODEL=n0110 bootloader @@ -249,7 +254,7 @@ jobs: path: 'output/release/device/bootloader/binpack/' destination: 'upsilon-binfiles.appspot.com/dev/n110/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-binpack-bootloader.tgz path: output/release/device/bootloader/binpack-bootloader.tgz @@ -260,7 +265,7 @@ jobs: shell: msys2 {0} steps: - uses: msys2/setup-msys2@v2 - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: pacman -S --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-freetype mingw-w64-x86_64-pkg-config make mingw-w64-x86_64-python3 mingw-w64-x86_64-libjpeg-turbo mingw-w64-x86_64-libpng @@ -279,7 +284,7 @@ jobs: path: 'output/release/simulator/windows/epsilon.exe' destination: 'upsilon-binfiles.appspot.com/dev/simulator/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-windows.exe path: output/release/simulator/windows/epsilon.exe @@ -289,7 +294,7 @@ jobs: - uses: numworks/setup-emscripten@master with: sdk: latest - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: make -j2 PLATFORM=simulator TARGET=web @@ -307,7 +312,7 @@ jobs: path: 'output/release/simulator/web/epsilon.js' destination: 'upsilon-binfiles.appspot.com/dev/simulator/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-web.zip path: output/release/simulator/web/epsilon.zip @@ -315,7 +320,7 @@ jobs: runs-on: ubuntu-latest steps: - run: sudo apt-get install build-essential imagemagick libfreetype6-dev libjpeg-dev libpng-dev pkg-config - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: make -j2 PLATFORM=simulator @@ -333,7 +338,7 @@ jobs: path: 'output/release/simulator/linux/epsilon.bin' destination: 'upsilon-binfiles.appspot.com/dev/simulator/' parent: false - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-linux.bin path: output/release/simulator/linux/epsilon.bin @@ -342,13 +347,13 @@ jobs: runs-on: macOS-latest steps: - run: brew install numworks/tap/epsilon-sdk - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: make -j2 PLATFORM=simulator - run: make -j2 PLATFORM=simulator ARCH=x86_64 test.bin - run: output/release/simulator/macos/x86_64/test.bin --headless - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-macos.zip path: output/release/simulator/macos/epsilon.app @@ -357,12 +362,12 @@ jobs: runs-on: macOS-latest steps: - run: brew install numworks/tap/epsilon-sdk - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: 'recursive' - run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0 - run: make -j2 PLATFORM=simulator TARGET=ios EPSILON_TELEMETRY=0 APPLE_PLATFORM=ios-simulator - - uses: actions/upload-artifact@master + - uses: actions/upload-artifact@v4 with: name: epsilon-ios.ipa path: output/release/simulator/ios/epsilon.ipa diff --git a/.github/workflows/metric-workflow.yml b/.github/workflows/metric-workflow.yml index d7ec925fc..f199333ef 100644 --- a/.github/workflows/metric-workflow.yml +++ b/.github/workflows/metric-workflow.yml @@ -10,7 +10,7 @@ jobs: - name: Install ARM toolchain uses: numworks/setup-arm-toolchain@2020-q2 - name: Checkout PR base - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.event.pull_request.base.sha }} @@ -18,7 +18,7 @@ jobs: - name: Build base run: make -j2 -C base MODEL=n0110 epsilon.elf - name: Checkout PR head - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: recursive ref: ${{ github.event.pull_request.head.sha }} @@ -29,7 +29,7 @@ jobs: id: binary_size run: echo "::set-output name=table::$(python3 head/build/metrics/binary_size.py base/output/release/device/n0110/epsilon.elf head/output/release/device/n0110/epsilon.elf --labels Base Head --sections .text .rodata .bss .data --custom 'Total (RAM)' .data .bss --custom 'Total (ROM)' .text .rodata .data --escape)" - name: Add comment - uses: actions/github-script@v3.0.0 + uses: actions/github-script@v7 with: script: | await github.issues.createComment({ diff --git a/README.md b/README.md index aae0fa244..12e88da60 100644 --- a/README.md +++ b/README.md @@ -264,7 +264,7 @@ git checkout upsilon-dev ```bash make MODEL=n0100 clean -make MODEL=n0100 EPSILON_I18N=en OMEGA_USERNAME="{Your name, max 15 characters}" -j(nproc) +make MODEL=n0100 EPSILON_I18N=en OMEGA_USERNAME="{Your name, max 15 characters}" -j$(nproc) ``` Now, run either: @@ -280,7 +280,7 @@ to directly flash the calculator after pressing simultaneously `reset` and `6` b or: ```bash -make MODEL=n0100 OMEGA_USERNAME="" binpack -j(nproc) +make MODEL=n0100 OMEGA_USERNAME="" binpack -j$(nproc) ``` to make binpack which you can flash to the calculator from [TI-Planet's WebDFU](https://ti-planet.github.io/webdfu_numworks/n0100/). Binpacks are a great way to share a custom build of Upsilon to friends. @@ -417,7 +417,7 @@ You need devkitPro and devkitARM installed and in your path (instructions [here] git clone --recursive https://github.com/UpsilonNumworks/Upsilon.git cd Upsilon git checkout upsilon-dev -make PLATFORM=simulator TARGET=3ds -j(nproc) +make PLATFORM=simulator TARGET=3ds -j$(nproc) ``` You can then put epsilon.3dsx on a SD card to run it from the HBC or use 3dslink to launch it over the network: diff --git a/ion/src/simulator/android/Makefile b/ion/src/simulator/android/Makefile index 121fa7122..4de622359 100644 --- a/ion/src/simulator/android/Makefile +++ b/ion/src/simulator/android/Makefile @@ -30,11 +30,11 @@ ifndef ARCH $(BUILD_DIR)/app/res/mipmap/ic_launcher.png: ion/src/simulator/assets/logo.svg | $$(@D)/. $(call rule_label,CONVERT) - $(Q) convert -background "#b1403b" $< $@ + $(Q) convert -background "#5c83ab" $< $@ $(BUILD_DIR)/app/res/mipmap-v26/ic_launcher_foreground.png: ion/src/simulator/assets/logo.svg | $$(@D)/. $(call rule_label,CONVERT) - $(Q) convert -background none $< -resize 1024x1024 -gravity center -background none -extent 1024x1024 $@ + $(Q) convert -background none $< -resize 694x694 -gravity center -background none -extent 1024x1024 $@ $(BUILD_DIR)/app/res/mipmap-v26/ic_launcher_monochrome.png: ion/src/simulator/assets/logo_monochrome.svg | $$(@D)/. $(call rule_label,CONVERT) @@ -68,7 +68,7 @@ apk_deps += $(addprefix $(BUILD_DIR)/app/res/,mipmap/ic_launcher.png mipmap-v26/ $(BUILD_DIR)/%.apk: $(apk_deps) $(call rule_label,GRADLE) - $(Q) ANDROID_HOME=$(ANDROID_HOME) EPSILON_VERSION=$(EPSILON_VERSION) OMEGA_VERSION=$(OMEGA_VERSION) BUILD_DIR=$(BUILD_DIR) EPSILON_VARIANT=$* ion/src/simulator/android/gradlew -b ion/src/simulator/android/build.gradle assembleRelease + $(Q) ANDROID_HOME=$(ANDROID_HOME) UPSILON_VERSION=$(UPSILON_VERSION) BUILD_DIR=$(BUILD_DIR) EPSILON_VARIANT=$* ion/src/simulator/android/gradlew -p ion/src/simulator/android assembleRelease $(Q) cp $(BUILD_DIR)/app/outputs/apk/release/android-release*.apk $@ endif diff --git a/ion/src/simulator/android/build.gradle b/ion/src/simulator/android/build.gradle index 51db00a13..5c29edb38 100644 --- a/ion/src/simulator/android/build.gradle +++ b/ion/src/simulator/android/build.gradle @@ -12,18 +12,17 @@ def fileIfPath(path) { buildscript { repositories { - jcenter() + mavenCentral() google() } dependencies { - classpath 'com.android.tools.build:gradle:3.2.0' - classpath 'com.google.gms:google-services:4.2.0' + classpath 'com.android.tools.build:gradle:8.7.1' } } allprojects { repositories { - jcenter() + mavenCentral() google() } buildDir = BUILD_DIR @@ -32,14 +31,15 @@ allprojects { apply plugin: 'com.android.application' android { - compileSdkVersion 29 + namespace = "io.github.upsilon.simulator" + compileSdkVersion 35 defaultConfig { applicationId "io.github.upsilon.simulator" - minSdkVersion 16 - targetSdkVersion 29 - def (major, minor, patch) = System.getenv('OMEGA_VERSION').toLowerCase().tokenize('.').collect{it.toInteger()} - versionCode major*1000000 + minor*10000 + patch * 100 - versionName System.getenv('OMEGA_VERSION') + minSdkVersion 21 + targetSdkVersion 33 + def d=new Date() + versionCode Instant.now().getEpochSecond().toInteger() + versionName LocalDate.now().format("yyyyMMdd")+'-'+System.getenv('UPSILON_VERSION') } signingConfigs { environment { @@ -77,6 +77,8 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation "androidx.appcompat:appcompat:1.0.2" - implementation "com.google.android.gms:play-services-analytics:16.0.7" + implementation "androidx.appcompat:appcompat:1.7.0" + implementation(platform("org.jetbrains.kotlin:kotlin-bom:2.0.21")) } + +java{toolchain{languageVersion=JavaLanguageVersion.of(21)}} diff --git a/ion/src/simulator/android/gradle/wrapper/gradle-wrapper.properties b/ion/src/simulator/android/gradle/wrapper/gradle-wrapper.properties index 44e7c4d1d..1e2fbf0d4 100644 --- a/ion/src/simulator/android/gradle/wrapper/gradle-wrapper.properties +++ b/ion/src/simulator/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/ion/src/simulator/android/src/AndroidManifest.xml b/ion/src/simulator/android/src/AndroidManifest.xml index 6472b33c2..45e5a672b 100644 --- a/ion/src/simulator/android/src/AndroidManifest.xml +++ b/ion/src/simulator/android/src/AndroidManifest.xml @@ -1,6 +1,5 @@ @@ -23,6 +22,7 @@ android:alwaysRetainTaskState="true" android:launchMode="singleInstance" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" + android:exported="true" > diff --git a/ion/src/simulator/android/src/java/io/github/upsilon/simulator/UpsilonActivity.java b/ion/src/simulator/android/src/java/io/github/upsilon/simulator/UpsilonActivity.java index f1d3716b6..7b1a9c53b 100644 --- a/ion/src/simulator/android/src/java/io/github/upsilon/simulator/UpsilonActivity.java +++ b/ion/src/simulator/android/src/java/io/github/upsilon/simulator/UpsilonActivity.java @@ -11,10 +11,6 @@ import android.os.Bundle; import android.provider.Settings; import android.util.Log; -import com.google.android.gms.analytics.GoogleAnalytics; -import com.google.android.gms.analytics.Tracker; -import com.google.android.gms.analytics.HitBuilders; - import org.libsdl.app.SDLActivity; import org.libsdl.app.SDL; diff --git a/ion/src/simulator/android/src/res/mipmap-v26/ic_launcher.xml b/ion/src/simulator/android/src/res/mipmap-v26/ic_launcher.xml index 58012921e..8b5c4f9f6 100644 --- a/ion/src/simulator/android/src/res/mipmap-v26/ic_launcher.xml +++ b/ion/src/simulator/android/src/res/mipmap-v26/ic_launcher.xml @@ -1,6 +1,6 @@ - + diff --git a/ion/src/simulator/android/src/res/values/colors.xml b/ion/src/simulator/android/src/res/values/colors.xml deleted file mode 100644 index 84a334839..000000000 --- a/ion/src/simulator/android/src/res/values/colors.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - #5c83ab - #F7F7F7 - diff --git a/ion/src/simulator/android/src/res/values/styles.xml b/ion/src/simulator/android/src/res/values/resources.xml similarity index 77% rename from ion/src/simulator/android/src/res/values/styles.xml rename to ion/src/simulator/android/src/res/values/resources.xml index b787ddffb..d5a665be2 100644 --- a/ion/src/simulator/android/src/res/values/styles.xml +++ b/ion/src/simulator/android/src/res/values/resources.xml @@ -1,8 +1,10 @@ + Upsilon + #5c83ab