Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

can the commandline config into wrapper.conf

Help
leisure.xu
2013-04-08
2013-04-09
  • leisure.xu
    leisure.xu
    2013-04-08

    i am running the wrapper.exe, only the "wrapper.exe".i want to use config file to handle wrapper to do
    eg:
    "wrapper.conf"add this:
    wrapper.action=i or wrapper.action=r and so on.

    now it is only with the commandline: wrapper.exe -i or wrapper.exe -r and so on.

    somebody for help!

     
  • Hi,

    you can specify as many parameters on the commandline for the Wrapper and/or your application as you want, when using the Wrapper.exe directly

    For instance you can run the following:
    bin\wrapper -c ..\conf\wrapper.conf wrapper.java.additional.1=-Dmy.var=test wrapper.debug=true [etc.]
    also it is also possible to specify parameters for your application directly:
    bin\wrapper -c ..\conf\wrapper.conf -- myparameter1 myparameter2

    please note the parameter '--' which indicates that all following parameters should be passed through to the application.

    Please let me know if you have any further questions.

    cheers,

     
  • leisure.xu
    leisure.xu
    2013-04-09

    hi cheers!
    I'm glad you've reply.

    I just want to double click the wrapper.exe to install service or unistall service or other action.So the -i or -r parameter without commandline.

    I suggest add "wrapper.action=" to wrapper.conf file,

    if wrapper.action=-i config into wrapper.conf, and double click the wrapper.exe, wrapper will run and install my app as service.
    if wrapper.action=-r config into wrapper.conf, and double click the wrapper.exe, wrapper will run and unistall my app.
    and so on ...

    I hope you will get me.

    thanks.

     
  • leisure.xu
    leisure.xu
    2013-04-09

    attach my modify code in wrapper_win.c:

    / Perform the specified command /
    if(!strcmpIgnoreCase(wrapperData->argCommand, TEXT("i")) ||
    !strcmpIgnoreCase(wrapperData->argCommand, TEXT("-install"))) {
    ...
    }

    to

    / Perform the specified command /
    if(!strcmpIgnoreCase(wrapperData->argCommand, TEXT("i")) || !strcmpIgnoreCase(wrapperData->argCommand, TEXT("-install")) ||
    !strcmpIgnoreCase(getStringProperty(properties, TEXT("wrapper.action"), TEXT("i"))) {
    ...
    }

     
    Last edit: leisure.xu 2013-04-09