Page 1 of 1
Program runs twice
Posted: Sun May 16, 2004 4:49 am
by eriksradio
I am using PB 3.90
I wrote a program with the below code at the end
RunProgram("TEST.exe")
When compiled and run it works fine.
If the program is now made into an EXE
and the exe is run
TEST.EXE tries to run twice.
Posted: Sun May 16, 2004 9:01 am
by fweil
eriksradio,
Maybe you can send just the part which produces the bug to check it on another installation and debug it ...
Rgrds
Posted: Sun May 16, 2004 12:37 pm
by eriksradio
Hi fweil,
The actual program includes many more files. It might seem strange to
embed and run a file that is already there, but these files are runtime files
and it makes sure the user has not replaced them with unofficial updates which may not work. So it rewrites these files every time the program
is run.
If CreateFile(1, "sstvpalmultimode.exe")
UseFile(1)
L1 = ?ExitProcl - ?Incl
WriteData(?Incl, L1)
CloseFile(1)
Goto BeginProgram1
Incl :
IncludeBinary "sstvpalmultimode.exe"
exitProcl:
EndIf
BeginProgram1:
RunProgram("SstvPalMultiMode.exe")
It works fine in the IDE but the compiled exe tries to run
"sstvpalmultimode.exe" twice.
Posted: Sun May 16, 2004 12:48 pm
by fweil
eriksradio,
The flow as it is can't run twice, or tere is a bug somewhere.
Just then post a bug report but you may have to send your code for verification to one of the Purebasic team for checking what's wrong.
Just verifiy all again before to decide it's a compiler bug.
Rgrds
Posted: Sun May 16, 2004 10:52 pm
by eriksradio
Hi again Fweil,
I have the program working OK now.
With the many files handled in the same way, if I put the file I wish to run
at the head of the list, it now only runs once as expected.
That effect seems only if the run request immediately follows the unpacking.
I don't know if it is a bug, but I will pass it on to the team of developers just in case.
Thanks Fweil