mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
44
app-text/elforkane/additional-files/elforkane.rdef.in
Normal file
44
app-text/elforkane/additional-files/elforkane.rdef.in
Normal file
@@ -0,0 +1,44 @@
|
||||
|
||||
resource app_flags B_MULTIPLE_LAUNCH;
|
||||
|
||||
resource app_version {
|
||||
major = @MAJOR@,
|
||||
middle = @MIDDLE@,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 0,
|
||||
|
||||
short_info = "Elforkane",
|
||||
long_info = "Electronic Holy Quran Browser and Reciter"
|
||||
};
|
||||
|
||||
resource app_signature "@APP_SIGNATURE@";
|
||||
|
||||
resource vector_icon {
|
||||
$"6E63696609010100006B03010000020016023B6333BDAC283DAC283B63334A5F"
|
||||
$"334BC0A3007DFFBB02001602BA6570BB328F3B328FBA6570480CA34BD34700D8"
|
||||
$"FFEC0200160439D851BC0F333C0F3339D8514AE7704ABAF500FA1B8C7834FFC2"
|
||||
$"02001603378B85B9CE1439CE14378B854AADAE4985EB00B683FAFFD202001603"
|
||||
$"377333B9728F39728F37733349C4514AAF4700CCD8FAFFC803FF000002000602"
|
||||
$"B507E13A82E2BAD598B56BB44A7652479FE400022262FE046DA416060BA2680B"
|
||||
$"3E60434E54525854585454504E6042604A60425C403E0A06224B22503E5E5A42"
|
||||
$"5A3D3E3402043E533E5342514C4A444A4C4A303E303E2A3E2246264422460604"
|
||||
$"EB323C323C32323B2E57354C4A4C3C4C4A0605E7035A3D57405A3D423E5E3E58"
|
||||
$"3E5843534CC3EF474B4E460A043E5E2250224B3E580605FE02224B3E583E5843"
|
||||
$"534CC3EF474B4E465A3D57405A3D3E340604EB323C323C32323B2E57354C4A4C"
|
||||
$"3C4C4A02043E533E5342514C4A444A4C4A303E303E2A3E2246264422460A0434"
|
||||
$"C91D3E5D44C8B73E5C0A0439C91D3E5BC059C8B73EC9E90A03224F26C653224E"
|
||||
$"0A03224D2950224C0A035A42C7EBC2575ABFF30A035A40C8B7435A3F060AFEF3"
|
||||
$"0B303D303A303A343C4B45C267C0DC4F47504C4F49514F5553C715C6E1555352"
|
||||
$"5257525750564D504E524C4EC418C375C4D5C404C418C375303D060AFEF30B30"
|
||||
$"3D303A303A343C4B45C267C0DC4F47504C4F49514F5553C715C6E15553525257"
|
||||
$"525750564D504E524C4EC418C375C4D5C404C418C375303D08023043383B0802"
|
||||
$"34443B3C08023449C0E4BD4F08032D422E4430450803373839393A3B140A0001"
|
||||
$"00000A01030102031001178300040A020104000A030105000A040106000A0501"
|
||||
$"07000A060108000A0106090A0B0C0D0E000A01010F1001178322040A07011000"
|
||||
$"0A0800000A0800000A0800000A0800000A0800123ED413BED4133ED4133ED413"
|
||||
$"47F4A24A588901178400040A0800023ED413BED4133ED4133ED41347F4A24A58"
|
||||
$"890A0800023ED413BED4133ED4133ED41347F4A24A58890A0800023ED413BED4"
|
||||
$"133ED4133ED41347F4A24A58890A0800023ED413BED4133ED4133ED41347F4A2"
|
||||
$"4A58890A0800023ED413BED4133ED4133ED41347F4A24A5889"
|
||||
};
|
||||
87
app-text/elforkane/elforkane-1.2.recipe
Normal file
87
app-text/elforkane/elforkane-1.2.recipe
Normal file
@@ -0,0 +1,87 @@
|
||||
SUMMARY="The electronic Holy Quran browser"
|
||||
DESCRIPTION="Electronic Holy Quran browser and reciter."
|
||||
COPYRIGHT="1999-2019 Abou Zakaria"
|
||||
HOMEPAGE="https://github.com/zakariakov/elforkane"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/zakariakov/elforkane/archive/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="25f5352472e99e6dd018f6003408a793ee85f140a381d58b7de463e9b0bc2003"
|
||||
SOURCE_FILENAME="elforkane-$portVersion.tar.gz"
|
||||
SOURCE_DIR="elforkane-$portVersion"
|
||||
ADDITIONAL_FILES="elforkane.rdef.in"
|
||||
PATCHES="elforkane-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
fi
|
||||
|
||||
PROVIDES="
|
||||
elforkane$secondaryArchSuffix = $portVersion
|
||||
app:Elforkane = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
ayat_tarajem_data
|
||||
ayat_tafasir_data
|
||||
lib:libGL$secondaryArchSuffix
|
||||
lib:libQt5Core$secondaryArchSuffix
|
||||
lib:libQt5Gui$secondaryArchSuffix
|
||||
lib:libQt5Multimedia$secondaryArchSuffix
|
||||
lib:libQt5MultimediaWidgets$secondaryArchSuffix
|
||||
lib:libQt5Network$secondaryArchSuffix
|
||||
lib:libQt5PrintSupport$secondaryArchSuffix
|
||||
lib:libQt5Widgets$secondaryArchSuffix
|
||||
lib:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libQt5Core$secondaryArchSuffix
|
||||
devel:libQt5Gui$secondaryArchSuffix
|
||||
devel:libQt5Multimedia$secondaryArchSuffix
|
||||
devel:libQt5MultimediaWidgets$secondaryArchSuffix
|
||||
devel:libQt5Network$secondaryArchSuffix
|
||||
devel:libQt5PrintSupport$secondaryArchSuffix
|
||||
devel:libQt5Widgets$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ld$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:qmake$secondaryArchSuffix >= 5
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
qmake
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
mkdir -p $appsDir/Elforkane/lib
|
||||
cp -rf usr/bin/elforkane $appsDir/Elforkane/Elforkane
|
||||
rm -rf usr/share/elforkane/translat
|
||||
rm -rf usr/share/elforkane/tafasir
|
||||
cp -rf usr/share/elforkane/* $appsDir/Elforkane/lib
|
||||
mkdir -p $appsDir/Elforkane/lib/images/default
|
||||
cp -rf data/* $appsDir/Elforkane/lib/images/default/
|
||||
ln -s $dataDir/ayat/translat $appsDir/Elforkane/lib/translat
|
||||
ln -s $dataDir/ayat/tafasir $appsDir/Elforkane/lib/tafasir
|
||||
ln -s $dataDir/ayat/audio $appsDir/Elforkane/lib/audio
|
||||
local APP_SIGNATURE="application/x-vnd.elforkane"
|
||||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||||
local LONG_INFO="$SUMMARY"
|
||||
sed \
|
||||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||||
-e "s|@MAJOR@|$MAJOR|" \
|
||||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||||
"$portDir"/additional-files/elforkane.rdef.in > elforkane.rdef
|
||||
|
||||
addResourcesToBinaries elforkane.rdef $appsDir/Elforkane/Elforkane
|
||||
addAppDeskbarSymlink $appsDir/Elforkane/Elforkane
|
||||
}
|
||||
384
app-text/elforkane/patches/elforkane-1.2.patchset
Normal file
384
app-text/elforkane/patches/elforkane-1.2.patchset
Normal file
@@ -0,0 +1,384 @@
|
||||
From c7884a88f74e89d27572ffaa1ee69b57273d94d3 Mon Sep 17 00:00:00 2001
|
||||
From: Mazbrili <mazbrili@yahoo.com>
|
||||
Date: Sat, 8 Feb 2020 10:44:28 +0700
|
||||
Subject: patch for haiku path requirement..
|
||||
|
||||
|
||||
diff --git a/database.cpp b/database.cpp
|
||||
index a8f50da..ddca0ed 100644
|
||||
--- a/database.cpp
|
||||
+++ b/database.cpp
|
||||
@@ -54,6 +54,8 @@ Database::Database()
|
||||
|
||||
appDir.cdUp();
|
||||
appPath= appDir.absolutePath()+"/share/elforkane";
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ appPath= appDir.absolutePath()+"/lib";
|
||||
#elif defined(Q_OS_MAC)
|
||||
if (appDir.dirName() == "MacOS") {
|
||||
appDir.cdUp();
|
||||
diff --git a/fs-wallpapers/fullscreen.cpp b/fs-wallpapers/fullscreen.cpp
|
||||
index f135ed4..fbb1731 100644
|
||||
--- a/fs-wallpapers/fullscreen.cpp
|
||||
+++ b/fs-wallpapers/fullscreen.cpp
|
||||
@@ -20,6 +20,8 @@ SceenFull::SceenFull(int w, int h):m_Width(w),m_Height(h)
|
||||
// if (appDir.dirName().toLower() == "debug" || appDir.dirName().toLower() == "release")
|
||||
appDir.cdUp();
|
||||
appPath= appDir.absolutePath()+"/share/elforkane";
|
||||
+ #elif defined(Q_OS_HAIKU)
|
||||
+ appPath= appDir.absolutePath()+"/lib" ;
|
||||
#elif defined(Q_OS_MAC)
|
||||
if (appDir.dirName() == "MacOS") {
|
||||
appDir.cdUp();
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index f30f038..fb68394 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -70,6 +70,8 @@ int main(int argc, char *argv[])
|
||||
#if defined(Q_OS_WIN)
|
||||
appDir.cdUp();
|
||||
appPath= appDir.absolutePath()+"/share/elforkane";
|
||||
+ #elif defined(Q_OS_HAIKU)
|
||||
+ appPath= appDir.absolutePath()+"/lib" ;
|
||||
#elif defined(Q_OS_MAC)
|
||||
if (appDir.dirName() == "MacOS") {
|
||||
appDir.cdUp();
|
||||
diff --git a/mainwindow.cpp b/mainwindow.cpp
|
||||
index 9d93cfa..313724c 100644
|
||||
--- a/mainwindow.cpp
|
||||
+++ b/mainwindow.cpp
|
||||
@@ -57,6 +57,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
#if defined(Q_OS_WIN)
|
||||
appDir.cdUp();
|
||||
m_appPath= appDir.absolutePath()+"/share/elforkane";
|
||||
+#elif defined(Q_OS_HAIKU)
|
||||
+ m_appPath= appDir.absolutePath()+"/lib";
|
||||
#elif defined(Q_OS_MAC)
|
||||
if (appDir.dirName() == "MacOS") {
|
||||
appDir.cdUp();
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 41d2621d171287c247e9fff82e189ee105b09777 Mon Sep 17 00:00:00 2001
|
||||
From: Mazbrili <mazbrili@yahoo.com>
|
||||
Date: Tue, 10 Mar 2020 10:52:55 +0700
|
||||
Subject: patch for close application
|
||||
|
||||
|
||||
diff --git a/mainwindow.cpp b/mainwindow.cpp
|
||||
index 313724c..90a0259 100644
|
||||
--- a/mainwindow.cpp
|
||||
+++ b/mainwindow.cpp
|
||||
@@ -2381,6 +2381,7 @@ void MainWindow::on_actionQuit_triggered()
|
||||
trayIcon->hide();
|
||||
|
||||
this->close();
|
||||
+ qApp->quit();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionStopMedia_triggered()
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 4df736a75a4c3d8563c56e1041887bb8d177c10d Mon Sep 17 00:00:00 2001
|
||||
From: mazbrili <mazbrili@yahoo.com>
|
||||
Date: Sat, 2 May 2020 11:28:55 +0700
|
||||
Subject: Revert "patch for close application"
|
||||
|
||||
This reverts commit 105fa61987862795f54f4aab30bf4c35362b30a2.
|
||||
|
||||
diff --git a/mainwindow.cpp b/mainwindow.cpp
|
||||
index 90a0259..313724c 100644
|
||||
--- a/mainwindow.cpp
|
||||
+++ b/mainwindow.cpp
|
||||
@@ -2381,7 +2381,6 @@ void MainWindow::on_actionQuit_triggered()
|
||||
trayIcon->hide();
|
||||
|
||||
this->close();
|
||||
- qApp->quit();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionStopMedia_triggered()
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From e2e4ac052520b283bf00a644f6b8a6c72db64d50 Mon Sep 17 00:00:00 2001
|
||||
From: mazbrili <mazbrili@yahoo.com>
|
||||
Date: Sat, 2 May 2020 11:30:02 +0700
|
||||
Subject: ugly fix for closing app
|
||||
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index fb68394..a137d86 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -32,7 +32,11 @@
|
||||
#include <QSettings>
|
||||
#include <QTranslator>
|
||||
#include <QLibraryInfo>
|
||||
-
|
||||
+#ifdef __HAIKU__
|
||||
+#include <unistd.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <signal.h>
|
||||
+#endif
|
||||
|
||||
static void associateFileTypes()
|
||||
{
|
||||
@@ -212,6 +216,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
MainWindow w;
|
||||
w.show();
|
||||
-
|
||||
+ #ifdef __HAIKU__
|
||||
+ a.exec();
|
||||
+ kill(::getpid(),SIGKILL);
|
||||
+ return 0;
|
||||
+#elif
|
||||
return a.exec();
|
||||
+#endif
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From de9a83795c2b18d40ead05059f4a330183802dd0 Mon Sep 17 00:00:00 2001
|
||||
From: mazbrili <mazbrili@yahoo.com>
|
||||
Date: Mon, 4 May 2020 10:51:36 +0700
|
||||
Subject: fix for mediakit not closed
|
||||
|
||||
|
||||
diff --git a/mainwindow.cpp b/mainwindow.cpp
|
||||
index 313724c..d1b170a 100644
|
||||
--- a/mainwindow.cpp
|
||||
+++ b/mainwindow.cpp
|
||||
@@ -41,6 +41,7 @@
|
||||
#include <QTextCodec>
|
||||
#include <QDirIterator>
|
||||
#include <math.h> /* fmod */
|
||||
+#include <QStandardPaths>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) :
|
||||
QMainWindow(parent),
|
||||
@@ -207,7 +208,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
||||
//
|
||||
qDebug()<<"closing quit";
|
||||
delete ui;
|
||||
- // delete mPlayer;
|
||||
+ delete mPlayer;
|
||||
// qApp->quit();
|
||||
|
||||
e->accept();
|
||||
@@ -215,8 +216,7 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
-
|
||||
-}
|
||||
+ QTimer::singleShot(0,qApp,&QCoreApplication::quit);}
|
||||
|
||||
void MainWindow::setupToolbarIcons()
|
||||
{
|
||||
diff --git a/playermultimedia.cpp b/playermultimedia.cpp
|
||||
index d2f6c59..74733f3 100644
|
||||
--- a/playermultimedia.cpp
|
||||
+++ b/playermultimedia.cpp
|
||||
@@ -101,7 +101,13 @@ controlLayout->setSpacing(2);
|
||||
|
||||
PlayerMultimedia::~PlayerMultimedia()
|
||||
{
|
||||
+ qDebug() << "Begin destroy mediaplayer";
|
||||
+ if (mediaPlayer) {
|
||||
+ mediaPlayer->stop();
|
||||
+ delete mediaPlayer;
|
||||
+ }
|
||||
deleteLater();
|
||||
+ qDebug() << "end destroy mediaplayer";
|
||||
}
|
||||
|
||||
void PlayerMultimedia::play(QMediaContent url,bool besmala)
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From eb5f6cfbeea1a829d90d570b2de5da7135cd1fa1 Mon Sep 17 00:00:00 2001
|
||||
From: mazbrili <mazbrili@yahoo.com>
|
||||
Date: Mon, 4 May 2020 13:54:24 +0700
|
||||
Subject: adjust path as haiku requirement
|
||||
|
||||
|
||||
diff --git a/mainwindow.cpp b/mainwindow.cpp
|
||||
index d1b170a..49178c4 100644
|
||||
--- a/mainwindow.cpp
|
||||
+++ b/mainwindow.cpp
|
||||
@@ -180,7 +180,11 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
||||
close();
|
||||
qDebug()<<"closing";
|
||||
mPlayer->stop();
|
||||
- QFile fileReciter(QDir::homePath()+"/.elforkane/reciterInfo");
|
||||
+ #ifdef __HAIKU__
|
||||
+ QFile fileReciter(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/reciterInfo");
|
||||
+ #elif
|
||||
+ QFile fileReciter(QDir::homePath()+"/.elforkane/reciterInfo");
|
||||
+ #endif
|
||||
if (!fileReciter.open(QFile::WriteOnly)){
|
||||
// return ;
|
||||
}
|
||||
@@ -577,7 +581,12 @@ void MainWindow::chargeDataTools()
|
||||
}
|
||||
file.close();
|
||||
//تحميل بيانات المقرئين------------------------------------------------------------
|
||||
- file.setFileName(QDir::homePath()+"/.elforkane/reciterInfo");
|
||||
+ #ifdef __HAIKU__
|
||||
+ qDebug() << "base lokasi"+ QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||
+ file.setFileName(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/reciterInfo");
|
||||
+ #elif
|
||||
+ file.setFileName(QDir::homePath()+"/.elforkane/reciterInfo");
|
||||
+ #endif
|
||||
if(!file.exists())
|
||||
file.setFileName(m_appPath+"/.elforkane/reciterInfo");
|
||||
|
||||
@@ -781,8 +790,11 @@ bool MainWindow::eventFilter(QObject *obj, QEvent *event)
|
||||
//begen---------------save and load settings--------------------
|
||||
void MainWindow::loadSetting()
|
||||
{
|
||||
- QSettings settings(QDir::homePath()+"/.elforkane/setting.ini",QSettings::IniFormat);
|
||||
-
|
||||
+ #ifdef __HAIKU__
|
||||
+ QSettings settings(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/setting.ini",QSettings::IniFormat);
|
||||
+ #elif
|
||||
+ QSettings settings(QDir::homePath()+"/.elforkane/setting.ini",QSettings::IniFormat);
|
||||
+ #endif
|
||||
settings.beginGroup("Main");
|
||||
m_id=settings.value("id",1).toInt();
|
||||
m_fitInView= settings.value("fitInView", false).toBool();
|
||||
@@ -845,8 +857,11 @@ void MainWindow::loadSetting()
|
||||
|
||||
void MainWindow::saveSetting()
|
||||
{
|
||||
- QSettings settings(QDir::homePath()+"/.elforkane/setting.ini",QSettings::IniFormat);
|
||||
-
|
||||
+ #ifdef __HAIKU__
|
||||
+ QSettings settings(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/setting.ini",QSettings::IniFormat);
|
||||
+ #elif
|
||||
+ QSettings settings(QDir::homePath()+"/.elforkane/setting.ini",QSettings::IniFormat);
|
||||
+ #endif
|
||||
settings.beginGroup("Main");
|
||||
settings.setValue("id", m_id);
|
||||
settings.setValue("fitInView", m_fitInView);
|
||||
@@ -2145,11 +2160,20 @@ mPlayer->clearList();
|
||||
if(QFile::exists(m_soundPath)){
|
||||
destFile=m_soundPath+"/";
|
||||
}else{
|
||||
- destFile=QDir::homePath()+"/.elforkane/"+m_soundPath+"/";
|
||||
- if(!QFile::exists(destFile)){
|
||||
+ #ifdef __HAIKU__
|
||||
+ destFile=(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/"+m_soundPath+"/");
|
||||
+ if(!QFile::exists(destFile)){
|
||||
+ QDir dir(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation));
|
||||
+ dir.mkpath(destFile);
|
||||
+ }
|
||||
+ #elif
|
||||
+ destFile=QDir::homePath()+"/.elforkane/"+m_soundPath+"/";
|
||||
+ if(!QFile::exists(destFile)){
|
||||
QDir dir(QDir::homePath()+"/.elforkane/");
|
||||
dir.mkpath(destFile);
|
||||
}
|
||||
+ #endif
|
||||
+
|
||||
}
|
||||
|
||||
QString fileurl(destFile+m_soundName+".mp3");
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From d97c09a505b0f8ad5dbde58e646502ce9b3c2140 Mon Sep 17 00:00:00 2001
|
||||
From: mazbrili <mazbrili@yahoo.com>
|
||||
Date: Tue, 5 May 2020 14:18:00 +0700
|
||||
Subject: update path location
|
||||
|
||||
|
||||
diff --git a/mainwindow.cpp b/mainwindow.cpp
|
||||
index 49178c4..9d99cc7 100644
|
||||
--- a/mainwindow.cpp
|
||||
+++ b/mainwindow.cpp
|
||||
@@ -583,12 +583,16 @@ void MainWindow::chargeDataTools()
|
||||
//تحميل بيانات المقرئين------------------------------------------------------------
|
||||
#ifdef __HAIKU__
|
||||
qDebug() << "base lokasi"+ QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||
+ qDebug() << "lokas m_appPath "+ m_appPath;
|
||||
file.setFileName(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/reciterInfo");
|
||||
+ if(!file.exists())
|
||||
+ file.setFileName(m_appPath+"/reciterInfo");
|
||||
#elif
|
||||
file.setFileName(QDir::homePath()+"/.elforkane/reciterInfo");
|
||||
- #endif
|
||||
- if(!file.exists())
|
||||
+ if(!file.exists())
|
||||
file.setFileName(m_appPath+"/.elforkane/reciterInfo");
|
||||
+ #endif
|
||||
+
|
||||
|
||||
if(file.open( QFile::ReadOnly)){
|
||||
|
||||
--
|
||||
2.24.0
|
||||
|
||||
|
||||
From 71c17ebbf1f0aadfae3c17b0c067932751e8e3e6 Mon Sep 17 00:00:00 2001
|
||||
From: mazbrili <mazbrili@yahoo.com>
|
||||
Date: Wed, 6 May 2020 08:39:09 +0700
|
||||
Subject: update patch location for setting.ini
|
||||
|
||||
|
||||
diff --git a/main.cpp b/main.cpp
|
||||
index a137d86..7c31bdf 100644
|
||||
--- a/main.cpp
|
||||
+++ b/main.cpp
|
||||
@@ -37,7 +37,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
-
|
||||
+#include <QStandardPaths>
|
||||
static void associateFileTypes()
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
@@ -92,16 +92,26 @@ int main(int argc, char *argv[])
|
||||
//-----------------------
|
||||
QDir dir;
|
||||
// QString h=dir.homePath();
|
||||
-
|
||||
- if (!dir.exists(QDir::homePath()+"/.elforkane")) //
|
||||
+ QFile file;
|
||||
+
|
||||
+ #ifdef __HAIKU__
|
||||
+
|
||||
+ if (!file.exists(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/reciterInfo")){
|
||||
+ file.copy(appPath+"/reciterInfo",QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/reciterInfo");
|
||||
+ }
|
||||
+ QSettings settings(QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation)+"/setting.ini",QSettings::IniFormat);
|
||||
+
|
||||
+ #elif
|
||||
+ if (!dir.exists(QDir::homePath()+"/.elforkane")) //
|
||||
{
|
||||
dir.mkdir( QDir::homePath()+"/.elforkane");
|
||||
}
|
||||
- QFile file;
|
||||
if (!file.exists(QDir::homePath()+"/.elforkane/reciterInfo")){
|
||||
file.copy(appPath+"/reciterInfo",QDir::homePath()+"/.elforkane/reciterInfo");
|
||||
}
|
||||
- QSettings settings(QDir::homePath()+"/.elforkane/setting.ini",QSettings::IniFormat);
|
||||
+ QSettings settings(QDir::homePath()+"/.elforkane/setting.ini",QSettings::IniFormat);
|
||||
+ #endif
|
||||
+
|
||||
settings.beginGroup("Main");
|
||||
QString lng=settings.value("lng","sys").toString();
|
||||
int m_locale= settings.value("locale",0).toInt();
|
||||
--
|
||||
2.24.0
|
||||
|
||||
Reference in New Issue
Block a user