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)
Code:
#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 Do j = Instr(i + 1, TmpAsciiz, "\") If j = 0 Then Exit Do Else i = j Loop 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
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: