2 # create-version-itexi.py
7 #print "create-version-itexi.py"
12 myDir = os.path.dirname(sys.argv[0])
13 # use two abspaths to work around some windows python bug
14 topDir = os.path.join(os.path.abspath(myDir)+os.sep+'..'+os.sep+'..'+os.sep)
15 topDir = os.path.abspath( topDir )
17 version_file_path = os.path.join(topDir, "VERSION")
19 version_contents = open(version_file_path).readlines()
20 for line in version_contents:
21 if (line[0:14] == 'VERSION_STABLE'):
22 VERSION_STABLE = line[15:-1]
23 if (line[0:13] == 'VERSION_DEVEL'):
24 VERSION_DEVEL = line[14:-1]
26 def make_macro(name, string):
32 def make_download(name, osA, osB, version, revision, text):
33 string = "@uref{http://download.linuxaudio.org/lilypond/binaries/"
34 string += osA + "lilypond-"
35 string += version + "-" + revision
36 string += "." + osB + ",\n"
38 string += ": LilyPond "
39 string += version + "-" + revision
41 make_macro(name, string)
43 def make_download_source(name, vstring, version):
44 string = "@uref{http://download.linuxaudio.org/lilypond/sources/"
45 string += vstring + "/"
46 string += "lilypond-" + version + ".tar.gz"
48 string += "lilypond-" + version + ".tar.gz"
50 make_macro(name, string)
52 def make_all_downloads(macroName, version):
53 make_download("download"+macroName+"LinuxNormal", "linux-x86/",
54 "linux-x86.sh", version, "1", "Linux x86")
55 make_download("download"+macroName+"LinuxBig", "linux-64/",
56 "linux-64.sh", version, "1", "Linux 64")
57 make_download("download"+macroName+"LinuxPPC", "linux-ppc/",
58 "linux-ppc.sh", version, "1", "Linux PPC")
60 make_download("download"+macroName+"FreeBSDNormal", "freebsd-x86/",
61 "freebsd-x86.sh", version, "1", "FreeBSD i386")
62 make_download("download"+macroName+"FreeBSDBig", "freebsd-x86/",
63 "freebsd-64.sh", version, "1", "FreeBSD amd64")
65 make_download("download"+macroName+"DarwinNormal", "darwin-x86/",
66 "darwin-x86.tar.bz2", version, "1", "MacOS X x86")
67 make_download("download"+macroName+"DarwinPPC", "darwin-ppc/",
68 "darwin-ppc.tar.bz2", version, "1", "MacOS X PPC")
70 make_download("download"+macroName+"Windows", "mingw/",
71 "mingw.exe", version, "1", "Windows")
74 make_macro("versionStable", VERSION_STABLE)
75 make_macro("versionDevel", VERSION_DEVEL)
77 make_all_downloads("Stable", VERSION_STABLE)
78 make_all_downloads("Devel", VERSION_DEVEL)
80 # FIXME: icky hard-coding! -gp
81 make_download_source("downloadStableSource", "v2.12", VERSION_STABLE)
82 make_download_source("downloadDevelSource", "v2.13", VERSION_DEVEL)