Revision 42946 trunk/org.gvsig.desktop/org.gvsig.desktop.installer/src/main/packaging/gvspkg
gvspkg | ||
---|---|---|
24 | 24 |
SEARCH_VERSIONS = list() |
25 | 25 |
|
26 | 26 |
class Platform: |
27 |
def __init__(self,os,arch,exe,onlinefamily=None): |
|
27 |
def __init__(self,os,arch,exe,onlinefamily=None, portableSufix=""):
|
|
28 | 28 |
self.osfamily = None |
29 | 29 |
self.osname = None |
30 | 30 |
self.osversion = None |
31 | 31 |
self.os = os |
32 | 32 |
self.arch = arch |
33 | 33 |
self.exe_extension = exe |
34 |
if onlinefamily == None: |
|
35 |
self.onlinefamily = self.osfamily |
|
36 |
else: |
|
37 |
self.onlinefamily = onlinefamily |
|
34 |
self.portableSufix = portableSufix |
|
38 | 35 |
if "_" in self.os: |
39 | 36 |
ss=self.os.split("_") |
40 | 37 |
self.osfamily = ss[0] |
... | ... | |
44 | 41 |
self.osversion= ss[2] |
45 | 42 |
else: |
46 | 43 |
self.osfamily = self.os |
44 |
if onlinefamily == None: |
|
45 |
self.onlinefamily = self.osfamily |
|
46 |
else: |
|
47 |
self.onlinefamily = onlinefamily |
|
47 | 48 |
|
48 | 49 |
def getOS(self): |
49 | 50 |
return self.os |
... | ... | |
53 | 54 |
|
54 | 55 |
def getOSFamilyForOnlineInstaller(self): |
55 | 56 |
return self.onlinefamily |
56 |
|
|
57 |
|
|
57 | 58 |
def getOSName(self): |
58 | 59 |
return self.osname |
59 | 60 |
|
... | ... | |
66 | 67 |
def getExeExtension(self): |
67 | 68 |
return self.exe_extension |
68 | 69 |
|
70 |
def getPortableSufix(self): |
|
71 |
return self.portableSufix |
|
72 |
|
|
69 | 73 |
platforms = ( |
70 |
Platform("darwin_macos_10.11","x86_64",".run","lin"),
|
|
74 |
Platform("darwin_macos_10.11","x86_64",".run",onlinefamily="lin", portableSufix=".app"),
|
|
71 | 75 |
Platform("lin_ubuntu_16.04","x86_64",".run"), |
72 | 76 |
Platform("lin","x86",".run"), |
73 | 77 |
Platform("lin","x86_64",".run"), |
... | ... | |
1171 | 1175 |
for platform in platforms : |
1172 | 1176 |
message("Moving zip gvSIG-desktop-%s-%s-%s-%s-%s.zip" % (getVersion(),build,state,platform.getOS(),platform.getArch())) |
1173 | 1177 |
shutil.move( |
1174 |
join(portable_folder,"target","gvSIG-desktop-%s-%s-%s-%s-%s.zip" % (getVersion(),build,state,platform.getOS(),platform.getArch())), |
|
1178 |
join(portable_folder,"target","gvSIG-desktop-%s-%s-%s-%s-%s%s.zip" % ( |
|
1179 |
getVersion(), build, state, platform.getOS(), platform.getArch(), platform.getPortableSufix() |
|
1180 |
) |
|
1181 |
), |
|
1175 | 1182 |
build_folder |
1176 | 1183 |
) |
1177 | 1184 |
message("Remove temporary folders") |
... | ... | |
1241 | 1248 |
online_filename = "builds/"+build+"/gvSIG-desktop-" + VERSION + "-" + build+ "-" + state + "-"+platform.getOS()+"-"+platform.getArch() + "-online.jar" |
1242 | 1249 |
|
1243 | 1250 |
if not os.path.isfile(online_filename): |
1244 |
message("Coping standard online installer from os family to %s." % online_filename) |
|
1245 | 1251 |
osfamily=platform.getOSFamilyForOnlineInstaller() |
1252 |
message("Coping standard online installer from os family (%s) to %s." % (osfamily, online_filename)) |
|
1246 | 1253 |
shutil.copyfile( |
1247 | 1254 |
"builds/"+build+"/gvSIG-desktop-" + VERSION + "-" + build+ "-" + state + "-"+osfamily+"-"+platform.getArch() + "-online.jar", |
1248 | 1255 |
online_filename |
Also available in: Unified diff