Commit 248f91a6 authored by Leon Müller's avatar Leon Müller
Browse files

Now buildable as executable with nodegui/packer, dark/lightmode support on...

Now buildable as executable with nodegui/packer, dark/lightmode support on macos, factFUSE no longer relies on unreliable json files, QFileDialogs now run as their own process, fixed bug where provView would show the wrong resource
parent ce95aebf
......@@ -10,6 +10,7 @@ node_modules/
src/.vscode/
.vscode/
dist/
deploy/darwin/build/
#mountpoint
mount/
......@@ -20,3 +21,5 @@ src/LocalChangeManager/uncommitedChanges.json
{"appName":"factFUSE"}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>qode</string>
<key>CFBundleIdentifier</key>
<string>org.nodegui.exampleapp</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleIconFile</key>
<string>factFUSE</string>
<key>CFBundleName</key>
<string>factFUSE</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 NodeGui. All rights reserved.</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
</dict>
</plist>
\ No newline at end of file
APPL????
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
const path = require("path");
// Fix so that macos resources are found correctly
// since webpack will bundle them such that the expected path is /dist from cwd
process.chdir(path.resolve(path.dirname(process.execPath), "..", "Resources"));
// Now start loading the actual bundle
require("./dist");
......@@ -1128,6 +1128,31 @@
"prebuild-install": "^5.3.4"
}
},
"@nodegui/os-utils": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@nodegui/os-utils/-/os-utils-1.1.2.tgz",
"integrity": "sha512-z7OApHqDBOsnHOStfZ8pcMIkJuorU34w0pQXtLUM2snI/SAr4t0n5m+nnjYRH227KDuOytaydZrQm+EOYUc7Bg==",
"requires": {
"cmake-js": "^6.0.0",
"cross-env": "^6.0.0",
"node-addon-api": "^1.7.1"
},
"dependencies": {
"cross-env": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz",
"integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==",
"requires": {
"cross-spawn": "^7.0.0"
}
},
"node-addon-api": {
"version": "1.7.2",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz",
"integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg=="
}
}
},
"@nodegui/packer": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/@nodegui/packer/-/packer-1.4.1.tgz",
......@@ -1148,6 +1173,31 @@
}
}
},
"@nodegui/plugin-title-bar": {
"version": "0.0.2",
"resolved": "https://registry.npmjs.org/@nodegui/plugin-title-bar/-/plugin-title-bar-0.0.2.tgz",
"integrity": "sha512-E2N8tNY9Iljq8e5K7r6Ua39d0iO/INyPVOdogayVPaWu+BMv9ygOf3+da43YraafPCI84CQ+PIzfqyMPCCac4A==",
"requires": {
"cmake-js": "^6.0.0",
"cross-env": "^6.0.3",
"node-addon-api": "^2.0.0"
},
"dependencies": {
"cross-env": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/cross-env/-/cross-env-6.0.3.tgz",
"integrity": "sha512-+KqxF6LCvfhWvADcDPqo64yVIB31gv/jQulX2NGzKS/g3GEVz6/pt4wjHFtFWsHMddebWD/sDthJemzM4MaAag==",
"requires": {
"cross-spawn": "^7.0.0"
}
},
"node-addon-api": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.2.tgz",
"integrity": "sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA=="
}
}
},
"@nodegui/qode": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@nodegui/qode/-/qode-2.1.0.tgz",
......
......@@ -6,6 +6,8 @@
"dependencies": {
"@i5/factlib.js": "^0.1.3",
"@nodegui/nodegui": "^0.22.0",
"@nodegui/os-utils": "^1.1.2",
"@nodegui/plugin-title-bar": "0.0.2",
"axios": "^0.19.2",
"domino": "^2.1.6",
"fuse-native": "^2.2.6",
......@@ -32,8 +34,7 @@
"tsc": "tsc",
"webpack": "webpack",
"gui": "qode ./dist/provView.js",
"commit": "qode ./dist/commitGUI.js",
"init": "qode ./dist/initGUI.js",
"init": "qode ./dist/index.js",
"updateConfig": "node -e \"require('./src/configUpdater').setSelectedResource()\""
},
"repository": {
......
This diff is collapsed.
......@@ -17,8 +17,14 @@ export class CommitHandler {
}
async commitSelectedChanges() {
//const uncommitedChanges = require('./uncommitedChanges.json')
const uncommitedChanges = JSON.parse(fs.readFileSync(pat.join(__dirname,'..','src/LocalChangeManager/uncommitedChanges.json')))
const fsH = require('../FileSystemHandler/fileSystemHandler')
const uncommittedChanges = {
"Add": fsH.tempFiles.map((x:any)=>x.replace(pat.extname(x),"")).filter((y:any)=>!y.includes("/.")),
"AddBin": fsH.tempBinaryFiles.filter((y:any)=>!y.includes("/.")),
"AddDir": fsH.tempDirectories,
"Remove": fsH.deletedResources.map((x:any)=>x.replace(pat.extname(x),""))
}
const commitConfig = {
"authority": {
"uri": config.ldpAddress
......@@ -39,15 +45,15 @@ export class CommitHandler {
const binaryCandidates:any = [];
const deletions:any = [];
var i = 0;
console.log(uncommitedChanges)
for(const addedDir of uncommitedChanges.AddDir) {
console.log(uncommittedChanges)
for(const addedDir of uncommittedChanges.AddDir) {
if(this.commit.listOfChanges[i] == 1) {
console.log("mkdir: " + addedDir)
ContainerCreater.createDirectory(addedDir)
}
i++;
}
for(const addedEntity of uncommitedChanges.Add) {
for(const addedEntity of uncommittedChanges.Add) {
if(this.commit.listOfChanges[i] == 1) {
console.log("create: " + addedEntity)
const cand = await ResourceCreater.createResourceCandidate(addedEntity)
......@@ -58,7 +64,7 @@ export class CommitHandler {
}
i++;
}
for(const addedBinary of uncommitedChanges.AddBin) {
for(const addedBinary of uncommittedChanges.AddBin) {
if(this.commit.listOfChanges[i] == 1) {
console.log("create Binary: " + addedBinary)
const cand = await ResourceCreater.createBinaryResourceCandidate(addedBinary)
......@@ -68,7 +74,7 @@ export class CommitHandler {
}
i++;
}
for(const deletedResource of uncommitedChanges.Remove) {
for(const deletedResource of uncommittedChanges.Remove) {
if(this.commit.listOfChanges[i] == 1) {
console.log("delete: " + deletedResource)
deletions.push(deletedResource)
......
const fs = require('fs');
export class LocalChangeManager {
public tempFiles:any[];
public tempBinaryFiles:any[];
public tempDirectories:any[];
public deletedResources:any[];
public changeBuffer:any[];
constructor(){
this.changeBuffer = [];
this.tempFiles = [];
this.tempBinaryFiles = [];
this.tempDirectories = [];
this.deletedResources = [];
var self = this;
setInterval(function () {
const uncommittedChanges = {
"Add": self.tempFiles,
"AddBin": self.tempBinaryFiles,
"AddDir": self.tempDirectories,
"Remove": self.deletedResources
}
fs.writeFileSync('./src/LocalChangeManager/uncommitedChanges.json', JSON.stringify(uncommittedChanges, null, 2));
},1000);
};
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment