Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 28 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ configuration:
- Debug
# see http://www.boost.org/doc/libs/1_66_0/libs/python/doc/html/building/python_debugging_builds.html
# not available by boost nuget package
#- PythonDebug
#- PythonDebug

install:
- git submodule -q update --init
Expand All @@ -35,14 +35,27 @@ install:
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\packages
- nuget restore "%APPVEYOR_BUILD_FOLDER%"\PythonScript.Tests\packages.config -PackagesDirectory "%APPVEYOR_BUILD_FOLDER%"\packages


build_script:
- cd "%APPVEYOR_BUILD_FOLDER%"
- del "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\PythonSettings.props
- copy "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\PythonSettings_appveyor.props "%APPVEYOR_BUILD_FOLDER%"\PythonScript\project\PythonSettings.props
- msbuild PythonScript.sln /m /p:configuration="%configuration%" /p:platform="%platform_input%" /p:PlatformToolset="%PlatformToolset%" /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"

after_build:
- if "%configuration%"=="Release" cd "%APPVEYOR_BUILD_FOLDER%"\docs
- if "%configuration%"=="Release" python -m pip install --upgrade pip
- if "%configuration%"=="Release" pip install -U sphinx
- if "%configuration%"=="Release" make.bat htmlhelp
# hhc fails with exit code 1 also chm file is created and ok, unclear why, so workaround with forcing exit 0
- if "%configuration%"=="Release" hhc.exe build\htmlhelp\PythonScript.hhp & exit 0

- cd "%APPVEYOR_BUILD_FOLDER%"\installer
- set WIX_PATH="C:\Program Files (x86)\WiX Toolset v3.11\bin"
- set PATH=%WIX_PATH%;%PATH%
- if "%platform_input%"=="x64" SET PYTHONBUILDDIR="%APPVEYOR_BUILD_FOLDER%"\packages\python2.2.7.14\tools
- if "%platform_input%"=="Win32" SET PYTHONBUILDDIR="%APPVEYOR_BUILD_FOLDER%"\packages\python2x86.2.7.14\tools
- copy "%APPVEYOR_BUILD_FOLDER%"\installer\buildPaths.bat.orig "%APPVEYOR_BUILD_FOLDER%"\installer\buildPaths.bat
- if "%platform_input%"=="Win32" if "%configuration%"=="Release" buildAll.bat
- cd "%APPVEYOR_BUILD_FOLDER%"
- ps: >-

Expand All @@ -54,20 +67,26 @@ after_build:
Push-AppveyorArtifact "bin\$env:CONFIGURATION\PythonScript.dll" -FileName PythonScript.dll
}

if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORM_INPUTTOOLSET -eq "v140_xp") {
if ($($env:APPVEYOR_REPO_TAG) -eq "true" -and $env:CONFIGURATION -eq "Release" -and $env:PLATFORMTOOLSET -eq "v140_xp") {
if($env:PLATFORM_INPUT -eq "x64"){
$ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName "%APPVEYOR_BUILD_FOLDER%"\$env:PLATFORM_INPUT\$env:CONFIGURATION\*.dll
$ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x64.zip"
7z a $ZipFileName $env:APPVEYOR_BUILD_FOLDER\$env:PLATFORM_INPUT\$env:CONFIGURATION\*.dll
Push-AppveyorArtifact $ZipFileName -FileName $ZipFileName
#Get-ChildItem .\installer\build\**\*.msi | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
#Get-ChildItem .\installer\build\**\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
}
if($env:PLATFORM_INPUT -eq "Win32"){
$ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName "%APPVEYOR_BUILD_FOLDER%"\bin\$env:CONFIGURATION\*.dll
$ZipFileName = "PythonScript_$($env:APPVEYOR_REPO_TAG_NAME)_x86.zip"
7z a $ZipFileName $env:APPVEYOR_BUILD_FOLDER\bin\$env:CONFIGURATION\*.dll
Push-AppveyorArtifact $ZipFileName -FileName $ZipFileName
Get-ChildItem .\installer\build\**\*.msi | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
Get-ChildItem .\installer\build\**\*.zip | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName releases}
}
}

artifacts:
- path: PythonScript_*.zip
name: releases
#- path: installer\build\**\*.*
# name: releases

deploy:
provider: GitHub
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand Down
2 changes: 1 addition & 1 deletion installer/PythonScript.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</Directory>
<Component Id="C_python27.dll" Guid="*">
<RemoveFile Id="Remove_F_python27.dll" Name="python27.dll" On="install"/>
<File Id="F_python27.dll" Name="python27.dll" Source="$(var.pythonDir)\PCBuild\python27.dll" />
<File Id="F_python27.dll" Name="python27.dll" Source="$(var.pythonDir)\python27.dll" />
</Component>
</Directory>
</Directory>
Expand Down
16 changes: 9 additions & 7 deletions installer/buildInstaller.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

:: Set PYTHONBUILDDIR to the root of your python directory
:: Or, if you just want to build the installer for PythonScript with an existing python27.dll,
:: set PYTHONBUILDDIR to a path containing a PCBuild directory, which contains the python27.dll
:: set PYTHONBUILDDIR to a path containing a directory, which contains the python27.dll


SET ORIGINALDIR=%CD%
Expand All @@ -16,17 +16,19 @@ IF NOT EXIST "buildPaths.bat" (

CALL buildPaths.bat

IF NOT EXIST "%PYTHONBUILDDIR%\pcbuild\python.exe" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python.exe. Please set PYTHONBUILDDIR to the root of a built Python 2.7
IF NOT EXIST "%PYTHONBUILDDIR%\python.exe" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain python.exe. Please set PYTHONBUILDDIR to the root of a built Python 2.7
goto error
)

IF NOT EXIST "%PYTHONBUILDDIR%\pcbuild\python27.dll" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python27.dll. Please set PYTHONBUILDDIR to the root of a built Python 2.7
IF NOT EXIST "%PYTHONBUILDDIR%\python27.dll" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain python27.dll. Please set PYTHONBUILDDIR to the root of a built Python 2.7
goto error
)

%PYTHONBUILDDIR%\pcbuild\python extractVersion.py > temp\version.txt
mkdir temp

%PYTHONBUILDDIR%\python extractVersion.py > temp\version.txt
SET /p PYTHONSCRIPTVERSION= < temp\version.txt


