Giter Site home page Giter Site logo

Comments (3)

kou1okada avatar kou1okada commented on August 25, 2024

Hmm, this problem, multiple installation of cygwin, is a little complexity.
I received this issue and read following source code of setup.exe:
https://sourceware.org/git/gitweb.cgi?p=cygwin-setup.git

It seems that setup.rc and root directory will be determined following steps:

  1. Try to read "file://" + cwd + "/" + "setup.rc" at UserSettings.cc line 70-75.
  2. If step 1 failed, then try to read "cygfile:///etc/setup/" + "setup.rc" at UserSettings.cc line 76-81. In this case, "cygfile:///" will be determined by cygpath(), but at this stage set_root_dir() has been never called. So read_mounts(std::string()) determines rootdir with HKEY_LOCAL_MACHINE\SOFTWARE\cygwin\setup\rootdir or HKEY_CURRENT_USER\Software\cygwin\setup\rootdir at mount.cc line 330-360. Note that HKEY_LOCAL_MACHINE takes priority.
  3. When Cygwin setup - Choose Installation Directory dialog displayed, it will determine initial value for root directory with --root option or HKEY_LOCAL_MACHINE\SOFTWARE\cygwin\setup\rootdir or HKEY_CURRENT_USER\Software\cygwin\setup\rootdir at root.cc line 260-260. But this will be not used for reading setup.rc.

As you can see in the above steps, setup.rc seems to be read only once at step 1 or 2 before root directory is determined at step 3.
This should make some troubles in the case as multiple installation of cygwin.

Even more unfortunately the current version of setup.exe has no command line options for giving the location of setup.rc.

Perhaps, the means for giving setup.rc to setup.exe, which we can take, is following, maybe:

  • Prepare ./setup.rc in the same directory as setup.exe.
  • Rewrite HKEY_LOCAL_MACHINE\SOFTWARE\cygwin\setup\rootdir or HKEY_CURRENT_USER\Software\cygwin\setup\rootdir.

from apt-cyg.

kou1okada avatar kou1okada commented on August 25, 2024

Please check above commit c3b4d00 on issue-47 branch.

from apt-cyg.

kou1okada avatar kou1okada commented on August 25, 2024

I updated issue-47 branch with 305947b.
Can you try it?

from apt-cyg.

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.