修訂 | fb8a22036223f821f5ae35e3c8706ca95f983234 (tree) |
---|---|
時間 | 2009-01-25 18:38:17 |
作者 | cvs2git <cvs2git> |
Commiter | cvs2git |
This commit was manufactured by cvs2svn to create tag 'v1_59_0_772'.
@@ -1882,61 +1882,31 @@ const | ||
1882 | 1882 | VAL_PON = 'PON='; |
1883 | 1883 | EXPIRES_MARK = 'expires='; |
1884 | 1884 | var |
1885 | - i, pos: Integer; | |
1885 | +// i: Integer; | |
1886 | 1886 | tmp : string; |
1887 | 1887 | val : string; |
1888 | - curCookies : TStringList; | |
1889 | - tmpCookieName : string; | |
1890 | 1888 | begin |
1891 | - // 2008.12.14 無条件クリアしてはいけない by もじゅ | |
1892 | - curCookies := TStringList.Create; | |
1893 | - curCookies.Delimiter := ';'; | |
1894 | - curCookies.DelimitedText := ABoard.Cookie; | |
1895 | 1889 | ABoard.Cookie := ''; |
1896 | - try | |
1897 | - while (AnsiPos(COOKIE_MARK, Rawtext) > 0 ) do begin | |
1898 | - tmp := Copy(Rawtext, AnsiPos(COOKIE_MARK, Rawtext) + Length(COOKIE_MARK), Length(Rawtext)); | |
1899 | - Delete(Rawtext, 1, AnsiPos('Set-Cookie', Rawtext)+ Length(COOKIE_MARK)); | |
1900 | - //Cookieを切り出す | |
1901 | - val := Trim(GikoSys.GetTokenIndex(tmp, ';', 0)); | |
1902 | - if( AnsiPos(VAL_SPID, val) > 0 ) then begin | |
1903 | - ABoard.SPID := Copy(val, AnsiPos(VAL_SPID, val) + Length(VAL_SPID), Length(val)); | |
1904 | - end else if( AnsiPos(VAL_PON, val) > 0 ) then begin | |
1905 | - ABoard.PON := Copy(val, AnsiPos(VAL_PON, val) + Length(VAL_PON), Length(val)); | |
1906 | - end else begin | |
1907 | - // 既存のCookieの場合は値だけ付け替える | |
1908 | - pos := AnsiPos('=', val); | |
1909 | - if pos > 0 then begin | |
1910 | - tmpCookieName := Copy(val, 0, pos - 1); | |
1911 | - for i := 0 to curCookies.Count - 1 do begin | |
1912 | - if (curCookies.IndexOfName(tmpCookieName) >= 0) then begin | |
1913 | - curCookies.Values[tmpCookieName] := Copy(val, pos + 1, Length(val)); | |
1914 | - tmpCookieName := ''; | |
1915 | - break; | |
1916 | - end; | |
1917 | - end; | |
1918 | - if (tmpCookieName <> '') then begin | |
1919 | - curCookies.Add(val); | |
1920 | - end; | |
1921 | - end; | |
1922 | - //tmpCookie := tmpCookie + val + '; '; | |
1923 | - end; | |
1924 | - //expiresを切り出す | |
1925 | - val := Trim(GikoSys.GetTokenIndex(tmp, ';', 1)); | |
1926 | - if( AnsiPos(EXPIRES_MARK, val) > 0) then begin | |
1927 | - Delete(val, 1, AnsiPos(EXPIRES_MARK, val) + Length(EXPIRES_MARK) - 1); | |
1928 | - ABoard.Expires := GMTToLocalDateTime(val); | |
1929 | - end; | |
1930 | - end; | |
1931 | - for i := 0 to curCookies.Count - 1 do begin | |
1932 | - if (curCookies.Strings[i] <> '') then begin | |
1933 | - ABoard.Cookie := ABoard.Cookie + curCookies.Strings[i] + '; '; | |
1934 | - end; | |
1935 | - end; | |
1936 | - | |
1937 | - finally | |
1938 | - curCookies.Free; | |
1939 | - end; | |
1890 | + while (AnsiPos(COOKIE_MARK, Rawtext) > 0 ) do begin | |
1891 | + //i := 0; | |
1892 | + tmp := Copy(Rawtext, AnsiPos(COOKIE_MARK, Rawtext) + Length(COOKIE_MARK), Length(Rawtext)); | |
1893 | + Delete(Rawtext, 1, AnsiPos('Set-Cookie', Rawtext)+ Length(COOKIE_MARK)); | |
1894 | + //Cookieを切り出す | |
1895 | + val := Trim(GikoSys.GetTokenIndex(tmp, ';', 0)); | |
1896 | + if( AnsiPos(VAL_SPID, val) > 0 ) then begin | |
1897 | + ABoard.SPID := Copy(val, AnsiPos(VAL_SPID, val) + Length(VAL_SPID), Length(val)); | |
1898 | + end else if( AnsiPos(VAL_PON, val) > 0 ) then begin | |
1899 | + ABoard.PON := Copy(val, AnsiPos(VAL_PON, val) + Length(VAL_PON), Length(val)); | |
1900 | + end else begin | |
1901 | + ABoard.Cookie := ABoard.Cookie + val + '; '; | |
1902 | + end; | |
1903 | + //expiresを切り出す | |
1904 | + val := Trim(GikoSys.GetTokenIndex(tmp, ';', 1)); | |
1905 | + if( AnsiPos(EXPIRES_MARK, val) > 0) then begin | |
1906 | + Delete(val, 1, AnsiPos(EXPIRES_MARK, val) + Length(EXPIRES_MARK) - 1); | |
1907 | + ABoard.Expires := GMTToLocalDateTime(val); | |
1908 | + end; | |
1909 | + end; | |
1940 | 1910 | end; |
1941 | 1911 | //! hiddenデータ取得 |
1942 | 1912 | procedure TEditorForm.GetHiddenParameter(Rawtext: String; ABoard: TBoard); |
@@ -7609,6 +7609,12 @@ object GikoForm: TGikoForm | ||
7609 | 7609 | object N84: TMenuItem |
7610 | 7610 | Caption = '-' |
7611 | 7611 | end |
7612 | + object UpdateGikonaviAction1: TMenuItem | |
7613 | + Action = GikoDM.UpdateGikonaviAction | |
7614 | + end | |
7615 | + object N7: TMenuItem | |
7616 | + Caption = '-' | |
7617 | + end | |
7612 | 7618 | object DeleteMenu: TMenuItem |
7613 | 7619 | Action = GikoDM.LogDeleteAction |
7614 | 7620 | end |
@@ -8157,12 +8163,6 @@ object GikoForm: TGikoForm | ||
8157 | 8163 | object N38: TMenuItem |
8158 | 8164 | Caption = '-' |
8159 | 8165 | end |
8160 | - object UpdateGikonaviAction1: TMenuItem | |
8161 | - Action = GikoDM.UpdateGikonaviAction | |
8162 | - end | |
8163 | - object N7: TMenuItem | |
8164 | - Caption = '-' | |
8165 | - end | |
8166 | 8166 | object AboutMenu: TMenuItem |
8167 | 8167 | Action = GikoDM.AboutAction |
8168 | 8168 | end |
@@ -424,7 +424,6 @@ type | ||
424 | 424 | N84: TMenuItem; |
425 | 425 | procedure FormCreate(Sender: TObject); |
426 | 426 | procedure FormDestroy(Sender: TObject); |
427 | - procedure SaveSettingAll(); | |
428 | 427 | procedure BrowserStatusTextChange(Sender: TObject; |
429 | 428 | const Text: WideString); |
430 | 429 | procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); |
@@ -609,8 +608,6 @@ type | ||
609 | 608 | FPreviewBrowserRect: TRect; ///< プレビューの表示位置を記憶する |
610 | 609 | FActionListGroupIndexes: array of Integer; ///<GikoDM上のアクションリストの各アクションに設定されたGroupIndexを保存する配列 |
611 | 610 | FResPopupBrowser: TResPopupBrowser; |
612 | - FUpdateExePath: string; ///ギコナビ更新インストーラパス | |
613 | - FUpdateExeArgs: string; ///ギコナビ更新インストーラ引数 | |
614 | 611 | procedure DownloadEnd(Sender: TObject; Item: TDownloadItem); |
615 | 612 | procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon); |
616 | 613 | procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string); |
@@ -738,9 +735,6 @@ type | ||
738 | 735 | property ScreenCursor : TCursor read GetScreenCursor write SetScreenCursor; |
739 | 736 | property ActiveBBS : TBBS read FActiveBBS write FActiveBBS; |
740 | 737 | property WorkCount: Integer read FWorkCount write FWorkCount; |
741 | - property UpdateExePath: string read FUpdateExePath write FUpdateExePath; | |
742 | - property UpdateExeArgs: string read FUpdateExeArgs write FUpdateExeArgs; | |
743 | - | |
744 | 738 | procedure SetContent(inThread: TBrowserRecord); |
745 | 739 | function GetActiveContent(popup :Boolean = false): TThreadItem; |
746 | 740 | function GetActiveList: TObject; |
@@ -934,8 +928,6 @@ begin | ||
934 | 928 | FResPopupBrowser := nil; |
935 | 929 | CreateBrowsers(BROWSER_COUNT); |
936 | 930 | FIconData.uID := 0; |
937 | - FUpdateExePath := ''; | |
938 | - FUpdateExeArgs := ''; | |
939 | 931 | |
940 | 932 | //メニューフォント |
941 | 933 | SetMenuFont; |
@@ -1500,9 +1492,7 @@ begin | ||
1500 | 1492 | GikoDM.TabsOpenAction.Execute; |
1501 | 1493 | GikoDM.TabsOpenAction.Tag := 0; |
1502 | 1494 | if (GikoSys.Setting.LastCloseTabURL <> '') then begin |
1503 | - if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
1504 | - PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( FActiveContent.Browser ), 0 ); | |
1505 | - end; | |
1495 | + PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( FActiveContent.Browser ), 0 ); | |
1506 | 1496 | if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin |
1507 | 1497 | while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and |
1508 | 1498 | (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin |
@@ -1560,25 +1550,38 @@ begin | ||
1560 | 1550 | |
1561 | 1551 | Application.UnhookMainWindow(Hook); |
1562 | 1552 | //アプリケーション終了の前にダウンロードスレッドに正常終了を促す |
1563 | - FControlThread.DownloadAbort; | |
1564 | 1553 | FControlThread.Terminate; |
1565 | - | |
1566 | - //OnDestoryだと再起動をかけたときなどに保存されないのでOnCloseQueryで設定保存 | |
1567 | - SaveSettingAll(); | |
1568 | - | |
1569 | 1554 | Application.Terminate; |
1570 | 1555 | end; |
1571 | 1556 | |
1572 | -procedure TGikoForm.SaveSettingAll(); | |
1557 | +procedure TGikoForm.FormDestroy(Sender: TObject); | |
1573 | 1558 | var |
1559 | + i : Integer; | |
1574 | 1560 | wp : TWindowPlacement; |
1561 | + tmpBool : Boolean; | |
1575 | 1562 | WindowPlacement: TWindowPlacement; |
1576 | 1563 | begin |
1564 | + // タスクトレイのアイコン削除 | |
1565 | + if (FIconData.uID <> 0) then begin | |
1566 | + Shell_NotifyIcon(NIM_DELETE, @FIconData); | |
1567 | + end; | |
1568 | + | |
1569 | + // マウスジェスチャー開放 | |
1570 | + try | |
1571 | + if GikoSys.Setting.GestureEnabled then begin | |
1572 | + MouseGesture.OnGestureStart := nil; | |
1573 | + MouseGesture.OnGestureMove := nil; | |
1574 | + MouseGesture.OnGestureEnd := nil; | |
1575 | + end; | |
1576 | + MouseGesture.Clear; | |
1577 | + MouseGesture.UnHook; | |
1578 | + MouseGesture.Free; | |
1579 | + except | |
1580 | + end; | |
1577 | 1581 | try |
1578 | 1582 | ActiveListColumnSave; |
1579 | 1583 | except |
1580 | 1584 | end; |
1581 | - | |
1582 | 1585 | try |
1583 | 1586 | WindowPlacement.length := SizeOf(TWindowPlacement); |
1584 | 1587 | GetWindowPlacement(Self.Handle, @WindowPlacement); |
@@ -1611,11 +1614,20 @@ begin | ||
1611 | 1614 | GikoSys.Setting.ResRange := FResRangeMenuSelect; |
1612 | 1615 | except |
1613 | 1616 | end; |
1614 | - //今のwinodwのスタイルでCoolBarの位置、ウィンドウの位置を保存 | |
1615 | - SaveCoolBarSettings; | |
1616 | - GikoSys.Setting.WriteWindowSettingFile; | |
1617 | - // 名前とメールの保存なのでエディタが閉じた後ならいつでもいい | |
1618 | - GikoSys.Setting.WriteNameMailSettingFile; | |
1617 | + if WindowState <> wsNormal then | |
1618 | + WindowState := wsNormal; | |
1619 | + SaveCoolBarSettings; | |
1620 | + try | |
1621 | + GikoSys.Setting.WriteWindowSettingFile; | |
1622 | + GikoSys.Setting.WriteNameMailSettingFile; | |
1623 | + except | |
1624 | + end; | |
1625 | + // リアルタイムに保存されるので、また、ウィンドウサイズが CoolBar より | |
1626 | + // 小さくなっているときに保存すると値が上書きされてしまうのでここでは保存しない | |
1627 | + | |
1628 | + // ↑FormDestroy中に移動したので、ここで保存しないといけないと思う。(もじゅ 2004/04/09) | |
1629 | + // CoolBar 保存 | |
1630 | + //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then | |
1619 | 1631 | |
1620 | 1632 | //入力アシスト機構の設定の保存 |
1621 | 1633 | InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName); |
@@ -1627,71 +1639,10 @@ begin | ||
1627 | 1639 | if not (FavoriteDM.AbEnd) then begin |
1628 | 1640 | FavoriteDM.WriteFavorite; |
1629 | 1641 | end; |
1630 | - except | |
1631 | - end; | |
1632 | - | |
1633 | - //アドレス履歴保存 | |
1634 | - try | |
1635 | - //AddressHistoryDMは自動生成フォームなので、解放は自動的にされる。 | |
1636 | - AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount); | |
1637 | - except | |
1638 | - end; | |
1639 | - | |
1640 | - //ヒストリリスト保存 | |
1641 | - try | |
1642 | - FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml'); | |
1643 | - except | |
1644 | - end; | |
1645 | - | |
1646 | - //巡回リスト保存 | |
1647 | - try | |
1648 | - RoundList.SaveRoundFile; | |
1649 | - except | |
1650 | - end; | |
1651 | - | |
1652 | - // タスクトレイのアイコン削除 | |
1653 | - if (FIconData.uID <> 0) then begin | |
1654 | - Shell_NotifyIcon(NIM_DELETE, @FIconData); | |
1655 | - end; | |
1656 | - | |
1657 | -end; | |
1658 | - | |
1659 | -procedure TGikoForm.FormDestroy(Sender: TObject); | |
1660 | -var | |
1661 | - i : Integer; | |
1662 | - tmpBool : Boolean; | |
1663 | -begin | |
1664 | - //一時的に通常スタイルに戻してCoolBarの位置、ウィンドウの位置を保存 | |
1665 | - //※注意:OnDestroyで使うことしか考慮されていない | |
1666 | - // 他でやると再描画が発生する | |
1667 | - if WindowState <> wsNormal then begin | |
1668 | - WindowState := wsNormal; | |
1669 | - try | |
1670 | - SaveCoolBarSettings; | |
1671 | - GikoSys.Setting.WriteWindowSettingFile; | |
1672 | - except | |
1673 | - end; | |
1674 | - end; | |
1675 | - | |
1676 | - // マウスジェスチャー開放 | |
1677 | - try | |
1678 | - if GikoSys.Setting.GestureEnabled then begin | |
1679 | - MouseGesture.OnGestureStart := nil; | |
1680 | - MouseGesture.OnGestureMove := nil; | |
1681 | - MouseGesture.OnGestureEnd := nil; | |
1682 | - end; | |
1683 | - MouseGesture.Clear; | |
1684 | - MouseGesture.UnHook; | |
1685 | - MouseGesture.Free; | |
1686 | - except | |
1687 | - end; | |
1688 | - | |
1689 | - //お気に入り破棄 | |
1690 | - try | |
1691 | 1642 | FavoriteDM.Clear; |
1692 | 1643 | except |
1693 | 1644 | end; |
1694 | - | |
1645 | + //LockWindowUpdate(Self.Handle); | |
1695 | 1646 | try |
1696 | 1647 | //タブクローズ |
1697 | 1648 | tmpBool := GikoSys.Setting.ShowDialogForAllTabClose; |
@@ -1700,7 +1651,6 @@ begin | ||
1700 | 1651 | GikoSys.Setting.ShowDialogForAllTabClose := tmpBool; |
1701 | 1652 | except |
1702 | 1653 | end; |
1703 | - | |
1704 | 1654 | try |
1705 | 1655 | for i := FBrowsers.Count - 1 downto 0 do begin |
1706 | 1656 | GikoSys.ShowRefCount('browser' + IntToStr(i), TWebBrowser(FBrowsers[i]).ControlInterface); |
@@ -1715,7 +1665,6 @@ begin | ||
1715 | 1665 | finally |
1716 | 1666 | FBrowsers.Free; |
1717 | 1667 | end; |
1718 | - | |
1719 | 1668 | try |
1720 | 1669 | if BrowserNullTab <> nil then begin |
1721 | 1670 | BrowserNullTab.Browser := nil; {*BrowserNullTabのBrowserは設計時に貼り付けてる奴 |
@@ -1734,6 +1683,18 @@ begin | ||
1734 | 1683 | except |
1735 | 1684 | end; |
1736 | 1685 | |
1686 | + //アドレス履歴保存 | |
1687 | + try | |
1688 | + //AddressHistoryDMは自動生成フォームなので、解放は自動的にされる。 | |
1689 | + AddressHistoryDM.WriteHistory(AddressComboBox.Items, GikoSys.Setting.MaxRecordCount); | |
1690 | + except | |
1691 | + end; | |
1692 | + | |
1693 | + //ヒストリリスト保存 | |
1694 | + try | |
1695 | + FHistoryList.SaveToFile(GikoSys.GetConfigDir + 'History.xml'); | |
1696 | + except | |
1697 | + end; | |
1737 | 1698 | try |
1738 | 1699 | try |
1739 | 1700 | FHistoryList.Clear; |
@@ -1743,7 +1704,11 @@ begin | ||
1743 | 1704 | FHistoryList.Free; |
1744 | 1705 | end; |
1745 | 1706 | |
1746 | - | |
1707 | + //巡回リスト保存&破棄 | |
1708 | + try | |
1709 | + RoundList.SaveRoundFile; | |
1710 | + except | |
1711 | + end; | |
1747 | 1712 | try |
1748 | 1713 | try |
1749 | 1714 | RoundList.Clear; |
@@ -1755,7 +1720,7 @@ begin | ||
1755 | 1720 | |
1756 | 1721 | try |
1757 | 1722 | try |
1758 | - //FControlThread.DownloadAbort; | |
1723 | + FControlThread.DownloadAbort; | |
1759 | 1724 | FControlThread.Terminate; |
1760 | 1725 | FControlThread.WaitFor; |
1761 | 1726 | except |
@@ -1807,12 +1772,7 @@ begin | ||
1807 | 1772 | end; |
1808 | 1773 | except |
1809 | 1774 | end; |
1810 | - | |
1811 | - // Updateがいれば実行する | |
1812 | - if FileExists(FUpdateExePath) then begin | |
1813 | - // アップデート実行 | |
1814 | - GikoSys.CreateProcess(FUpdateExePath, FUpdateExeArgs); | |
1815 | - end; | |
1775 | + //LockWindowUpdate(0); | |
1816 | 1776 | end; |
1817 | 1777 | |
1818 | 1778 | // 各所にあるキャビネット・ BBS メニューをセット/更新 |
@@ -4569,29 +4569,18 @@ procedure TGikoDM.UpdateGikonaviActionExecute(Sender: TObject); | ||
4569 | 4569 | var |
4570 | 4570 | form : TUpdateCheckForm; |
4571 | 4571 | Msg: string; |
4572 | - shutdown: boolean; | |
4573 | 4572 | begin |
4574 | 4573 | if (EditorFormExists) then begin |
4575 | 4574 | Msg := 'レスエディタを全て閉じてください'; |
4576 | 4575 | MsgBox(GikoForm.Handle, Msg, MSG_ERROR, MB_OK or MB_ICONSTOP); |
4577 | 4576 | Exit; |
4578 | 4577 | end; |
4579 | - GikoForm.UpdateExePath := ''; | |
4580 | - GikoForm.UpdateExeArgs := ''; | |
4581 | 4578 | form := TUpdateCheckForm.Create(Self); |
4582 | 4579 | try |
4583 | 4580 | form.ShowModal; |
4584 | - shutdown := form.Allowshutdown; | |
4585 | - GikoForm.UpdateExePath := form.ExecPath; | |
4586 | - GikoForm.UpdateExeArgs := form.ExecArgs; | |
4587 | 4581 | finally |
4588 | 4582 | form.Release; |
4589 | 4583 | end; |
4590 | - if shutdown then begin | |
4591 | - // ギコナビ終了 | |
4592 | - GikoForm.Close; | |
4593 | - end; | |
4594 | - | |
4595 | 4584 | end; |
4596 | 4585 | |
4597 | 4586 | end. |
@@ -115,14 +115,9 @@ begin | ||
115 | 115 | newURL := IdHTTP.Response.Location; |
116 | 116 | end; |
117 | 117 | if (newURL <> '') then begin |
118 | - // リダイレクトすれば必ず移転とは限らない | |
119 | - // テレビ番組板などの対策最後の'/'までをURLとする | |
120 | - if (Length(newURL) <> LastDelimiter('/', newURL)) then begin | |
121 | - newURL := Copy(newURL, 1, LastDelimiter('/', newURL)); | |
122 | - end; | |
123 | 118 | oldURL := URLs[i]; |
124 | - if (oldURL <> newURL) then begin | |
125 | - ResultMemo.Lines.Add('URL:' + oldURL + ' -> ' + newURL); | |
119 | + ResultMemo.Lines.Add('URL:' + oldURL + ' -> ' + newURL); | |
120 | + if (newURL <> '') then begin | |
126 | 121 | oldURLs.Add( oldURL ); |
127 | 122 | newURLs.Add( newURL ); |
128 | 123 | end; |
@@ -381,12 +381,6 @@ begin | ||
381 | 381 | end; |
382 | 382 | end; |
383 | 383 | //Item := TRoundItem.Create; |
384 | - | |
385 | - if sl.Count = 0 then begin | |
386 | - //エラー落ちするなどしてファイルの内容が空だとエラーになる対策 | |
387 | - sl.Add(ROUND_INDEX_VERSION); | |
388 | - end; | |
389 | - | |
390 | 384 | delCount := 0; |
391 | 385 | //1行目はバージョン |
392 | 386 | if sl[0] = ROUND_INDEX_VERSION then begin |
@@ -448,11 +442,6 @@ begin | ||
448 | 442 | end; |
449 | 443 | end; |
450 | 444 | //Item := TRoundItem.Create; |
451 | - if sl.Count = 0 then begin | |
452 | - //エラー落ちするなどしてファイルの内容が空だとエラーになる対策 | |
453 | - sl.Add(ROUND_INDEX_VERSION); | |
454 | - end; | |
455 | - | |
456 | 445 | delCount := 0; |
457 | 446 | //1行目はバージョン |
458 | 447 | if sl[0] = ROUND_INDEX_VERSION then begin |
@@ -1333,15 +1333,6 @@ begin | ||
1333 | 1333 | |
1334 | 1334 | FCheckDatFile := ini.ReadBool('ThreadList', 'CheckDatFile', True); |
1335 | 1335 | FLimitResCountMessage := ini.ReadBool('Thread', 'LimitResCountMessage', True); |
1336 | - | |
1337 | - // ギコナビ更新で利用したインストーラの削除 | |
1338 | - s := ini.ReadString('Update', 'Remove0', ''); | |
1339 | - if (FileExists(s)) then begin | |
1340 | - SysUtils.DeleteFile(s); | |
1341 | - // 削除に失敗しても無視する | |
1342 | - ini.DeleteKey('Update', 'Remove0'); | |
1343 | - end; | |
1344 | - | |
1345 | 1336 | ini.UpdateFile; |
1346 | 1337 | finally |
1347 | 1338 | ini.Free; |
@@ -21,19 +21,13 @@ type | ||
21 | 21 | procedure NightBuildCheckButtonClick(Sender: TObject); |
22 | 22 | private |
23 | 23 | { Private 宣言 } |
24 | - FExecPath : string; | |
25 | - FExecArgs : string; | |
26 | - FAllowshutdown : Boolean; | |
27 | 24 | function GetDesktopDir:string; |
28 | 25 | function GetDownloadFilePath(FileName: String): String; |
29 | 26 | function CreateShortCut(FileName, Argment, SavePath :string):boolean; |
30 | 27 | procedure DonwloadUpdate(url: String); |
31 | - function CheckUpdate(nightbuild :Boolean): Boolean; | |
28 | + procedure CheckUpdate(nightbuild :Boolean); | |
32 | 29 | public |
33 | 30 | { Public 宣言 } |
34 | - property ExecPath :String read FExecPath; | |
35 | - property ExecArgs :String read FExecArgs; | |
36 | - property Allowshutdown :Boolean read FAllowshutdown; | |
37 | 31 | end; |
38 | 32 | |
39 | 33 | var |
@@ -45,50 +39,21 @@ uses | ||
45 | 39 | ActiveX, ComObj, ShlObj, GikoUtil; |
46 | 40 | |
47 | 41 | {$R *.dfm} |
48 | -//! 正規版 | |
42 | + | |
49 | 43 | procedure TUpdateCheckForm.UpdateButtonClick(Sender: TObject); |
50 | 44 | begin |
51 | - if CheckUpdate(false) then begin | |
52 | - if GikoUtil.MsgBox(Handle, '更新があるためギコナビを再起動しますか?', '終了確認', | |
53 | - MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) = ID_YES then begin | |
54 | - FAllowshutdown := True; | |
55 | - close; | |
56 | - end; | |
57 | - end; | |
45 | + CheckUpdate(false); | |
58 | 46 | end; |
59 | -//! 人柱版 | |
60 | -procedure TUpdateCheckForm.NightBuildCheckButtonClick(Sender: TObject); | |
61 | -begin | |
62 | - if GikoUtil.MsgBox(Handle, '正式リリース版ではありませんがよろしいですか?', '更新確認', | |
63 | - MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) = ID_YES then begin | |
64 | - if CheckUpdate(true) then begin | |
65 | - if GikoUtil.MsgBox(Handle, '更新があるためギコナビを再起動しますか?', '終了確認', | |
66 | - MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) = ID_YES then begin | |
67 | - FAllowshutdown := True; | |
68 | - close; | |
69 | - end; | |
70 | - end; | |
71 | - end; | |
72 | -end; | |
73 | - | |
74 | 47 | //! アップデート対象確認 |
75 | -function TUpdateCheckForm.CheckUpdate(nightbuild :Boolean): Boolean; | |
48 | +procedure TUpdateCheckForm.CheckUpdate(nightbuild :Boolean); | |
76 | 49 | const |
77 | -{$IFDEF DEBUG} | |
78 | - CHECK_URL = 'http://gikonavi.sourceforge.jp/updater/debug.txt'; | |
79 | -{$ELSE} | |
80 | 50 | CHECK_URL = 'http://gikonavi.sourceforge.jp/updater/latest.txt'; |
81 | -{$ENDIF} | |
82 | 51 | var |
83 | 52 | value : string; |
84 | 53 | ResStream: TMemoryStream; |
85 | 54 | downResult, current, newest: TStringList; |
86 | 55 | newgiko: Boolean; |
87 | 56 | begin |
88 | - Result := false; | |
89 | - FExecPath := ''; | |
90 | - FExecArgs := ''; | |
91 | - FAllowshutdown := False; | |
92 | 57 | ResultMemo.Lines.Clear; |
93 | 58 | Screen.Cursor := crHourGlass; |
94 | 59 | UpdateButton.Enabled := False; |
@@ -141,7 +106,6 @@ begin | ||
141 | 106 | |
142 | 107 | ResultMemo.Lines.Add('新しいギコナビがあります。ダウンロードを開始します。' + downResult.Values[ 'url' ]); |
143 | 108 | DonwloadUpdate(Trim(downResult.Values[ 'url' ])); |
144 | - Result := True; | |
145 | 109 | end; |
146 | 110 | end else begin |
147 | 111 | ResultMemo.Lines.Add('今のギコナビが最新です。'); |
@@ -186,12 +150,12 @@ begin | ||
186 | 150 | IdHTTP.Get(url, fileStrem); |
187 | 151 | ResultMemo.Lines.Add( |
188 | 152 | IdHttp.ResponseText + '(' + IntToStr(IdHttp.ResponseCode) + ')'); |
189 | - FExecPath := filename; | |
190 | - FExecArgs := '/SP- /silent /noicons "/dir=' + GikoSys.GetAppDir + '"'; | |
191 | 153 | if CreateShortCut( |
192 | - execPath, execArgs, GetDesktopDir) then begin | |
154 | + filename, | |
155 | + '/SP- /silent /noicons "/dir=' + GikoSys.GetAppDir + '"' | |
156 | + , GetDesktopDir) then begin | |
193 | 157 | ResultMemo.Lines.Add('デスクトップに"ギコナビ更新"ショートカットを作成しました。'); |
194 | - // ResultMemo.Lines.Add('ギコナビを終了して、"ギコナビ更新"ショートカットをダブルクリックしてください。'); | |
158 | + ResultMemo.Lines.Add('ギコナビを終了して、"ギコナビ更新"ショートカットをダブルクリックしてください。'); | |
195 | 159 | end else begin |
196 | 160 | ResultMemo.Lines.Add('デスクトップにショートカットを作成できませんでした。'); |
197 | 161 | end; |
@@ -263,9 +227,14 @@ end; | ||
263 | 227 | procedure TUpdateCheckForm.FormCreate(Sender: TObject); |
264 | 228 | begin |
265 | 229 | ResultMemo.Lines.Clear; |
266 | - FExecPath := ''; | |
267 | - FExecArgs := ''; | |
268 | - FAllowshutdown := False; | |
230 | +end; | |
231 | + | |
232 | +procedure TUpdateCheckForm.NightBuildCheckButtonClick(Sender: TObject); | |
233 | +begin | |
234 | + if GikoUtil.MsgBox(Handle, '正式リリース版ではありませんがよろしいですか?', '更新確認', | |
235 | + MB_YESNO or MB_ICONWARNING or MB_DEFBUTTON2) = ID_YES then begin | |
236 | + CheckUpdate(true); | |
237 | + end; | |
269 | 238 | end; |
270 | 239 | |
271 | 240 | end. |
@@ -56,9 +56,6 @@ Name: japanese; MessagesFile: compiler:Languages\Japanese.isl | ||
56 | 56 | |
57 | 57 | [Code] |
58 | 58 | procedure CurStepChanged(CurStep: TSetupStep); |
59 | -var | |
60 | - path :String; | |
61 | - srcpath: String; | |
62 | 59 | begin |
63 | 60 | case CurStep of |
64 | 61 | ssInstall: |
@@ -78,15 +75,6 @@ begin | ||
78 | 75 | end; |
79 | 76 | end; |
80 | 77 | end; |
81 | - ssPostInstall: | |
82 | - begin | |
83 | - path := ExpandConstant('{app}') + '\gikoNavi.ini'; | |
84 | - srcpath := ExpandConstant('{srcexe}'); | |
85 | - if (FileExists(path)) then | |
86 | - begin | |
87 | - SetIniString('Update', 'Remove0', srcpath, path); | |
88 | - end; | |
89 | - end; | |
90 | 78 | end; |
91 | 79 | |
92 | 80 | end; |
@@ -7,7 +7,7 @@ | ||
7 | 7 | AppName=ギコナビ |
8 | 8 | AppVerName=ギコナビ |
9 | 9 | AppId=gikoNavi |
10 | -AppMutex=gikoNaviInstance | |
10 | +AppMutex=http://gikonavi.sourceforge.jp/gikonavi/mutex | |
11 | 11 | AppPublisherURL=http://gikonavi.sourceforge.jp/ |
12 | 12 | AppendDefaultDirName = no |
13 | 13 | DefaultDirName={pf}\gikonavi |
@@ -18,8 +18,8 @@ SourceDir=G:\Release | ||
18 | 18 | OutputDir=G:\InnoSetup\Output |
19 | 19 | SetupIconFile="G:\gikoNaviSFX_102\MainIcon.ico" |
20 | 20 | ; ギコナビのバージョンにあわせてください |
21 | -VersionInfoVersion=1.59.0.778 | |
22 | -OutputBaseFilename=gikoNavi_b59_778_usetup | |
21 | +VersionInfoVersion=1.59.0.769 | |
22 | +OutputBaseFilename=gikoNavi_b59_769_usetup | |
23 | 23 | CreateUninstallRegKey=no |
24 | 24 | |
25 | 25 | [Tasks] |
@@ -63,49 +63,8 @@ Type: files; Name: "{app}\gikoNavi.ini" | ||
63 | 63 | Name: japanese; MessagesFile: compiler:Languages\Japanese.isl |
64 | 64 | |
65 | 65 | [Code] |
66 | -function InitializeSetup(): Boolean; | |
67 | -var | |
68 | - timeout : Integer; | |
69 | -begin | |
70 | - Result := true; | |
71 | - // タイムアウト時間1分 | |
72 | - timeout := 60 * 1000; | |
73 | - // ギコナビの起動時ミューテックスをチェック | |
74 | - while CheckForMutexes('gikoNaviInstance') do begin | |
75 | - // 起動中なのでスリープ | |
76 | - // まずは、タイムアウトチェック | |
77 | - if (timeout < 0) then begin | |
78 | - // タイムアウト | |
79 | - Result := False; | |
80 | - break; | |
81 | - end; | |
82 | - timeout := timeout - 500; | |
83 | - // スリープ | |
84 | - Sleep(500); | |
85 | - end; | |
86 | - // タイムアウト時は、手動でギコナビシャットダウンを要求 | |
87 | - if not Result Then begin | |
88 | - if MsgBox('ギコナビが起動しているか。完全に終了していません。ギコナビの終了を確認してください。' | |
89 | - + #10#13 + '更新を続行するには,「はい」ボタンを押してください。', | |
90 | - mbConfirmation, MB_YESNO) = IDYES then begin | |
91 | - Result := not CheckForMutexes('gikoNaviInstance'); | |
92 | - if not Result Then begin | |
93 | - MsgBox('ギコナビが起動しています。ギコナビ更新をキャンセルします。' | |
94 | - + #10#13 + 'ギコナビ更新は、デスクトップの「ギコナビ更新」ショートカットから再起動できます。' | |
95 | - , mbError, MB_OK); | |
96 | - end; | |
97 | - end else begin | |
98 | - MsgBox('ギコナビ更新をキャンセルします。' | |
99 | - + #10#13 + 'ギコナビ更新は、デスクトップの「ギコナビ更新」ショートカットから再起動できます。' | |
100 | - , mbError, MB_OK); | |
101 | - end; | |
102 | - end; | |
103 | -end; | |
104 | 66 | |
105 | 67 | procedure CurStepChanged(CurStep: TSetupStep); |
106 | -var | |
107 | - path :String; | |
108 | - srcpath: String; | |
109 | 68 | begin |
110 | 69 | case CurStep of |
111 | 70 | ssInstall: |
@@ -125,15 +84,6 @@ begin | ||
125 | 84 | end; |
126 | 85 | end; |
127 | 86 | end; |
128 | - ssPostInstall: | |
129 | - begin | |
130 | - path := ExpandConstant('{app}') + '\gikoNavi.ini'; | |
131 | - srcpath := ExpandConstant('{srcexe}'); | |
132 | - if (FileExists(path)) then | |
133 | - begin | |
134 | - SetIniString('Update', 'Remove0', srcpath, path); | |
135 | - end; | |
136 | - end; | |
137 | 87 | end; |
138 | 88 | |
139 | 89 | end; |
@@ -2,7 +2,7 @@ library ShitarabaJBBSPlugIn; | ||
2 | 2 | |
3 | 3 | { |
4 | 4 | ShitarabaJBBSPlugIn |
5 | - $Id: ShitarabaJBBSPlugIn.dpr,v 1.46 2008/12/20 04:02:40 h677 Exp $ | |
5 | + $Id: ShitarabaJBBSPlugIn.dpr,v 1.45 2008/08/03 02:45:48 h677 Exp $ | |
6 | 6 | } |
7 | 7 | |
8 | 8 | uses |
@@ -83,7 +83,7 @@ const | ||
83 | 83 | MAJOR_VERSION = 1; |
84 | 84 | MINOR_VERSION = 1; |
85 | 85 | RELEASE_VERSION = 'alpha'; |
86 | - REVISION_VERSION = 18; | |
86 | + REVISION_VERSION = 17; | |
87 | 87 | |
88 | 88 | SYNCRONIZE_MENU_CAPTION = 'したらばJBBS板更新'; |
89 | 89 |
@@ -880,10 +880,11 @@ begin | ||
880 | 880 | tmpLine := AnsiLowerCase(tmpHTML[i]); |
881 | 881 | tS := AnsiPos('<a href="mailto:', tmpLine); |
882 | 882 | if tS > 0 then begin //メル欄アリ |
883 | - tE := AnsiPos('">', tmpLine); | |
884 | - tmpDatToken[2] := Copy(tmpHTML[i], tS + 16, tE - (tS + 16)); | |
885 | - tmpHTML[i] := Copy(tmpHTML[i], tE + 5, Length(tmpHTML[i])); | |
886 | - tmpHTML[i] := CustomStringReplace(tmpHTML[i], '</a>', '', true); end else begin //メル欄無し | |
883 | + tE := AnsiPos('">', tmpLine); | |
884 | + tmpDatToken[2] := Copy(tmpHTML[i], tS + 16, tE - (tS + 16)); | |
885 | + tmpHTML[i] := Copy(tmpHTML[i], tE + 5, Length(tmpHTML[i])); | |
886 | + tmpHTML[i] := CustomStringReplace(tmpHTML[i], '</a>', '', true); | |
887 | + end else begin //メル欄無し | |
887 | 888 | tmpDatToken[2] := ''; |
888 | 889 | end; |
889 | 890 | //====================// |
@@ -896,16 +897,7 @@ begin | ||
896 | 897 | tmpDatToken[1] := CustomStringReplace(tmpDatToken[1], '</b>', '', true); |
897 | 898 | tmpHTML[i] := Copy(tmpHTML[i], tE + 8, Length(tmpHTML[i])); |
898 | 899 | end else begin |
899 | - // 投稿日のないパターンを救う | |
900 | - tE := AnsiPos(':', tmpLine); | |
901 | - if tE > 0 then begin | |
902 | - tmpDatToken[1] := Trim(Copy(tmpHTML[i], 1, tE - 1 )); | |
903 | - tmpDatToken[1] := CustomStringReplace(tmpDatToken[1], '<b>', '', true); | |
904 | - tmpDatToken[1] := CustomStringReplace(tmpDatToken[1], '</b>', '', true); | |
905 | - tmpHTML[i] := Copy(tmpHTML[i], tE + 2, Length(tmpHTML[i])); | |
906 | - end else begin | |
907 | - tmpDatToken[1] := ''; | |
908 | - end; | |
900 | + tmpDatToken[1] := ''; | |
909 | 901 | end; |
910 | 902 | //====================// |
911 | 903 | //==日付時刻の取得==// |