Skip to content

Commit

Permalink
fix: remove none linux binary
Browse files Browse the repository at this point in the history
Change-Id: I2b6531142e689682cc5d1a81d3d1375b3b0419d5
  • Loading branch information
Iceyer committed Dec 7, 2017
1 parent 11dca45 commit 9060c18
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 9 deletions.
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Homepage: http://www.linuxdeepin.com/
Package: deepin-boot-maker
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, p7zip-full, mtools,
syslinux [linux-amd64 linux-i386],
syslinux [linux-amd64 linux-i386],
syslinux-common [linux-amd64 linux-i386]
Description: Deepin Boot Maker is help for user to create a boot usb stick quick and easy
Deepin Boot Maker is help for user to create a boot usb stick quick and easy, it
designed to support only deepin install iso, but it can can work for all ubuntu live install iso too.
Description: Deepin Boot Maker is help for user to create a boot
usb stick quick and easy, it designed to support only deepin
install iso, but it can work for all ubuntu live install iso too.
2 changes: 1 addition & 1 deletion src/app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static bool switchToRoot(QApplication &app)

int main(int argc, char **argv)
{
Q_INIT_RESOURCE(blob);
Utils::initResource();
#if defined(STATIC_LIB)
DWIDGET_INIT_RESOURCE();
#endif
Expand Down
7 changes: 7 additions & 0 deletions src/libdbm/blob_linux.qrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<RCC>
<qresource prefix="/">
<file>blob/syslinux/syslinux.cfg</file>
<file>blob/xfbinst/fb.cfg</file>
<file>blob/xfbinst/xfbinst</file>
</qresource>
</RCC>
8 changes: 5 additions & 3 deletions src/libdbm/libdbm.pro
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ unix {
# INSTALLS += target
}

RESOURCES += \
blob.qrc \

linux {
RESOURCES += blob_linux.qrc
} else {
RESOURCES += blob.qrc
}
14 changes: 14 additions & 0 deletions src/libdbm/util/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@
#include <Windows.h>
#endif


static void initQRC() {
#ifdef Q_OS_LINUX
Q_INIT_RESOURCE(blob_linux);
#else
Q_INIT_RESOURCE(blob);
#endif
}

namespace Utils
{

Expand Down Expand Up @@ -303,4 +312,9 @@ QList<DeviceInfo> ListUsbDrives()
return deviceList;
}

void initResource()
{
initQRC();
}

}
1 change: 1 addition & 0 deletions src/libdbm/util/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
namespace Utils
{

void initResource();
void loadTranslate();
void ClearTargetDev(const QString &targetPath);
bool CheckInstallDisk(const QString &targetDev);
Expand Down
3 changes: 2 additions & 1 deletion src/service/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "LogManager.h"

#include "util/utils.h"
#include "bootmakerservice.h"

const QString BootMakerServiceName = "com.deepin.bootmaker";
Expand All @@ -35,7 +36,7 @@ int main(int argc, char *argv[])
{
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));

Q_INIT_RESOURCE(blob);
Utils::initResource();

QCoreApplication a(argc, argv);
a.setOrganizationName("deepin");
Expand Down

0 comments on commit 9060c18

Please sign in to comment.