Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for project generation via GYP (and for GYP). #40

Closed
wants to merge 6 commits into from

Conversation

mingwandroid
Copy link

Hi Aras,

I hope this meets with your approval. I tested it on Visual Studio 2008, 2010, 2012 and Xcode 5. I will do a follow-up commit with the new projects in a few minutes.

Fixed up lots of Windows-specific issues in the GYP
files. This required a modification to GYP:
gyp-patches/0001-Add-config_conditions-as-PHASE_..patch
which adds 'config_conditions' to allow modification of
build settings in configuration blocks so that debugging
flags and the target platform are set there (so Debug32
is a debuggable 32bit configuration).

Added generateMyProjects.sh script which creates project
files for vs2008, vs2010, vs2012 and xcode; again, this
required a modification to GYP:
gyp-patches/0002-Add-generator-output-flat-option.patch
which adds an option (--generator-output-flat) that forces
all project and solution files to be made in the directory
specified by --generator-output=

Renamed binding.gyp to glsl_optimizer.gyp as rewrote it
to add building the test program and removed empty file
tests/tests.gyp

These GYP patches have been submitted upstream:

[0001] https://codereview.chromium.org/94853002
[0002] https://codereview.chromium.org/94883002

Fixed up lots of Windows-specific issues in the GYP
files. This required a modification to GYP:
gyp-patches/0001-Add-config_conditions-as-PHASE_..patch
which adds 'config_conditions' to allow modification of
build settings in configuration blocks so that debugging
flags and the target platform are set there (so Debug32
is a debuggable 32bit configuration).

Added generateMyProjects.sh script which creates project
files for vs2008, vs2010, vs2012 and xcode; again, this
required a modification to GYP:
gyp-patches/0002-Add-generator-output-flat-option.patch
which adds an option (--generator-output-flat) that forces
all project and solution files to be made in the directory
specified by --generator-output=<DIR>

Renamed binding.gyp to glsl_optimizer.gyp as rewrote it
to add building the test program and removed empty file
tests/tests.gyp

These GYP patches have been submitted upstream:

[0001] https://codereview.chromium.org/94853002
[0002] https://codereview.chromium.org/94883002
@mingwandroid
Copy link
Author

I added project files for vs2008 and vs2012 too; hopefully these changes will make project file maintenance less of a pain.

Link to non-DLL versions of the CRT.

Generate .pdb files beside the .lib files.

Fix a malloc/free redefinition warning on Windows.

Rename the main lib from glsl_optimizer_lib.lib to glsl_optimizer.lib

Added buildMyProjects.bat to build the Windows projects.

Changed generateMyProjects.sh to be able to dl, patch and install GYP
for you (it asks first ..)
.. replace long with intptr_t as long is 32bit on Windows 64
2 checks for _MSC_VER were replaced by
checks for _WIN32 in the test program.
@mingwandroid
Copy link
Author

I went ahead and Qbs-ified this one too. Would you like project files for other Visual Studio versions committed?

@aras-p
Copy link
Owner

aras-p commented Dec 11, 2013

Hmm, not sure about this in general. I'm not using GYP myself and not testing it. Someone contributed GYP project as part of "bindings of glsl optimizer for node.js" (yeah go figure :)) pull request. If your changes now also require some "modified GYP", wouldn't that break their workflow?

@mingwandroid
Copy link
Author

If your changes now also require some "modified GYP", wouldn't that break their workflow?

A little, but I tried to be sympathetic toward this. If you check generateMyProjects.sh then it tests for a GYP that's got my new features and if it finds some other GYP it will build and install mine for you (it asks actually). My features should do nothing to break any other GYP projects - one feature must be put in the .gyp input file(s) and the other specified on the commandline. Also, I have been and will continue to try to upstream my GYP changes to the Chromium Project.

I'd encourage trying out GYP as it makes it very easy to roll out new Visual Studio and Xcode projects when you merge from upstream, as I did in "Update project files with GYP". I tested it on Linux, Mac and Windows (MSYS2). The other benefit of GYP is that users with e.g. Visual Studio 2008 (or Linux) are not left out in the cold. I can commit Visual Studio 2008 projects I generated with it if you like?

My changes to GYP are not essential, but without one of them you'd need separate Win32 and x64 vcsln/vcxproj files and without the other, the "projects" folder ends up with a subfolder hierarchy; the changes facilitate minimal changes to the existing, nice "projects" folder.

@aras-p
Copy link
Owner

aras-p commented Jan 11, 2017

Seems to be a really old PR, and I forgot why I have not merged it in (was not sure if GYP should be added or not, I guess). Gonna close it now, @mingwandroid please repoen if still relevant.

@aras-p aras-p closed this Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants