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
14 changes: 10 additions & 4 deletions .github/workflows/build-exe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,28 @@ jobs:
python -m pip install --upgrade pip
pip install .
pip install "pyinstaller>=6.14,<7"
dotnet tool install --global wix --version 6.0.0

- name: Build EXE
Comment thread
aptiko marked this conversation as resolved.
run: |
pyinstaller --onefile --paths=. --name=loggertodb-${{ github.ref_name }} bin/loggertodb-windows
pyinstaller --paths=. --name=loggertodb bin/loggertodb-windows

- name: Build MSI
run: |
cd installer
dotnet build -c Release -p:ProductVersion=${{ github.ref_name }}
Comment thread
aptiko marked this conversation as resolved.

- name: Upload artifact
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: windows-exe
path: dist/loggertodb-${{ github.ref_name }}.exe
name: windows-msi
Comment thread
aptiko marked this conversation as resolved.
path: installer/bin/Release/loggertodb-${{ github.ref_name }}.msi

- name: Upload to release
if: github.event_name == 'release'
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: dist/loggertodb-${{ github.ref_name }}.exe
files: installer/bin/Release/loggertodb-${{ github.ref_name }}.msi
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,8 @@ ENV/
.mypy_cache/

# setuptools-scm
_version.py
_version.py

# wix
installer/bin
installer/obj
2 changes: 1 addition & 1 deletion bin/loggertodb-windows
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Normally we shouldn't need this script. "pip install loggertodb"
installs a "loggertodb" script which has been created because of
pyproject.toml's [project.scripts]. However, pyinstaller, which we use
to create a single-file loggertodb.exe on windows, does not support
to create loggertodb.exe on windows, does not support
"project.scripts", so we add this script which is more or less identical
to the one created by setuptools.

Expand Down
11 changes: 6 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ Installation
Windows
=======

``loggertodb`` is just a single executable, ``loggertodb.exe``. You
download it and run it; there's no installer.

Download ``loggertodb.exe`` from
https://github.com/openmeteo/loggertodb/releases/.
Download ``loggertodb.msi`` from
https://github.com/openmeteo/loggertodb/releases/ and run it to install.
The installation directory is not added to the Windows path. You need to
add it yourself or run loggertodb from
``C:\Program Files\Loggertodb\loggertodb.exe`` or whichever is the
installation directory.

Linux
=====
Expand Down
11 changes: 8 additions & 3 deletions docs/release-notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
Release notes
=============

DEV
===
Version 4.3 (2025-12-17)
========================

Added the ``--insert-all`` command line argument.
* Added the ``--insert-all`` command line argument.
* Windows builds now produce an MSI file that installs by default in
``C:\Program Files\Loggertodb``, rather than an EXE file that was
unzipping itself each time it was running (which resulted in lots of
disk space being wasted if these temporary files were somehow left
over).

Version 4.2 (2025-08-23)
========================
Expand Down
16 changes: 16 additions & 0 deletions installer/Package.wxs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Wix
xmlns="http://wixtoolset.org/schemas/v4/wxs"
xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui">

<Package Id="Loggertodb" Name="Loggertodb" Manufacturer="IRMASYS" Version="$(ProductVersion)">
<MediaTemplate EmbedCab="yes" />
<StandardDirectory Id="ProgramFiles6432Folder">
<Directory Id="INSTALLFOLDER" Name="Loggertodb" />
</StandardDirectory>
<Files Include="../dist/loggertodb/**" />
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLFOLDER" />
<ui:WixUI Id="WixUI_InstallDir" />
<WixVariable Id="WixUILicenseRtf" Value="license.rtf" />
</Package>

</Wix>
Binary file added installer/license.rtf
Binary file not shown.
10 changes: 10 additions & 0 deletions installer/loggertodb.wixproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="WixToolset.Sdk/6.0.0">
<PropertyGroup>
<InstallerPlatform>x64</InstallerPlatform>
<DefineConstants>ProductVersion=$(ProductVersion)</DefineConstants>
<OutputName>loggertodb-$(ProductVersion)</OutputName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="WixToolset.UI.wixext" Version="6.0.0" />
</ItemGroup>
</Project>
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
requires = ["setuptools>=61.0", "setuptools-scm>=7.1"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
exclude = ["installer"]

[project]
dynamic = ["version"]
name = "loggertodb"
Expand Down