8000 [TERMUX] Added faked wrapped termux-exec and simplified output by mcagabe19 · Pull Request #1103 · ptitSeb/box64 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[TERMUX] Added faked wrapped termux-exec and simplified output #1103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 2, 2023
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@ endif()
if(TERMUX)
list(APPEND WRAPPEDS
"${BOX64_ROOT}/src/wrapped/wrappediconv.c"
"${BOX64_ROOT}/src/wrapped/wrappedtermuxexec.c"
"${BOX64_ROOT}/src/wrapped/wrappedandroidsupport.c"
)
endif()
Expand Down Expand Up @@ -902,6 +903,8 @@ set(CPACK_PACKAGE_CONTACT "ptitSeb@box86.org")
set(CPACK_PACKAGE_DESCRIPTION "Box64 - Linux Userspace x86_64 Emulator with a twist")
if(NOT TERMUX)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
else()
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libandroid-sysv-semaphore")
endif()
set(CPACK_PACKAGE_HOMEPAGE_URL, "https://box86.org")
file(STRINGS "${BOX64_ROOT}/src/box64version.h" TEMP_STRING REGEX "BOX64_MAJOR\\s*")
Expand Down
1 change: 1 addition & 0 deletions src/library_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ GO("libxml2.so.2", xml2)
#endif
#ifdef TERMUX
GO("libiconv.so", iconv)
GO("libtermux-exec.so", termuxexec)
GO("libandroid-support.so", androidsupport)
#endif

Expand Down
99 changes: 58 additions & 41 deletions src/main.c

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/wrapped/generated/wrappedandroidsupportdefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappedandroidsupportDEFS_H_
#define __wrappedandroidsupportDEFS_H_


#endif // __wrappedandroidsupportDEFS_H_
17 changes: 17 additions & 0 deletions src/wrapped/generated/wrappedandroidsupporttypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappedandroidsupportTYPES_H_
#define __wrappedandroidsupportTYPES_H_

#ifndef LIBNAME
#error You should only #include this file inside a wrapped*.c file
#endif
#ifndef ADDED_FUNCTIONS
#define ADDED_FUNCTIONS()
#endif


#define SUPER() ADDED_FUNCTIONS()

#endif // __wrappedandroidsupportTYPES_H_
8 changes: 8 additions & 0 deletions src/wrapped/generated/wrappedandroidsupportundefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappedandroidsupportUNDEFS_H_
#define __wrappedandroidsupportUNDEFS_H_


#endif // __wrappedandroidsupportUNDEFS_H_
8 changes: 8 additions & 0 deletions src/wrapped/generated/wrappediconvdefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappediconvDEFS_H_
#define __wrappediconvDEFS_H_


#endif // __wrappediconvDEFS_H_
17 changes: 17 additions & 0 deletions src/wrapped/generated/wrappediconvtypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappediconvTYPES_H_
#define __wrappediconvTYPES_H_

#ifndef LIBNAME
#error You should only #include this file inside a wrapped*.c file
#endif
#ifndef ADDED_FUNCTIONS
#define ADDED_FUNCTIONS()
#endif


#define SUPER() ADDED_FUNCTIONS()

#endif // __wrappediconvTYPES_H_
8 changes: 8 additions & 0 deletions src/wrapped/generated/wrappediconvundefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappediconvUNDEFS_H_
#define __wrappediconvUNDEFS_H_


#endif // __wrappediconvUNDEFS_H_
8 changes: 8 additions & 0 deletions src/wrapped/generated/wrappedtermuxexecdefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappedtermuxexecDEFS_H_
#define __wrappedtermuxexecDEFS_H_


#endif // __wrappedtermuxexecDEFS_H_
17 changes: 17 additions & 0 deletions src/wrapped/generated/wrappedtermuxexectypes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappedtermuxexecTYPES_H_
#define __wrappedtermuxexecTYPES_H_

#ifndef LIBNAME
#error You should only #include this file inside a wrapped*.c file
#endif
#ifndef ADDED_FUNCTIONS
#define ADDED_FUNCTIONS()
#endif


#define SUPER() ADDED_FUNCTIONS()

#endif // __wrappedtermuxexecTYPES_H_
8 changes: 8 additions & 0 deletions src/wrapped/generated/wrappedtermuxexecundefs.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/*******************************************************************
* File automatically generated by rebuild_wrappers.py (v2.2.0.18) *
*******************************************************************/
#ifndef __wrappedtermuxexecUNDEFS_H_
#define __wrappedtermuxexecUNDEFS_H_


#endif // __wrappedtermuxexecUNDEFS_H_
22 changes: 22 additions & 0 deletions src/wrapped/wrappedtermuxexec.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define _GNU_SOURCE /* See feature_test_macros(7) */
#include <dlfcn.h>

#include "wrappedlibs.h"

#include "debug.h"
#include "wrapper.h"
#include "bridge.h"
#include "librarian/library_private.h"
#include "x64emu.h"

const char* termuxexecName = "libtermux-exec.so";

#define LIBNAME termuxexec

#define CUSTOM_INIT \
setNeededLibs(lib, 1, "libc.so");

#include "wrappedlib_init.h"
4 changes: 4 additions & 0 deletions src/wrapped/wrappedtermuxexec_private.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA) && defined(GOS))
#error Meh...
#endif

0