OSDN Git Service

fix install error.
authorgn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 6 Dec 2010 07:15:20 +0000 (07:15 +0000)
committergn64_jp <gn64_jp@4e526526-5e11-4fc0-8910-f8fd03428081>
Mon, 6 Dec 2010 07:15:20 +0000 (07:15 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/rec10@791 4e526526-5e11-4fc0-8910-f8fd03428081

rec10/trunk/src/Makefile.base
rec10/trunk/src/chdata.py
rec10/trunk/src/chdb.py
rec10/trunk/src/dbMySQL.py
rec10/trunk/src/install.py

index 9e47123..1efbb77 100644 (file)
@@ -1,7 +1,7 @@
 PREFIX = /usr/local/share
 MAJOR = 0
 MINOR = 9
-REVISION = 8
+REVISION = 10
 VER = $(MAJOR).$(MINOR).$(REVISION)
 
 DEST = $(PREFIX)/rec10
@@ -9,7 +9,6 @@ DEST = $(PREFIX)/rec10
 install:
        if ! [ -d $(PREFIX)/rec10 ]; then mkdir -p $(PREFIX)/rec10 ;fi
        cp ./*.py $(DEST)/
-       cp ./*.xml $(DEST)/
        echo -e "#!/bin/bash" > ./rec10
        echo -e "if type -P python2.6 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python2.6 ${DEST}/rec10d.py" >> ./rec10
        echo -e "elif type -P python26 > /dev/null\nthen\nexport LANG=\"ja_JP.UTF-8\" && python26 ${DEST}/rec10d.py\n" >> ./rec10
index 2e6e095..6f34b67 100644 (file)
@@ -28,5 +28,8 @@ def getChList(xmlpath):
         ontv=ch.getAttribute("ontvcode")\r
         chlist.append([bctype,ontv,chtxt,chd,csch])\r
     return chlist\r
+def deleteChListALL():\r
+    rec10d.rec10db.new_epg_ch()\r
 if __name__ == "__main__":\r
+    deleteChListALL()\r
     scan_ch.searchCh()\r
index 82cefcf..3eca8e6 100644 (file)
@@ -71,4 +71,4 @@ def update():
             ret.append(bctype)
     return ret
 def changeCHShow(chtxt,isshow):
-    rec10d.rec10db.change_isshow_epg_ch(chtxt, isshow)
\ No newline at end of file
+    rec10d.rec10db.change_visible_epg_ch(chtxt, isshow)
\ No newline at end of file
index 6f74f6f..4486f54 100644 (file)
@@ -95,7 +95,7 @@ class DB_MySQL:
             chname VARCHAR(100),\
             updatetime DATETIME,\
             status TINYINT,\
-            isshow TINYINT DEFAULT 1\
+            visible TINYINT DEFAULT 1\
             )')
         except Exception, inst:
             if not ((type(inst)==MySQLdb.ProgrammingError and inst[0]==1007)or(type(inst)==MySQLdb.OperationalError and inst[0]==1050)):
@@ -109,6 +109,11 @@ class DB_MySQL:
         VALUES (%s,%s,%s,%s,"",%s,%s,%s)', \
                       (bctype, chtxt, ch, csch, updatetime, "1","1"))
         self.close_db(db)
+    def delete_all_epg_ch(self):
+        db = self.connect_db()
+        db[1].execute('\
+        DROP TABLE epg_ch ')
+        self.close_db(db)
     def select_by_chtxt_epg_ch(self, chtxt):
         db = self.connect_db()
         dbexe = db[1].execute("\
@@ -179,10 +184,10 @@ class DB_MySQL:
             r[4] = r[4].strftime("%Y-%m-%d %H:%M:%S")
             ret.append(r)
         return ret
-    def change_isshow_epg_ch(self,chtxt,isshow):
+    def change_visible_epg_ch(self,chtxt,visible):
         db = self.connect_db()
         db[1].execute("\
-        UPDATE epg_ch SET isshow=%s WHERE chtxt=%s",(isshow,chtxt))
+        UPDATE epg_ch SET visible=%s WHERE chtxt=%s",(visible,chtxt))
         self.close_db(db)
     def set_new_status(self,dhour):
         db = self.connect_db()
index ef9f3b4..519f6f8 100644 (file)
@@ -84,15 +84,15 @@ def move():
     path = str(os.path.dirname(os.path.abspath(__file__)))\r
     printutf8(u"rec10 ver "+recdblist.version_str+" installer.")\r
     printutf8(u"rec10のインストールを開始します。")\r
-    maxn=16\r
-    configwriter.setTempConfPath(u"wine", getpath(u"wine"))\r
-    configwriter.setTempConfPath(u"recpt1", getpath(u"recpt1"))\r
-    #configwriter.setpath(u"x264", getpath(u"x264"))\r
-    configwriter.setTempConfPath(u"mp4box", getpath(u"MP4Box"))\r
-    configwriter.setTempConfPath(u"mencoder", getpath(u"mencoder"))\r
-    configwriter.setTempConfPath(u"ffmpeg", getpath(u"ffmpeg"))\r
-    configwriter.setTempConfPath(u"mkvmerge", getpath(u"mkvmerge"))\r
-    configwriter.setTempConfPath(u"b25", getpath(u"b25"))\r
+    maxn=13\r
+    configwriter.setTempConfPath(u"wine", getLocalPath(u"wine"))\r
+    configwriter.setTempConfPath(u"recpt1", getLocalPath(u"recpt1"))\r
+    #configwriter.setpath(u"x264", getLocalPath(u"x264"))\r
+    configwriter.setTempConfPath(u"mp4box", getLocalPath(u"MP4Box"))\r
+    configwriter.setTempConfPath(u"mencoder", getLocalPath(u"mencoder"))\r
+    configwriter.setTempConfPath(u"ffmpeg", getLocalPath(u"ffmpeg"))\r
+    configwriter.setTempConfPath(u"mkvmerge", getLocalPath(u"mkvmerge"))\r
+    configwriter.setTempConfPath(u"b25", getLocalPath(u"b25"))\r
     printutf8(u"必須環境の設定が完了しました")\r
     printutf8(u"個人設定に入ります")\r
     if os.path.exists("/etc/rec10.conf"):\r
@@ -146,7 +146,7 @@ def move():
     printutf8(u"x264のパスを指定してください(7/"+str(maxn)+")")\r
     x264path=getConf(useB,"/etc/rec10.conf","path","x264","x264 path : ")\r
     if x264path.replace(" ","")=="" or not os.path.isfile(x264path):\r
-        x264path=getpath(u"x264")\r
+        x264path=getLocalPath(u"x264")\r
     configwriter.setTempConfPath("x264",x264path)\r
     printutf8(u"保存する画質を教えてください(8/"+str(maxn)+")")\r
     printutf8(u"x264のcrfの値です。標準だと30分で800MBほどになります")\r
@@ -183,48 +183,7 @@ def move():
     else:\r
         removeTS="0"\r
     configwriter.setTempConfEnv("remove_ts", removeTS)\r
-    printutf8(u"チャンネルの設定に入ります(13/"+str(maxn)+")")\r
-    printutf8(u"rec10を設置する地域を選んでください。")\r
-    printutf8(u"1:東京 2:神戸 3:名古屋 4:その他")\r
-    ch=raw_input()\r
-    ch=int(ch)\r
-    if ch==1:\r
-        try:\r
-            shutil.copy(os.path.join(path,"chlist_sample_tokyo.xml"),os.path.join(path,"chlist.xml"))\r
-        except:\r
-            printutf8(u"既存のchlis.xmlを上書きできないため、前のものを使います。")\r
-    elif ch==2:\r
-        try:\r
-            shutil.copy(os.path.join(path,"chlist_sample_kobe.xml"),os.path.join(path,"chlist.xml"))\r
-        except:\r
-            printutf8(u"既存のchlis.xmlを上書きできないため、前のものを使います。")\r
-    elif ch==3:\r
-        try:\r
-            shutil.copy(os.path.join(path,"chlist_sample_nagoya.xml"),os.path.join(path,"chlist.xml"))\r
-        except:\r
-            printutf8(u"既存のchlis.xmlを上書きできないため、前のものを使います。")\r
-    elif ch==4:\r
-        if not os.path.exists(os.path.join(path,"chlist.xml")):\r
-            printutf8(u"チャンネルの設定が必要です。")\r
-            printutf8(u"chlist_sample_*を参考にchlist.xmlを作成した後に次のステップに進んでください。")\r
-            time.sleep(5)\r
-    printutf8(u"BS放送は受信可能ですか?(14/"+str(maxn)+")")\r
-    bsok=raw_input("y/N:")\r
-    if bsok=="Y" or bsok == "y" :\r
-        bsok="1"\r
-    else:\r
-        bsok="0"\r
-    configwriter.setTempConfEnv("bs", bsok)\r
-    printutf8(u"CS放送(スカパーe2)は受信可能ですか?(15/"+str(maxn)+")")\r
-    csok=raw_input("y/N:")\r
-    if csok=="Y" or csok == "y" :\r
-        csok="1"\r
-        printutf8(u"標準パックの番組は入力してありますがそれ以外は追加でchlist_cs.xmlに追加する必要があります。")\r
-    else:\r
-        csok="0"\r
-    configwriter.setTempConfEnv("cs", csok)\r
-\r
-    printutf8(u"自機識別オプション(16/"+str(maxn)+")")\r
+    printutf8(u"自機識別オプション(13/"+str(maxn)+")")\r
     printutf8(u"本rec10の識別名を入力してください")\r
     printutf8(u"複数台のrec10を運用する場合に効果的です。空白でもかまいません。")\r
     printutf8(u"例 kobe01")\r