Uniface User Forum

 View Only
  • 1.  $RESOURCES_OUTPUT and UAR

    Posted 02-14-2022 10:17
    Edited by Osman Shariff 02-14-2022 10:18
    Hi All

    I am looking at deployment and have a basic question.

    I would like to have a directory of frms's (and aps, msg etc )so I can see when things got compiled.
    I would also like to compile a frm in the ide... then check it in the deployment(uniface.exe).
    nothing too demanding... so far...

    The problem I have is that my ide.asn can be 
    $RESOURCES_OUTPUT = .\resources\Myapp.uar  ;;;; create for deployment
    or
    $RESOURCES_OUTPUT = .\resources ;;; compile a frm to a .frm

    I think I want the both of them... or I want to run uniface.exe without using the uar(just accessing the compiled frm's)

    is it possible to call uniface.exe without a uar... or is it possible to generate a compiled object and update the uar at the same time.

    At the moment, I would need ide.asn and ideGenUar.asn and run ideGenUar.asn before running uniface.exe(for the deployment).
    Hope that made sense.





    ------------------------------
    Thanks
    Osman Shariff
    ------------------------------


  • 2.  RE: $RESOURCES_OUTPUT and UAR

    PARTNER
    Posted 02-15-2022 04:10
    You can build a development system using both
    $resources_output$=resources
    and 
    [RESOURCES]
    resources
    in the ide and runtime asns and it will function properly (so uniface.exe will run with folder-based resources). 
    You could, in fact, choose to deploy the system using this structure. You can also use the compiled code here to build a deployment UAR using either the URM (/copy) or even a zip tool (windows compressed folders, winzip). 
    We use this hybrid approach to circumvent the 'single user' nature of the uar development, in that daily compiles go to folders and then there's a mass compile into the uar. 
    Regards, 
    Iain

    ------------------------------
    Iain Sharp
    Head of Technical Services
    Pci Systems Ltd
    Sheffield GB
    ------------------------------



  • 3.  RE: $RESOURCES_OUTPUT and UAR

    Posted 02-15-2022 10:49
    Hi Ian

    I could not get this to work...  the problem is, in my runtime asn setup case, uniface.exe needs a uar file.

    runtime.asn
    [RESOURCES]
    usysuar:Myapp.uar

    If not, I get the error ... Failed to activate start up screen
    • In fact the runtime.asn does not seem to care or use $RESOURCES_OUTPUT

    and when it does use the uar file... if will be an old version of the app, as my ide is setup to compile frms to .frm(like UFv9), and does not update the uar.

    ------------------------------
    Osman Shariff
    ------------------------------



  • 4.  RE: $RESOURCES_OUTPUT and UAR

    ROCKETEER
    Posted 02-15-2022 07:29
    Another option is using the IDE test logical TEST_COMMAND_CPT
    Documentation in the library:
    Uniface Reference > Configuration Reference > Configuration Settings: Assignment > [LOGICALS] > IDE Test Logicals

    Change TEST_COMMAND_CPT to use uniface.exe , an asn for testing and the application shell name.
    This worked for me:
    TEST_COMMAND_CPT = C:\Uniface\installations\104w64\common\bin\uniface.exe /adm=%AdmDir /dir=%WorkDir /asn=.\asn\aps.asn /ini=.\ini\aps.ini STARTCPT %CptName

    In the aps STARTCPT for example (more arguments can be added via TEST_COMMAND_CPT and updating script below)
    trigger apstart
    if ($1 != "")
    activate "%%($1)".EXEC()
    else
    activate "STARTCPT".EXEC()
    endif

    Peter Beugel
    Principal Technical Support Engineer
    Rocket Software B.V.

    ------------------------------
    Peter Beugel
    Rocket Internal - All Brands
    Amsterdam NL
    ------------------------------



  • 5.  RE: $RESOURCES_OUTPUT and UAR

    Posted 02-15-2022 11:02
    Hi Peter

    I see that TEST_COMMAND_CPT controls how test in compile/test spawns the component...
    I did this:-
    TEST_COMMAND_CPT = "C:\Program Files\Rocket Uniface 10 Community Edition\common\bin\uniface.exe" "/adm=C:\Users\User\Rocket Uniface 10 Community Edition\project\start" myapp

    However, in my case, uniface.exe uses runtime.asn which contains (as I said to Ian) a pointer to a uar which does not contain the latest objects... as they were compiled into .frms, .aps etc.  So testing a frm using the above TEST_COMMAND_CPT runs the frm contained in the uar and not the frm that I just compiled...

    AKAIK, I need to bypass uniface.exe needing to use the uar.... for this method to work.


    ------------------------------
    Osman Shariff
    ------------------------------



  • 6.  RE: $RESOURCES_OUTPUT and UAR

    Posted 02-15-2022 11:14
    Maybe my runtime.asn is missing stuff.... this is it:- 

    In fact, I am definitely missing stuff, as the debugger will also not start with this setup... I get the error udbg Fatal: Cant locate [Resources]

    #file usyscom:adm\dbms.asn
    
    [SETTINGS]
    $ENHANCED_EDIT = ALL 
    $CUROCC_VIDEO_HLT = backcolor=#E1E8F5 forecolor=black
    $PUTMESS_LOGFILE = usyslog:runtime_%p.log
    $RESOURCES_OUTPUT = resources
    
    [RESOURCES]
    usysuar:Myapp.uar
    usys:usys.uar
    ​


    ------------------------------
    Osman Shariff
    ------------------------------



  • 7.  RE: $RESOURCES_OUTPUT and UAR

    PARTNER
    Posted 02-15-2022 12:24
    You need to include the resources folder you used when compiling the output. 
    So assuming your $resources_output$ in your ide.asn is 
    $resources_output$=resources
    the following should work. 

    #file usyscom:adm\dbms.asn
    
    [SETTINGS]
    $ENHANCED_EDIT = ALL 
    $CUROCC_VIDEO_HLT = backcolor=#E1E8F5 forecolor=black
    $PUTMESS_LOGFILE = usyslog:runtime_%p.log
    $RESOURCES_OUTPUT = resources
    
    [RESOURCES]
    resources
    usysuar:Myapp.uar
    usys:usys.uar
    ​​
    You (potentially) don't need the myapp.uar, if all the code is compiled into the folders. 

    We run an automated compile overnight of all the source, and output that into main_system.uar, then during the day the programmers all compile into a folder called newprogs, so our asn resources section looks like 
    [resources]
    newprogs
    resources\main_system.uar​
    This causes it to check the newprogs folder for anything compiled today, and if it fails to find the object in there, it looks in main_system.uar. 

    The resources section is checked from the top down to find the first copy of the object in the listed order. So our deployed runtime asn can look like 

    [RESOURCES]
    newprogs
    resource\hotfix_12345.uar
    resource\hotfix_12356.uar
    resource\Patch003.uar
    resource\Patch002.uar
    resource\Patch001.uar
    resource\main_system.uar​
    This will cause it to check the newprogs folder for a copy of the program, then the first hotfix, then the second, then patch 003 then patch 002 and so on. As soon as it finds a copy it will use that one. note - not the newest one, the first one it finds in the order listed so if you put the patches in numerical order, patch 001 overrides patch 002 even if 002 is newer. Therefore, you add newer compiled repositories at the top of the resources  section. 

    Iain

    ------------------------------
    Iain Sharp
    Head of Technical Services
    Pci Systems Ltd
    Sheffield GB
    ------------------------------



  • 8.  RE: $RESOURCES_OUTPUT and UAR

    Posted 02-15-2022 13:01
    Thanks Ian, that has worked perfectly... 

    Very nice... this uniface thing ain't too bad...


    ------------------------------
    Osman Shariff
    ------------------------------