12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- //
- // ProjectInfo_Path.m
- // UUTUtils
- //
- // Created by zhuge on 2017/12/25.
- // Copyright © 2017年 zhuge. All rights reserved.
- // 存放目录信息
- #import "ProjectInfo_Path.h"
- #import "DataUtils.h"
- #import "ZGFileUtils.h"
- @implementation ProjectInfo_Path_Config
- + (ProjectInfo_Path_Config *)createWithRoot:(NSString *)projectRoot {
- ProjectInfo_Path_Config *config = [[ProjectInfo_Path_Config alloc] init];
- [config initWithRoot:projectRoot];
- return config;
- }
- - (void)initWithRoot:(NSString *)projectRoot {
- self.root = [projectRoot stringByAppendingString:@"/config"];
- self.translate = [self.root stringByAppendingString:@"/translate"];
- self.icon = [self.root stringByAppendingString:@"/playstore.png"];
- self.top = [self.root stringByAppendingString:@"/top.jpg"];
-
- // 查找keystore
- NSArray *arrKeystores = [ZGFileUtils arrayOfFileAtDir:self.root extensionFilterArray:@[@"keystore"]];
- self.keystore = [arrKeystores firstObject];
- }
- @end
- @implementation ProjectInfo_Path
- + (ProjectInfo_Path *)create:(NSString *)package {
- ProjectInfo_Path *path = [[ProjectInfo_Path alloc] init];
- [path init:package];
- return path;
- }
- - (void)init:(NSString *)package {
- self.root = [NSString stringWithFormat:@"%@/%@", [DataUtils getRootPath], package];
- self.config = [ProjectInfo_Path_Config createWithRoot:self.root];
- self.cache = [self.root stringByAppendingString:@"/cache"];
- self.configPlist = [self.root stringByAppendingString:@"/config.plist"];
- self.adJsonPath = [self.root stringByAppendingString:@"/ad.json"];
- self.output = [self.root stringByAppendingString:@"/output"];
- self.apkCode = [self.root stringByAppendingString:@"/apkCode"];
- self.adNamePlist = [self.root stringByAppendingString:@"/adNames.plist"];
- self.adNameInCSVPlist = [self.root stringByAppendingString:@"/adNameInCSVs.plist"];
- self.adWorthJsonPath = [self.root stringByAppendingString:@"/ad_worth.json"];
- }
- @end
|