All pastes #465988 Raw Edit

Stuff

public text v1 · immutable
#465988 ·published 2007-04-30 19:09 UTC
rendered paste body
' Gambas class file

sLine AS String
tmpsrc AS String
hSourceIn AS File
choice AS String
Content AS String
PUBLIC SUB Form_Open()
DIM fSourceInput AS File
ME.Caption = "Build a package"
ME.Center
PathBox.Clear
CpuLbl.text = "ARCH: i586"
BuildLbl.text = "BUILD: 1"  
BuildTagLbl.text = "TAG: vl58"
ArchSel.text = "Arch"
BuildSel.text = "Build"
BldTagBox.Text = "Tag"
END

PUBLIC SUB BackBtn_Click()
ME.close
FMain.Show  
END

PUBLIC SUB BrwseBtn_Click()

Dialog.title = "Select a source tarball"
dialog.filter = ["Compressed Source (*)"]
Dialog.OpenFile
tmpsrc = Dialog.Path
PathBox.text = tmpsrc  

END

PUBLIC SUB QuitBtn_Click()

QUIT 

END

PUBLIC SUB buildinfo_MouseDown()

  

END

PUBLIC SUB PkgrId_KeyPress()

  

END

PUBLIC SUB PkgrId_Enter()

PkgrID.clear

END

PUBLIC SUB ArchSel_Click()

  

END

PUBLIC SUB NextBtn_Click()
DIM sName AS String
DIM sVersion AS String
DIM sPname AS String
DIM ipos1 AS Integer
DIM ipos2 AS Integer
DIM ipos3 AS Integer


'EXEC ["cd", "/tmp", "&&", "tar", "xf", tmpsrc]
EXEC ["tar", "Cxvf", "/tmp", tmpsrc]
'TextArea1.text = tmpsrc 
ipos1 = RInStr(Dialog.Path, "/")
sPname = Right$(tmpsrc, - ipos1)
ipos2 = InStr(sPname, "-")
ipos3 = InStr(sPname, ".tar") - 1 
sName = Left$(spname, ipos2 - 1)
sVersion = Mid$(Left$(sPname, ipos3), ipos2 + 1)
'TextArea1.Text = "name " & sName & "   " & sVersion
TextArea1.Text = sPname & "       " & sName & "      " & sVersion
SHELL "cd /tmp/" & sName & "-" & sVersion & " && ./configure" FOR READ
'TextArea1.Text = 
TextArea1.Text = Content
END
PUBLIC SUB Process_Read()

  DIM sLine AS String

  READ #LAST, sLine, -256

  Content = Content & sLine
  PRINT sLine;

END

PUBLIC SUB ComboBox1_Change()


choice = Trim(ComboBox1.text)  
message.info(choice & " Was selected")
TextArea1.text = choice & " Was selected"
END