2
2
#import " CCPackageConstants.h"
3
3
#import " CCPackage.h"
4
4
#import " ccMacros.h"
5
+ #import " CCPackage_private.h"
5
6
6
7
7
8
@interface CCPackageInstaller ()
@@ -31,14 +32,6 @@ - (instancetype)initWithPackage:(CCPackage *)package installPath:(NSString *)ins
31
32
32
33
- (BOOL )installWithError : (NSError **)error
33
34
{
34
-
35
- /* TODO
36
- CCPackageInstallData *installData = [_package installData];
37
-
38
- NSAssert(installData != nil, @"installData must not be nil");
39
- NSAssert(installData.unzipURL != nil, @"installData.unzipURL must not be nil");
40
- */
41
-
42
35
if (![self unzippedPackageFolderExists: error])
43
36
{
44
37
[_package setValue: @(CCPackageStatusInstallationFailed) forKey: @" status" ];
@@ -58,13 +51,10 @@ - (BOOL)installWithError:(NSError **)error
58
51
59
52
- (BOOL )movePackageToInstallPathWithError : (NSError **)error
60
53
{
61
- // TODO
62
- // CCPackageInstallData *installData = [_package installData];
63
-
64
54
NSAssert (_package.unzipURL != nil , @" package.unzipURL must not be nil." );
65
55
NSAssert (_package.folderName != nil , @" package.folderName must not be nil." );
66
56
67
- [ _package setValue: [NSURL fileURLWithPath: [_installPath stringByAppendingPathComponent: _package.folderName]] forKey: @" installURL " ];
57
+ _package. installURL = [NSURL fileURLWithPath: [_installPath stringByAppendingPathComponent: _package.folderName]];
68
58
69
59
NSError *errorMove;
70
60
NSFileManager *fileManager = [NSFileManager defaultManager ];
@@ -89,10 +79,6 @@ - (BOOL)movePackageToInstallPathWithError:(NSError **)error
89
79
90
80
- (BOOL )unzippedPackageFolderExists : (NSError **)error
91
81
{
92
- /* TODO
93
- CCPackageInstallData *installData = [_package installData];
94
- NSAssert(installData.unzipURL, @"installData.unzipURL must not be nil");
95
- */
96
82
NSAssert (_package.unzipURL != nil , @" package.unzipURL must not be nil." );
97
83
98
84
NSFileManager *fileManager = [NSFileManager defaultManager ];
0 commit comments