1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

docs/Releasing.md: Document how to add a new file to py2exe and installer.

Also switched all the section headings to # anchors.
This commit is contained in:
Athanasius 2020-09-28 14:37:44 +01:00
parent 20ee46a9d3
commit 1a6e88f210

View File

@ -1,5 +1,4 @@
Introduction
===
# Introduction
This document aims to enable anyone to quickly get up to speed on how to:
@ -11,8 +10,7 @@ This document aims to enable anyone to quickly get up to speed on how to:
Note that for Windows only a 32-bit application is supported at this time.
This is principally due to the Windows Registry handling in config.py.
Environment
---
# Environment
You will need several pieces of software installed, or the files from their
.zip archives, in order to build the .exe and generate the .msi
@ -67,8 +65,7 @@ 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
line, and likewise the SDKPATH line if you're using a later Windows SDK kit.
Version Strings
---
# Version Strings
This project now uses strict [Semantic Version](https://semver.org/#semantic-versioning-specification-semver)
version strings.
@ -89,8 +86,7 @@ version strings.
start from `1` again when beginning `-rc` releases.
Necessary Edits
---
# Necessary Edits
There are some things that you should always change before running your own
version of EDMC
@ -128,8 +124,49 @@ that.
appcast_win_<version>.xml file. The original upstream value is
`https://raw.githubusercontent.com/EDCD/EDMarketConnector/releases/edmarketconnector.xml`.
Pre-Packaging Steps
---
## Adding a new file
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.
### setup.py
You'll need to add it in setup.py so that py2exe includes it in the build.
Add the file to the DATA_FILES statement.
### WiX
You will *also* need to add the file to the `EDMarketConnector.wxs` file so
that it's actually included in the installer.
1. Location the the appropriate part of the:
```xml
<Directory Id="ProgramFilesFolder">
```
section and add a new sub-section:
```xml
<Component Id="<valid_component_id>" Guid=""*">
<File KeyPath="yes" Source="SourceDir\\<file name>" />
</Component>
```
Note that you only need `Id="<valid_component_id>"` if the filename itself
is not a valid Id, e.g. because it contains spaces.
If the new file is in a new sub-directory then you'll need to add that as
well. See the `L10n` example.
1. Now find the:
```xml
<Feature Id='Complete' Level='1'>
```
section and add an appropriate line to it. Remember to use either the
specific Id you set above or the filename (without directory) for this:
```xml
<ComponentRef Id="<valid_component_id>" />
```
# Pre-Packaging Steps
Before you create a new install each time you should:
@ -140,8 +177,7 @@ Before you create a new install each time you should:
1. XXX: Test ?
1. Ensure translations are up to date, see [Translations.md](Translations.md).
Preparing to Package
---
# Preparing to Package
We'll use an old version string, `4.0.2`, as an example throughout the
following.
@ -193,8 +229,7 @@ a `stable` release, as well as any social media posts you make.
If you're wondering, you needed to get the changelog prepared before building
the .exe and .msi because ChangeLog.md is bundled with the install.
Packaging & Installer Generation
---
# Packaging & Installer Generation
You'll want to do the .exe and .msi generation in a `cmd.exe` window, not e.g.
a 'Git bash' window. The 'Terminal' tab of PyCharm works fine.
@ -251,8 +286,7 @@ Update `edmarketconnector.xml` once more to set the `length=` attribute of the
enclosure to match the file size of the `EDMarketConnector_win_4.0.2.msi` file.
The git commit for this should end up being the release tag as below.
Distribution
---
# Distribution
Once you have tested the new .msi file:
@ -313,8 +347,7 @@ updates specifically targets
**You should now update [Known Issues](https://github.com/EDCD/EDMarketConnector/issues/618)
to reflect anything now fixed in latest release.**
Pre-Releases
---
# Pre-Releases
If you are making a pre-release then: