about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-04-18 15:40:53 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-04-18 15:40:53 +0200
commit6c4b88123a26a0fc723b9fdbd03ce0cf4b084b3f (patch)
tree7a75fb16c0ad77e2fa2e2ca5d204487006b4a2aa /src
parentb78f3a8216dc068b6fee784f6a57fe37c3ecb585 (diff)
downloadbox64-6c4b88123a26a0fc723b9fdbd03ce0cf4b084b3f.tar.gz
box64-6c4b88123a26a0fc723b9fdbd03ce0cf4b084b3f.zip
Added some wrapped libs and functions
Diffstat (limited to 'src')
-rwxr-xr-xsrc/library_list.h1
-rw-r--r--src/steam.c5
-rw-r--r--src/wrapped/generated/functions_list.txt2
-rw-r--r--src/wrapped/generated/wrappednotifydefs.h8
-rw-r--r--src/wrapped/generated/wrappednotifytypes.h17
-rw-r--r--src/wrapped/generated/wrappednotifyundefs.h8
-rw-r--r--src/wrapped/generated/wrapper.c3
-rw-r--r--src/wrapped/generated/wrapper.h1
-rw-r--r--src/wrapped/wrappednotify.c31
-rw-r--r--src/wrapped/wrappednotify_private.h36
-rwxr-xr-xsrc/wrapped/wrappednspr4_private.h4
-rwxr-xr-xsrc/wrapped/wrappednss3_private.h8
12 files changed, 116 insertions, 8 deletions
diff --git a/src/library_list.h b/src/library_list.h
index 03f3385f..4352e793 100755
--- a/src/library_list.h
+++ b/src/library_list.h
@@ -107,6 +107,7 @@ GO("libgdk_pixbuf-2.0.so.0", gdkpixbuf2)
 GO("libgconf-2.so.4", gconf2)
 GO("libgio-2.0.so.0", gio2)
 GO("libgmodule-2.0.so.0", gmodule2)
+GO("libnotify.so.4", notify)
 GO("libgobject-2.0.so.0", gobject2)
 GO("libglib-2.0.so.0", glib2)
 GO("libgthread-2.0.so.0", gthread2)
diff --git a/src/steam.c b/src/steam.c
index e944c452..f4de17d8 100644
--- a/src/steam.c
+++ b/src/steam.c
@@ -66,12 +66,13 @@ void pressure_vessel(int argc, const char** argv, int nextarg)
     setenv("BOX64_PREFER_EMULATED", "1", 1);
     setenv("BOX86_PREFER_EMULATED", "1", 1);
 
-//setenv("BOX64_TRACE_FILE", "/home/seb/trace64-%pid.txt", 1);
+setenv("BOX64_TRACE_FILE", "/home/seb/trace64-%pid.txt", 1);
 //setenv("BOX86_TRACE_FILE", "/home/seb/trace86-%pid.txt", 1);
 //setenv("BOX86_LOG", "1", 1);
-//setenv("BOX64_LOG", "1", 1);
+setenv("BOX64_LOG", "1", 1);
 //setenv("BOX86_SHOWSEGV", "1", 1);
 //setenv("BOX64_SHOWSEGV", "1", 1);
+setenv("BOX64_DYNAREC_LOG", "1", 1);
 
     printf_log(LOG_DEBUG, "Run %s %s and wait\n", x86?"i386":(x64?"x86_64":""), argv[nextarg]);
     pid_t v = vfork();
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index 49d315db..34814410 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -1430,6 +1430,7 @@
 #() iFpppupu
 #() iFpppLpp
 #() iFppppii
+#() iFppppiu
 #() iFppppip
 #() iFppppup
 #() iFpppppi
@@ -3249,6 +3250,7 @@ wrappedmpg123:
   - mpg123_replace_reader_handle
   - mpg123_replace_reader_handle_32
   - mpg123_replace_reader_handle_64
+wrappednotify:
 wrappednsl:
 wrappednspr4:
 wrappednss3:
diff --git a/src/wrapped/generated/wrappednotifydefs.h b/src/wrapped/generated/wrappednotifydefs.h
new file mode 100644
index 00000000..2cfc41a3
--- /dev/null
+++ b/src/wrapped/generated/wrappednotifydefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.1.0.16) *
+ *******************************************************************/
+#ifndef __wrappednotifyDEFS_H_
+#define __wrappednotifyDEFS_H_
+
+
+#endif // __wrappednotifyDEFS_H_
diff --git a/src/wrapped/generated/wrappednotifytypes.h b/src/wrapped/generated/wrappednotifytypes.h
new file mode 100644
index 00000000..1fa93688
--- /dev/null
+++ b/src/wrapped/generated/wrappednotifytypes.h
@@ -0,0 +1,17 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.1.0.16) *
+ *******************************************************************/
+#ifndef __wrappednotifyTYPES_H_
+#define __wrappednotifyTYPES_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 // __wrappednotifyTYPES_H_
diff --git a/src/wrapped/generated/wrappednotifyundefs.h b/src/wrapped/generated/wrappednotifyundefs.h
new file mode 100644
index 00000000..61e03f6a
--- /dev/null
+++ b/src/wrapped/generated/wrappednotifyundefs.h
@@ -0,0 +1,8 @@
+/*******************************************************************
+ * File automatically generated by rebuild_wrappers.py (v2.1.0.16) *
+ *******************************************************************/
+#ifndef __wrappednotifyUNDEFS_H_
+#define __wrappednotifyUNDEFS_H_
+
+
+#endif // __wrappednotifyUNDEFS_H_
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 09316222..916a00f9 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -1464,6 +1464,7 @@ typedef int64_t (*iFpppuii_t)(void*, void*, void*, uint64_t, int64_t, int64_t);
 typedef int64_t (*iFpppupu_t)(void*, void*, void*, uint64_t, void*, uint64_t);
 typedef int64_t (*iFpppLpp_t)(void*, void*, void*, uintptr_t, void*, void*);
 typedef int64_t (*iFppppii_t)(void*, void*, void*, void*, int64_t, int64_t);
