Re: WEE-41 UPX fail on Ubuntu 15.10 64-bit

new topic     » goto parent     » topic index » view thread      » older message » newer message

OK, I this is what I have learned thus far on my Linux, Ubuntu 15.1 64 bit system with the following terminal emulators installed: xterm, xfce4-terminal, gnome-terminal, lxterminal, mate-terminal

  • The "Wait For Keypress after Run in Terminal" option only works with xterm.
  • UPX only works consistently correctly with xterm.
  • "Wait For Keypress after Run" makes it easy to monitor the success/failure of Translate/Compile/Compress.

Xterm has an incredibly small default font size. Installing a better font set is way too much trouble. But for most purposes, it will probably suffice.

Other terminal emulators, such as the xfce4-terminal, which are highly configurable and easy on the eyes can be used for well behaved Linux console programs.

So I decided to make xterm default whenever "Wait For Keypress ...", or "Translate and Compile is selected from the Run menu. An easier to use, SEE, and configure terminal emulator selected from the "Set Terminal Emulater" run menu option will be automatically be used for all other terminal emulator purposes.

--<=== marks code insertion block or line 
procedure Run(sequence cmd) 
sequence prev_term = terminal_program  --<=== 
    if length(terminal_program) then 
        if run_waitkey then 
            -- don't show "Press Enter" on errors 
            terminal_program = "xterm -e"  --<=== 
            cmd = match_replace("eui ", cmd, "eui -batch ") 
            cmd &= " ; read -p \"\nPress any key...\" -n1 -s" 
        end if 
        if run_waitkey or ends(" -e", terminal_program) then 
            cmd = quote_spaces(cmd) 
        end if 
        cmd = terminal_program & ' ' & cmd 
    end if 
    if run_background then 
        cmd &= " &" 
    end if 
    system(cmd) 
    terminal_program = prev_term --<=== 
end procedure 
 
 
-- function RunStart(atom ctl) 
function RunStart(atom ctl) 
    object lbl = gtk:get(ctl, "label") 
    sequence cmd = "" 
    integer wk = 0 --<=== run_waitkey switch back flag 
-- 
-- 
elsif equal(lbl, "Translate and Compile") then 
	--<===------------------------------ 
	if run_waitkey = 0 then 
	    run_waitkey = 1 
	    wk = 1  --< set switch back flag 
	end if 
	--<===------------------------------- 
	cmd &= get_eu_bin("euc") & ' ' & quote_spaces(file_name) 
	if system_exec("which upx") = 0 then 
	    cmd &= " && upx " & filebase(file_name) 
	end if 
	if run_testrun then 
	    cmd &= " && ./" & filebase(file_name) 
	end if 
	Run(cmd) 
	--<====--------------------------------------- 
	if wk then 
	-- switch run_waitkey back to 0 
	    run_waitkey = 0 
	end if 
	--<===--------------------------------------- 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu