Fixed windows build

This commit is contained in:
WolverinDEV 2020-02-14 00:42:56 +01:00
parent 19b7e46137
commit d4bb3864e5
7 changed files with 23 additions and 110 deletions

View File

@ -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 %>

View File

@ -35,7 +35,7 @@ async function make_template() : Promise<string> {
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!");

View File

@ -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

View File

@ -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)

View File

@ -1,7 +1,7 @@
/// <reference path="../../exports/exports.d.ts" />
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);

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "TeaClient",
"version": "1.4.3",
"version": "1.4.3-2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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"
},