Skip to content

Commit

Permalink
Revert "remove QT_X11_NO_MITSHM argument". Also make fixes to windows…
Browse files Browse the repository at this point in the history
… compilation.

This reverts commit 1c3ff12.
  • Loading branch information
gkovacs committed Nov 9, 2020
1 parent c4e827d commit 50b496c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
3 changes: 1 addition & 2 deletions src/unetbootin/build-windows
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
rvern="$(./vcs-revno)"
mingwb="$(ls /usr/ | grep mingw32 | grep -v amd64 | head --lines 1)"
qtwind="$(pwd)/qt5-win"
qtx11d="$(pwd)/qt5-x11"

if [ ! -d release ]
then
Expand All @@ -22,7 +21,7 @@ mv 7z.dll sevnz.dll
7z e -y sevenzip-extra.7z 7zS.sfx
fi

$qtx11d/bin/lrelease unetbootin.pro
$qtwind/bin/lrelease unetbootin.pro
./qmake-windows
make
$mingwb-strip --strip-all release/unetbootin.exe
Expand Down
9 changes: 4 additions & 5 deletions src/unetbootin/buildremote-windows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Dir.chdir("release")

rmexisting = <<EOR
ssh unetbootin-build-linux <<EOT
ssh unetbootin-build-windows <<EOT
if [ -f unetbootin-source-#{revno}.zip ]
then
rm unetbootin-source-#{revno}.zip
Expand All @@ -26,27 +26,26 @@
system(rmexisting)

upload = <<EOR
sftp unetbootin-build-linux <<EOT
sftp unetbootin-build-windows <<EOT
put unetbootin-source-#{revno}.zip
EOT
EOR

system(upload)

build = <<EOR
ssh unetbootin-build-linux <<EOT
ssh unetbootin-build-windows <<EOT
unzip unetbootin-source-#{revno}.zip -d unetbootin-#{revno}
cd unetbootin-#{revno}
ln -s ~/qt5-win
ln -s ~/qt5-x11
./build-windows
EOT
EOR

system(build)

download = <<EOR
sftp unetbootin-build-linux <<EOT
sftp unetbootin-build-windows <<EOT
cd unetbootin-#{revno}/release
get unetbootin-windows-#{revno}.exe
EOT
Expand Down
4 changes: 2 additions & 2 deletions src/unetbootin/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ int main(int argc, char **argv)
argsconcSingleQuote += "'rootcheck=no'";
#ifdef Q_OS_LINUX
QString gksuarg1;
gksuarg1 += QString("bash -c '");
gksuarg1 += QString("bash -c 'QT_X11_NO_MITSHM=1 ");
gksuarg1 += QString("%1 %2").arg(app.applicationFilePath()).arg(argsconc);
gksuarg1 += QString("'");
QStringList gksuargs;
Expand Down Expand Up @@ -333,7 +333,7 @@ int main(int argc, char **argv)
rootmsgb.setIcon(QMessageBox::Warning);
rootmsgb.setWindowTitle(uninstaller::tr("Must run as root"));
rootmsgb.setTextFormat(Qt::RichText);
rootmsgb.setText(uninstaller::tr("%2 must be run as root. Run it from the command line using:<br/><b>sudo %1</b><br/>").arg(app.applicationFilePath()).arg(UNETBOOTINB));
rootmsgb.setText(uninstaller::tr("%2 must be run as root. Run it from the command line using:<br/><b>sudo QT_X11_NO_MITSHM=1 %1</b><br/>").arg(app.applicationFilePath()).arg(UNETBOOTINB));
rootmsgb.setStandardButtons(QMessageBox::Ok);
switch (rootmsgb.exec())
{
Expand Down
3 changes: 1 addition & 2 deletions src/unetbootin/qmake-windows
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/sh

qtwind="$(pwd)/qt5-win"
qtx11d="$(pwd)/qt5-x11"
mingwb="i686-w64-mingw32"

$qtwind/bin/qmake -config release -spec $qtwind/mkspecs/win32-g++ "DEFINES += STATICWINDOWS" "QMAKE_CC = $mingwb-gcc" "QMAKE_CXX = $mingwb-g++" "QMAKE_INCDIR_QT = $qtwind/include" "QMAKE_LIBDIR_QT = $qtwind/lib" "QMAKE_LINK = $mingwb-g++" "QMAKE_COPY_DIR = cp -r" "QMAKE_COPY = cp" "QMAKE_COPY_DIR = cp -r" "QMAKE_MOVE = mv" "QMAKE_DEL_FILE = rm" "QMAKE_CHK_DIR_EXISTS = test -d" "QMAKE_QMAKE = $qtx11d/bin/qmake" "QMAKE_MOC = $qtx11d/bin/moc" "QMAKE_UIC = $qtx11d/bin/uic" "QMAKE_RCC = $qtx11d/bin/rcc" "QMAKE_RC = $mingwb-windres" "RESOURCES += unetbootin-windows.qrc unetbootin-sevnz.qrc" "QMAKE_LFLAGS += -Wl,-subsystem,windows" "RC_FILE += ubnembed.rc" "$@"
$qtwind/bin/qmake -config release -spec $qtwind/mkspecs/win32-g++ "DEFINES += STATICWINDOWS" "QMAKE_CC = $mingwb-gcc" "QMAKE_CXX = $mingwb-g++" "QMAKE_INCDIR_QT = $qtwind/include" "QMAKE_LIBDIR_QT = $qtwind/lib" "QMAKE_LINK = $mingwb-g++" "QMAKE_COPY_DIR = cp -r" "QMAKE_COPY = cp" "QMAKE_COPY_DIR = cp -r" "QMAKE_MOVE = mv" "QMAKE_DEL_FILE = rm" "QMAKE_CHK_DIR_EXISTS = test -d" "QMAKE_QMAKE = $qtwind/bin/qmake" "QMAKE_MOC = $qtx11d/bin/moc" "QMAKE_UIC = $qtwind/bin/uic" "QMAKE_RCC = $qtwind/bin/rcc" "QMAKE_RC = $mingwb-windres" "RESOURCES += unetbootin-windows.qrc unetbootin-sevnz.qrc" "QMAKE_LFLAGS += -Wl,-subsystem,windows" "RC_FILE += ubnembed.rc" "$@"
2 changes: 1 addition & 1 deletion src/unetbootin/unetbootin_asroot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if hash pkexec 2> /dev/null; then
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY unetbootin
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY QT_X11_NO_MITSHM=1 unetbootin
else
unetbootin
fi

0 comments on commit 50b496c

Please sign in to comment.