Skip to content

Commit

Permalink
this commit marks the release point of version 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mhogomchungu committed Nov 9, 2024
1 parent b3ac657 commit 4a14d0a
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 80 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set_property( GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON )

project( sirikali )

set( PGR_VERSION "1.6.0" )
set( PGR_VERSION "1.7.0" )
set( COPYRIGHT_YEARS "2016-2024" )

file(WRITE ${PROJECT_BINARY_DIR}/VERSION_INFO "${PGR_VERSION}")
Expand Down
4 changes: 3 additions & 1 deletion changelog
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,10 @@ version 1.4.2(December 18,2019)
-- Add support for building with Qt6.
-- Add support for securefs version >= 1.0.0.

version 1.7.0(October 01, 2024)
version 1.7.0(November 09, 2024)
[WINDOWS]
-- Internally manage securefs and make it possible to update it from within the app.
[LINUX]
-- Internally manage gocryptfs and securefs and make it possible to update them from within the app.
[FLATPAK]
-- Bundle Cryfs along side Securefs and Gocryptfs.
2 changes: 1 addition & 1 deletion src/3rdParty/lxqt_wallet/frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ else()
message(STATUS "Checking for modules 'KF6Wallet'")
find_package(KF6Wallet QUIET)
if(KF6Wallet_FOUND )
message(STATUS " Found KF5Wallet, version ${KF6Wallet_VERSION}")
message(STATUS " Found KF6Wallet, version ${KF6Wallet_VERSION}")
file(APPEND ${PROJECT_BINARY_DIR}/storage_manager.h "\n#define HAS_KWALLET_SUPPORT 1\n")
SET(KWALLET_SUPPORT "true")
else()
Expand Down
82 changes: 13 additions & 69 deletions src/engines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,13 @@ static bool _has_no_extension( const QString& e )
template< typename Function >
static QString _executableFullPath( const QString& f,Function function )
{
if( utility::platformIsFlatPak() ){

auto m = settings::instance().flatpakIntance().globalBinPath() ;

return m + "/" + f ;
}

if( utility::platformIsWindows() ){

if( utility::startsWithDriveLetter( f ) ){
Expand Down Expand Up @@ -192,15 +199,10 @@ static QString _executableFullPath( const QString& f,Function function )

QString exe ;

auto list = function() ;
auto list = function() ;

list.prepend( engines::defaultBinPath() ) ;

if( utility::platformIsFlatPak() ){

list.removeAll( "/app/bin" ) ;
}

for( const auto& it : utility::asConst( list ) ){

if( !it.isEmpty() ){
Expand Down Expand Up @@ -1416,80 +1418,22 @@ engines::engine::exe_args engines::engine::unMountCommand( const engines::engine
}
}

struct flatpak_result
{
bool valid ;
bool src_newer ;
} ;

static flatpak_result _source_more_recent( const QString& src,const QString& dst )
{
#if QT_VERSION >= QT_VERSION_CHECK( 5,10,0 )

auto m = QFileInfo( src ).birthTime() ;

auto e = QFileInfo( dst ).birthTime() ;

if( m.isValid() && e.isValid() ){

return { true,m > e } ;
}else{
return { false,false } ;
}
#else
Q_UNUSED( src )
Q_UNUSED( dst )

return { false,false } ;
#endif
}

void engines::engine::setUpBinary( bool add,
QStringList& apps,
const QString& basePath,
const QString& exeName ) const
{
if( utility::platformIsFlatPak() ){

auto src = "/app/bin/" + exeName ;

if( QFile::exists( src ) ){

auto dst = basePath + exeName ;

if( !QFile::exists( dst ) ){

utility::copyFile( src,dst ) ;

}else if( settings::instance().flatpakUpdated() ){

auto m = _source_more_recent( src,dst ) ;
if( !utility::platformIsFlatPak() ){

if( m.valid ){
if( add && !QFile::exists( basePath + exeName ) ){

if( m.src_newer ){
auto m = exeName ;

QFile::remove( dst ) ;
m[ 0 ] = m[ 0 ].toUpper() ;

utility::copyFile( src,dst ) ;
}
}else{
QFile::remove( dst ) ;

utility::copyFile( src,dst ) ;
}
}
apps.append( m ) ;
}
}

if( add && !QFile::exists( basePath + exeName ) ){

auto m = exeName ;

m[ 0 ] = m[ 0 ].toUpper() ;

apps.append( m ) ;
}
}

void engines::engine::setUpBinary( bool,QStringList&,const QString& ) const
Expand Down
6 changes: 4 additions & 2 deletions src/engines/cryfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "options.h"
#include "custom.h"

#include "../settings.h"

static engines::engine::BaseOptions _setOptions()
{
engines::engine::BaseOptions s ;
Expand Down Expand Up @@ -74,7 +76,8 @@ static engines::engine::BaseOptions _setOptions()

auto exe = "flatpak-spawn" ;

auto m = engines::defaultBinPath() + "cryfs-unmount" ;
auto e = settings::instance().flatpakIntance().globalBinPath() ;
auto m = e + "/cryfs-unmount" ;

s.unMountCommand = QStringList{ exe,"--host",m,"--immediate","%{mountPoint}" } ;
}else{
Expand Down Expand Up @@ -116,7 +119,6 @@ bool cryfs::updatable() const

void cryfs::setUpBinary( bool add,QStringList& apps,const QString& basePath ) const
{
return ; //enable when version 1.0.0 is officially out
engines::engine::setUpBinary( add,apps,basePath,"cryfs" ) ;
engines::engine::setUpBinary( false,apps,basePath,"cryfs-unmount" ) ;
}
Expand Down
6 changes: 5 additions & 1 deletion src/engines/gocryptfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ static bool _set_if_found( const Function& function )

bool gocryptfs::updatable() const
{
if( utility::canDownload() ){
if( utility::platformIsFlatPak() ){

return false ;

}else if( utility::canDownload() ){

return utility::platformIsLinux() ;
}else{
Expand Down
6 changes: 5 additions & 1 deletion src/engines/securefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@ securefs::securefs() :

bool securefs::updatable() const
{
if( utility::canDownload() ){
if( utility::platformIsFlatPak() ){

return false ;

}else if( utility::canDownload() ){

return utility::platformIsLinux() || utility::platformIsWindows() ;
}else{
Expand Down
6 changes: 3 additions & 3 deletions src/flatpak/io.github.mhogomchungu.sirikali.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@
"sources" : [
{
"type" : "archive",
"url" : "https://github.com/cryfs/cryfs/archive/refs/tags/1.0.0-rc1.tar.gz",
"sha256" : "79b4d665dd4fed2e4a380930e5c4d8ff458ef803881051cde193743d88168164"
"url" : "https://github.com/cryfs/cryfs/archive/refs/tags/1.0.0.tar.gz",
"sha256" : "8211c1637c2f8c419534c16c207efeae0d506abe9d8c7c0f44003e16a87d80a2"
},
{
"type" : "patch",
Expand Down Expand Up @@ -389,7 +389,7 @@
},
{
"name" : "io.github.mhogomchungu.sirikali",
"buildsystem" : "cmake-ninja",
"buildsystem" : "cmake",
"config-opts" : [
"-DCMAKE_BUILD_TYPE=release",
"-DBUILD_FLATPAK=TRUE"
Expand Down
11 changes: 10 additions & 1 deletion src/flatpak/io.github.mhogomchungu.sirikali.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<name>Francis Banyikwa</name>
</developer>

<description><p>This application makes it easy to use Gocryptfs, Securefs and Cryfs to store documents in secured folders.</p><p>Securefs and Gocryptfs are bundled with the application and users who prefer to use Cryfs should manually install it first at "~/.var/app/io.github.mhogomchungu.sirikali/data/SiriKali/bin" folder.</p></description>
<description><p>This application makes it easy to use Gocryptfs, Securefs and Cryfs to store documents in secured folders.</p><p>All three tools are bundled with the application</p></description>

<launchable type="desktop-id">io.github.mhogomchungu.sirikali.desktop</launchable>

Expand All @@ -36,6 +36,15 @@
</categories>

<releases>
<release version="1.7.0." type="stable" date="2024-11-09" >
<url type="details">https://github.com/mhogomchungu/sirikali/releases/download/$version/sirikali-$version.tar.xz/</url>
<description>
<p>Changelog</p>
<ul>
<li>Bundle Cryfs along side Securefs and Gocryptfs</li>
</ul>
</description>
</release>
<release version="1.6.0.5" type="stable" date="2024-10-05" >
<url type="details">https://github.com/mhogomchungu/sirikali/releases/download/$version/sirikali-$version.tar.xz/</url>
<description>
Expand Down

0 comments on commit 4a14d0a

Please sign in to comment.