Compilation "App" Failed

Stephen
I found the same problem
I replaced: Dim appNameForShell As String = PropertyValue(“App.OfficeTime”) + “.debug.app”
with: Dim appNameForShell as string = “*.debug.app”

It seems the PropertyValue isn’t loading the app name
Add: print appNameForShell
To check
Best wishes
Phil

Also, I came across this from Beatrix Willius Sep 26 Pre-Release Testers Europe (Germany), and must acknowledge her help.
(https://forum.xojo.com/member/51493-beatrix-w)

This is her script, which includes a section to kill the running process:

'kill app if running
dim theCommand as String
dim theNextCommand as String

theCommand = “ps -axwwopid,command | grep '” + PropertyValue(“App.MacOSXAppName”) +"’ | grep -v grep | awk ‘{print $1}’"
dim theResult as String
theResult = DoShellCommand(theCommand)
if theResult <> “” then
theCommand = "kill " + theResult
theResult = DoShellCommand(theCommand)
end if

'get path and app name
'dim appNameForShell as string = PropertyValue(“App.MacOSXAppName”) + “.debug.app” // HERE I SUBSTITUTE THE NEXT LINE
dim appNameForShell as string = “.debug.app" // THIS WORKS FOR ME
dim appNameForBuild as String = “./”“Builds - HH.xojo_project/Mac OS X (Cocoa Intel)”"/
.app”

appNameForShell = getShellString(appNameForShell)

'print appNameForShell
dim CountSlashes as Integer = CountFields(ProjectShellPath, “/”)
dim ProjectName as string = NthField(ProjectShellPath, “/”, CountSlashes)
dim ProjectPath as String = Left(ProjectShellPath, Len(ProjectShellPath) - Len(ProjectName))

'delete app
theCommand = "rm -Rf " + ProjectPath + appNameForShell
theResult = DoShellCommand(theCommand)

if theResult <> “” then print theResult

function getShellString(theString as String) as string
Return ReplaceAll(theString, " ", "\ ")
end Function

//======== STILL NEED TO FIGURE OUT HOW TO DELETE THE BUILD, AS THE SAME PROBLEM HAPPENS WHEN I TRY TO BUILD

Also… Once one gets to the point of repeatedly building the app for different platforms, there is the same problem of having to delete the Builds prior to generating a new build.
On Mac using High Sierra, the following seems to work, but MUST be run as a debug script.

// Get the path of the project and strip off the project name

Dim projectPath as String = ProjectShellPath
// replace any “/” with empty string to fix path
projectPath = Replace(projectPath,"","")
'print projectPath
dim pa() as string = split(projectPath,"/")

// now remove the last item (Project name), leaving the project folder items as an array
pa.Remove(UBound(pa))
// Now create a string which holds the project folder
dim projectFolder as String = join(pa,"/")
'print projectFolder

Dim appPath As String = ProjectFolder + “/”“Builds - HH.xojo_project”""
Dim cmd As String = "rm -Rf " + AppPath
'print appPAth
'print cmd
Call DoShellCommand(cmd)

/// Many thanks to Greg O’Lone for his contribution to Case #49147

I just confirmed that this was fixed in Xojo 2017r3. <https://xojo.com/issue/49147>

Still doesn’t work on my box ~ something to do with the way I am referencing an image file as an icon for the app.

After my post above I had another issue where the compile failed but it could have been related to an open file issue when running a remote debugger session to a Raspberry Pi, even though the session had ended. I had to delete the debug builds folder to get it working again.