Skip to content

Commit

Permalink
Merge pull request #48 from chcg/x64_build_bat
Browse files Browse the repository at this point in the history
scripts for x64
  • Loading branch information
chcg authored Apr 21, 2018
2 parents 04eaca9 + 500c021 commit 255180f
Show file tree
Hide file tree
Showing 39 changed files with 143 additions and 95 deletions.
File renamed without changes.
Binary file added PythonLib/extra_dll_x64/_bsddb.pyd
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added PythonLib/full_dll_x64/_ctypes.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_elementtree.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_hashlib.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_msi.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_multiprocessing.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_socket.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_sqlite3.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/_ssl.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/bz2.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/pyexpat.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/select.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/unicodedata.pyd
Binary file not shown.
Binary file added PythonLib/full_dll_x64/winsound.pyd
Binary file not shown.
10 changes: 5 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ after_build:
- 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%"=="x64" SET PYTHONBUILDDIR_X64="%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
- if "%configuration%"=="Release" buildAll.bat %platform_input%
- cd "%APPVEYOR_BUILD_FOLDER%"
- ps: >-
Expand All @@ -72,8 +72,8 @@ after_build:
$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}
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"
Expand All @@ -91,7 +91,7 @@ artifacts:
deploy:
provider: GitHub
auth_token:
secure: !!TODO, see https://www.appveyor.com/docs/deployment/github/#provider-settings!!
secure: z5nuqsjm/L3HYsjSkMsVBH8EPAK17v3OOXzZDyp9hWx9J6Ff/gDYtbzWMoUtW0dI
artifact: releases
draft: false
prerelease: false
Expand Down
2 changes: 1 addition & 1 deletion docs/source/compiling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Building PythonScript itself
----------------------------

Next step is to set the paths of where your boost and python libraries are. That's just a matter of setting the properties
in the .vsprops file - View, Other Windows, Property Manager in VS2010. Then set the macros in the User Macros section (under Debug and Release).
in the .vsprops file - View, Other Windows, Property Manager in VS2015. Then set the macros in the User Macros section (under Debug and Release).

One last note on the code, a lot of the Python wrapper is automatically generated, with the CreateWrapper.py script. If you need to
alter a Scintilla function, change the CreateWrapper.py script, not the generated code, or your changes will be lost next time CreateWrapper.py
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

# General information about the project.
project = u'PythonScript'
copyright = u'2010,2014 Dave Brotherstone'
copyright = u'2010,2014,2018 Dave Brotherstone'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -232,7 +232,7 @@
epub_title = u'PythonScript'
epub_author = u'Dave Brotherstone'
epub_publisher = u'Dave Brotherstone'
epub_copyright = u'2010, Dave Brotherstone'
epub_copyright = u'2010,2014,2018 Dave Brotherstone'

# The language of the text. It defaults to the language option
# or en if the language is not set.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/pythonprimer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ If you need to use ``\`` itself, just include two::

You can also use ``raw`` strings. These don't need the ``\\`` to mean ``\``, which can make certain strings (particularly regular expressions) easier to understand. However, you also can't escape a quote. To make a raw string, just put an ``r`` before the string

someString = r"this is also a string using a \ backslash"
someString = r"this is also a string using a \\ backslash"


Further Information
Expand Down
4 changes: 2 additions & 2 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Installation
------------

Installation is very simple, either through Plugin Manager, or manually. The zip or 7zip archive contains the
the files in the correct layout - just copy to your Notepad++ directory (e.g. `c:\Program Files\Notepad++`)
the files in the correct layout - just copy to your Notepad++ directory (e.g. `c:\\Program Files\\Notepad++`)

The file layout is as follows::

Notepad++ (your main Notepad++ directory, probably under "C:\Program Files")
+
|-- python26.dll (this is important. This needs to go in the main program directory of Notepad++, next to notepad++.exe)
|-- python27.dll (this is important. This needs to go in the main program directory of Notepad++, next to notepad++.exe)
| (unless you have a Python installation already, in which case it's probably in C:\windows already)
+-- plugins
\
Expand Down
2 changes: 1 addition & 1 deletion installer/PythonScript.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</Directory>
<Component Id="C_pythonscript.dll" Guid="*">
<RemoveFile Id="Remove_F_pythonscript.dll" Name="PythonScript.dll" On="install"/>
<File Id="F_pythonscript.dll" Name="PythonScript.dll" Source="$(var.baseDir)\bin\Release\PythonScript.dll" />
<File Id="F_pythonscript.dll" Name="PythonScript.dll" Source="$(var.baseDir)\$(var.variantDir)\Release\PythonScript.dll" />
</Component>
</Directory>
<Component Id="C_python27.dll" Guid="*">
Expand Down
4 changes: 2 additions & 2 deletions installer/buildAll.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: Run this script to put all the release packages together.
:: You should have a built PythonScript in release mode, a built python, and all the libraries checked out

call buildInstaller.bat
call buildReleaseZips.bat
call buildInstaller.bat %1
call buildReleaseZips.bat %1
65 changes: 49 additions & 16 deletions installer/buildInstaller.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,17 @@ IF NOT EXIST "buildPaths.bat" (
goto error
)

SET PYTHONSCRIPTDLLDIR=bin
SET INST_TEMP_DIR=temp
SET NAME_ADDON=""

CALL buildPaths.bat

IF "%1"=="x64" SET PYTHONBUILDDIR=%PYTHONBUILDDIR_X64%
IF "%1"=="x64" SET PYTHONSCRIPTDLLDIR=x64
IF "%1"=="x64" SET INST_TEMP_DIR=temp64
IF "%1"=="x64" SET NAME_ADDON=_x64

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
Expand All @@ -26,77 +35,101 @@ IF NOT EXIST "%PYTHONBUILDDIR%\python27.dll" (
goto error
)

mkdir temp
mkdir %INST_TEMP_DIR%

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


echo Generating WiX information for ..\pythonlib\full
heat dir ..\pythonlib\full -ag -cg CG_PythonLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o temp\fullLib.wxs
heat dir ..\pythonlib\full -ag -cg CG_PythonLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\fullLib.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling python lib WiX source
candle temp\fullLib.wxs -o temp\fullLib.wixobj -dpylibSource=..\pythonlib\full
candle %INST_TEMP_DIR%\fullLib.wxs -o %INST_TEMP_DIR%\fullLib.wixobj -dpylibSource=..\pythonlib\full
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Generating WiX information for ..\pythonlib\full_dll%NAME_ADDON%
heat dir ..\pythonlib\full_dll%NAME_ADDON% -ag -cg CG_PythonLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling python pyd lib WiX source
candle %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wxs -o %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wixobj -dpylibSource=..\pythonlib\full_dll%NAME_ADDON%
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Generating WiX information for ..\pythonlib\extra
heat dir ..\pythonlib\extra -ag -cg CG_PythonExtraLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o temp\extra.wxs
heat dir ..\pythonlib\extra -ag -cg CG_PythonExtraLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\extra.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling extra lib WiX source
candle %INST_TEMP_DIR%\extra.wxs -o %INST_TEMP_DIR%\extra.wixobj -dpylibSource=..\pythonlib\extra
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Generating WiX information for ..\pythonlib\extra_dll%NAME_ADDON%
heat dir ..\pythonlib\extra_dll%NAME_ADDON% -ag -cg CG_PythonExtraLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\extra_dll%NAME_ADDON%.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling extra lib WiX source
candle temp\extra.wxs -o temp\extra.wixobj -dpylibSource=..\pythonlib\extra
candle %INST_TEMP_DIR%\extra_dll%NAME_ADDON%.wxs -o %INST_TEMP_DIR%\extra_dll%NAME_ADDON%.wixobj -dpylibSource=..\pythonlib\extra_dll%NAME_ADDON%
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Generating WiX information for ..\pythonlib\tcl
heat dir ..\pythonlib\tcl -ag -cg CG_PythonTclTkLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o temp\tcl.wxs
heat dir ..\pythonlib\tcl -ag -cg CG_PythonTclTkLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\tcl.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling tcl lib WiX source
candle temp\tcl.wxs -o temp\tcl.wixobj -dpylibSource=..\pythonlib\tcl
candle %INST_TEMP_DIR%\tcl.wxs -o %INST_TEMP_DIR%\tcl.wixobj -dpylibSource=..\pythonlib\tcl
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Generating WiX information for ..\PythonScript\scripts\Samples
heat dir ..\scripts\Samples -ag -cg CG_SampleScripts -dr D_PythonScript -var var.scriptSource -t changeDirSampleScripts.xsl -o temp\sampleScripts.wxs
heat dir ..\scripts\Samples -ag -cg CG_SampleScripts -dr D_PythonScript -var var.scriptSource -t changeDirSampleScripts.xsl -o %INST_TEMP_DIR%\sampleScripts.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling Sample Scripts WiX source
candle temp\sampleScripts.wxs -o temp\sampleScripts.wixobj -dscriptSource=..\scripts\Samples
candle %INST_TEMP_DIR%\sampleScripts.wxs -o %INST_TEMP_DIR%\sampleScripts.wixobj -dscriptSource=..\scripts\Samples
if NOT [%ERRORLEVEL%]==[0] (
goto error
)


echo Generating WiX information for ..\PythonScript\python_tests
heat dir ..\PythonScript\python_tests -ag -cg CG_UnitTests -dr D_PythonScript -var var.unittestSource -t changeDirTests.xsl -o temp\unittests.wxs
heat dir ..\PythonScript\python_tests -ag -cg CG_UnitTests -dr D_PythonScript -var var.unittestSource -t changeDirTests.xsl -o %INST_TEMP_DIR%\unittests.wxs
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo Compiling Unit test WiX source
candle temp\unittests.wxs -o temp\unittests.wixobj -dunittestSource=..\pythonscript\python_tests
candle %INST_TEMP_DIR%\unittests.wxs -o %INST_TEMP_DIR%\unittests.wixobj -dunittestSource=..\pythonscript\python_tests
if NOT [%ERRORLEVEL%]==[0] (
goto error
)



echo Compiling main PythonScript installer
candle pythonscript.wxs -o temp\pythonscript.wixobj -dversion=%PYTHONSCRIPTVERSION% -dbaseDir=.. -dpythonDir=%PYTHONBUILDDIR%
candle pythonscript.wxs -o %INST_TEMP_DIR%\pythonscript.wixobj -dversion=%PYTHONSCRIPTVERSION% -dbaseDir=.. -dpythonDir=%PYTHONBUILDDIR% -dvariantDir=%PYTHONSCRIPTDLLDIR%
if NOT [%ERRORLEVEL%]==[0] (
goto error
)
Expand All @@ -108,14 +141,14 @@ IF NOT EXIST "build\%PYTHONSCRIPTVERSION%" (
)


light temp\pythonscript.wixobj temp\fullLib.wixobj temp\extra.wixobj temp\unittests.wixobj temp\tcl.wixobj temp\sampleScripts.wixobj -o build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%.msi -ext WixUIExtension
light %INST_TEMP_DIR%\pythonscript.wixobj %INST_TEMP_DIR%\fullLib.wixobj %INST_TEMP_DIR%\extra.wixobj %INST_TEMP_DIR%\unittests.wixobj %INST_TEMP_DIR%\tcl.wixobj %INST_TEMP_DIR%\sampleScripts.wixobj -o build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%%NAME_ADDON%.msi -ext WixUIExtension
if NOT [%ERRORLEVEL%]==[0] (
goto error
)

echo.
echo.
echo Installer created - build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%.msi
echo Installer created - build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%%NAME_ADDON%.msi

goto end

Expand Down
3 changes: 3 additions & 0 deletions installer/buildPaths.bat.orig
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@

IF [%PYTHONBUILDDIR%] == [] (
SET PYTHONBUILDDIR=l:\code\cpython\pcbuild
)
IF [%PYTHONBUILDDIR_X64%] == [] (
SET PYTHONBUILDDIR_X64=l:\code\cpython\pcbuild_x64
)
Loading

0 comments on commit 255180f

Please sign in to comment.