Some updates
This commit is contained in:
parent
566006f8ca
commit
841d4e88e2
@ -12,6 +12,7 @@ import * as os from "os";
|
|||||||
import * as asar from "asar";
|
import * as asar from "asar";
|
||||||
import * as querystring from "querystring";
|
import * as querystring from "querystring";
|
||||||
import request = require("request");
|
import request = require("request");
|
||||||
|
import * as deployer from "./deploy";
|
||||||
|
|
||||||
let options: Options = {} as any;
|
let options: Options = {} as any;
|
||||||
let version = parse_version(pkg.version);
|
let version = parse_version(pkg.version);
|
||||||
@ -354,6 +355,38 @@ new Promise((resolve, reject) => packager(options, (err, appPaths) => err ? reje
|
|||||||
version = "v" + version;
|
version = "v" + version;
|
||||||
await fs.writeFile(path_helper.join(app_path[0], "version"), version);
|
await fs.writeFile(path_helper.join(app_path[0], "version"), version);
|
||||||
return app_path;
|
return app_path;
|
||||||
|
}).then(async () => {
|
||||||
|
if(process.argv[2] == "win32") {
|
||||||
|
console.log("Installing local PDB files");
|
||||||
|
|
||||||
|
const symbol_binary_path = "native/build/" + os.platform() + "_" + os.arch() + "/";
|
||||||
|
const symbol_pdb_path = "native/build/symbols/";
|
||||||
|
const symbol_server_path = path_helper.join(__dirname, "..", "native", "build", "symbol-server");
|
||||||
|
|
||||||
|
const files = [];
|
||||||
|
for(const file of await fs.readdir(symbol_binary_path)) {
|
||||||
|
console.error(file);
|
||||||
|
if(!file.endsWith(".node"))
|
||||||
|
continue;
|
||||||
|
let file_name = path_helper.basename(file);
|
||||||
|
if(file_name.endsWith(".node"))
|
||||||
|
file_name = file_name.substr(0, file_name.length - 5);
|
||||||
|
const binary_path = path_helper.join(symbol_binary_path, file);
|
||||||
|
const pdb_path = path_helper.join(symbol_pdb_path, file_name + ".pdb");
|
||||||
|
if(!fs.existsSync(pdb_path)) {
|
||||||
|
console.warn("Missing PDB file for binary %s", file);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
files.push({
|
||||||
|
binary: binary_path,
|
||||||
|
pdb: pdb_path
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Gathered %d files", files.length);
|
||||||
|
await deployer.deploy_win_dbg_files(files, version, symbol_server_path);
|
||||||
|
console.log("PDB files deployed");
|
||||||
|
}
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
console.log("Package created");
|
console.log("Package created");
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
|
@ -155,10 +155,10 @@ export type WinDbgFile = {
|
|||||||
binary: string,
|
binary: string,
|
||||||
pdb: string;
|
pdb: string;
|
||||||
};
|
};
|
||||||
export async function deploy_win_dbg_files(files: WinDbgFile[], version: Version) : Promise<void> {
|
export async function deploy_win_dbg_files(files: WinDbgFile[], version: Version, path?: string) : Promise<void> {
|
||||||
//symstore add /r /f .\*.node /s \\deploy.teaspeak.de\symbols /t "TeaClient-Windows-amd64" /v "x.y.z"
|
//symstore add /r /f .\*.node /s \\deploy.teaspeak.de\symbols /t "TeaClient-Windows-amd64" /v "x.y.z"
|
||||||
//symstore add /r /f .\*.* /s \\deploy.teaspeak.de\symbols /t "TeaClient-Windows-amd64" /v "1.0.0"
|
//symstore add /r /f .\*.* /s \\deploy.teaspeak.de\symbols /t "TeaClient-Windows-amd64" /v "1.0.0"
|
||||||
const server_path = "\\\\deploy.teaspeak.de\\symbols\\symbols";
|
const server_path = typeof(path) === "string" && path ? path : "\\\\deploy.teaspeak.de\\symbols\\symbols";
|
||||||
const vstring = version_string(version);
|
const vstring = version_string(version);
|
||||||
const exec = util.promisify(child_process.exec);
|
const exec = util.promisify(child_process.exec);
|
||||||
for(const file of files) {
|
for(const file of files) {
|
||||||
@ -190,7 +190,7 @@ export async function deploy_win_dbg_files(files: WinDbgFile[], version: Version
|
|||||||
stderr: string
|
stderr: string
|
||||||
} = error;
|
} = error;
|
||||||
console.error("Failed to deploy %s file %s:", current_file, file);
|
console.error("Failed to deploy %s file %s:", current_file, file);
|
||||||
console.log(" Code: %d", perror.code)
|
console.log(" Code: %d", perror.code);
|
||||||
{
|
{
|
||||||
console.error(" Stdout: ");
|
console.error(" Stdout: ");
|
||||||
for(const element of perror.stdout.split("\n"))
|
for(const element of perror.stdout.split("\n"))
|
||||||
|
@ -34,10 +34,10 @@
|
|||||||
"cmake-js": "^4.0.1",
|
"cmake-js": "^4.0.1",
|
||||||
"ejs": "^2.7.1",
|
"ejs": "^2.7.1",
|
||||||
"electron-packager": "8.7.2",
|
"electron-packager": "8.7.2",
|
||||||
"nodemon": "^1.19.2",
|
"nodemon": "^1.19.3",
|
||||||
"platform-dependent-modules": "0.0.14",
|
"platform-dependent-modules": "0.0.14",
|
||||||
"sass": "^1.22.12",
|
"sass": "^1.23.0",
|
||||||
"typescript": "^3.6.3"
|
"typescript": "^3.6.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/minimist": "^1.2.0",
|
"@types/minimist": "^1.2.0",
|
||||||
@ -60,7 +60,7 @@
|
|||||||
"jquery": "^3.4.1",
|
"jquery": "^3.4.1",
|
||||||
"json-stringify-safe": "^5.0.1",
|
"json-stringify-safe": "^5.0.1",
|
||||||
"jsprim": "^2.0.0",
|
"jsprim": "^2.0.0",
|
||||||
"jsrender": "^1.0.4",
|
"jsrender": "^1.0.5",
|
||||||
"nan": "^2.14.0",
|
"nan": "^2.14.0",
|
||||||
"node-ssh": "^6.0.0",
|
"node-ssh": "^6.0.0",
|
||||||
"only": "0.0.2",
|
"only": "0.0.2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user