open-obfuscator / o-mvll

:electron: O-MVLL is a LLVM-based obfuscator for native code (Android & iOS)
https://obfuscator.re/omvll
Apache License 2.0
631 stars 68 forks source link

Find python resources #13

Closed weliveindetail closed 1 year ago

weliveindetail commented 1 year ago

This patch proposes to extend the search for omvll.yml to folders relative to the plugin location on disk. This is an important step towards packaging the plugin with a predefined set of Python resources.

The status quo is to look for omvll.yml in all parent folders of the current working directory: https://obfuscator.re/omvll/introduction/getting-started/#yaml-configuration-file The first commit in this PR adds a test for this.

The second commit refactors the existing code. the existing test still succeeds.

Eventually, the last commit adds the desired functionality and also allows to expand relative paths based on the omvll.ymls path. We now also log a warning if the path/file doesn't exist.

weliveindetail commented 1 year ago

Rebased + tested in isolation. Works on Linux: https://github.com/build38/o-mvll/actions/runs/5153567695

PASS: O-MVLL Tests :: core/plugin/find-omvll-config-plugindir.c (1 of 6)
PASS: O-MVLL Tests :: core/plugin/find-omvll-config-cwd.c (2 of 6)