Copy the contents of 'builds' folder

Hey… I have been scratching my head for a couple of hours for this simple task I can not achieve… I just want to copy my built apps

I have a IDE script that creates two compiled versions of my app. I want to move them (alongside resources and libs) to another folder… I tried runing an xcopy command with DoShellCommand but I can not set the source folder (/My/Project/Folder/Builds - MyAppName/Windows) for the copy.

The AppPath variable (AppPath = BuildApp(3,False) points to the Exe and NOT to the whole folder I want to copy (incuding resources and libs)…

AppPath.Parent

Appath is a string that is returned from buildapp… It’s not a folderitem… It’s actually the shellpath the the exe

dim parentPath as String=GetFolderItem(ApPath.parent,folderitem.PathTypeShell)

or just chop off the displayname

Hey Dave…
I don’t think IDE scripting supports GetfolderItem or FolderItem… It’s a Build step I am trying to setup here

Have a look at the available Building Commands.
It seems that you’re looking for: CurrentBuildLocation As String

This is confusing me —> “This can only be used in a Build Automation IDE Script that runs after the Build Step”

I am writing my IDE script in the IDE script editor (or however it’s called). If i try to run the script I get an error in the line I called “CurrentbuildLocation”…

Because of this I assumed:

  • Menu “Insert -> Build Step -> Script
  • place the Script in: Build Settings -> (macOS/Linux/Windows; expand it!) -> Build (after the “Gear-Icon”)

If you now Build your App (either by pressing the Build-Button; or by using your IDE-Script calling: AppPath = BuildApp(3,False)), then right after the App has been built, the “Post Build Script” (and whatever Build-Steps you have after the “Gear Icon”) will run (in the order of their placement).
And that Script is aware of the “CurrentbuildLocation”.

One example is this “Post Build Script” which signs the App and creates a DMG (when building on macOS).

A bit above on what’s visible in this ScreenShot the “CurrentBuildLocation” is being used:

But I don’t have an answer for an IDE Script, which you seem to be using. The simplest solution is probably what @Dave S has already suggested: You know “path + appname”, so simply remove the trailing “appname” from your String.

How about…

appPath = BuildApp(3,False) Dim sa() = split(appPath,"/") Sa.remove(ubound (sa)) ParentPath = join(sa,"/")

I am probably missing something here because you guys are suggesting solutions that are not IDE scripting compatible.

Ide scripting has no commands such as split or any string manipulation methods (afaik)…

I finally found it…

(this is the post build script)

Dim result as String
Dim BuildsFolder as string = CurrentBuildlocation
Dim command As String

command = “xcopy “+BuildsFolder+” ““F:\MyApp\BuildOk”+PropertyValue(“App.WindowsAppName”)+””" /e /i /y"

result = DoShellCommand(command)

Thanks a lot for your help !!