Skip to content

Commit b1b9c14

Browse files
committed
- remove unused xsl msi scripts TODO: Remove also __pycache__ dirs on unistall, maybe also pyc files
1 parent 7c54a2c commit b1b9c14

11 files changed

+36
-219
lines changed

.github/workflows/CI_build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,4 @@ jobs:
4747
$env:PYTHONBUILDDIR='${{ github.workspace }}\packages\pythonx86.3.12.8\tools'
4848
Rename-Item -Path ".\buildPaths.bat.orig" -NewName "buildPaths.bat"
4949
dotnet tool install --global wix
50-
$env:WIX_HEAT_PATH="${{ github.workspace }}\packages\wixtoolset.heat.5.0.2\tools\net472\x64"
51-
$env:PATH = $env:WIX_HEAT_PATH + ';' + $env:PATH
5250
.\buildAll.bat ${{ matrix.build_platform }}

PythonScript/project/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="WixToolset.UI.wixext" version="5.0.2" targetFramework="native" />
4-
<package id="WixToolset.Heat" version="5.0.2" targetFramework="native" />
54
<package id="boost" version="1.87.0" targetFramework="native" />
65
<package id="boost_python312-vc143" version="1.87.0" targetFramework="native" />
76
<package id="python" version="3.12.8" targetFramework="native" />
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="WixToolset.UI.wixext" version="5.0.2" targetFramework="native" />
34
<package id="boost" version="1.87.0" targetFramework="native" />
45
<package id="boost_python312-vc143" version="1.87.0" targetFramework="native" />
56
</packages>

appveyor.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ after_build:
4343

4444
- cd "%APPVEYOR_BUILD_FOLDER%"\installer
4545
- dotnet tool install --global wix
46-
- set WIX_HEAT_PATH="%APPVEYOR_BUILD_FOLDER%"\packages\wixtoolset.heat.5.0.2\tools\net472\x64
47-
- set PATH=%WIX_HEAT_PATH%;%PATH%
4846
- if "%platform_input%"=="x64" SET PYTHONBUILDDIR_X64="%APPVEYOR_BUILD_FOLDER%"\packages\python.3.12.8\tools
4947
- if "%platform_input%"=="Win32" SET PYTHONBUILDDIR="%APPVEYOR_BUILD_FOLDER%"\packages\pythonx86.3.12.8\tools
5048
- copy "%APPVEYOR_BUILD_FOLDER%"\installer\buildPaths.bat.orig "%APPVEYOR_BUILD_FOLDER%"\installer\buildPaths.bat

installer/PythonScript.wxs

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33

44
<?if $(var.Platform) = x64 ?>
55
<?define ProductName = "PythonScript plugin for Notepad++ (64 bit)" ?>
6-
<?define Win64 = "always64" ?>
76
<?else?>
87
<?define ProductName = "PythonScript plugin for Notepad++" ?>
9-
<?define Win64 = "always32" ?>
108
<?endif?>
119

1210
<Package Language="1033" Manufacturer="Dave Brotherstone" Name="$(var.ProductName)" UpgradeCode="717FEC91-6F2B-459D-9868-0A3A037F5195" Version="$(var.version)" InstallerVersion="200"><Upgrade Id="717FEC91-6F2B-459D-9868-0A3A037F5195">
@@ -40,7 +38,7 @@
4038
<ComponentGroupRef Id="CG_PythonTclTkLibDll" />
4139
</Feature>
4240
<Feature Id="FT_UnitTests" Title="Unit Tests" Level="10" AllowAdvertise="no" Description="Unit tests for PythonScript. Not usually necessary, but if you are having problems, any issues reported from the tests will be useful for diagnosis.">
43-
<ComponentGroupRef Id="CG_UnitTests" />
41+
<ComponentGroupRef Id="CG_Unittests" />
4442
</Feature>
4543
</Feature>
4644

