Changeset 1009


Ignore:
Timestamp:
Feb 1, 2017, 3:22:45 PM (8 years ago)
Author:
Alex Taylor
Message:

Enable use of different program name (for WPS objects, configuration files, etc.) if optional message is defined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/guitools/evfsgui/evfsgui.vrx

    r990 r1009  
    128128
    129129    /* OS Version */
    130     if VRFileExists(SysBootDrive()||"\SYS\ARCANOAE.FLG" ) then do
    131         OS = linein(SysBootDrive()||"\SYS\ARCANOAE.FLG")
     130    if VRFileExists(SysBootDrive()||"\SYS\INSTALL\INSTALL.FLG" ) then do
     131        OS = linein(SysBootDrive()||"\SYS\INSTALL\INSTALL.FLG")
    132132        OS = subword(OS,1,2) '('translate(word(OS,3))')'
    133         ok = stream(SysBootDrive()||"\SYS\ARCANOAE.FLG",'c','close')
     133        ok = stream(SysBootDrive()||"\SYS\INSTALL\INSTALL.FLG",'c','close')
    134134    end
    135135    else if VRFileExists(SysBootDrive()||"\ECS\ECS_INST.FLG" ) then do
     
    239239    /* GUI Version */
    240240    DummyRH = VRMethod('CN_About', 'AddRecord')
    241     ok = VRMethod("CN_ABOUT", "SetFieldData", DummyRH, About.DscFH, "EVFSGUI", About.ValFH, VRGet("Main", "HintText"))
    242     AboutStr = AboutStr||'0D0A'x||"EVFSGUI "||'09'x || VRGet("Main", "HintText")||BR
     241    ok = VRMethod("CN_ABOUT", "SetFieldData", DummyRH, About.DscFH, options.!appname_long, About.ValFH, VRGet("Main", "HintText"))
     242    AboutStr = AboutStr||'0D0A'x||"options.!appname_long "||'09'x || VRGet("Main", "HintText")||BR
    243243    call VRSet "SW_ABOUT", "Painting", 1
    244244return
     
    551551_CreateSmbConf:
    552552    if options.!debug == 1 then say time()' '||"_CreateSmbConf started"
    553     call lineout samba.!smbconf, '# Samba config file created using EVFSGUI ver. 'word(VRGet("Main","Hinttext"),2)
     553    call lineout samba.!smbconf, '# Samba config file created using' options.!appname_long 'ver. 'word(VRGet("Main","Hinttext"),2)
    554554    call lineout samba.!smbconf, '# from 'value("USER",,'OS2ENVIRONMENT')'@'value("HOSTNAME",,'OS2ENVIRONMENT')
    555555    call lineout samba.!smbconf, '# Date: 'date()' 'time()
     
    884884    inipath = VRParseFilePath( os2_ini, 'DP')
    885885    IF inipath == '' THEN inipath = SysBootDrive() || '\OS2'
    886     settings.!ini = inipath'\evfsgui.ini'
     886    settings.!ini = inipath'\'options.!appname_short'.INI'
    887887    drop os2_ini inipath
    888     if options.!debug == 1 then say '  EVFSGUI INIfile = "'settings.!ini'"'
     888    if options.!debug == 1 then say '  'options.!appname_long' INIfile = "'settings.!ini'"'
    889889
    890890    settings.!network = ""
     
    12601260        then xxx = "VX-REXX IDE: "strip(translate(word(sourceline(SIGL-1),4),'  ',"',"))
    12611261        else xxx = 'A'
    1262     call VRMessage 'Main', xxx' REXX function library DLL is missing or unloadable!', "EVFSGUI fatal error", "E"
     1262    call VRMessage 'Main', xxx' REXX function library DLL is missing or unloadable!', options.!appname_long "fatal error", "E"
    12631263    IF options.!debug == 1 then say time()' _LoadotherFuncs() error handler finished, program will be terminated.'
    12641264signal Quit
     
    16031603    options.!tracmark   = 0
    16041604
     1605    app_name_msg = NLVGetMessage( 0 )
     1606    IF app_name_msg == '' | WORD( app_name_msg, 1 ) == '[Missing' THEN
     1607        app_name_msg = 'EVFSGUI EVFSGUI'
     1608
     1609    /* These values are used in things like config files, WPS objects, etc.
     1610     */
     1611    options.!appname_short = TRANSLATE( SUBWORD( app_name_msg, 1, 1 ))
     1612    options.!appname_long = SUBWORD( app_name_msg, 2 )
     1613
    16051614    if options.!debug == 1 then say '  initializing vfs. '
    16061615    vfs.!drive      = ''
     
    18261835        ok = SysFileDelete(SysBootDrive()'\ndpsmb.dbg')
    18271836    else do
    1828         call lineout SysBootDrive()'\ndpsmb.dbg','EVFS debug flag file'
     1837        call lineout SysBootDrive()'\ndpsmb.dbg','NDPSMB debug flag file'
    18291838        ok = stream(SysBootDrive()'\ndpsmb.dbg','c','close')
    18301839    end
     
    28072816*/
    28082817Main_Create:
    2809     options.!debug    = 1
     2818    options.!debug    = 0
    28102819    if options.!debug == 1 then do
    28112820        ok = VRRedirectStdIO("ON")
     
    33273336    if ExeName = "" then do
    33283337        parse source . . script
    3329         ExeName = VRParseFilename(script,'DP')'\EVFSGUI.EXE'
     3338        ExeName = VRParseFilename(script,'DP')'\'options.!appname_short'.EXE'
    33303339    end
    33313340    StartupDir = VRParseFileName(VRget("Application","Program"),'DP')
     
    33513360            'CCVIEW=DEFAULT;'||,
    33523361            'DEFAULTVIEW=DEFAULT;'||,
    3353             'OBJECTID=<EVFSGUI_AUTOSTART>',,
     3362            'OBJECTID=<'options.!appname_short'_AUTOSTART>',,
    33543363        'REPLACE' )
    33553364
     
    33783387*/
    33793388Menu_File_Autostart_Deactivate_Click:
    3380     ok = SysDestroyObject("<EVFSGUI_AUTOSTART>")
     3389    ok = SysDestroyObject("<'options.!appname_short'_AUTOSTART>")
    33813390    IF ok == 1 THEN do
    33823391        Text = NLVGetMessage( 79 )
     
    48594868    CALL VRSet 'CB_TRAC', 'Set', options.!tracmark
    48604869
    4861     ok = VRSet("DT_About","Caption", Program' (c) 2007-2016 Alexander Taylor'||'0D0A'x||'and Herwig Bauernfeind for bww bitwise works GmbH.')
     4870    ok = VRSet("DT_About","Caption", Program' (c) 2007-2017 Alexander Taylor'||'0D0A'x||'and Herwig Bauernfeind for bww bitwise works GmbH.')
    48624871
    48634872    About.DscFH  = VRMethod( "CN_ABOUT", "AddField", "String", "Component" )
Note: See TracChangeset for help on using the changeset viewer.