home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 11 Util / 11-Util.zip / ku.zip / INSTALL.VRX < prev    next >
Text File  |  1993-10-26  |  3KB  |  142 lines

  1. /*:VRX         Main
  2. */
  3. /*  Main
  4. */
  5. Main:
  6. /*  Process the arguments.
  7.     Get the parent window.
  8. */
  9.     parse source . calledAs .
  10.     parent = ""
  11.     argCount = arg()
  12.     argOff = 0
  13.     if( calledAs \= "COMMAND" )then do
  14.         if argCount >= 1 then do
  15.             parent = arg(1)
  16.             argCount = argCount - 1
  17.             argOff = 1
  18.         end
  19.     end
  20.     InitArgs.0 = argCount
  21.     if( argCount > 0 )then do i = 1 to argCount
  22.         InitArgs.i = arg( i + argOff )
  23.     end
  24.     drop calledAs argCount argOff
  25.  
  26. /*  Load the windows
  27. */
  28.     call VRInit
  29.     parse source . . spec
  30.     _VREPrimaryWindowPath = ,
  31.         VRParseFileName( spec, "dpn" ) || ".VRW"
  32.     _VREPrimaryWindow = ,
  33.         VRLoad( parent, _VREPrimaryWindowPath )
  34.     drop parent spec
  35.     if( _VREPrimaryWindow == "" )then do
  36.         call VRMessage "", "Cannot load window:" VRError(), ,
  37.             "Error!"
  38.         _VREReturnValue = 32000
  39.         signal _VRELeaveMain
  40.     end
  41.  
  42. /*  Process events
  43. */
  44.     call Init
  45.     signal on halt
  46.     do while( \ VRGet( _VREPrimaryWindow, "Shutdown" ) )
  47.         _VREEvent = VREvent()
  48.         interpret _VREEvent
  49.     end
  50. _VREHalt:
  51.     _VREReturnValue = Fini()
  52.     call VRDestroy _VREPrimaryWindow
  53. _VRELeaveMain:
  54.     call VRFini
  55. exit _VREReturnValue
  56.  
  57. VRLoadSecondary: procedure
  58.     name = arg( 1 )
  59.  
  60.     window = VRLoad( VRWindow(), VRWindowPath(), name )
  61.     call VRMethod window, "CenterWindow"
  62.     call VRSet window, "Visible", 1
  63.     call VRMethod window, "Activate"
  64. return window
  65.  
  66. /*:VRX         Fini
  67. */
  68. Fini:
  69.     window = VRWindow()
  70.     call VRSet window, "Visible", 0
  71.     drop window
  72. return 0
  73.  
  74. /*:VRX         Halt
  75. */
  76. Halt:
  77.     signal _VREHalt
  78. return
  79.  
  80. /*:VRX         Init
  81. */
  82. Init:
  83.     window = VRWindow()
  84.     call VRMethod window, "CenterWindow"
  85.     call VRSet window, "Visible", 1
  86.     call VRMethod window, "Activate"
  87.     drop window
  88. return
  89.  
  90. /*:VRX         PB_1_Click
  91. */
  92. PB_1_Click:
  93. call VRMkDir "c:\ku"
  94. ok = VRCopyFile("a:\*.*","c:\ku")
  95. ok = VRMessage( Install, "Setup is Complete.", "Install", Information)
  96. ok = VRMessage( Install, "Please Use OS/2 Migrate Applacitons to Setup Icon.", "Thanks", Warning)
  97.  
  98. return
  99.  
  100. /*:VRX         PB_2_Click
  101. */
  102. PB_2_Click:
  103. call VRMkDir "d:\ku"
  104. ok = VRCopyFile("a:\*.*","d:\ku")
  105. ok = VRMessage( Install, "Setup is Complete.", "Install", Information)
  106. ok = VRMessage( Install, "Please Use OS/2 Migrate Applacitons to Setup Icon.", "Thanks", Warning)
  107.  
  108. return
  109.  
  110. /*:VRX         PB_3_Click
  111. */
  112. PB_3_Click:
  113. call VRMkDir "c:\ku"
  114. ok = VRCopyFile("b:\*.*","c:\ku")
  115. ok = VRMessage( Install, "Setup is Complete.", "Install", Information)
  116. ok = VRMessage( Install, "Please Use OS/2 Migrate Applacitons to Setup Icon.", "Thanks", Warning)
  117.  
  118. return/*:VRX         PB_4_Click
  119. */
  120. PB_4_Click:
  121. call VRMkDir "d:\ku"
  122. ok = VRCopyFile("b:\*.*","d:\ku")
  123. ok = VRMessage( Install, "Setup is Complete.", "Install", Information)
  124. ok = VRMessage( Install, "Please Use OS/2 Migrate Applacitons to Setup Icon.", "Thanks", Warning)
  125.  
  126. return
  127.  
  128. /*:VRX         Quit
  129. */
  130. Quit:
  131.     window = VRWindow()
  132.     call VRSet window, "Shutdown", 1
  133.     drop window
  134. return
  135.  
  136. /*:VRX         Window1_Close
  137. */
  138. Window1_Close:
  139.     call Quit
  140. return
  141.  
  142.