Skip to content

Instantly share code, notes, and snippets.

@sbaer
Created October 31, 2014 06:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sbaer/e73f2d0f9e53c086b1e1 to your computer and use it in GitHub Desktop.
Save sbaer/e73f2d0f9e53c086b1e1 to your computer and use it in GitHub Desktop.
post build fie rename for RhinoCommon builds
"""
Post-Build script for RhinoCommon plug-in projects.
Make sure this file is in the same directory as your plug-in
project. In Xamarin Studio under project properties, add the following
to Custom Commands->After Build
python monobuild.py ${TargetFile}
Also make sure to set your project's build output to build to the MacPlugIns
directory
ex.
/Users/steve/Library/Application Support/McNeel/Rhinoceros/MacPlugIns/HelloMonoPlugIn
"""
import sys, os, string, shutil
oldname = sys.argv[1]
for i in range(2,len(sys.argv)):
oldname += " " + sys.argv[i]
newname = string.replace(oldname, ".dll", ".rhp")
os.rename(oldname, newname)
os.rename(oldname+".mdb", newname+".mdb")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment