Skip to content

Commit

Permalink
Format Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KenCorma committed Oct 29, 2024
1 parent b877505 commit dea06f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
12 changes: 5 additions & 7 deletions src/pythonEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ export class PythonEnvironment {
});

if (process.platform === 'darwin') {
// Mac need extra files to be codesigned, these now need to be unpacked and placed inside of the python folder.
// Mac need extra files to be codesigned, these now need to be unpacked and placed inside of the python folder.
this.macExtraFiles.forEach(async (fileName) => {
await fsPromises.cp(
path.join(this.appResourcesPath, 'output', fileName),
path.join(this.pythonRootPath, fileName)
);
await fsPromises.chmod( path.join(this.pythonRootPath, fileName) ,'755');
await fsPromises.chmod(path.join(this.pythonRootPath, fileName), '755');
});
try {
// TODO: If python tar is done more than once we could lose these so for now do not clean up
Expand All @@ -119,12 +119,10 @@ export class PythonEnvironment {
} catch (error) {
null;
}
// Mac seems to need a CPU cycle before allowing executing the python bin.
const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))
// Mac seems to need a CPU cycle before allowing executing the python bin.
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
await sleep(1000);
}
else
{
} else {
try {
// For non mac we can just delete these
// This is a cleanup step, and is non critical if failed.
Expand Down
13 changes: 9 additions & 4 deletions todesktop.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
"appPath": ".",
"appFiles": ["src/**", "scripts/**", "assets/**", "dist/**", ".vite/**", ".yarnrc.yml", ".yarn/**"],
"extraResources": [{ "from": "./assets" }],
"filesForDistribution": ["!assets/**","!dist/**" , "!src/**", "!scripts/**", "!.yarn/**", "!.yarnrc.yml"],
"mac" :
{
"additionalBinariesToSign" : ["./assets/output/lib/libpython3.12.dylib" , "./assets/output/lib/python3.12/lib-dynload/_crypt.cpython-312-darwin.so" , "./assets/output/bin/uv" ,"./assets/output/bin/uvx","./assets/output/bin/python3.12"]
"filesForDistribution": ["!assets/**", "!dist/**", "!src/**", "!scripts/**", "!.yarn/**", "!.yarnrc.yml"],
"mac": {
"additionalBinariesToSign": [
"./assets/output/lib/libpython3.12.dylib",
"./assets/output/lib/python3.12/lib-dynload/_crypt.cpython-312-darwin.so",
"./assets/output/bin/uv",
"./assets/output/bin/uvx",
"./assets/output/bin/python3.12"
]
}
}

0 comments on commit dea06f3

Please sign in to comment.