@@ -49,13 +47,42 @@
4947
<WixVariable Id="WixUIDialogBmp" Value="images\dialog.bmp" />
5048
<ui:WixUI Id="WixUI_FeatureTree" />
5149

50+
<ComponentGroup Id="CG_PythonLib" Directory="D_PythonLib">
51+
<Files Include="..\pythonlib\full\**" />
52+
</ComponentGroup>
53+
54+
<ComponentGroup Id="CG_PythonLibDll" Directory="D_PythonLib">
55+
<Files Include="..\pythonlib\full_dll$(var.nameAddon)\**" />
56+
</ComponentGroup>
57+
58+
<ComponentGroup Id="CG_HtmlDocs" Directory="D_DocPythonScript">
59+
<Files Include="..\docs\build\html\**" />
60+
</ComponentGroup>
61+
62+
<ComponentGroup Id="CG_SampleScripts" Directory="D_SampleScripts">
63+
<Files Include="..\scripts\Samples\**" />
64+
</ComponentGroup>
65+
66+
<ComponentGroup Id="CG_PythonTclTkLib" Directory="D_PythonLib">
67+
<Files Include="..\pythonlib\tcl\**" />
68+
</ComponentGroup>
69+
70+
<ComponentGroup Id="CG_PythonTclTkLibDll" Directory="D_PythonLib">
71+
<Files Include="..\pythonlib\tcl_dll$(var.nameAddon)\**" />
72+
</ComponentGroup>
73+
74+
<ComponentGroup Id="CG_Unittests" Directory="D_npp_unit_tests">
75+
<Files Include="..\PythonScript\python_tests\**" />
76+
</ComponentGroup>
77+
78+
5279
<StandardDirectory Id="ProgramFiles6432Folder">
5380
<Directory Id="INSTALLDIR" Name="Notepad++">
5481
<Directory Id="D_Plugins" Name="plugins">
5582
<Directory Id="D_PythonScript" Name="PythonScript">
5683
<Directory Id="D_PythonLib" Name="lib" />
5784
<Directory Id="D_Scripts" Name="scripts">
58-
<Component Id="C_startup.py" Bitness="$(var.Win64)">
85+
<Component Id="C_startup.py">
5986
<RemoveFile Id="Remove_F_startup.py" Name="startup.py" On="install" />
6087
<RemoveFile Id="Remove_F_startup.pyc" Name="startup.pyc" On="install" />
6188
<File Id="F_startup.py" KeyPath="yes" Name="startup.py" Source="$(var.baseDir)\scripts\startup.py" />
@@ -64,11 +91,11 @@
6491
<Directory Id="D_SampleScripts" Name="Samples" />
6592
</Directory>
6693
<Directory Id="D_DocPythonScript" Name="doc" />
67-
<Component Id="C_pythonscript.dll" Bitness="$(var.Win64)">
94+
<Component Id="C_pythonscript.dll">
6895
<RemoveFile Id="Remove_F_pythonscript.dll" Name="PythonScript.dll" On="install" />
6996
<File Id="F_pythonscript.dll" Name="PythonScript.dll" Source="$(var.baseDir)\$(var.variantDir)\Release\PythonScript.dll" />
7097
</Component>
71-
<Component Id="C_python312.dll" Bitness="$(var.Win64)">
98+
<Component Id="C_python312.dll">
7299
<RemoveFile Id="Remove_F_python312.dll" Name="python312.dll" On="install" />
73100
<File Id="F_python312.dll" Name="python312.dll" Source="$(var.pythonDir)\python312.dll" />
74101
</Component>

installer/buildInstaller.bat

Lines changed: 2 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -43,111 +43,15 @@ mkdir %INST_TEMP_DIR%
4343
SET /p PYTHONSCRIPTVERSION= < %INST_TEMP_DIR%\version.txt
4444

4545

