Menu

[r251]: / branches / texdist2 / Library / Tools.h  Maximize  Restore  History

Download this file

110 lines (99 with data), 3.7 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
//
// Tools.h
// TeXDist2
//
// Created by coder on 08/12/06.
// Copyright 2006-2014 Laurens'Tribune. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "Common.h"
@class SystemVersion;
@interface NSURL(tools)
- (NSString *)Contents_Path4TeXDist2;
- (NSString *)Programs_Path4TeXDist2;
- (NSString *)Programs_texbin_Path4TeXDist2;
- (NSString *)Programs_texbin_Destination4TeXDist2;
@end
TEXDIST2_POSTFIX_CLASS(Tools)
@interface Tools: NSObject
+ (NSString *)Programs_RelativePath;
+ (NSString *)rootRelativePath;
+ (NSString *)LTD_Path;
+ (NSString *)LTD_DefaultTeX_Path;
+ (NSString *)LTD_DefaultTeX_Contents_Path;
+ (NSString *)LTD_DefaultTeX_Contents_Destination;
+ (NSString *)LTD_texdistmgr_Path;
+ (NSString *)ULB_texdistmgr_Path;
+ (NSString *)texdistmgr_DestinationForName:(NSString *)aName;
+ (NSString *)usr_texbin_Path;
+ (NSString *)usr_texbin_Destination;// /Library/TeX/Distributions/Programs/texbin
+ (NSString *)Programs_texbin_Destination;// ../.DefautTeX/Contents/Programs/texbin
+ (NSString *)Programs_texbin_Path;
+ (NSString *)Programs_texbin_RelativePath;
+ (NSString *)Contents_Component;
+ (NSString *)texdistExtension;
+ (NSString *)LTD_texbin_Path;
+ (NSDictionary *)minimumSystemVersionsByArch;
+ (NSDictionary *)maximumSystemVersionsByArch;
+ (SystemVersion *)minimumSystemVersion;
+ (SystemVersion *)maximumSystemVersion;
+ (NSArray *)expectedPrograms;
+ (NSArray *)architectureNames;
+ (NSBundle *)bundle;
+ (NSArray *)architecturePriority;
+ (NSString *)arch;
+ (BOOL) isResetOK;
+ (BOOL) resetOrReturnError:(NSError **)RORef;
+ (BOOL) is_texdistmgr_OKForName:(NSString *)name;
+ (BOOL) fix_texdistmgr_ForName:(NSString *)name error:(NSError **)RORef;
+ (BOOL) is_user_texdistmgr_OKForName:(NSString *)name;
+ (BOOL) fix_user_texdistmgr_ForName:(NSString *)name error:(NSError **)RORef;
#ifndef TeXDist2_HELPER
+ (BOOL) isAlternateKeyDown;
#endif
@end
#define IL18N(MSG) NSLocalizedStringFromTableInBundle((MSG), nil, [NSBundle bundleForClass:[Tools class]], @"None")
# define TeXDist2_RETURN_ERROR(CODE)\
do {\
if (RORef AND NOT *RORef) {\
*RORef = [NSError errorWithDomain:kTeXDist2ErrorDomainName \
code:CODE \
userInfo:@{ \
NSLocalizedDescriptionKey: [NSError localizedErrorMessage4TeXDist2:CODE] \
}];\
} else {\
[Logger logWithLevel:kTeXDist2MsgLevelERR \
format:@"TeXDist2 ERROR(%li): %@", \
CODE,[NSError localizedErrorMessage4TeXDist2:CODE]]; \
}\
} while (NO)
#define TeXDist2SetupLocalError(vROR,vCODE) \
do { \
if (vROR) { \
vROR = [NSError errorWithDomain:kTeXDist2ErrorDomainName \
code:vCODE \
userInfo:@{ \
NSLocalizedDescriptionKey: [NSError localizedErrorMessage4TeXDist2: vCODE], \
NSUnderlyingErrorKey: vROR \
}]; \
} else { \
vROR = [NSError errorWithDomain:kTeXDist2ErrorDomainName \
code:vCODE \
userInfo:@{ \
NSLocalizedDescriptionKey: [NSError localizedErrorMessage4TeXDist2: vCODE] \
}]; \
} \
} while (NO)
#define TeXDist2ForwardLocalError(vROR,vRORef,vCODE) \
do { \
TeXDist2SetupLocalError(vROR,vCODE); \
TeXDist2ForwardError(vROR,vRORef);\
} while (NO)
# define TeXDist2ForwardError(vROR,vRORef) \
do { \
if (ROR) {\
if (RORef AND NOT *RORef) { \
*RORef = ROR; \
} \
} \
} while (NO)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.