-
Notifications
You must be signed in to change notification settings - Fork 158
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
Windows msvc #181
Windows msvc #181
Conversation
Executing via cmd causes issues with long command lines and adds security issues. Setting environment vars only set last CompilerDef when multiple might be present, go through CompilerDef list and set all Setting newEnvironment now flows through from Compile/Linker Def to implementation.
Without the step of configuring cmd with new path/env the tools need initial information for their full path, adding toolpath setting. With clearing of the environment (setting Path env) need to also add SystemRoot and TMP environment vars (perhaps clear environment should be optional to turn off, and default clears when setting any var) Adjust Path configuration to better match the various native/cross settings as per vcvars.bat and including minimal basic reference to windows system Add atlmfc to paths (perhaps should be optional)
Linker manifest generation now optional. Manifest may be provided as source. MT manifest embedding now optional. In some cases it is preferred to provide the manifest Side by Side. For some modules like resource only don't need manifest at all.
Windows 8+ sdk includes use of the symbol Windows such as in shldisp.h Also _WIN32 and _WIN64 are defined by cl compiler and don't need to be defined again. Some earlier versions cl (<=6) defined Windows _WINDOWS which perhaps should be applied based on the linker version Uncertain on appropriate to remove from gcc/gpp sections
Run Precompile steps and wait for completion before moving on to others. Identify Message and IDL compile as 'precompile' steps.
This returns some behaviour that was present before re-factoring for eclipse support. In some cases the dependent nar libraries won't have a suitable default inclusion lib and windows #pragma message(lib,) is used to be more specific. boost and wxWidgets are 2 examples
Use configured linkage if provided. Rather than fixed default of Shared linkage, if a single library can be selected use library type.
NAR may not be the only dependency type, should not expect all dependencies to be of archive type accessible as jar, and should not go rummaging through other types looking for NAR data even if it is a jar and can be opened.
When not working with NAR packaging, assume all available Library types should be download/unpacked.
Cool, thanks for all the work. I have some concerns about breaking API changes. But in the interest of time, if you are confident these are all good changes, then I'm fine going to |
@pauldaustin Since a lot of this concerns your recent work, would you mind contributing to this PR with a code review? Personally I don't really feel comfortable judging the technical details. |
I get where your coming from for semantic versioning and API, though I'm not feeling we have an API as such beyond the configuration. I'm not against this becoming 4.0.0. |
Going to As for reviewing the functional meat of these changes: is there anyone besides @pauldaustin that we should invite to have a look? |
Perhaps @dugilos could help review on changes for artifact selection/filtering. In the groups Thomas Haitzer recently asked about msvc and Henrik Horneber was asking about resource compilation. |
Might be worth posting to the group about this PR then, to invite other potential reviewers. |
NAR plugin for Maven » nar-maven-plugin #349 SUCCESS |
remove dead code.
Look at the diffs for the following files. src/main/java/com/github/maven_nar/cpptasks/compiler/CommandLineCompiler.java if (NarUtil.isWindows()) {
Make sure the changes work with different windows SDK and MSVC versions. different windows SDK have different paths and include directories
|
Thanks @pauldaustin Including cmd needs to be unnecessary as there are too many issues with starting to use it, I would say it's far from ideal to introduce it. The PATH is now resolved correctly, and settings from the user are not accidentally injected causing or hiding problems. Without the addition of the SystemRoot and TMP msvc would fail even with a good path. Here is where using cmd was giving an injection already. |
Hi! On a side note: if I saw this correctly, this code is not ready for Windows 10 yet. Thomas |
I assume by the following you mean that you set the tool path so that the command line has the full path to the command executed.
As long as the following still works I'm fine with the change
|
Prefer mt.exe from latest windows sdk if not available in sdk (pre7) and using visual studio 2005 use it otherwise leave it to be found on the path
8.0 was being disallowed due to \d\d.\d pattern later substring failed due to 2 digit expectation. refactored removing substring to using regex match groups Additional debug reporting of identified system environment
Previously I missed an issue with mt.exe not using toolpath when changed my build to a visual studio cmd prompt. There are some differences between Windows SDK 6.0A/7.0A/7.1A (installed with visual studio) and 6.0/7.0/7.1 (stand alone windows platform sdk) but I'm not sure if it's acceptable to configure say 7.1A and 'automatically upgrade' to 7.1 - probably not good to 'downgrade' from 7.1 to 7.1A. To me they are generally interchangeable so it feels like it should be more flexible instead of pedantic. |
@thohai I'm not aware of any issue this may face with running on Windows 10, perhaps you could elaborate? |
NAR plugin for Maven » nar-maven-plugin #353 SUCCESS |
On OS X, through JDK 6 JNI libraries used .jnilib, but have since switched to .dylib. Change the generated NarSystem.loadLibrary that works with native-lib-loader to work with either extension.
Check for .jnilib and .dylib on OS X
A fix to "NAR: Compile failed: Output filename conflict"
@GregDomjan @pauldaustin @dugilos So the consensus so far is that all of these changes are good as-is? If so: @GregDomjan: if you have time to fix the merge conflicts, we can go ahead and merge whenever you're ready. |
Do not check non-jar or non-nar artefacts for NarInfo
Hello, the IT test 28 that I made to test the changes I made is still OK, so for me there is no reserve. |
@GregDomjan The merge conflicts were super easy to resolve, so I just went ahead and did it. 😄 |
Continuing the shotgun approach of merging all the PRs, and then fixing any later brokenness if/when it arises. Especially since this one has a lot of nice cleanup. Thanks @GregDomjan! |
NAR plugin for Maven » nar-maven-plugin #358 SUCCESS |
Thanks, was just getting around to doing the same. |
Some cleanup to recent addition of msvc config
Changes to support Windows specific compilations such as resource only dll with no manifest
Remove from aol config properties that where defined by compiler
Fix multi thread/core bug
Enhance to work in project with multiple dependency types.
Refactor artifact filtering and add option to config further filtering