[Ttssh2-commit] [4357] インストーラでアプリケーションが起動中かどうかチェックするのに Mutex を使用するのをやめた

svnno****@sourc***** svnno****@sourc*****
2011年 3月 3日 (木) 21:57:20 JST


Revision: 4357
          http://sourceforge.jp/projects/ttssh2/svn/view?view=rev&revision=4357
Author:   maya
Date:     2011-03-03 21:57:20 +0900 (Thu, 03 Mar 2011)

Log Message:
-----------
インストーラでアプリケーションが起動中かどうかチェックするのに Mutex を使用するのをやめた

Modified Paths:
--------------
    trunk/cygterm/README
    trunk/cygterm/README-j
    trunk/cygterm/cygterm.cc
    trunk/doc/en/html/about/history.html
    trunk/doc/ja/html/about/history.html
    trunk/installer/teraterm.iss
    trunk/teraterm/keycode/keycode.c
    trunk/teraterm/teraterm/teraterm.cpp
    trunk/teraterm/ttpmacro/ttmacro.cpp
    trunk/ttpmenu/ttpmenu.cpp


-------------- next part --------------
Modified: trunk/cygterm/README
===================================================================
--- trunk/cygterm/README	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/cygterm/README	2011-03-03 12:57:20 UTC (rev 4357)
@@ -266,6 +266,9 @@
                 zsh 4.3.10
 
 // C H A N G E S //
+v1.07_22 2011/03/03 (by maya)
+        * Delete mutex object for running check by installer.
+
 v1.07_21 2011/02/28 (by maya)
         * Add mutex object for running check by installer.
 

Modified: trunk/cygterm/README-j
===================================================================
--- trunk/cygterm/README-j	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/cygterm/README-j	2011-03-03 12:57:20 UTC (rev 4357)
@@ -278,6 +278,9 @@
                 zsh 4.3.10
 
 // $BJQ(B $B99(B $BMz(B $BNr(B //
+v1.07_22 2011/03/03 (by maya)
+        * $B%$%s%9%H!<%i$+$i5/F0%A%'%C%/$r$9$k$?$a$N(B mutex $B$r:o=|$7$?!#(B
+
 v1.07_21 2011/02/28 (by maya)
         * $B%$%s%9%H!<%i$+$i5/F0%A%'%C%/$r$9$k$?$a$N(B mutex $B$rDI2C$7$?!#(B
 

Modified: trunk/cygterm/cygterm.cc
===================================================================
--- trunk/cygterm/cygterm.cc	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/cygterm/cygterm.cc	2011-03-03 12:57:20 UTC (rev 4357)
@@ -112,6 +112,10 @@
 // patch level 21 - add mutex
 //   Written by NAGATA Shinya. (maya)
 //
+/////////////////////////////////////////////////////////////////////////////
+// patch level 22 - delete mutex
+//   Written by NAGATA Shinya. (maya)
+//
 
 static char Program[] = "CygTerm+";
 static char Version[] = "version 1.07_21 (2011/2/28)";
@@ -1246,18 +1250,6 @@
     HANDLE hTerm = NULL;
     int sh_pid, agent_pid = 0;
 
-    // Create mutex for running check by installer (2006.8.18 maya)
-    SECURITY_DESCRIPTOR sd;
-    SECURITY_ATTRIBUTES sa;
-    HANDLE hMutex, hMutex2;
-    InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
-    SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
-    sa.nLength = sizeof(sa);
-    sa.lpSecurityDescriptor = &sd;
-    sa.bInheritHandle = FALSE;
-    hMutex = CreateMutex(&sa, FALSE, "CygTermAppMutex");
-    hMutex2 = CreateMutex(&sa, FALSE, "Global\\CygTermAppMutex");
-
     // load configuration
     load_cfg();
 

Modified: trunk/doc/en/html/about/history.html
===================================================================
--- trunk/doc/en/html/about/history.html	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/doc/en/html/about/history.html	2011-03-03 12:57:20 UTC (rev 4357)
@@ -75,7 +75,7 @@
     <ul>
       <li>upgraded TTSSH version supporting SSH2 to <a href="#ttssh_2.56">2.56</a></li>
       <li>upgraded TTProxy to <a href="#ttproxy_1.0.0.18">1.0.0.18</a></li>
-      <li>upgraded CygTerm+ to <a href="#cygterm_1.07_21">1.07_21</a></li>
+      <li>upgraded CygTerm+ to <a href="#cygterm_1.07_22">1.07_22</a></li>
       <li>upgraded LogMeTT to 2.9.8</li>
       <li>Add mutex object for running check by installer.</li>
     </ul>
@@ -2255,6 +2255,11 @@
 
 <h2><a name="cygterm">CygTerm+</a></h2>
 
+<h3><a name="cygterm_1.07_22">v1.07_22 2011/03/03 (by maya)</a></h3>
+<ul class="history">
+      <li>Delete mutex object for running check by installer.</li>
+</ul>
+
 <h3><a name="cygterm_1.07_21">v1.07_21 2011/02/28 (by maya)</a></h3>
 <ul class="history">
       <li>Add mutex object for running check by installer.</li>

