No announcement yet.


  • Filter
  • Time
  • Show
Clear All
new posts

  • Semen Matusovski
    Peter -

    I selected more friendship variant.
    I prefer another variant (release' files in main directory, source and resource modules in subdirectories).
    To avoid such problems with exe I wrote small fictive module.
    To be more clear, I describe a technique on your sample.

    ONE TIME somewhere you compile this module
    (let's name it fict.bas)

    #Compile Exe
    #Register None
    #Include "Win32Api.Inc"
    DefLng A-Z
    Function PbMain
       Local TmpAsciiz As Asciiz * %MAX_PATH
       lResult = GetModuleFileName(ByVal 0, TmpAsciiz, SizeOf(TmpAsciiz) - 1)
       If lResult = 0 Then Exit Function
       i = 0
          j = Instr(i + 1, TmpAsciiz, "\")
          If j = 0 Then Exit Do Else i = j
       CatalogExe$ = Left$(TmpAsciiz, i)
       If Right$(CatalogExe$, 1) <> "\" Then CatalogExe$ = CatalogExe$ + "\"
       ExeName$ = Mid$(TmpAsciiz, i + 1)
       y = Shell(CatalogExe$ + "Release\" + ExeName$, 1): Sleep 0
    End Function
    When you want to debug a new program, you copy fict.exe to a directory with BAS and rename it to myprog.exe.

    Now you can use Compile.Exe "Release\Myprog.Exe", because IDE will start the fictive module from the same directory as BAS.
    Fictive module defines full path (for example, C:\Prog\MyProg.Exe") and in own turn start C:\Prog\Release\MyProg.Exe (prepared by IDE).


    Leave a comment:

  • Lance Edmonds
    not at this time. this is covered in the faq forum

    the workaround is to place a shortcut on the desktop to the target exe, then open the properties to the shortcut and assign a "shortcut key" such as ctrl + alt + 1

    this way you can launch the exe after compiling simply by pressing the chosen shortcut key combination.

    powerbasic support
    mailto:[email protected][email protected]</a>

    Leave a comment:

  • Peter Stephensen
    Guest started a topic #COMPILE EXE ?


    I like to have a sub-directory called Release containing the application-exe-file, and a sub-directory called Resource containing the resource-files. Therefore i initialte my programs with:

    #COMPILE EXE "Release\MyProg.exe"
    #RESOURCE "Resource\Script1.pbr"

    The problem is that when i press ctrl+E (Build and Execute) to compile my program, the program is not executed. The reason is that PB tries to execute "MyProg.exe" instead of "Release\MyProg.exe". Is there a way to solve this problem ?


    [This message has been edited by Peter Stephensen (edited March 19, 2000).]