[r9173]: ooDialog / trunk / install / ooDialog.nsi  Maximize  Restore  History

Download this file

881 lines (722 with data), 36.0 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
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
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
/*----------------------------------------------------------------------------*/
/* */
/* Copyright (c) 2010-2013 Rexx Language Association. All rights reserved. */
/* */
/* This program and the accompanying materials are made available under */
/* the terms of the Common Public License v1.0 which accompanies this */
/* distribution. A copy is also available at the following address: */
/* http://www.oorexx.org/license.html */
/* */
/* Redistribution and use in source and binary forms, with or */
/* without modification, are permitted provided that the following */
/* conditions are met: */
/* */
/* Redistributions of source code must retain the above copyright */
/* notice, this list of conditions and the following disclaimer. */
/* Redistributions in binary form must reproduce the above copyright */
/* notice, this list of conditions and the following disclaimer in */
/* the documentation and/or other materials provided with the distribution. */
/* */
/* Neither the name of Rexx Language Association nor the names */
/* of its contributors may be used to endorse or promote products */
/* derived from this software without specific prior written permission. */
/* */
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
/* */
/*----------------------------------------------------------------------------*/
/**
* ooDialog.nsi
*
* This is a basic NSIS install program, used to install ooDialog over the top
* of an ooRexx installation.
*
* Run as:
* makensis /DVERSION=x.x.x.x /DSHORTVERSION=x.x.x /DROOTDIR=yyy /DOUTDIR=xxx /DCPU=zzz /DDEBUG ooDialog.nsi
* eg
* makensis /DVERSION=4.2.0.6367 /DSHORTVERSION=4.2.0 /DROOTDIR=C:\work\wc\ooDialog\trunk
* /DOUTDIR=C:\work\wc\ooDialog\trunk\Win32Rel /DCPU=x86_32 /DDEBUGPKG=-debug ooDialog.nsi
*
* Note:
* ooDialog.nsi must be in the current directory.
*/
;===============================================================================
;Configuration
;===============================================================================
;--------------------------------
; Defines
!define LONGNAME "ooDialog ${VERSION} (beta)" ; Our long name
!define SHORTNAME "ooDialog" ; Our short name
!define DISPLAYICON "$INSTDIR\ooDialog.dll,2" ; Use the ooDialog icon, the OOD icon
!define REXXSHORTNAME "ooRexx" ; From ooRexx installer.
!define REXXLONGNAME "Open Object Rexx" ; From ooRexx installer
!define SMooRexxFolder "$SMPROGRAMS\${REXXLONGNAME}"
!define SrcDir "${ROOTDIR}\oodialog"
!Define BinDir "${OUTDIR}"
!define ExamplesDir "${ROOTDIR}\examples"
;--------------------------------
;Includes
!include "MUI2.nsh"
!include "Library.nsh"
!include "LogicLib.nsh"
!include "WinVer.nsh"
!include "FileFunc.nsh"
!include "WordFunc.nsh"
!include "admin.nsh"
;--------------------------------
;General
Name "ooDialog ${VERSION}"
OutFile "ooDialog-${VERSION}-${CPU}${DEBUGPKG}.exe"
ShowInstdetails show
SetOverwrite on
SetPluginUnload alwaysoff
RequestExecutionLevel admin
InstallDir "$PROGRAMFILES\ooRexx"
;--------------------------------
;Interface Settings
!define MUI_ICON "${ROOTDIR}\ooDialog\AppIcon2.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "orange.bmp"
!define MUI_LICENSEPAGE
!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_ABORTWARNING
;--------------------------------
; Variables
/* The uninstall program for ooRexx is always placed in the ooRexx
* installation directory. This makes the uninstall location equivalent to
* the install location.
*/
Var RegVal_installedLocation ; location of ooRexx uninstall program found in registry
Var IsAdminUser ; is the installer being run by an admin: true / false
Var ooRexxVersion ; Discovered ooRexx version
Var isMinimumRequiredRexx ; Installed ooRexx meets minimum required for this version of ooDialog true / false
Var installerProblemIntro ; First sentence when the installer detects a file can not be deleted, i.e. oodialog.dll
;--------------------------------
;Pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${ROOTDIR}\install\CPLv1.0.txt"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;===============================================================================
;Installer Sections
;===============================================================================
Section doInstall
DetailPrint "********** Installing ooDialog **********"
DetailPrint ""
Call RemoveFiles
; Install the files
SetOutPath "$INSTDIR"
DetailPrint "********** ooDialog ${SHORTVERSION} Framework **********"
File "${BinDir}\ooDialog.cls"
File "${BinDir}\ooDialog.com"
File "${BinDir}\oodialog.dll"
File "${BinDir}\ooDialog.exe"
File "${BinDir}\oodPlain.cls"
File "${BinDir}\oodWin32.cls"
DetailPrint ""
DetailPrint "********** ooDialog ${SHORTVERSION} ooRexxTry **********"
File "${ExamplesDir}\ooRexxTry\ooRexxTry.rex"
CreateShortCut "${SMooRexxFolder}\Try Rexx (GUI).lnk" "$INSTDIR\rexx.exe" '"$INSTDIR\ooRexxTry.rex"' "$INSTDIR\rexx.exe"
DetailPrint ""
DetailPrint "********** ooDialog ${SHORTVERSION} Documentation **********"
; Set the installation directory:
SetOutPath $INSTDIR\doc
; Add the files ...
File "${ROOTDIR}\doc\oodialog.pdf"
File "${ROOTDIR}\doc\oodguide.pdf"
File "${ROOTDIR}\doc\ooDialog_ReleaseNotes.txt"
File "${ExamplesDir}\ooRexxTry\doc\ooRexxTry.pdf"
CreateShortCut "${SMooRexxFolder}\Documentation\ooDialog Reference.lnk" "$INSTDIR\doc\oodialog.pdf" "" "$INSTDIR\doc\oodialog.pdf" 0
CreateShortCut "${SMooRexxFolder}\Documentation\ooDialog User Guide.lnk" "$INSTDIR\doc\oodguide.pdf" "" "$INSTDIR\doc\oodguide.pdf" 0
CreateShortCut "${SMooRexxFolder}\Documentation\ooDialog Release Notes.lnk" "$INSTDIR\doc\ooDialog_ReleaseNotes.txt" "" "$INSTDIR\doc\ooDialog_ReleaseNotes.txt" 0
CreateShortCut "${SMooRexxFolder}\Documentation\ooRexxTry Reference.lnk" "$INSTDIR\doc\ooRexxTry.pdf" "" "$INSTDIR\doc\ooRexxTry.pdf" 0
DetailPrint ""
DetailPrint "********** ooDialog ${SHORTVERSION} Samples **********"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog
; Add the files ...
File "${SrcDir}\oodialog.ico"
File "${ExamplesDir}\*.rex"
File "${ExamplesDir}\*.h"
File "${ExamplesDir}\*.ico"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\bmp
; Add the files ...
File "${ExamplesDir}\bmp\*.bmp"
File "${ExamplesDir}\bmp\*.ico"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls
; Add the files ...
File "${ExamplesDir}\controls\*.rex"
File "${ExamplesDir}\controls\*.rc"
File "${ExamplesDir}\controls\*.h"
File "${ExamplesDir}\controls\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls\ListView
; Add the files ...
File "${ExamplesDir}\controls\ListView\*.rex"
File "${ExamplesDir}\controls\ListView\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls\ListView\rc
; Add the files ...
File "${ExamplesDir}\controls\ListView\rc\*.rc"
File "${ExamplesDir}\controls\ListView\rc\*.h"
File "${ExamplesDir}\controls\ListView\rc\*.bmp"
File "${ExamplesDir}\controls\ListView\rc\*.dll"
File "${ExamplesDir}\controls\ListView\rc\res.mak"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls\ListView\subitem.editing
; Add the files ...
File "${ExamplesDir}\controls\ListView\subitem.editing\*.rex"
File "${ExamplesDir}\controls\ListView\subitem.editing\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls\ToolTip
; Add the files ...
File "${ExamplesDir}\controls\ToolTip\*.rex"
File "${ExamplesDir}\controls\ToolTip\*.rc"
File "${ExamplesDir}\controls\ToolTip\*.h"
File "${ExamplesDir}\controls\ToolTip\*.ico"
File "${ExamplesDir}\controls\ToolTip\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls\TreeView
; Add the files ...
File "${ExamplesDir}\controls\TreeView\*.rex"
File "${ExamplesDir}\controls\TreeView\*.inp"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\controls\TreeView\rc
; Add the files ...
File "${ExamplesDir}\controls\TreeView\rc\*.rc"
File "${ExamplesDir}\controls\TreeView\rc\*.h"
File "${ExamplesDir}\controls\TreeView\rc\*.bmp"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\examples
; Add the files ...
File "${ExamplesDir}\examples\*.rex"
File "${ExamplesDir}\examples\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\examples\resources
; Add the files ...
File "${ExamplesDir}\examples\resources\*.bmp"
File "${ExamplesDir}\examples\resources\*.h"
File "${ExamplesDir}\examples\resources\*.rc"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\menus
; Add the files ...
File "${ExamplesDir}\menus\*.rex"
File "${ExamplesDir}\menus\*.h"
File "${ExamplesDir}\menus\*.bmp"
File "${ExamplesDir}\menus\*.rc"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\mouse
; Add the files ...
File "${ExamplesDir}\mouse\*.rex"
File "${ExamplesDir}\mouse\*.h"
File "${ExamplesDir}\mouse\*.rc"
File "${ExamplesDir}\mouse\*.cur"
File "${ExamplesDir}\mouse\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\oleinfo
; Add the files ...
File "${ExamplesDir}\oleinfo\*.rex"
File "${ExamplesDir}\oleinfo\*.txt"
File "${ExamplesDir}\oleinfo\*.bmp"
File "${ExamplesDir}\oleinfo\*.rc"
SetOutPath $INSTDIR\samples\oodialog\ooRexxTry
; Add the files ...
File "${ExamplesDir}\ooRexxTry\ooRexxTry.rex"
SetOutPath $INSTDIR\samples\oodialog\ooRexxTry\doc
; Add the files ...
File "${ExamplesDir}\ooRexxTry\doc\ooRexxTry.pdf"
SetOutPath $INSTDIR\samples\oodialog\propertySheet.tabControls
; Add the files ...
File "${ExamplesDir}\propertySheet.tabControls\*.cls"
File "${ExamplesDir}\propertySheet.tabControls\oodListViews.rex"
File "${ExamplesDir}\propertySheet.tabControls\PropertySheetDemo.rex"
File "${ExamplesDir}\propertySheet.tabControls\TabDemo.rex"
; File "${ExamplesDir}\propertySheet.tabControls\TabOwnerDemo.rex" ; Do not expose this example yet
File "${ExamplesDir}\propertySheet.tabControls\ticketWizard.rex"
File "${ExamplesDir}\propertySheet.tabControls\UserTabDemo.rex"
SetOutPath $INSTDIR\samples\oodialog\propertySheet.tabControls\rc
; Add the files ...
File "${ExamplesDir}\propertySheet.tabControls\rc\oodListViews*"
File "${ExamplesDir}\propertySheet.tabControls\rc\PropertySheetDemo*"
; File "${ExamplesDir}\propertySheet.tabControls\rc\TabOwnerDemo*" ; Do not expose this example yet
File "${ExamplesDir}\propertySheet.tabControls\rc\ticketWizard*"
File "${ExamplesDir}\propertySheet.tabControls\rc\UserTabDemo.h"
; File "${ExamplesDir}\propertySheet.tabControls\rc\UserTabDemo.rc" ; Do not included in distribution, maybe in the future.
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\rc
; Add the files ...
File "${ExamplesDir}\rc\*.rc"
File "${ExamplesDir}\rc\*.h"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\res
; Add the files ...
File "${ExamplesDir}\res\*.dll"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\resizableDialogs
; Add the files ...
File "${ExamplesDir}\resizableDialogs\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\resizableDialogs\DialogAreaU
; Add the files ...
File "${ExamplesDir}\resizableDialogs\DialogAreaU\*.h"
File "${ExamplesDir}\resizableDialogs\DialogAreaU\*.rex"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\resizableDialogs\ResizingAdmin
; Add the files ...
File "${ExamplesDir}\resizableDialogs\ResizingAdmin\*.cls"
File "${ExamplesDir}\resizableDialogs\ResizingAdmin\*.rex"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\resizableDialogs\ResizingAdmin\rc
; Add the files ...
File "${ExamplesDir}\resizableDialogs\ResizingAdmin\rc\*.bmp"
File "${ExamplesDir}\resizableDialogs\ResizingAdmin\rc\*.dll"
File "${ExamplesDir}\resizableDialogs\ResizingAdmin\rc\*.h"
File "${ExamplesDir}\resizableDialogs\ResizingAdmin\rc\*.rc"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\simple
; Add the files ...
File "${ExamplesDir}\simple\*.h"
File "${ExamplesDir}\simple\*.rc"
File "${ExamplesDir}\simple\*.rex"
File "${ExamplesDir}\simple\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\sysinfo
; Add the files ...
File "${ExamplesDir}\sysinfo\*.h"
File "${ExamplesDir}\sysinfo\*.rex"
File "${ExamplesDir}\sysinfo\*.rc"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\source
; Add the files ...
File "${BinDir}\ooDialog.cls"
File "${BinDir}\oodWin32.cls"
File "${BinDir}\oodPlain.cls"
File "${SrcDir}\0_READ_ME_FIRST.txt"
File "${SrcDir}\build_ooDialog_cls.rex"
File "${SrcDir}\AnimatedButton.cls"
File "${SrcDir}\BaseDialog.cls"
File "${SrcDir}\ControlDialog.cls"
File "${SrcDir}\DeprecatedClasses.cls"
File "${SrcDir}\DialogControls.cls"
File "${SrcDir}\DialogExtensions.cls"
File "${SrcDir}\DynamicDialog.cls"
File "${SrcDir}\EventNotification.cls"
File "${SrcDir}\ListView.cls"
File "${SrcDir}\Menu.cls"
File "${SrcDir}\PlainBaseDialog.cls"
File "${SrcDir}\RcDialog.cls"
File "${SrcDir}\ResDialog.cls"
File "${SrcDir}\TreeView.cls"
File "${SrcDir}\UserDialog.cls"
File "${SrcDir}\UtilityClasses.cls"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\tutorial
; Add the files ...
File "${ExamplesDir}\tutorial\*.rex"
File "${ExamplesDir}\tutorial\*.bmp"
File "${ExamplesDir}\tutorial\*.rc"
File "${ExamplesDir}\tutorial\*.h"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\userGuide
; Add the files ...
File "${ExamplesDir}\userGuide\*.txt"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise02
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise02\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise03
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise03\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise04
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise04\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise04\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise04\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise05
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise05\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise05\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise05\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise05\res
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise05\res\res.mak"
File "${ExamplesDir}\userGuide\exercises\Exercise05\res\ProductView.dll"
File "${ExamplesDir}\userGuide\exercises\Exercise05\res\ProductIcon.bmp"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Customer
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Customer\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Customer\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Customer\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Customer\bmp
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Customer\bmp\*.ico"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Customer\bmp\*.bmp"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Order
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Order\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Order\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Order\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Order\bmp
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Order\bmp\*.ico"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Order\bmp\*.bmp"
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\OrderMgr
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\OrderMgr\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise06\OrderMgr\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise06\OrderMgr\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Product
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Product\res
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\res\*.ico"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\res\*.bmp"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\res\*.dll"
File "${ExamplesDir}\userGuide\exercises\Exercise06\Product\res\res.mak"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise06\Support
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise06\Support\*.cls"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Customer
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Customer\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Customer\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Customer\*.rex"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Customer\*.txt"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Customer\bmp
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Customer\bmp\*.ico"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Customer\bmp\*.bmp"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Order
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Order\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Order\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Order\*.rex"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Order\*.txt"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Order\bmp
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Order\bmp\*.ico"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Order\bmp\*.bmp"
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\OrderMgr
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\OrderMgr\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise07\OrderMgr\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise07\OrderMgr\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Product
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\*.rex"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\*.txt"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Product\res
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\res\*.ico"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\res\*.bmp"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\res\*.dll"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Product\res\res.mak"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Exercise07\Support
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Exercise07\Support\*.cls"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Support\*.h"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Support\*.rc"
File "${ExamplesDir}\userGuide\exercises\Exercise07\Support\*.rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Samples
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Samples\ReadMe.txt"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Samples\DlgData
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Samples\DlgData\*.h"
File "${ExamplesDir}\userGuide\exercises\Samples\DlgData\*.rc"
File "${ExamplesDir}\userGuide\exercises\Samples\DlgData\*rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Samples\DlgData\res
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Samples\DlgData\res\res.mak"
File "${ExamplesDir}\userGuide\exercises\Samples\DlgData\res\ASimpleDialog.dll"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Samples\Person
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Samples\Person\*.h"
File "${ExamplesDir}\userGuide\exercises\Samples\Person\*.rc"
File "${ExamplesDir}\userGuide\exercises\Samples\Person\*.rex"
File "${ExamplesDir}\userGuide\exercises\Samples\Person\*.txt"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Samples\Popups
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Samples\Popups\*rex"
; Set output path to the installation directory.
SetOutPath $INSTDIR\samples\oodialog\userGuide\exercises\Samples\Wow4
; Add the files ...
File "${ExamplesDir}\userGuide\exercises\Samples\Wow4\*.rex"
File "${ExamplesDir}\userGuide\exercises\Samples\Wow4\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\wav
; Add the files ...
File "${ExamplesDir}\wav\*.wav"
File "${ExamplesDir}\wav\*.txt"
; Set the installation directory:
SetOutPath $INSTDIR\samples\oodialog\winsystem
File "${ExamplesDir}\winsystem\*.rex"
File "${ExamplesDir}\winsystem\*.rc"
File "${ExamplesDir}\winsystem\*.h"
File "${ExamplesDir}\winsystem\*.frm"
DetailPrint ""
; Create start menu shortcuts
DetailPrint "********** ooDialog 4.2.2 Start Menu Shortcuts **********"
CreateShortCut "${SMooRexxFolder}\${REXXSHORTNAME} Samples\Display Event Log.lnk" "$INSTDIR\rexxpaws.exe" '"$INSTDIR\samples\oodialog\winsystem\eventlog.rex"' "$INSTDIR\rexx.exe"
CreateShortCut "${SMooRexxFolder}\${REXXSHORTNAME} Samples\Windows Manager.lnk" "$INSTDIR\rexxhide.exe" '"$INSTDIR\samples\oodialog\winsystem\usewmgr.rex"' "$INSTDIR\rexx.exe"
CreateDirectory "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog"
CreateShortCut "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\Samples.lnk" "$INSTDIR\rexxhide.exe" '"$INSTDIR\samples\oodialog\sample.rex"' "$INSTDIR\samples\oodialog\oodialog.ico"
CreateShortCut "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\Calculator.lnk" "$INSTDIR\rexxhide.exe" '"$INSTDIR\samples\oodialog\calculator.rex"' "$INSTDIR\samples\oodialog\oodialog.ico"
CreateShortCut "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\Change Editor.lnk" "$INSTDIR\rexxhide.exe" '"$INSTDIR\samples\oodialog\editrex.rex"' "$INSTDIR\samples\oodialog\oodialog.ico"
CreateShortCut "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\FTYPE Changer.lnk" "$INSTDIR\rexxhide.exe" '"$INSTDIR\samples\oodialog\ftyperex.rex"' "$INSTDIR\samples\oodialog\oodialog.ico"
DetailPrint ""
SectionEnd
;===============================================================================
;Installer Functions
;===============================================================================
/** .onInit() Call back function
*
* Called by the installer before any page is shown. We use it to ensure
* ooRexx is installed and the correct version level.
*
* ooRexx needs to be at least 4.1.0. Since 4.1.0 was the first version where
* the UninstallVersion was used, we only need to check if that registry entry
* is the empty string or not.
*/
Function .onInit
; See if the installee is an admin.
Call IsUserAdmin
Pop $IsAdminUser
${if} $IsAdminUser == "true"
SetShellVarContext all
${endif}
ReadRegStr $RegVal_installedLocation HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${REXXSHORTNAME}" "UnInstallLocation"
${if} $RegVal_installedLocation == ""
Call WrongRexxVersion
Abort
${endif}
StrCpy $INSTDIR $RegVal_installedLocation
Call DetermineRexxVersion
${if} $isMinimumRequiredRexx == "false"
Call WrongRexxVersion
Abort
${endif}
Call CheckForProblems
FunctionEnd
/** WrongRexxVersion()
*
* Puts up a generic message box stating that ooRexx needs to be installed and
* at least XX version.
*/
Function WrongRexxVersion
${if} $RegVal_installedLocation == ""
MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST \
"A version of ooRexx, greater than or equal to$\n\
version 4.1.0, must be installed prior to the$\n\
installation of ${LONGNAME}.$\n$\n\
The installer can not detect any installed ooRexx.$\n$\n\
The installer is aborting."
${else}
MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST \
"A version of ooRexx, greater than or equal to$\n\
version 4.1.0, must be installed prior to the$\n\
installation of ${LONGNAME}.$\n$\n\
The installed ooRexx appears to be $ooRexxVersion.$\n$\n\
The installer is aborting."
${endif}
FunctionEnd
/** InstallerProblem()
*
* Puts up a generic message box stating that the intaller detected a problem
*/
Function InstallerProblem
MessageBox MB_OK|MB_ICONEXCLAMATION|MB_TOPMOST \
"$installerProblemIntro\
You MUST close the ooDialog reference documentation and close$\n\
any running ooDialog programs before executing the ooDialog$\n\
installation program.$\n$\n\
The ooDialog installer is aborting.$\n$\n\
After the installer closes, please close any running$\n\
ooDialog programs and make sure all the ooDialog$\n\
documentation is closed, then retry the installation."
FunctionEnd
/** DeterminRexxVersion()
*
*
*
*/
Function DetermineRexxVersion
GetDllVersion "$INSTDIR\rexx.dll" $R0 $R1
IntOp $R2 $R0 / 0x00010000
IntOp $R3 $R0 & 0x0000FFFF
IntOp $R4 $R1 / 0x00010000
IntOp $R5 $R1 & 0x0000FFFF
StrCpy $ooRexxVersion "$R2.$R3.$R4.$R5"
${If} $R2 >= 4
${AndIf} $R3 >= 1
StrCpy $isMinimumRequiredRexx "true"
${Else}
StrCpy $isMinimumRequiredRexx "false"
${EndIf}
FunctionEnd
/** CheckForProblems()
*
* If the ooDialog doc is open, it can not be overwritten. Or, if a Rexx
* ooDialog program is running, oodialog.dll can not be overwritten. This will
* prevent a clean install.
*
* We check for this possible problem by trying to delete the files. If we
* can not, we abort, keeping the current version intact.
*/
Function CheckForProblems
ClearErrors
CopyFiles /SILENT $INSTDIR\doc\oodialog.pdf $INSTDIR\doc\oodialogTest.pdf
${If} ${Errors}
StrCpy $installerProblemIntro "The installer detected a problem trying to copy oodialog.pdf$\n$\n"
Call InstallerProblem
; ooDialog.pdf was not copied, we don't need to do anything before
; aborting.
Abort
${EndIf}
ClearErrors
Delete $INSTDIR\doc\oodialog.pdf
${If} ${Errors}
StrCpy $installerProblemIntro "The installer detected a problem with oodialog.pdf$\n$\n"
Call InstallerProblem
; ooDialog.pdf was not deleted, we just need to delete the copy.
Delete $INSTDIR\doc\oodialogTest.pdf
Abort
${EndIf}
; ooDialog.pdf was deleted, we rename the copy to keep things clean
Rename $INSTDIR\doc\oodialogTest.pdf $INSTDIR\doc\oodialog.pdf
; We check oodguide.pdf also, but it may not exist.
${If} ${FileExists} $INSTDIR\doc\oodguide.pdf
ClearErrors
CopyFiles /SILENT $INSTDIR\doc\oodguide.pdf $INSTDIR\doc\oodguideTest.pdf
${If} ${Errors}
StrCpy $installerProblemIntro "The installer detected a problem trying to copy oodguide.pdf$\n$\n"
Call InstallerProblem
; oodguide.pdf was not copied, we don't need to do anything before
; aborting.
Abort
${EndIf}
ClearErrors
Delete $INSTDIR\doc\oodguide.pdf
${If} ${Errors}
StrCpy $installerProblemIntro "The installer detected a problem with oodguide.pdf$\n$\n"
Call InstallerProblem
; oodguide.pdf was not deleted, we just need to delete the copy.
Delete $INSTDIR\doc\oodguideTest.pdf
Abort
${EndIf}
; oodguide.pdf was deleted, we rename the copy to keep things clean
Rename $INSTDIR\doc\oodguideTest.pdf $INSTDIR\doc\oodguide.pdf
${EndIf}
ClearErrors
CopyFiles /SILENT $INSTDIR\oodialog.dll $INSTDIR\oodialogTest.dll
${If} ${Errors}
StrCpy $installerProblemIntro "The installer detected a problem trying to copy oodialog.dll$\n$\n"
Call InstallerProblem
; oodialog.dll was not copied, we don't need to do anything before
; aborting.
Abort
${EndIf}
ClearErrors
Delete $INSTDIR\oodialog.dll
${If} ${Errors}
StrCpy $installerProblemIntro "The installer detected a problem with oodialog.dll$\n$\n"
Call InstallerProblem
; oodialog.dll was not deleted, we just need to delete the copy.
Delete $INSTDIR\oodialogTest.dll
Abort
${EndIf}
; ooDialog.dll was deleted, we rename the copy to keep things clean
Rename $INSTDIR\oodialogTest.dll $INSTDIR\oodialog.dll
FunctionEnd
/** RemoveFiles()
*
* Deletes all the files of the current ooDialog version. Note that deleting a
* non-existent file does not raise an alarm in the installer, so we just go
* ahead and delete things that might, or might not, be there without worrying
* about it.
*/
Function RemoveFiles
DetailPrint ""
DetailPrint "Removing current ooDialog"
; We probably do not need to delete these files, we could just over-write
; them
Delete $INSTDIR\oodialog.dll
Delete $INSTDIR\ooDialog.cls
Delete $INSTDIR\oodPlain.cls
Delete $INSTDIR\oodWin32.cls
Delete $INSTDIR\ooRexxTry.rex
Delete $INSTDIR\doc\oodguide.pdf
Delete $INSTDIR\doc\oodialog.pdf
Delete $INSTDIR\doc\ooRexxTry.pdf
; For the examples just delete the whole tree.
RMDir /r $INSTDIR\samples\oodialog
; For the short cuts, we delete any known short cut created in any 4.0.0 or
; later installation. Each independent ooDialog installation will create all
; relevant short cuts for that installation.
DetailPrint "Removing ooDialog Start Menu short cuts"
Delete "${SMooRexxFolder}\Try Rexx (GUI).lnk"
Delete "${SMooRexxFolder}\Documentation\ooRexx ooDialog Method Reference.lnk"
Delete "${SMooRexxFolder}\Documentation\ooRexx ooDialog Reference.lnk"
Delete "${SMooRexxFolder}\Documentation\ooRexx ooDialog User Guide.lnk"
Delete "${SMooRexxFolder}\Documentation\ooDialog Reference.lnk"
Delete "${SMooRexxFolder}\Documentation\ooDialog User Guide.lnk"
Delete "${SMooRexxFolder}\Documentation\ooRexxTry Reference.lnk"
Delete "${SMooRexxFolder}\${REXXSHORTNAME} Samples\Display Event Log.lnk"
Delete "${SMooRexxFolder}\${REXXSHORTNAME} Samples\Windows Manager.lnk"
Delete "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\Samples.lnk"
Delete "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\Calculator.lnk"
Delete "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\Change Editor.lnk"
Delete "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog\FTYPE Changer.lnk"
RMDir /r "${SMooRexxFolder}\${REXXSHORTNAME} Samples\ooDialog"
DetailPrint ""
FunctionEnd

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks