Code Monkey home page Code Monkey logo

cartool's Introduction

cartool

Export images from OS X / iOS .car CoreUI archives. Very rough code, probably tons wrong with it, but still useful.

cartool's People

Contributors

marmphco avatar smeiners-gpsw avatar steventroughtonsmith avatar xzzz9097 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cartool's Issues

Please clarify the license.

I'd like to submit a pull request but I can only do that if this project is licensed under a license with few restrictions such as Apache2 or MIT

AppIcon doesn't work

This tool can't extract AppIcon.

Instead of:

for (NSNumber *scaleFactor in @[@1, @2, @3])
{
    CUINamedImage *image = [catalog imageWithName:key scaleFactor:scaleFactor.doubleValue];

    if (image && image.scale == scaleFactor.floatValue) [images addObject:image];
}

I tried simply:

[images addObjectsFromArray:[catalog imagesWithName:key]];

In my one test, this added 23 images to the array, which are of type CUINamedMultisizeImageSet.h , which doesn't respond to -size, and therefore crashes on CGSizeEqualToSize(image.size, CGSizeZero). Looks like this type is new in iOS 11 (it's not present in the iOS 10 runtime headers).

So if we want to make this work we'll have to add support for this type.

can't runing

Assertion failed:
(tokenCount < maxCountIncludingZeroTerminator - 1), function CUIRenditionKeySetValueForAttribute, file /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-366.1/CoreTheme/ThemeStorage/CUIThemeRendition_Support.m, line 228

crashed

At first run :cartool[37635:515969] [framework] CUIThemeStore: No theme registered with id=18442823884578500406

run second:2019-02-28 10:19:23.211861+0800 cartool[37645:516265] -[NSTaggedPointerString unsignedLongLongValue]: unrecognized selector sent to instance 0x1
2019-02-28 10:19:23.212488+0800 cartool[37645:516265] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTaggedPointerString unsignedLongLongValue]: unrecognized selector sent to instance 0x1'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff4c3a8ded __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff78474720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff4c426195 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff4c34aa60 forwarding + 1486
4 CoreFoundation 0x00007fff4c34a408 _CF_forwarding_prep_0 + 120
5 Foundation 0x00007fff4e69c9ea _NSSetUnsignedLongLongValueForKeyInIvar + 37
6 Foundation 0x00007fff4e6b3450 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 331
7 cartool 0x0000000100002373 exportCarFileAtPath + 435
8 cartool 0x00000001000030df main + 223
9 libdyld.dylib 0x00007fff79542ed9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

@3x support

Any idea how @3x assets are stored? It seems naively looking for assets with a scale factor of 3.0 for the .kCoreThemeIdiomPhone does not work: mono0926@427dbd8

crash

[catalog setValue:facet forKey:@"_storageRef"];

2018-10-26 14:11:43.054192+0800 cartool[7230:406857] -[__NSTaggedDate unsignedLongLongValue]: unrecognized selector sent to instance 0x1
2018-10-26 14:11:43.054852+0800 cartool[7230:406857] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSTaggedDate unsignedLongLongValue]: unrecognized selector sent to instance 0x1'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff3563443d __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff61545720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff356b1255 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff355d3ad0 forwarding + 1486
4 CoreFoundation 0x00007fff355d3478 _CF_forwarding_prep_0 + 120
5 Foundation 0x00007fff3791fb1a _NSSetUnsignedLongLongValueForKeyInIvar + 37
6 Foundation 0x00007fff37936580 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 331
7 cartool 0x0000000100001871 exportCarFileAtPath + 433
8 cartool 0x00000001000025f4 main + 260
9 cartool 0x0000000100000f64 start + 52
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Tool shows output, but does not create any files

I'm trying to extract my Assets.car here. The tool gives me the following output but does not generate any data on disk. Shouldn't I find the contents in my "tmp" folder?
The assets file is from a tvOS project, in case that matters. If you'd like to have it for analysis, I can send it to you.

iMacRR:tmp rene$ cartool Assets.car /Users/rene/Documents/tmp
App Icon - Large/Back/Content
App Icon - Large/Front/Content
App Icon - Large/Middle/Content
App Icon - Small
App Icon - Small/Back/Content
App Icon - Small/Front/Content
App Icon - Small/Middle/Content
Brand Assets
Leaderboard/Poster
Leaderboard/Poster/Front/Content
Leaderboard/Poster/Middle/Content

Thread 1: signal SIGABRT

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '[<CUICatalog 0x1028412c0> setNilValueForKey]: could not set nil as the value for the key _storageRef.'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.