Xserver: work-in-progress update

This commit is contained in:
Sergii Pylypenko
2019-02-18 22:09:59 +02:00
parent 8be8471285
commit e887896edf
7 changed files with 84 additions and 87 deletions

View File

@@ -7,17 +7,19 @@ AppName="XServer XSDL"
AppFullName=x.org.server
# Application version code (integer)
AppVersionCode=11140
AppVersionCode=12041
# Application user-visible version name (string)
AppVersionName="1.11.40"
AppVersionName="1.20.41"
# Specify path to download application data in zip archive in the form 'Description|URL|MirrorURL^Description2|URL2|MirrorURL2^...'
# If you'll start Description with '!' symbol it will be enabled by default, other downloads should be selected by user from startup config menu
# If you'll start Description with '!' symbol it will be enabled by default, '!!' will also hide the entry from the menu, so it cannot be disabled
# If the URL in in the form ':dir/file.dat:http://URL/' it will be downloaded as binary BLOB to the application dir and not unzipped
# If the URL does not contain 'http://' it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by build system
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version, first associated with the file
# If the URL does not contain 'http://' or 'https://', it is treated as file from 'project/jni/application/src/AndroidData' dir -
# these files are put inside .apk package by the build system
# You can specify Google Play expansion files in the form 'obb:main.12345' or 'obb:patch.12345' where 12345 is the app version for obb file
# You can use .zip.xz archives for better compression, but you need to add 'lzma' to CompiledLibraries
# Generate .zip.xz files like this: zip -0 -r data.zip your-data/* ; xz -8 data.zip
AppDataDownloadUrl="!!Data files|:data.tar.gz:data-1.tgz^!!Data files|:DroidSansMono.ttf:DroidSansMono.ttf^Additional fonts (90Mb)|:xfonts.tar.gz:http://sourceforge.net/projects/libsdl-android/files/apk/XServer-XSDL/xfonts.tgz/download"
# Reset SDL config when updating application to the new version (y) / (n)
@@ -46,10 +48,17 @@ NeedDepthBuffer=n
# Enable OpenGL stencil buffer (needed only for 3-d applications, small speed decrease) (y) or (n)
NeedStencilBuffer=n
# Try to use GLES 2.x context - will revert to GLES 1.X if unsupported by device
# Use GLES 2.x context
# you need this option only if you're developing 3-d app (y) or (n)
NeedGles2=n
# Use GLES 3.x context
# you need this option only if you're developing 3-d app (y) or (n)
NeedGles3=n
# Use gl4es library for provide OpenGL 1.x functionality to OpenGL ES accelerated cards (y) or (n)
UseGl4es=
# Application uses software video buffer - you're calling SDL_SetVideoMode() without SDL_HWSURFACE and without SDL_OPENGL,
# this will allow small speed optimization. Enable this even when you're using SDL_HWSURFACE. (y) or (n)
SwVideoMode=y
@@ -80,6 +89,14 @@ CompatibilityHacksStaticInit=n
# On-screen Android soft text input emulates hardware keyboard, this will only work with Hackers Keyboard app (y)/(n)
CompatibilityHacksTextInputEmulatesHwKeyboard=y
# Built-in text input keyboards with custom layouts for emulators, requires CompatibilityHacksTextInputEmulatesHwKeyboard=y
# 0 or empty - standard Android keyboard
# 1 - Simple QWERTY keyboard, no function keys, no arrow keys
# 2 - Commodore 64 keyboard
# 3 - Amiga keyboard
# 4 - Atari800 keyboard
TextInputKeyboard=
# Hack for broken devices: prevent audio chopping, by sleeping a bit after pushing each audio chunk (y)/(n)
CompatibilityHacksPreventAudioChopping=n
@@ -148,8 +165,11 @@ AppUsesAccelerometer=n
# Application uses gyroscope (y) or (n), the gyroscope will be used as joystick 1 axes 2-4
AppUsesGyroscope=n
# Application uses orientation sensor (y) or (n), reported as joystick 1 axes 8-10
AppUsesOrientationSensor=
# Use gyroscope to move mouse cursor (y) or (n), it eats battery, and can be disabled in settings, do not use with AppUsesGyroscope setting
MoveMouseWithGyroscope=y
MoveMouseWithGyroscope=n
# Application uses multitouch (y) or (n), multitouch events are passed as SDL_JOYBALLMOTION events for the joystick 0
AppUsesMultitouch=y
@@ -159,15 +179,21 @@ AppUsesMultitouch=y
# This option will add additional permission to Android manifest (y)/(n)
AppRecordsAudio=n
# Application needs to access SD card. If your data files are bigger than 5 Mb, enable it. (y) / (n)
# Application needs read/write access SD card. Always disable it, unless you want to access user photos and downloads. (y) / (n)
AccessSdCard=n
# Application needs to read it's own OBB file. Enable this if you are using Play Store expansion files. (y) / (n)
ReadObbFile=
# Application needs Internet access. If you disable it, you'll have to bundle all your data files inside .apk (y) / (n)
AccessInternet=y
# Immersive mode - Android will hide on-screen Home/Back keys. Looks bad if you invoke Android keyboard. (y) / (n)
ImmersiveMode=y
# Hide Android system mouse cursor image when USB mouse is attached (y) or (n) - the app must draw it's own mouse cursor
HideSystemMousePointer=
# Application implements Android-specific routines to put to background, and will not draw anything to screen
# between SDL_ACTIVEEVENT lost / gained notifications - you should check for them
# rigth after SDL_Flip(), if (n) then SDL_Flip() will block till app in background (y) or (n)
@@ -196,37 +222,57 @@ RedefinedKeysScreenKbNames="LCTRL LALT LSHIFT RETURN SPACE DELETE KP_PLUS KP_MIN
# 2 = Sun by Sirea (yellow, with round joystick)
# 3 = Keen by Gerstrong (multicolor, with round joystick)
# 4 = Retro by Santiago Radeff (red/white, with cross joystick)
# 5 = GameBoy from RetroArch
# 6 = PlayStation from RetroArch
# 7 = SuperNintendo from RetroArch
# 8 = DualShock from RetroArch
# 9 = Nintendo64 from RetroArch
TouchscreenKeysTheme=0
# Redefine gamepad keys to SDL keysyms, button order is:
# A B X Y L1 R1 L2 R2 LThumb RThumb
# A B X Y L1 R1 L2 R2 LThumb RThumb Start Select Up Down Left Right LThumbUp LThumbDown LThumbLeft LThumbRight RThumbUp RThumbDown RThumbLeft RThumbRight
RedefinedKeysGamepad="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS KP_MINUS 1 2"
# Redefine keys for the second gamepad, same as the first gamepad if not set:
RedefinedKeysSecondGamepad=""
# Redefine keys for the third gamepad, same as the first gamepad if not set:
RedefinedKeysThirdGamepad=""
# Redefine keys for the fourth gamepad, same as the first gamepad if not set:
RedefinedKeysFourthGamepad=""
# How long to show startup menu button, in msec, 0 to disable startup menu
StartupMenuButtonTimeout=3000
# Menu items to hide from startup menu, available menu items:
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
HiddenMenuOptions=''
# Menu items to show at startup - this is Java code snippet, leave empty for default
# new SettingsMenuMisc.ShowReadme(), (AppUsesMouse \&\& \! ForceRelativeMouseMode \? new SettingsMenuMouse.DisplaySizeConfig(true) : new SettingsMenu.DummyMenu()), new SettingsMenuMisc.OptionalDownloadConfig(true), new SettingsMenuMisc.GyroscopeCalibration()
# Available menu items:
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
FirstStartMenuOptions='SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.OptionalDownloadConfig'
# SettingsMenu.OkButton SettingsMenu.DummyMenu SettingsMenu.MainMenu SettingsMenuMisc.DownloadConfig SettingsMenuMisc.OptionalDownloadConfig SettingsMenuMisc.AudioConfig SettingsMenuMisc.VideoSettingsConfig SettingsMenuMisc.ShowReadme SettingsMenuMisc.GyroscopeCalibration SettingsMenuMisc.CommandlineConfig SettingsMenuMisc.ResetToDefaultsConfig SettingsMenuMouse.MouseConfigMainMenu SettingsMenuMouse.DisplaySizeConfig SettingsMenuMouse.LeftClickConfig SettingsMenuMouse.RightClickConfig SettingsMenuMouse.AdditionalMouseConfig SettingsMenuMouse.JoystickMouseConfig SettingsMenuMouse.TouchPressureMeasurementTool SettingsMenuMouse.CalibrateTouchscreenMenu SettingsMenuKeyboard.KeyboardConfigMainMenu SettingsMenuKeyboard.ScreenKeyboardSizeConfig SettingsMenuKeyboard.ScreenKeyboardDrawSizeConfig SettingsMenuKeyboard.ScreenKeyboardThemeConfig SettingsMenuKeyboard.ScreenKeyboardTransparencyConfig SettingsMenuKeyboard.RemapHwKeysConfig SettingsMenuKeyboard.RemapScreenKbConfig SettingsMenuKeyboard.ScreenGesturesConfig SettingsMenuKeyboard.CustomizeScreenKbLayout SettingsMenuKeyboard.ScreenKeyboardAdvanced
FirstStartMenuOptions='SettingsMenuMisc.OptionalDownloadConfig'
# Minimum amount of RAM application requires, in Mb, SDL will print warning to user if it's lower
AppMinimumRAM=0
# GCC version, 4.6 (default) or 4.8, CLANG is not supported yet
NDK_TOOLCHAIN_VERSION=
# GCC version, or 'clang' for CLANG
NDK_TOOLCHAIN_VERSION=clang
# Android platform version.
# android-16 = Android 4.1, the earliest supported version in NDK r18.
# android-18 = Android 4.3, the first version supporting GLES3.
# android-21 = Android 5.1, the first version with SO_REUSEPORT defined.
APP_PLATFORM=
# Specify architectures to compile, 'all' or 'y' to compile for all architectures.
# Available architectures: armeabi armeabi-v7a armeabi-v7a-hard x86 mips
MultiABI='armeabi-v7a x86'
# Available architectures: armeabi-v7a arm64-v8a x86 x86_64
MultiABI='arm64-v8a' # armeabi-v7a arm64-v8a x86 x86_64
# Optional shared libraries to compile - removing some of them will save space
# MP3 support by libMAD is encumbered by patents and libMAD is GPL-ed
# MP3 patents are expired, but libmad license is GPL, not LGPL
# Available libraries: mad (GPL-ed!) sdl_mixer sdl_image sdl_ttf sdl_net sdl_blitpool sdl_gfx sdl_sound intl xml2 lua jpeg png ogg flac tremor vorbis freetype xerces curl theora fluidsynth lzma lzo2 mikmod openal timidity zzip bzip2 yaml-cpp python boost_date_time boost_filesystem boost_iostreams boost_program_options boost_regex boost_signals boost_system boost_thread glu avcodec avdevice avfilter avformat avresample avutil swscale swresample bzip2
CompiledLibraries="jpeg png freetype sdl_ttf crypto"
@@ -236,6 +282,9 @@ CustomBuildScript=y
# Aditional CFLAGS for application
AppCflags=''
# Aditional C++-specific compiler flags for application, added after AppCflags
AppCppflags=''
# Additional LDFLAGS for application
AppLdflags=''
@@ -267,3 +316,6 @@ AdmobBannerSize=
# Google Play Game Services application ID, required for cloud saves to work
GooglePlayGameServicesId=
# The app will open files with following extension, file path will be added to commandline params
AppOpenFileExtension=''

