In the absence of a wishlist: command line /ude

Author: i2stiller@gmx.de (istiller)

Hi We are ordered to implement thinks like Github. So to export of "things" (e.g. nightly) out of the repostitory into some XML-Files I will write some batch files to start UNIFACE.EXE with "/cpy" . But, as we all know, a component does not only is located in UFORM but in a few more tables. So I have to export at least four time to got the whole component (UFORM,UXGROUP,UXFIELD,UXREGS) UnifAce proc-code on the other side will provide us with $UDE("export","component",...) So, why not have this capabilities with the command line /ude export component <name> And of cource: /ude import compoent <xml-files> Which will first delete/cleanup any old component (with the name of that your are about to import) Ingo

5 Comments

  1. Hello Ingo You can simply build your own startupshell to do this: {unifaceinstalldir}\common\bin\uniface.exe /adm={unifaceinstalldir}\uniface\adm /asn=.\test.asn /bat UDEBATCHSTYLE ? Proc script in Application Execute could for example look like this ;input see $ude documentation ;$1 Operation ;"compile"—see $ude compile ;"copy"—see $ude copy ;"delete"—see $ude delete ;"exist"—see $ude exist ;"export"—see $ude export ;"getReferenceList"—see $ude getReferenceList ;"import" "misc"—see $ude import ;"import" "symboltable"—see $ude import symboltable ;"load"—see $ude load ;$2 Argument1 like ObjectType ;$3 Argument2 like componentname ;$4 Argument3 like filename ;$5 OptionList like commitinterval=100 variables numeric returned endvariables $2 = $replace($2, 1, ";", "·;", -1) $3 = $replace($3, 1, ";", "·;", -1) $3 = $replace($3, 1, "*", "·*", -1) $3 = $replace($3, 1, "?", "·?", -1) $3 = $replace($3, 1, "!", "·!", -1) $3 = $replace($3, 1, "&", "·&", -1) $4 = $replace($4, 1, ";", "·;", -1) $4 = $replace($4, 1, "*", "·*", -1) $4 = $replace($4, 1, "?", "·?", -1) $4 = $replace($4, 1, "!", "·!", -1) $4 = $replace($4, 1, "&", "·&", -1) $5 = $replace($5, 1, ";", "·;", -1) if ($batch = 1) if ($5 != "") returned = $ude($1, $2, $3 , $4 , $5) else returned = $ude($1, $2, $3 , $4) endif if (returned = 8066) putmess "Error 8066 returned: 8066- Copy failed: Open error on input file/table." putmess $procreturncontext else if (returned < 0 ) putmess "Error returned: %%returned%%%" putmess $procreturncontext else putmess "Success returned: %%returned%%%" endif endif apexit else ;start your form activate "UDETEST".EXEC() endif Peter


    Author: PBeugel (peter.beugel@uniface.com)
  2. PBeugel said Hello Ingo You can simply build your own startupshell to do this: {unifaceinstalldir}\common\bin\uniface.exe /adm={unifaceinstalldir}\uniface\adm /asn=.\test.asn /bat UDEBATCHSTYLE ? 

     Note: The $ude function can only be used in the Development Environment (idf.exe) on Windows. Ingo


    Author: istiller (i2stiller@gmx.de)
  3. istiller said
    PBeugel said Hello Ingo You can simply build your own startupshell to do this: {unifaceinstalldir}\common\bin\uniface.exe /adm={unifaceinstalldir}\uniface\adm /asn=.\test.asn /bat UDEBATCHSTYLE ? 
     Note: The $ude function can only be used in the Development Environment (idf.exe) on Windows. Ingo  

    In case you add the irtl.dll to the [USER_3GL] section then $ude should also work with the runtime (uniface.exe). Hope this helps. Daniel


    Author: diseli (daniel.iseli@uniface.com)
  4. diseli said
    istiller said
    PBeugel said Hello Ingo You can simply build your own startupshell to do this: {unifaceinstalldir}\common\bin\uniface.exe /adm={unifaceinstalldir}\uniface\adm /asn=.\test.asn /bat UDEBATCHSTYLE ? 
     Note: The $ude function can only be used in the Development Environment (idf.exe) on Windows. Ingo  
    In case you add the irtl.dll to the [USER_3GL] section then $ude should also work with the runtime (uniface.exe). Hope this helps. Daniel  

      But Daniel ... This is against all rules and unsupported :-) Ingo


    Author: istiller (i2stiller@gmx.de)
  5. istiller said Hi We are ordered to implement thinks like Github. So to export of "things" (e.g. nightly) out of the repostitory into some XML-Files I will write some batch files to start UNIFACE.EXE with "/cpy" . But, as we all know, a component does not only is located in UFORM but in a few more tables. So I have to export at least four time to got the whole component (UFORM,UXGROUP,UXFIELD,UXREGS) UnifAce proc-code on the other side will provide us with $UDE("export","component",...) So, why not have this capabilities with the command line /ude export component And of cource: /ude import compoent Which will first delete/cleanup any old component (with the name of that your are about to import) Ingo  

    This is exactly why we wrote UD6 'Uniface Repository Database' for version control, like 18 years go. Your components - including all the source for the component is stored in the text file .\sources\components.dir\component-name.xml - in a format that is not the same as the Uniface XML format, but is 'human readable' and good for merging and storing in version control (including Git). And that file is your database, not a 'copy' of it, so you can be 100% sure it is correct. Here is a video: https://www.youtube.com/watch?v=QOU3ChOqnEM&t=37s


    Author: Arthur Barrett (arthur.barrett@march-hare.com)