Modified: trunk/doc/ja/html/about/history.html
===================================================================
--- trunk/doc/ja/html/about/history.html	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/doc/ja/html/about/history.html	2011-03-03 12:57:20 UTC (rev 4357)
@@ -74,7 +74,7 @@
     <ul>
       <li><a href="#ttssh_2.56">SSH2‘ΉžTTSSH(2.56)</a>‚֍·‚µ‘Ö‚¦‚½B</li>
       <li><a href="#ttproxy_1.0.0.18">TTProxy(1.0.0.18)</a>‚֍·‚µ‘Ö‚¦‚½B</li>
-      <li><a href="#cygterm_1.07_21">CygTerm+ 1.07_21</a>‚֍·‚µ‘Ö‚¦‚½B</li>
+      <li><a href="#cygterm_1.07_22">CygTerm+ 1.07_22</a>‚֍·‚µ‘Ö‚¦‚½B</li>
       <li>LogMeTT 2.9.8‚֍·‚µ‘Ö‚¦‚½B</li>
       <li>ƒCƒ“ƒXƒg[ƒ‰‚©‚ç‹N“®ƒ`ƒFƒbƒN‚ð‚·‚é‚½‚ß‚Ì mutex ‚ð’ljÁ‚µ‚½B</li>
     </ul>
@@ -2256,6 +2256,11 @@
 
 <h2><a name="cygterm">CygTerm+</a></h2>
 
+<h3><a name="cygterm_1.07_22">v1.07_22 2011/03/03 (by maya)</a></h3>
+<ul class="history">
+      <li>ƒCƒ“ƒXƒg[ƒ‰‚©‚ç‹N“®ƒ`ƒFƒbƒN‚ð‚·‚é‚½‚ß‚Ì mutex ‚ðíœ‚µ‚½B</li>
+</ul>
+
 <h3><a name="cygterm_1.07_21">v1.07_21 2011/02/28 (by maya)</a></h3>
 <ul class="history">
       <li>ƒCƒ“ƒXƒg[ƒ‰‚©‚ç‹N“®ƒ`ƒFƒbƒN‚ð‚·‚é‚½‚ß‚Ì mutex ‚ð’ljÁ‚µ‚½B</li>

Modified: trunk/installer/teraterm.iss
===================================================================
--- trunk/installer/teraterm.iss	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/installer/teraterm.iss	2011-03-03 12:57:20 UTC (rev 4357)
@@ -1,5 +1,5 @@
 #define AppName "Tera Term"
-#define AppVer "4.69-RC3"
+#define AppVer "4.69-RC4"
 ;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', '');
 
 [Setup]
@@ -16,7 +16,6 @@
 ShowLanguageDialog=yes
 AllowNoIcons=true
 UninstallDisplayIcon={app}\ttermpro.exe
-;AppMutex=TeraTermProAppMutex, TeraTermProMacroAppMutex, TeraTermProKeycodeAppMutex, TeraTermMenuAppMutex, CygTermAppMutex, Global\TeraTermProAppMutex, Global\TeraTermProMacroAppMutex, Global\TeraTermProKeycodeAppMutex, Global\TeraTermMenuAppMutex, Global\CygTermAppMutex
 #ifndef snapshot
 OutputBaseFilename=teraterm-{#AppVer}
 #else
@@ -390,7 +389,6 @@
   FileName : array[0..6] of String;
   FileDesc : array[0..6] of String;
   i        : integer;
-  ErrMsg   : String;
 begin
   FileDir := ExpandConstant('{app}');
   FileName[0] := FileDir + '\ttermpro.exe';

Modified: trunk/teraterm/keycode/keycode.c
===================================================================
--- trunk/teraterm/keycode/keycode.c	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/teraterm/keycode/keycode.c	2011-03-03 12:57:20 UTC (rev 4357)
@@ -31,19 +31,6 @@
 	MSG msg;
 	HWND hWnd;
 
-	// ƒCƒ“ƒXƒg[ƒ‰‚ÅŽÀs‚ðŒŸo‚·‚邽‚ß‚É mutex ‚ðì¬‚·‚é (2006.8.12 maya)
-	// 2d‹N“®–hŽ~‚Ì‚½‚ß‚Å‚Í‚È‚¢‚̂ŁA“Á‚É•Ô‚è’l‚ÍŒ©‚È‚¢
-	SECURITY_DESCRIPTOR sd;
-	SECURITY_ATTRIBUTES sa;
-	HANDLE hMutex, hMutex2;
-	InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
-	SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
-	sa.nLength = sizeof(sa);
-	sa.lpSecurityDescriptor = &sd;
-	sa.bInheritHandle = FALSE;
-	hMutex = CreateMutex(&sa, FALSE, "TeraTermProKeycodeAppMutex");
-	hMutex2 = CreateMutex(&sa, FALSE, "Global\\TeraTermProKeycodeAppMutex");
-
 	DoCover_IsDebuggerPresent();
 
 	if(!hPrevInstance) {

Modified: trunk/teraterm/teraterm/teraterm.cpp
===================================================================
--- trunk/teraterm/teraterm/teraterm.cpp	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/teraterm/teraterm/teraterm.cpp	2011-03-03 12:57:20 UTC (rev 4357)
@@ -49,19 +49,6 @@
 // CTeraApp initialization
 BOOL CTeraApp::InitInstance()
 {
-	// ƒCƒ“ƒXƒg[ƒ‰‚ÅŽÀs‚ðŒŸo‚·‚邽‚ß‚É mutex ‚ðì¬‚·‚é (2006.8.12 maya)
-	// 2d‹N“®–hŽ~‚Ì‚½‚ß‚Å‚Í‚È‚¢‚̂ŁA“Á‚É•Ô‚è’l‚ÍŒ©‚È‚¢
-	SECURITY_DESCRIPTOR sd;
-	SECURITY_ATTRIBUTES sa;
-	HANDLE hMutex, hMutex2;
-	InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
-	SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
-	sa.nLength = sizeof(sa);
-	sa.lpSecurityDescriptor = &sd;
-	sa.bInheritHandle = FALSE;
-	hMutex = CreateMutex(&sa, FALSE, "TeraTermProAppMutex");
-	hMutex2 = CreateMutex(&sa, FALSE, "Global\\TeraTermProAppMutex");
-
 	hInst = m_hInstance;
 	m_pMainWnd = new CVTWindow();
 	pVTWin = m_pMainWnd;

Modified: trunk/teraterm/ttpmacro/ttmacro.cpp
===================================================================
--- trunk/teraterm/ttpmacro/ttmacro.cpp	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/teraterm/ttpmacro/ttmacro.cpp	2011-03-03 12:57:20 UTC (rev 4357)
@@ -49,19 +49,6 @@
 {
 	static HMODULE HTTSET = NULL;
 
-	// ƒCƒ“ƒXƒg[ƒ‰‚ÅŽÀs‚ðŒŸo‚·‚邽‚ß‚É mutex ‚ðì¬‚·‚é (2006.8.12 maya)
-	// 2d‹N“®–hŽ~‚Ì‚½‚ß‚Å‚Í‚È‚¢‚̂ŁA“Á‚É•Ô‚è’l‚ÍŒ©‚È‚¢
-	SECURITY_DESCRIPTOR sd;
-	SECURITY_ATTRIBUTES sa;
-	HANDLE hMutex, hMutex2;
-	InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
-	SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
-	sa.nLength = sizeof(sa);
-	sa.lpSecurityDescriptor = &sd;
-	sa.bInheritHandle = FALSE;
-	hMutex = CreateMutex(&sa, FALSE, "TeraTermProMacroAppMutex");
-	hMutex2 = CreateMutex(&sa, FALSE, "Global\\TeraTermProMacroAppMutex");
-
 	GetUILanguageFile(UILanguageFile, sizeof(UILanguageFile));
 
 	Busy = TRUE;

Modified: trunk/ttpmenu/ttpmenu.cpp
===================================================================
--- trunk/ttpmenu/ttpmenu.cpp	2011-03-03 12:40:18 UTC (rev 4356)
+++ trunk/ttpmenu/ttpmenu.cpp	2011-03-03 12:57:20 UTC (rev 4357)
@@ -2583,19 +2583,6 @@
 	DWORD		dwErr;
 	int			fuLoad = LR_DEFAULTCOLOR;
 
-	// ƒCƒ“ƒXƒg[ƒ‰‚ÅŽÀs‚ðŒŸo‚·‚邽‚ß‚É mutex ‚ðì¬‚·‚é (2006.8.12 maya)
-	// 2d‹N“®–hŽ~‚Ì‚½‚ß‚Å‚Í‚È‚¢‚̂ŁA“Á‚É•Ô‚è’l‚ÍŒ©‚È‚¢
-	SECURITY_DESCRIPTOR sd;
-	SECURITY_ATTRIBUTES sa;
-	HANDLE hMutex, hMutex2;
-	InitializeSecurityDescriptor(&sd, SECURITY_DESCRIPTOR_REVISION);
-	SetSecurityDescriptorDacl(&sd, TRUE, NULL, FALSE);
-	sa.nLength = sizeof(sa);
-	sa.lpSecurityDescriptor = &sd;
-	sa.bInheritHandle = FALSE;
-	hMutex = CreateMutex(&sa, FALSE, "TeraTermMenuAppMutex");
-	hMutex2 = CreateMutex(&sa, FALSE, "Global\\TeraTermMenuAppMutex");
-
 	checkIniFile();		//INIƒtƒ@ƒCƒ‹/ƒŒƒWƒXƒgƒŠØ‘Ö
 
 	GetUILanguageFile(UILanguageFile, sizeof(UILanguageFile));



Ttssh2-commit メーリングリストの案内