1042 Commits

Author SHA1 Message Date
Grant Paul
11992c4e79 Add support for memory mapping BOM files on Windows. 2017-06-19 11:52:20 -07:00
Grant Paul
a490dadd89 Update README to indicate Windows support. 2017-06-19 11:52:20 -07:00
Grant Paul
bb0c1b73d0 Add CI for Windows using AppVeyor and Travis. 2017-06-19 11:52:20 -07:00
Grant Paul
d84b57594d Disable color build output on Windows.
Windows generally does not support ANSI escape codes, currently used
for color and bold output. For now, just disable support.
2017-06-19 11:52:20 -07:00
Grant Paul
000da4f0af Add Windows support to default filesystem. 2017-06-19 11:52:20 -07:00
Grant Paul
1633cfdc78 Add Windows support for process information. 2017-06-19 11:52:20 -07:00
Grant Paul
0e1d1ed246 Add Windows support for user and group info; separate from process.
Separate from the process as it is only vaguely related and adding
unused user information to in-memory process contexts was extra code.

Windows support uses the SID as the user ID, as it matches the idea
of an identifer uniquely identifying a user or a group.
2017-06-19 11:52:20 -07:00
Grant Paul
a1f792a720 Add Windows support for launching new processes.
Windows is simpler than Unix in that it doesn't require fork just
just to set a working directory; it's more complex in that arguments
must be manually quoted rather than passed as an array.
2017-06-19 11:52:20 -07:00
Grant Paul
cc30391cde Add Windows support for XML property lists using the native XmlLite. 2017-06-19 11:52:20 -07:00
Grant Paul
50b1213eca Add Windows support for loading PNG files using GDI+. 2017-06-19 11:52:20 -07:00
Stephane Sezer
4836a9755b De-duplicate the packed struct definition 2017-06-19 11:52:20 -07:00
Grant Paul
daa326ae9f Add MSVC support for zero-length arrays and packed structs. 2017-06-19 11:52:20 -07:00
Stephane Sezer
8a433f1394 Do not use ::strcasecamp directly
Instead, we can use the wrapper in libutil so we stay
Windows-compatible.
2017-06-19 11:52:20 -07:00
Stephane Sezer
8d6d6ad606 Add a helper function to deal with strcasecmp on Windows
This function doesn't exist on Windows, but _stricmp does.
2017-06-19 11:52:20 -07:00
Grant Paul
715dcf1a01 Add MSVC support to code missing required C++ library includes. 2017-06-19 11:52:20 -07:00
Stephane Sezer
559eddfc8a Minor changes for some string.h includes 2017-06-19 11:52:20 -07:00
Grant Paul
c6f721ed4f Add Windows support to code using platform-specific headers. 2017-06-19 11:52:20 -07:00
Grant Paul
30c97af5c9 Add MSVC support to code using C99 struct initializers in C++. 2017-06-19 11:52:20 -07:00
Grant Paul
696ec87f98 Add MSVC support for two-operand ternary conditionals. 2017-06-19 11:52:20 -07:00
Grant Paul
1f6710d50a Add Windows support for byte order manipulation. 2017-06-19 11:52:20 -07:00
Grant Paul
7e2f8ab5dd Update gtest to a version with Windows support. 2017-06-19 11:52:20 -07:00
Grant Paul
7a001832a9 Add Windows, MSVC, and MinGW support to build configuration.
- Set to use static or dynamic libraries at top level.
 - Compiler configuration for MSVC and MinGW.
 - Copy rather than create symlink for aliases on Windows.
2017-06-19 11:52:20 -07:00
Onha Choe
183c087a64 Make build order respect phase ordering on build target. 2017-04-17 22:46:07 -07:00
Onha Choe
4af6ebb627 Make PlistBuddy differentiate save and print format
Check input to determine the save format, and if not found,
make XML the default save format.

