Changeset 4122 for pjproject/trunk/pjsip-apps/src/python/setup-vc.py
- Timestamp:
- May 14, 2012 11:04:46 AM (12 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk
- Property svn:mergeinfo changed
/pjproject/branches/1.x merged: 4116-4117,4119,4121
- Property svn:mergeinfo changed
-
pjproject/trunk/pjsip-apps/src/python/setup-vc.py
r2394 r4122 25 25 # Find version 26 26 pj_version="" 27 f = open('../../../pjlib/src/pj/config.c', 'r') 27 pj_version_major="" 28 pj_version_minor="" 29 pj_version_rev="" 30 pj_version_suffix="" 31 f = open('../../../version.mak', 'r') 28 32 for line in f: 29 if line.find("PJ_VERSION") != -1: 30 pj_version = line.split("=")[1].strip('";\r\n ') 31 break 33 if line.find("export PJ_VERSION_MAJOR") != -1: 34 tokens=line.split("=") 35 if len(tokens)>1: 36 pj_version_major= tokens[1].strip() 37 elif line.find("export PJ_VERSION_MINOR") != -1: 38 tokens=line.split("=") 39 if len(tokens)>1: 40 pj_version_minor= line.split("=")[1].strip() 41 elif line.find("export PJ_VERSION_REV") != -1: 42 tokens=line.split("=") 43 if len(tokens)>1: 44 pj_version_rev= line.split("=")[1].strip() 45 elif line.find("export PJ_VERSION_SUFFIX") != -1: 46 tokens=line.split("=") 47 if len(tokens)>1: 48 pj_version_suffix= line.split("=")[1].strip() 49 32 50 f.close() 33 if pj_version=="":34 print 'Unable to get PJ_ pj_version'51 if not pj_version_major: 52 print 'Unable to get PJ_VERSION_MAJOR' 35 53 sys.exit(1) 54 55 pj_version = pj_version_major + "." + pj_version_minor 56 if pj_version_rev: 57 pj_version += "." + pj_version_rev 58 if pj_version_suffix: 59 pj_version += "-" + pj_version_suffix 60 36 61 #print 'PJ_VERSION = "'+ pj_version + '"' 62 37 63 38 64 # Check that extension has been built
Note: See TracChangeset
for help on using the changeset viewer.