prepare for the glorious future
This commit is contained in:
parent
857369f5a4
commit
5623653477
|
@ -5,9 +5,6 @@
|
||||||
],
|
],
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"variables": {
|
|
||||||
"developer_edition%": "0"
|
|
||||||
},
|
|
||||||
"target_name": "realm",
|
"target_name": "realm",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"object-store"
|
"object-store"
|
||||||
|
@ -21,14 +18,13 @@
|
||||||
"include_dirs": [
|
"include_dirs": [
|
||||||
"src"
|
"src"
|
||||||
],
|
],
|
||||||
"defines": [ "REALM_DEVELOPER_EDITION=<(developer_edition)" ],
|
|
||||||
"link_settings": {
|
"link_settings": {
|
||||||
"ldflags": [
|
"ldflags": [
|
||||||
"-Wl,--exclude-libs=ALL"
|
"-Wl,--whole-archive,-lrealm-node,--no-whole-archive"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"xcode_settings": {
|
"xcode_settings": {
|
||||||
"OTHER_LDFLAGS": [ "-Xlinker -unexported_symbol -Xlinker '*'" ]
|
"OTHER_LDFLAGS": [ "-all_load", "-lrealm-node" ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"jsdoc": "rm -rf docs/output && jsdoc -c docs/conf.json",
|
"jsdoc": "rm -rf docs/output && jsdoc -c docs/conf.json",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"test": "scripts/test.sh",
|
"test": "scripts/test.sh",
|
||||||
"install": "node-pre-gyp install --build-from-source"
|
"install": "node-pre-gyp install --fallback-to-build"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"nan": "^2.3.3",
|
"nan": "^2.3.3",
|
||||||
|
|
|
@ -9,8 +9,6 @@ die() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
. ${topdir}/dependencies.list
|
|
||||||
|
|
||||||
mkdir -p ${topdir}/out
|
mkdir -p ${topdir}/out
|
||||||
: ${NVM_DIR=$topdir/.nvm}
|
: ${NVM_DIR=$topdir/.nvm}
|
||||||
|
|
||||||
|
@ -37,7 +35,7 @@ for node_version in ${node_versions}; do
|
||||||
nvm install ${node_version} || die "Could not install nodejs v${node_version}"
|
nvm install ${node_version} || die "Could not install nodejs v${node_version}"
|
||||||
nvm use ${node_version} || die "Could not load nodejs v${node_version}"
|
nvm use ${node_version} || die "Could not load nodejs v${node_version}"
|
||||||
|
|
||||||
npm install "$EXTRA_NPM_ARGUMENTS" || die "Could not build module"
|
npm install --build-from-source "$EXTRA_NPM_ARGUMENTS" || die "Could not build module"
|
||||||
#./scripts/test.sh node || die "Unit tests for nodejs v${node_version} failed"
|
#./scripts/test.sh node || die "Unit tests for nodejs v${node_version} failed"
|
||||||
./node_modules/.bin/node-pre-gyp package || die "Could not package module"
|
./node_modules/.bin/node-pre-gyp package || die "Could not package module"
|
||||||
cp build/stage/node-pre-gyp/*.tar.gz ${topdir}/out/
|
cp build/stage/node-pre-gyp/*.tar.gz ${topdir}/out/
|
||||||
|
|
|
@ -34,10 +34,6 @@
|
||||||
#include "node/node_sync_logger.hpp"
|
#include "node/node_sync_logger.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if REALM_ENTERPRISE_EDITION
|
|
||||||
#include "js_enterprise.hpp"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace realm {
|
namespace realm {
|
||||||
namespace js {
|
namespace js {
|
||||||
|
|
||||||
|
@ -82,10 +78,6 @@ public:
|
||||||
{"setSyncLogger", wrap<set_sync_logger>},
|
{"setSyncLogger", wrap<set_sync_logger>},
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
PropertyMap<T> const static_properties {
|
|
||||||
{"isDeveloperEdition", {wrap<get_is_developer_edition>, nullptr}}
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -137,10 +129,6 @@ inline typename T::Function SyncClass<T>::create_constructor(ContextType ctx) {
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if REALM_ENTERPRISE_EDITION
|
|
||||||
SyncEnterpriseClass<T>::add_methods(ctx, sync_constructor);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return sync_constructor;
|
return sync_constructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +153,7 @@ void SyncClass<T>::set_verify_servers_ssl_certificate(ContextType ctx, ObjectTyp
|
||||||
realm::SyncManager::shared().set_client_should_validate_ssl(verify_servers_ssl_certificate);
|
realm::SyncManager::shared().set_client_should_validate_ssl(verify_servers_ssl_certificate);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if REALM_HAVE_NODE_SYNC_LOGGER
|
#if REALM_PLATFORM_NODE
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void SyncClass<T>::set_sync_logger(ContextType ctx, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) {
|
void SyncClass<T>::set_sync_logger(ContextType ctx, ObjectType this_object, size_t argc, const ValueType arguments[], ReturnValue &return_value) {
|
||||||
validate_argument_count(argc, 1);
|
validate_argument_count(argc, 1);
|
||||||
|
@ -213,14 +201,5 @@ void SyncClass<T>::populate_sync_config(ContextType ctx, ObjectType config_objec
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
void SyncClass<T>::get_is_developer_edition(ContextType ctx, ObjectType object, ReturnValue &return_value) {
|
|
||||||
#if REALM_ENTERPRISE_EDITION
|
|
||||||
return_value.set(false);
|
|
||||||
#else
|
|
||||||
return_value.set(true);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
} // js
|
} // js
|
||||||
} // realm
|
} // realm
|
||||||
|
|
|
@ -1,21 +1,8 @@
|
||||||
{
|
{
|
||||||
"variables": {
|
|
||||||
"use_realm_debug": "<!(echo $REALMJS_USE_DEBUG_CORE)",
|
|
||||||
},
|
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"target_name": "realm-core",
|
"target_name": "realm-core",
|
||||||
"type": "none",
|
"type": "none",
|
||||||
"direct_dependent_settings": {
|
|
||||||
"conditions": [
|
|
||||||
["use_realm_debug!=''", {
|
|
||||||
"libraries": [ "-lrealm-node-dbg" ],
|
|
||||||
"defines": [ "REALM_DEBUG=1" ]
|
|
||||||
}, {
|
|
||||||
"libraries": [ "-lrealm-node" ]
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"all_dependent_settings": {
|
"all_dependent_settings": {
|
||||||
"defines": [ "REALM_HAVE_CONFIG", "REALM_PLATFORM_NODE=1", "REALM_ENABLE_SYNC" ]
|
"defines": [ "REALM_HAVE_CONFIG", "REALM_PLATFORM_NODE=1", "REALM_ENABLE_SYNC" ]
|
||||||
},
|
},
|
||||||
|
@ -30,12 +17,6 @@
|
||||||
"direct_dependent_settings": {
|
"direct_dependent_settings": {
|
||||||
"library_dirs": [ "<(prefix)/src/realm" ]
|
"library_dirs": [ "<(prefix)/src/realm" ]
|
||||||
}
|
}
|
||||||
}, {
|
|
||||||
"conditions": [
|
|
||||||
["OS=='mac'", {
|
|
||||||
"dependencies": [ "vendored-realm" ]
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
}]
|
}]
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -43,15 +24,6 @@
|
||||||
"target_name": "realm-sync",
|
"target_name": "realm-sync",
|
||||||
"type": "none",
|
"type": "none",
|
||||||
"dependencies": [ "realm-core" ], # sync headers include core headers
|
"dependencies": [ "realm-core" ], # sync headers include core headers
|
||||||
"direct_dependent_settings": {
|
|
||||||
"conditions": [
|
|
||||||
["use_realm_debug!=''", {
|
|
||||||
"libraries": [ "-lrealm-sync-node-dbg" ]
|
|
||||||
}, {
|
|
||||||
"libraries": [ "-lrealm-sync-node" ]
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"export_dependent_settings": [ "realm-core" ], # depending on sync is tantamount to depending on core
|
"export_dependent_settings": [ "realm-core" ], # depending on sync is tantamount to depending on core
|
||||||
"variables": {
|
"variables": {
|
||||||
"prefix": "<!(echo $REALM_SYNC_PREFIX)"
|
"prefix": "<!(echo $REALM_SYNC_PREFIX)"
|
||||||
|
@ -64,26 +36,8 @@
|
||||||
"direct_dependent_settings": {
|
"direct_dependent_settings": {
|
||||||
"library_dirs": [ "<(prefix)/src/realm" ]
|
"library_dirs": [ "<(prefix)/src/realm" ]
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
"conditions": [
|
|
||||||
["OS=='mac'", {
|
|
||||||
"dependencies": [ "vendored-realm" ]
|
|
||||||
}]
|
|
||||||
]
|
|
||||||
}]
|
}]
|
||||||
],
|
],
|
||||||
},
|
|
||||||
{
|
|
||||||
"variables": {
|
|
||||||
"realm_vendor_dir%": "<(module_root_dir)/vendor",
|
|
||||||
},
|
|
||||||
"target_name": "vendored-realm",
|
|
||||||
"type": "none",
|
|
||||||
"all_dependent_settings": {
|
|
||||||
"include_dirs": [ "<(realm_vendor_dir)/realm-sync/include" ],
|
|
||||||
"library_dirs": [ "<(realm_vendor_dir)/realm-sync/osx" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,9 @@
|
||||||
"variables": {
|
"variables": {
|
||||||
"warning-flags": [
|
"warning-flags": [
|
||||||
"-Wno-missing-field-initializers",
|
"-Wno-missing-field-initializers",
|
||||||
"-Wno-return-type"
|
"-Wno-return-type",
|
||||||
|
"-Wno-unused-result",
|
||||||
|
"-Wundef"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"cflags_cc!": [ # turn off default flags on older nodes on linux
|
"cflags_cc!": [ # turn off default flags on older nodes on linux
|
||||||
|
|
|
@ -23,7 +23,10 @@
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wundef"
|
||||||
#include <nan.h>
|
#include <nan.h>
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
|
||||||
#include "js_types.hpp"
|
#include "js_types.hpp"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue