Update filenames
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
@echo off
|
||||
|
||||
set CMAKE_PREFIX_PATH=C:\Qt\Qt5.14.2\5.14.2\mingw73_32
|
||||
set CMAKE_MAKE_PROGRAM=C:\ProgramData\chocolatey\bin\make.exe
|
||||
set OPENSSL_ROOT_DIR=C:\dev-lib\openssl
|
||||
|
||||
cd build
|
||||
|
||||
cmake -G "MinGW Makefiles" ..\src
|
||||
|
||||
make
|
||||
|
||||
cd ..
|
||||
+31
-31
@@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.9.4)
|
||||
OPTION (ENABLE_CHECK_VERSION "Check for version updates" ON)
|
||||
OPTION (ENABLE_TELEMETRY "Enable sending telemetry" ON)
|
||||
|
||||
project(rpi-imager LANGUAGES CXX C)
|
||||
project(hooverhigh-imager LANGUAGES CXX C)
|
||||
set(IMAGER_VERSION_MAJOR 1)
|
||||
set(IMAGER_VERSION_MINOR 7)
|
||||
set(IMAGER_VERSION_STR "${IMAGER_VERSION_MAJOR}.${IMAGER_VERSION_MINOR}.5")
|
||||
@@ -21,10 +21,10 @@ set(HEADERS config.h imagewriter.h networkaccessmanagerfactory.h nan.h drivelist
|
||||
|
||||
# Add dependencies
|
||||
if (APPLE)
|
||||
set_source_files_properties("icons/rpi-imager.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set_source_files_properties("icons/hooverhigh-imager.icns" PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
set(DEPENDENCIES acceleratedcryptographichash.cpp mac/macfile.cpp mac/macfile.h dependencies/mountutils/src/darwin/functions.cpp
|
||||
mac/macwlancredentials.h mac/macwlancredentials.cpp
|
||||
dependencies/drivelist/src/darwin/list.mm dependencies/drivelist/src/darwin/REDiskList.m icons/rpi-imager.icns)
|
||||
dependencies/drivelist/src/darwin/list.mm dependencies/drivelist/src/darwin/REDiskList.m icons/hooverhigh-imager.icns)
|
||||
enable_language(OBJC C)
|
||||
elseif (UNIX)
|
||||
set(DEPENDENCIES dependencies/mountutils/src/linux/functions.cpp linux/linuxdrivelist.cpp linux/networkmanagerapi.h linux/networkmanagerapi.cpp)
|
||||
@@ -48,7 +48,7 @@ elseif (UNIX)
|
||||
elseif (WIN32)
|
||||
set(DEPENDENCIES acceleratedcryptographichash.cpp dependencies/mountutils/src/windows/functions.cpp dependencies/drivelist/src/windows/list.cpp
|
||||
windows/winfile.cpp windows/winfile.h windows/winwlancredentials.h windows/winwlancredentials.cpp
|
||||
windows/rpi-imager.rc wlanapi_delayed.lib)
|
||||
windows/hooverhigh-imager.rc wlanapi_delayed.lib)
|
||||
set(EXTRALIBS setupapi ${CMAKE_CURRENT_BINARY_DIR}/wlanapi_delayed.lib)
|
||||
add_custom_command(
|
||||
OUTPUT wlanapi_delayed.lib
|
||||
@@ -122,10 +122,10 @@ if(${QT}WinExtras_FOUND)
|
||||
set(EXTRALIBS ${EXTRALIBS} ${QT}::WinExtras)
|
||||
endif()
|
||||
|
||||
set(TRANSLATIONS i18n/rpi-imager_en.ts i18n/rpi-imager_nl.ts i18n/rpi-imager_zh.ts i18n/rpi-imager_tr.ts
|
||||
i18n/rpi-imager_fr.ts i18n/rpi-imager_de.ts i18n/rpi-imager_sk.ts i18n/rpi-imager_it.ts
|
||||
i18n/rpi-imager_ca.ts i18n/rpi-imager_sl.ts i18n/rpi-imager_ko.ts i18n/rpi-imager_ja.ts
|
||||
i18n/rpi-imager_ru.ts)
|
||||
set(TRANSLATIONS i18n/hooverhigh-imager_en.ts i18n/hooverhigh-imager_nl.ts i18n/hooverhigh-imager_zh.ts i18n/hooverhigh-imager_tr.ts
|
||||
i18n/hooverhigh-imager_fr.ts i18n/hooverhigh-imager_de.ts i18n/hooverhigh-imager_sk.ts i18n/hooverhigh-imager_it.ts
|
||||
i18n/hooverhigh-imager_ca.ts i18n/hooverhigh-imager_sl.ts i18n/hooverhigh-imager_ko.ts i18n/hooverhigh-imager_ja.ts
|
||||
i18n/hooverhigh-imager_ru.ts)
|
||||
#qt5_create_translation(QM_FILES ${CMAKE_SOURCE_DIR} ${TRANSLATIONS})
|
||||
if (Qt5_FOUND)
|
||||
qt5_add_translation(QM_FILES ${TRANSLATIONS})
|
||||
@@ -222,21 +222,21 @@ if (WIN32)
|
||||
COMMAND ${CMAKE_STRIP} "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe")
|
||||
|
||||
# Code signing
|
||||
find_program(SIGNTOOL "signtool.exe" PATHS
|
||||
"c:/Program Files (x86)/Microsoft SDKs/ClickOnce/SignTool"
|
||||
"c:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64")
|
||||
if (NOT SIGNTOOL)
|
||||
message(FATAL_ERROR "Unable to locate signtool.exe used for code signing")
|
||||
endif()
|
||||
add_definitions(-DSIGNTOOL="${SIGNTOOL}")
|
||||
#find_program(SIGNTOOL "signtool.exe" PATHS
|
||||
# "c:/Program Files (x86)/Microsoft SDKs/ClickOnce/SignTool"
|
||||
# "c:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64")
|
||||
#if (NOT SIGNTOOL)
|
||||
# message(FATAL_ERROR "Unable to locate signtool.exe used for code signing")
|
||||
#endif()
|
||||
#add_definitions(-DSIGNTOOL="${SIGNTOOL}")
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND "${SIGNTOOL}" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe")
|
||||
#add_custom_command(TARGET ${PROJECT_NAME}
|
||||
# POST_BUILD
|
||||
# COMMAND "${SIGNTOOL}" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe")
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND "${SIGNTOOL}" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "${CMAKE_BINARY_DIR}/dependencies/fat32format/fat32format.exe")
|
||||
#add_custom_command(TARGET ${PROJECT_NAME}
|
||||
# POST_BUILD
|
||||
# COMMAND "${SIGNTOOL}" sign /tr http://timestamp.digicert.com /td sha256 /fd sha256 /a "${CMAKE_BINARY_DIR}/dependencies/fat32format/fat32format.exe")
|
||||
|
||||
# Windeploy
|
||||
find_program(WINDEPLOYQT "windeployqt.exe" PATHS "${${QT}_DIR}/../../../bin")
|
||||
@@ -250,7 +250,7 @@ if (WIN32)
|
||||
POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy
|
||||
"${CMAKE_BINARY_DIR}/${PROJECT_NAME}.exe" "${CMAKE_BINARY_DIR}/dependencies/fat32format/fat32format.exe"
|
||||
"${CMAKE_SOURCE_DIR}/../license.txt" "${CMAKE_SOURCE_DIR}/windows/rpi-imager-cli.cmd"
|
||||
"${CMAKE_SOURCE_DIR}/../license.txt" "${CMAKE_SOURCE_DIR}/windows/hooverhigh-imager-cli.cmd"
|
||||
"${CMAKE_BINARY_DIR}/deploy")
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
@@ -260,13 +260,13 @@ if (WIN32)
|
||||
"${CMAKE_BINARY_DIR}/deploy")
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/windows/rpi-imager.nsi.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/rpi-imager.nsi"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/windows/hooverhigh-imager.nsi.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/hooverhigh-imager.nsi"
|
||||
@ONLY)
|
||||
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
POST_BUILD
|
||||
COMMAND "${WINDEPLOYQT}" --no-translations --no-webkit2 --no-opengl-sw --angle --qmldir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/deploy/rpi-imager.exe")
|
||||
COMMAND "${WINDEPLOYQT}" --no-translations --no-webkit2 --no-opengl-sw --angle --qmldir "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_BINARY_DIR}/deploy/hooverhigh-imager.exe")
|
||||
|
||||
# Remove excess files
|
||||
add_custom_command(TARGET ${PROJECT_NAME}
|
||||
@@ -340,14 +340,14 @@ else()
|
||||
endif()
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/linux/rpi-imager.metainfo.xml.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/rpi-imager.metainfo.xml"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/linux/hooverhigh-imager.metainfo.xml.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/hooverhigh-imager.metainfo.xml"
|
||||
@ONLY)
|
||||
|
||||
install(TARGETS rpi-imager DESTINATION bin)
|
||||
install(FILES icons/rpi-imager.png DESTINATION share/icons/hicolor/128x128/apps)
|
||||
install(FILES linux/rpi-imager.desktop DESTINATION share/applications)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/rpi-imager.metainfo.xml" DESTINATION share/metainfo)
|
||||
install(TARGETS hooverhigh-imager DESTINATION bin)
|
||||
install(FILES icons/hooverhigh-imager.png DESTINATION share/icons/hicolor/128x128/apps)
|
||||
install(FILES linux/hooverhigh-imager.desktop DESTINATION share/applications)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/hooverhigh-imager.metainfo.xml" DESTINATION share/metainfo)
|
||||
endif()
|
||||
|
||||
include_directories(${CURL_INCLUDE_DIR} ${LibArchive_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR})
|
||||
|
||||
+13
-13
@@ -1,17 +1,17 @@
|
||||
<RCC>
|
||||
<qresource prefix="/i18n">
|
||||
<file>rpi-imager_de.qm</file>
|
||||
<file>rpi-imager_en.qm</file>
|
||||
<file>rpi-imager_fr.qm</file>
|
||||
<file>rpi-imager_it.qm</file>
|
||||
<file>rpi-imager_ko.qm</file>
|
||||
<file>rpi-imager_nl.qm</file>
|
||||
<file>rpi-imager_ru.qm</file>
|
||||
<file>rpi-imager_sl.qm</file>
|
||||
<file>rpi-imager_sk.qm</file>
|
||||
<file>rpi-imager_tr.qm</file>
|
||||
<file>rpi-imager_zh.qm</file>
|
||||
<file>rpi-imager_ca.qm</file>
|
||||
<file>rpi-imager_ja.qm</file>
|
||||
<file>hooverhigh-imager_de.qm</file>
|
||||
<file>hooverhigh-imager_en.qm</file>
|
||||
<file>hooverhigh-imager_fr.qm</file>
|
||||
<file>hooverhigh-imager_it.qm</file>
|
||||
<file>hooverhigh-imager_ko.qm</file>
|
||||
<file>hooverhigh-imager_nl.qm</file>
|
||||
<file>hooverhigh-imager_ru.qm</file>
|
||||
<file>hooverhigh-imager_sl.qm</file>
|
||||
<file>hooverhigh-imager_sk.qm</file>
|
||||
<file>hooverhigh-imager_tr.qm</file>
|
||||
<file>hooverhigh-imager_zh.qm</file>
|
||||
<file>hooverhigh-imager_ca.qm</file>
|
||||
<file>hooverhigh-imager_ja.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
+17
-15
@@ -34,12 +34,14 @@ static QTextStream cerr(stderr);
|
||||
/* Newer Qt versions throw warnings if using ::endl instead of Qt::endl
|
||||
Older versions lack Qt::endl */
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
//using Qt::endl;
|
||||
#define endl Qt::endl
|
||||
// using Qt::endl;
|
||||
#define endl Qt::endl
|
||||
#endif
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
static void consoleMsgHandler(QtMsgType, const QMessageLogContext &, const QString &str) {
|
||||
#include <ios>
|
||||
static void consoleMsgHandler(QtMsgType, const QMessageLogContext &, const QString &str)
|
||||
{
|
||||
cerr << str << endl;
|
||||
}
|
||||
#endif
|
||||
@@ -77,7 +79,7 @@ int main(int argc, char *argv[])
|
||||
QStringList fontList = QFontDatabase::applicationFontFamilies(QFontDatabase::addApplicationFont(":/fonts/Roboto-Regular.ttf"));
|
||||
QGuiApplication::setFont(QFont(fontList.first(), 10));
|
||||
if (QFile::exists("/usr/share/fonts/truetype/droid/DroidSansFallback.ttf"))
|
||||
QFontDatabase::addApplicationFont("/usr/share/fonts/truetype/droid/DroidSansFallback.ttf");
|
||||
QFontDatabase::addApplicationFont("/usr/share/fonts/truetype/droid/DroidSansFallback.ttf");
|
||||
|
||||
QLocale::Language l = QLocale::system().language();
|
||||
if (l == QLocale::AnyLanguage || l == QLocale::C)
|
||||
@@ -99,7 +101,7 @@ int main(int argc, char *argv[])
|
||||
QString customRepo;
|
||||
QUrl url;
|
||||
QStringList args = app.arguments();
|
||||
for (int i=1; i < args.size(); i++)
|
||||
for (int i = 1; i < args.size(); i++)
|
||||
{
|
||||
if (!args[i].startsWith("-") && url.isEmpty())
|
||||
{
|
||||
@@ -117,13 +119,14 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
cerr << "Argument ignored because it is not a regular file: " << args[i] << endl;;
|
||||
cerr << "Argument ignored because it is not a regular file: " << args[i] << endl;
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (args[i] == "--repo")
|
||||
{
|
||||
if (args.size()-i < 2 || args[i+1].startsWith("-"))
|
||||
if (args.size() - i < 2 || args[i + 1].startsWith("-"))
|
||||
{
|
||||
cerr << "Missing URL or file path after --repo" << endl;
|
||||
return 1;
|
||||
@@ -148,7 +151,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
else if (args[i] == "--qm")
|
||||
{
|
||||
if (args.size()-i < 2 || args[i+1].startsWith("-"))
|
||||
if (args.size() - i < 2 || args[i + 1].startsWith("-"))
|
||||
{
|
||||
cerr << "Missing QM file after --qm" << endl;
|
||||
return 1;
|
||||
@@ -214,7 +217,7 @@ int main(int argc, char *argv[])
|
||||
if (CFArrayGetCount(prefLangs))
|
||||
{
|
||||
char buf[32] = {0};
|
||||
CFStringRef strRef = (CFStringRef) CFArrayGetValueAtIndex(prefLangs, 0);
|
||||
CFStringRef strRef = (CFStringRef)CFArrayGetValueAtIndex(prefLangs, 0);
|
||||
CFStringGetCString(strRef, buf, sizeof(buf), kCFStringEncodingUTF8);
|
||||
langcode = buf;
|
||||
langcode.replace('-', '_');
|
||||
@@ -250,8 +253,8 @@ int main(int argc, char *argv[])
|
||||
return -1;
|
||||
|
||||
QObject *qmlwindow = engine.rootObjects().value(0);
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(downloadProgress(QVariant,QVariant)), qmlwindow, SLOT(onDownloadProgress(QVariant,QVariant)));
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(verifyProgress(QVariant,QVariant)), qmlwindow, SLOT(onVerifyProgress(QVariant,QVariant)));
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(downloadProgress(QVariant, QVariant)), qmlwindow, SLOT(onDownloadProgress(QVariant, QVariant)));
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(verifyProgress(QVariant, QVariant)), qmlwindow, SLOT(onVerifyProgress(QVariant, QVariant)));
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(preparationStatusUpdate(QVariant)), qmlwindow, SLOT(onPreparationStatusUpdate(QVariant)));
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(error(QVariant)), qmlwindow, SLOT(onError(QVariant)));
|
||||
qmlwindow->connect(&imageWriter, SIGNAL(success()), qmlwindow, SLOT(onSuccess()));
|
||||
@@ -270,7 +273,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (x != -1 && y != -1)
|
||||
{
|
||||
if ( !app.screenAt(QPoint(x,y)) || !app.screenAt(QPoint(x+w,y+h)) )
|
||||
if (!app.screenAt(QPoint(x, y)) || !app.screenAt(QPoint(x + w, y + h)))
|
||||
{
|
||||
qDebug() << "Not restoring saved window position as it falls outside any currently attached screen";
|
||||
x = y = -1;
|
||||
@@ -279,8 +282,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (x == -1 || y == -1)
|
||||
{
|
||||
x = qMax(1, (screensize.width()-w)/2);
|
||||
y = qMax(1, (screensize.height()-h)/2);
|
||||
x = qMax(1, (screensize.width() - w) / 2);
|
||||
y = qMax(1, (screensize.height() - h) / 2);
|
||||
}
|
||||
|
||||
qmlwindow->setProperty("x", x);
|
||||
@@ -302,4 +305,3 @@ int main(int argc, char *argv[])
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
<qresource prefix="/">
|
||||
<file>main.qml</file>
|
||||
<file>qtquickcontrols2.conf</file>
|
||||
<file>icons/rpi-imager.ico</file>
|
||||
<file>icons/hooverhigh-imager.ico</file>
|
||||
<file>fonts/Roboto-Bold.ttf</file>
|
||||
<file>fonts/Roboto-Light.ttf</file>
|
||||
<file>fonts/Roboto-Regular.ttf</file>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@echo off
|
||||
|
||||
rem
|
||||
rem For scripting: call rpi-imager.exe and wait until it finished before continuing
|
||||
rem For scripting: call hooverhigh-imager.exe and wait until it finished before continuing
|
||||
rem This is necessary because it is compiled as GUI application, and Windows
|
||||
rem normalling does not wait until those exit
|
||||
rem
|
||||
|
||||
start /WAIT rpi-imager.exe --cli %*
|
||||
start /WAIT hooverhigh-imager.exe --cli %*
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#include <windows.h>
|
||||
|
||||
IDI_ICON1 ICON DISCARDABLE "../icons/rpi-imager.ico"
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "rpi-imager.manifest"
|
||||
IDI_ICON1 ICON DISCARDABLE "../icons/hooverhigh-imager.ico"
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "hooverhigh-imager.manifest"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION IMAGER_VERSION_CSV
|
||||
Reference in New Issue
Block a user