46-
echo Generating WiX information for ..\pythonlib\full
47-
heat dir ..\pythonlib\full -ag -cg CG_PythonLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\fullLib.wxs
48-
if NOT [%ERRORLEVEL%]==[0] (
49-
goto error
50-
)
51-
52-
echo Compiling python lib WiX source
53-
wix build %INST_TEMP_DIR%\fullLib.wxs -o %INST_TEMP_DIR%\fullLib.wixlib -d pylibSource=..\pythonlib\full -arch %MSI_ARCH%
54-
if NOT [%ERRORLEVEL%]==[0] (
55-
goto error
56-
)
57-
58-
echo Generating WiX information for ..\pythonlib\full_dll%NAME_ADDON%
59-
heat dir ..\pythonlib\full_dll%NAME_ADDON% -ag -cg CG_PythonLibDll -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wxs
60-
if NOT [%ERRORLEVEL%]==[0] (
61-
goto error
62-
)
63-
64-
echo Compiling python pyd lib WiX source
65-
wix build %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wxs -o %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wixlib -d pylibSource=..\pythonlib\full_dll%NAME_ADDON% -arch %MSI_ARCH%
66-
if NOT [%ERRORLEVEL%]==[0] (
67-
goto error
68-
)
69-
70-
echo Generating WiX information for ..\pythonlib\tcl
71-
heat dir ..\pythonlib\tcl -ag -cg CG_PythonTclTkLib -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\tcl.wxs
72-
if NOT [%ERRORLEVEL%]==[0] (
73-
goto error
74-
)
75-
76-
echo Compiling tcl lib WiX source
77-
wix build %INST_TEMP_DIR%\tcl.wxs -o %INST_TEMP_DIR%\tcl.wixlib -d pylibSource=..\pythonlib\tcl -arch %MSI_ARCH%
78-
if NOT [%ERRORLEVEL%]==[0] (
79-
goto error
80-
)
81-
82-
echo Generating WiX information for ..\pythonlib\tcl_dll%NAME_ADDON%
83-
heat dir ..\pythonlib\tcl_dll%NAME_ADDON% -ag -cg CG_PythonTclTkLibDll -dr D_PythonScript -var var.pylibSource -t changeDirLib.xsl -o %INST_TEMP_DIR%\tcl_dll%NAME_ADDON%.wxs
84-
if NOT [%ERRORLEVEL%]==[0] (
85-
goto error
86-
)
87-
88-
echo Compiling tcl lib WiX source
89-
wix build %INST_TEMP_DIR%\tcl_dll%NAME_ADDON%.wxs -o %INST_TEMP_DIR%\tcl_dll%NAME_ADDON%.wixlib -d pylibSource=..\pythonlib\tcl_dll%NAME_ADDON% -arch %MSI_ARCH%
90-
if NOT [%ERRORLEVEL%]==[0] (
91-
goto error
92-
)
93-
94-
echo Generating WiX information for ..\PythonScript\scripts\Samples
95-
heat dir ..\scripts\Samples -ag -cg CG_SampleScripts -dr D_PythonScript -var var.scriptSource -t changeDirSampleScripts.xsl -o %INST_TEMP_DIR%\sampleScripts.wxs
96-
if NOT [%ERRORLEVEL%]==[0] (
97-
goto error
98-
)
99-
100-
echo Compiling Sample Scripts WiX source
101-
wix build %INST_TEMP_DIR%\sampleScripts.wxs -o %INST_TEMP_DIR%\sampleScripts.wixlib -d scriptSource=..\scripts\Samples -arch %MSI_ARCH%
102-
if NOT [%ERRORLEVEL%]==[0] (
103-
goto error
104-
)
105-
106-
107-
echo Generating WiX information for ..\PythonScript\python_tests
108-
heat dir ..\PythonScript\python_tests -ag -cg CG_UnitTests -dr D_PythonScript -var var.unittestSource -t changeDirTests.xsl -o %INST_TEMP_DIR%\unittests.wxs -platform=%NAME_ADDON%
109-
if NOT [%ERRORLEVEL%]==[0] (
110-
goto error
111-
)
112-
113-
echo Compiling Unit test WiX source
114-
wix build %INST_TEMP_DIR%\unittests.wxs -o %INST_TEMP_DIR%\unittests.wixlib -d unittestSource=..\PythonScript\python_tests -arch %MSI_ARCH%
115-
if NOT [%ERRORLEVEL%]==[0] (
116-
goto error
117-
)
118-
119-
echo Generating WiX information for ..\docs\build\html
120-
heat dir ..\docs\build\html -ag -cg CG_HtmlDocs -dr D_PythonScript -var var.htmldocsSource -t changeDirHtmlDoc.xsl -o %INST_TEMP_DIR%\htmldoc.wxs -platform=%NAME_ADDON%
121-
if NOT [%ERRORLEVEL%]==[0] (
122-
goto error
123-
)
124-
125-
echo Compiling Html doc WiX source
126-
wix build %INST_TEMP_DIR%\htmldoc.wxs -o %INST_TEMP_DIR%\htmldoc.wixlib -d htmldocsSource=..\docs\build\html -arch %MSI_ARCH%
127-
if NOT [%ERRORLEVEL%]==[0] (
128-
goto error
129-
)
130-
13146
cd ..\packages
13247
echo add UI extension globally
13348
wix extension add -g WixToolset.UI.wixext
13449
wix extension list -g
13550
cd ..\installer
13651

