Run Exe file from tcl macro

SriGanesh Doshaim
SriGanesh Doshaim New Altair Community Member
edited October 2020 in Community Q&A

Hi,

 

I have converted .tcl file to executable (.exe)  file format. (The macro(.tcl) which works on Hypermesh )

 

Is it possible to call the .exe file from another .tcl macro?

 

exec [ file normalize 'c:\\hm\\Runexe.exe' ];

 

Or

 

Is there a way to secure the code?....Binary format or something...

 

Regards,

SriGanesh,.

 

 

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2015

    How to convert .tcl script into .exe ? Do you use ActiveState tool ?

  • SriGanesh Doshaim
    SriGanesh Doshaim New Altair Community Member
    edited March 2015

    Hi Q.NGUYEN-DAI,

     

    Thanks for your reply.

     

    I have used freewrap to convert .tcl to .exe. http://wiki.tcl.tk/11861

     

    Is there any way that we can convert the source code to any non-readable format?

     

    Regards,

    SriGanesh.

  • tinh
    tinh Altair Community Member
    edited March 2015

    Hi,

     

    I have converted .tcl file to executable (.exe)  file format. (The macro(.tcl) which works on Hypermesh )

     

    Is it possible to call the .exe file from another .tcl macro?

     

    exec [ file normalize 'c:\\hm\\Runexe.exe' ];

     

    Or

     

    Is there a way to secure the code?....Binary format or something...

     

    Regards,

    SriGanesh,.

     

    Hi

    you can run exe file from tcl of hypermesh but i am not sure it can invoke hm tcl commands or not

    if you want to secure source code you can use tcl compiler

    wrapping tcl code will create independent exe file only (cannot source it in other tcl code)

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2015

    IMHO, the best tool in this case is use TCL Devkit from ActiveState (http://www.activestate.com/tcl-dev-kit ). It's not free tool but you can 'compile' your TCL script in binary form and source it like TCL script.

  • tinh
    tinh Altair Community Member
    edited March 2015

    Hi,

    there is a free TclPro1.4.1 you can download from sourceforge.net

    but it's not support some new syntax of tcl like 'eq', 'ne', '**',...

  • SriGanesh Doshaim
    SriGanesh Doshaim New Altair Community Member
    edited March 2015

    Q.NGUYEN-DAI,

    Thanks for the opinion..

    I have installed the trail version of dev kit and compiled the source code which was created on hm..It source perfect and works fine...

    Is there any free tool to convert the tcl to bytecode...?

     

    tinh,

    Thanks for your reply.

    I have installed TclPro1.4.1 from sourceforge.net. It is asking for license. Please suggest..

     

    Thanks,

    SriGanesh.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2015

    @SriGanesh: Maybe there is another tool to do that. But at work, I use TDK so I'm sure that should work ok image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>

  • tinh
    tinh Altair Community Member
    edited March 2015

    Q.NGUYEN-DAI,

    Thanks for the opinion..

    I have installed the trail version of dev kit and compiled the source code which was created on hm..It source perfect and works fine...

    Is there any free tool to convert the tcl to bytecode...?

     

    tinh,

    Thanks for your reply.

    I have installed TclPro1.4.1 from sourceforge.net. It is asking for license. Please suggest..

     

    Thanks,

    SriGanesh.

     

    license is here

    http://www.tcl.tk/software/tclpro/eval/1.4.html

     

     

    if you use trial TDK then your tbc file will expire when trial time finished

    tclpro1.4 is free but it's written from 2000 so it cannot compile new syntax like **, eq, ni,.. you should care about these

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2015

    Hello,

     

    i'm also using TCLPro and it works fine for me. I don't use new syntax.

    The version is for free, including the licenses.

     

    Best regards,

    Mario

  • SriGanesh Doshaim
    SriGanesh Doshaim New Altair Community Member
    edited March 2015

    Thanks all.. image/emoticons/default_smile.png' alt=':)' srcset='/emoticons/smile@2x.png 2x' width='20' height='20'>

     

    Your opinions and views helped a lot..

     

    Regards,

    SriGanesh.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2017

     

     

     

    license is here

     

    http://www.tcl.tk/software/tclpro/eval/1.4.html

     

     

     

     

     

    if you use trial TDK then your tbc file will expire when trial time finished

     

    tclpro1.4 is free but it's written from 2000 so it cannot compile new syntax like **, eq, ni,.. you should care about these

    Hello tinh,

     

    I have downloaded and registered the TCLpro, but how to compiler the tcl to bytecode with it?

     

    Regards,

     

    H.B

  • tinh
    tinh Altair Community Member
    edited February 2017

    Hi Herbert,

    you just follow it help document

    or open cmd console and type <installedDir>..../procomp /? for execution guide