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
c4b7600b
Kaydet (Commit)
c4b7600b
authored
Eki 01, 2015
tarafından
Steve Dower
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Improves support for building unofficial versions of the Windows installer.
üst
d5963e61
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
42 deletions
+101
-42
buildrelease.bat
Tools/msi/buildrelease.bat
+29
-15
bundle.targets
Tools/msi/bundle/bundle.targets
+4
-3
bundle.wxs
Tools/msi/bundle/bundle.wxs
+2
-0
launcher.wxs
Tools/msi/bundle/packagegroups/launcher.wxs
+4
-0
packageinstall.wxs
Tools/msi/bundle/packagegroups/packageinstall.wxs
+27
-0
pip.wxs
Tools/msi/bundle/packagegroups/pip.wxs
+26
-0
postinstall.wxs
Tools/msi/bundle/packagegroups/postinstall.wxs
+0
-19
msi.props
Tools/msi/msi.props
+9
-5
No files found.
Tools/msi/buildrelease.bat
Dosyayı görüntüle @
c4b7600b
...
@@ -4,17 +4,28 @@
...
@@ -4,17 +4,28 @@
rem This script is intended for building official releases of Python.
rem This script is intended for building official releases of Python.
rem To use it to build alternative releases, you should clone this file
rem To use it to build alternative releases, you should clone this file
rem and modify the following three URIs.
rem and modify the following three URIs.
rem
rem The first two will ensure that your release can be installed
rem alongside an official Python release, while the second specifies
rem the URL that will be used to download installation files. The
rem files available from this URL *will* conflict with your installer.
rem Trust me, you don't want them, even if it seems like a good idea.
set RELEASE_URI_X86=http://www.python.org/win32
rem These two will ensure that your release can be installed
set RELEASE_URI_X64=http://www.python.org/amd64
rem alongside an official Python release, by modifying the GUIDs used
set DOWNLOAD_URL_BASE=https://www.python.org/ftp/python
rem for all components.
set DOWNLOAD_URL=
rem
rem The following substitutions will be applied to the release URI:
rem Variable Description Example
rem {arch} architecture amd64, win32
set RELEASE_URI=http://www.python.org/{arch}
rem This is the URL that will be used to download installation files.
rem The files available from the default URL *will* conflict with your
rem installer. Trust me, you don't want them, even if it seems like a
rem good idea.
rem
rem The following substitutions will be applied to the download URL:
rem Variable Description Example
rem {version} version number 3.5.0
rem {arch} architecture amd64, win32
rem {releasename} release name a1, b2, rc3 (or blank for final)
rem {msi} MSI filename core.msi
set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
set D=%~dp0
set D=%~dp0
set PCBUILD=%D%..\..\PCBuild\
set PCBUILD=%D%..\..\PCBuild\
...
@@ -90,14 +101,12 @@ if "%1" EQU "x86" (
...
@@ -90,14 +101,12 @@ if "%1" EQU "x86" (
set BUILD_PLAT=Win32
set BUILD_PLAT=Win32
set OUTDIR_PLAT=win32
set OUTDIR_PLAT=win32
set OBJDIR_PLAT=x86
set OBJDIR_PLAT=x86
set RELEASE_URI=%RELEASE_URI_X86%
) ELSE (
) ELSE (
call "%PCBUILD%env.bat" x86_amd64
call "%PCBUILD%env.bat" x86_amd64
set BUILD=%PCBUILD%amd64\
set BUILD=%PCBUILD%amd64\
set BUILD_PLAT=x64
set BUILD_PLAT=x64
set OUTDIR_PLAT=amd64
set OUTDIR_PLAT=amd64
set OBJDIR_PLAT=x64
set OBJDIR_PLAT=x64
set RELEASE_URI=%RELEASE_URI_X64%
)
)
if exist "%BUILD%en-us" (
if exist "%BUILD%en-us" (
...
@@ -157,10 +166,16 @@ echo -x64 Build x64 installers
...
@@ -157,10 +166,16 @@ echo -x64 Build x64 installers
echo --build (-b) Incrementally build Python rather than rebuilding
echo --build (-b) Incrementally build Python rather than rebuilding
echo --skip-build (-B) Do not build Python (just do the installers)
echo --skip-build (-B) Do not build Python (just do the installers)
echo --skip-doc (-D) Do not build documentation
echo --skip-doc (-D) Do not build documentation
echo --download Specify the full download URL for MSIs
(should include {2})
echo --download Specify the full download URL for MSIs
echo --test Specify the test directory to run the installer tests
echo --test Specify the test directory to run the installer tests
echo -h Display this help information
echo -h Display this help information
echo.
echo.
echo If no architecture is specified, all architectures will be built.
echo If no architecture is specified, all architectures will be built.
echo If --test is not specified, the installer tests are not run.
echo If --test is not specified, the installer tests are not run.
echo.
echo.
\ No newline at end of file
echo The following substitutions will be applied to the download URL:
echo Variable Description Example
echo {version} version number 3.5.0
echo {arch} architecture amd64, win32
echo {releasename} release name a1, b2, rc3 (or blank for final)
echo {msi} MSI filename core.msi
Tools/msi/bundle/bundle.targets
Dosyayı görüntüle @
c4b7600b
...
@@ -16,8 +16,9 @@
...
@@ -16,8 +16,9 @@
<OutputPath>
$(OutputPath)en-us\
</OutputPath>
<OutputPath>
$(OutputPath)en-us\
</OutputPath>
<OutDir>
$(OutputPath)
</OutDir>
<OutDir>
$(OutputPath)
</OutDir>
<DownloadUrl
Condition=
"'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''"
>
$(DownloadUrlBase.TrimEnd(`/`))/$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)/$(ArchName)$(ReleaseLevelName)/
</DownloadUrl>
<!-- See Tools/msi/buildrelease.bat for help on configuring the download URL -->
<DefineConstants
Condition=
"'$(DownloadUrl)' != ''"
>
$(DefineConstants);DownloadUrl=$(DownloadUrl){2}
</DefineConstants>
<DownloadUrl
Condition=
"'$(DownloadUrl)' == '' and '$(DownloadUrlBase)' != ''"
>
$(DownloadUrlBase.TrimEnd(`/`))/{version}/{arch}{releasename}/{msi}
</DownloadUrl>
<DefineConstants
Condition=
"'$(DownloadUrl)' != ''"
>
$(DefineConstants);DownloadUrl=$(DownloadUrl.Replace(`{version}`, `$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)`).Replace(`{arch}`, `$(ArchName)`).Replace(`{releasename}`, `$(ReleaseName)`).Replace(`{msi}`, `{2}`))
</DefineConstants>
<DefineConstants
Condition=
"'$(DownloadUrl)' == ''"
>
$(DefineConstants);DownloadUrl={2}
</DefineConstants>
<DefineConstants
Condition=
"'$(DownloadUrl)' == ''"
>
$(DefineConstants);DownloadUrl={2}
</DefineConstants>
</PropertyGroup>
</PropertyGroup>
...
@@ -88,7 +89,7 @@
...
@@ -88,7 +89,7 @@
<Target
Name=
"BuildLauncher"
BeforeTargets=
"BeforeBuild"
Condition=
"'$(RebuildAll)' != 'false'"
>
<Target
Name=
"BuildLauncher"
BeforeTargets=
"BeforeBuild"
Condition=
"'$(RebuildAll)' != 'false'"
>
<!-- Build the launcher MSI using Exec rather than MSBuild -->
<!-- Build the launcher MSI using Exec rather than MSBuild -->
<Exec
Command=
'msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=$(UseTestMarker)'
<Exec
Command=
'msbuild ..\launcher\launcher.wixproj /p:Platform=x86 /p:
ReleaseUri="$(ReleaseUri)" /p:
OutputPath="$(BuildPath.TrimEnd(`\`))" /p:OutputSuffix=$(Platform) /p:BuildForRelease=$(BuildForRelease) /p:UseTestMarker=$(UseTestMarker)'
ContinueOnError=
"false"
/>
ContinueOnError=
"false"
/>
</Target>
</Target>
...
...
Tools/msi/bundle/bundle.wxs
Dosyayı görüntüle @
c4b7600b
...
@@ -85,6 +85,8 @@
...
@@ -85,6 +85,8 @@
<PackageGroupRef
Id=
"tools"
/>
<PackageGroupRef
Id=
"tools"
/>
<PackageGroupRef
Id=
"tcltk"
/>
<PackageGroupRef
Id=
"tcltk"
/>
<PackageGroupRef
Id=
"launcher"
/>
<PackageGroupRef
Id=
"launcher"
/>
<PackageGroupRef
Id=
"pip"
/>
<PackageGroupRef
Id=
"packageinstall"
/>
<PackageGroupRef
Id=
"postinstall"
/>
<PackageGroupRef
Id=
"postinstall"
/>
</Chain>
</Chain>
</Bundle>
</Bundle>
...
...
Tools/msi/bundle/packagegroups/launcher.wxs
Dosyayı görüntüle @
c4b7600b
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
DownloadUrl=
"$(var.DownloadUrl)"
DownloadUrl=
"$(var.DownloadUrl)"
ForcePerMachine=
"yes"
ForcePerMachine=
"yes"
EnableFeatureSelection=
"yes"
EnableFeatureSelection=
"yes"
Permanent=
"yes"
Visible=
"yes"
InstallCondition=
"(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher"
/>
InstallCondition=
"(InstallAllUsers or InstallLauncherAllUsers) and Include_launcher"
/>
<MsiPackage
Id=
"launcher_JustForMe"
<MsiPackage
Id=
"launcher_JustForMe"
...
@@ -17,6 +19,8 @@
...
@@ -17,6 +19,8 @@
DownloadUrl=
"$(var.DownloadUrl)"
DownloadUrl=
"$(var.DownloadUrl)"
ForcePerMachine=
"no"
ForcePerMachine=
"no"
EnableFeatureSelection=
"yes"
EnableFeatureSelection=
"yes"
Permanent=
"yes"
Visible=
"yes"
InstallCondition=
"not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher"
/>
InstallCondition=
"not (InstallAllUsers or InstallLauncherAllUsers) and Include_launcher"
/>
</PackageGroup>
</PackageGroup>
</Fragment>
</Fragment>
...
...
Tools/msi/bundle/packagegroups/packageinstall.wxs
0 → 100644
Dosyayı görüntüle @
c4b7600b
<?xml version="1.0"?>
<Wix
xmlns=
"http://schemas.microsoft.com/wix/2006/wi"
>
<Fragment>
<PackageGroup
Id=
"packageinstall"
>
<!--
This is an example of installing a package using pip as part of main install.
For a network-only install, remove the Payload element and change the install
command to specify the package and (optionally) version specifier.
<ExePackage Id="requests"
SourceFile="py.exe"
Compressed="yes"
DisplayName="!(loc.CompileAllDescription)"
InstallCommand='-$(var.ShortVersion)$(var.Suffix32) -m pip install requests-2.7.0-py2.py3-none-any.whl'
UninstallCommand='-$(var.ShortVersion)$(var.Suffix32) -m pip uninstall -y requests'
Vital="no"
InstallCondition="Include_pip and not LauncherOnly">
<Payload SourceFile="requests-2.7.0-py2.py3-none-any.whl"
Compressed="$(var.CompressMSI)"
DownloadUrl="$(var.DownloadUrl)" />
</ExePackage>
-->
</PackageGroup>
</Fragment>
</Wix>
\ No newline at end of file
Tools/msi/bundle/packagegroups/pip.wxs
0 → 100644
Dosyayı görüntüle @
c4b7600b
<?xml version="1.0"?>
<Wix
xmlns=
"http://schemas.microsoft.com/wix/2006/wi"
>
<Fragment>
<PackageGroup
Id=
"pip"
>
<MsiPackage
Id=
"pip_AllUsers"
SourceFile=
"pip.msi"
Compressed=
"$(var.CompressMSI)"
DownloadUrl=
"$(var.DownloadUrl)"
ForcePerMachine=
"yes"
InstallCondition=
"InstallAllUsers and Include_pip and not LauncherOnly"
>
<MsiProperty
Name=
"TARGETDIR"
Value=
"[TargetDir]"
/>
<MsiProperty
Name=
"OPTIONALFEATURESREGISTRYKEY"
Value=
"[OptionalFeaturesRegistryKey]"
/>
</MsiPackage>
<MsiPackage
Id=
"pip_JustForMe"
SourceFile=
"pip.msi"
Compressed=
"$(var.CompressMSI)"
DownloadUrl=
"$(var.DownloadUrl)"
ForcePerMachine=
"no"
InstallCondition=
"not InstallAllUsers and Include_pip and not LauncherOnly"
>
<MsiProperty
Name=
"TARGETDIR"
Value=
"[TargetDir]"
/>
<MsiProperty
Name=
"OPTIONALFEATURESREGISTRYKEY"
Value=
"[OptionalFeaturesRegistryKey]"
/>
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>
\ No newline at end of file
Tools/msi/bundle/packagegroups/postinstall.wxs
Dosyayı görüntüle @
c4b7600b
...
@@ -2,25 +2,6 @@
...
@@ -2,25 +2,6 @@
<Wix
xmlns=
"http://schemas.microsoft.com/wix/2006/wi"
>
<Wix
xmlns=
"http://schemas.microsoft.com/wix/2006/wi"
>
<Fragment>
<Fragment>
<PackageGroup
Id=
"postinstall"
>
<PackageGroup
Id=
"postinstall"
>
<MsiPackage
Id=
"pip_AllUsers"
SourceFile=
"pip.msi"
Compressed=
"$(var.CompressMSI)"
DownloadUrl=
"$(var.DownloadUrl)"
ForcePerMachine=
"yes"
InstallCondition=
"InstallAllUsers and Include_pip and not LauncherOnly"
>
<MsiProperty
Name=
"TARGETDIR"
Value=
"[TargetDir]"
/>
<MsiProperty
Name=
"OPTIONALFEATURESREGISTRYKEY"
Value=
"[OptionalFeaturesRegistryKey]"
/>
</MsiPackage>
<MsiPackage
Id=
"pip_JustForMe"
SourceFile=
"pip.msi"
Compressed=
"$(var.CompressMSI)"
DownloadUrl=
"$(var.DownloadUrl)"
ForcePerMachine=
"no"
InstallCondition=
"not InstallAllUsers and Include_pip and not LauncherOnly"
>
<MsiProperty
Name=
"TARGETDIR"
Value=
"[TargetDir]"
/>
<MsiProperty
Name=
"OPTIONALFEATURESREGISTRYKEY"
Value=
"[OptionalFeaturesRegistryKey]"
/>
</MsiPackage>
<MsiPackage
Id=
"path_AllUsers"
<MsiPackage
Id=
"path_AllUsers"
SourceFile=
"path.msi"
SourceFile=
"path.msi"
Compressed=
"$(var.CompressMSI)"
Compressed=
"$(var.CompressMSI)"
...
...
Tools/msi/msi.props
Dosyayı görüntüle @
c4b7600b
...
@@ -11,6 +11,12 @@
...
@@ -11,6 +11,12 @@
<Configuration
Condition=
"'$(Configuration)' == ''"
>
Release
</Configuration>
<Configuration
Condition=
"'$(Configuration)' == ''"
>
Release
</Configuration>
<Platform
Condition=
"'$(Platform)' == ''"
>
x86
</Platform>
<Platform
Condition=
"'$(Platform)' == ''"
>
x86
</Platform>
<InstallScope
Condition=
"'$(InstallScope)' != 'perMachine'"
>
perUser
</InstallScope>
<InstallScope
Condition=
"'$(InstallScope)' != 'perMachine'"
>
perUser
</InstallScope>
</PropertyGroup>
<Import
Project=
"wix.props"
/>
<Import
Project=
"..\..\PCBuild\tcltk.props"
/>
<PropertyGroup>
<!--
<!--
This URI is used to generate the various GUIDs used by the installer.
This URI is used to generate the various GUIDs used by the installer.
Installers built with the same URI will upgrade each other or block
Installers built with the same URI will upgrade each other or block
...
@@ -21,17 +27,15 @@
...
@@ -21,17 +27,15 @@
that intend to bundle Python should rebuild these modules with their
that intend to bundle Python should rebuild these modules with their
own URI to avoid conflicting with the official releases.
own URI to avoid conflicting with the official releases.
The official releases
are built with http://www.python.org/.
The official releases
use "http://www.python.org/$(ArchName)"
This is not the same as the DownloadUrl property used in the bundle
This is not the same as the DownloadUrl property used in the bundle
projects.
projects.
-->
-->
<ReleaseUri
Condition=
"'$(ReleaseUri)' == ''"
>
$(ComputerName)
</ReleaseUri>
<ReleaseUri
Condition=
"'$(ReleaseUri)' == ''"
>
$(ComputerName)
/$(ArchName)/
</ReleaseUri>
<ReleaseUri
Condition=
"!$(ReleaseUri.EndsWith(`/`))"
>
$(ReleaseUri)/
</ReleaseUri>
<ReleaseUri
Condition=
"!$(ReleaseUri.EndsWith(`/`))"
>
$(ReleaseUri)/
</ReleaseUri>
</PropertyGroup>
</PropertyGroup>
<Import
Project=
"wix.props"
/>
<Import
Project=
"..\..\PCBuild\tcltk.props"
/>
<ItemGroup>
<ItemGroup>
<Compile
Include=
"$(MSBuildThisFileDirectory)common.wxs"
/>
<Compile
Include=
"$(MSBuildThisFileDirectory)common.wxs"
/>
...
@@ -150,7 +154,7 @@
...
@@ -150,7 +154,7 @@
<Target
Name=
"_GenerateGuids"
AfterTargets=
"PrepareForBuild"
>
<Target
Name=
"_GenerateGuids"
AfterTargets=
"PrepareForBuild"
>
<PropertyGroup>
<PropertyGroup>
<_Uuids>
@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')
</_Uuids>
<_Uuids>
@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')
</_Uuids>
<_GenerateCommand>
import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri)' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))
</_GenerateCommand>
<_GenerateCommand>
import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri
.Replace(`{arch}`, `$(ArchName)`)
)' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))
</_GenerateCommand>
</PropertyGroup>
</PropertyGroup>
<Exec
Command=
'"$(PythonExe)" -c "$(_GenerateCommand)" > "$(IntermediateOutputPath)$(OutputName)guids.txt"'
<Exec
Command=
'"$(PythonExe)" -c "$(_GenerateCommand)" > "$(IntermediateOutputPath)$(OutputName)guids.txt"'
...
...
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