fastqr 1.0.23 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 495f74f8e1bc1e89000bf757577aa9bcf5130992bd9cdd0db8235cc494948ac5
4
- data.tar.gz: 3f4a3e953c671fbba8fca5a479fe2c3733874420770983f4b2c95866c8f9c016
3
+ metadata.gz: '08d585e67100578345b5674f927112bd3952112da22087488b3ce322d804dd74'
4
+ data.tar.gz: 83b738da76c1b9ff2eed8c7fc76a170a8959c4afb19847d65b62bfd164a7a6ce
5
5
  SHA512:
6
- metadata.gz: 4e8b9c2f0d6e1234a4c2e4ca64f45f9bfd50679e39de26f978ee5a892d3fab65480feefdfa27c878ca0c94db230a24c44ec9c5fab31a48d2f0a133f957d87d1b
7
- data.tar.gz: 54103eb17d5055a4dd51285df094ea470cba222d77e6d2895bb940c618920f14f9b066b3d68cd62dbabed7f27f0cd3df410d995c2dff265fa2a16e3d9b9fd692
6
+ metadata.gz: 5deef00c5c5f9d310b8eadfc66f558e5b4686592b492c4cc2bdb9efaf4975a576284bcd143490aa26ec1156d53660402906e75803ab3c367846af2c3ba70bfaf
7
+ data.tar.gz: 046df632715d666378f65cab549b78e0046819bc0c4c23365602fdea5d1e143a748fb7219ca4f78cf254d36946d9509f5989c9dad6d4047e02406d4b799ad946
data/CMakeLists.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  cmake_minimum_required(VERSION 3.15)
2
- project(fastqr VERSION 1.0.23 LANGUAGES CXX C)
2
+ project(fastqr VERSION 1.0.25 LANGUAGES CXX C)
3
3
 
4
4
  set(CMAKE_CXX_STANDARD 14)
5
5
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
@@ -88,43 +88,65 @@ if(NOT BUILD_SHARED_LIBS)
88
88
  # Add PNG library directories to search path
89
89
  link_directories(${PNG_LIBRARY_DIRS})
90
90
 
91
- # Find static versions of libraries
91
+ # Find static versions of ALL libraries
92
92
  find_library(PNG_STATIC_LIBRARY
93
93
  NAMES libpng.a libpng16.a
94
94
  PATHS
95
+ /usr/local/lib
95
96
  ${PNG_LIBRARY_DIRS}
97
+ /opt/homebrew/lib
98
+ /usr/lib
99
+ NO_DEFAULT_PATH
100
+ )
101
+
102
+ find_library(QRENCODE_STATIC_LIBRARY
103
+ NAMES libqrencode.a
104
+ PATHS
96
105
  /usr/local/lib
106
+ ${QRENCODE_LIBRARY_DIRS}
97
107
  /opt/homebrew/lib
98
108
  /usr/lib
99
109
  NO_DEFAULT_PATH
100
110
  )
101
111
 
102
- find_library(QRENCODE_STATIC_LIBRARY
103
- NAMES libqrencode.a
104
- PATHS
105
- /usr/local/lib # Linux: from source build
106
- ${QRENCODE_LIBRARY_DIRS}
107
- /opt/homebrew/lib # macOS: from Homebrew
108
- /usr/lib
109
- NO_DEFAULT_PATH
110
- )
111
-
112
- if(PNG_STATIC_LIBRARY AND QRENCODE_STATIC_LIBRARY)
112
+ find_library(ZLIB_STATIC_LIBRARY
113
+ NAMES libz.a
114
+ PATHS
115
+ /usr/local/lib
116
+ /opt/homebrew/lib
117
+ /opt/homebrew/opt/zlib/lib
118
+ /usr/lib
119
+ /usr/lib/x86_64-linux-gnu
120
+ /usr/lib/aarch64-linux-gnu
121
+ NO_DEFAULT_PATH
122
+ )
123
+
124
+ if(PNG_STATIC_LIBRARY AND QRENCODE_STATIC_LIBRARY AND ZLIB_STATIC_LIBRARY)
113
125
  message(STATUS "✓ Found static libpng: ${PNG_STATIC_LIBRARY}")
114
126
  message(STATUS "✓ Found static libqrencode: ${QRENCODE_STATIC_LIBRARY}")
127
+ message(STATUS "✓ Found static libz: ${ZLIB_STATIC_LIBRARY}")
115
128
 
116
- # Link CLI directly with object library + static libs (no dependency propagation)
129
+ # Link CLI directly with object library + static libs ONLY
117
130
  target_link_libraries(fastqr-cli
118
131
  PRIVATE
119
132
  fastqr_obj
120
133
  ${QRENCODE_STATIC_LIBRARY}
121
134
  ${PNG_STATIC_LIBRARY}
122
- z # zlib is needed by libpng
135
+ ${ZLIB_STATIC_LIBRARY}
123
136
  )
137
+
138
+ # On Linux, ensure full static linking
139
+ if(UNIX AND NOT APPLE)
140
+ target_link_options(fastqr-cli PRIVATE
141
+ -static-libgcc
142
+ -static-libstdc++
143
+ )
144
+ endif()
124
145
  else()
