This is the essence of what the deployment tool is designed to do. Simplistically, the process of creating the first Deployment Version in an Application from beginning to end is as follows:
The crux of successfully deploying an application is to Plan your Deployment, including the necessary objects and using the appropriate Options and Settings to define the Version.