09-24-2004, 01:03 AM
Inspired by Martin Rampersad's article on QB Express Issue 2 I wanted to make my own compiling program and at it on the right click menu.
I've added the compile function in the menu like this:
Here is what I programmed so far:
This is how the makeexe.ini file looks like
But it still doesn't work on all .bas files.
Do any of you guys have any idea's???
I've added the compile function in the menu like this:
Here is what I programmed so far:
Code:
DIM File$
DIM SFile$
DIM Path$
DIM PF$
DIM Libs(99) AS STRING
DIM LibNames(99) AS STRING
DIM LibNr AS INTEGER
'PF$ = "C:\QB\he.bas"
PF$ = COMMAND$
PF$ = LEFT$(PF$, LEN(PF$) - 1)
PF$ = RIGHT$(PF$, LEN(PF$) - 1)
PRINT PF$
SLEEP
DO
Q = INSTR(PF$, "\")
Path$ = Path$ + LEFT$(PF$, Q)
PF$ = RIGHT$(PF$, LEN(PF$) - Q)
LOOP UNTIL Q = 0
File$ = PF$
SFile$ = LEFT$(File$, LEN(File$) - 4)
OPEN "C:\QB\Makeexe.ini" FOR INPUT AS #1
INPUT #1, LibNr
FOR i = 0 TO LibNr - 1
INPUT #1, LibNames(i)
INPUT #1, Libs(i)
NEXT
CLOSE #1
R$ = "C:\QB\Link " + SFile$ + ".OBJ /EX /NOE /NOD:C:\QB\Brun45.bi, " + SFile$ + ".EXE, NUL, C:\QB\BCOM45.LIB"
Sel = 0
DO
CLS
COLOR 3, 0
PRINT "Do you want to ad any libs?"
PRINT "Press Space to ad a lib and Press ESC to exit!"
PRINT
FOR i = 0 TO LibNr - 1
IF Sel = i THEN
COLOR 0, 3
ELSE
COLOR 3, 0
END IF
PRINT LibNames(i)
NEXT i
COLOR 3, 0
DO
Press$ = INKEY$
SELECT CASE Press$
CASE CHR$(0) + CHR$(80)
Sel = Sel + 1
CASE CHR$(0) + CHR$(72)
Sel = Sel - 1
CASE " "
R$ = R$ + "+ " + Libs(Sel)
PRINT "Library is added"
SLEEP
END SELECT
LOOP UNTIL Press$ <> ""
IF Sel < 0 THEN Sel = 0
IF Sel > LibNr - 1 THEN Sel = LibNr - 1
LOOP UNTIL Press$ = CHR$(27)
Q$ = "C:\QB\BC " + Path$ + File$ + ", " + SFile$ + ".obj /O/T/C:512"
PRINT Q$
PRINT R$
SLEEP
SHELL Q$
SLEEP
SHELL R$
SLEEP
This is how the makeexe.ini file looks like
Code:
2
Rellib
C:\QB\LIBS\Rel.lib
RelMox
C:\QB\LIBS\Relmox.lib
But it still doesn't work on all .bas files.
Do any of you guys have any idea's???