SD script to set icon and Bundle ID according to script name?

The answer to this is probably No, but it seemed worth asking. I have an AppleScript app that uses the DOSBox emulator to run two different versions of the old WordPerfect for DOS word-processor. The app decides which version to run depending on the name of the app. This lets me use the same code for two diferent apps - and the only difference between them is the Bundle ID and the application icon.

I don’t mind making this change by hand, but is there an easy way to script this, so that SD would assign the correct icon and the correct bundle ID depending on the name of the script?

I tried to figure this out on my own, without success, and I’m only asking in the hope that someone has already done something that I can adapt for this purpose.