Alimoeini
Member
Hi guys .
I use from B4ABuilder - Command line compilation for create a cms but i have a question now.
I need stop this compiler when run it.
how can I stop this compile after run it ?
I say this question in this thread and Erel say you should use Jshell library.
I used Jshell but when i killProcess middle of the compile dosent stop and there is in task manager and cpu running .
My codes are :
And you can see my task manager after KillProcess in this image :
I use from B4ABuilder - Command line compilation for create a cms but i have a question now.
I need stop this compiler when run it.
how can I stop this compile after run it ?
I say this question in this thread and Erel say you should use Jshell library.
I used Jshell but when i killProcess middle of the compile dosent stop and there is in task manager and cpu running .
My codes are :
B4X:
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private Shell As Shell
Private btnStart As B4XView
Private btnStop As B4XView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
Shell.Initialize("Shell", "cmd", Array("/c","""E:\Program Files (x86)\Anywhere Software\Basic4android\B4ABuilder.exe""","-Task=Build","-NoSign=False","-Obfuscate=False","-BaseFolder=C:\xampp\htdocs\shopper\shop"))
End Sub
Sub btnStart_Click
Log("Started")
Shell.Run(-1)
End Sub
Sub btnStop_Click
Log("Stoped")
Shell.KillProcess
End Sub
Sub Shell_ProcessCompleted (Success As Boolean, ExitCode As Int, StdOut As String, StdErr As String)
Log($"Success: ${Success},
Out: ${StdOut}
Error: ${StdErr}"$)
Log(Success)
Log("#################################################")
Log(StdOut)
Log("#################################################")
Log(StdErr)
End Sub
And you can see my task manager after KillProcess in this image :