-
Notifications
You must be signed in to change notification settings - Fork 6
/
QPM_ExtraRun.prg
644 lines (594 loc) · 27.8 KB
/
QPM_ExtraRun.prg
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
/*
* QPM - QAC based Project Manager
*
* Copyright 2011-2021 Fernando Yurisich <[email protected]>
* https://teamqpm.github.io/
*
* Based on QAC - Project Manager for (x)Harbour
* Copyright 2006-2011 Carozo de Quilmes <[email protected]>
* http://www.CarozoDeQuilmes.com.ar
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "minigui.ch"
#include <QPM.ch>
Function QPM_GetExtraRun()
Local FileName := "", sep
DEFINE WINDOW ExtraRun ;
AT -2,122 ;
WIDTH 540 ;
HEIGHT 600 ;
TITLE 'QPM - Extra Run Wizard' ;
ICON '' ;
MODAL ;
FONT 'MS Sans Serif' ;
SIZE 10 ;
ON INIT QPM_GetExtraRunInit()
@ 05,16 FRAME ExtraRunSelectFrame ;
CAPTION "" ;
WIDTH 498 ;
HEIGHT 130
@ 18,133 RADIOGROUP ExtraRunSelectRadio ;
OPTIONS {'None', 'Run Another QPM Instance', 'Run Exe or Batch Process', 'Execute Command'} ;
VALUE 1 ;
WIDTH 330 ;
SPACING 25 ;
TOOLTIP 'Select process type' ;
ON CHANGE QPM_GetExtraRunOptions() ;
@ 142,16 FRAME ExtraRunQPMFrame ;
CAPTION "" ;
WIDTH 499 ;
HEIGHT 174 ;
@ 157,29 LABEL ExtraRunQPMLabel ;
WIDTH 241 ;
HEIGHT 15 ;
VALUE 'Select Main Options for QPM Instance:' ;
BOLD ;
FONTCOLOR DEF_COLORBLUE
@ 172,28 RADIOGROUP ExtraRunQPMRadio ;
OPTIONS { 'OPEN Project', 'BUILD Project', 'RUN Project', "CLEAR Project's Temporary Folders" } ;
VALUE 2 ;
WIDTH 242 ;
SPACING 25 ;
ON CHANGE QPM_GetExtraRunQPMSubOptions() ;
@ 193,290 CHECKBOX ExtraRunQPM2ForceFull ;
CAPTION 'ForceFull' ;
WIDTH 100 ;
HEIGHT 28;
VALUE .F. ;
TOOLTIP 'Force non-incremental build' ;
@ 218,290 CHECKBOX ExtraRunQPM2Run ;
CAPTION 'Run' ;
WIDTH 100 ;
HEIGHT 28;
VALUE .F.
@ 242,290 CHECKBOX ExtraRunQPM2ButtonRun ;
CAPTION 'ButtonRun' ;
WIDTH 100 ;
HEIGHT 28;
VALUE .F. ;
TOOLTIP 'Enable "Run Project" button' ;
@ 170,395 CHECKBOX ExtraRunQPM2Clear ;
CAPTION 'Clear' ;
WIDTH 84 ;
HEIGHT 28;
VALUE .F. ;
TOOLTIP 'Clear temporary "Object" folder' ;
@ 194,395 CHECKBOX ExtraRunQPM2Log ;
CAPTION 'Log' ;
WIDTH 63 ;
HEIGHT 26;
VALUE .F. ;
TOOLTIP 'Log activity' ;
@ 218,395 CHECKBOX ExtraRunQPM2LogOnlyError ;
CAPTION 'LogOnlyError' ;
WIDTH 100;
HEIGHT 28;
VALUE .F. ;
TOOLTIP 'Log only faulty processes' ;
@ 243,395 CHECKBOX ExtraRunQPM2Exit ;
CAPTION 'AutoExit' ;
WIDTH 76 ;
HEIGHT 27;
VALUE .T. ;
TOOLTIP 'Exit automatically after the end of the Build process' ;
ON CHANGE QPM_GetExtraRunQPM2ExitOptions()
@ 156,278 FRAME ExtraRunQPM2FrameSubOptions ;
CAPTION "" ;
WIDTH 222 ;
HEIGHT 124 ;
@ 170,290 CHECKBOX ExtraRunQPM2Lite ;
CAPTION 'Lite' ;
WIDTH 100 ;
HEIGHT 28;
VALUE .T. ;
TOOLTIP 'Run QPM with reduced options' ;
@ 288,27 LABEL ExtraRunQPMProjLabel ;
WIDTH 50 ;
HEIGHT 23 ;
VALUE 'Project' ;
@ 284,78 TEXTBOX ExtraRunQPMProjText ;
HEIGHT 27 ;
READONLY ;
WIDTH 385 ;
// MAXLENGTH 30 ;
@ 282,465 BUTTON ExtraRunQPMProjButton ;
PICTURE 'folderselect';
ACTION If ( !Empty( FileName := GetFile( { {'QPM Project File (*.QPM)','*.QPM;*.mpmQ'} }, 'Select Project', US_FileNameOnlyPath( ChgPathToReal( ExtraRun.ExtraRunQPMProjText.Value ) ), .F., .T. ) ), ExtraRun.ExtraRunQPMProjText.Value := ChgPathToRelative( FileName ), ) ;
WIDTH 34 ;
HEIGHT 31 ;
@ 326,16 FRAME ExtraRunExeFrame ;
CAPTION "" ;
WIDTH 501 ;
HEIGHT 117 ;
@ 348,24 LABEL ExtraRunExeLabel ;
WIDTH 134 ;
HEIGHT 22 ;
VALUE 'Run Exe or Batch:' ;
BOLD ;
FONTCOLOR DEF_COLORBLUE
@ 346,161 TEXTBOX ExtraRunExeText ;
HEIGHT 28 ;
READONLY ;
WIDTH 301
@ 344,464 BUTTON ExtraRunExeButton ;
PICTURE 'FolderSelect';
ACTION ( iif( ! Empty( FileName := GetFile( { {'EXE and BAT Programs','*.BAT;*.EXE'} }, ;
'Select Program or Process', ;
US_FileNameOnlyPath( ChgPathToReal( ExtraRun.ExtraRunExeText.Value ) ), ;
.F., .T. ) ), ;
ExtraRun.ExtraRunExeText.Value := ChgPathToRelative( FileName ), ;
NIL ), ;
ExtraRun.ExtraRunExePause.Enabled := ! Upper( US_FileNameOnlyExt( ExtraRun.ExtraRunExeText.Value ) ) == "EXE" ) ;
WIDTH 35 ;
HEIGHT 31 ;
@ 385,28 LABEL ExtraRunExeParm ;
WIDTH 75 ;
HEIGHT 19 ;
VALUE 'Parameters' ;
@ 381,160 TEXTBOX ExtraRunExeTextParm ;
HEIGHT 28 ;
WIDTH 339 ;
@ 410,223 CHECKBOX ExtraRunExeWait ;
CAPTION 'Wait' ;
WIDTH 93 ;
HEIGHT 30;
VALUE .T.
ExtraRun.ExtraRunExeWait.visible := .F.
@ 410,329 CHECKBOX ExtraRunExePause ;
CAPTION 'Add Pause' ;
WIDTH 101 ;
HEIGHT 27;
VALUE .F.
@ 449,16 FRAME ExtraRunFreeFrame ;
CAPTION "" ;
WIDTH 503 ;
HEIGHT 72 ;
@ 467,26 LABEL ExtraRunFreeLabel ;
WIDTH 120 ;
HEIGHT 24 ;
VALUE 'DOS Command:' ;
BOLD ;
FONTCOLOR DEF_COLORBLUE
@ 463,159 TEXTBOX ExtraRunFreeText ;
HEIGHT 30 ;
WIDTH 339 ;
@ 494,220 CHECKBOX ExtraRunFreeWait ;
CAPTION 'Wait' ;
WIDTH 101 ;
HEIGHT 23 ;
VALUE .T.
ExtraRun.ExtraRunFreeWait.visible := .F.
@ 494,329 CHECKBOX ExtraRunFreePause ;
CAPTION 'Add Pause' ;
WIDTH 100 ;
HEIGHT 21 ;
VALUE .F.
sep := int( ( GetProperty( "ExtraRun", "Width" ) - GetBorderWidth() - 300 ) / 4 )
@ 530, sep BUTTON ExtraRunOk ;
CAPTION 'OK' ;
ACTION QPM_GetExtraRunSave() ;
WIDTH 100 ;
HEIGHT 28 ;
@ 530, 100 + sep * 2 BUTTON ExtraRunTest ;
CAPTION 'Test' ;
ACTION QPM_GetExtraRunSave( .T. ) ;
WIDTH 100 ;
HEIGHT 28
@ 530, 100 * 2 + sep * 3 BUTTON ExtraRunCancel ;
CAPTION 'Cancel' ;
ACTION ExtraRun.release() ;
WIDTH 100 ;
HEIGHT 28 ;
ON KEY ESCAPE OF ExtraRun ACTION ExtraRun.release()
END WINDOW
center window ExtraRun
activate window ExtraRun
Return .T.
Function QPM_GetExtraRunInit()
do case
case Prj_ExtraRunType == "NONE" .or. Empty( Prj_ExtraRunType )
ExtraRun.ExtraRunSelectRadio.Value := 1
case Prj_ExtraRunType == "QPM"
ExtraRun.ExtraRunSelectRadio.Value := 2
case Prj_ExtraRunType == "EXE"
ExtraRun.ExtraRunSelectRadio.Value := 3
case Prj_ExtraRunType == "FREE"
ExtraRun.ExtraRunSelectRadio.Value := 4
otherwise
MyMsgInfo( "Invalid ExtraRun Type: "+US_VarToStr( Prj_ExtraRunType ) )
endcase
ExtraRun.ExtraRunQPMProjText.Value := Prj_ExtraRunProjQPM
ExtraRun.ExtraRunExeText.Value := Prj_ExtraRunCmdEXE
ExtraRun.ExtraRunFreeText.Value := Prj_ExtraRunCmdFREE
ExtraRun.ExtraRunExeTextParm.Value := Prj_ExtraRunCmdEXEParm
do case
case Prj_ExtraRunQPMRadio == "OPEN"
ExtraRun.ExtraRunQPMRadio.Value := 1
case Prj_ExtraRunQPMRadio == "BUILD"
ExtraRun.ExtraRunQPMRadio.Value := 2
case Prj_ExtraRunQPMRadio == "RUN"
ExtraRun.ExtraRunQPMRadio.Value := 3
case Prj_ExtraRunQPMRadio == "CLEAR"
ExtraRun.ExtraRunQPMRadio.Value := 4
endcase
ExtraRun.ExtraRunQPM2ForceFull.Value := Prj_ExtraRunQPMForceFull
ExtraRun.ExtraRunQPM2Run.Value := Prj_ExtraRunQPMRun
ExtraRun.ExtraRunQPM2Exit.Value := Prj_ExtraRunQPMAutoExit
ExtraRun.ExtraRunQPM2Clear.Value := Prj_ExtraRunQPMClear
ExtraRun.ExtraRunQPM2Log.Value := Prj_ExtraRunQPMLog
ExtraRun.ExtraRunQPM2LogOnlyError.Value := Prj_ExtraRunQPMLogOnlyError
ExtraRun.ExtraRunQPM2ButtonRun.Value := Prj_ExtraRunQPMButtonRun
ExtraRun.ExtraRunQPM2Lite.Value := Prj_ExtraRunQPMLite
ExtraRun.ExtraRunExeWait.Value := Prj_ExtraRunExeWait
ExtraRun.ExtraRunExePause.Value := Prj_ExtraRunExePause
ExtraRun.ExtraRunFreeWait.Value := Prj_ExtraRunFreeWait
ExtraRun.ExtraRunFreePause.Value := Prj_ExtraRunFreePause
QPM_GetExtraRunOptions()
QPM_GetExtraRunQPMSubOptions()
QPM_GetExtraRunQPM2ExitOptions()
Return .T.
Function QPM_GetExtraRunSave( bTest )
Local Prefix
Private Tst_ExtraRunProjQPM
Private Tst_ExtraRunCmdEXE
Private Tst_ExtraRunCmdFREE
Private Tst_ExtraRunQPMRadio
Private Tst_ExtraRunQPMForceFull
Private Tst_ExtraRunQPMRun
Private Tst_ExtraRunQPMAutoExit
Private Tst_ExtraRunQPMClear
Private Tst_ExtraRunQPMLog
Private Tst_ExtraRunQPMLogOnlyError
Private Tst_ExtraRunQPMButtonRun
Private Tst_ExtraRunQPMLite
Private Tst_ExtraRunExeWait
Private Tst_ExtraRunExePause
Private Tst_ExtraRunFreeWait
Private Tst_ExtraRunFreePause
Private Tst_ExtraRunType
Private Tst_ExtraRunCmdQPMParm
Private Tst_ExtraRunCmdEXEParm
Private Tst_ExtraRunCmdFREEParm
DEFAULT bTest TO .F.
if bTest
Prefix := "Tst"
else
Prefix := "Prj"
endif
/* */
if ExtraRun.ExtraRunSelectRadio.Value = 2 .and. empty( ExtraRun.ExtraRunQPMProjText.Value )
MyMsgInfo( 'Field "Project" is empty !!!' )
Return .F.
endif
if ExtraRun.ExtraRunSelectRadio.Value = 3 .and. empty( ExtraRun.ExtraRunExeText.Value )
MyMsgInfo( 'Field "Run Exe or Batch" is empty!' )
Return .F.
endif
if ExtraRun.ExtraRunSelectRadio.Value = 4 .and. empty( ExtraRun.ExtraRunFreeText.Value )
MyMsgInfo( 'Field "DOS command" is empty!' )
Return .F.
endif
&( Prefix + "_ExtraRunProjQPM" ) := ExtraRun.ExtraRunQPMProjText.Value
&( Prefix + "_ExtraRunCmdEXE" ) := ExtraRun.ExtraRunExeText.Value
&( Prefix + "_ExtraRunCmdFREE" ) := ExtraRun.ExtraRunFreeText.Value
do case
case ExtraRun.ExtraRunQPMRadio.Value == 1
&( Prefix + "_ExtraRunQPMRadio" ) := "OPEN"
case ExtraRun.ExtraRunQPMRadio.Value == 2
&( Prefix + "_ExtraRunQPMRadio" ) := "BUILD"
case ExtraRun.ExtraRunQPMRadio.Value == 3
&( Prefix + "_ExtraRunQPMRadio" ) := "RUN"
case ExtraRun.ExtraRunQPMRadio.Value == 4
&( Prefix + "_ExtraRunQPMRadio" ) := "CLEAR"
otherwise
&( Prefix + "_ExtraRunQPMRadio" ) := "OPEN"
endcase
&( Prefix + "_ExtraRunQPMForceFull" ) := ExtraRun.ExtraRunQPM2ForceFull.Value
&( Prefix + "_ExtraRunQPMRun" ) := ExtraRun.ExtraRunQPM2Run.Value
&( Prefix + "_ExtraRunQPMAutoExit" ) := ExtraRun.ExtraRunQPM2Exit.Value
&( Prefix + "_ExtraRunQPMClear" ) := ExtraRun.ExtraRunQPM2Clear.Value
&( Prefix + "_ExtraRunQPMLog" ) := ExtraRun.ExtraRunQPM2Log.Value
&( Prefix + "_ExtraRunQPMLogOnlyError" ) := ExtraRun.ExtraRunQPM2LogOnlyError.Value
&( Prefix + "_ExtraRunQPMButtonRun" ) := ExtraRun.ExtraRunQPM2ButtonRun.Value
&( Prefix + "_ExtraRunQPMLite" ) := ExtraRun.ExtraRunQPM2Lite.Value
&( Prefix + "_ExtraRunCmdEXEParm" ) := ExtraRun.ExtraRunExeTextParm.Value
&( Prefix + "_ExtraRunCmdFREEParm" ) := ""
&( Prefix + "_ExtraRunExeWait" ) := ExtraRun.ExtraRunExeWait.Value
&( Prefix + "_ExtraRunExePause" ) := ExtraRun.ExtraRunExePause.Value
&( Prefix + "_ExtraRunFreeWait" ) := ExtraRun.ExtraRunFreeWait.Value
&( Prefix + "_ExtraRunFreePause" ) := ExtraRun.ExtraRunFreePause.Value
IF ! _IsWindowDefined( 'WinPSettings' )
MyMsgStop( "WinPSettings not defined!" + hb_osNewLine() + "Exit QPM and retry." )
RETURN .F.
ENDIF
IF ! _IsControlDefined ( "Text_ExtraRunCmd", 'WinPSettings' )
MyMsgStop( "Text_ExtraRunCmd not defined!" + hb_osNewLine() + "Exit QPM and retry." )
RETURN .F.
ENDIF
do case
case ExtraRun.ExtraRunSelectRadio.Value = 1
&( Prefix + "_ExtraRunType" ) := "NONE"
SetProperty( "WinPSettings", "Text_ExtraRunCmd", "Value", "" )
case ExtraRun.ExtraRunSelectRadio.Value = 2
&( Prefix + "_ExtraRunType" ) := "QPM"
&( Prefix + "_ExtraRunCmdQPMParm" ) := ""
do case
case &( Prefix + "_ExtraRunQPMRadio" ) == "OPEN"
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-OPEN"
case &( Prefix + "_ExtraRunQPMRadio" ) = "BUILD"
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-BUILD"
case &( Prefix + "_ExtraRunQPMRadio" ) = "RUN"
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-RUN"
case &( Prefix + "_ExtraRunQPMRadio" ) = "CLEAR"
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-CLEAR"
otherwise
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-OPEN"
endcase
if &( Prefix + "_ExtraRunQPMLite" ) .and. ExtraRun.ExtraRunQPM2Lite.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-LITE"
endif
if &( Prefix + "_ExtraRunQPMForceFull" ) .and. ExtraRun.ExtraRunQPM2ForceFull.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-FORCEFULL"
endif
if &( Prefix + "_ExtraRunQPMButtonRun" ) .and. ExtraRun.ExtraRunQPM2ButtonRun.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-BUTTONRUN"
endif
if &( Prefix + "_ExtraRunQPMRun" ) .and. ExtraRun.ExtraRunQPM2Run.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-RUN"
endif
if &( Prefix + "_ExtraRunQPMClear" ) .and. ExtraRun.ExtraRunQPM2Clear.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-CLEAR"
endif
if &( Prefix + "_ExtraRunQPMAutoExit" ) .and. ExtraRun.ExtraRunQPM2Exit.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-EXIT"
endif
if &( Prefix + "_ExtraRunQPMLogOnlyError" ) .and. ExtraRun.ExtraRunQPM2LogOnlyError.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-LOGONLYERROR"
endif
if &( Prefix + "_ExtraRunQPMLog" ) .and. ExtraRun.ExtraRunQPM2Log.Enabled
&( Prefix + "_ExtraRunCmdQPMParm" ) := &( Prefix + "_ExtraRunCmdQPMParm" ) + " " + "-LOG(" + US_FileNameOnlyName( PUB_cProjectFile ) + ".LOG)"
endif
SetProperty( "WinPSettings", "Text_ExtraRunCmd", "Value", "<QPM> " + &( Prefix + "_ExtraRunProjQPM" ) + " " + &( Prefix + "_ExtraRunCmdQPMParm" ) )
case ExtraRun.ExtraRunSelectRadio.Value = 3
&( Prefix + "_ExtraRunType" ) := "EXE"
SetProperty( "WinPSettings", "Text_ExtraRunCmd", "Value", &( Prefix + "_ExtraRunCmdEXE" ) + " " + &( Prefix + "_ExtraRunCmdEXEParm" ) )
case ExtraRun.ExtraRunSelectRadio.Value = 4
&( Prefix + "_ExtraRunType" ) := "FREE"
SetProperty( "WinPSettings", "Text_ExtraRunCmd", "Value", &( Prefix + "_ExtraRunCmdFREE" ) )
otherwise
&( Prefix + "_ExtraRunType" ) := "NONE"
SetProperty( "WinPSettings", "Text_ExtraRunCmd", "Value", "" )
endcase
if bTest
QPM_ExecuteExtraRun( .T. )
else
ExtraRun.Release()
endif
Return .T.
Function QPM_GetExtraRunOptions()
do case
case ExtraRun.ExtraRunSelectRadio.Value == 1
ExtraRun.ExtraRunQPMLabel.Enabled := .F.
ExtraRun.ExtraRunQPMRadio.Enabled := .F.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .F.
ExtraRun.ExtraRunQPM2Run.Enabled := .F.
ExtraRun.ExtraRunQPM2Exit.Enabled := .F.
ExtraRun.ExtraRunQPM2Clear.Enabled := .F.
ExtraRun.ExtraRunQPM2Log.Enabled := .F.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .F.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .F.
ExtraRun.ExtraRunQPM2Lite.Enabled := .F.
ExtraRun.ExtraRunQPMProjButton.Enabled := .F.
ExtraRun.ExtraRunQPMProjText.Enabled := .F.
ExtraRun.ExtraRunQPMProjLabel.Enabled := .F.
ExtraRun.ExtraRunExeLabel.Enabled := .F.
ExtraRun.ExtraRunExeText.Enabled := .F.
ExtraRun.ExtraRunExeParm.Enabled := .F.
ExtraRun.ExtraRunExeTextParm.Enabled := .F.
ExtraRun.ExtraRunExeWait.Enabled := .F.
ExtraRun.ExtraRunExePause.Enabled := .F.
ExtraRun.ExtraRunExeButton.Enabled := .F.
ExtraRun.ExtraRunFreeLabel.Enabled := .F.
ExtraRun.ExtraRunFreeText.Enabled := .F.
ExtraRun.ExtraRunFreeWait.Enabled := .F.
ExtraRun.ExtraRunFreePause.Enabled := .F.
case ExtraRun.ExtraRunSelectRadio.Value == 2
ExtraRun.ExtraRunQPMLabel.Enabled := .T.
ExtraRun.ExtraRunQPMRadio.Enabled := .T.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .T.
ExtraRun.ExtraRunQPM2Run.Enabled := .T.
ExtraRun.ExtraRunQPM2Exit.Enabled := .T.
ExtraRun.ExtraRunQPM2Clear.Enabled := .T.
ExtraRun.ExtraRunQPM2Log.Enabled := .T.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .T.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .T.
ExtraRun.ExtraRunQPM2Lite.Enabled := .T.
ExtraRun.ExtraRunQPMProjButton.Enabled := .T.
ExtraRun.ExtraRunQPMProjText.Enabled := .T.
ExtraRun.ExtraRunQPMProjLabel.Enabled := .T.
ExtraRun.ExtraRunExeLabel.Enabled := .F.
ExtraRun.ExtraRunExeText.Enabled := .F.
ExtraRun.ExtraRunExeParm.Enabled := .F.
ExtraRun.ExtraRunExeTextParm.Enabled := .F.
ExtraRun.ExtraRunExeWait.Enabled := .F.
ExtraRun.ExtraRunExePause.Enabled := .F.
ExtraRun.ExtraRunExeButton.Enabled := .F.
ExtraRun.ExtraRunFreeLabel.Enabled := .F.
ExtraRun.ExtraRunFreeText.Enabled := .F.
ExtraRun.ExtraRunFreeWait.Enabled := .F.
ExtraRun.ExtraRunFreePause.Enabled := .F.
case ExtraRun.ExtraRunSelectRadio.Value == 3
ExtraRun.ExtraRunQPMLabel.Enabled := .F.
ExtraRun.ExtraRunQPMRadio.Enabled := .F.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .F.
ExtraRun.ExtraRunQPM2Run.Enabled := .F.
ExtraRun.ExtraRunQPM2Exit.Enabled := .F.
ExtraRun.ExtraRunQPM2Clear.Enabled := .F.
ExtraRun.ExtraRunQPM2Log.Enabled := .F.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .F.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .F.
ExtraRun.ExtraRunQPM2Lite.Enabled := .F.
ExtraRun.ExtraRunQPMProjButton.Enabled := .F.
ExtraRun.ExtraRunQPMProjText.Enabled := .F.
ExtraRun.ExtraRunQPMProjLabel.Enabled := .F.
ExtraRun.ExtraRunExeLabel.Enabled := .T.
ExtraRun.ExtraRunExeText.Enabled := .T.
ExtraRun.ExtraRunExeParm.Enabled := .T.
ExtraRun.ExtraRunExeTextParm.Enabled := .T.
ExtraRun.ExtraRunExeWait.Enabled := .T.
ExtraRun.ExtraRunExePause.Enabled := if( Upper( US_FileNameOnlyExt( ExtraRun.ExtraRunExeText.Value ) ) == "EXE", .F., .T. )
//ExtraRun.ExtraRunExePause.Enabled := .T.
ExtraRun.ExtraRunExeButton.Enabled := .T.
ExtraRun.ExtraRunFreeLabel.Enabled := .F.
ExtraRun.ExtraRunFreeText.Enabled := .F.
ExtraRun.ExtraRunFreeWait.Enabled := .F.
ExtraRun.ExtraRunFreePause.Enabled := .F.
case ExtraRun.ExtraRunSelectRadio.Value == 4
ExtraRun.ExtraRunQPMLabel.Enabled := .F.
ExtraRun.ExtraRunQPMRadio.Enabled := .F.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .F.
ExtraRun.ExtraRunQPM2Run.Enabled := .F.
ExtraRun.ExtraRunQPM2Exit.Enabled := .F.
ExtraRun.ExtraRunQPM2Clear.Enabled := .F.
ExtraRun.ExtraRunQPM2Log.Enabled := .F.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .F.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .F.
ExtraRun.ExtraRunQPM2Lite.Enabled := .F.
ExtraRun.ExtraRunQPMProjButton.Enabled := .F.
ExtraRun.ExtraRunQPMProjText.Enabled := .F.
ExtraRun.ExtraRunQPMProjLabel.Enabled := .F.
ExtraRun.ExtraRunExeLabel.Enabled := .F.
ExtraRun.ExtraRunExeText.Enabled := .F.
ExtraRun.ExtraRunExeParm.Enabled := .F.
ExtraRun.ExtraRunExeTextParm.Enabled := .F.
ExtraRun.ExtraRunExeWait.Enabled := .F.
ExtraRun.ExtraRunExePause.Enabled := .F.
ExtraRun.ExtraRunExeButton.Enabled := .F.
ExtraRun.ExtraRunFreeLabel.Enabled := .T.
ExtraRun.ExtraRunFreeText.Enabled := .T.
ExtraRun.ExtraRunFreeWait.Enabled := .T.
ExtraRun.ExtraRunFreePause.Enabled := .T.
EndCase
QPM_GetExtraRunQPMSubOptions()
Return .T.
Function QPM_GetExtraRunQPMSubOptions()
if ExtraRun.ExtraRunSelectRadio.Value = 2
Do case
case ExtraRun.ExtraRunQPMRadio.Value == 1
ExtraRun.ExtraRunQPM2Lite.Enabled := .F.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .T.
ExtraRun.ExtraRunQPM2Run.Enabled := .F.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .F.
ExtraRun.ExtraRunQPM2Clear.Enabled := .F.
ExtraRun.ExtraRunQPM2Exit.Enabled := .F.
ExtraRun.ExtraRunQPM2Log.Enabled := .F.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .F.
case ExtraRun.ExtraRunQPMRadio.Value == 2
ExtraRun.ExtraRunQPM2Lite.Enabled := .T.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .T.
ExtraRun.ExtraRunQPM2Run.Enabled := .T.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .T.
ExtraRun.ExtraRunQPM2Clear.Enabled := .T.
ExtraRun.ExtraRunQPM2Exit.Enabled := .T.
ExtraRun.ExtraRunQPM2Log.Enabled := .T.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .T.
case ExtraRun.ExtraRunQPMRadio.Value == 3
ExtraRun.ExtraRunQPM2Lite.Enabled := .T.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .F.
ExtraRun.ExtraRunQPM2Run.Enabled := .F.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .F.
ExtraRun.ExtraRunQPM2Clear.Enabled := .T.
ExtraRun.ExtraRunQPM2Exit.Enabled := .T.
ExtraRun.ExtraRunQPM2Log.Enabled := .T.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .T.
case ExtraRun.ExtraRunQPMRadio.Value == 4
ExtraRun.ExtraRunQPM2Lite.Enabled := .T.
ExtraRun.ExtraRunQPM2ForceFull.Enabled := .T.
ExtraRun.ExtraRunQPM2Run.Enabled := .F.
ExtraRun.ExtraRunQPM2ButtonRun.Enabled := .F.
ExtraRun.ExtraRunQPM2Clear.Enabled := .F.
ExtraRun.ExtraRunQPM2Exit.Enabled := .T.
ExtraRun.ExtraRunQPM2Log.Enabled := .T.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .T.
endcase
QPM_GetExtraRunQPM2ExitOptions()
endif
Return .T.
Function QPM_GetExtraRunQPM2ExitOptions()
if ExtraRun.ExtraRunQPM2Exit.Value
if ExtraRun.ExtraRunQPM2Exit.Enabled
ExtraRun.ExtraRunQPM2Log.Enabled := .T.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .T.
endif
else
if ExtraRun.ExtraRunQPM2Exit.Enabled
ExtraRun.ExtraRunQPM2Log.Enabled := .F.
ExtraRun.ExtraRunQPM2LogOnlyError.Enabled := .F.
endif
endif
Return .T.
Function QPM_ExecuteExtraRun( bTest )
Local CurrentFolder := GetCurrentFolder()
Local Prefix, Memorun
DEFAULT bTest TO .F.
if bTest
Prefix := "Tst"
else
Prefix := "Prj"
endif
DirChange( PUB_cProjectFolder )
do case
case &( Prefix + "_ExtraRunType" ) == "QPM"
QPM_Execute( US_ShortName( ChgPathToReal( "<QPM>" ) ), ChgPathToReal( &( Prefix + "_ExtraRunProjQPM" ) ) + " " + ChgPathToReal( &( Prefix + "_ExtraRunCmdQPMParm" ) ) )
case &( Prefix + "_ExtraRunType" ) == "EXE"
do case
case Upper( US_FileNameOnlyExt( ChgPathToReal( &( Prefix + "_ExtraRunCmdEXE" ) ) ) ) == "EXE"
QPM_Execute( US_ShortName( ChgPathToReal( &( Prefix + "_ExtraRunCmdEXE" ) ) ), ChgPathToReal( &( Prefix + "_ExtraRunCmdEXEParm" ) ) )
case Upper( US_FileNameOnlyExt( ChgPathToReal( &( Prefix + "_ExtraRunCmdEXE" ) ) ) ) == "BAT"
MemoRun := US_ShortName( PUB_cProjectFolder ) + DEF_SLASH + "_" + PUB_cSecu + "ExtraRun.bat"
ferase( MemoRun )
QPM_MemoWrit( MemoRun, 'call "' + ChgPathToReal( &( Prefix + "_ExtraRunCmdEXE" ) ) + '" ' + ChgPathToReal( &( Prefix + "_ExtraRunCmdEXEParm" ) ) + if( &( Prefix + "_ExtraRunExePause" ), HB_OsNewLine() + "Pause", "" ) + HB_OsNewLine() + "del " + MemoRun )
QPM_Execute( MemoRun )
otherwise
endcase
case &( Prefix + "_ExtraRunType" ) == "FREE"
MemoRun := US_ShortName( PUB_cProjectFolder ) + DEF_SLASH + "_" + PUB_cSecu + "ExtraRun.bat"
ferase( MemoRun )
QPM_MemoWrit( MemoRun, ChgPathToReal( &( Prefix + "_ExtraRunCmdFREE" ) ) + if( &( Prefix + "_ExtraRunFreePause" ), HB_OsNewLine() + "Pause", "" ) + HB_OsNewLine() + "del " + MemoRun )
QPM_Execute( MemoRun )
endcase
DirChange( CurrentFolder )
Return .T.
/* eof */