53 Commits

Author SHA1 Message Date
Andrew Hyatt
e11125fbf2
Disable installation 2018-06-03 14:59:26 -04:00
Andrew Hyatt
a37f07c125
Rename util to util_xcbuild 2018-05-22 22:55:43 -04:00
Luiz Coimbra Barbosa Silva
96af1f519e Add --allow-non-standard-behavior and --allow-image-type webp to actool
Adding the capability to pack WEBP images into compiled assets catalog.
Since this is not standard behavior, I'm adding it under `--allow-image-type webp`.
This way (`--allow-image-type`) also makes it easier to add future new extension types.
Since this is not a feature supported by Apple's Xcode.actool, I'm adding `--allow-non-standard-behavior` as well, that makes it explicit it's incompatible behavior.
2018-03-28 11:41:24 -07:00
Grant Paul
cad38e9204 Support Windows paths in memory-backed filesystem and tests.
Until strongly typed paths make the correct root implicit, this
adjusts the path root used in tests to match what is expected on
Windows and Unix.
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
Grant Paul
71940e8445 Partially update asset catalog compiler specification and resolver.
Asset catalog compilation now uses a custom variable to pass inputs
to the specification, and a custom grouping method to group inputs.

Does not pass sticker pack translations to asset catalog compiler,
as this seems to require parsing the asset catalog just to determine
which strings files should be used. Left as a future task.
2016-11-17 16:24:58 -08:00
Grant Paul
3df0c95355 Add a few missing asset catalog compiler driver options.
They are parsed but not yet used during compilation.
2016-10-24 10:51:03 -07:00
Grant Paul
242f97adb0 Avoid reference counting for asset catalog loading.
Asset catalogs form a tree, not a graph, so there is no requirement
for reference counting. Simplify the possibility space by removing
reference counting in favor of direct ownership of child assets.
2016-10-21 15:23:50 -07:00
Grant Paul
bb475741ec Parse remaining new asset types. 2016-10-21 15:23:50 -07:00
Kolin Krewinkel
f9c9cebacb Add option for specifying compiled asset file name.
Use ` --compile-output-filename` to specify.
2016-10-06 11:16:19 +08:00
Stephane Sezer
825092cbee Fix a few typos in uninmplemented features 2016-10-06 09:12:49 +07:00
Grant Paul
eef06a4979 Add sticker-related asset types. 2016-10-05 19:04:47 -07:00
Grant Paul
53e0f96f72 Add new and missing asset properties to existing asset types. 2016-10-05 19:04:47 -07:00
Grant Paul
48ad1729dd Move process context into a separate process library.
This improves namespacing and allows for more process changes.
2016-09-23 11:41:42 +07:00
Grant Paul
acfed91183 Pass process context from above when easily possible. 2016-09-23 11:41:42 +07:00
Kolin Krewinkel
3e4a8106b2 Update asset compiler driver options to parse and ignore new flags. 2016-09-20 16:26:54 +07:00
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
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
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
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
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
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
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
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
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
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
Grant Paul
d690825c40 Add asset catalog driver compile action output.
Includes a basic unit test.
2016-07-03 14:27:32 -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
Marc Salem
7ebc1a4acd enable-on-demand-resources has YES/NO argument 2016-06-18 13:20:28 -07:00
Marc Salem
a8f02e7b34 Read icon size from AppIconSet 2016-06-18 13:17:54 -07:00
Marc Salem
03db0a0e42 Support multiple targetDevices 2016-06-18 12:47:57 -07:00
Grant Paul
c25336b50b Install into a developer root, rather than a Unix layout.
Executables are installed into `<prefix>/usr/bin and `<prefix>/usr/lib`.
Specifications are installed into `<prefix>/Library/Xcode/Specifications`.
2016-06-16 11:28:17 -07:00
strager
b50bf0b5be Don't build tests if BUILD_TESTING=NO (#55)
If the developer invokes CMake with BUILD_TESTING=NO, don't
build or register CTest tests. This allows building without
the ThirdParty/googletest Git submodule, and also improves
build times for end-users who just want an xcbuild binary.
2016-05-26 13:56:42 -07:00
Grant Paul
5821177f63 Fix actool output when there is nothing to print. Add a test. 2016-05-26 12:52:29 -07:00
Grant Paul
15110f9157 Minor style cleanup for various asset code. 2016-05-26 12:43:47 -07:00
Grant Paul
aeeb3579ba Support CMake installation of libraries and executables. 2016-05-24 18:11:51 -07:00
Grant Paul
8358d84d97 Implement contents print subcommand in actool.
The contents printing supports most types of asset, but additional ones
can be supported more in the future. Output can be human-readable text or
as a property list, as specified by the output format.
2016-05-24 16:07:50 -07:00
Grant Paul
e69e0032e1 Add missing includes to fix Linux build. 2016-05-23 19:57:52 -07:00
Grant Paul
f00f186e1a Update license headers for asset catalog code. 2016-04-15 20:49:39 -07:00
Grant Paul
2c18367d68 Fixes for Linux and GCC builds.
- Use add_compile_options() in CMake to avoid duplicate lines.
 - Add missing includes as needed for Linux compilation.
 - Add required macro to access ftruncate() on Linux in C99 mode.
 - Switch to C++11 random numbers instead of arc4random for portability.
 - Workaround GCC issue with references to packed struct fields.
 - Fix missing default case required by GCC.
2016-04-15 20:40:52 -07:00
Grant Paul
b4c4dbbe68 Skeleton for parsing xcassets into native structures.
This will parse xcassets directories into an in-memory representation.
2016-04-15 19:24:17 -07:00