GithubHelp home page GithubHelp logo

Comments (11)

2bndy5 avatar 2bndy5 commented on June 3, 2024 1

I'm not a fan of downloading and executing scripts that require admin privileges. I'd prefer users activate a venv for ensured security.

from clang-tools-pip.

shenxianpeng avatar shenxianpeng commented on June 3, 2024

It's my first time installing binary on Windows and it failed...

PS C:\Users\xshen> clang-tools --install 13
Don't have permission to install clang-format-13 to c:\program files\python38.             Try to run with the appropriate permissions.
PS C:\Users\xshen>

from clang-tools-pip.

shenxianpeng avatar shenxianpeng commented on June 3, 2024

From @2bndy5 in cpp-linter/cpp-linter-action#78

regarding clang-tools-pip

It might be a good idea to create the binaries using .exe suffix (see #11) and a link to the binary that doesn't use the version in the title.

(venv) PS path > clang-tools -i 12
(venv) PS path > ls venv/Scripts
clang-format-12.exe
clang-format.lnk
clang-tidy-12.exe
clang-tidy.lnk

Though, this might cause conflicts if the unspecified directory (-d) is always sys.executable and multiple versions are installed.

from clang-tools-pip.

shenxianpeng avatar shenxianpeng commented on June 3, 2024

that doesn't use the version in the title.

Do you mean to type clang-format or clang-tidy can execute the clang-format-12.exe or clang-tidy-12.exe?
If multiple versions are installed? which binary should be linked?

If unspecified deriectory(-d) it should be fine because the binary name is different.

PS C:\Users\xshen> clang-tools --install 13
Don't have permission to install clang-format-13 to c:\program files\python38.             Try to run with the appropriate permissions.
PS C:\Users\xshen> clang-tools --install 12
Don't have permission to install clang-format-12 to c:\program files\python38.             Try to run with the appropriate permissions.

from clang-tools-pip.

2bndy5 avatar 2bndy5 commented on June 3, 2024

Do you mean to type clang-format or clang-tidy can execute the clang-format-12.exe or clang-tidy-12.exe?

yes.

If multiple versions are installed? which binary should be linked?

I imagine the last version installed. Does this CLI accept multiple versions (like clang-tools -i 12 -i 13)?

from clang-tools-pip.

2bndy5 avatar 2bndy5 commented on June 3, 2024
Don't have permission to install clang-format-13 to c:\program files\python38.             Try to run with the appropriate permissions.

I didn't get this problem because I run all my python stuff in a venv. This might be a good idea (about using a venv) to add to the readme.

from clang-tools-pip.

shenxianpeng avatar shenxianpeng commented on June 3, 2024

Does this CLI accept multiple versions (like clang-tools -i 12 -i 13)?

No. to install multiple versions need to run clang-tool -i <version> multiple times. 😃

Tested with venv it works. If possible it should be better to fix the permission problem when the user doesn't use venv.

from clang-tools-pip.

shenxianpeng avatar shenxianpeng commented on June 3, 2024

I totally agree. maybe I can install the binary to the user folder like C:\Users\xshen\.clang-tools etc when users do not use venv on Windows.

from clang-tools-pip.

2bndy5 avatar 2bndy5 commented on June 3, 2024

I like that as a default value. The user can specify anything they want if that isn't suitable.

from clang-tools-pip.

2bndy5 avatar 2bndy5 commented on June 3, 2024

So, I've pushed my changes to the pro-revision branch.

I also added the creation of a symlink if the tool was not previously installed. Users can use the new -f switch to force the symlink to overwrite a pre-existing symlink.

I tried using a different default install path on Windows, but it wasn't automatically in the CI's PATH env var:

# if install_os == "windows":
# # C:\Users\{username}\AppData\Local\clang-tools
# return os.path.join(os.getenv("LOCALAPPDATA"), "clang-tools")

Its commented out for now, until we find a more permissive path that is in the PATH env var.

from clang-tools-pip.

2bndy5 avatar 2bndy5 commented on June 3, 2024

Closing this as this was essentially solved by #13

from clang-tools-pip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.