diff --git a/app/lib/dal/sqliteDAL/MetaDAL.ts b/app/lib/dal/sqliteDAL/MetaDAL.ts index 158d39f4ddf10a1890ac3af8a93483272bce39aa..4cb8299eb7ee31c9ef0bdce4c9a348d88b444d2d 100644 --- a/app/lib/dal/sqliteDAL/MetaDAL.ts +++ b/app/lib/dal/sqliteDAL/MetaDAL.ts @@ -407,14 +407,14 @@ export class MetaDAL extends AbstractSQLite<DBMeta> { 'COMMIT;') } - private async executeMigration(migration: any[], conf:ConfDTO) { + private async executeMigration(migration: (string|((conf:ConfDTO)=>void)), conf:ConfDTO) { try { if (typeof migration == "string") { // Simple SQL script to pass await this.exec(migration); - } else if (typeof migration == "function") { + } else { // JS function to execute await migration(conf); diff --git a/app/modules/bma/index.ts b/app/modules/bma/index.ts index 9dc1beaac49bd0ab29c74fbb457fcc4723d695db..0509226ad298ff2145579c79a0cfe9ab61dc3533 100644 --- a/app/modules/bma/index.ts +++ b/app/modules/bma/index.ts @@ -230,7 +230,7 @@ export class BMAPI extends stream.Transform { } if (this.server.conf.upnp) { try { - this.upnpAPI = await upnp(this.server.conf.port, this.server.conf.remoteport, this.logger); + this.upnpAPI = await upnp(this.server.conf.port, this.server.conf.remoteport, this.logger, this.server.conf); this.upnpAPI.startRegular(); const gateway = await this.upnpAPI.findGateway(); if (gateway) { diff --git a/app/modules/bma/lib/network.ts b/app/modules/bma/lib/network.ts index 3e9e026f966695db0dd83a977605e5a26c1f2439..60e17dada3f4090fcad47cf06eb7eb7108da84ea 100644 --- a/app/modules/bma/lib/network.ts +++ b/app/modules/bma/lib/network.ts @@ -332,7 +332,7 @@ function listInterfaces() { } async function upnpConf (noupnp:boolean, logger:any) { - const client = require('nnupnp').createClient(); + const client = require('nat-upnp').createClient(); // Look for 2 random ports const publicPort = await getAvailablePort(client) const privatePort = publicPort diff --git a/app/modules/bma/lib/upnp.ts b/app/modules/bma/lib/upnp.ts index 06b6bf41eb0b5fcb2a0a62178f7654d3eb2e9dbc..ea599e5a0b18e48f5c7fe60bffd24a561244d566 100644 --- a/app/modules/bma/lib/upnp.ts +++ b/app/modules/bma/lib/upnp.ts @@ -1,12 +1,14 @@ import {BMAConstants} from "./constants" -const upnp = require('nnupnp'); +import {ConfDTO} from "../../../lib/dto/ConfDTO" + +const upnp = require('nat-upnp'); const Q = require('q'); -export const Upnp = async function (localPort:number, remotePort:number, logger:any) { +export const Upnp = async function (localPort:number, remotePort:number, logger:any, conf:ConfDTO) { "use strict"; logger.info('UPnP: configuring...'); - const api = new UpnpApi(localPort, remotePort, logger) + const api = new UpnpApi(localPort, remotePort, logger, conf) try { await api.openPort() } catch (e) { @@ -32,19 +34,21 @@ export class UpnpApi { constructor( private localPort:number, private remotePort:number, - private logger:any + private logger:any, + private conf:ConfDTO )Â {} openPort() { "use strict"; return Q.Promise((resolve:any, reject:any) => { + const suffix = this.conf.pair.pub.substr(0, 6) this.logger.trace('UPnP: mapping external port %s to local %s...', this.remotePort, this.localPort); const client = upnp.createClient(); client.portMapping({ 'public': this.remotePort, 'private': this.localPort, 'ttl': BMAConstants.UPNP_TTL, - 'description': 'duniter:bma:upnp' + 'description': 'duniter:bma:' + suffix }, (err:any) => { client.close(); if (err) { diff --git a/app/modules/crawler/lib/sync.ts b/app/modules/crawler/lib/sync.ts index e5f39d8a7a77ae0209540c5d0a8e36baddcce7f9..df6f29031bb618f2a6083f886c453b3e9553bc5a 100644 --- a/app/modules/crawler/lib/sync.ts +++ b/app/modules/crawler/lib/sync.ts @@ -759,7 +759,7 @@ class P2PDownloader { // Continue return chosens; }, []); - let candidates = await Promise.all(promises) + let candidates:any[] = await Promise.all(promises) candidates.forEach((c:any) => { c.tta = c.tta || 0; // By default we say a node is super slow to answer c.ttas = c.ttas || []; // Memorize the answer delays diff --git a/app/modules/ws2p/index.ts b/app/modules/ws2p/index.ts index c91451e46a817b5e3576b2d284ae85c2a1b14219..64c4acd0bd8be0559036416b9561a4c5a8b5800a 100644 --- a/app/modules/ws2p/index.ts +++ b/app/modules/ws2p/index.ts @@ -1,11 +1,12 @@ "use strict"; -import { WS2PConstants } from './lib/constants'; +import {WS2PConstants} from './lib/constants'; import {ConfDTO, WS2PConfDTO} from "../../lib/dto/ConfDTO" import {Server} from "../../../server" import * as stream from 'stream'; import {WS2PCluster} from "./lib/WS2PCluster" import {WS2PUpnp} from "./lib/ws2p-upnp" import {CommonConstants} from "../../lib/common-libs/constants" + const constants = require("../../lib/constants"); const nuuid = require('node-uuid') @@ -109,7 +110,7 @@ export const WS2PDependency = { }, service: { - input: (server:Server, conf:WS2PConfDTO, logger:any) => { + input: (server:Server, conf:ConfDTO, logger:any) => { const api = new WS2PAPI(server, conf, logger) server.ws2pCluster = api.getCluster() server.addEndpointsDefinitions(async () => api.getEndpoint()) @@ -176,7 +177,7 @@ export class WS2PAPI extends stream.Transform { constructor( private server:Server, - private conf:WS2PConfDTO, + private conf:ConfDTO, private logger:any) { super({ objectMode: true }) this.cluster = WS2PCluster.plugOn(server) @@ -212,7 +213,7 @@ export class WS2PAPI extends stream.Transform { this.upnpAPI.stopRegular(); } try { - this.upnpAPI = new WS2PUpnp(this.logger) + this.upnpAPI = new WS2PUpnp(this.logger, this.conf) const { host, port, available } = await this.upnpAPI.startRegular() if (available) { // Defaults UPnP to true if not defined and available diff --git a/app/modules/ws2p/lib/ws2p-upnp.ts b/app/modules/ws2p/lib/ws2p-upnp.ts index 81b0dae12e5ceec0a78dc9090988091e46b4f8f7..a6b6a7a5f58c58d6764d9ea7987f11d83b8fdc6d 100644 --- a/app/modules/ws2p/lib/ws2p-upnp.ts +++ b/app/modules/ws2p/lib/ws2p-upnp.ts @@ -1,5 +1,7 @@ import {WS2PConstants} from "./constants" -const upnp = require('nnupnp'); +import {ConfDTO} from "../../../lib/dto/ConfDTO" + +const upnp = require('nat-upnp'); export interface UPnPBinding { remotehost:string @@ -13,9 +15,7 @@ export class WS2PUpnp { private interval:NodeJS.Timer|null private client = upnp.createClient() - constructor( - private logger:any - )Â {} + constructor(private logger:any, private conf:ConfDTO)Â {} async checkUPnPisAvailable() { try { @@ -38,6 +38,12 @@ export class WS2PUpnp { return this.currentConfig } + getUpnpDescription() { + const uuid = (this.conf.ws2p && this.conf.ws2p.uuid) || "no-uuid-yet" + const suffix = this.conf.pair.pub.substr(0, 6) + ":" + uuid + return 'duniter:ws2p:' + suffix + } + /** * Always open the same port during an execution of Duniter. * @returns { host:string, port:number } @@ -45,7 +51,7 @@ export class WS2PUpnp { openPort() { return new Promise<{ host:string, port:number }>(async (resolve:any, reject:any) => { if (!this.currentConfig) { - this.currentConfig = await WS2PUpnp.getAvailablePort(this.client) + this.currentConfig = await this.getAvailablePort(this.client) } this.logger.trace('WS2P: mapping external port %s to local %s using UPnP...', this.currentConfig.port, [this.currentConfig.host, this.currentConfig.port].join(':')) const client = upnp.createClient() @@ -53,7 +59,7 @@ export class WS2PUpnp { 'public': this.currentConfig.port, 'private': this.currentConfig.port, 'ttl': WS2PConstants.WS2P_UPNP_TTL, - 'description': 'duniter:ws2p:upnp' + 'description': this.getUpnpDescription() }, (err:any) => { client.close() if (err) { @@ -101,7 +107,7 @@ export class WS2PUpnp { }) } - static async getAvailablePort(client:any) { + private async getAvailablePort(client:any) { const localIP = await WS2PUpnp.getLocalIP(client) const remoteIP = await WS2PUpnp.getRemoteIP(client) const mappings:{ @@ -111,10 +117,10 @@ export class WS2PUpnp { public: { port:number } + description:string }[] = await WS2PUpnp.getUPnPMappings(client) - const externalPortsUsed = mappings.map((m) => { - return m.public.port - }) + const thisDesc = this.getUpnpDescription() + const externalPortsUsed = mappings.filter((m) => m.description !== thisDesc).map((m) => m.public.port) let availablePort = WS2PConstants.WS2P_PORTS_START while (externalPortsUsed.indexOf(availablePort) !== -1 && availablePort <= WS2PConstants.WS2P_PORTS_END) { diff --git a/duniter.sh b/duniter.sh index e40eb5654ee0db74c7bc24fe1a1bb0151486db36..e7f5b075de6e715117d9b2db55369e17709b81ef 100755 --- a/duniter.sh +++ b/duniter.sh @@ -35,8 +35,8 @@ duniter() { VERSION=`$NODE -v` - if [[ $VERSION != v8* ]]; then - echo "$NODE v8 is required"; + if [[ $VERSION != v8* ]] && [[ $VERSION != v9* ]]; then + echo "$NODE v8 or v9 is required"; else # Calls duniter JS command diff --git a/package.json b/package.json index 9bfe573d4f5b4bce75abf0540de0a12abeb9ed12..7405a3800d5043518ad2a82e89c27355f450b444 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "duniter", "version": "1.6.17", "engines": { - "node": ">=8.2.1 <9", + "node": ">=8.2.1 <10", "npm": ">=3.10" }, "engineStrict": true, @@ -79,8 +79,8 @@ "moment": "2.19.3", "morgan": "1.8.1", "multimeter": "0.1.1", - "naclb": "1.3.9", - "nnupnp": "1.0.2", + "naclb": "1.3.10", + "nat-upnp": "^1.1.1", "node-pre-gyp": "0.6.34", "node-uuid": "1.4.8", "optimist": "0.6.1", @@ -88,18 +88,18 @@ "querablep": "^0.1.0", "request": "2.81.0", "request-promise": "4.2.0", - "scryptb": "6.0.4", + "scryptb": "6.0.5", "seedrandom": "^2.4.3", "sha1": "1.1.1", "socks-proxy-agent": "^3.0.1", - "sqlite3": "3.1.4", + "sqlite3": "3.1.13", "tail": "^1.2.1", "tweetnacl": "0.14.3", "underscore": "1.8.3", "unzip": "0.1.11", "unzip2": "0.2.5", "winston": "2.3.1", - "wotb": "0.6.x", + "wotb": "^0.6.4", "ws": "1.1.5" }, "devDependencies": { diff --git a/release/arch/arm/build-arm.sh b/release/arch/arm/build-arm.sh index 9e1299c85be17b35d7ceab0ba86c738ccabb52b6..ea7c25c0c5b60d5bd1e6329e37d3a53c50434874 100755 --- a/release/arch/arm/build-arm.sh +++ b/release/arch/arm/build-arm.sh @@ -6,7 +6,7 @@ export NVM_DIR="$HOME/.nvm" # Prepare -NODE_VERSION=8.9.1 +NODE_VERSION=9.4.0 ARCH="`uname -m | sed -e \"s/86_//\"`" NVER="v$NODE_VERSION" DUNITER_TAG=$1 diff --git a/release/arch/linux/0.24.4_common.gypi b/release/arch/linux/0.24.4_common.gypi deleted file mode 100644 index d753e62ae583f9ee7aad7e686681647104568baa..0000000000000000000000000000000000000000 --- a/release/arch/linux/0.24.4_common.gypi +++ /dev/null @@ -1,521 +0,0 @@ -{ - 'variables': { - 'asan%': 0, - 'werror': '', # Turn off -Werror in V8 build. - 'visibility%': 'hidden', # V8's visibility setting - 'target_arch%': 'ia32', # set v8's target architecture - 'host_arch%': 'ia32', # set v8's host architecture - 'want_separate_host_toolset%': 0, # V8 should not build target and host - 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds - 'component%': 'static_library', # NB. these names match with what V8 expects - 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way - 'python%': 'python', - - 'node_shared%': 'true', - 'force_dynamic_crt%': 0, - 'node_use_v8_platform%': 'true', - 'node_use_bundled_v8%': 'true', - 'node_module_version%': '', - 'mac_product_name': 'nwjs', - - 'node_tag%': '', - 'uv_library%': 'static_library', - - 'openssl_fips': '', - - # Default to -O0 for debug builds. - 'v8_optimized_debug%': 0, - - # Enable disassembler for `--print-code` v8 options - 'v8_enable_disassembler': 1, - 'v8_host_byteorder': '<!(python -c "import sys; print sys.byteorder")', - - 'v8_use_external_startup_data': 1, - 'v8_enable_i18n_support%': 1, - #'icu_use_data_file_flag%': 1, - 'win_fastlink': 0, - - # Don't use ICU data file (icudtl.dat) from V8, we use our own. - 'icu_use_data_file_flag%': 0, - - 'conditions': [ - ['OS == "win"', { - 'os_posix': 0, - 'v8_postmortem_support%': 'false', - 'OBJ_DIR': '<(PRODUCT_DIR)/obj', - 'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib', - }, { - 'os_posix': 1, - 'v8_postmortem_support%': 'true', - 'clang_dir': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts', - }], - ['OS=="linux" and target_arch=="ia32"', { - 'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_i386-sysroot', - }], - ['OS=="linux" and target_arch=="x64"', { - 'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_amd64-sysroot', - }], - ['OS== "mac"', { - 'conditions': [ - ['GENERATOR=="ninja"', { - 'OBJ_DIR': '<(PRODUCT_DIR)/obj', - 'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a', - }, { - 'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target', - 'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', - }], - ], - }], - ['openssl_fips != ""', { - 'OPENSSL_PRODUCT': 'libcrypto.a', - }, { - 'OPENSSL_PRODUCT': 'libopenssl.a', - }], - ['OS=="mac"', { - 'clang%': 1, - }, { - 'clang%': 0, - }], - ], - }, - - 'conditions': [ - [ 'clang==1 and OS != "mac"', { - 'make_global_settings': [ - ['CC', '<(clang_dir)/bin/clang'], - ['CXX', '<(clang_dir)/bin/clang++'], - ['CC.host', '$(CC)'], - ['CXX.host', '$(CXX)'], - ], - }], - ], - 'target_defaults': { - 'default_configuration': 'Release', - 'variables': { - 'conditions': [ - ['OS=="win" and component=="shared_library"', { - # See http://msdn.microsoft.com/en-us/library/aa652367.aspx - 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) - 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) - }, { - # See http://msdn.microsoft.com/en-us/library/aa652367.aspx - 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) - 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) - }], - ], - }, - 'configurations': { - 'Common_Base': { - 'abstract': 1, - 'msvs_settings':{ - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/bigobj', - # Tell the compiler to crash on failures. This is undocumented - # and unsupported but very handy. - '/d2FastFail', - ], - }, - 'VCLinkerTool': { - # Add the default import libs. - 'AdditionalDependencies': [ - 'kernel32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'user32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - 'delayimp.lib', - 'credui.lib', - 'dbghelp.lib', - 'shlwapi.lib', - 'winmm.lib', - ], - 'AdditionalOptions': [ - # Suggested by Microsoft Devrel to avoid - # LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000) - # which started happening more regularly after VS2013 Update 4. - # Needs to be a bit lower for VS2015, or else errors out. - '/maxilksize:0x7ff00000', - # Tell the linker to crash on failures. - '/fastfail', - ], - }, - }, - 'conditions': [ - ['OS=="win" and win_fastlink==1 and MSVS_VERSION != "2013"', { - 'msvs_settings': { - 'VCLinkerTool': { - # /PROFILE is incompatible with /debug:fastlink - 'Profile': 'false', - 'AdditionalOptions': [ - # Tell VS 2015+ to create a PDB that references debug - # information in .obj and .lib files instead of copying - # it all. - '/DEBUG:FASTLINK', - ], - }, - }, - }], - ['OS=="win" and MSVS_VERSION == "2015"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - # Work around crbug.com/526851, bug in VS 2015 RTM compiler. - '/Zc:sizedDealloc-', - # Disable thread-safe statics to avoid overhead and because - # they are disabled on other platforms. See crbug.com/587210 - # and -fno-threadsafe-statics. - '/Zc:threadSafeInit-', - ], - }, - }, - }], - ], - }, - 'Debug_Base': { - 'abstract': 1, - 'variables': { - 'v8_enable_handle_zapping': 1, - }, - 'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ], - 'cflags': [ '-g', '-O0' ], - 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', - }], - ['OS=="aix"', { - 'cflags': [ '-gxcoff' ], - 'ldflags': [ '-Wl,-bbigtoc' ], - }], - ['OS == "android"', { - 'cflags': [ '-fPIE' ], - 'ldflags': [ '-fPIE', '-pie' ] - }], - ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', # static debug - 'Optimization': 0, # /Od, no optimization - 'MinimalRebuild': 'false', - 'OmitFramePointers': 'false', - 'BasicRuntimeChecks': 3, # /RTC1 - }, - 'VCLinkerTool': { - 'LinkIncremental': 2, # enable incremental linking - }, - }, - 'xcode_settings': { - 'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os - }, - }, - 'Release_Base': { - 'abstract': 1, - 'variables': { - 'v8_enable_handle_zapping': 0, - }, - 'cflags': [ '-O3' ], - 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', - }], - ['OS=="solaris"', { - # pull in V8's postmortem metadata - 'ldflags': [ '-Wl,-z,allextract' ] - }], - ['OS!="mac" and OS!="win"', { - 'cflags': [ '-fno-omit-frame-pointer' ], - }], - ['OS == "android"', { - 'cflags': [ '-fPIE' ], - 'ldflags': [ '-fPIE', '-pie' ] - }], - ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release - 'Optimization': 3, # /Ox, full optimization - 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size - 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible - 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG - 'OmitFramePointers': 'true', - 'EnableFunctionLevelLinking': 'true', - 'EnableIntrinsicFunctions': 'true', - 'RuntimeTypeInfo': 'false', - 'AdditionalOptions': [ - '/MP', # compile across multiple CPUs - ], - }, - 'VCLibrarianTool': { - 'AdditionalOptions': [ - '/LTCG', # link time code generation - ], - }, - 'VCLinkerTool': { - 'LinkTimeCodeGeneration': 1, # link-time code generation - 'OptimizeReferences': 2, # /OPT:REF - 'EnableCOMDATFolding': 2, # /OPT:ICF - 'LinkIncremental': 1, # disable incremental linking - }, - }, - }, - 'Debug': { - 'inherit_from': ['Common_Base', 'Debug_Base'], - }, - 'Release': { - 'inherit_from': ['Common_Base', 'Release_Base'], - }, - 'conditions': [ - [ 'OS=="win"', { - 'Debug_x64': { 'inherit_from': ['Debug'] }, - 'Release_x64': { 'inherit_from': ['Release'], }, - }], - ], - }, - # Forcibly disable -Werror. We support a wide range of compilers, it's - # simply not feasible to squelch all warnings, never mind that the - # libraries in deps/ are not under our control. - 'cflags!': ['-Werror'], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'StringPooling': 'true', # pool string literals - 'DebugInformationFormat': 3, # Generate a PDB - 'WarningLevel': 3, - 'BufferSecurityCheck': 'true', - 'ExceptionHandling': 0, # /EHsc - 'SuppressStartupBanner': 'true', - # Disable "warning C4267: conversion from 'size_t' to 'int', - # possible loss of data". Many originate from our dependencies - # and their sheer number drowns out other, more legitimate warnings. - 'DisableSpecificWarnings': ['4267'], - 'WarnAsError': 'false', - }, - 'VCLibrarianTool': { - }, - 'VCLinkerTool': { - 'conditions': [ - ['target_arch=="ia32"', { - 'TargetMachine' : 1, # /MACHINE:X86 - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console,"5.01"' ], - }], - ], - }], - ['target_arch=="x64"', { - 'TargetMachine' : 17, # /MACHINE:AMD64 - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console,"5.02"' ], - }], - ], - }], - ], - 'GenerateDebugInformation': 'true', - 'GenerateMapFile': 'true', # /MAP - 'MapExports': 'true', # /MAPINFO:EXPORTS - 'RandomizedBaseAddress': 2, # enable ASLR - 'DataExecutionPrevention': 2, # enable DEP - 'AllowIsolation': 'true', - 'SuppressStartupBanner': 'true', - }, - }, - 'msvs_disabled_warnings': [4351, 4355, 4800, 4595], - 'conditions': [ - ['asan == 1 and OS != "mac"', { - 'cflags+': [ - '-fno-omit-frame-pointer', - '-fsanitize=address', - '-DLEAK_SANITIZER' - ], - 'cflags!': [ '-fomit-frame-pointer' ], - 'ldflags': [ '-fsanitize=address' ], - }], - ['asan == 1 and OS == "mac"', { - 'xcode_settings': { - 'OTHER_CFLAGS+': [ - '-fno-omit-frame-pointer', - '-gline-tables-only', - '-fsanitize=address', - '-DLEAK_SANITIZER' - ], - 'OTHER_CFLAGS!': [ - '-fomit-frame-pointer', - ], - }, - 'target_conditions': [ - ['_type!="static_library"', { - 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, - }], - ], - }], - ['OS == "win"', { - 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin - 'defines': [ - 'WIN32', - # we don't really want VC++ warning us about - # how dangerous C functions are... - '_CRT_SECURE_NO_DEPRECATE', - # ... or that C implementations shouldn't use - # POSIX names - '_CRT_NONSTDC_NO_DEPRECATE', - # Make sure the STL doesn't try to use exceptions - '_HAS_EXCEPTIONS=0', - #'BUILDING_V8_SHARED=1', - 'BUILDING_UV_SHARED=1', - ], - }], - [ 'OS in "linux freebsd openbsd solaris aix"', { - 'cflags': [ '-pthread'], - 'ldflags': [ '-pthread'], - }], - [ 'OS in "linux freebsd openbsd solaris android aix"', { - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++0x' ], - 'ldflags': [ '-rdynamic' ], - 'target_conditions': [ - # The 1990s toolchain on SmartOS can't handle thin archives. - ['_type=="static_library" and OS=="solaris"', { - 'standalone_static_library': 1, - }], - ['OS=="openbsd"', { - 'ldflags': [ '-Wl,-z,wxneeded' ], - }], - ], - 'conditions': [ - [ 'target_arch=="ia32"', { - 'cflags': [ '-m32', '--sysroot=<(sysroot)' ], - 'ldflags': [ '-m32','--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ], - }], - [ 'target_arch=="x32"', { - 'cflags': [ '-mx32' ], - 'ldflags': [ '-mx32' ], - }], - [ 'target_arch=="x64"', { - 'cflags': [ '-m64' ], - 'ldflags': [ '-m64' ], - }], - [ 'target_arch=="ppc" and OS!="aix"', { - 'cflags': [ '-m32' ], - 'ldflags': [ '-m32' ], - }], - [ 'target_arch=="ppc64" and OS!="aix"', { - 'cflags': [ '-m64', '-mminimal-toc' ], - 'ldflags': [ '-m64' ], - }], - [ 'target_arch=="s390"', { - 'cflags': [ '-m31', '-march=z196' ], - 'ldflags': [ '-m31', '-march=z196' ], - }], - [ 'target_arch=="s390x"', { - 'cflags': [ '-m64', '-march=z196' ], - 'ldflags': [ '-m64', '-march=z196' ], - }], - [ 'OS=="solaris"', { - 'cflags': [ '-pthreads' ], - 'ldflags': [ '-pthreads' ], - 'cflags!': [ '-pthread' ], - 'ldflags!': [ '-pthread' ], - }], - [ 'OS=="aix"', { - 'conditions': [ - [ 'target_arch=="ppc"', { - 'ldflags': [ '-Wl,-bmaxdata:0x60000000/dsa' ], - }], - [ 'target_arch=="ppc64"', { - 'cflags': [ '-maix64' ], - 'ldflags': [ '-maix64' ], - }], - ], - 'ldflags': [ '-Wl,-bbigtoc' ], - 'ldflags!': [ '-rdynamic' ], - }], - [ 'node_shared=="true"', { - 'cflags': [ '-fPIC' ], - }], - ], - }], - ['OS=="android"', { - 'target_conditions': [ - ['_toolset=="target"', { - 'defines': [ '_GLIBCXX_USE_C99_MATH' ], - 'libraries': [ '-llog' ], - }], - ], - }], - ['OS=="mac"', { - 'defines': ['_DARWIN_USE_64_BIT_INODE=1'], - 'xcode_settings': { - 'ALWAYS_SEARCH_USER_PATHS': 'NO', - 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks - 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic - # (Equivalent to -fPIC) - 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions - 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti - 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings - 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics - 'PREBINDING': 'NO', # No -Wl,-prebind - 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacosx-version-min=10.7 - 'USE_HEADERMAP': 'NO', - 'OTHER_CFLAGS': [ - '-fno-strict-aliasing', - ], - 'WARNING_CFLAGS': [ - '-Wall', - '-Wendif-labels', - '-W', - '-Wno-unused-parameter', - ], - }, - 'target_conditions': [ - ['_type!="static_library"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-no_pie', - '-Wl,-search_paths_first', - ], - }, - }], - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'xcode_settings': {'ARCHS': ['i386']}, - }], - ['target_arch=="x64"', { - 'xcode_settings': {'ARCHS': ['x86_64']}, - }], - ['clang==1', { - 'xcode_settings': { - 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', - 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x - 'CLANG_CXX_LIBRARY': 'libc++', - }, - }], - ], - }], - ['OS=="freebsd" and node_use_dtrace=="true"', { - 'libraries': [ '-lelf' ], - }], - ['OS=="freebsd"', { - 'conditions': [ - ['llvm_version < "4.0"', { - # Use this flag because on FreeBSD std::pairs copy constructor is non-trivial. - # Doesn't apply to llvm 4.0 (FreeBSD 11.1) or later. - # Refs: https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html - # Refs: https://svnweb.freebsd.org/ports/head/www/node/Makefile?revision=444555&view=markup - 'cflags': [ '-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1' ], - }], - ], - 'ldflags': [ - '-Wl,--export-dynamic', - ], - }] - ], - } -} \ No newline at end of file diff --git a/release/arch/linux/build-lin.sh b/release/arch/linux/build-lin.sh index 404135125e5fc3d1926d35c9e355243eb302e7df..0ca5c2db5fbeb07093a4cacfb808cac5df0a7fe2 100644 --- a/release/arch/linux/build-lin.sh +++ b/release/arch/linux/build-lin.sh @@ -114,12 +114,12 @@ build_deb_pack() { # Prepare # ----------- -NODE_VERSION=8.9.1 +NODE_VERSION=9.4.0 NVER="v${NODE_VERSION}" DUNITER_TAG="v${1}" DUNITER_DEB_VER=" ${1}" -ADDON_VERSION=57 -NW_VERSION=0.24.4 +ADDON_VERSION=59 +NW_VERSION=0.28.0 NW_RELEASE="v${NW_VERSION}" NW="nwjs-${NW_RELEASE}-linux-x64" NW_GZ="${NW}.tar.gz" @@ -189,7 +189,6 @@ echo "${NW_RELEASE}" cd "${RELEASES}/desktop_/node_modules/wotb" node-pre-gyp --runtime=node-webkit --target=$NW_VERSION configure \ || echo "This failure is expected" -cp ${ROOT}/release/arch/linux/0.24.4_common.gypi ~/.nw-gyp/0.24.4/common.gypi || exit 1 cd "${RELEASES}/desktop_/node_modules/" nw_compile wotb nw_copy diff --git a/release/arch/windows/0.24.4_common.gypi b/release/arch/windows/0.24.4_common.gypi deleted file mode 100644 index d753e62ae583f9ee7aad7e686681647104568baa..0000000000000000000000000000000000000000 --- a/release/arch/windows/0.24.4_common.gypi +++ /dev/null @@ -1,521 +0,0 @@ -{ - 'variables': { - 'asan%': 0, - 'werror': '', # Turn off -Werror in V8 build. - 'visibility%': 'hidden', # V8's visibility setting - 'target_arch%': 'ia32', # set v8's target architecture - 'host_arch%': 'ia32', # set v8's host architecture - 'want_separate_host_toolset%': 0, # V8 should not build target and host - 'library%': 'static_library', # allow override to 'shared_library' for DLL/.so builds - 'component%': 'static_library', # NB. these names match with what V8 expects - 'msvs_multi_core_compile': '0', # we do enable multicore compiles, but not using the V8 way - 'python%': 'python', - - 'node_shared%': 'true', - 'force_dynamic_crt%': 0, - 'node_use_v8_platform%': 'true', - 'node_use_bundled_v8%': 'true', - 'node_module_version%': '', - 'mac_product_name': 'nwjs', - - 'node_tag%': '', - 'uv_library%': 'static_library', - - 'openssl_fips': '', - - # Default to -O0 for debug builds. - 'v8_optimized_debug%': 0, - - # Enable disassembler for `--print-code` v8 options - 'v8_enable_disassembler': 1, - 'v8_host_byteorder': '<!(python -c "import sys; print sys.byteorder")', - - 'v8_use_external_startup_data': 1, - 'v8_enable_i18n_support%': 1, - #'icu_use_data_file_flag%': 1, - 'win_fastlink': 0, - - # Don't use ICU data file (icudtl.dat) from V8, we use our own. - 'icu_use_data_file_flag%': 0, - - 'conditions': [ - ['OS == "win"', { - 'os_posix': 0, - 'v8_postmortem_support%': 'false', - 'OBJ_DIR': '<(PRODUCT_DIR)/obj', - 'V8_BASE': '<(PRODUCT_DIR)/lib/v8_libbase.lib', - }, { - 'os_posix': 1, - 'v8_postmortem_support%': 'true', - 'clang_dir': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts', - }], - ['OS=="linux" and target_arch=="ia32"', { - 'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_i386-sysroot', - }], - ['OS=="linux" and target_arch=="x64"', { - 'sysroot': '<!(cd <(DEPTH) && pwd -P)/build/linux/debian_jessie_amd64-sysroot', - }], - ['OS== "mac"', { - 'conditions': [ - ['GENERATOR=="ninja"', { - 'OBJ_DIR': '<(PRODUCT_DIR)/obj', - 'V8_BASE': '<(PRODUCT_DIR)/obj/deps/v8/src/libv8_base.a', - }, { - 'OBJ_DIR%': '<(PRODUCT_DIR)/obj.target', - 'V8_BASE%': '<(PRODUCT_DIR)/obj.target/deps/v8/src/libv8_base.a', - }], - ], - }], - ['openssl_fips != ""', { - 'OPENSSL_PRODUCT': 'libcrypto.a', - }, { - 'OPENSSL_PRODUCT': 'libopenssl.a', - }], - ['OS=="mac"', { - 'clang%': 1, - }, { - 'clang%': 0, - }], - ], - }, - - 'conditions': [ - [ 'clang==1 and OS != "mac"', { - 'make_global_settings': [ - ['CC', '<(clang_dir)/bin/clang'], - ['CXX', '<(clang_dir)/bin/clang++'], - ['CC.host', '$(CC)'], - ['CXX.host', '$(CXX)'], - ], - }], - ], - 'target_defaults': { - 'default_configuration': 'Release', - 'variables': { - 'conditions': [ - ['OS=="win" and component=="shared_library"', { - # See http://msdn.microsoft.com/en-us/library/aa652367.aspx - 'win_release_RuntimeLibrary%': '2', # 2 = /MD (nondebug DLL) - 'win_debug_RuntimeLibrary%': '3', # 3 = /MDd (debug DLL) - }, { - # See http://msdn.microsoft.com/en-us/library/aa652367.aspx - 'win_release_RuntimeLibrary%': '0', # 0 = /MT (nondebug static) - 'win_debug_RuntimeLibrary%': '1', # 1 = /MTd (debug static) - }], - ], - }, - 'configurations': { - 'Common_Base': { - 'abstract': 1, - 'msvs_settings':{ - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - '/bigobj', - # Tell the compiler to crash on failures. This is undocumented - # and unsupported but very handy. - '/d2FastFail', - ], - }, - 'VCLinkerTool': { - # Add the default import libs. - 'AdditionalDependencies': [ - 'kernel32.lib', - 'gdi32.lib', - 'winspool.lib', - 'comdlg32.lib', - 'advapi32.lib', - 'shell32.lib', - 'ole32.lib', - 'oleaut32.lib', - 'user32.lib', - 'uuid.lib', - 'odbc32.lib', - 'odbccp32.lib', - 'delayimp.lib', - 'credui.lib', - 'dbghelp.lib', - 'shlwapi.lib', - 'winmm.lib', - ], - 'AdditionalOptions': [ - # Suggested by Microsoft Devrel to avoid - # LINK : fatal error LNK1248: image size (80000000) exceeds maximum allowable size (80000000) - # which started happening more regularly after VS2013 Update 4. - # Needs to be a bit lower for VS2015, or else errors out. - '/maxilksize:0x7ff00000', - # Tell the linker to crash on failures. - '/fastfail', - ], - }, - }, - 'conditions': [ - ['OS=="win" and win_fastlink==1 and MSVS_VERSION != "2013"', { - 'msvs_settings': { - 'VCLinkerTool': { - # /PROFILE is incompatible with /debug:fastlink - 'Profile': 'false', - 'AdditionalOptions': [ - # Tell VS 2015+ to create a PDB that references debug - # information in .obj and .lib files instead of copying - # it all. - '/DEBUG:FASTLINK', - ], - }, - }, - }], - ['OS=="win" and MSVS_VERSION == "2015"', { - 'msvs_settings': { - 'VCCLCompilerTool': { - 'AdditionalOptions': [ - # Work around crbug.com/526851, bug in VS 2015 RTM compiler. - '/Zc:sizedDealloc-', - # Disable thread-safe statics to avoid overhead and because - # they are disabled on other platforms. See crbug.com/587210 - # and -fno-threadsafe-statics. - '/Zc:threadSafeInit-', - ], - }, - }, - }], - ], - }, - 'Debug_Base': { - 'abstract': 1, - 'variables': { - 'v8_enable_handle_zapping': 1, - }, - 'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ], - 'cflags': [ '-g', '-O0' ], - 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', - }], - ['OS=="aix"', { - 'cflags': [ '-gxcoff' ], - 'ldflags': [ '-Wl,-bbigtoc' ], - }], - ['OS == "android"', { - 'cflags': [ '-fPIE' ], - 'ldflags': [ '-fPIE', '-pie' ] - }], - ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': '<(win_debug_RuntimeLibrary)', # static debug - 'Optimization': 0, # /Od, no optimization - 'MinimalRebuild': 'false', - 'OmitFramePointers': 'false', - 'BasicRuntimeChecks': 3, # /RTC1 - }, - 'VCLinkerTool': { - 'LinkIncremental': 2, # enable incremental linking - }, - }, - 'xcode_settings': { - 'GCC_OPTIMIZATION_LEVEL': '0', # stop gyp from defaulting to -Os - }, - }, - 'Release_Base': { - 'abstract': 1, - 'variables': { - 'v8_enable_handle_zapping': 0, - }, - 'cflags': [ '-O3' ], - 'conditions': [ - ['target_arch=="x64"', { - 'msvs_configuration_platform': 'x64', - }], - ['OS=="solaris"', { - # pull in V8's postmortem metadata - 'ldflags': [ '-Wl,-z,allextract' ] - }], - ['OS!="mac" and OS!="win"', { - 'cflags': [ '-fno-omit-frame-pointer' ], - }], - ['OS == "android"', { - 'cflags': [ '-fPIE' ], - 'ldflags': [ '-fPIE', '-pie' ] - }], - ], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'RuntimeLibrary': '<(win_release_RuntimeLibrary)', # static release - 'Optimization': 3, # /Ox, full optimization - 'FavorSizeOrSpeed': 1, # /Ot, favour speed over size - 'InlineFunctionExpansion': 2, # /Ob2, inline anything eligible - 'WholeProgramOptimization': 'true', # /GL, whole program optimization, needed for LTCG - 'OmitFramePointers': 'true', - 'EnableFunctionLevelLinking': 'true', - 'EnableIntrinsicFunctions': 'true', - 'RuntimeTypeInfo': 'false', - 'AdditionalOptions': [ - '/MP', # compile across multiple CPUs - ], - }, - 'VCLibrarianTool': { - 'AdditionalOptions': [ - '/LTCG', # link time code generation - ], - }, - 'VCLinkerTool': { - 'LinkTimeCodeGeneration': 1, # link-time code generation - 'OptimizeReferences': 2, # /OPT:REF - 'EnableCOMDATFolding': 2, # /OPT:ICF - 'LinkIncremental': 1, # disable incremental linking - }, - }, - }, - 'Debug': { - 'inherit_from': ['Common_Base', 'Debug_Base'], - }, - 'Release': { - 'inherit_from': ['Common_Base', 'Release_Base'], - }, - 'conditions': [ - [ 'OS=="win"', { - 'Debug_x64': { 'inherit_from': ['Debug'] }, - 'Release_x64': { 'inherit_from': ['Release'], }, - }], - ], - }, - # Forcibly disable -Werror. We support a wide range of compilers, it's - # simply not feasible to squelch all warnings, never mind that the - # libraries in deps/ are not under our control. - 'cflags!': ['-Werror'], - 'msvs_settings': { - 'VCCLCompilerTool': { - 'StringPooling': 'true', # pool string literals - 'DebugInformationFormat': 3, # Generate a PDB - 'WarningLevel': 3, - 'BufferSecurityCheck': 'true', - 'ExceptionHandling': 0, # /EHsc - 'SuppressStartupBanner': 'true', - # Disable "warning C4267: conversion from 'size_t' to 'int', - # possible loss of data". Many originate from our dependencies - # and their sheer number drowns out other, more legitimate warnings. - 'DisableSpecificWarnings': ['4267'], - 'WarnAsError': 'false', - }, - 'VCLibrarianTool': { - }, - 'VCLinkerTool': { - 'conditions': [ - ['target_arch=="ia32"', { - 'TargetMachine' : 1, # /MACHINE:X86 - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console,"5.01"' ], - }], - ], - }], - ['target_arch=="x64"', { - 'TargetMachine' : 17, # /MACHINE:AMD64 - 'target_conditions': [ - ['_type=="executable"', { - 'AdditionalOptions': [ '/SubSystem:Console,"5.02"' ], - }], - ], - }], - ], - 'GenerateDebugInformation': 'true', - 'GenerateMapFile': 'true', # /MAP - 'MapExports': 'true', # /MAPINFO:EXPORTS - 'RandomizedBaseAddress': 2, # enable ASLR - 'DataExecutionPrevention': 2, # enable DEP - 'AllowIsolation': 'true', - 'SuppressStartupBanner': 'true', - }, - }, - 'msvs_disabled_warnings': [4351, 4355, 4800, 4595], - 'conditions': [ - ['asan == 1 and OS != "mac"', { - 'cflags+': [ - '-fno-omit-frame-pointer', - '-fsanitize=address', - '-DLEAK_SANITIZER' - ], - 'cflags!': [ '-fomit-frame-pointer' ], - 'ldflags': [ '-fsanitize=address' ], - }], - ['asan == 1 and OS == "mac"', { - 'xcode_settings': { - 'OTHER_CFLAGS+': [ - '-fno-omit-frame-pointer', - '-gline-tables-only', - '-fsanitize=address', - '-DLEAK_SANITIZER' - ], - 'OTHER_CFLAGS!': [ - '-fomit-frame-pointer', - ], - }, - 'target_conditions': [ - ['_type!="static_library"', { - 'xcode_settings': {'OTHER_LDFLAGS': ['-fsanitize=address']}, - }], - ], - }], - ['OS == "win"', { - 'msvs_cygwin_shell': 0, # prevent actions from trying to use cygwin - 'defines': [ - 'WIN32', - # we don't really want VC++ warning us about - # how dangerous C functions are... - '_CRT_SECURE_NO_DEPRECATE', - # ... or that C implementations shouldn't use - # POSIX names - '_CRT_NONSTDC_NO_DEPRECATE', - # Make sure the STL doesn't try to use exceptions - '_HAS_EXCEPTIONS=0', - #'BUILDING_V8_SHARED=1', - 'BUILDING_UV_SHARED=1', - ], - }], - [ 'OS in "linux freebsd openbsd solaris aix"', { - 'cflags': [ '-pthread'], - 'ldflags': [ '-pthread'], - }], - [ 'OS in "linux freebsd openbsd solaris android aix"', { - 'cflags': [ '-Wall', '-Wextra', '-Wno-unused-parameter', ], - 'cflags_cc': [ '-fno-rtti', '-fno-exceptions', '-std=gnu++0x' ], - 'ldflags': [ '-rdynamic' ], - 'target_conditions': [ - # The 1990s toolchain on SmartOS can't handle thin archives. - ['_type=="static_library" and OS=="solaris"', { - 'standalone_static_library': 1, - }], - ['OS=="openbsd"', { - 'ldflags': [ '-Wl,-z,wxneeded' ], - }], - ], - 'conditions': [ - [ 'target_arch=="ia32"', { - 'cflags': [ '-m32', '--sysroot=<(sysroot)' ], - 'ldflags': [ '-m32','--sysroot=<(sysroot)','<!(<(DEPTH)/content/nw/tools/sysroot_ld_path.sh <(sysroot))' ], - }], - [ 'target_arch=="x32"', { - 'cflags': [ '-mx32' ], - 'ldflags': [ '-mx32' ], - }], - [ 'target_arch=="x64"', { - 'cflags': [ '-m64' ], - 'ldflags': [ '-m64' ], - }], - [ 'target_arch=="ppc" and OS!="aix"', { - 'cflags': [ '-m32' ], - 'ldflags': [ '-m32' ], - }], - [ 'target_arch=="ppc64" and OS!="aix"', { - 'cflags': [ '-m64', '-mminimal-toc' ], - 'ldflags': [ '-m64' ], - }], - [ 'target_arch=="s390"', { - 'cflags': [ '-m31', '-march=z196' ], - 'ldflags': [ '-m31', '-march=z196' ], - }], - [ 'target_arch=="s390x"', { - 'cflags': [ '-m64', '-march=z196' ], - 'ldflags': [ '-m64', '-march=z196' ], - }], - [ 'OS=="solaris"', { - 'cflags': [ '-pthreads' ], - 'ldflags': [ '-pthreads' ], - 'cflags!': [ '-pthread' ], - 'ldflags!': [ '-pthread' ], - }], - [ 'OS=="aix"', { - 'conditions': [ - [ 'target_arch=="ppc"', { - 'ldflags': [ '-Wl,-bmaxdata:0x60000000/dsa' ], - }], - [ 'target_arch=="ppc64"', { - 'cflags': [ '-maix64' ], - 'ldflags': [ '-maix64' ], - }], - ], - 'ldflags': [ '-Wl,-bbigtoc' ], - 'ldflags!': [ '-rdynamic' ], - }], - [ 'node_shared=="true"', { - 'cflags': [ '-fPIC' ], - }], - ], - }], - ['OS=="android"', { - 'target_conditions': [ - ['_toolset=="target"', { - 'defines': [ '_GLIBCXX_USE_C99_MATH' ], - 'libraries': [ '-llog' ], - }], - ], - }], - ['OS=="mac"', { - 'defines': ['_DARWIN_USE_64_BIT_INODE=1'], - 'xcode_settings': { - 'ALWAYS_SEARCH_USER_PATHS': 'NO', - 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks - 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic - # (Equivalent to -fPIC) - 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions - 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti - 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings - 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics - 'PREBINDING': 'NO', # No -Wl,-prebind - 'MACOSX_DEPLOYMENT_TARGET': '10.7', # -mmacosx-version-min=10.7 - 'USE_HEADERMAP': 'NO', - 'OTHER_CFLAGS': [ - '-fno-strict-aliasing', - ], - 'WARNING_CFLAGS': [ - '-Wall', - '-Wendif-labels', - '-W', - '-Wno-unused-parameter', - ], - }, - 'target_conditions': [ - ['_type!="static_library"', { - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-Wl,-no_pie', - '-Wl,-search_paths_first', - ], - }, - }], - ], - 'conditions': [ - ['target_arch=="ia32"', { - 'xcode_settings': {'ARCHS': ['i386']}, - }], - ['target_arch=="x64"', { - 'xcode_settings': {'ARCHS': ['x86_64']}, - }], - ['clang==1', { - 'xcode_settings': { - 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0', - 'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x', # -std=gnu++0x - 'CLANG_CXX_LIBRARY': 'libc++', - }, - }], - ], - }], - ['OS=="freebsd" and node_use_dtrace=="true"', { - 'libraries': [ '-lelf' ], - }], - ['OS=="freebsd"', { - 'conditions': [ - ['llvm_version < "4.0"', { - # Use this flag because on FreeBSD std::pairs copy constructor is non-trivial. - # Doesn't apply to llvm 4.0 (FreeBSD 11.1) or later. - # Refs: https://lists.freebsd.org/pipermail/freebsd-toolchain/2016-March/002094.html - # Refs: https://svnweb.freebsd.org/ports/head/www/node/Makefile?revision=444555&view=markup - 'cflags': [ '-D_LIBCPP_TRIVIAL_PAIR_COPY_CTOR=1' ], - }], - ], - 'ldflags': [ - '-Wl,--export-dynamic', - ], - }] - ], - } -} \ No newline at end of file diff --git a/release/arch/windows/build.bat b/release/arch/windows/build.bat index 7a74e0756d9f515194b262f9492f5570f7c1331c..e54e2f6e7ee18e2f9dea06ede023153206a05633 100644 --- a/release/arch/windows/build.bat +++ b/release/arch/windows/build.bat @@ -1,7 +1,7 @@ -set ADDON_VERSION=57 -set NW_VERSION=0.24.4 -set NODEJS_VERSION=8.9.1 +set ADDON_VERSION=59 +set NW_VERSION=0.27.1 +set NODEJS_VERSION=9.1.0 set NW_RELEASE=v%NW_VERSION% set NW=nwjs-%NW_RELEASE%-win-x64 @@ -82,7 +82,6 @@ call npm install --build-from-source REM PREPARE common.gypi call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure -xcopy C:\vagrant\0.24.4_common.gypi C:\Users\vagrant\.nw-gyp\0.24.4\common.gypi /s /e /Y call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 configure call node-pre-gyp --runtime=node-webkit --target=%NW_VERSION% --msvs_version=2015 build diff --git a/yarn.lock b/yarn.lock index fd48982082b1b8eca41cbd968fbe604762124be7..27b57764e92f118d2b9267a7f057a165ee4f1760 100644 --- a/yarn.lock +++ b/yarn.lock @@ -57,10 +57,6 @@ agent-base@^4.1.0: dependencies: es6-promisify "^5.0.0" -adm-zip@0.4.7: - version "0.4.7" - resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.7.tgz#8606c2cbf1c426ce8c8ec00174447fd49b6eafc1" - ajv-keywords@^1.0.0: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" @@ -238,10 +234,6 @@ assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234" -async@0.1.22: - version "0.1.22" - resolved "https://registry.yarnpkg.com/async/-/async-0.1.22.tgz#0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061" - async@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/async/-/async-2.2.0.tgz#c324eba010a237e4fbd55a12dee86367d5c0ef32" @@ -252,7 +244,7 @@ async@^1.4.0: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" -async@^2.0.0: +async@^2.0.0, async@^2.1.5: version "2.6.0" resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4" dependencies: @@ -981,28 +973,6 @@ doctrine@^1.2.2: esutils "^2.0.2" isarray "^1.0.0" -duniter-ui@^1.6.13: - version "1.6.13" - resolved "https://registry.yarnpkg.com/duniter-ui/-/duniter-ui-1.6.13.tgz#3f203152fc0e3e1cbae74c1a0353a620c82d72ee" - dependencies: - adm-zip "0.4.7" - body-parser "1.17.1" - co "4.6.0" - cors "2.8.2" - event-stream "3.3.4" - express "4.15.2" - express-fileupload "0.0.5" - fs-extra "2.1.2" - materialize-css "0.98.1" - moment "2.18.1" - node-pre-gyp "0.6.34" - q "1.5.0" - request "2.81.0" - request-promise "4.2.0" - rimraf "2.6.1" - tmp "0.0.31" - underscore "1.8.3" - duplexer@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.1.tgz#ace6ff808c1ce66b57d1ebf97977acb02334cfc1" @@ -1545,13 +1515,6 @@ from@~0: version "0.1.7" resolved "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe" -fs-extra@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - fs-extra@^0.22.1: version "0.22.1" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.22.1.tgz#5fd6f8049dc976ca19eb2355d658173cabcce056" @@ -1719,10 +1682,6 @@ growl@1.9.2: version "1.9.2" resolved "https://registry.yarnpkg.com/growl/-/growl-1.9.2.tgz#0ea7743715db8d8de2c5ede1775e1b45ac85c02f" -hammerjs@^2.0.4: - version "2.0.8" - resolved "https://registry.yarnpkg.com/hammerjs/-/hammerjs-2.0.8.tgz#04ef77862cff2bb79d30f7692095930222bf60f1" - handlebars@^4.0.3: version "4.0.11" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" @@ -1963,10 +1922,6 @@ invert-kv@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" -ip@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/ip/-/ip-0.0.1.tgz#bbc68d7cc448560a63fbe99237a01bc50fdca7ec" - ip@^1.1.4: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" @@ -2189,7 +2144,6 @@ jison@0.4.17: lex-parser "~0.1.3" nomnom "1.5.2" - js-tokens@^3.0.0, js-tokens@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" @@ -2445,14 +2399,6 @@ map-stream@~0.1.0: buffers "~0.1.1" readable-stream "~1.0.0" -materialize-css@0.98.1: - version "0.98.1" - resolved "https://registry.yarnpkg.com/materialize-css/-/materialize-css-0.98.1.tgz#7276895b2c998b53e26deaa0c23a0484c0851d99" - dependencies: - hammerjs "^2.0.4" - jquery "^2.1.4" - node-archiver "^0.3.0" - md5-hex@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4" @@ -2601,9 +2547,9 @@ mocha@^3.4.2: mkdirp "0.5.1" supports-color "3.1.2" -moment@2.18.1: - version "2.18.1" - resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" +moment@2.19.3: + version "2.19.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.19.3.tgz#bdb99d270d6d7fda78cc0fbace855e27fe7da69f" morgan@1.8.1: version "1.8.1" @@ -2645,9 +2591,9 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -naclb@1.3.9: - version "1.3.9" - resolved "https://registry.yarnpkg.com/naclb/-/naclb-1.3.9.tgz#8fdf893682a71494b964b24f4b59429d02998ef7" +naclb@1.3.10: + version "1.3.10" + resolved "https://registry.yarnpkg.com/naclb/-/naclb-1.3.10.tgz#2c4fd6ccf318a3cef252dcd9dad389fab383d96f" dependencies: bindings "1.2.1" nan "2.2.0" @@ -2657,9 +2603,18 @@ nan@2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.2.0.tgz#779c07135629503cf6a7b7e6aab33049b3c3853c" -nan@~2.3.3: - version "2.3.5" - resolved "https://registry.yarnpkg.com/nan/-/nan-2.3.5.tgz#822a0dc266290ce4cd3a12282ca3e7e364668a08" +nan@~2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" + +nat-upnp@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/nat-upnp/-/nat-upnp-1.1.1.tgz#b18365e4faf44652549bb593c69e6b690df22043" + dependencies: + async "^2.1.5" + ip "^1.1.4" + request "^2.79.0" + xml2js "~0.1.14" natives@^1.1.0: version "1.1.0" @@ -2673,22 +2628,6 @@ negotiator@0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" -nnupnp@1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/nnupnp/-/nnupnp-1.0.2.tgz#1f76e283a0c8fc3a70ae84db762d999f650e0929" - dependencies: - async "0.1.22" - ip "0.0.1" - request "2.10.0" - xml2js "0.1.14" - -node-archiver@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/node-archiver/-/node-archiver-0.3.0.tgz#b9f1afe5006d0bdf29260181833a070978bc6947" - dependencies: - fstream "^1.0.10" - tar "^2.2.1" - node-pre-gyp@0.6.23: version "0.6.23" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.23.tgz#155bf3683abcfcde008aedab1248891a0773db95" @@ -2731,7 +2670,7 @@ node-pre-gyp@0.6.34: tar "^2.2.1" tar-pack "^3.4.0" -node-pre-gyp@~0.6.28: +node-pre-gyp@~0.6.38: version "0.6.39" resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.39.tgz#c00e96860b23c0e1420ac7befc5044e1d78d8649" dependencies: @@ -3316,10 +3255,6 @@ request-promise@4.2.0: request-promise-core "1.1.1" stealthy-require "^1.0.0" -request@2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/request/-/request-2.10.0.tgz#9911b5ef669b6500da2ae0b133fa1cfc92b1c48a" - request@2.40.0: version "2.40.0" resolved "https://registry.yarnpkg.com/request/-/request-2.40.0.tgz#4dd670f696f1e6e842e66b4b5e839301ab9beb67" @@ -3495,9 +3430,9 @@ sax@>=0.1.1: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" -scryptb@6.0.4: - version "6.0.4" - resolved "https://registry.yarnpkg.com/scryptb/-/scryptb-6.0.4.tgz#593e03cab6295e21172b6e5870b5c76f0f89da83" +scryptb@6.0.5: + version "6.0.5" + resolved "https://registry.yarnpkg.com/scryptb/-/scryptb-6.0.5.tgz#c6d3e37b9bdf6ad451024ffad1298b0700849d2d" dependencies: bindings "1.2.1" nan "2.2.0" @@ -3732,12 +3667,12 @@ sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" -sqlite3@3.1.4: - version "3.1.4" - resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-3.1.4.tgz#b01176b8aebdfe9e09ce0b3faedbf305d8a64a25" +sqlite3@3.1.13: + version "3.1.13" + resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-3.1.13.tgz#d990a05627392768de6278bafd1a31fdfe907dd9" dependencies: - nan "~2.3.3" - node-pre-gyp "~0.6.28" + nan "~2.7.0" + node-pre-gyp "~0.6.38" sshpk@^1.7.0: version "1.13.1" @@ -4261,9 +4196,9 @@ wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" -wotb@0.6.x: - version "0.6.3" - resolved "https://registry.yarnpkg.com/wotb/-/wotb-0.6.3.tgz#9e64a1a2ad312f6b72b92a6f570ae963d13dd76a" +wotb@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/wotb/-/wotb-0.6.4.tgz#2ff7020031198ebe9d6e115a898b554940aec3e9" dependencies: bindings "1.2.1" nan "2.2.0" @@ -4305,7 +4240,7 @@ xml-escape@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/xml-escape/-/xml-escape-1.0.0.tgz#00963d697b2adf0c185c4e04e73174ba9b288eb2" -xml2js@0.1.14: +xml2js@~0.1.14: version "0.1.14" resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.1.14.tgz#5274e67f5a64c5f92974cd85139e0332adc6b90c" dependencies: