1042 Commits

Author SHA1 Message Date
Grant Paul
8e36066203 Use filesystem for all file interactions.
In some cases where a filesystem is not available, use a temporary
method to get access to a static instance of the default filesystem.
2016-08-31 16:58:50 -07:00
Marc Salem
596b529f86 Make reading and writing CAR files faster (#107)
* Support faster writes by preallocating indexes
* Allow reading and writing raw key value pairs in libcar
* Remove bom_alloc_empty and bom_tree_alloc_empty
* Keep space for two extra indexes for compatibility
* Include struct bom_variables when checking minimum size of BOM memory
* Remove preallocated_index_count
* Refactor resizing code
* Add API to increase the size of the BOM index free list
* Optimize CAR write by pre-allocting BOM indexes
2016-08-31 16:36:47 -07:00
Grant Paul
11725f9b3a Remove extra syntax around filesystem creation. 2016-08-30 15:16:31 -07:00
Ktwu
85bb880476 Properly print out the SDK version when asked. (#109) 2016-08-24 21:01:12 -07:00
Grant Paul
82120babf7 Remove operators and hash specialization for archive attribute lists.
These methods were unused and they made the attribute list more complex.
2016-08-13 23:48:10 -07:00
Grant Paul
48886b57ae Minor formatting cleanups for asset archive reader. 2016-08-11 20:31:25 -07:00
Grant Paul
7fbcb6a097 Update documentation for required packages on Linux. 2016-08-11 15:52:40 -07:00
Marc Salem
4d2c960da2 Update libpng checksum 2016-08-11 14:54:40 -07:00
Marc Salem
ead2430c06 Update libpng version and url 2016-08-11 14:46:56 -07:00
Marc Salem
c8b2be093f Update libpng version 2016-08-11 14:40:38 -07:00
Grant Paul
1fe3b27cab Add unit test for compiling launch images.
Verifies the output from compiling launch images of various types,
including legacy launch images without a minimum system version.
2016-08-11 14:05:06 -07:00
Grant Paul
01de4a5e04 Add a unit test to verify app icon set compilation.
Verifies the files are copied, the dependency info is populated, the
additional info plist is populated, and nothing else is changed.
2016-08-11 14:05:06 -07:00
Grant Paul
bb71c06654 Move asset compilation dispatch into compile namespace.
This simplifies the compile action and unifies compiling any asset
with the compilation of specific types of assets.
2016-08-11 14:05:06 -07:00
Grant Paul
1cefb78b27 Warn about unsupported options, rather than ignoring. 2016-08-11 14:05:06 -07:00
Grant Paul
99c5a53f9a Write out complete dependency info and outputs in asset compilation.
Print the set of output files, as expected, and output dependency info
as requested by the command line options. The dependency info contains
the full set of inputs and outputs used during compilation.
2016-08-11 14:05:06 -07:00
Grant Paul
7a4b09f389 Add tool to dump dependency info from any format. 2016-08-11 14:05:06 -07:00
Grant Paul
ff7db1f239 Update help message for dependency info tool.
The help message was outdated and referencing old options.
2016-08-11 14:05:06 -07:00
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