Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can portable app using a random folder to decompress the application #4105

Closed
xalc opened this issue Jul 29, 2019 · 3 comments
Closed

Can portable app using a random folder to decompress the application #4105

xalc opened this issue Jul 29, 2019 · 3 comments
Labels

Comments

@xalc
Copy link

@xalc xalc commented Jul 29, 2019

  • 21.1.5
  • Windows

Using build script below to build a windows portable app with some extraResources

"build": {
    "productName": "App",
    "extraResources": [
      "./resourFolder/**/*"
    ],
    "files": [
      "!resources/*"
    ],
    "portable": {
      "requestExecutionLevel": "admin"
    },
    "win": {
      "target": "portable",
      "icon": "./src/resources/images/icon.ico",
      "artifactName": "App.exe",
      "publisherName": "App.exe"
    }
  },

It will success build the App.exe.
But if the App.exe is large , the decompress will take long time. At this time, if user trying to double click for relaunch the App, it will throw file not find errors.
image

After some investigation, we found it caused by unpackDirName value in exectron-builder source code .

defines.UNPACK_DIR_NAME = portableOptions.unpackDirName || (await executeAppBuilder(["ksuid"]))

in NisiTarget.ts

It used a fixed location to decompress the application.
User trying to double click several times for relaunch the app, this time some folder may be removed during the decompress process. so the app will throw file not found error.

Can we use a random folder to decompress the application so that the file will not dropped in that case?

@stale
Copy link

@stale stale bot commented Sep 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Loading

@stale stale bot added the backlog label Sep 27, 2019
@xalc
Copy link
Author

@xalc xalc commented Oct 1, 2019

But do someone have a work round to fix this?

Loading

@stale stale bot removed the backlog label Oct 1, 2019
@stale
Copy link

@stale stale bot commented Nov 30, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Loading

@stale stale bot added the backlog label Nov 30, 2019
@stale stale bot closed this Dec 7, 2019
mmaietta added a commit to mmaietta/electron-builder that referenced this issue Apr 15, 2021
mmaietta added a commit that referenced this issue Jul 29, 2021
…unch (#6093)

* Allowing boolean flag to `unpackDirName` to utilize `$PLUGINSDIR` (unique to per-app-launch) when set explicitly to `true`. Implements #5764, #5382, #4105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant