Setting the application name using a IDEScript

Hi,

How can I set the Mac and windows application name before building using an IDE script?

I’m able to set other properties but not the actual app name.

PropertyValue("App.LongVersion")=Brands(i)+"2017"

These don’t work.

PropertyValue("MacAppName")=Appnames(i)+" "+apptype(i)
PropertyValue("app.MacAppName")=Appnames(i)+" "+apptype(i)
PropertyValue("Mac App Name")=Appnames(i)+" "+apptype(i)

Altering the exe name after building is ok for Windows, but the Libs folder has to have the original name (renaming to Libs is not an option as several exes are in the same folder). I don’t really want to try and do this with the Mac one (editing the Info.plist file)

How can I set the Bundle Identifier too?

Lee

I’m not in front of my computer at the moment. But I think I posted an IDE script for this already.

Thanks for the reply.

This one?
4014-one-project-two-executables

I can’t see where the actual executable names are changed.

Lee

You should try setting the name of the app to a constant in the IDE and then change the constant in the script.

This is for an IDE Communicator script:

[code]dim theVersion as String = “0”

dim basePath as string
basePath = “/Users/beatrixwillius/Documents/Development/Mail\ Archiver/”

openfile(basePath + “code\ current/max\ scheduler.rbp”)
ConstantValue(“App.kMaxVersion”) = theVersion
if ConstantValue(“App.kMaxVersion”) = “0” then
PropertyValue(“App.Application Identifier”) = “com.mothsoftware.mailarchiverx”
PropertyValue(“App.MacOSXAppName”) = "Mail Archiver X "
elseif ConstantValue(“App.kMaxVersion”) = “1” then
PropertyValue(“App.Application Identifier”) = “com.mothsoftware.mailarchiverpro”
PropertyValue(“App.MacOSXAppName”) = "Mail Archiver X Pro "
end if
Call BuildApp(7)
DoCommand(“CloseWindow”)[/code]

As far as I remember I had problems with changing name and bundle id from within the app itself. Now I just need to change the 0 to 1 and can build 4 apps.

Thanks Greg & Beatrix. I didn’t know you could use constants in the names.

Now I use

ConstantValue("AppNames.AppName")=Appnames(i)+" "+apptype(j)
in the script.

[quote=340283:@Lee Badham]Thanks Greg & Beatrix. I didn’t know you could use constants in the names.

Now I use

ConstantValue("AppNames.AppName")=Appnames(i)+" "+apptype(j)
in the script.[/quote]
You ought to be more specific in referencing the app name. #AppNames.AppName

Thanks, I’ve actually changed my mind.

I’ll use this:

PropertyValue("App.MacOSXAppName")= Appnames(i)+" "+apptype(j) PropertyValue("App.WindowsAppName") = Appnames(i)+" "+apptype(j)

Cheers

Lee