From d4bb3864e5b7b57f8764d6c31cc17aa8f7bda55d Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Fri, 14 Feb 2020 00:42:56 +0100 Subject: [PATCH] Fixed windows build --- installer/WinInstall.ejs | 4 +- installer/package_windows.ts | 2 +- jenkins/create_build.sh | 10 +-- native/CMakeLists.txt | 8 +- native/serverconnection/test/js/main.ts | 99 ++----------------------- package-lock.json | 2 +- package.json | 8 +- 7 files changed, 23 insertions(+), 110 deletions(-) diff --git a/installer/WinInstall.ejs b/installer/WinInstall.ejs index 1794631..a732b58 100644 --- a/installer/WinInstall.ejs +++ b/installer/WinInstall.ejs @@ -6,13 +6,13 @@ ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{0F43B730-DF59-4A23-82AD-E895E72BE4AF} -AppName=TeaSpeak Client +AppName=TeaClient AppVersion=<%= version %> AppPublisher=TeaSpeak AppPublisherURL=https://www.teaspeak.com/ AppSupportURL=https://www.forum.teaspeak.com/ AppUpdatesURL=https://www.teaspeak.com/ -DefaultDirName={pf}\TeaSpeak +DefaultDirName={pf}\TeaSpeak\Client OutputBaseFilename=<%= executable_name %> OutputDir=<%= dest_dir %> SetupIconFile=<%= icon_file %> diff --git a/installer/package_windows.ts b/installer/package_windows.ts index ab4bd62..7863dec 100644 --- a/installer/package_windows.ts +++ b/installer/package_windows.ts @@ -35,7 +35,7 @@ async function make_template() : Promise { async function make_installer(path: string) { console.log("Compiling path %s", path); - const { stdout, stderr } = await exec("\"C:\\Program Files (x86)\\Inno Setup 6\\iscc.exe\" " + path, {maxBuffer: 1024 * 1024 * 1024}); //FIXME relative path? + const { stdout, stderr } = await exec("\"D:\\Program Files (x86)\\Inno Setup 6\\iscc.exe\" " + path, {maxBuffer: 1024 * 1024 * 1024}); //FIXME relative path? } if(process.argv.length < 3) { console.error("Missing build channel!"); diff --git a/jenkins/create_build.sh b/jenkins/create_build.sh index 2f0a1b9..ed576d8 100755 --- a/jenkins/create_build.sh +++ b/jenkins/create_build.sh @@ -119,8 +119,8 @@ function deploy_client() { end_task "${project_name}_package" "Client successfully deployed!" } -install_npm -compile_scripts -compile_native -package_client -#deploy_client +#install_npm +#compile_scripts +#compile_native +#package_client +deploy_client diff --git a/native/CMakeLists.txt b/native/CMakeLists.txt index cc20be1..36a2fbe 100644 --- a/native/CMakeLists.txt +++ b/native/CMakeLists.txt @@ -21,11 +21,11 @@ message("Module path: ${CMAKE_MODULE_PATH}") #Setup NodeJS function(setup_nodejs) set(NodeJS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") - set(NODEJS_URL "https://atom.io/download/atom-shell") - set(NODEJS_VERSION "v8.0.0") + #set(NODEJS_URL "https://atom.io/download/atom-shell") + #set(NODEJS_VERSION "v8.0.0") - #set(NODEJS_URL "https://nodejs.org/download/release/") - #set(NODEJS_VERSION "v12.13.0") + set(NODEJS_URL "https://nodejs.org/download/release/") + set(NODEJS_VERSION "v12.13.0") find_package(NodeJS REQUIRED) diff --git a/native/serverconnection/test/js/main.ts b/native/serverconnection/test/js/main.ts index fe711ae..7c65fa5 100644 --- a/native/serverconnection/test/js/main.ts +++ b/native/serverconnection/test/js/main.ts @@ -1,7 +1,7 @@ /// console.log("HELLO WORLD"); module.paths.push("../../build/linux_x64"); -module.paths.push("../../build/win32_64"); +module.paths.push("../../build/win32_x64"); //LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5 const os = require('os'); @@ -10,7 +10,7 @@ const os = require('os'); import * as fs from "fs"; const original_require = require; -require = (module => original_require(__dirname + "/../../../build/linux_x64/" + module + ".node")) as any; +require = (module => original_require(__dirname + "/../../../build/win32_x64/" + module + ".node")) as any; import * as handle from "teaclient_connection"; require = original_require; @@ -18,88 +18,6 @@ const connection_list = []; const connection = handle.spawn_server_connection(); const client_list = []; -console.dir(handle); -console.log("Query devices..."); -console.log("Devices: %o", handle.audio.available_devices()); -console.log("Current playback device: %o", handle.audio.playback.current_device()); -//handle.audio.playback.set_device(14); -//console.log("Current playback device: %o", handle.audio.playback.current_device()); - -const stream = handle.audio.playback.create_stream(); -console.log("Own stream: %o", stream); - - -for(let i = 0; i < 12 && false; i++) { - const recorder = handle.audio.record.create_recorder(); - for(const device of handle.audio.available_devices()) { - if(!device.input_supported) - continue; - - if(device.name != "pulse") - continue; - - console.log("Found pulse at %o", device.device_index); - recorder.set_device(device.device_index, () => {}); - break; - } - recorder.start(flag => console.log("X: " + flag)); - const consumer = recorder.create_consumer(); - consumer.create_filter_threshold(2); -} - -/* -1 => default device */ -const recorder = handle.audio.record.create_recorder(); -console.log("Have device: %o", recorder); -console.log("Device: %o", recorder.get_device()); -if(recorder.get_device() == -1) { - console.log("Looking for devices"); - for(const device of handle.audio.available_devices()) { - if(!device.input_supported) - continue; - - if(device.name != "pulse") - continue; - - console.log("Found pulse at %o", device.device_index); - recorder.set_device(device.device_index, () => {}); - } -} -console.log("Device: %o", recorder.get_device()); -recorder.start(() => {}); -console.log("Started: %o", recorder.started()); - -const consumer = recorder.create_consumer(); - -{ - const filter = consumer.create_filter_threshold(.5); - filter.set_margin_frames(10); - /* - filter.set_analyze_filter(value => { - console.log(value); - }) - */ -} - -{ - //const filter = consumer.create_filter_vad(3); - //console.log("Filter name: %s; Filter level: %d; Filter margin: %d", filter.get_name(), filter.get_level(), filter.get_margin_frames()); -} - -{ - const consume = consumer.create_filter_state(); - setTimeout(() => { - console.log("Silence now!"); - consume.set_consuming(true); - - setTimeout(() => { - console.log("Speak now!"); - consume.set_consuming(false); - }, 1000); - }, 1000); -} - - - //process.exit(0); connection.callback_command = (command, args, switches) => { //console.log("Got command %s: %o (%o)", command, args, switches); @@ -141,9 +59,11 @@ connection.callback_disconnect = reason => { const do_connect = () => { connection.connect({ timeout: 5000, - remote_port: 9987, + remote_host: "51.255.107.151", + remote_port: 31515, + //remote_port: 9987, //remote_host: "188.40.240.20", /* twerion */ - remote_host: "localhost", + //remote_host: "localhost", //remote_host: "ts.teaspeak.de", //remote_host: "51.68.181.92", //remote_host: "94.130.236.135", @@ -181,11 +101,6 @@ const do_connect = () => { } ], []); - consumer.callback_ended = () => { - console.log(">> Audio end"); - }; - - connection._voice_connection.set_audio_source(consumer); /* consumer.callback_data = buffer => { console.log("Sending voice data"); @@ -225,11 +140,9 @@ setInterval(() => { } }, 1000); -let a_map = [consumer, recorder]; /* keep the object alive */ setTimeout(() => { connection.connected(); - a_map = a_map.filter(e => true); }, 1000); connection_list.push(connection); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 182ddcd..d1a4d5d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "TeaClient", - "version": "1.4.3", + "version": "1.4.3-2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index a5dffd0..4413959 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TeaClient", - "version": "1.4.3", + "version": "1.4.3-2", "description": "", "main": "main.js", "scripts": { @@ -38,14 +38,14 @@ "asar": "^2.0.1", "cmake-js": "^4.0.1", "ejs": "^2.7.1", - "electron-installer-windows": "^1.1.0", + "electron-installer-windows": "^1.1.1", "electron-packager": "8.7.2", "electron-winstaller": "^2.7.0", - "electron-wix-msi": "^2.1.1", + "electron-wix-msi": "^2.2.0", "nodemon": "^1.19.4", "platform-dependent-modules": "0.0.14", "rc": "^1.2.8", - "rcedit": "^1.1.1", + "rcedit": "^1.1.2", "sass": "^1.23.2", "typescript": "^3.7.2" },