Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
florianesser-tng committed Nov 26, 2024
1 parent b269e43 commit d51d742
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion WebUI/build/scripts/install-full-python-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function prepareTargetDir(targetDir) {


function main() {
const targetDir = path.join(envDir, '..', '..', 'offline', ${platform}, 'env');
const targetDir = path.join(envDir, '..', '..', 'offline', platform, 'env');
prepareTargetDir(targetDir)
copyToTargetDir(envDir, targetDir)

Expand Down
11 changes: 10 additions & 1 deletion WebUI/build/scripts/provide-electron-build-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function symlinkBackendDir(backendDir, serviceLink) {
function zipPythonEnv(sevenZipExe, pythonEnvDir, targetPath) {
console.log(`zipping ${pythonEnvDir} to ${targetPath}`);

const zip = childProcess.spawnSync(sevenZipExe, ['a', targetPath, , "env"]);
const zip = childProcess.spawnSync(sevenZipExe, ['a', targetPath, pythonEnvDir]);
console.log(zip.stdout.toString());
console.error(zip.stderr.toString());
if (zip.status !== 0) {
Expand All @@ -56,9 +56,18 @@ function copyResources(targetDir, ...files) {
}
}

function clearPreviousZip(zipFilePath) {
if
(fs.existsSync(zipFilePath)) {
console.log('Removing previous zip file:', zipFilePath)<
fs.rmSync(zipFilePath, { recursive: true });
}
}

function main() {
const sevenZipExe = path.join(buildResourcesDir, '7zr.exe');

clearPreviousZip(path.join(targetDir, `env.7z`));
zipPythonEnv(sevenZipExe, pythenEnvDir, path.join(targetDir, `env.7z`));

symlinkBackendDir(backendDir, path.join(targetDir, 'service'))
Expand Down
2 changes: 1 addition & 1 deletion WebUI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"fetch-build-resources": "cross-env node ./build/scripts/fetch-python-package-resources.js --target_dir=../build_resources",

"prepare-python-env": "cross-env node ./build/scripts/prepare-python-env.js --build_resources_dir=../build_resources --target_dir=../build-envs/slim/env",
"prepare-python-env": "cross-env node ./build/scripts/prepare-python-env.js --build_resources_dir=../build_resources --target_dir=../build-envs/online/env",
"install-full-python-env": "cross-env node ./build/scripts/install-full-python-env.js --env_dir=../build-envs/online/env",
"provide-electron-build-resources": "cross-env node build/scripts/provide-electron-build-resources.js --build_resources_dir=../build_resources --backend_dir=../service --target_dir=./external",

Expand Down

0 comments on commit d51d742

Please sign in to comment.