+typedef int64_t (*iFppppiu_t)(void*, void*, void*, void*, int64_t, uint64_t);
 typedef int64_t (*iFppppip_t)(void*, void*, void*, void*, int64_t, void*);
 typedef int64_t (*iFppppup_t)(void*, void*, void*, void*, uint64_t, void*);
 typedef int64_t (*iFpppppi_t)(void*, void*, void*, void*, void*, int64_t);
@@ -3533,6 +3534,7 @@ void iFpppuii(x64emu_t *emu, uintptr_t fcn) { iFpppuii_t fn = (iFpppuii_t)fcn; R
 void iFpppupu(x64emu_t *emu, uintptr_t fcn) { iFpppupu_t fn = (iFpppupu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uint64_t)R_RCX, (void*)R_R8, (uint64_t)R_R9); }
 void iFpppLpp(x64emu_t *emu, uintptr_t fcn) { iFpppLpp_t fn = (iFpppLpp_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (uintptr_t)R_RCX, (void*)R_R8, (void*)R_R9); }
 void iFppppii(x64emu_t *emu, uintptr_t fcn) { iFppppii_t fn = (iFppppii_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (int64_t)R_R9); }
+void iFppppiu(x64emu_t *emu, uintptr_t fcn) { iFppppiu_t fn = (iFppppiu_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (uint64_t)R_R9); }
 void iFppppip(x64emu_t *emu, uintptr_t fcn) { iFppppip_t fn = (iFppppip_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (int64_t)R_R8, (void*)R_R9); }
 void iFppppup(x64emu_t *emu, uintptr_t fcn) { iFppppup_t fn = (iFppppup_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (uint64_t)R_R8, (void*)R_R9); }
 void iFpppppi(x64emu_t *emu, uintptr_t fcn) { iFpppppi_t fn = (iFpppppi_t)fcn; R_RAX=(int64_t)fn((void*)R_RDI, (void*)R_RSI, (void*)R_RDX, (void*)R_RCX, (void*)R_R8, (int64_t)R_R9); }
