Fixed xsdl running on host
This commit is contained in:
@@ -2,8 +2,13 @@
|
|||||||
|
|
||||||
make -j8 || exit 1
|
make -j8 || exit 1
|
||||||
|
|
||||||
|
export SECURE_STORAGE_DIR=`pwd`
|
||||||
|
|
||||||
|
ln -sf /usr .
|
||||||
|
mkdir -p tmp
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
hw/kdrive/sdl/Xsdl :1 -exec xlogo
|
hw/kdrive/sdl/Xsdl :1 -exec "x-window-manager & xlogo & xev & xclock -update 1"
|
||||||
else
|
else
|
||||||
gdb --args hw/kdrive/sdl/Xsdl :1 -exec xlogo
|
gdb --args hw/kdrive/sdl/Xsdl :1 -exec xlogo
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
env SDL=yes CFLAGS="-O0 -g -DDEBUG" \
|
env SDL=yes CFLAGS="-O0 -g -DDEBUG -Werror=format" \
|
||||||
../configure --prefix=`pwd`/data/usr \
|
../configure --prefix=`pwd`/data/usr \
|
||||||
--enable-debug \
|
--enable-debug \
|
||||||
--disable-xorg --disable-dmx --disable-xvfb --disable-xnest --disable-xquartz --disable-xwin \
|
--disable-xorg --disable-dmx --disable-xvfb --disable-xnest --disable-xquartz --disable-xwin \
|
||||||
|
|||||||
1
host-build/data/data
Symbolic link
1
host-build/data/data
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
.
|
||||||
1
host-build/data/tmp
Symbolic link
1
host-build/data/tmp
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/tmp
|
||||||
1
host-build/data/usr
Symbolic link
1
host-build/data/usr
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
/usr
|
||||||
@@ -141,7 +141,7 @@ int execute_command(const char * command, const char *mode, char * data, int dat
|
|||||||
//printf ("Starting child command: %s, mode %s data: '%s'", command, mode, data);
|
//printf ("Starting child command: %s, mode %s data: '%s'", command, mode, data);
|
||||||
cmd = popen (command, mode);
|
cmd = popen (command, mode);
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
printf ("Error while starting child command: %s", command);
|
printf ("Error while starting child command: %s\n", command);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (mode[0] == 'w')
|
if (mode[0] == 'w')
|
||||||
|
|||||||
@@ -18,19 +18,19 @@ static void *child_command(void *unused)
|
|||||||
FILE *cmd;
|
FILE *cmd;
|
||||||
char buf[512];
|
char buf[512];
|
||||||
sprintf (buf, ":%s", display);
|
sprintf (buf, ":%s", display);
|
||||||
printf ("setenv DISPLAY=%s", buf);
|
printf ("setenv DISPLAY=%s\n", buf);
|
||||||
setenv ("DISPLAY", buf, 1);
|
setenv ("DISPLAY", buf, 1);
|
||||||
setenv ("PULSE_SERVER", "tcp:127.0.0.1:4712", 1);
|
setenv ("PULSE_SERVER", "tcp:127.0.0.1:4712", 1);
|
||||||
printf ("Starting child command: %s", kdExecuteCommand);
|
printf ("Starting child command: %s\n", kdExecuteCommand);
|
||||||
cmd = popen (kdExecuteCommand, "r");
|
cmd = popen (kdExecuteCommand, "r");
|
||||||
if (!cmd) {
|
if (!cmd) {
|
||||||
printf ("Error while starting child command: %s", kdExecuteCommand);
|
printf ("Error while starting child command: %s\n", kdExecuteCommand);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
while (fgets (buf, sizeof(buf), cmd)) {
|
while (fgets (buf, sizeof(buf), cmd)) {
|
||||||
printf ("> %s", buf);
|
printf ("> %s", buf);
|
||||||
}
|
}
|
||||||
printf ("Child command returned with status %d", pclose (cmd));
|
printf ("Child command returned with status %d\n", pclose (cmd));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,9 +79,7 @@ OutputDirectory(char *outdir, size_t size)
|
|||||||
if (strlen("/tmp/") < size) {
|
if (strlen("/tmp/") < size) {
|
||||||
(void) strcpy(outdir, "/tmp/");
|
(void) strcpy(outdir, "/tmp/");
|
||||||
}
|
}
|
||||||
#ifdef __ANDROID__
|
|
||||||
sprintf(outdir, "%s/", getenv("SECURE_STORAGE_DIR"));
|
sprintf(outdir, "%s/", getenv("SECURE_STORAGE_DIR"));
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -103,18 +101,9 @@ RunXkbComp(xkbcomp_buffer_callback callback, void *userdata)
|
|||||||
char *xkbbasedirflag = NULL;
|
char *xkbbasedirflag = NULL;
|
||||||
const char *xkbbindir = emptystring;
|
const char *xkbbindir = emptystring;
|
||||||
const char *xkbbindirsep = emptystring;
|
const char *xkbbindirsep = emptystring;
|
||||||
|
char tmpname[PATH_MAX] = "x-keyboard.txt";
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
/* WIN32 has no popen. The input must be stored in a file which is
|
|
||||||
used as input for xkbcomp. xkbcomp does not read from stdin. */
|
|
||||||
char tmpname[PATH_MAX];
|
|
||||||
const char *xkmfile = tmpname;
|
const char *xkmfile = tmpname;
|
||||||
#elif defined(__ANDROID__)
|
|
||||||
const char *tmpname = "x-keyboard.txt";
|
|
||||||
const char *xkmfile = tmpname;
|
|
||||||
#else
|
|
||||||
const char *xkmfile = "-";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
snprintf(keymap, sizeof(keymap), "server-%s", display);
|
snprintf(keymap, sizeof(keymap), "server-%s", display);
|
||||||
|
|
||||||
@@ -165,21 +154,13 @@ RunXkbComp(xkbcomp_buffer_callback callback, void *userdata)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__ANDROID__)
|
|
||||||
out = Popen(buf, "w");
|
|
||||||
#else
|
|
||||||
out = fopen(tmpname, "w");
|
out = fopen(tmpname, "w");
|
||||||
#endif
|
|
||||||
|
|
||||||
if (out != NULL) {
|
if (out != NULL) {
|
||||||
/* Now write to xkbcomp */
|
/* Now write to xkbcomp */
|
||||||
(*callback)(out, userdata);
|
(*callback)(out, userdata);
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__ANDROID__)
|
|
||||||
if (Pclose(out) == 0)
|
|
||||||
#else
|
|
||||||
if (fclose(out) == 0 && System(buf) >= 0)
|
if (fclose(out) == 0 && System(buf) >= 0)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
if (xkbDebugFlags || 1)
|
if (xkbDebugFlags || 1)
|
||||||
DebugF("[xkb] xkb executes: %s\n", buf);
|
DebugF("[xkb] xkb executes: %s\n", buf);
|
||||||
|
|||||||
Reference in New Issue
Block a user