mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-30 12:26:48 +00:00
Merge branch 'master' into master-ghc8107
This commit is contained in:
@@ -49,6 +49,13 @@ Java_chat_simplex_common_platform_CoreKt_initHS(__unused JNIEnv *env, __unused j
|
||||
// from simplex-chat
|
||||
typedef long* chat_ctrl;
|
||||
|
||||
/*
|
||||
When you start using any new function from Haskell libraries,
|
||||
you have to add the function name to the file libsimplex.dll.def in the root directory.
|
||||
And do the same by adding it into flake.nix file in the root directory,
|
||||
Otherwise, Windows and Android libraries cannot be built.
|
||||
*/
|
||||
|
||||
extern char *chat_migrate_init(const char *path, const char *key, const char *confirm, chat_ctrl *ctrl);
|
||||
extern char *chat_send_cmd(chat_ctrl ctrl, const char *cmd);
|
||||
extern char *chat_send_remote_cmd(chat_ctrl ctrl, const int rhId, const char *cmd);
|
||||
|
||||
@@ -8,8 +8,13 @@ void hs_init_with_rtsopts(int * argc, char **argv[]);
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_chat_simplex_common_platform_CoreKt_initHS(JNIEnv *env, jclass clazz) {
|
||||
#ifdef _WIN32
|
||||
int argc = 4;
|
||||
char *argv[] = {"simplex", "+RTS", "-A16m", "-H64m", NULL}; // non-moving GC is broken on windows with GHC 9.4-9.6.3
|
||||
#else
|
||||
int argc = 5;
|
||||
char *argv[] = {"simplex", "+RTS", "-A16m", "-H64m", "-xn", NULL}; // see android/simplex-api.c for details
|
||||
#endif
|
||||
char **pargv = argv;
|
||||
hs_init_with_rtsopts(&argc, &pargv);
|
||||
}
|
||||
@@ -17,6 +22,13 @@ Java_chat_simplex_common_platform_CoreKt_initHS(JNIEnv *env, jclass clazz) {
|
||||
// from simplex-chat
|
||||
typedef long* chat_ctrl;
|
||||
|
||||
/*
|
||||
When you start using any new function from Haskell libraries,
|
||||
you have to add the function name to the file libsimplex.dll.def in the root directory.
|
||||
And do the same by adding it into flake.nix file in the root directory,
|
||||
Otherwise, Windows and Android libraries cannot be built.
|
||||
*/
|
||||
|
||||
extern char *chat_migrate_init(const char *path, const char *key, const char *confirm, chat_ctrl *ctrl);
|
||||
extern char *chat_send_cmd(chat_ctrl ctrl, const char *cmd);
|
||||
extern char *chat_send_remote_cmd(chat_ctrl ctrl, const int rhId, const char *cmd);
|
||||
|
||||
Reference in New Issue
Block a user