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

ensure standalone binary can work without embedded cache #1361

Closed
williballenthin opened this issue Mar 10, 2023 · 4 comments · Fixed by #2097
Closed

ensure standalone binary can work without embedded cache #1361

williballenthin opened this issue Mar 10, 2023 · 4 comments · Fixed by #2097
Labels
gsoc Work related to Google Summer of Code project. usability Related to using capa and displaying results (CLI/GUI)

Comments

@williballenthin
Copy link
Collaborator

          The problem is that I am running the PyInstaller locally to test if the new binja backend works. If I run the PyInstaller command without generating the rule cache first. The generated executable will complain the rule cache is missing when I run it. Note, I added the above code snippet in the section `3. Compile binary using PyInstaller`

Originally posted by @xusheng6 in #1343 (comment)

@mr-tz mr-tz added gsoc Work related to Google Summer of Code project. usability Related to using capa and displaying results (CLI/GUI) labels May 22, 2024
@fariss
Copy link
Collaborator

fariss commented May 28, 2024

@williballenthin @mr-tz do you think we can use exec_statement from PyInstaller.utils.hooks to cache the ruleset (using capa.rules.cache.cache_ruleset) before proceeding to build the executable? Would that be optimal?

@williballenthin
Copy link
Collaborator Author

.github/workflows/build.yml:55 already builds the cache and embeds it into the standalone binary.

@williballenthin
Copy link
Collaborator Author

ah i see so move that configuration into the PyInstaller to ensure the step can't be missed. neat!

yeah i think this is reasonable to try

@mr-tz
Copy link
Collaborator

mr-tz commented May 28, 2024

nice, note the note:

As of v5.0, usage of this function is discouraged in favour of the new PyInstaller.isolated module.

@fariss fariss moved this to Backlog in @s-ff GSoC 2024 May 29, 2024
@fariss fariss moved this from Backlog to Ready in @s-ff GSoC 2024 May 30, 2024
@fariss fariss moved this from Ready to In review in @s-ff GSoC 2024 Jun 2, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in @s-ff GSoC 2024 Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gsoc Work related to Google Summer of Code project. usability Related to using capa and displaying results (CLI/GUI)
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants