975 Commits

Author SHA1 Message Date
Grant Paul
014d8fe6e8 Add version information to generated dependency info.
Additionally, factor out source of version information to share it
between both the compile and version actions in the actool driver.
2016-08-11 14:05:06 -07:00
Grant Paul
a3bf8e26c0 Revert "Don't allow installing without a prefix, as this can break systems."
This reverts commit 920c1b445d1fe67453f786a08f463c49995b7f1e.
2016-08-08 20:22:52 -07:00
Grant Paul
920c1b445d Don't allow installing without a prefix, as this can break systems.
Various xcbuild tools can conflict with system libraries and executables.
2016-08-08 17:21:40 -07:00
Grant Paul
5244ba6751 Fix GCC 4.9 compilation. Fixes #104. 2016-07-31 11:51:39 -07:00
Marc Salem
d2e1bf3d0c Fix compile errors 2016-07-28 14:35:08 -07:00
Marc Salem
2bd45ab84d Fix compile errors 2016-07-28 14:11:10 -07:00
Grant Paul
ea1b3336c2 Compile launch image assets. (#101)
* Parse minimum system version for launch image assets.

A system version has at least two components separated by dots, with
an optional third component separated by an additional dot.

* Compile launch image assets.

Launch images are copied to the output, and metadata is added to the
partial info plist to describe the launch images.
2016-07-27 18:11:12 -07:00
Grant Paul
b8919d4248 Fix reading and writing empty files in the default filesystem.
Reading or writing zero bytes is not considered successful; bypass
reading and writing completely when there is nothing to read or write.
2016-07-27 17:45:42 -07:00
Grant Paul
f79d60b01a Move compile output into compile namespace. 2016-07-27 17:42:42 -07:00
Grant Paul
e9fe14bcb9 Move asset conversion utilities into a shared class.
This allows compilers for different asset types to share implementations
of converting asset information into compiled representations.
2016-07-27 17:42:42 -07:00
Marc Salem
065ffb7e2c Link libpng statically. (#100) 2016-07-27 17:39:24 -07:00
Grant Paul
42c53c39ce Use optionals in parsing command line arguments. (#95)
Instead of checking if strings are empty, use optionals to store if
the arguments were passed at all. Additionally, add a few utility
methods to the option parser to simplify various tool option classes.
2016-07-27 17:38:07 -07:00
Grant Paul
01a4aa8e33 Generalize PNG writing implementation.
Replaces one-off instance for archive dumping. Includes unit tests.
2016-07-27 16:18:30 -07:00
Grant Paul
1242d7e711 Support both ImageIO and libpng for reading PNG images.
- Separate out PNG loading into a separate module.
 - Refactor PNG loading to be less tied to asset compliation.
 - Add an implementation of PNG loading using ImageIO when available.
 - Add a unit test for loading various types of PNG images.
2016-07-27 16:18:26 -07:00
Grant Paul
8c15c7d9ca Add representation of an image. 2016-07-27 16:18:22 -07:00
Grant Paul
b4a4c49e03 Add representation of and conversion between pixel formats.
Supports RGB and grayscale pixel formats and a variety of alpha channel
formats. Includes unit tests verifying the conversions are as expected.
2016-07-27 16:18:17 -07:00
Grant Paul
47be7e9a12 Add library for pixel manipulation code. 2016-07-27 16:18:12 -07:00
Grant Paul
f0e3ace4a3 Use buffer-based file reading and writing to speed up filesystem access.
Using iterators, each stream is read or written a byte at a time, which
is inefficient. Instead, treat the buffers as buffers and read or write
in blocks.
2016-07-23 22:40:12 -07:00
Zhiming Wang
53cdc1a82d Fix outdated Ninja link in README.md 2016-07-23 20:34:00 -07:00
Grant Paul
08575f65f1 Fix extra separator added when project has no specific directory.
Normalizing a path doesn't remove trailing directory separators, so
all paths relative to the working directory gained an extra separator
when the working directory itself ended in a separator.
0.1.0
2016-07-21 21:29:26 -07:00
Grant Paul
f7dc2741e2 Support compiling app icon sets. (#94)
* Pass through info and dependency info options to asset compile output.

Fixes writing out additional info plist and dependency info.

* Add initial implementation of compiling app icons.

Supports copying the images and writing the icon metadata to info
plist additions. Current implementation has two limitations:

 - All idioms are copied for all target platforms. For example, watch
   images are copied for asset compilation targeting a phone.
 - The size of images is not verified against the specified dimensions.
2016-07-21 15:17:16 -07:00
Grant Paul
b9aae64b4e Add stub implementations for compiling each type of asset.
Move all compilation implementations into a new namespace, and stub
out the remaining asset types. For now, they just print warnings.
2016-07-14 23:53:21 -07:00
Grant Paul
6f7833d00f Additionally search PATH for tools in xcrun.
In addition to the SDK, toolchains, and developer root. Also, refactor
executable search paths to require explicitly searching `PATH` rather
than treating it as a default.
2016-07-14 15:06:25 -07:00
Grant Paul
f957fe8178 Minor cleanups to image set compilation.
- Refactor some logic out into separate functions.
 - Cleanup code style nits for consistency.
 - Use filesystem to read JPEG images as well as PNG.
 - Move image set compilation into namespace and class.
2016-07-14 14:46:35 -07:00
Grant Paul
e64c7ba896 Use provided definitions when linking libxml2. 2016-07-06 18:33:45 -07:00
Grant Paul
90065b47ed The SDK root should be SDKROOT, not SYSROOT. Fixes #82. 2016-07-06 16:42:49 -07:00
Marc Salem
d8b3d5e869 Add imageset support in Compile Action (#72)
Implements actool Compile action with:
  * imageset supported
  * PNG converted to zlib compressed PremultipliedBGRA8 or PremultipliedGA8
  * JPEG/raw support
  * size, scale, idiom supported
  * resizing partially supported
  * adds requirement for libpng

Capture group namespaces when loading children in xcassets::Asset::Group
Add tests for FSUtil IsFileExtension
2016-07-06 16:25:12 -07:00
Kellie Medlin
f79e07c83c Split libraries and specifications into separate install components. 2016-07-05 23:40:21 -07:00
Grant Paul
d690825c40 Add asset catalog driver compile action output.
Includes a basic unit test.
2016-07-03 14:27:32 -07:00
Marc Salem
de8dd1895a Add tests for FSUtil IsFileExtension 2016-07-02 14:42:31 -07:00
Grant Paul
a3d3794a96 Add specification for builtin tool to register with LaunchServices.
As with the implementation of this tool, it takes no command-line options.
2016-06-29 22:51:29 -07:00
Grant Paul
6e2451229c Add specification for C preprocessor tool.
This tool is used to preprocess Info.plist if the `INFOPLIST_PREPROCESS`
build setting is enabled.
2016-06-29 22:51:29 -07:00
Grant Paul
cdd36d7a8a Support preprocessing Info.plist before the Info.plist utility.
The `INFOPLIST_PREPROCESS` build setting requests preprocessing of
the Info.plist file before standard processing. Fixes #77.
2016-06-29 22:41:41 -07:00
Kellie Medlin
4cc6c60570 Treat TOOLCHAINS as a list of possible toolchains, not just one.
TOOLCHAINS should be a space-delimited string of toolchain names. xcrun
now correctly parses this string to build a final toolchains list.
2016-06-26 22:45:14 -07:00
Kellie Medlin
d03e246a51 Check local user path for xcsdk configuration. 2016-06-24 23:45:11 -07:00
Grant Paul
47f8ce0564 Mark compiled asset archive method as const. 2016-06-23 19:17:44 -07:00
Grant Paul
a6ed69e903 Remove unnecessary duplicate semicolons. 2016-06-23 19:16:50 -07:00
Grant Paul
9243b08df4 Fix typo in rendition output. 2016-06-23 19:12:35 -07:00
Grant Paul
08590be9a5 Minor cleanup for facet unit tests and header. 2016-06-22 21:42:36 -07:00
Grant Paul
13c7306360 Cleanup attribute list input and unit tests.
Fix pointer const issues in attribute header, and simplify unit test
by using a simpler structure to hold the testing key format.
2016-06-22 21:36:24 -07:00
Grant Paul
0e6f35f080 Cleanup for compiled asset catalog reading and writing.
- Avoid unnecessary explicit casts to optional types.
 - Only test rendition behavior in rendition tests. Attribute list
   (de-)serialization tests are only needed once, in their tests.
 - Simplify rendition tests to focus more on the tested feature.
 - Add additional documentation to comment headers.
 - Use `size_t` instead of other integer types when appropriate.
2016-06-22 21:26:38 -07:00
Marc Salem
a5e8b1ba50 Implement slices in Rendition Write 2016-06-22 20:51:20 -07:00
Marc Salem
f870923e28 Support JPEG/Raw format in Rendition 2016-06-22 20:40:13 -07:00
Ktwu
2b16d7d8e7 Fixes to build on Linux (#71)
Interestingly, I got several build errors when building on Linux.  Adding various
headers explicitly fixes the problem for me.
2016-06-22 11:44:56 -07:00
Grant Paul
58d5bc8f0b Remove more umbrella and base headers. 2016-06-22 06:00:49 -07:00
Grant Paul
af30c17dc2 Minor header cleanups.
Remove unnecessary base and umbrella headers.
2016-06-22 03:02:20 -07:00
Grant Paul
e041122136 Minor cleanup to xcsdk headers and loading path.
- Simplify error path in xcsdk loading.
 - Remove base header and umbrella header from xcsdk.
 - Modernize syntax and structure in xcsdk.
2016-06-22 02:26:58 -07:00
Kellie Medlin
b29fda78f8 Add ability to specify platforms and toolchains in a configuration file.
The optional configuration file is at `/var/db/xcsdk_configuration.plist`
unless `XCSDK_CONFIGURATION_PATH` is specified in the environment.

In the configuration, the key `ExtraPlatformsPaths` specifies paths with
additional `.platform` bundles to load, and `ExtraToolchainsPaths` lists
directories with additional `.xctoolchain` bundles.

A unit test is added to test that these paths are searched when specified.
2016-06-22 01:55:52 -07:00
Grant Paul
bd892460db Avoid regenerating license header when source has not changed.
Allows builds to coalesce by only generating the header on changes.
2016-06-21 19:28:35 -07:00
Brian Gesiak
3272f72648 Add -help action. Fixes #2.
This addresses #2 by implementing a `-help` action. `-help` prints
`-usage`, then lists explanations of each option. Options that are not
yet implemented are clearly marked as such to avoid confusion.
2016-06-21 19:15:50 -07:00