Whose rules do you follow when installing electrical systems in mobile vehicles and trailers?

For example I was involved in a project that was a mobile control center for a remote robotic system. The trailer was setup to connect to an outside power source, with either a generator or building feed. I assume that when we were connected to a generator, we needed to bond the neutral to the ground, but when we were fed from an existing service, we could not double bond the neutral to the ground.

What are the rules for the portable X-ray or dentistry trailers?

How about the panel truck that has a small workshop in it with lights, air compressor, and convience outlets for small power tools?

How about the portable video studios for large public entertainment events like the Superbowl or award shows?