Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3c24d96b
Kaydet (Commit)
3c24d96b
authored
Şub 18, 2005
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid using *W functions on Win95. Backported to 2.4.
üst
af3b39a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
msisupport.c
Tools/msi/msisupport.c
+24
-11
No files found.
Tools/msi/msisupport.c
Dosyayı görüntüle @
3c24d96b
#include "windows.h"
#include "msiquery.h"
int
isWinNT
;
/* Print a debug message to the installer log file.
* To see the debug messages, install with
* msiexec /i pythonxy.msi /l*v python.log
*/
static
UINT
debug
(
MSIHANDLE
hInstall
,
LPC
W
STR
msg
)
static
UINT
debug
(
MSIHANDLE
hInstall
,
LPCSTR
msg
)
{
MSIHANDLE
hRec
=
MsiCreateRecord
(
1
);
if
(
!
hRec
||
MsiRecordSetString
W
(
hRec
,
1
,
msg
)
!=
ERROR_SUCCESS
)
{
if
(
!
hRec
||
MsiRecordSetString
A
(
hRec
,
1
,
msg
)
!=
ERROR_SUCCESS
)
{
return
ERROR_INSTALL_FAILURE
;
}
MsiProcessMessage
(
hInstall
,
INSTALLMESSAGE_INFO
,
hRec
);
...
...
@@ -21,23 +23,34 @@ static UINT debug(MSIHANDLE hInstall, LPCWSTR msg)
*/
UINT
__declspec
(
dllexport
)
__stdcall
CheckDir
(
MSIHANDLE
hInstall
)
{
WCHAR
path
[
1024
];
#define PSIZE 1024
WCHAR
wpath
[
PSIZE
];
char
path
[
PSIZE
];
UINT
result
;
DWORD
size
=
sizeof
(
path
)
/
sizeof
(
WCHAR
)
;
DWORD
size
=
PSIZE
;
DWORD
attributes
;
isWinNT
=
(
GetVersion
()
<
0x80000000
)
?
1
:
0
;
result
=
MsiGetPropertyW
(
hInstall
,
L"TARGETDIR"
,
path
,
&
size
);
if
(
isWinNT
)
result
=
MsiGetPropertyW
(
hInstall
,
L"TARGETDIR"
,
wpath
,
&
size
);
else
result
=
MsiGetPropertyA
(
hInstall
,
"TARGETDIR"
,
path
,
&
size
);
if
(
result
!=
ERROR_SUCCESS
)
return
result
;
wpath
[
size
]
=
L'\0'
;
path
[
size
]
=
L'\0'
;
attributes
=
GetFileAttributesW
(
path
);
if
(
isWinNT
)
attributes
=
GetFileAttributesW
(
wpath
);
else
attributes
=
GetFileAttributesA
(
path
);
if
(
attributes
==
INVALID_FILE_ATTRIBUTES
||
!
(
attributes
&
FILE_ATTRIBUTE_DIRECTORY
))
{
return
MsiSetProperty
W
(
hInstall
,
L"TargetExists"
,
L
"0"
);
return
MsiSetProperty
A
(
hInstall
,
"TargetExists"
,
"0"
);
}
else
{
return
MsiSetProperty
W
(
hInstall
,
L"TargetExists"
,
L
"1"
);
return
MsiSetProperty
A
(
hInstall
,
"TargetExists"
,
"1"
);
}
}
...
...
@@ -50,10 +63,10 @@ UINT __declspec(dllexport) __stdcall UpdateEditIDLE(MSIHANDLE hInstall)
INSTALLSTATE
ext_old
,
ext_new
,
tcl_old
,
tcl_new
,
reg_new
;
UINT
result
;
result
=
MsiGetFeatureState
W
(
hInstall
,
L
"Extensions"
,
&
ext_old
,
&
ext_new
);
result
=
MsiGetFeatureState
A
(
hInstall
,
"Extensions"
,
&
ext_old
,
&
ext_new
);
if
(
result
!=
ERROR_SUCCESS
)
return
result
;
result
=
MsiGetFeatureState
W
(
hInstall
,
L
"TclTk"
,
&
tcl_old
,
&
tcl_new
);
result
=
MsiGetFeatureState
A
(
hInstall
,
"TclTk"
,
&
tcl_old
,
&
tcl_new
);
if
(
result
!=
ERROR_SUCCESS
)
return
result
;
...
...
@@ -76,7 +89,7 @@ UINT __declspec(dllexport) __stdcall UpdateEditIDLE(MSIHANDLE hInstall)
}
else
{
reg_new
=
INSTALLSTATE_ABSENT
;
}
result
=
MsiSetComponentState
W
(
hInstall
,
L
"REGISTRY.tcl"
,
reg_new
);
result
=
MsiSetComponentState
A
(
hInstall
,
"REGISTRY.tcl"
,
reg_new
);
return
result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment