]> git.donarmstrong.com Git - lilypond.git/blob - scripts/build/create-version-itexi.py
Merge branch 'master' into lilypond/translation
[lilypond.git] / scripts / build / create-version-itexi.py
1 #!@PYTHON@
2 # create-version-itexi.py
3
4 import sys
5 import os
6
7 #print "create-version-itexi.py"
8
9 VERSION_STABLE = ""
10 VERSION_DEVEL = ""
11
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 )
16
17 version_file_path = os.path.join(topDir, "VERSION")
18
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]
25
26 def make_macro(name, string):
27         print "@macro", name
28         print string
29         print "@end macro"
30         print ""
31
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"
37         string += text
38         string += ": LilyPond "
39         string += version + "-" + revision
40         string += "}"
41         make_macro(name, string)
42
43 def make_all_downloads(macroName, version):
44         make_download("download"+macroName+"LinuxNormal", "linux-x86/",
45                 "linux-x86.sh", version, "1", "Linux x86")
46         make_download("download"+macroName+"LinuxBig", "linux-64/",
47                 "linux-64.sh", version, "1", "Linux 64")
48         make_download("download"+macroName+"LinuxPPC", "linux-ppc/",
49                 "linux-ppc.sh", version, "1", "Linux PPC")
50         
51         make_download("download"+macroName+"FreeBSDNormal", "freebsd-x86/",
52                 "freebsd-x86.sh", version, "1", "FreeBSD i386")
53         make_download("download"+macroName+"FreeBSDBig", "freebsd-x86/",
54                 "freebsd-64.sh", version, "1", "FreeBSD amd64")
55         
56         make_download("download"+macroName+"DarwinNormal", "darwin-x86/",
57                 "darwin-x86.tar.bz2", version, "1", "MacOS X x86")
58         make_download("download"+macroName+"DarwinPPC", "darwin-ppc/",
59                 "darwin-ppc.tar.bz2", version, "1", "MacOS X PPC")
60
61         make_download("download"+macroName+"Windows", "mingw/",
62                 "mingw.exe", version, "1", "Windows")
63
64
65 make_macro("versionStable", VERSION_STABLE)
66 make_macro("versionDevel", VERSION_DEVEL)
67
68 make_all_downloads("Stable", VERSION_STABLE)
69 make_all_downloads("Devel", VERSION_DEVEL)
70