How to duplicate an example project with vsrename
At some point you're probably going to say, “Hey, I understand what's going on, and I want to build my new game, Laser Cats, based on RTSimpleApp.” (or RT3DApp, etc)
Proton uses hundreds of files and it's a complete chore to attempt to create Windows, iOS, webOS, BBX, OSX, and Android projects/scripts from scratch.
So let me introduce you to my secret little friend I've used for the last ten years or so…
Smart renaming with vsrename (Windows only)
WARNING: This doesn't edit the file linux/linux_compile.sh right, it changes it to have DOS end of lines. You will have to manually change this back using Notepad++ (Edit→EOL Conversion→Unix LF) or something if you're doing linux compiles from linux!
First, grab vsrename (Visual Studio Project Renamer) - what it does is intelligently search and replace in file names and inside text file (it can figure out what is a text file or not) in an entire directory tree. Don't let the Visual Studio in the name fool you, it doesn't really care what files it works on.
It's smart enough to ignore files that contains characters that signal it's not a text file. (ie, it won't touch binaries and the like)
Grab vsrename.exe and throw it somewhere in your path to get ready.
For this example, we'll assume you want to clone RTSimpleApp into your new app, LaserCats
- Step 0: (optional?) Remove any temp build files from the RTSimpleApp dir, or start from a fresh checkout
- Step 1: Cut and paste the RTSimpleApp dir to the same directory and name it lasercats.
- Step 2: Open a dos prompt in the new lasercats directory
- Step 3: From the prompt, run “vsrename RTSimpleApp lasercats ./“ without the quotes. It should run through and do all the replacing and renaming. Isn't that bad-ass?! All source files, make files, bat files, etc, are scanned.
- Step 4: Also run “vsrename com.rtsoft com.mycompany ./“ (Replace mycompany with your .com name.
Now, at this point you can open windows/lasercats.sln and build the game for windows and it should work. (Don't forget to rebuild your resources with media/build_media.bat )
Don't use an underscore in the name, it screws up the android build.
If you're doing Android, you'll probably want to look over the following files by hand to tweak things:
- android/AndroidManifest.xml (change the name of the app, might be in two places in this file)
- android/res/values/strings.xml (to change the display name of the app, unless it was hardcoded in the manifest)
- android/res/drawable/icon.png (change the app icon)
- android/build_prepare.bat (any special needs for file resource file copying you would add here)
And there you go, more or less ready. Keep in mind you can't move this project directory anywhere, you need to keep it in the same directory as proton's shared directory, as most of the scripts and tools use relative paths to minimize setup.
It IS possible to do directory checkout of your own svn located inside of your svn proton checkout btw - it's what I do for client projects, works like charm.
For linux users… ermm… well, check this out?