/* REXX Script: creating WPS objects for sNOa's game */

call rxFuncAdd "SysLoadFuncs" , "RexxUtil" , "SysLoadFuncs"
call SysLoadFuncs

name = "Mars!"
exename = "mars.exe"
idname = "MARS_EXE"

Parse arg dir

if dir='' then dir = directory()

/* Games folder */
call SysCreateObject "WPFolder", "ˆ£àë", "<WP_PROGRAMSFOLDER>", "ICONVIEW=FLOWED;ICONRESOURCE=88 PMWP;ICONNRESOURCE=1,89,PMWP;HELPPANEL=13091;OBJECTID=<WP_GAMES>;OPEN=Default;", "Update"

/* sNOa's game */
if stream(dir||'\'||exename, 'C', 'QUERY EXISTS')\='' then
do
  rc=SysCreateObject("WPProgram", name, "<WP_GAMES>", "EXENAME="||dir||"\"||exename||";PROGTYPE=PM;OBJECTID="||idname, "replace")
end


