GithubHelp home page GithubHelp logo

Makefile on windows about flex HOT 13 CLOSED

symfony avatar symfony commented on August 18, 2024 4
Makefile on windows

from flex.

Comments (13)

fabpot avatar fabpot commented on August 18, 2024 6

Closing as Makefiles are gone. symfony/console is now a requirement in the base skeleton.

from flex.

Pierstoval avatar Pierstoval commented on August 18, 2024 4

Make does exist for Windows, the problem does not come from make but from the commands that are run inside: test, rm, and even bin/console.

For this, you need to use Cygwin or integrate linux tools in your PATH when installing Git for Windows for example (just a checkbox during Git installation, with a warning).
Even still, shebang lines won't work, and I would recommend replacing bin/console with php bin/console in the makefile 🙂

Edit: And in any case, starting from Windows 10 you can use WSL and natively have make installed in your linux subsystem :)

from flex.

fabpot avatar fabpot commented on August 18, 2024 3

Using Composer has many disadvantages (like timeouts, non-support for ANSI escape codes, ...).

from flex.

wladimiravila avatar wladimiravila commented on August 18, 2024 2

Hello to install flex over Windows without problems, you must to install first these packages

http://gnuwin32.sourceforge.net/packages/coreutils.htm
http://gnuwin32.sourceforge.net/packages/make.htm

after SET in your windows enviromental vars something like "C:\Program Files (x86)\GnuWin32\bin" where this is your path of GnuWin bin directory installation

from flex.

Pierstoval avatar Pierstoval commented on August 18, 2024 1

PHP_EOL on Windows is "\n\r", but makefiles are Posix based "\n", will this not cause any problems?

It's "\r\n", not "\n\r" , but still, maybe Flex could detect the OS and change the line feed for the makefile?

from flex.

chapterjason avatar chapterjason commented on August 18, 2024 1

I ported the Makefile to windows as make.bat to work with flex. Gist the only issue is that there is somewhere a extension check and the confirm does not work as expected. But finally it's working to execute the commands.

D:\xxx>make.bat serve

 [ERROR] This command needs the pcntl extension to run.
         You can either install it or use the "server:run" command instead.

 Do you want to execute server:run immediately? [yN]  []:
 > N

 [OK] Server listening on http://127.0.0.1:8000
 // Quit the server with CONTROL-C.

from flex.

Pierstoval avatar Pierstoval commented on August 18, 2024 1

@chapterjason That's nice to see you have worked to "port" this makefile. But actually, the best fallback is either to use WSL, or native Symfony console with Windows terminal..

from flex.

sstok avatar sstok commented on August 18, 2024

PHP_EOL on Windows is "\n\r", but makefiles are Posix based "\n", will this not cause any problems?

from flex.

cjunge-work avatar cjunge-work commented on August 18, 2024

Could Composer custom commands be used instead? ref: https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands
Could have Flex simply write them to the composer.json file (although would get warning about lock being outdated I think?).
There is a request for Composer to support inheritance which might be useful for this: composer/composer#4210

from flex.

stof avatar stof commented on August 18, 2024

@Pierstoval when creating the Makefile, it does. The issue then is that the Makefile is committed in your repo, and so will be shared between everyone. This makes it harder to handle line endings.
The nice way would be for Make itself to support Unix line endings in their Windows version. But I don't know whether it is the case.

from flex.

Pierstoval avatar Pierstoval commented on August 18, 2024

I'm not sure, maybe we should take a look at the gnu make project 😕

from flex.

dunglas avatar dunglas commented on August 18, 2024

Or just use https://github.com/dunglas/symfony-docker

It should work just fine on Windows.

from flex.

Pierstoval avatar Pierstoval commented on August 18, 2024

With this version of GNU make, I end up with this kind of error:

e:\dev\www\flex_tests\skeleton $ make
process_begin: CreateProcess(NULL, which bin/console, ...) failed.
make: *** [sf_console] Erreur -1073740791

from flex.

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.