Ejemplo n.º 1
0
def publish_menu(d):
    code, tag = d.menu("publish for:",
                       choices=[
                           ("(windows)", "Publish for windows"),
                           ("(linux)", "Publish for linux"),
                           ("(github)", "Publish to github"),
                           ("(materials)", "Publish to the materials"),
                       ])
    if code == d.OK:
        if tag == "(windows)":
            publish_src(d, publication_mode="windows")
            #os.system("./pub.sh --windows &>out.dat &")
            ret = d.tailbox("out.dat", height=None, width=100)

#		if tag=="(debian)":
#			os.system("./pub.sh --debian")

        if tag == "(linux)":
            publish_src(d, publication_mode="gpl_distro")

        if tag == "(github)":
            #os.system("./pub.sh --github &>out.dat &")
            publish_src(d, publication_mode="gpl_distro")
            ret = d.tailbox("out.dat", height=None, width=100)
            to_github(d)
            src_to_web(d)
        if tag == "(materials)":
            publish_materials_to_web(d)

        print(tag)
Ejemplo n.º 2
0
hpc = False
win = False
usear = True

# You may want to use 'autowidgetsize=True' here (requires pythondialog >= 3.1)
d = Dialog(dialog="dialog")
#dnf_install(d,["gnuplot"])
#sys.exit(0)

if args.buildlinuxpackage:
    ret = platform.dist()
    distro = ret[0]
    rel = ret[1]
    if distro == "fedora":
        publish_src(None, publication_mode="gpl_distro")
        make_rmp_dir(None)
        package_to_lib()
        #rpm_to_web(None)
    elif distro == "Ubuntu":
        publish_src(None, distro="debian", publication_mode="gpl_distro")
        make_deb(None)
    elif distro == "debian":
        publish_src(None, distro="debian", publication_mode="gpl_distro")
        make_deb(None)
    else:
        print("distro not known", distro)

    sys.exit(0)

# Dialog.set_background_title() requires pythondialog 2.13 or later