Skip to content

Commit

Permalink
update: windows binary for nodejs v19.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bimalkjha committed Dec 5, 2022
1 parent b8a2be3 commit bbdf1a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
Binary file modified build.zip
Binary file not shown.
31 changes: 17 additions & 14 deletions installer/driverInstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var platform = os.platform();
var arch = os.arch();

var vscode_build = false;
var electron_version = '19.0.12';
var electron_version = '19.1.8';
var downloadProgress = 0;
var silentInstallation = false;

Expand Down Expand Up @@ -606,22 +606,22 @@ var install_node_ibm_db = function(file_url) {
else
{
//Windows node binary names should update here.
var ODBC_BINDINGS_V9 = 'build\/Release\/odbc_bindings.node.9.11.2';
var ODBC_BINDINGS_V10 = 'build\/Release\/odbc_bindings.node.10.24.1';
var ODBC_BINDINGS_V11 = 'build\/Release\/odbc_bindings.node.11.15.0';
var ODBC_BINDINGS_V12 = 'build\/Release\/odbc_bindings.node.12.22.12';
var ODBC_BINDINGS_V13 = 'build\/Release\/odbc_bindings.node.13.14.0';
var ODBC_BINDINGS_V14 = 'build\/Release\/odbc_bindings.node.14.20.0';
var ODBC_BINDINGS_V14 = 'build\/Release\/odbc_bindings.node.14.21.1';
var ODBC_BINDINGS_V15 = 'build\/Release\/odbc_bindings.node.15.14.0';
var ODBC_BINDINGS_V16 = 'build\/Release\/odbc_bindings.node.16.17.0';
var ODBC_BINDINGS_V16 = 'build\/Release\/odbc_bindings.node.16.18.1';
var ODBC_BINDINGS_V17 = 'build\/Release\/odbc_bindings.node.17.9.1';
var ODBC_BINDINGS_V18 = 'build\/Release\/odbc_bindings.node.18.12.1';

// Windows add-on binary for node.js v0.10.x, v0.12.7, 4.x, 6.x, 7.x and 8.x has been discontinued.
if(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 9.0) {
// Windows add-on binary for node.js v0.10.x, v0.12.7, 4.x, 6.x, 7.x, 8.x and 9.x has been discontinued.
if(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 10.0) {
console.log('\nERROR: Did not find precompiled add-on binary for node.js version ' + process.version + ':' +
'\nibm_db does not provide precompiled add-on binary for node.js version ' + process.version +
' on Windows platform. Visual Studio is required to compile ibm_db with node.js versions < 9.X. ' +
'Otherwise please use the node.js version >= 9.X\n');
' on Windows platform. Visual Studio is required to compile ibm_db with node.js versions < 10.X. ' +
'Otherwise please use the node.js version >= 10.X\n');
process.exit(1);
}

Expand All @@ -630,7 +630,6 @@ var install_node_ibm_db = function(file_url) {
* file name according to the node version in the system.
*/
odbcBindingsNode =
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 10.0) && ODBC_BINDINGS_V9 ||
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 11.0) && ODBC_BINDINGS_V10 ||
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 12.0) && ODBC_BINDINGS_V11 ||
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 13.0) && ODBC_BINDINGS_V12 ||
Expand All @@ -639,6 +638,7 @@ var install_node_ibm_db = function(file_url) {
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 16.0) && ODBC_BINDINGS_V15 ||
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 17.0) && ODBC_BINDINGS_V16 ||
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 18.0) && ODBC_BINDINGS_V17 ||
(Number(process.version.match(/^v(\d+\.\d+)/)[1]) < 19.0) && ODBC_BINDINGS_V18 ||
ODBC_BINDINGS;
}

Expand Down Expand Up @@ -834,15 +834,18 @@ function findElectronVersion() {
var codeOut = execSync('code --version').toString();
vscodeVer = parseFloat(codeOut.split('\n')[0]);
if(!isNaN(vscodeVer)) {
if (vscodeVer >= 1.71){
if (vscodeVer >= 1.74){
electron_version = "19.1.8";
}
else if (vscodeVer >= 1.72){
electron_version = "19.0.17";
}
else if (vscodeVer >= 1.71){
electron_version = "19.0.12";
}
else if (vscodeVer >= 1.69){
else {// vscode version older than 1.69 not supported
electron_version = "18.3.5";
}
else {// vscode version older than 1.67 not supported
electron_version = "17.4.1";
}
printMsg("Detected VSCode version" + vscodeVer +
", will use Electron version " + electron_version);
}
Expand Down

0 comments on commit bbdf1a9

Please sign in to comment.