I Think I found it Again, In WIP
Blue IDE Beta V2
http://forum.thegamecreators.com/?m=forum_view&t=21465&b=8
If you go to the Form Called [MAIN], in the Compile Menu and Click on Any of the Menu Items you will see the Code that Triggers [triggerCompile()]
This is Assuming you have VB?
It Requires Dark Basic to be Installed as it uses The DB Compiler
Private Sub triggerCompile()
If Not verifyDBPPath Then Exit Sub
If CALL_DBPCFG Then dbpcfg_OnCompile
If CurrentPrj.debug = "YES" Then
IDEPluginInterface.setVar "debug", "1"
Else
IDEPluginInterface.setVar "debug", "0"
End If
If globalSettings.backupOnCompile Then backupProject
Dim i As Integer
Dim StandaloneDBA As Boolean
Dim FSO As FileSystemObject
Set FSO = New FileSystemObject
'Clear compile dialog boxes and refresh
frmCompile.extrainfo.Text = ""
frmCompile.Label1.Caption = "Creating executable..."
frmCompile.Show 0, Me
frmCompile.Refresh
'Check that project is not being compiled
If frmCompile.Timer1.Enabled = True Then
If MsgBox("Your project is already being compiled. Do you wish to abort?", vbYesNo, "Warning") = vbYes Then
Timer1.Enabled = False
End If
Exit Sub
End If
Dim cr As Range
'Ensure that window caption is correct by calling txt box change function
txtSWinCaption_Change
Set cr = code.GetSel(False)
SaveTopIndex currTab()
IsCompiling = True
'Standalone File - Temporarily set CurrentPrj.main then reset afterwards
If CurrentPrj.Main = "" Then
StandaloneDBA = True
CurrentPrj.Main = CTab.SelectedItem.Caption
If prjEXEName.Text = "" Then prjEXEName.Text = "temp.exe"
End If
If CTab.Tabs.count = 0 Then IsCompiling = False: Exit Sub
'Check validity of executable name before continuing
If Not VerifyExeName Then Exit Sub
SourceStr = ""
Dim z As Integer
'Create temporary project if not yet saved
If CurrentPrj.dbprofilepath = "" Then
SaveTempProject FSO
End If
'Delete old exe & ErrorReport.txt
If Not RemoveOldCompileFiles() Then Exit Sub
'Update Project File with Changes
If SaveOnCompile = False Then
SaveProjectFile CurrentPrj.dbprofilename, True
Else
SaveProjectFile CurrentPrj.dbprofilename, False
End If
'Save changes to stored source files
SetCurrentTab CTab.SelectedItem.Index
frmCompile.Label1.Caption = "Collating source code..."
frmCompile.Label1.Refresh
'Collate Source Code into One String
GetAllSourceCode SourceStr
'Temp
Dim Temp As String
Temp = code.Text
Dim d As Long
Dim testl As String
'Pre-process source - Perform Concantation
frmCompile.Label1.Caption = "Preprocessing: Performing Concantation"
frmCompile.Label1.Refresh
DoConcantation SourceStr
code.Text = SourceStr
Dim AbortCompile As Boolean
Dim PResult As Variant
'Call OnCompile method of plugins - macros / quickcodes etc.
If Not CallPluginOnCompile Then
code.Text = Temp
Exit Sub
End If
frmCompile.Label1.Caption = "..."
'Save all source to temp file for compiler to work with
code.SaveFile CurrentPrj.dbprofilepath + "_Temp.dbsource", False
FSLineCount = code.linecount
'Restore code text to before compile started
code.Text = Temp
RestoreTopIndex currTab()
IsCompiling = False
IDEPrintMsg "Compiling... - Debug Mode On = " + CurrentPrj.debug
'Check that all previous procedures went OK then ... launch the compiler!
If FSO.FolderExists(FSO.GetParentFolderName(CurrentPrj.exename)) = False And FSO.FolderExists(FSO.GetParentFolderName(CurrentPrj.dbprofilepath + "" + CurrentPrj.exename)) = False Then
MsgBox "Error - Invalid Executable Path. Please change the project's executable filename."
Else
If AbortCompile = False Then
If FSO.FileExists(DBPPath + "CompilerDBPCompiler.exe") Then
frmCompile.Timer1.Enabled = True
If CompileMode <> CM_RUNONLY Then
trueCompilerPID = executeApp(DBPPath + "CompilerDBPCompiler.exe " + CurrentPrj.dbprofilename)
'ShellExecute 0, "open", DBPPath + "CompilerDBPCompiler.exe", CurrentPrj.dbprofilename, CurrentPrj.dbprofilepath + "", 1
End If
Else
frmCompile.Hide
MsgBox "Unable to compile project. The compiler executable (" + DBPPath + "CompilerDBPCompiler.exe" + ") was not found", vbCritical, "Compile Error"
End If
Else
frmCompile.Hide
End If
End If
'If Standalone DBA File, reset CurrentPrj
If StandaloneDBA = True Then
CurrentPrj.Main = ""
End If
Form_Resize
End Sub
Im Trying to Get this Line to Work externally, Ie, Outside the BlueIDE
trueCompilerPID = executeApp(DBPPath + "CompilerDBPCompiler.exe " + CurrentPrj.dbprofilename)
'ShellExecute 0, "open", DBPPath + "CompilerDBPCompiler.exe", CurrentPrj.dbprofilename, CurrentPrj.dbprofilepath + "", 1