Diff of /codesys-ide/codesys [377479] .. [2cd164]  Maximize  Restore

Switch to unified view

a/codesys-ide/codesys b/codesys-ide/codesys
...
...
57
    export DISPLAY=:91
57
    export DISPLAY=:91
58
    Xvfb :91 &> /dev/zero &
58
    Xvfb :91 &> /dev/zero &
59
    sleep 1
59
    sleep 1
60
    export WINEPREFIX=~/.wine.cds
60
    export WINEPREFIX=~/.wine.cds
61
    ${WINE} ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/noop.py" --noUI 2> /dev/zero
61
    ${WINE} ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/noop.py" --noUI 2> /dev/zero
62
    # remove output log
63
    [ -f .codesys.output.txt ] && rm -f .codesys.output.txt
64
    # check if script runs with or without UI
65
    if grep '# CODESYS with UI' "${BASEPATH}/${1}.py" 2>&1 > /dev/zero; then
66
    ${WINE} ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/${1}.py" 2> /dev/zero
67
    else
62
    ${WINE} ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/${1}.py" --noUI 2> /dev/zero
68
    ${WINE} ~/.wine.cds/drive_c/CODESYS/CODESYS/Common/CODESYS.exe --culture=en --profile="'"${profile}"'" --runscript="z:${BASEPATH}/${1}.py" --noUI 2> /dev/zero
69
    fi
63
    result=$?
70
    result=$?
64
    sleep 1
71
72
    # flush output log
73
    [ -f .codesys.output.txt ] && cat .codesys.output.txt
74
     sleep 1
65
    killall Xvfb
75
    killall Xvfb
66
    rm -rf /tmp/.X91*
76
    rm -rf /tmp/.X91*
67
    
77
    
68
    if [ "${result}" == "0" ]; then
78
    if [ "${result}" == "0" ]; then
69
    true
79
    true