Add custom QZ Tray fork with pairing key authentication

- Custom fork of QZ Tray 2.2.x with certificate validation bypassed
- Implemented pairing key (HMAC) authentication as replacement
- Modified files: PrintSocketClient.java (certificate check disabled)
- New files: PairingAuth.java, PairingConfigDialog.java
- Excluded build artifacts (out/, lib/javafx*) from repository
- Library JARs included for dependency management
This commit is contained in:
2025-10-02 02:27:45 +03:00
parent 755400a269
commit c7266c32ee
444 changed files with 63195 additions and 1 deletions

View File

@@ -0,0 +1,69 @@
<project name="linux-installer" basedir="../../">
<property file="ant/project.properties"/>
<property file="ant/linux/linux.properties"/>
<import file="${basedir}/ant/version.xml"/>
<import file="${basedir}/ant/platform-detect.xml"/>
<target name="build-run" depends="get-version,platform-detect">
<echo level="info">Creating installer using makeself</echo>
<!-- Get the os-preferred name for the target architecture -->
<condition property="linux.target.arch" value="arm64">
<isset property="target.arch.aarch64"/>
</condition>
<property name="linux.target.arch" value="${target.arch}" description="fallback value"/>
<copy file="assets/branding/linux-icon.svg" tofile="${dist.dir}/${project.filename}.svg"/>
<mkdir dir="${build.dir}/scripts"/>
<copy file="ant/linux/linux-installer.sh.in" tofile="${dist.dir}/install">
<filterchain><expandproperties/></filterchain>
</copy>
<copy file="ant/unix/unix-launcher.sh.in" tofile="${dist.dir}/${project.filename}">
<filterchain><expandproperties/></filterchain>
</copy>
<copy file="ant/unix/unix-uninstall.sh.in" tofile="${dist.dir}/uninstall">
<filterchain><expandproperties/></filterchain>
</copy>
<chmod perm="a+x" type="file">
<fileset dir="${dist.dir}">
<include name="**/${project.filename}"/>
<include name="**/install"/>
<include name="**/uninstall"/>
</fileset>
</chmod>
<exec executable="makeself" failonerror="true">
<arg value="${dist.dir}"/>
<arg value="${out.dir}/${project.filename}${build.type}-${build.version}-${linux.target.arch}.run"/>
<arg value="${project.name} Installer"/>
<arg value="./install"/>
</exec>
</target>
<target name="copy-solibs" if="target.os.linux">
<echo level="info">Copying native library files to libs</echo>
<mkdir dir="${dist.dir}/libs"/>
<copy todir="${dist.dir}/libs" flatten="true" verbose="true">
<fileset dir="${out.dir}/libs-temp">
<!--x86_64-->
<include name="**/linux-x86-64/*" if="target.arch.x86_64"/> <!-- jna/hid4java -->
<include name="**/linux-x86_64/*" if="target.arch.x86_64"/> <!-- usb4java -->
<include name="**/linux_64/*" if="target.arch.x86_64"/> <!-- jssc -->
<!--aarch64-->
<include name="**/linux-aarch64/*" if="target.arch.aarch64"/> <!-- jna/hid4java/usb4java -->
<include name="**/linux_arm64/*" if="target.arch.aarch64"/> <!-- jssc -->
<!--arm32-->
<include name="**/linux-arm/*" if="target.arch.arm32"/> <!-- jna/hid4java/usb4java -->
<include name="**/linux_arm/*" if="target.arch.arm32"/> <!-- jssc -->
<!--riscv64-->
<include name="**/linux-riscv64/*" if="target.arch.riscv64"/> <!-- jna/hid4java -->
<include name="**/linux_riscv64/*" if="target.arch.riscv64"/> <!-- jssc -->
</fileset>
</copy>
</target>
</project>

View File

@@ -0,0 +1,68 @@
#!/bin/bash
# Halt on first error
set -e
if [ "$(id -u)" != "0" ]; then
echo "This script must be run with root (sudo) privileges" 1>&2
exit 1
fi
# Console colors
RED="\\x1B[1;31m";GREEN="\\x1B[1;32m";YELLOW="\\x1B[1;33m";PLAIN="\\x1B[0m"
# Statuses
SUCCESS=" [${GREEN}success${PLAIN}]"
FAILURE=" [${RED}failure${PLAIN}]"
WARNING=" [${YELLOW}warning${PLAIN}]"
mask=755
echo -e "Starting install...\n"
# Clear the log for writing
> "${install.log}"
run_task () {
echo -e "Running $1 task..."
if [ -n "$DEBUG" ]; then
"./${project.filename}" $@ && ret_val=$? || ret_val=$?
else
"./${project.filename}" $@ &>> "${install.log}" && ret_val=$? || ret_val=$?
fi
if [ $ret_val -eq 0 ]; then
echo -e " $SUCCESS Task $1 was successful"
else
if [ "$1" == "spawn" ]; then
echo -e " $WARNING Task $1 skipped. You'll have to start ${project.name} manually."
return
fi
echo -e " $FAILURE Task $1 failed.\n\nRe-run with DEBUG=true for more information."
false # throw error
fi
}
# Ensure java is installed and working before starting
"./${project.filename}" --version
# Make a temporary jar for preliminary installation steps
run_task preinstall
run_task install --dest "/opt/${project.filename}"
# We should be installed now, generate the certificate
pushd "/opt/${project.filename}" &> /dev/null
run_task certgen
# Tell the desktop to look for new mimetypes in the background
umask_bak="$(umask)"
umask 0002 # more permissive umask for mimetype registration
update-desktop-database &> /dev/null &
umask "$umask_bak"
echo "Installation complete... Starting ${project.name}..."
# spawn itself as a regular user, inheriting environment
run_task spawn "/opt/${project.filename}/${project.filename}"
popd &> /dev/null

View File

@@ -0,0 +1,2 @@
# Expose UNIXToolkit.getGtkVersion
linux.launch.jigsaw=--add-opens java.desktop/sun.awt=ALL-UNNAMED