adamrehn / conan-ue4cli

Integrate third-party libraries into the Unreal Engine with Conan
https://docs.adamrehn.com/conan-ue4cli/
MIT License
87 stars 20 forks source link

generate fails when profiles are not at default location #6

Closed hobbeshunter closed 4 years ago

hobbeshunter commented 4 years ago

When I run generate I get following error:

Removing the "ue4" Conan profile if it already exists...
Removing any previous versions of profile base packages...
Creating "ue4" Conan profile using autodetected settings...
Installing profile base packages...
Traceback (most recent call last):
  File "/home/<user>/.local/bin/ue4", line 8, in <module>
    sys.exit(main())
  File "/home/<user>/.local/lib/python3.6/site-packages/ue4cli/cli.py", line 216, in main
    SUPPORTED_COMMANDS[command]['action'](manager, args)
  File "/home/<user>/.local/lib/python3.6/site-packages/conan_ue4cli/main.py", line 34, in main
    SUBCOMMANDS[subcommand]['function'](manager, args[1:])
  File "/home/<user>/.local/lib/python3.6/site-packages/conan_ue4cli/generate.py", line 165, in generate
    _install(join(packagesDir, 'ue4lib'), 'profile', profile)
  File "/home/<user>/.local/lib/python3.6/site-packages/conan_ue4cli/generate.py", line 78, in _install
    return _run(['conan', 'create', '.', 'adamrehn/' + channel, '--profile', profile] + args, cwd=packageDir)
  File "/home/<user>/.local/lib/python3.6/site-packages/conan_ue4cli/generate.py", line 33, in _run
    '\nstdout: "{}"\nstderr: "{}"'.format(stdout, stderr)
Exception: child process ['conan', 'create', '.', 'adamrehn/profile', '--profile', 'ue4'] failed with exit code 255
stdout: ""
stderr: "No node for profiles: ['ue4']
"

Running conan create . adamrehn/profile --profile=ue4 and conan create . adamrehn/profile --pr=ue4 seem to work. So I guess this is 'cause my profiles are not at user/.conan/profiles/

Btw, then it fails again complaining about not having a author attribute. But that is another issue.

Conanfile doesn't have 'author'. It is mandatory to add it as attribute
adamrehn commented 4 years ago

Apologies about that, I thought I was consistently resolving the paths to Conan profiles correctly (i.e. querying Conan's configuration rather than assuming the default location was correct), but in one place that assumption was indeed hardcoded. I've rectified that in commit 3ec19d9. Could you please try again with the current master branch and see if that fixes the issue for you?

hobbeshunter commented 4 years ago

Thanks a lot.

Sadly, this does not seem to fix it.

I uninstalled it with pip3 uninstall conan_ue4cli and reinstalled it with pip3 install --user git+https://github.com/adamrehn/conan-ue4cli. The error stays.

adamrehn commented 4 years ago

Hmmm, can you please provide more information about your environment so that I can attempt to reproduce the error? The following information would be helpful (as well as anything else you think might be relevant):

hobbeshunter commented 4 years ago

My conan version is 1.22.2 on osl42.

Maybe it's a conan problem as --profile=ue4, --pr=ue4 and --pr ue4 all work. Just --profile ue4 fails. Which is weird. So changing profile to pr would fix it :rofl:

adamrehn commented 4 years ago

I wasn't able to reproduce the error, but modifying the --profile ue4 flag to --profile=ue4 is simple enough, so I'll go with that.

hobbeshunter commented 4 years ago

I don't have an explanation for this. All I can say is: it works. So thank you very much for it.