@@ -5403,6 +5405,7 @@ int isSimpleWrapper(wrapper_t fun) {
 	if (fun == &iFpppupu) return 1;
 	if (fun == &iFpppLpp) return 1;
 	if (fun == &iFppppii) return 1;
+	if (fun == &iFppppiu) return 1;
 	if (fun == &iFppppip) return 1;
 	if (fun == &iFppppup) return 1;
 	if (fun == &iFpppppi) return 1;
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index b8a2b9c8..030d7616 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -1463,6 +1463,7 @@ void iFpppuii(x64emu_t *emu, uintptr_t fnc);
 void iFpppupu(x64emu_t *emu, uintptr_t fnc);
 void iFpppLpp(x64emu_t *emu, uintptr_t fnc);
 void iFppppii(x64emu_t *emu, uintptr_t fnc);
+void iFppppiu(x64emu_t *emu, uintptr_t fnc);
 void iFppppip(x64emu_t *emu, uintptr_t fnc);
 void iFppppup(x64emu_t *emu, uintptr_t fnc);
 void iFpppppi(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappednotify.c b/src/wrapped/wrappednotify.c
new file mode 100644
index 00000000..1a5e0d8a
--- /dev/null
+++ b/src/wrapped/wrappednotify.c
@@ -0,0 +1,31 @@
+#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"
+#include "emu/x64emu_private.h"
+#include "callback.h"
+#include "librarian.h"
+#include "box64context.h"
+#include "emu/x64emu_private.h"
+#include "myalign.h"
+#include "gtkclass.h"
+
+const char* notifyName = "libnotify.so.4";
+#define LIBNAME notify
+
+
+#define PRE_INIT    \
+    if(box64_nogtk) \
+        return -1;
+
+#include "wrappedlib_init.h"
+
diff --git a/src/wrapped/wrappednotify_private.h b/src/wrapped/wrappednotify_private.h
new file mode 100644
index 00000000..e26fd083
--- /dev/null
+++ b/src/wrapped/wrappednotify_private.h
@@ -0,0 +1,36 @@
+#if !(defined(GO) && defined(GOM) && defined(GO2) && defined(DATA))
+#error meh!
+#endif
+
+//GO(notify_get_app_name, 
+//GO(notify_get_server_caps, 
+//GO(notify_get_server_info, 
+//GO(notify_init, 
+//GO(notify_is_initted, 
+//GO(notify_marshal_VOID__UINT_STRING, 
+//GO(notify_marshal_VOID__UINT_UINT, 
+//GO(notify_notification_add_action, 
+//GO(notify_notification_clear_actions, 
+//GO(notify_notification_clear_hints, 
+//GO(notify_notification_close, 
+//GO(notify_notification_get_closed_reason, 
+//GO(notify_notification_get_type, 
+//GO(notify_notification_new, 
+//GO(notify_notification_set_app_name, 
+//GO(notify_notification_set_category, 
+//GO(notify_notification_set_hint, 
+//GO(notify_notification_set_hint_byte, 
+//GO(notify_notification_set_hint_byte_array, 
+//GO(notify_notification_set_hint_double, 
+//GO(notify_notification_set_hint_int32, 
+//GO(notify_notification_set_hint_string, 
+//GO(notify_notification_set_hint_uint32, 
+//GO(notify_notification_set_icon_from_pixbuf, 
+//GO(notify_notification_set_image_from_pixbuf, 
+//GO(notify_notification_set_timeout, 
+//GO(notify_notification_set_urgency, 
+//GO(notify_notification_show, 
+//GO(notify_notification_update, 
+//GO(notify_set_app_name, 
+//GO(notify_uninit, 
+//GO(notify_urgency_get_type, 
diff --git a/src/wrapped/wrappednspr4_private.h b/src/wrapped/wrappednspr4_private.h
index ebea6961..20a091ca 100755
--- a/src/wrapped/wrappednspr4_private.h
+++ b/src/wrapped/wrappednspr4_private.h
@@ -97,8 +97,8 @@ GO(PR_Close, iFp)
 //GO(PR_DisableClockInterrupts, 
 //GO(PR_dtoa, 
 //GO(PR_DuplicateEnvironment, 
-//GO(PR_EmulateAcceptRead, 
-//GO(PR_EmulateSendFile, 
+GO(PR_EmulateAcceptRead, iFppppiu)
+GO(PR_EmulateSendFile, iFppiu)
 //GO(PR_EnableClockInterrupts, 
 //GO(PR_EnterMonitor, 
 //GO(PR_EnumerateAddrInfo, 
diff --git a/src/wrapped/wrappednss3_private.h b/src/wrapped/wrappednss3_private.h
index 0a9d1618..bd17fed8 100755
--- a/src/wrapped/wrappednss3_private.h
+++ b/src/wrapped/wrappednss3_private.h
@@ -26,7 +26,7 @@
 //GO(CERT_CacheOCSPResponseFromSideChannel, 
 //GO(CERT_CertChainFromCert, 
 //DATA(CERT_CertificateRequestTemplate, 
-//DATA(CERT_CertificateTemplate, 
+DATA(CERT_CertificateTemplate, 480)
 //GO(CERT_CertListFromCert, 
 //GO(CERT_CertTimesValid, 
 //GO(CERT_ChangeCertTrust, 
@@ -230,7 +230,7 @@ DATA(CERT_NameTemplate, 4*sizeof(void*))
 //GO(CERT_SetSlopTime, 
 //GO(CERT_SetUsePKIXForValidation, 
 //DATA(CERT_SignedCrlTemplate, 
-//DATA(CERT_SignedDataTemplate, 
+DATA(CERT_SignedDataTemplate, 160)
 //GO(CERT_StartCertExtensions, 
 //GO(CERT_StartCertificateRequestAttributes, 
 //GO(CERT_StartCRLEntryExtensions, 
@@ -743,7 +743,7 @@ DATA(SEC_IA5StringTemplate, 4*sizeof(void*)) //R type
 //GO(SECKEY_ECParamsToBasePointOrderLen, 
 //GO(SECKEY_ECParamsToKeySize, 
 //GO(SECKEY_EncodeDERSubjectPublicKeyInfo, 
-//DATA(SECKEY_EncryptedPrivateKeyInfoTemplate, 
+DATA(SECKEY_EncryptedPrivateKeyInfoTemplate, 128)
 //GO(SECKEY_ExtractPublicKey, 
 //GO(SECKEY_GetPrivateKeyType, 
 //GO(SECKEY_GetPublicKeyType, 
@@ -752,7 +752,7 @@ DATA(SEC_IA5StringTemplate, 4*sizeof(void*)) //R type
 //GO(SECKEY_NewPrivateKeyList, 
 //DATA(SECKEY_PointerToEncryptedPrivateKeyInfoTemplate, 
 //DATA(SECKEY_PointerToPrivateKeyInfoTemplate, 
-//DATA(SECKEY_PrivateKeyInfoTemplate, 
+DATA(SECKEY_PrivateKeyInfoTemplate, 192)
 //GO(SECKEY_PublicKeyStrength, 
 //GO(SECKEY_PublicKeyStrengthInBits, 
 //GO(SECKEY_RemovePrivateKeyListNode,