Skip to content
This repository has been archived by the owner on Jul 21, 2019. It is now read-only.

Commit

Permalink
Updated the check for console version
Browse files Browse the repository at this point in the history
  • Loading branch information
teejee2008 committed Jul 28, 2018
1 parent 189130a commit c219efd
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
7 changes: 7 additions & 0 deletions debian/changelog
@@ -1,3 +1,10 @@
aptik-gtk (18.7) bionic; urgency=medium

* Updated for Aptik v18.7

-- Tony George <tony.george.kol@gmail.com> Sun, 29 Jul 2018 10:00:00 +0530


aptik-gtk (18.6) xenial; urgency=medium

* Packages: Added dropdown filter for package category
Expand Down
2 changes: 1 addition & 1 deletion debian/control
Expand Up @@ -10,7 +10,7 @@ Homepage: http://teejeetech.blogspot.in/

Package: aptik-gtk
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, apt, aptitude, apt-transport-https, pv
Depends: ${shlibs:Depends}, ${misc:Depends}, apt, aptitude, apt-transport-https, pv, dconf-cli
#Recommends:
Replaces: aptik
Description: System migration utility for Linux (GTK Frontend)
Expand Down
2 changes: 1 addition & 1 deletion release/sanity.config
@@ -1,5 +1,5 @@
app_name: Aptik GTK
depends_debian: libgee-0.8-2 libjson-glib-1.0-0 apt aptitude apt-transport-https pv
depends_debian: libgee-0.8-2 libjson-glib-1.0-0 apt aptitude apt-transport-https pv dconf-cli
depends_redhat: libgee json-glib pv
depends_arch: libgee json-glib pv
depends_generic: libgee json-glib pv
Expand Down
1 change: 1 addition & 0 deletions src/Gtk/AptikGtk.vala
Expand Up @@ -37,6 +37,7 @@ using TeeJee.GtkHelper;
public const string AppName = "Aptik GTK";
public const string AppShortName = "aptik-gtk";
public const string AppVersion = "18.6";
public const string AptikVersionRequired = "18.07.0";
public const string AppAuthor = "Tony George";
public const string AppAuthorEmail = "teejeetech@gmail.com";

Expand Down
27 changes: 19 additions & 8 deletions src/Gtk/MainWindow.vala
Expand Up @@ -172,17 +172,28 @@ public class MainWindow : Window {
}

string std_out, std_err;
exec_sync("aptik --version", out std_out, out std_err);
string aptik_version = std_out.strip();

if (AppVersion != aptik_version){
exec_sync("aptik --version-cli", out std_out, out std_err);
string aptik_cli_version = std_out.strip();

int version_required = int.parse(AptikVersionRequired.replace(".",""));

int version_found = 0;

if (aptik_cli_version.length > 0){
version_found = int.parse(aptik_cli_version.replace(".",""));
}
else{
aptik_cli_version = "Unknown";
}

if (version_required != version_found){

string txt = _("Version Mismatch");

string msg = "%s\n\n%s (v%s)\n\n%s (v%s)\n".printf(
_("GUI version does not match console version. Please install same version of 'aptik' and 'aptik-gtk' packages."),
_("aptik-gtk"), AppVersion,
_("aptik"), aptik_version
string msg = "%s\n\n%s: %s\n\n%s: %s\n".printf(
_("Please install the latest version of 'aptik'."),
_("Required"), AptikVersionRequired,
_("Found"), aptik_cli_version
);

gtk_messagebox(txt, msg, this, true);
Expand Down

0 comments on commit c219efd

Please sign in to comment.