11
11
exit 1
12
12
fi
13
13
14
- iface=${2:- qt5 }
14
+ iface=${2:- qt6 }
15
15
16
16
# Note: This script is written to be used with the Fedora mingw environment
17
17
MINGWROOT=/usr/$arch -w64-mingw32/sys-root/mingw
@@ -50,14 +50,6 @@ cp $win32dir/gimagereader-icon.rc $builddir
50
50
cp $win32dir /gimagereader.ico $builddir
51
51
cp $win32dir /installer.nsi $builddir
52
52
53
- # Collect dependencies
54
- function isnativedll {
55
- # If the import library exists but not the dynamic library, the dll ist most likely a native one
56
- local lower=${1,,}
57
- [ ! -e $MINGWROOT /bin/$1 ] && [ -f $MINGWROOT /lib/lib${lower/% .*/ .a} ] && return 0;
58
- return 1;
59
- }
60
-
61
53
function linkDep {
62
54
# Link the specified binary dependency and it's dependencies
63
55
local destdir=" $installroot /${2:- $(dirname $1 )} "
@@ -78,7 +70,7 @@ function linkDep {
78
70
function autoLinkDeps {
79
71
# Collects and links the dependencies of the specified binary
80
72
for dep in $( mingw-objdump -p " $1 " | grep " DLL Name" | awk ' {print $3}' ) ; do
81
- if ! isnativedll " $ dep" ; then
73
+ if [ -e $MINGWROOT /bin/ $ dep ] ; then
82
74
linkDep bin/$dep || return 1
83
75
fi
84
76
done
@@ -89,12 +81,7 @@ autoLinkDeps $installroot/bin/gimagereader-$iface.exe
89
81
linkDep bin/gdb.exe
90
82
91
83
linkDep bin/twaindsm.dll
92
- if [ -e " $installroot /bin/libenchant-2.dll" ]; then
93
- linkDep lib/enchant-2/enchant_hunspell.dll
94
- else
95
- linkDep lib/enchant/libenchant_myspell.dll
96
- fi
97
-
84
+ linkDep lib/enchant-2/enchant_hunspell.dll
98
85
linkDep lib/ossl-modules/legacy.dll
99
86
100
87
cp -R $win32dir /skel/* $installroot
@@ -122,26 +109,30 @@ if [ "$iface" == "gtk" ]; then
122
109
install -Dpm 0644 /usr/share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml $installroot /share/glib-2.0/schemas/org.gtk.Settings.FileChooser.gschema.xml
123
110
glib-compile-schemas $installroot /share/glib-2.0/schemas
124
111
125
- elif [ " $iface " == " qt5" ]; then
112
+ elif [ " $iface " == " qt5" ] || [ " $iface " == " qt6 " ] ; then
126
113
127
114
linkDep $( ls $MINGWROOT /bin/libssl-* .dll | sed " s|^$MINGWROOT /||" )
128
115
linkDep $( ls $MINGWROOT /bin/libcrypto-* .dll | sed " s|^$MINGWROOT /||" )
129
- linkDep lib/qt5/plugins/imageformats/qgif.dll bin/imageformats
130
- linkDep lib/qt5/plugins/imageformats/qicns.dll bin/imageformats
131
- linkDep lib/qt5/plugins/imageformats/qico.dll bin/imageformats
132
- linkDep lib/qt5/plugins/imageformats/qjp2.dll bin/imageformats
133
- linkDep lib/qt5/plugins/imageformats/qjpeg.dll bin/imageformats
134
- linkDep lib/qt5/plugins/imageformats/qtga.dll bin/imageformats
135
- linkDep lib/qt5/plugins/imageformats/qtiff.dll bin/imageformats
136
- linkDep lib/qt5/plugins/imageformats/qwbmp.dll bin/imageformats
137
- linkDep lib/qt5/plugins/imageformats/qwebp.dll bin/imageformats
138
- linkDep lib/qt5/plugins/platforms/qwindows.dll bin/platforms
139
- linkDep lib/qt5/plugins/styles/qwindowsvistastyle.dll bin/styles
116
+ linkDep lib/$iface /plugins/imageformats/qgif.dll bin/imageformats
117
+ linkDep lib/$iface /plugins/imageformats/qicns.dll bin/imageformats
118
+ linkDep lib/$iface /plugins/imageformats/qico.dll bin/imageformats
119
+ linkDep lib/$iface /plugins/imageformats/qjp2.dll bin/imageformats
120
+ linkDep lib/$iface /plugins/imageformats/qjpeg.dll bin/imageformats
121
+ linkDep lib/$iface /plugins/imageformats/qtga.dll bin/imageformats
122
+ linkDep lib/$iface /plugins/imageformats/qtiff.dll bin/imageformats
123
+ linkDep lib/$iface /plugins/imageformats/qwbmp.dll bin/imageformats
124
+ linkDep lib/$iface /plugins/imageformats/qwebp.dll bin/imageformats
125
+ linkDep lib/$iface /plugins/platforms/qwindows.dll bin/platforms
126
+ if [ " $iface " == " qt5" ]; then
127
+ linkDep lib/$iface /plugins/styles/qwindowsvistastyle.dll bin/styles
128
+ elif [ " $iface " == " qt6" ]; then
129
+ linkDep lib/$iface /plugins/styles/qmodernwindowsstyle.dll bin/styles
130
+ fi
140
131
141
132
# Install locale files
142
- mkdir -p $installroot /share/qt5 /translations/
143
- cp -a $MINGWROOT /share/qt5 /translations/{qt_* .qm,qtbase_* .qm,QtSpell_* .qm} $installroot /share/qt5 /translations
144
- rm -f $installroot /share/qt5 /translations/qt_help_* .qm
133
+ mkdir -p $installroot /share/$iface /translations/
134
+ cp -a $MINGWROOT /share/$iface /translations/{qt_* .qm,qtbase_* .qm,QtSpell_* .qm} $installroot /share/$iface /translations
135
+ rm -f $installroot /share/$iface /translations/qt_help_* .qm
145
136
146
137
fi
147
138
0 commit comments