Revision 42824 trunk/org.gvsig.desktop/org.gvsig.desktop.installer/src/main/packaging/gvspkg
gvspkg | ||
---|---|---|
23 | 23 |
VERBOSE = False |
24 | 24 |
SEARCH_VERSIONS = list() |
25 | 25 |
|
26 |
#LINUX_EXEC_EXTENSION=".run" # antes ".bin" |
|
27 |
|
|
28 | 26 |
class Platform: |
29 | 27 |
def __init__(self,os,arch,exe): |
30 | 28 |
self.os = os |
31 | 29 |
self.arch = arch |
32 | 30 |
self.exe_extension = exe |
33 |
|
|
34 |
def getOS(): |
|
31 |
|
|
32 |
def getOS(self):
|
|
35 | 33 |
return self.os |
36 |
|
|
37 |
def getArch(): |
|
34 |
|
|
35 |
def getArch(self):
|
|
38 | 36 |
return self.arch |
39 |
|
|
40 |
def getExeExtension(): |
|
37 |
|
|
38 |
def getExeExtension(self):
|
|
41 | 39 |
return self.exe_extension |
42 | 40 |
|
43 |
platforms = (
|
|
41 |
platforms = ( |
|
44 | 42 |
Platform("lin","x86",".run"), |
45 | 43 |
Platform("lin","x86_64",".run"), |
46 | 44 |
Platform("win","x86",".exe"), |
... | ... | |
867 | 865 |
item.getOwner() |
868 | 866 |
) |
869 | 867 |
html += """ </tbody>\n </table> |
870 |
<!--javascript para la visualizaci�n de la tabla y carga din�mica del contenido del enlace -->
|
|
868 |
<!--javascript para la visualizacion de la tabla y carga dinamica del contenido del enlace -->
|
|
871 | 869 |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> |
872 | 870 |
<script src="http://datatables.net/release-datatables/media/js/jquery.dataTables.js" type="text/javascript"></script> |
873 | 871 |
<script type="text/javascript" src="js/thickbox-compressed.js"></script> |
874 | 872 |
|
875 |
<!-- inicializaci�n de la tabla con cosas chachis -->
|
|
873 |
<!-- inicializaci�n de la tabla con cosas chachis -->
|
|
876 | 874 |
<script type="text/javascript"> |
877 | 875 |
$(document).ready(function() { |
878 | 876 |
$('#pkglist').dataTable( { |
... | ... | |
958 | 956 |
html += ' <tr valing="top"><th valing="top">%s </th><td>%s</td></tr>\n'%("Description", description) |
959 | 957 |
html += """ </tbody>\n</table>\n""" |
960 | 958 |
html += """ |
961 |
<!-- javascript para la visualizaci�n de la tabla -->
|
|
959 |
<!-- javascript para la visualizacion de la tabla -->
|
|
962 | 960 |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script> |
963 | 961 |
<script src="http://datatables.net/release-datatables/media/js/jquery.dataTables.js" type="text/javascript"></script> |
964 |
<!-- inicializaci�n de la tabla con cosas chachis -->
|
|
962 |
<!-- inicializaci�n de la tabla con cosas chachis -->
|
|
965 | 963 |
<script type="text/javascript"> |
966 | 964 |
$(document).ready(function() { |
967 | 965 |
$('#pkgdetails').dataTable( { |
... | ... | |
992 | 990 |
f.close() |
993 | 991 |
zf.close() |
994 | 992 |
|
993 |
|
|
994 |
def extract_mkexec(zfile, targetfolder): |
|
995 |
print "extract_mkexec: zfile=%s, target=%s" % (zfile, os.path.join(targetfolder,"mkexec")) |
|
996 |
zf = zipfile.ZipFile(zfile) |
|
997 |
data = zf.read("tools/mkexec") |
|
998 |
f = open(os.path.join(targetfolder,"mkexec"),"wb") |
|
999 |
f.write(data) |
|
1000 |
f.close() |
|
1001 |
zf.close() |
|
1002 |
|
|
1003 |
|
|
995 | 1004 |
def prepare_portable(args): |
996 | 1005 |
cmd = Command(args) |
997 | 1006 |
try: |
... | ... | |
1122 | 1131 |
if not os.path.isdir(portable_folder) : |
1123 | 1132 |
do_prepare_portable(build,state) |
1124 | 1133 |
os.system('cd %s ; ./make-portable' % (portable_folder)) |
1125 |
|
|
1134 |
|
|
1126 | 1135 |
message("Removing previos portable zip files") |
1127 | 1136 |
for platform in platforms : |
1128 | 1137 |
removefile(join(build_folder,"gvSIG-desktop-%s-%s-%s-%s-%s.zip" % (getVersion(),build,state,platform.getOS(),platform.getArch()))) |
... | ... | |
1134 | 1143 |
join(portable_folder,"gvSIG-desktop-%s-%s-%s-%s-%s" % (getVersion(),build,state,platform.getOS(),platform.getArch())), |
1135 | 1144 |
build_folder |
1136 | 1145 |
) |
1137 |
#message("Remove temporary folders")
|
|
1138 |
#shutil.rmtree(target_folder)
|
|
1146 |
message("Remove temporary folders") |
|
1147 |
shutil.rmtree(target_folder) |
|
1139 | 1148 |
|
1149 |
def mkexec(version, build, state, distribution_name, folder): |
|
1150 |
fname = "gvSIG-desktop-%s-%s-%s-lin-x86_64-online.zip" % (version,build,state) |
|
1151 |
extract_mkexec(os.path.join(folder,fname), folder) |
|
1152 |
mychmod(os.path.join(folder,"mkexec"),RWXALL) |
|
1153 |
cmd = 'cd %s ; ./mkexec "%s" "%s" "%s" "%s" "%s"' % (folder,version, build, state, distribution_name, folder) |
|
1154 |
print "mkexec: cmd=", cmd |
|
1155 |
os.system(cmd) |
|
1156 |
os.remove(os.path.join(folder,"mkexec")) |
|
1157 |
|
|
1140 | 1158 |
def mkdist(args): |
1141 | 1159 |
cmd = Command(args) |
1142 | 1160 |
try: |
... | ... | |
1187 | 1205 |
shutil.copyfile("packages.gvspki.md5", gvspki_filename +".md5") |
1188 | 1206 |
|
1189 | 1207 |
for platform in platforms: |
1190 |
message( "Creating installers for platform "+cur_os+"/"+cur_arch+"...")
|
|
1208 |
message( "Creating installers for platform "+platform.getOS()+"/"+platform.getArch()+"...")
|
|
1191 | 1209 |
gvspks_filename = "builds/"+build+"/gvSIG-desktop-" + VERSION + "-" + build+ "-" + state + "-"+platform.getOS()+"-"+platform.getArch()+".gvspks" |
1192 | 1210 |
online_filename = "builds/"+build+"/gvSIG-desktop-" + VERSION + "-" + build+ "-" + state + "-"+platform.getOS()+"-"+platform.getArch() + "-online.jar" |
1193 | 1211 |
|
... | ... | |
1206 | 1224 |
mychmod(online_filename+".md5",RWALL) |
1207 | 1225 |
|
1208 | 1226 |
|
1209 |
executeCommand("mkinstall" , "--addjre"+platform.getOS(), online_filename, gvspks_filename)
|
|
1227 |
executeCommand("mkinstall" , online_filename, gvspks_filename) |
|
1210 | 1228 |
|
1211 | 1229 |
message( "Renaming files from custom to standard...") |
1212 | 1230 |
target_filename = "builds/"+build+"/gvSIG-desktop-" + VERSION + "-" + build+ "-" + state + "-"+platform.getOS()+"-"+platform.getArch()+"-"+distribution_name + ".jar" |
... | ... | |
1221 | 1239 |
|
1222 | 1240 |
message( "Createds installers for platform "+platform.getOS()+"/"+platform.getArch()+"\n") |
1223 | 1241 |
|
1242 |
mkexec(VERSION, build, state, distribution_name, os.path.join(os.getcwd(), "builds", build)) |
|
1243 |
|
|
1224 | 1244 |
message( "Coping html index to browse paqueges of the distro.") |
1225 | 1245 |
shutil.rmtree("builds/"+build+"/web", ignore_errors=True) |
1226 | 1246 |
shutil.copytree("web", "builds/"+build+"/web") |
... | ... | |
1235 | 1255 |
message( "\nCreation of distribution completed.\n") |
1236 | 1256 |
|
1237 | 1257 |
|
1238 |
|
|
1239 |
|
|
1240 | 1258 |
def show(args): |
1241 | 1259 |
cmd = Command(args) |
1242 | 1260 |
try: |
... | ... | |
1682 | 1700 |
No crea el fichero gvspks, solo crea el gvspki |
1683 | 1701 |
|
1684 | 1702 |
-I full-path-to-package | --include full-path-to-package |
1685 |
A�ade el paquete indicado a la lista de paquetes aunque no coincida para
|
|
1703 |
Agrega el paquete indicado a la lista de paquetes aunque no coincida para
|
|
1686 | 1704 |
la version de gvSIG con la que se esta trabajando. |
1687 | 1705 |
|
1688 | 1706 |
mkdist [OPTIONS] |
Also available in: Unified diff