From 586a7c3883cba30ffaba2a9b0f6e29f2153e99bc Mon Sep 17 00:00:00 2001 From: dolik Date: Sat, 26 Mar 2011 22:42:02 +0000 Subject: [PATCH] theide: SrcUpdater persistant timer, LLOGs git-svn-id: svn://ultimatepp.org/upp/trunk@3312 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/AutoSetup.cpp | 1 + uppsrc/ide/SrcUpdater/Install.cpp | 9 +++--- uppsrc/ide/SrcUpdater/LocalSync.cpp | 2 -- uppsrc/ide/SrcUpdater/SrcUpdater.h | 2 ++ uppsrc/ide/SrcUpdater/Updater.cpp | 44 ++++++++++++++++------------- uppsrc/ide/Update.cpp | 13 +++++++-- uppsrc/ide/ide.h | 1 + uppsrc/ide/idewin.cpp | 7 +++-- 8 files changed, 48 insertions(+), 31 deletions(-) diff --git a/uppsrc/ide/AutoSetup.cpp b/uppsrc/ide/AutoSetup.cpp index 5bd71615d..13a6a8974 100644 --- a/uppsrc/ide/AutoSetup.cpp +++ b/uppsrc/ide/AutoSetup.cpp @@ -523,6 +523,7 @@ void AutoSetup() void AutoSetup() { InstallWizard iw; + iw.Title("TheIDE - Source management settings"); iw.Block(0); iw.Block(4); iw.SetStep(1); diff --git a/uppsrc/ide/SrcUpdater/Install.cpp b/uppsrc/ide/SrcUpdater/Install.cpp index fdaf8fbb6..d33364f1a 100644 --- a/uppsrc/ide/SrcUpdater/Install.cpp +++ b/uppsrc/ide/SrcUpdater/Install.cpp @@ -1,8 +1,8 @@ #include "SrcUpdater.h" -//#define IMAGECLASS IdeImg -//#define IMAGEFILE -//#include +#define IMAGECLASS IdeImg +#define IMAGEFILE +#include bool CopyFolder(const char *dst, const char *src, Progress *pi); bool LoadVarFile(const char *name, VectorMap& _var); @@ -15,7 +15,7 @@ bool HasSvn(){ InstallWizard::InstallWizard(){ Title("TheIDE - Initial setting wizard"); Sizeable(); - //Icon(IdeImg::Package(), IdeImg::PackageLarge()); + Icon(IdeImg::Package(), IdeImg::PackageLarge()); s0.text<<="[ [ [/ Welcome to TheIDE !]&][ &][ [1 This short wizard dialogue will help you to set up everything you need to get a full working Integrated Development Environment. Clicking ][/1 Finish][1 at any time will save the values to your hard disk (using default values for unfilled fields), while ][/1 Cancel][1 leaves this wizard without doing anything.]]"; s1.text<<="[ [ [/ Source code handling methods]&][ &][ [1 There is several ways how to access the U`+`+ source codes. Choose the method that best suits your needs. You can always change the settings later if necessary.]]"; @@ -347,6 +347,7 @@ void InstallWizard::Perform(){ DeleteFile(deleted[i]); } } + StoreAsXMLFile(UpdaterCfg(),"SourceUpdater",ConfigFile("updates.xml")); } void Uninstall(){ diff --git a/uppsrc/ide/SrcUpdater/LocalSync.cpp b/uppsrc/ide/SrcUpdater/LocalSync.cpp index 39cb8150f..62339afa5 100644 --- a/uppsrc/ide/SrcUpdater/LocalSync.cpp +++ b/uppsrc/ide/SrcUpdater/LocalSync.cpp @@ -2,7 +2,6 @@ using namespace Upp; LocalSync::LocalSync(const VectorMap& changed,const String& localsrc):localsrc(localsrc){ - LOG("constructor0"); CtrlLayoutOKCancel(*this, "Synchronize local sources"); list.AddIndex(); list.AddColumn("Action"); @@ -89,7 +88,6 @@ void LocalSync::Populate(VectorMap changed){ return; } for(int i = 0; i < changed.GetCount(); i++){ - LOG("populate "< -#include +#define LLOG(x) //RLOG(x) +#define LDUMP(x) //RDUMP(x) -//bool IsUbuntu(){ -// return Sys("lsb_release -si").StartsWith("Ubuntu"); -//} - -//String GetDebVersion(){ -// return Sys("dpkg-query --showformat ${Version} --show theide"); -//} +//#define IMAGECLASS IdeImg +//#define IMAGEFILE +//#include void LoadUpdaterCfg(){ String cfg=ConfigFile("updates.xml"); @@ -20,6 +15,7 @@ void LoadUpdaterCfg(){ UpdaterCfg().method=0; UpdaterCfg().sync=0; UpdaterCfg().period=0; + UpdaterCfg().last=Null; UpdaterCfg().ignored=0; UpdaterCfg().localsrc=GetHomeDirFile("upp"); UpdaterCfg().svnserver="http://upp-mirror.googlecode.com/svn/trunk/"; @@ -40,6 +36,7 @@ String GetSrcVersion(const char* dir,String& error){ ver=ver.Mid(ver.Find('"')+1); ver=ver.Left(ver.Find('"')); } + LLOG("GetSrcVersion("<