Skip to content

Commit 2786dcc

Browse files
authored
small_bugfix (#255)
- ***Breaking changes***: requires `Glow Worm Luciferin` firmware (v5.18.2). - The priority of UDP packets in wireless mode has been increased to signal to the router that Luciferin traffic requires lower latency than standard packets. - If the microcontroller is temporarily disconnected from the WiFi network, Firefly Luciferin is now able to reconnect much faster without restarting the screen capture. - Added a 'bottom' capture option for [satellites](https://github.com/sblantipodi/firefly_luciferin/wiki/Surround-lighting-with-satellites) when the LEDs are configured to use a bottom gap. - The [save state](https://github.com/sblantipodi/firefly_luciferin/wiki/Remote-Access#luciferin-web-interface) has been restructured. Auto-save has been disabled to prevent wear on the microcontroller's memory. Closes [#249](#249). - Arch Linux package. Note: AUR package is built from the official sources but it's currently maintained by @Ape. Closes [#246](#246). Thanks @Ape for this. - Libasound2t64 dependency prevents correct installation on some Linux distros. Closes [#253](#253). - Properly handle expired restore token on Wayland. Closes [#259](#259). Thanks @Ape for the PR. - Logging improvements. Closes [#260](#260). Thanks @Ape for the PR. - Proper config path on Linux. Config file and logs has been moved in XDG_CONFIG_HOME (~/.config/FireflyLuciferin). Old config files will be automatically moved to the new path. Closes [#261](#261). - The snap version was crashing at startup when there were temporary files created by other instances of Firefly Luciferin on the system. Fixed.
1 parent 2f8571e commit 2786dcc

File tree

129 files changed

+402
-255
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+402
-255
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ body:
5050
attributes:
5151
label: Fiefly Luciferin config file
5252
description: Please copy and paste your Firefly Luciferin config file.
53-
placeholder: You can find your config file in ~Documents\FireflyLuciferin\FireflyLuciferin.yaml file. Please remove your MQTT password if you don't want to share it
53+
placeholder: You can find your config file in ~(Documents or .config)\FireflyLuciferin\FireflyLuciferin.yaml file. Please remove your MQTT password if you don't want to share it
5454
render: shell
5555
- type: textarea
5656
id: logs
5757
attributes:
5858
label: Relevant log output
5959
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks
60-
placeholder: You can find your logs in your ~Documents\FireflyLuciferin\logs folder
60+
placeholder: You can find your logs in your ~(Documents or .config)\FireflyLuciferin\logs folder
6161
render: shell
6262
- type: textarea
6363
id: steps-reproduce

.github/workflows/build.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
path: FireflyLuciferinSetup.exe
6868

6969
linux_build_parallel:
70-
runs-on: ubuntu-latest
70+
runs-on: ubuntu-24.04
7171
steps:
7272
- uses: actions/checkout@v4
7373
with:
@@ -105,6 +105,16 @@ jobs:
105105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
106106
run: |
107107
mv firefly* FireflyLuciferinLinux.deb;
108+
- name: Deps fix
109+
env:
110+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111+
run: |
112+
dpkg-deb -R FireflyLuciferinLinux.deb firetoedit
113+
sed -i 's/libasound2t64/libasound2/g' "firetoedit/DEBIAN/control"
114+
sed -i 's/Unknown/perini.davide@dpsoftware.org/g' "firetoedit/DEBIAN/control"
115+
dpkg-deb -b firetoedit FireflyLuciferinLinux.deb
116+
cat firetoedit/DEBIAN/control
117+
rm -rf firetoedit
108118
- name: Creating artifact from BIN file
109119
uses: actions/upload-artifact@v4
110120
with:

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
# - https://gh.io/supported-runners-and-hardware-resources
2828
# - https://gh.io/using-larger-runners (GitHub.com only)
2929
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
30-
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-24.04' }}
3131
permissions:
3232
# required for all workflows
3333
security-events: write

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
create_draft_release:
1010
env:
1111
commitmsg: ${{ github.event.head_commit.message }}
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Set env
@@ -93,7 +93,7 @@ jobs:
9393

9494
linux_build_parallel:
9595
needs: [create_draft_release]
96-
runs-on: ubuntu-latest
96+
runs-on: ubuntu-24.04
9797
steps:
9898
- uses: actions/checkout@v4
9999
- name: Set env
@@ -130,6 +130,12 @@ jobs:
130130
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
131131
run: |
132132
mv firefly* FireflyLuciferinLinux.deb;
133+
dpkg-deb -R FireflyLuciferinLinux.deb firetoedit
134+
sed -i 's/libasound2t64/libasound2/g' "firetoedit/DEBIAN/control"
135+
sed -i 's/Unknown/perini.davide@dpsoftware.org/g' "firetoedit/DEBIAN/control"
136+
dpkg-deb -b firetoedit FireflyLuciferinLinux.deb
137+
cat firetoedit/DEBIAN/control
138+
rm -rf firetoedit
133139
gh release upload "${{ env.RELEASE_VERSION }}" FireflyLuciferinLinux.deb
134140
135141
- name: Adding Linux asset to the release (RedHat flavour)

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
stale:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-24.04
99
steps:
1010
- uses: actions/stale@main
1111
with:

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ If you like **Firefly Luciferin**, give it a star, or fork it and contribute!
4141
- Have a question? [**Get answered on the community**](https://discord.gg/aXf9jeN).
4242

4343
## Quick start
44-
You can build the software from the source or if you prefer you can **download the installer from [here](https://github.com/sblantipodi/firefly_luciferin/releases)**.
45-
`Firefly Luciferin` uses `Java 14` to create the native installer, this means that you don't have to install Java or other libraries separately.
44+
45+
You can **download the installer for Windows or Linux [here](https://github.com/sblantipodi/firefly_luciferin/releases)
46+
**.
47+
The Linux version is also available on [Flathub](https://flathub.org/apps/org.dpsoftware.FireflyLuciferin)
48+
and [Snap Store](https://github.com/sblantipodi/firefly_luciferin/issues/207)
4649

4750
This software can run on any Desktop PC using **Windows or Linux**. MacOS support will be added later.
4851
To get the full `Bias Lighting` experience you need a microcontroller (ex. ESP8266, ESP32) running [Glow Worm Luciferin](https://github.com/sblantipodi/glow_worm_luciferin) firmware. You can connect the microcontroller to the PC via USB or via wirelss (MQTT server is optional).

docs/index.md

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,32 @@ a {
2222

2323
### In this release
2424

25+
- ***Breaking changes***: requires `Glow Worm Luciferin` firmware (v5.18.2).
26+
- The priority of UDP packets in wireless mode has been increased to signal to the router that Luciferin traffic
27+
requires lower latency than standard packets.
28+
- If the microcontroller is temporarily disconnected from the WiFi network, Firefly Luciferin is now able to reconnect
29+
much faster without restarting the screen capture.
30+
- Added a 'bottom' capture option
31+
for [satellites](https://github.com/sblantipodi/firefly_luciferin/wiki/Surround-lighting-with-satellites) when the
32+
LEDs are configured to use a bottom gap.
33+
- The [save state](https://github.com/sblantipodi/firefly_luciferin/wiki/Remote-Access#luciferin-web-interface) has been
34+
restructured. Auto-save has been disabled to prevent wear on the microcontroller's memory.
35+
Closes [#249](https://github.com/sblantipodi/firefly_luciferin/issues/249).
36+
- Arch Linux package. Note: AUR package is built from the official sources but it's currently maintained by @Ape.
37+
Closes [#246](https://github.com/sblantipodi/firefly_luciferin/issues/246). Thanks @Ape for this.
38+
- Libasound2t64 dependency prevents correct installation on some Linux distros.
39+
Closes [#253](https://github.com/sblantipodi/firefly_luciferin/issues/253).
40+
- Properly handle expired restore token on Wayland.
41+
Closes [#259](https://github.com/sblantipodi/firefly_luciferin/issues/259). Thanks @Ape for the PR.
42+
- Logging improvements. Closes [#260](https://github.com/sblantipodi/firefly_luciferin/pull/260). Thanks @Ape for the
43+
PR.
44+
- Proper config path on Linux. Config file and logs has been moved in XDG_CONFIG_HOME (~/.config/FireflyLuciferin). Old
45+
config files will be automatically moved to the new path.
46+
Closes [#261](https://github.com/sblantipodi/firefly_luciferin/pull/261).
47+
- The snap version was crashing at startup when there were temporary files created by other instances of Firefly Luciferin on the system. Fixed.
48+
49+
### In the previous releases:
50+
2551
- ***Breaking changes***: requires `Glow Worm Luciferin` firmware (v5.17.8).
2652
- **Capture pipeline has been optimized for DX12 on Windows.** Previously, under heavy GPU load, capture framerates would drop significantly, causing occasional LED stuttering. Now, the pipeline has been restructured to better utilize hardware resources, completely eliminating stuttering. This change, along with the previous SIMD extension released with the previous version of Firefly Luciferin, makes Luciferin one of the most optimized and fastest software for bias lighting available at the moment.
2753
- **New effects and improvements to the existing ones.**
@@ -46,34 +72,4 @@ a {
4672
- Linux Wayland didn't ask you which screen to record when the recording permission expired. Fixed.
4773
- [Power saving](https://github.com/sblantipodi/firefly_luciferin/wiki/Power-saving-features) mode is not interrupted by small changes on the screen like icons changing state in the system tray or incoming notifications.
4874

49-
### In the previous releases:
50-
51-
- ***Breaking changes***: requires `Glow Worm Luciferin` firmware (v5.16.7).
52-
- **Luciferin now has specific support for [AVX CPU extensions](https://github.com/sblantipodi/firefly_luciferin/wiki/Very-fast-capture#cpu-acceleration-using-avx-simd-extensions).**
53-
AMD and Intel are investing a lot of resources in improving their CPU extensions. Next-generation CPUs contain various
54-
optimizations related to `Advanced Vector Extensions (AVX)` which are `Single Instruction, Multiple Data (SIMD)`
55-
extensions to the x86 instruction set architecture for microprocessors.
56-
AVX 512 and AVX 256 offer significant performance improvements and resource optimization benefits.
57-
- USB/Serial communication has been redesigned:
58-
- Improved USB device recognition under Linux.
59-
- Serial devices may cause an infinite loop due to buggy COM port enumeration. Fixed.
60-
- [Tray icon](https://github.com/sblantipodi/firefly_luciferin/wiki/Tray-icon-shortcuts) has been improved with new
61-
shortcuts.
62-
- Added a workaround for an existing Windows issue that causes tray menu to stay behind the
63-
taskbar. [Closes #229](https://github.com/sblantipodi/firefly_luciferin/issues/229).
64-
- Fixed an issue that prevented Firefly Luciferin from detecting Glow Worm Luciferin devices when the computer was
65-
connected to a VPN.
66-
- Firefly Luciferin infinitely starts itself after PC standby / wake
67-
up. [Closes #228](https://github.com/sblantipodi/firefly_luciferin/issues/228).
68-
- There are microcontrollers that has built/in LED. This LED can stay on and be annoying, it now follows
69-
the [device reset](https://github.com/sblantipodi/firefly_luciferin/wiki/Device-reset) behaviour.
70-
- Fixed an issue that prevented Linux version to show the UI
71-
when [debug level](https://github.com/sblantipodi/firefly_luciferin/wiki/Debug) is set to DEBUG.
72-
- Fixed an issue that prevented Hyprland to show the UI.
73-
- Fixed an issue that caused incorrect color reproduction on non-standard screen resolutions.
74-
- Fixed an issue that prevented the Glow Worm Luciferin Light Firmware from properly turning off the LED strip when
75-
closing Firefly Luciferin.
76-
- Java/JavaFX 23, libs update, code refactor to avoid using deprecated methods, CI/CD pipeline improvements.
77-
- [Arduino Bootstrapper](https://github.com/sblantipodi/arduino_bootstrapper/releases) update (v.1.18.2).
78-
7975
[Click here for the complete changelog of previous versions.](https://github.com/sblantipodi/firefly_luciferin/releases)

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
<jackson.version>2.18.2</jackson.version>
3434
<lombok.version>1.18.36</lombok.version>
3535
<mapstruct.version>1.6.3</mapstruct.version>
36-
<jna.version>5.15.0</jna.version>
36+
<jna.version>5.16.0</jna.version>
3737
<gstreamer.version>1.4.0</gstreamer.version>
3838
<paho.version>1.2.5</paho.version>
39-
<logback.version>1.5.12</logback.version>
39+
<logback.version>1.5.15</logback.version>
4040
<slf4j.version>2.0.16</slf4j.version>
4141
<xtaudio.version>2.0</xtaudio.version>
4242
<dbus.java.version>5.1.0</dbus.java.version>

src/main/java/org/dpsoftware/FireflyLuciferin.java

Lines changed: 39 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Firefly Luciferin, very fast Java Screen Capture software designed
55
for Glow Worm Luciferin firmware.
66
7-
Copyright © 2020 - 2024 Davide Perini (https://github.com/sblantipodi)
7+
Copyright © 2020 - 2025 Davide Perini (https://github.com/sblantipodi)
88
99
This program is free software: you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License as published by
@@ -68,7 +68,6 @@
6868
@Getter
6969
public class FireflyLuciferin extends Application {
7070

71-
// Image processing
7271
private final ImageProcessor imageProcessor;
7372
private final GrabberManager grabberManager;
7473
private final PowerSavingManager powerSavingManager;
@@ -181,15 +180,9 @@ public static void main(String[] args) {
181180
}
182181
moveToStandardDocsFolder();
183182
if (args != null && args.length > 0) {
184-
log.info("Starting instance #: {}", args[0]);
185-
if (args.length > 1) {
186-
log.info("Profile to use: {}", args[1]);
187-
}
188183
MainSingleton.getInstance().whoAmI = Integer.parseInt(args[0]);
189184
MainSingleton.getInstance().spawnInstances = false;
190185
CommonUtility.sleepMilliseconds(Constants.SPAWN_INSTANCE_WAIT_START_DELAY);
191-
} else {
192-
log.info("Starting default instance");
193186
}
194187
MainSingleton.getInstance().profileArgs = Constants.DEFAULT;
195188
if (args != null && args.length > 1) {
@@ -206,18 +199,16 @@ public static void main(String[] args) {
206199
*/
207200
static void moveToStandardDocsFolder() {
208201
String path = InstanceConfigurer.getConfigPath();
209-
if (NativeExecutor.isWindows()) {
210-
String oldDocPath = InstanceConfigurer.getStandardConfigPath();
211-
File newDirWithConfigFile = new File(path + File.separator + Constants.CONFIG_FILENAME);
212-
File oldDir = new File(oldDocPath);
213-
if (newDirWithConfigFile.exists() && oldDir.exists() && !path.equals(oldDocPath)) {
214-
if (oldDir.exists()) StorageManager.deleteDirectory(oldDir);
215-
log.info("Deleting old config file");
216-
}
217-
if (oldDir.exists() && !newDirWithConfigFile.exists() && !path.equals(oldDocPath)) {
218-
StorageManager.copyDir(oldDocPath, path);
219-
NativeExecutor.restartNativeInstance();
220-
}
202+
String oldDocPath = InstanceConfigurer.getOldConfigPath();
203+
File newDirWithConfigFile = new File(path + File.separator + Constants.CONFIG_FILENAME);
204+
File oldDir = new File(oldDocPath);
205+
if (newDirWithConfigFile.exists() && oldDir.exists() && !path.equals(oldDocPath)) {
206+
if (oldDir.exists()) StorageManager.deleteDirectory(oldDir);
207+
log.info("Deleting old config file");
208+
}
209+
if (oldDir.exists() && !newDirWithConfigFile.exists() && !path.equals(oldDocPath)) {
210+
StorageManager.copyDir(oldDocPath, path);
211+
NativeExecutor.restartNativeInstance();
221212
}
222213
}
223214

@@ -245,8 +236,17 @@ public static void checkForNightMode() {
245236
*/
246237
private void setRuntimeLogLevel() {
247238
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
248-
log.info("** Log level -> {} **", MainSingleton.getInstance().config.getRuntimeLogLevel());
239+
log.debug("** Log level -> {} **", MainSingleton.getInstance().config.getRuntimeLogLevel());
249240
loggerContext.getLogger(Constants.LOG_LEVEL_ROOT).setLevel(Level.toLevel(MainSingleton.getInstance().config.getRuntimeLogLevel()));
241+
if (JavaFXStarter.startupArgs != null && JavaFXStarter.startupArgs.length > 0) {
242+
log.info("Starting instance #: {}", JavaFXStarter.startupArgs[0]);
243+
if (JavaFXStarter.startupArgs.length > 1) {
244+
log.info("Profile to use: {}", JavaFXStarter.startupArgs[1]);
245+
}
246+
} else {
247+
log.info("Starting default instance");
248+
}
249+
logEnvironment();
250250
}
251251

252252
/**
@@ -605,4 +605,22 @@ private void clean() {
605605
}
606606
}
607607

608+
/**
609+
* Log the environment in use
610+
*/
611+
private void logEnvironment() {
612+
if (NativeExecutor.isLinux()) {
613+
if (NativeExecutor.isFlatpak()) {
614+
log.debug("Running on Linux using Flatpak sandbox");
615+
} else if (NativeExecutor.isSnap()) {
616+
log.debug("Running on Linux using Snap sandbox");
617+
} else {
618+
log.debug("Running on Linux");
619+
}
620+
} else if (NativeExecutor.isWindows()) {
621+
log.debug("Running on Windows");
622+
}
623+
log.info("Traffic Class for the UDP socket: 0x{}", Integer.toHexString(MainSingleton.getInstance().config.getUdpTrafficClass()).toUpperCase());
624+
}
625+
608626
}

0 commit comments

Comments
 (0)