CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Windows + Buildkit: Slightly less broken than before
Pages: [1]

Author Topic: Windows + Buildkit: Slightly less broken than before  (Read 391 times)

totten

  • Administrator
  • Ask me questions
  • *****
  • Posts: 695
  • Karma: 64
Windows + Buildkit: Slightly less broken than before
May 19, 2015, 12:58:24 am
I spent a few hours setting up buildkit on Windows and made a bit of headway (PR: https://github.com/civicrm/civicrm-buildkit/pull/148). This doesn't mean buildkit works or is supported on Windows. It's just less broken. In particular, I got civibuild to work with the drupal-demo/d45/d46 configurations and did a small amount of real work using it (CRM-16499). General status is still patch-welcome.

Anyway, I wanted to leave notes for future-self (or anyone with a passion for Windows and time to waste):

  • Environment: Windows 7 Professional 64-bit, XAMPP, Git Bash
  • Git-Bash was more usable than I expected. It's not as comprehensive as Cygwin, but the package is thinner+simpler, so I tried to make-do with that. (Although eventually I needed Cygwin to install the World's Best Text Editor.)
  • The standard Windows console app (used by default in Git-Bash and cmd.exe) sucks. The PowerShell console app sucks less. In the PowerShell console app, you can start Git-Bash by running '"\Program Files (x86)\Git\bin\bash.exe" --login'.) (The Cygwin console app seems OK.)
  • In /Users/myuser/.bashrc, add 'export PATH="/c/Users/myser/buildkit/bin:/C/xampp/php:/C/xampp/mysql/bin:$PATH"'
  • When configuring "amp" to work with XAMPP:
    • MySQL worked as normal.
    • Permissions model is "none". (XAMPP runs as current user.)
    • For the Apache configuration, XAMPP breaks up httpd.conf into a few files which can be edited in the GUI. I put the "Include" directive at the bottom of "httpd-xampp.conf".
    • For the Apache configuration, the suggested "Include" directive has a mix of backslashes and forward-slashes. Not sure if it matters, but I used all backslashes.
    • Initially, there was a problem when ~/.amp/apache.d didn't have any *.conf files. This got fixed when running "amp test" (or can be fixed by putting in a dummy *.conf file.)
  • When porting apps from POSIX to Windows, one must deal with the general mismatch between POSIX file-paths and Windows file-paths. Each vendor tries to smooth this over by defining a mapping; unfortunately, each vendor does it a bit differently. (Ex: The Windows path "c:\foo" maps to "/c/foo", "c:/foo", and "/cygdrive/c/foo" in Git-Bash, PHP, and Cygwin, respectively.) This constrains one's ability to mix/match tools (eg a path generated in Cygwin bash won't be valid in XAMPP PHP). I had some success in mixing XAMPP with Git-Bash (if I stuck to traditional Windows file names like "c:\foo"), and I imagine things also work OK in a pure-Cygwin environment (ie Cygwin-bash + Cygwin-PHP + Cygwin-Apache).

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Windows + Buildkit: Slightly less broken than before

This forum was archived on 2017-11-26.