View File

@@ -4,6 +4,7 @@ CURDIR=`pwd`
PACKAGE_NAME=`grep AppFullName AndroidAppSettings.cfg | sed 's/.*=//'`
if false; then # Disable PulseAudio for now
if [ -e pulseaudio/android-build.sh ]; then
[ -e pulseaudio/$1/install/bin/pulseaudio ] || {
cd pulseaudio
@@ -11,6 +12,7 @@ if [ -e pulseaudio/android-build.sh ]; then
cd ..
} || exit 1
fi
fi # Disable PulseAudio for now
../setEnvironment-$1.sh sh -c '\
$CC $CFLAGS -Werror=format -c main.c -o main-'"$1.o" || exit 1
@@ -35,10 +37,6 @@ cd android
cd ..
} || exit 1
cd $1
[ -e libfontenc-*/Makefile ] && {
grep "/proc/self/cwd" libfontenc-*/Makefile || \
git clean -f -d -x .
}
# Megahack: set /proc/self/cwd as the X.org data dir, and chdir() to the correct directory when runngin X.org
env TARGET_DIR=/proc/self/cwd \
@@ -85,16 +83,9 @@ mkdir -p usr/bin
# Executables linked with NDK, which crash on Lollipop.
for f in xhost xkbcomp xli xsel; do cp -f $CURDIR/xserver/android/$1/$f ./usr/bin/$f ; done
# Statically-linked prebuilt executables, generated using Debian chroot.
# There are no executables for old ARMv5, so we'll use NDK executables instead for that arch.
#for f in xhost xkbcomp xli xsel; do cp $CURDIR/xserver/data/$f-$1 ./usr/bin/$f ; done
rm -f ../AndroidData/binaries-$1.zip
zip -r ../AndroidData/binaries-$1.zip .
# Executables linked with NDK with -pie, which crash on pre-Lollipop.
for f in xhost xkbcomp xli xsel; do rm ./usr/bin/$f ; cp -f $CURDIR/xserver/android/$1/pie/$f ./usr/bin/$f ; done
cp $CURDIR/xserver/data/busybox-$1-pie ./busybox
# PulseAudio - PIE only
mkdir -p pulse
if false; then # Disable PulseAudio for now
cp -f $CURDIR/pulseaudio/$1/install/bin/pulseaudio pulse/
cp -f $CURDIR/pulseaudio/$1/install/lib/libpulse.so.0.18.2 pulse/libpulse.so.0
#ln -sf libpulse.so.0.18.2 pulse/libpulse.so.0
@@ -104,9 +95,10 @@ cp -f $CURDIR/pulseaudio/$1/install/lib/pulseaudio/libpulsecommon-7.0.so pulse/
for F in $CURDIR/pulseaudio/$1/install/lib/pulse-7.0/modules/*.so; do
cp -f $F pulse/
done
fi # Disable PulseAudio for now
cp -f $CURDIR/pulseaudio/android-pulseaudio.conf pulse/pulseaudio.conf
rm -f ../AndroidData/binaries-$1-pie.zip
zip -r ../AndroidData/binaries-$1-pie.zip .
rm -f ../AndroidData/binaries-$1.zip
zip -r ../AndroidData/binaries-$1.zip .
exit 0

View File

@@ -113,7 +113,7 @@ static int unpackFiles(const char *archive, const char *script, const char *dele
if( (uint64_t)freeSpace.f_bsize * (uint64_t)freeSpace.f_bavail < (uint64_t)freeSpaceRequiredMb * 1024 * 1024 )
{
sprintf(unpackLog[0], "Error: not enough free space on internal storage");
sprintf(unpackLog[1], "Available %llu Mb, required %d Mb", (uint64_t)freeSpace.f_bsize * freeSpace.f_bavail / 1024 / 1024, freeSpaceRequiredMb);
sprintf(unpackLog[1], "Available %llu Mb, required %d Mb", (long long)freeSpace.f_bsize * freeSpace.f_bavail / 1024 / 1024, freeSpaceRequiredMb);
sprintf(unpackLog[2], "Uninstall large apps to free more space on internal storage");
sleep(1);
continue;

View File

@@ -34,7 +34,7 @@ int main( int argc, char* argv[] )
port,
"-nolock",
"-noreset",
"-nopn",
"-pn",
"-nolisten",
"unix",
"-fp",

View File

@@ -1,9 +1,6 @@
You will need to install some packages to your Debian/Ubuntu first.
You will need both xcb-proto and python-xcbgen packages to have version 1.10-1 or newer,
so you need to build on at least Debian Jessie or newer distribution.
Install following packages, assuming fresh Debian Jessie installation for x86_64 architecture:
Install following packages, assuming fresh Debian 9 installation for x86_64 architecture:
sudo dpkg --add-architecture i386
sudo apt-get update
@@ -15,8 +12,9 @@ x11proto-record-dev x11proto-render-dev x11proto-resource-dev x11proto-scrnsaver
x11proto-video-dev x11proto-xcmisc-dev x11proto-xext-dev x11proto-xf86bigfont-dev \
x11proto-xf86dga-dev x11proto-xf86dri-dev x11proto-xf86vidmode-dev x11proto-xinerama-dev \
libxmuu-dev libxt-dev libsm-dev libice-dev libxrender-dev libxrandr-dev xfonts-utils \
curl autoconf automake libtool pkg-config libjpeg-dev libpng-dev git mc locales \
openjdk-7-jdk ant make zip libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
curl autoconf autoconf2.59 automake automake1.11 libtool libtool-bin pkg-config \
libjpeg-dev libpng-dev git mc locales \
openjdk-8-jdk ant make zip libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Install Android NDK r11c and Android SDK with Android 6.0 framework, they must be in your $PATH.
@@ -30,48 +28,3 @@ ln -s xserver project/jni/application/src
./build.sh
That's all.
Following instructions are to set up a fresh compilation environment inside a chroot,
use them only if you fail to build on your current setup.
Install debootstrap and schroot onto your host Debian or Ubuntu:
sudo apt-get install schroot debootstrap
sudo debootstrap --arch=amd64 --components=sudo jessie jessie-x64 http://ftp.de.debian.org/debian/
Configure schroot to log into it - add file /etc/schroot/chroot.d/jessie-x64.conf with following content:
[jessie-x64]
description=Debian Jessie x64
type=directory
directory=/path/to/jessie-x64
users=your-user-ID
groups=your-user-ID
root-groups=root
aliases=x64
Log into it with command
schroot -c jessie-x64
Configure apt sources in the resulting Jessie installation - edit file /etc/apt/sources.list to look like this:
deb http://ftp.de.debian.org/debian/ jessie contrib main non-free
deb-src http://ftp.de.debian.org/debian/ jessie main contrib
deb http://security.debian.org/ jessie/updates contrib main non-free
deb-src http://security.debian.org/ jessie/updates main contrib
deb http://ftp.de.debian.org/debian/ jessie-updates contrib main non-free
deb-src http://ftp.de.debian.org/debian/ jessie-updates main contrib
deb http://ftp.de.debian.org/debian/ jessie-backports contrib main non-free
deb-src http://ftp.de.debian.org/debian/ jessie-backports contrib main
Install necessary Debian packages, as described above.
Configure locales with command:
sudo dpkg-reconfigure locales
Select en_US.UTF-8, we don't need any weird non-English languages here.
Exit chroot and log into it again.
Install Android NDK r10e and Android SDK with Android 5.1 framework, they must be in your $PATH.
Then download SDL repo, select xserver project, and build it, as described above.