Skip to content

Commit

Permalink
pack mac
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashuaidehao committed Apr 10, 2020
1 parent cbf59c1 commit 2997674
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
20 changes: 17 additions & 3 deletions neo3-gui/neo3-gui/ClientApp/node-manager.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const { spawn } = require('child_process');
const path = require('path');

const isMac = process.platform === "darwin";
const isWin = process.platform === "win32";
// const appPath = remote.app.getAppPath();
// const isPack = remote.app.isPackaged;

class NodeManager {

Expand All @@ -24,9 +27,20 @@ class NodeManager {
}

runCommand(command, env) {
let startPath = __dirname.replace("app.asar", "");
const startPath = __dirname.replace("app.asar", "");
console.log(startPath);
const ps = spawn(command, [], { shell: true, encoding: 'utf8', cwd: path.join(startPath, 'build-neo-node'), env });
const parentEnv = process.env;
const childEnv = { ...parentEnv, ...env };
if (isWin) {

}
else if (isMac) {
childEnv.PATH = childEnv.PATH + ":/usr/local/share/dotnet";
}
else {

}
const ps = spawn(command, [], { shell: true, encoding: 'utf8', cwd: path.join(startPath, 'build-neo-node'), env: childEnv });
// ps.stdout.setEncoding('utf8');
ps.stdout.on('data', (data) => {
// var str = iconv.decode(new Buffer(data), 'gbk')
Expand Down
8 changes: 3 additions & 5 deletions neo3-gui/neo3-gui/ClientApp/src/config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
class Config{

class Config {
RPCURL = "http://localhost:8081";
Language="en";
Language = "en";

}

const config=new Config();
const config = new Config();

console.log("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn")

export default config;
2 changes: 1 addition & 1 deletion neo3-gui/neo3-gui/neo3-gui.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>Neo</RootNamespace>
<SpaRoot>ClientApp\</SpaRoot>
<DefaultItemExcludes>$(SpaRoot)node_modules\**;Data*\**</DefaultItemExcludes>
Expand Down

0 comments on commit 2997674

Please sign in to comment.