Expand Down Expand Up @@ -94,7 +96,7 @@ if NOT [%ERRORLEVEL%]==[0] (


echo Compiling main PythonScript installer
candle pythonscript.wxs -o temp\pythonscript.wixobj -dversion=%PYTHONSCRIPTVERSION% -dbaseDir=.. -dpythonDir=l:\code\cpython
candle pythonscript.wxs -o temp\pythonscript.wixobj -dversion=%PYTHONSCRIPTVERSION% -dbaseDir=.. -dpythonDir=%PYTHONBUILDDIR%
if NOT [%ERRORLEVEL%]==[0] (
goto error
)
Expand Down
2 changes: 1 addition & 1 deletion installer/buildPaths.bat.orig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: Edit the path below to your local path for (built) Python2.7 source tree, or set the PYTHONBUILDDIR variable before calling

IF [%PYTHONBUILDDIR%] == [] (
SET PYTHONBUILDDIR=l:\code\cpython
SET PYTHONBUILDDIR=l:\code\cpython\pcbuild
)
36 changes: 19 additions & 17 deletions installer/buildReleaseZips.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ IF NOT EXIST "buildPaths.bat" (

CALL buildPaths.bat

IF NOT EXIST "%PYTHONBUILDDIR%\pcbuild\python.exe" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python.exe. Please set PYTHONBUILDDIR to the root of a built Python 2.7
IF NOT EXIST "%PYTHONBUILDDIR%\python.exe" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain python.exe. Please set PYTHONBUILDDIR to the root of a built Python 2.7
goto error
)

IF NOT EXIST "%PYTHONBUILDDIR%\pcbuild\python27.dll" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain PCBuild\python27.dll. Please set PYTHONBUILDDIR to the root of a built Python 2.7
IF NOT EXIST "%PYTHONBUILDDIR%\python27.dll" (
echo Your PYTHONBUILDDIR in buildPaths.bat does not contain python27.dll. Please set PYTHONBUILDDIR to the root of a built Python 2.7
goto error
)

Expand All @@ -31,6 +31,8 @@ IF EXIST "c:\program files\7-Zip\7z.exe" (
SET SEVENZIPEXE=7z.exe
)

mkdir temp

%SEVENZIPEXE% 2>&1 > temp\junk.txt

IF NOT [%ERRORLEVEL%]==[0] (
Expand All @@ -43,7 +45,7 @@ IF NOT [%ERRORLEVEL%]==[0] (



%PYTHONBUILDDIR%\pcbuild\python extractVersion.py > temp\version.txt
%PYTHONBUILDDIR%\python extractVersion.py > temp\version.txt
SET /p PYTHONSCRIPTVERSION= < temp\version.txt

echo Building Release for version %PYTHONSCRIPTVERSION%
Expand All @@ -63,8 +65,8 @@ mkdir temp\release\Extra\plugins\PythonScript\lib
mkdir temp\release\Tcl\plugins\PythonScript\lib\tcl

echo Copying Python27.dll
copy %PYTHONBUILDDIR%\PCBuild\python27.dll temp\release\Full
copy %PYTHONBUILDDIR%\PCBuild\python27.dll temp\release\Min
copy %PYTHONBUILDDIR%\python27.dll temp\release\Full
copy %PYTHONBUILDDIR%\python27.dll temp\release\Min

echo Copying PythonScript.dll
copy ..\bin\Release\PythonScript.dll temp\release\Full\plugins
Expand Down Expand Up @@ -116,47 +118,47 @@ echo Here are the local server links if you can't get to ^<a href="http://source
echo Please use the sourceforge link if you can - I have limited bandwidth limits. >> %INSTALLERDIR%\..\www\localdl.shtml
echo ^<br/^>^<br/^>^<br/^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%.msi > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%.msi > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt

echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_%PYTHONSCRIPTVERSION%.msi"^>Python Script %PYTHONSCRIPTVERSION% Installer (includes all extra files) (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Full_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Full_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_Full_%PYTHONSCRIPTVERSION%.7z"^>Python Script %PYTHONSCRIPTVERSION% FULL 7zip version (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Full_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Full_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_Full_%PYTHONSCRIPTVERSION%.zip"^>Python Script %PYTHONSCRIPTVERSION% FULL zip version (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Min_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Min_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_Min_%PYTHONSCRIPTVERSION%.7z"^>Python Script %PYTHONSCRIPTVERSION% MINIMUM 7zip version (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Min_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_Min_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_Min_%PYTHONSCRIPTVERSION%.zip"^>Python Script %PYTHONSCRIPTVERSION% MINIMUM zip version (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.7z"^>Extra libraries 7z (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_ExtraLibs_%PYTHONSCRIPTVERSION%.zip"^>Extra libraries zip (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_TclTk_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_TclTk_%PYTHONSCRIPTVERSION%.7z > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_TclTk_%PYTHONSCRIPTVERSION%.7z"^>Tcl/Tk libraries 7z (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_TclTk_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
%PYTHONBUILDDIR%\python %INSTALLERDIR%\humanReadableSize.py %INSTALLERDIR%\build\%PYTHONSCRIPTVERSION%\PythonScript_TclTk_%PYTHONSCRIPTVERSION%.zip > %INSTALLERDIR%\temp\size.txt
SET /p PYTHONSCRIPT_FILESIZE= < %INSTALLERDIR%\temp\size.txt
echo ^<br/^>^<a href="http://www.brotherstone.co.uk/npp/ps/downloads/%PYTHONSCRIPTVERSION%/PythonScript_TclTk_%PYTHONSCRIPTVERSION%.zip"^>Tcl/Tk libraries zip (%PYTHONSCRIPT_FILESIZE%)^</a^> >> %INSTALLERDIR%\..\www\localdl.shtml

echo ^<!--#include virtual="footer.inc" --^> >> %INSTALLERDIR%\..\www\localdl.shtml

echo Updating "Latest Version" in header.inc
%PYTHONBUILDDIR%\pcbuild\python %INSTALLERDIR%\updateLatestVersion.py %INSTALLERDIR%\..\www\header.inc %PYTHONSCRIPTVERSION%
%PYTHONBUILDDIR%\python %INSTALLERDIR%\updateLatestVersion.py %INSTALLERDIR%\..\www\header.inc %PYTHONSCRIPTVERSION%


CD /d %ORIGINALDIR%