From 529dd000962d6dd8bb7e716d5d9ad5313ea2a3f6 Mon Sep 17 00:00:00 2001 From: Stephen Dranger Date: Fri, 4 Mar 2011 18:25:43 -0600 Subject: [PATCH] linux install stuff --- linux_pesterchum.sh | 0 setup.py | 42 +++++++++++++++++++++++++++--------------- 2 files changed, 27 insertions(+), 15 deletions(-) mode change 100644 => 100755 linux_pesterchum.sh diff --git a/linux_pesterchum.sh b/linux_pesterchum.sh old mode 100644 new mode 100755 diff --git a/setup.py b/setup.py index 4be7a2a..92bb6e6 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,7 @@ from cx_Freeze import setup, Executable import sys import os +import os.path import shutil if sys.platform == "win32": @@ -19,21 +20,32 @@ setup( )]) if sys.platform == "win32": os.rename("build/exe.win32-2.6", "build/pesterchum") + pcloc = "build/pesterchum" else: - os.rename("build/exe.linux-x86_64-2.6", "build/pesterchum") + os.mkdir("build/pesterchum") + if os.path.exists("build/exe.linux-x86_64-2.6"): + os.rename("build/exe.linux-x86_64-2.6", "build/pesterchum/pesterchum3.14") + else: + os.rename("build/exe.linux-i686-2.6", "build/pesterchum/pesterchum3.14") + pcloc = "build/pesterchum/pesterchum3.14" -shutil.copytree("themes", "build/pesterchum/themes") -#shutil.copytree("imageformats", "build/pesterchum/imageformats") -shutil.copytree("smilies", "build/pesterchum/smilies") -shutil.copy("pesterchum.js", "build/pesterchum/") -#shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/msvcm90.dll", "build/pesterchum") -#shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/msvcp90.dll", "build/pesterchum") -#shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/msvcr90.dll", "build/pesterchum") +shutil.copytree("themes", "%s/themes" % (pcloc)) +#shutil.copytree("imageformats", "%s/imageformats" % (pcloc)) +shutil.copytree("smilies", "%s/smilies" % (pcloc)) +f = open("%s/pesterchum.js" % (pcloc), 'w') +f.write("{\"tabs\":true, \"chums\":[]}") +f.close() +#shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/msvcm90.dll", "%s" % (pcloc)) +#shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/msvcp90.dll", "%s" % (pcloc)) +#shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/msvcr90.dll", "%s" % (pcloc)) #shutil.copy("C:/Dev/Py26MSdlls-9.0.21022.8/msvc/x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.21022.8_x-ww_d08d0375.manifest", -# "build/pesterchum") -#shutil.copy("pesterchum.nsi", "build/pesterchum/") -#shutil.copy("pesterchum-update.nsi", "build/pesterchum/") -os.mkdir("build/pesterchum/profiles") -os.mkdir("build/pesterchum/logs") -shutil.copy("logs/chums.js", "build/pesterchum/logs") -shutil.copy("readme.txt", "build/pesterchum/") +# "%s" % (pcloc)) +#shutil.copy("pesterchum.nsi", "%s/" % (pcloc)) +#shutil.copy("pesterchum-update.nsi", "%s/ % (pcloc)") +os.mkdir("%s/profiles" % (pcloc)) +os.mkdir("%s/logs" % (pcloc)) +shutil.copy("logs/chums.js", "%s/logs" % (pcloc)) +shutil.copy("readme.txt", "%s/" % (pcloc)) +shutil.copy("themes.txt", "%s/" % (pcloc)) +shutil.copy("linux_pesterchum.sh", "build/pesterchum/pesterchum") +