Rev 1 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1 | Rev 2 | ||
---|---|---|---|
Line 39... | Line 39... | ||
39 | 39 | ||
40 | C_ASFX_ET_HER = 'AutoSFX Extraction Target: Extract here'; |
40 | C_ASFX_ET_HER = 'AutoSFX Extraction Target: Extract here'; |
41 | C_ASFX_ET_DES = 'AutoSFX Extraction Target: Extract to Desktop'; |
41 | C_ASFX_ET_DES = 'AutoSFX Extraction Target: Extract to Desktop'; |
42 | C_ASFX_ET_ASK = 'AutoSFX Extraction Target: Choose directory'; |
42 | C_ASFX_ET_ASK = 'AutoSFX Extraction Target: Choose directory'; |
43 | 43 | ||
44 | EINRUECK = '> '; // Optional |
44 | EINRUECK = '> '; // Optional to all C_ASFX |
45 | 45 | ||
46 | const |
46 | const |
47 | CB_DEFAULT = cbAvoid; |
47 | CB_DEFAULT = cbAvoid; |
48 | CP_DEFAULT = cpNone; |
48 | CP_DEFAULT = cpNone; |
49 | ET_DEFAULT = etExtractHere; |
49 | ET_DEFAULT = etExtractHere; |
Line 107... | Line 107... | ||
107 | end; |
107 | end; |
108 | end; |
108 | end; |
109 | 109 | ||
110 | function StripBehavior(c: string): string; |
110 | function StripBehavior(c: string): string; |
111 | 111 | ||
112 | procedure StripIt(s: string); |
112 | procedure StripIt(s: string; allowEinrueck: boolean); |
- | 113 | begin |
|
- | 114 | if allowEinrueck then |
|
113 | begin |
115 | begin |
114 | c := StringReplace(c, EINRUECK + s+#13#10, '', [rfReplaceAll, rfIgnoreCase]); |
116 | c := StringReplace(c, EINRUECK + s+#13#10, '', [rfReplaceAll, rfIgnoreCase]); |
115 | c := StringReplace(c, EINRUECK + s+#13, '', [rfReplaceAll, rfIgnoreCase]); |
117 | c := StringReplace(c, EINRUECK + s+#13, '', [rfReplaceAll, rfIgnoreCase]); |
116 | c := StringReplace(c, EINRUECK + s+#10, '', [rfReplaceAll, rfIgnoreCase]); |
118 | c := StringReplace(c, EINRUECK + s+#10, '', [rfReplaceAll, rfIgnoreCase]); |
117 | c := StringReplace(c, EINRUECK + s, '', [rfReplaceAll, rfIgnoreCase]); |
119 | c := StringReplace(c, EINRUECK + s, '', [rfReplaceAll, rfIgnoreCase]); |
- | 120 | end; |
|
118 | 121 | ||
119 | c := StringReplace(c, s+#13#10, '', [rfReplaceAll, rfIgnoreCase]); |
122 | c := StringReplace(c, s+#13#10, '', [rfReplaceAll, rfIgnoreCase]); |
120 | c := StringReplace(c, s+#13, '', [rfReplaceAll, rfIgnoreCase]); |
123 | c := StringReplace(c, s+#13, '', [rfReplaceAll, rfIgnoreCase]); |
121 | c := StringReplace(c, s+#10, '', [rfReplaceAll, rfIgnoreCase]); |
124 | c := StringReplace(c, s+#10, '', [rfReplaceAll, rfIgnoreCase]); |
122 | c := StringReplace(c, s, '', [rfReplaceAll, rfIgnoreCase]); |
125 | c := StringReplace(c, s, '', [rfReplaceAll, rfIgnoreCase]); |
123 | end; |
126 | end; |
124 | 127 | ||
125 | begin |
128 | begin |
126 | StripIt(C_SIGNATURE); |
129 | StripIt(C_SIGNATURE, false); |
127 | 130 | ||
128 | StripIt(C_ASFX_CB_AVO); |
131 | StripIt(C_ASFX_CB_AVO, true); |
129 | StripIt(C_ASFX_CB_OVR); |
132 | StripIt(C_ASFX_CB_OVR, true); |
130 | StripIt(C_ASFX_CB_NEW); |
133 | StripIt(C_ASFX_CB_NEW, true); |
131 | StripIt(C_ASFX_CB_ASK); |
134 | StripIt(C_ASFX_CB_ASK, true); |
132 | 135 | ||
133 | StripIt(C_ASFX_CP_NON); |
136 | StripIt(C_ASFX_CP_NON, true); |
134 | StripIt(C_ASFX_CP_BEF); |
137 | StripIt(C_ASFX_CP_BEF, true); |
135 | StripIt(C_ASFX_CP_AFT); |
138 | StripIt(C_ASFX_CP_AFT, true); |
136 | 139 | ||
137 | StripIt(C_ASFX_ET_HER); |
140 | StripIt(C_ASFX_ET_HER, true); |
138 | StripIt(C_ASFX_ET_DES); |
141 | StripIt(C_ASFX_ET_DES, true); |
139 | StripIt(C_ASFX_ET_ASK); |
142 | StripIt(C_ASFX_ET_ASK, true); |
140 | 143 | ||
141 | result := c; |
144 | result := c; |
142 | end; |
145 | end; |
143 | 146 | ||
144 | function BehaviorStrings(bh: TZipBehavior): string; |
147 | function BehaviorStrings(bh: TZipBehavior): string; |