How to compile a BGI file 
Author Message
 How to compile a BGI file

Hello, me again =]

I wrote a Pascal file, with the line : initgraph(Gd, Gm,'C:\utils\bgi');

well, now i'd like to compile this file, but if i copmiled it and
run it on another computer, it asks 4 the BGI directory,
which is logic, but how can i avoid this ??

thanks already.



Wed, 18 Jun 1902 08:00:00 GMT  
 How to compile a BGI file

Quote:

> Hello, me again =]

> I wrote a pascal file, with the line : initgraph(Gd, Gm,'C:\utils\bgi');

> well, now i'd like to compile this file, but if i copmiled it and
> run it on another computer, it asks 4 the BGI directory,
> which is logic, but how can i avoid this ??

> thanks already.

In the EXAMPLES\BGI directory you can find the file BGILINK.PAS, which
explains how to link BGI files in your .EXE

Wouter



Wed, 18 Jun 1902 08:00:00 GMT  
 How to compile a BGI file

Quote:

>I wrote a pascal file, with the line : initgraph(Gd, Gm,'C:\utils\bgi');

InitGraph(Driver,Mode,' ');

Use this line instead and put your .BGI file to same directory with
your program.

Aarne

-\ Aarne Toompark \ Tel&Fax (372) 65 65 110 \-

Quote for the day:
Mental backup in progress- Do Not Disturb!



Wed, 18 Jun 1902 08:00:00 GMT  
 How to compile a BGI file


Quote:
>Hello, me again =]

>I wrote a pascal file, with the line : initgraph(Gd, Gm,'C:\utils\bgi');

>well, now i'd like to compile this file, but if i copmiled it and
>run it on another computer, it asks 4 the BGI directory,
>which is logic, but how can i avoid this ??

Never hard code directory names. Instead use for example environment
variable to tell the directory.

Osmo



Wed, 18 Jun 1902 08:00:00 GMT  
 How to compile a BGI file
hello
another solution(not better) is to input your pathdriver on the other
computer,if there are the bgi and chr files,when you run the program
something like this :
pathdriver:='';
repeat
initgraph(gd,gm,pathdriver);
errorcode:=graphresult;
if errorcode <> grok
  then
   begin
    writeln('graphics error :', grapherrormsg(errorcode));
    if errorcode=grfilenotfound
     then
      begin
       writeln('imput the path of the bgi');
       readln(pathdriver);
       writeln;
    end
else halt(1);
end;
until errorcode=grok) ;


Quote:
>Hello, me again =]

>I wrote a pascal file, with the line : initgraph(Gd, Gm,'C:\utils\bgi');

>well, now i'd like to compile this file, but if i copmiled it and
>run it on another computer, it asks 4 the BGI directory,
>which is logic, but how can i avoid this ??

>thanks already.



Wed, 18 Jun 1902 08:00:00 GMT  
 How to compile a BGI file
: Hello, me again =]
:
: I wrote a pascal file, with the line : initgraph(Gd, Gm,'C:\utils\bgi');
:
: well, now i'd like to compile this file, but if i copmiled it and
: run it on another computer, it asks 4 the BGI directory,
: which is logic, but how can i avoid this ??
:
: thanks already.
:

Some time ago I wrote a program to convert *.BGI & *.CHR files to *.TPU ones.
It may be found at:  http://www.ii.uni.wroc.pl/~pkl/download.html

Pawel



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Including .chr and .bgi files in a program compiled into .exe

2. Font files compiled to .OBJ files.

3. BGI file linked in EXE file?

4. compile a old dos .pas file ??

5. Compiling bitmaps into exe-file ?

6. Too Many Files when compiling.

7. Compile files in exe ?

8. gpc/Solaris 2.5 - problems compiling pascal files

9. help on compile file

10. HELP ! HELP PLEASE IN COMPILE TO EXE FILE

11. Compiling as a *.SCR file

12. Relative speed of compiled exe files in BP 7 running under DOS, and in Delphi

 

 
Powered by phpBB® Forum Software