125
146
  message(WARNING "Static libraries not found, falling back to dynamic linking")
126
147
  message(WARNING " libpng: ${PNG_STATIC_LIBRARY}")
127
148
  message(WARNING " libqrencode: ${QRENCODE_STATIC_LIBRARY}")
149
+ message(WARNING " libz: ${ZLIB_STATIC_LIBRARY}")
128
150
 
129
151
  target_link_libraries(fastqr-cli
130
152
  PRIVATE fastqr
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.23
1
+ 1.0.25
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastqr-pro",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "Fast QR code generator with UTF-8 support, custom colors, logo embedding, and precise size control",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastQR
4
- VERSION = "1.0.23"
4
+ VERSION = "1.0.25"
5
5
  end
6
6
 
@@ -72,161 +72,35 @@ fi
72
72
  cd ..
73
73
 
74
74
  if [[ "$OS" == "linux" ]]; then
75
- echo "🔧 Building binary for Linux..."
75
+ echo "🔧 Building static binary for Linux..."
76
76
 
77
77
  # Debug: Check the binary first
78
78
  echo "🔍 Checking binary file:"
79
79
  file build/fastqr
80
80
  ls -la build/fastqr
81
- echo "Binary size: $(stat -c%s build/fastqr) bytes"
81
+
82
+ # Get binary size
83
+ if [[ "$ARCH" == "aarch64" ]]; then
84
+ echo "Binary size: $(stat -c%s build/fastqr 2>/dev/null || stat -f%z build/fastqr) bytes"
85
+ else
86
+ echo "Binary size: $(stat -c%s build/fastqr) bytes"
87
+ fi
82
88
 
83
89
  # Check binary dependencies
84
90
  echo "📋 Binary dependencies:"
85
- ldd build/fastqr || echo "ldd failed"
91
+ ldd build/fastqr || echo "Binary is static (no dependencies)"
86
92
 
87
93
  # Test if binary runs
88
94
  echo "🧪 Testing binary execution:"
89
95
  ./build/fastqr -v || echo "Binary test failed"
90
96
 
91
- # For ARM64, just copy the binary directly (no AppImage needed)
92
- if [[ "$ARCH" == "aarch64" ]]; then
93
- echo "🔧 Creating simple binary distribution for ARM64..."
94
- cp build/fastqr "$OUTPUT_DIR/bin/fastqr"
95
- chmod +x "$OUTPUT_DIR/bin/fastqr"
96
- echo "✅ Built binary for Linux ARM64"
97
- else
98
- # For x86_64, try to create AppImage
99
- echo "🔧 Building AppImage for Linux x86_64..."
100
-
101
- # Determine the correct AppImage tool for the architecture
102
- if [[ "$ARCH" == "x86_64" ]]; then
103
- LINUXDEPLOY_ARCH="x86_64"
104
- else
105
- echo "❌ Unsupported Linux architecture: $ARCH"
106
- exit 1
107
- fi
108
-
109
- # Install AppImage tools - try stable version instead of continuous
110
- echo "📥 Downloading linuxdeploy stable version..."
111
- wget -q https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-${LINUXDEPLOY_ARCH}.AppImage
112
- chmod +x linuxdeploy-${LINUXDEPLOY_ARCH}.AppImage
113
-
114
- # Also try appimagetool as fallback
115
- echo "📥 Downloading appimagetool as fallback..."
116
- wget -q https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${LINUXDEPLOY_ARCH}.AppImage
117
- chmod +x appimagetool-${LINUXDEPLOY_ARCH}.AppImage
118
-
119
- # Clean any existing AppDir
120
- rm -rf AppDir
121
-
122
- # Create desktop file for AppImage (simplified version)
123
- cat > fastqr.desktop << 'EOF'
124
- [Desktop Entry]
125
- Name=FastQR
126
- Comment=Fast QR Code Generator
127
- Exec=fastqr
128
- Icon=fastqr
129
- Type=Application
130
- Categories=Utility;
131
- EOF
132
-
133
- # Debug: Show what we created
134
- echo "Desktop file contents:"
135
- cat fastqr.desktop
136
- echo "Files in current directory:"
137
- ls -la *.desktop 2>/dev/null || echo "No desktop files found"
138
-
139
- # Check linuxdeploy version and capabilities
140
- echo "🔍 linuxdeploy info:"
141
- ./linuxdeploy-${LINUXDEPLOY_ARCH}.AppImage --help | head -10 || echo "linuxdeploy help failed"
142
-
143
- # Create AppImage with desktop file and additional flags for better compatibility
144
- # Bundle all necessary libraries to avoid GLIBC conflicts
145
- echo "🔧 Trying linuxdeploy method..."
146
- if ./linuxdeploy-${LINUXDEPLOY_ARCH}.AppImage \
147
- --executable build/fastqr \
148
- --desktop-file fastqr.desktop \
149
- --appdir AppDir \
150
- --output appimage \
151
- --library /usr/local/lib \
152
- --library /usr/lib/x86_64-linux-gnu \
153
- --library /lib/x86_64-linux-gnu; then
154
- echo "✅ linuxdeploy succeeded"
155
- else
156
- echo "❌ linuxdeploy failed, trying manual AppImage creation..."
157
-
158
- # Manual AppImage creation as fallback
159
- mkdir -p AppDir/usr/bin
160
- mkdir -p AppDir/usr/share/applications
161
- cp build/fastqr AppDir/usr/bin/
162
- chmod +x AppDir/usr/bin/fastqr
163
-
164
- # Copy desktop file
165
- cp fastqr.desktop AppDir/usr/share/applications/
166
-
167
- # Also copy to AppDir root (some tools expect it there)
168
- cp fastqr.desktop AppDir/
169
-
170
- # Create a simple icon (desktop file references it)
171
- echo "🎨 Creating simple icon..."
172
- # Create a minimal 64x64 PNG icon
173
- convert -size 64x64 xc:white -fill black -pointsize 24 -gravity center -annotate +0+0 "QR" AppDir/fastqr.png 2>/dev/null || echo "convert not available, creating placeholder"
174
-
175
- # Copy icon to proper locations
176
- mkdir -p AppDir/usr/share/pixmaps
177
- cp AppDir/fastqr.png AppDir/usr/share/pixmaps/ 2>/dev/null || true
178
-
179
- # Copy dependencies manually
180
- mkdir -p AppDir/usr/lib
181
- echo "📋 Copying dependencies..."
182
- ldd build/fastqr | grep "=>" | awk '{print $3}' | while read libpath; do
183
- if [ -f "$libpath" ]; then
184
- echo " Copying: $libpath"
185
- cp "$libpath" AppDir/usr/lib/
186
- fi
187
- done
188
-
189
- # Also copy specific libraries we know we need
190
- echo "📋 Copying specific libraries..."
191
- for lib in libqrencode.so libpng.so libz.so; do
192
- if [ -f "/usr/local/lib/$lib" ]; then
193
- echo " Copying: /usr/local/lib/$lib"
194
- cp "/usr/local/lib/$lib" AppDir/usr/lib/
195
- elif [ -f "/usr/lib/x86_64-linux-gnu/$lib" ]; then
196
- echo " Copying: /usr/lib/x86_64-linux-gnu/$lib"
197
- cp "/usr/lib/x86_64-linux-gnu/$lib" AppDir/usr/lib/
198
- fi
199
- done
200
-
201
- # Create AppRun
202
- cat > AppDir/AppRun << 'EOF'
203
- #!/bin/bash
204
- HERE="$(dirname "$(readlink -f "${0}")")"
205
- export LD_LIBRARY_PATH="${HERE}/usr/lib:${LD_LIBRARY_PATH}"
206
- exec "${HERE}/usr/bin/fastqr" "$@"
207
- EOF
208
- chmod +x AppDir/AppRun
209
-
210
- # Extract appimagetool and use it directly (no FUSE needed)
211
- echo "🔧 Extracting appimagetool..."
212
- ./appimagetool-${LINUXDEPLOY_ARCH}.AppImage --appimage-extract
213
- chmod +x squashfs-root/AppRun
214
-
215
- # Debug: Show AppDir structure
216
- echo "📁 AppDir structure:"
217
- find AppDir -type f | head -20
218
-
219
- # Use extracted appimagetool
220
- echo "🔧 Creating AppImage with extracted appimagetool..."
221
- ./squashfs-root/AppRun AppDir fastqr-${LINUXDEPLOY_ARCH}.AppImage
222
- fi
223
-
224
- # Copy AppImage to output directory
225
- cp fastqr-${LINUXDEPLOY_ARCH}.AppImage "$OUTPUT_DIR/bin/fastqr"
226
- chmod +x "$OUTPUT_DIR/bin/fastqr"
227
-
228
- echo "✅ Built AppImage for Linux x86_64 (universal compatibility!)"
229
- fi
97
+ # Copy the static binary
98
+ echo "🔧 Creating static binary distribution for Linux..."
99
+ cp build/fastqr "$OUTPUT_DIR/bin/fastqr"
100
+ chmod +x "$OUTPUT_DIR/bin/fastqr"
101
+
102
+ echo "✅ Built static binary for Linux $ARCH"
103
+ echo "📦 This binary should work on any Linux distribution without dependencies!"
230
104
  else
231
105
  # macOS: Copy standalone CLI binary
232
106
  cp build/fastqr "$OUTPUT_DIR/bin/fastqr"
data/src/fastqr.cpp CHANGED
@@ -31,7 +31,7 @@
31
31
  #include <algorithm>
32
32
  #include <cstdio>
33
33
 
34
- #define FASTQR_VERSION "1.0.23"
34
+ #define FASTQR_VERSION "1.0.25"
35
35
 
36
36
  namespace fastqr {
37
37
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastqr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.23
4
+ version: 1.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - FastQR Project
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-22 00:00:00.000000000 Z
11
+ date: 2025-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake