Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ RUN dpkg --add-architecture i386 \
binutils-mipsel-linux-gnu \
binutils-powerpc-linux-gnu \
binutils-sh-elf \
bzip2 \
cpp \
dj64 \
dos2unix \
Expand Down Expand Up @@ -102,6 +103,11 @@ RUN wget "https://github.com/OmniBlade/binutils-gdb/releases/download/omf-build/
&& tar xvzf omftools-linux-x86_64.tar.gz -C /usr/bin omf-nm omf-objdump \
&& rm omftools-linux-x86_64.tar.gz

# Android binutils
RUN wget "https://github.com/decompme/compilers/releases/download/compilers/android-ndk-r8e-linux-x86_64.tar.bz2" \
&& bash -c 'tar xjvf android-ndk-r8e-linux-x86_64.tar.bz2 -C /usr/bin --strip-components=5 toolchains/x86-4.7/prebuilt/linux-x86_64/bin/i686-linux-android-{as,nm,objdump}' \
&& rm android-ndk-r8e-linux-x86_64.tar.bz2

RUN mkdir -p /etc/fonts

ENV WINEPREFIX=/tmp/wine
Expand Down
3 changes: 3 additions & 0 deletions backend/compilers/compilers.linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,6 @@ win32:
- msvc7.1
- msvc8.0
- msvc8.0p

android_x86:
- ndk-r8e-gcc-4.7
9 changes: 9 additions & 0 deletions backend/coreapp/compilers.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
Language,
)
from coreapp.platforms import (
ANDROID_X86,
GBA,
GC_WII,
IRIX,
Expand Down Expand Up @@ -1564,6 +1565,12 @@ def available_platforms() -> List[Platform]:
cc=BORLAND_MSDOS_CC,
)

ANDROID_R8E_C = GCCCompiler(
id="ndk-r8e-gcc-4.7",
platform=ANDROID_X86,
cc='"$COMPILER_DIR"/toolchains/x86-4.7/prebuilt/linux-x86_64/bin/i686-linux-android-gcc -c --sysroot="$COMPILER_DIR"/platforms/android-9/arch-x86 $COMPILER_FLAGS -o "$OUTPUT" "$INPUT"',
)

_all_compilers: List[Compiler] = [
DUMMY,
DUMMY_LONGRUNNING,
Expand Down Expand Up @@ -1804,6 +1811,8 @@ def available_platforms() -> List[Platform]:
# Borland, DOS
BORLAND_20_C,
BORLAND_31_C,
# GCC, Android
ANDROID_R8E_C,
]

_compilers = OrderedDict({c.id: c for c in _all_compilers if c.available()})
Expand Down
11 changes: 11 additions & 0 deletions backend/coreapp/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,16 @@ def from_id(platform_id: str) -> Platform:
has_decompiler=True,
)

ANDROID_X86 = Platform(
id="android_x86",
name="Android x86",
description="i686",
arch="i686",
assemble_cmd='i686-linux-android-as -o "$OUTPUT" "$PRELUDE" "$INPUT"',
objdump_cmd="i686-linux-android-objdump",
nm_cmd="i686-linux-android-nm",
)

_platforms: OrderedDict[str, Platform] = OrderedDict(
{
"dummy": DUMMY,
Expand All @@ -281,5 +291,6 @@ def from_id(platform_id: str) -> Platform:
"msdos": MSDOS,
"wiiu": WIIU,
"win32": WIN32,
"android_x86": ANDROID_X86,
}
)
2 changes: 2 additions & 0 deletions frontend/src/components/PlatformSelect/PlatformIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Link from "next/link";

import { platformUrl } from "@/lib/api/urls";

import LogoAndroid from "./android.svg";
import LogoDreamcast from "./dreamcast.svg";
import LogoGBA from "./gba.svg";
import LogoGCWii from "./gc_wii.svg";
Expand Down Expand Up @@ -38,6 +39,7 @@ const ICONS = {
switch: LogoSwitch,
saturn: LogoSaturn,
dreamcast: LogoDreamcast,
android_x86: LogoAndroid,
};

export const PLATFORMS = Object.keys(ICONS);
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/components/PlatformSelect/android.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions frontend/src/lib/i18n/locales/en/compilers.json
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,8 @@

"cygnus-2.7-96Q3": "cygnus-2.7-96Q3 SOA-960904",

"ndk-r8e-gcc-4.7": "Android NDK r8e (GCC 4.7)",

"armcc_opt_level": "Optimization level",
"armcc_opt_level.-O0": "No optimization",
"armcc_opt_level.-O1": "Some optimization",
Expand Down