Skip to content

Commit

Permalink
#486 Allow export to save relative paths
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvollebregt committed Jun 1, 2024
1 parent b86fd14 commit 3f2acd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion auto_py_to_exe/web/js/configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const configurationSetters = {}; // dest: fn(value) => void, used to set option
const configurationCleaners = []; // Each function in this should clear a dest value

// Get option-value pairs [[option, value], ...]
const getCurrentConfiguration = async () => {
const getCurrentConfiguration = async (skipTransformations = false) => {
const currentConfiguration = [
{
optionDest: 'noconfirm',
Expand All @@ -26,6 +26,10 @@ const getCurrentConfiguration = async () => {
}
});

if (skipTransformations) {
return currentConfiguration;
}

// Convert all relative paths to absolute paths
for (const c of currentConfiguration) {
const option = options.find((o) => o.dest === c.optionDest);
Expand Down
2 changes: 1 addition & 1 deletion auto_py_to_exe/web/js/importExport.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const _collectDataToExport = async () => {

return {
version: 'auto-py-to-exe-configuration_v1',
pyinstallerOptions: await getCurrentConfiguration(),
pyinstallerOptions: await getCurrentConfiguration(true),
nonPyinstallerOptions: nonPyinstallerConfiguration,
};
};
Expand Down

0 comments on commit 3f2acd7

Please sign in to comment.