13752

138-
echo Compiling main PythonScript installer
139-
wix build pythonscript.wxs -o %INST_TEMP_DIR%\pythonscript.wixlib -d version=%PYTHONSCRIPTVERSION% -d baseDir=.. -d pythonDir=%PYTHONBUILDDIR% -d variantDir=%PYTHONSCRIPTDLLDIR% -d Platform=%MSI_ARCH% -arch %MSI_ARCH% -ext "WixToolset.UI.wixext"
140-
if NOT [%ERRORLEVEL%]==[0] (
141-
goto error
142-
)
143-
144-
145-
echo Linking installer - generating MSI
146-
IF NOT EXIST "build\%PYTHONSCRIPTVERSION%" (
147-
mkdir build\%PYTHONSCRIPTVERSION%
148-
)
149-
150-
wix build %INST_TEMP_DIR%\pythonscript.wixlib %INST_TEMP_DIR%\fullLib.wixlib %INST_TEMP_DIR%\fullLib_dll%NAME_ADDON%.wixlib %INST_TEMP_DIR%\unittests.wixlib %INST_TEMP_DIR%\tcl.wixlib %INST_TEMP_DIR%\tcl_dll%NAME_ADDON%.wixlib %INST_TEMP_DIR%\sampleScripts.wixlib %INST_TEMP_DIR%\htmldoc.wixlib -o build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%%NAME_ADDON%.msi -ext "WixToolset.UI.wixext"
53+
echo Compiling PythonScript installer
54+
wix build pythonscript.wxs -o build\%PYTHONSCRIPTVERSION%\PythonScript_%PYTHONSCRIPTVERSION%%NAME_ADDON%.msi -d version=%PYTHONSCRIPTVERSION% -d baseDir=.. -d pythonDir=%PYTHONBUILDDIR% -d variantDir=%PYTHONSCRIPTDLLDIR% -d Platform=%MSI_ARCH% -d nameAddon=%NAME_ADDON% -arch %MSI_ARCH% -ext "WixToolset.UI.wixext"
15155
if NOT [%ERRORLEVEL%]==[0] (
15256
goto error
15357
)

installer/changeDirHtmlDoc.xsl

Lines changed: 0 additions & 7 deletions
This file was deleted.

installer/changeDirLib.xsl

Lines changed: 0 additions & 10 deletions
This file was deleted.

installer/changeDirSampleScripts.xsl

Lines changed: 0 additions & 7 deletions
This file was deleted.

installer/changeDirTests.xsl

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)