Fixed windows build
This commit is contained in:
parent
19b7e46137
commit
d4bb3864e5
@ -6,13 +6,13 @@
|
|||||||
; Do not use the same AppId value in installers for other applications.
|
; Do not use the same AppId value in installers for other applications.
|
||||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
AppId={{0F43B730-DF59-4A23-82AD-E895E72BE4AF}
|
AppId={{0F43B730-DF59-4A23-82AD-E895E72BE4AF}
|
||||||
AppName=TeaSpeak Client
|
AppName=TeaClient
|
||||||
AppVersion=<%= version %>
|
AppVersion=<%= version %>
|
||||||
AppPublisher=TeaSpeak
|
AppPublisher=TeaSpeak
|
||||||
AppPublisherURL=https://www.teaspeak.com/
|
AppPublisherURL=https://www.teaspeak.com/
|
||||||
AppSupportURL=https://www.forum.teaspeak.com/
|
AppSupportURL=https://www.forum.teaspeak.com/
|
||||||
AppUpdatesURL=https://www.teaspeak.com/
|
AppUpdatesURL=https://www.teaspeak.com/
|
||||||
DefaultDirName={pf}\TeaSpeak
|
DefaultDirName={pf}\TeaSpeak\Client
|
||||||
OutputBaseFilename=<%= executable_name %>
|
OutputBaseFilename=<%= executable_name %>
|
||||||
OutputDir=<%= dest_dir %>
|
OutputDir=<%= dest_dir %>
|
||||||
SetupIconFile=<%= icon_file %>
|
SetupIconFile=<%= icon_file %>
|
||||||
|
@ -35,7 +35,7 @@ async function make_template() : Promise<string> {
|
|||||||
|
|
||||||
async function make_installer(path: string) {
|
async function make_installer(path: string) {
|
||||||
console.log("Compiling path %s", path);
|
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) {
|
if(process.argv.length < 3) {
|
||||||
console.error("Missing build channel!");
|
console.error("Missing build channel!");
|
||||||
|
@ -119,8 +119,8 @@ function deploy_client() {
|
|||||||
end_task "${project_name}_package" "Client successfully deployed!"
|
end_task "${project_name}_package" "Client successfully deployed!"
|
||||||
}
|
}
|
||||||
|
|
||||||
install_npm
|
#install_npm
|
||||||
compile_scripts
|
#compile_scripts
|
||||||
compile_native
|
#compile_native
|
||||||
package_client
|
#package_client
|
||||||
#deploy_client
|
deploy_client
|
||||||
|
@ -21,11 +21,11 @@ message("Module path: ${CMAKE_MODULE_PATH}")
|
|||||||
#Setup NodeJS
|
#Setup NodeJS
|
||||||
function(setup_nodejs)
|
function(setup_nodejs)
|
||||||
set(NodeJS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
set(NodeJS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")
|
||||||
set(NODEJS_URL "https://atom.io/download/atom-shell")
|
#set(NODEJS_URL "https://atom.io/download/atom-shell")
|
||||||
set(NODEJS_VERSION "v8.0.0")
|
#set(NODEJS_VERSION "v8.0.0")
|
||||||
|
|
||||||
#set(NODEJS_URL "https://nodejs.org/download/release/")
|
set(NODEJS_URL "https://nodejs.org/download/release/")
|
||||||
#set(NODEJS_VERSION "v12.13.0")
|
set(NODEJS_VERSION "v12.13.0")
|
||||||
|
|
||||||
find_package(NodeJS REQUIRED)
|
find_package(NodeJS REQUIRED)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/// <reference path="../../exports/exports.d.ts" />
|
/// <reference path="../../exports/exports.d.ts" />
|
||||||
console.log("HELLO WORLD");
|
console.log("HELLO WORLD");
|
||||||
module.paths.push("../../build/linux_x64");
|
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
|
//LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.5
|
||||||
const os = require('os');
|
const os = require('os');
|
||||||
@ -10,7 +10,7 @@ const os = require('os');
|
|||||||
import * as fs from "fs";
|
import * as fs from "fs";
|
||||||
|
|
||||||
const original_require = require;
|
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";
|
import * as handle from "teaclient_connection";
|
||||||
require = original_require;
|
require = original_require;
|
||||||
|
|
||||||
@ -18,88 +18,6 @@ const connection_list = [];
|
|||||||
const connection = handle.spawn_server_connection();
|
const connection = handle.spawn_server_connection();
|
||||||
const client_list = [];
|
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);
|
//process.exit(0);
|
||||||
connection.callback_command = (command, args, switches) => {
|
connection.callback_command = (command, args, switches) => {
|
||||||
//console.log("Got command %s: %o (%o)", command, args, switches);
|
//console.log("Got command %s: %o (%o)", command, args, switches);
|
||||||
@ -141,9 +59,11 @@ connection.callback_disconnect = reason => {
|
|||||||
const do_connect = () => {
|
const do_connect = () => {
|
||||||
connection.connect({
|
connection.connect({
|
||||||
timeout: 5000,
|
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: "188.40.240.20", /* twerion */
|
||||||
remote_host: "localhost",
|
//remote_host: "localhost",
|
||||||
//remote_host: "ts.teaspeak.de",
|
//remote_host: "ts.teaspeak.de",
|
||||||
//remote_host: "51.68.181.92",
|
//remote_host: "51.68.181.92",
|
||||||
//remote_host: "94.130.236.135",
|
//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 => {
|
consumer.callback_data = buffer => {
|
||||||
console.log("Sending voice data");
|
console.log("Sending voice data");
|
||||||
@ -225,11 +140,9 @@ setInterval(() => {
|
|||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
let a_map = [consumer, recorder];
|
|
||||||
/* keep the object alive */
|
/* keep the object alive */
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
connection.connected();
|
connection.connected();
|
||||||
a_map = a_map.filter(e => true);
|
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
connection_list.push(connection);
|
connection_list.push(connection);
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "TeaClient",
|
"name": "TeaClient",
|
||||||
"version": "1.4.3",
|
"version": "1.4.3-2",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "TeaClient",
|
"name": "TeaClient",
|
||||||
"version": "1.4.3",
|
"version": "1.4.3-2",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -38,14 +38,14 @@
|
|||||||
"asar": "^2.0.1",
|
"asar": "^2.0.1",
|
||||||
"cmake-js": "^4.0.1",
|
"cmake-js": "^4.0.1",
|
||||||
"ejs": "^2.7.1",
|
"ejs": "^2.7.1",
|
||||||
"electron-installer-windows": "^1.1.0",
|
"electron-installer-windows": "^1.1.1",
|
||||||
"electron-packager": "8.7.2",
|
"electron-packager": "8.7.2",
|
||||||
"electron-winstaller": "^2.7.0",
|
"electron-winstaller": "^2.7.0",
|
||||||
"electron-wix-msi": "^2.1.1",
|
"electron-wix-msi": "^2.2.0",
|
||||||
"nodemon": "^1.19.4",
|
"nodemon": "^1.19.4",
|
||||||
"platform-dependent-modules": "0.0.14",
|
"platform-dependent-modules": "0.0.14",
|
||||||
"rc": "^1.2.8",
|
"rc": "^1.2.8",
|
||||||
"rcedit": "^1.1.1",
|
"rcedit": "^1.1.2",
|
||||||
"sass": "^1.23.2",
|
"sass": "^1.23.2",
|
||||||
"typescript": "^3.7.2"
|
"typescript": "^3.7.2"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user