Skip to content

Commit 65108af

Browse files
Fritzing: patch source bugs
1 parent fd8ef38 commit 65108af

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

apps/Fritzing/install

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,79 @@ rm -rf fritzing-app
3838
git clone https://github.com/fritzing/fritzing-app.git || error "Could not clone fritzing-app source"
3939
cd fritzing-app || error "Could not move to directory"
4040
git checkout 0.9.6
41+
# move to quazip folder and apply patch
42+
cd src/lib/quazip || error "Could not move to directory"
43+
44+
# patch based on https://github.com/stachenov/quazip/commit/5f48264e078c1cc5f0682e90acc9ef0c8f011c19.patch with minor edits
45+
cat << 'EOF' >> quazip.patch
46+
--- crypt.h 2025-10-05 17:12:52.333847151 -0400
47+
+++ crypt.h 2025-10-05 17:15:23.115088496 -0400
48+
@@ -32,7 +32,7 @@
49+
/***********************************************************************
50+
* Return the next byte in the pseudo-random sequence
51+
*/
52+
-static int decrypt_byte(unsigned long* pkeys, const unsigned long* pcrc_32_tab)
53+
+static int decrypt_byte(unsigned long* pkeys, const z_crc_t FAR * pcrc_32_tab)
54+
{
55+
#ifndef _WINDOWS
56+
(void) pcrc_32_tab; /* avoid "unused parameter" warning */
57+
@@ -49,7 +49,7 @@
58+
/***********************************************************************
59+
* Update the encryption keys with the next byte of plain text
60+
*/
61+
-static int update_keys(unsigned long* pkeys,const unsigned long* pcrc_32_tab,int c)
62+
+static int update_keys(unsigned long* pkeys,const z_crc_t FAR * pcrc_32_tab,int c)
63+
{
64+
(*(pkeys+0)) = CRC32((*(pkeys+0)), c);
65+
(*(pkeys+1)) += (*(pkeys+0)) & 0xff;
66+
@@ -66,7 +66,7 @@
67+
* Initialize the encryption keys and the random header according to
68+
* the given password.
69+
*/
70+
-static void init_keys(const char* passwd,unsigned long* pkeys,const unsigned long* pcrc_32_tab)
71+
+static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t FAR * pcrc_32_tab)
72+
{
73+
*(pkeys+0) = 305419896L;
74+
*(pkeys+1) = 591751049L;
75+
@@ -96,7 +96,7 @@
76+
unsigned char *buf; /* where to write header */
77+
int bufSize;
78+
unsigned long* pkeys;
79+
-const unsigned long* pcrc_32_tab;
80+
+const z_crc_t FAR * pcrc_32_tab;
81+
unsigned long crcForCrypting;
82+
{
83+
int n; /* index in random header */
84+
--- unzip.c 2025-10-05 17:12:52.334031525 -0400
85+
+++ unzip.c 2025-10-05 17:15:40.996747630 -0400
86+
@@ -150,7 +150,7 @@
87+
int encrypted;
88+
# ifndef NOUNCRYPT
89+
unsigned long keys[3]; /* keys defining the pseudo-random sequence */
90+
- const unsigned long* pcrc_32_tab;
91+
+ const z_crc_t FAR * pcrc_32_tab;
92+
# endif
93+
} unz_s;
94+
95+
--- zip.c 2025-10-05 17:12:52.334031525 -0400
96+
+++ zip.c 2025-10-05 17:15:56.058461707 -0400
97+
@@ -134,7 +134,7 @@
98+
int encrypt;
99+
#ifndef NOCRYPT
100+
unsigned long keys[3]; /* keys defining the pseudo-random sequence */
101+
- const unsigned long* pcrc_32_tab;
102+
+ const z_crc_t FAR * pcrc_32_tab;
103+
int crypt_header_size;
104+
#endif
105+
} curfile_info;
106+
107+
EOF
108+
109+
git apply quazip.patch || error "Unable to apply patch"
110+
cd ../../../ || error "Could not move to directory"
111+
# patch compilation script
41112
sed -i 's/LIBGIT_STATIC = true/LIBGIT_STATIC = false/g' phoenix.pro
113+
# compile the code
42114
qmake || error "PLEASE contact us in the Discord. We have seen multiple reports of this error and are unable to reproduce on our end. qmake failed on fritzing configure"
43115
make -j$(nproc) || error "compilation failed"
44116
lupdate -noobsolete phoenix.pro

0 commit comments

Comments
 (0)