I have this strange problem on Fedora. I have this form (part of a bigger project) that is used to install rpm packages on Fedora using yum. The form has: txbPass (TextBox) to enter password tarOutput (TextArea) to output stream read from the running yum in shell btnInstall (Button) to click to start installing variable PathTemp (String) contains full path to rpm install file
The code for btnInstall is: Public Sub btnInstall_Click() Dim sPass, sEPass, sCommand, sFull As String btnClose.Enabled = False tarOutput.Clear Me.Refresh Wait 0.15 If tbxPass.Text = Null Then Message.Warning("First enter a password") btnClose.Enabled = True tbxPass.SetFocus Else sPass = tbxPass.Text sEPass = "echo \"" & sPass & "\" | " sCommand = "yum install -y " & PathTemp sFull = sEPass & "sudo -S " & sCommand 'TODO: Remove print Print sFull tarOutput.Text = "Start install..\n\n" Wait 0.05 hProcess1 = Shell sFull For Read As "Process1" hProcess1.Wait hProcess1.Kill Wait 0.05 tarOutput.Text &= "\nEnd install.." btnClose.Enabled = True btnInstall.Enabled = False btnClose.SetFocus Endif Catch tarOutput.Text &= Error.Text If hProcess1.State = 1 Then hProcess1.Kill Endif Error.Clear End Public Sub Process1_Read() Dim sLine As String Read #hProcess1, sLine, Lof(hProcess1) tarOutput.Text &= sLine tarOutput.Refresh Wait 0.02 End What happens: 1. When running from IDE (debug -> run) the installation runs perfectly and application installs. tarOutput reads: Start install.. <multiple lines of installation progress output by yum> End install.. 2. When running a gambas executable of the application or install a IDE made package of the application the installation doesn't run for some reason and rpm package doesn't install tarOutput reads: Start install.. End install.. So no output from the Process1_Read event is added, nor is application installed. It seems as if shell is never run!! Any ideas here? [System] OperatingSystem=Linux Kernel=3.8.4-102.fc17.i686 Architecture=x86 Distribution=redhat Fedora release 17 (Beefy Miracle) Desktop=LXDE Theme=QWindows Language=en_US.UTF-8 Memory=1003M [Libraries] GStreamer=libgstreamer-0.10.so.0.30.0 GTK+=libgtk-x11-2.0.so.0.2400.13 Poppler=libpoppler.so.19.0.0 Qt4=libQtCore.so.4.8.4 SDL=libSDL-1.2.so.0.11.3 Gambas 3.4.0 -- Kind regards, Willy (aka gbWilly) http://gambasshowcase.org/ http://howtogambas.org http://gambos.org ------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user