Print format logic stays the same.
2017-04-14 13:28:39 -07:00
Onha Choe
37fa106537 Process child directories first in Filesystem->readDirectory call 2017-04-13 14:23:00 -07:00
Onha Choe
0ecebca6f4 Fix issues raised in PR #242 regarding swift compilation changes 2017-04-11 01:14:33 +09:00
Onha Choe
2da2db34f2 Add Swift Standard Library tool xcspec
Fix productType isWrapper check on SwiftResolver
2017-04-11 01:14:33 +09:00
Onha Choe
490148105c Refactor auxiliary file creation path for ninja
Current implementation encodes auxiliary files into base64 string,
and pass it through system's base64 decoding to recreate files on
ninja build process.
This has two main disadvantages,
1. When auxiliary files are large, invocation call will expand
very large and shell will reject executing them.
2. base64 may not be compatible. (e.g. xcbuild's base64 encoded
data is not properly decoded by linux's base64 utility)

Instead, after build.ninja file has been written, also write
auxiliary file chunks in temporary directory with its hash included
in its filename. Ninja caches hashes of its execution command to determine
changes to the rule, so the actual rebuild logic is unchanged.
2017-04-11 01:14:33 +09:00
Onha Choe
57f0c7a893 Refactor builtin tool resolving in NinjaExecutor
Sometime, xcbuild will be symlinked to different location.
If the xcbuild is symlinked, try to resolve symlinks and
and find relevent builtin tools in symlink source directory.
2017-04-11 01:14:33 +09:00
Onha Choe
0deb1f7bd0 Slight refactoring of PhaseInvocation resolving step 2017-04-11 01:14:33 +09:00
Onha Choe
b2853aad65 Compile swift before any other clang invocations
Swift modules and objc bridging headers needs to be present
before begining objc source compilation. Defer objc and other clang
compilation process until swift module compilation and other artifacts
copying is finished
2017-04-11 01:14:33 +09:00
Onha Choe
8d81977e77 [PlistBuddy] skip duplicate keys during merge. 2017-04-01 02:44:33 +09:00
Onha Choe
0d63ceb478 Get stdout/stderr of launched task with pipe. 2017-03-29 12:06:28 +09:00
Stephane Sezer
2bc4616959 Fix return codes in dependency-info-tool
Instead of returning a mixture of 0, -1, and booleans, use standard
definitions from stdlib.

This fixes issue#238.
2017-03-23 15:40:47 -07:00
Onha Choe
a7e954ab36 Do cycle check on recursive inheritSpecification call 2017-03-16 16:27:28 -07:00
Stephane Sezer
75c3135b0b Make sure we don't inherit from ourselves when finding specs 2017-03-16 16:27:28 -07:00
Stephane Sezer
831e78b85a Avoid a few copies with Manager::AnyDomain() in pbxspec 2017-03-16 16:27:28 -07:00
Stephane Sezer
0ef17b8fc5 Add comparison operators to PBX specifications 2017-03-16 16:27:28 -07:00
Stephane Sezer
fce55ae831 Access the root namespace explicitly
This makes it clear that we're using C functions from the
standard/system libraries.
2017-03-16 16:27:28 -07:00
Onha Choe
9754643ae0 Fix xcspec to make swift compilation work properly 2017-03-15 20:00:51 -07:00
Saleem Abdulrasool
8f174c1b6e ed lambda capture
`path` was being shadowed and not used.  Remove unused lambda capture.
NFC.
2017-02-10 10:56:47 -08:00
Onha Choe
8e759cf69d Fix xcode build file parsing
Currently, build file parsing would break when encounterd with something like

    // some comment //

fix this.
2017-02-04 11:14:41 -05:00
Onha Choe
8307d11682 Add Swift xcspec to CMakeLists.txt 2017-01-31 09:57:30 -08:00
Onha Choe
65364aa249 Fix bom variable offset.
Some of the vars->first were changed to vars + sizeof(struct bom_varaible) in #202
where it really had to be sizeof(struct bom_variables)
2017-01-31 02:00:15 -08:00
Onha Choe
411d8caa49 Add swfit compiler specification 2017-01-30 22:37:51 -08:00
Grant Paul
1ade097fb8 Use memcpy to transmute floating point values.
This is implementation-defined rather than undefined behavior.
2017-01-26 22:29:48 -08:00
Grant Paul
a102907642 Update Travis to a more recent macOS image. 0.1.1 2017-01-05 09:07:49 -08:00
Grant Paul
41cb9abd79 Various fixes and additions to PlistBuddy.
- Fix `Exit` command in PlistBuddy to actually exit.
 - Fix `Key:` syntax in PlistBuddy to append to arrays.
 - Fix `Set Key:0` syntax in PlistBuddy to overwrite, not insert.
 - Fix PlistBuddy to correctly initialize new property lists: only
   write to disk on `Save` and start out with a dictionary.
 - Fix crashes with out-of-bounds array indexes in PlistBuddy.
 - Add `Import`, `Copy`, and `Revert` commands to PlistBuddy.
2016-12-14 17:01:15 -08:00
Grant Paul
1f66407788 Don't continue the build if target environment creation fails.
If target environment creation fails, this indicates a serious error
in the build environment. Continuing is likely to end up printing
success despite the build not finishing as expected.
2016-12-14 17:01:15 -08:00
Grant Paul
f609fb944d Avoid returning a default SDK for a platform with no SDKs.
This would crash if a platform name matched, but it had no SDKs.
2016-12-14 17:01:15 -08:00