Xserver-xsdl: updated readme

This commit is contained in:
pelya
2013-11-10 19:28:15 +02:00
parent e7224edb76
commit 24ee82b65d
2 changed files with 30 additions and 8 deletions

View File

@@ -40,15 +40,15 @@ img-gimp-wheezy.sh
from directory img. from directory img.
This will create Debian system image under directory This will create Debian system image under directory
dist-debug-wheezy-armhf-gimp. Execute commands (<SDL> is path to this repo): dist-gimp-wheezy. Execute commands (<SDL> is path to this repo):
sudo cp -a <SDL>/project/jni/application/src/xserver/data/usr/ dist-debug-wheezy-armhf-gimp/ sudo cp -a <SDL>/project/jni/application/src/xserver/data/usr/ dist-gimp-wheezy/
sudo cp -a <SDL>/project/jni/application/src/xserver/android/xhost dist-debug-wheezy-armhf-gimp/usr/bin/ sudo cp -a <SDL>/project/jni/application/src/xserver/android/xhost dist-gimp-wheezy/usr/bin/
sudo cp -a <SDL>/project/jni/application/src/xserver/android/xkbcomp dist-debug-wheezy-armhf-gimp/usr/bin/ sudo cp -a <SDL>/project/jni/application/src/xserver/android/xkbcomp dist-gimp-wheezy/usr/bin/
sudo cp -a <SDL>/project/jni/application/src/xserver/android/xli dist-debug-wheezy-armhf-gimp/usr/bin/ sudo cp -a <SDL>/project/jni/application/src/xserver/android/xli dist-gimp-wheezy/usr/bin/
cd dist-debug-wheezy-armhf-gimp cd dist-gimp-wheezy
sudo tar cvzf ../dist-debug-wheezy-armhf-gimp.tar.gz * sudo tar cvzf ../dist-gimp-wheezy.tar.gz *
Upload resulting system image somewhere, and change download URL inside Upload resulting system image somewhere, and change download URL inside
AndroidAppSettings.cfg, then recompile .apk file. AndroidAppSettings.cfg, then recompile .apk file.

View File

@@ -39,12 +39,15 @@ void * unpackFilesThread(void * unused)
return 1; return 1;
} }
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Unpacking data");
strcpy( fname, getenv("SECURE_STORAGE_DIR") ); strcpy( fname, getenv("SECURE_STORAGE_DIR") );
strcat( fname, "/busybox" ); strcat( fname, "/busybox" );
FILE * ff = fopen("busybox", "rb"); FILE * ff = fopen("busybox", "rb");
FILE * fo = fopen(fname, "wb"); FILE * fo = fopen(fname, "wb");
if( !ff || !fo ) if( !ff || !fo )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Cannot copy busybox");
unpackFinished = 1; unpackFinished = 1;
return 0; return 0;
} }
@@ -55,6 +58,7 @@ void * unpackFilesThread(void * unused)
int cnt = fread( buf, 1, sizeof(buf), ff ); int cnt = fread( buf, 1, sizeof(buf), ff );
if( cnt < 0 ) if( cnt < 0 )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Cannot copy busybox");
unpackFinished = 1; unpackFinished = 1;
return 1; return 1;
} }
@@ -68,6 +72,7 @@ void * unpackFilesThread(void * unused)
if( chmod(fname, 0755) != 0 ) if( chmod(fname, 0755) != 0 )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Cannot chmod busybox");
unpackFinished = 1; unpackFinished = 1;
return 0; return 0;
} }
@@ -85,6 +90,7 @@ void * unpackFilesThread(void * unused)
fo = popen(fname, "w"); fo = popen(fname, "w");
if( !ff || !fo ) if( !ff || !fo )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Error extracting data");
unpackFinished = 1; unpackFinished = 1;
return 0; return 0;
} }
@@ -96,6 +102,7 @@ void * unpackFilesThread(void * unused)
int cnt = fread( buf, 1, sizeof(buf), ff ); int cnt = fread( buf, 1, sizeof(buf), ff );
if( cnt < 0 ) if( cnt < 0 )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Error extracting data");
unpackFinished = 1; unpackFinished = 1;
return 1; return 1;
} }
@@ -113,27 +120,42 @@ void * unpackFilesThread(void * unused)
fclose(ff); fclose(ff);
if( pclose(fo) != 0 ) if( pclose(fo) != 0 )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Error extracting data");
unpackFinished = 1; unpackFinished = 1;
return 0; return 0;
} }
remove("data.tar.gz"); remove("data.tar.gz");
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Extracting data finished");
strcpy( fname, getenv("SECURE_STORAGE_DIR") ); strcpy( fname, getenv("SECURE_STORAGE_DIR") );
strcat( fname, "/postinstall.sh" ); strcat( fname, "/postinstall.sh" );
if( stat( fname, &st ) != 0 ) if( stat( fname, &st ) != 0 )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "No postinstall script");
unpackFinished = 1; unpackFinished = 1;
return 1; return 1;
} }
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Running postinstall scipt");
fo = popen(fname, "w"); fo = popen(fname, "w");
if( !fo ) if( !fo )
{ {
__android_log_print(ANDROID_LOG_INFO, "XSDL", "ERROR: Cannot launch postinstall scipt");
unpackFinished = 1; unpackFinished = 1;
return 0; return 0;
} }
pclose(fo); for(;;)
{
char buf[1024];
if( !fgets(buf, sizeof(buf), fo) )
break;
__android_log_print(ANDROID_LOG_INFO, "XSDL", "> %s", buf);
}
__android_log_print(ANDROID_LOG_INFO, "XSDL", "Postinstall scipt exited with status %d", pclose(fo));
unpackFinished = 1; unpackFinished = 1;
return 1; return 1;