1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-15 00:30:33 +03:00

docs/Releasing: Update for using Build-exe-and-msi.py

This commit is contained in:
Athanasius 2022-09-23 11:25:55 +01:00
parent 8eaf1ec70f
commit f4f0c77821
No known key found for this signature in database
GPG Key ID: 8C392035DD80FD62

View File

@ -61,8 +61,9 @@ You will need several pieces of software installed, or the files from their
If you are using different versions of any of these tools then please ensure If you are using different versions of any of these tools then please ensure
that the paths where they're installed match the associated lines in that the paths where they're installed match the associated lines in
`setup.py`. i.e. if you're using later WiX you might need to edit the WIXPATH `Build-exe-and-msi.py`. i.e. if you're using later WiX you might need to edit
line, and likewise the SDKPATH line if you're using a later Windows SDK kit. the WIXPATH line, and likewise the SDKPATH line if you're using a later
Windows SDK kit.
# Version Strings # Version Strings
@ -99,13 +100,13 @@ resulting .exe and/or .msi files. **But** realise that the resulting program
will still try to check for new versions at the main URL unless you change will still try to check for new versions at the main URL unless you change
that. that.
1. Company is set in `setup.py`. Search for `company_name`. This is what 1. Company is set in `Build-exe-and-msi.py`. Search for `company_name`. This
appears in the EXE properties, and is also used as the location of WinSparkle is what appears in the EXE properties, and is also used as the location of
registry entries on Windows. WinSparkle registry entries on Windows.
1. Application names, version and URL of the file with latest release 1. Application names, version and URL of the file with latest release
information. These are all in the `config/__init__.py` file. See the information. These are all in the `config/__init__.py` file. See the
`from config import ...` lines in setup.py. `from config import ...` lines in `Build-exe-and-msi.py`:
1. `appname`: The short appname, e.g. 'EDMarketConnector' 1. `appname`: The short appname, e.g. 'EDMarketConnector'
2. `applongname`: The long appname, e.g. 'E:D Market Connector' 2. `applongname`: The long appname, e.g. 'E:D Market Connector'
3. `appcmdname`: The CLI appname, e.g. 'EDMC' 3. `appcmdname`: The CLI appname, e.g. 'EDMC'
@ -143,10 +144,10 @@ that.
If you add a new file to the program that needs to be distributed to users as If you add a new file to the program that needs to be distributed to users as
well then you will need to properly add it to the build process. well then you will need to properly add it to the build process.
### setup.py ### Build-exe-and-msi.py
You'll need to add it in setup.py so that py2exe includes it in the build. You'll need to add it in `Build-exe-and-msi.py` so that py2exe includes it in
Add the file to the DATA_FILES statement. the build. Add the file to the DATA_FILES statement.
### WiX ### WiX
@ -257,38 +258,46 @@ a 'Git bash' window. The 'Terminal' tab of PyCharm works fine.
Assuming the correct python.exe is associated with .py files then simply run: Assuming the correct python.exe is associated with .py files then simply run:
```batch ```batch
setup.py py2exe Build-exe-and-msi.py
``` ```
else you might need this, which assumes correct python.exe is in your PATH: else you might need this, which assumes correct python.exe is in your PATH:
```batch ```batch
python.exe setup.py py2exe python.exe Build-exe-and-msi.py
``` ```
else you'll have to specify the path to python.exe, e.g.: else you'll have to specify the path to python.exe, e.g.:
```batch ```batch
"C:\Program Files \(x86)\Python38-32\python.exe" setup.py py2exe "C:\Program Files \(x86)\Python38-32\python.exe" Build-exe-and-msi.py
``` ```
Output will be something like (`...` denoting parts elided for brevity): Output will be something like (`...` denoting parts elided for brevity):
```plaintext ```plaintext
running py2exe Git short hash: 993f946b.DIRTY
INFO:runtime:Analyzing the code
INFO:runtime:Found 695 modules, 60 are missing, 0 may be missing
... ...
Building 'dist.win32\EDMC.exe'. Building 'dist.win32\EDMC.exe'.
Building 'dist.win32\EDMarketConnector.exe'. Building 'dist.win32\EDMarketConnector.exe'.
Building shared code archive 'dist.win32\library.zip'.
... ...
Windows Installer XML Toolset Compiler version 3.11.1.2318 Windows Installer XML Toolset Toolset Harvester version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved.
Windows Installer XML Toolset Compiler version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved.
EDMarketConnector.wxs
Windows Installer XML Toolset Linker version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved. Copyright (c) .NET Foundation and contributors. All rights reserved.
... ...
Package language = 1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,0, ProductLanguage = 1029, Database codepage = 0 Package language = 1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,6170,1060,1053,18,0, ProductLanguage = 1029, Database codepage = 0
MsiTran V 5.0 MsiTran V 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved Copyright (c) Microsoft Corporation. All Rights Reserved
... ...
DonePackage language = 1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,0, ProductLanguage = 0, Database codepage = 0 DonePackage language = 1033,1029,1031,1034,1035,1036,1038,1040,1041,1043,1045,1046,1049,1058,1062,2052,2070,2074,6170,1060,1053,18,0, ProductLanguage = 0, Database codepage = 0
MsiTran V 5.0 MsiTran V 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved Copyright (c) Microsoft Corporation. All Rights Reserved
@ -297,7 +306,8 @@ Done
**Do check the output** for things like not properly specifying extra files **Do check the output** for things like not properly specifying extra files
to be included in the install. If they're not picked up by current rules in to be included in the install. If they're not picked up by current rules in
`setup.py` then you will need to add them to the `win32` `DATA_FILES` array. `Build-exe-and-msi.py` then you will need to add them to the `win32`
`DATA_FILES` array.
You should now have one new/updated folder `dist.win32` and two new files You should now have one new/updated folder `dist.win32` and two new files
(version string dependent): `EDMarketConnector_win_4.0.2.msi` and (version string dependent): `EDMarketConnector_win_4.0.2.msi` and
@ -444,7 +454,7 @@ When changing the Python version (Major.Minor.Patch) used:
1. Major or Minor level changes: 1. Major or Minor level changes:
1. `setup.py` will need its version check updating. 1. `Build-exe-and-msi.py` will need its version check updating.
2. `EDMarketConnector.wxs` will need updating to reference the correct 2. `EDMarketConnector.wxs` will need updating to reference the correct
pythonXX.dll file. pythonXX.dll file.
3. `.pre-commit-config.yaml` will need the `default_language_version` 3. `.pre-commit-config.yaml` will need the `default_language_version`