From 593efa703b6914f963533da513576a26e744ead9 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 15 Jun 2012 21:37:48 +0200 Subject: LOTS of fixes to the VS solution --- win32/installer/xchat-wdk-x64.skel.iss | 279 +++++++++++++++++++++++++++++++++ 1 file changed, 279 insertions(+) create mode 100644 win32/installer/xchat-wdk-x64.skel.iss (limited to 'win32/installer/xchat-wdk-x64.skel.iss') diff --git a/win32/installer/xchat-wdk-x64.skel.iss b/win32/installer/xchat-wdk-x64.skel.iss new file mode 100644 index 00000000..e0a804db --- /dev/null +++ b/win32/installer/xchat-wdk-x64.skel.iss @@ -0,0 +1,279 @@ +AppName=XChat-WDK (x64) +AppPublisher=XChat-WDK +AppPublisherURL=http://www.xchat-wdk.org/ +AppCopyright=Copyright (C) 1998-2010 Peter Zelezny +AppSupportURL=http://code.google.com/p/xchat-wdk/issues/list +AppUpdatesURL=http://www.xchat-wdk.org/home/downloads +LicenseFile=COPYING +UninstallDisplayIcon={app}\xchat.exe +UninstallDisplayName=XChat-WDK (x64) +DefaultDirName={pf}\XChat-WDK +DefaultGroupName=XChat-WDK +DisableProgramGroupPage=yes +SolidCompression=yes +SourceDir=..\..\rel +OutputDir=..\.. +FlatComponentsList=no +PrivilegesRequired=none +ShowComponentSizes=no +CreateUninstallRegKey=not IsTaskSelected('portable') +Uninstallable=not IsTaskSelected('portable') +ArchitecturesAllowed=x64 +ArchitecturesInstallIn64BitMode=x64 + +[Types] +Name: "normal"; Description: "Normal Installation" +Name: "full"; Description: "Full Installation" +Name: "minimal"; Description: "Minimal Installation" +Name: "custom"; Description: "Custom Installation"; Flags: iscustom + +[Components] +Name: "libs"; Description: "XChat-WDK"; Types: normal full minimal custom; Flags: fixed +Name: "xctext"; Description: "XChat-Text"; Types: full custom; Flags: disablenouninstallwarning +Name: "translations"; Description: "Translations"; Types: normal full custom; Flags: disablenouninstallwarning +;obs Name: "gtkengines"; Description: "GTK+ Engines"; Types: full custom; Flags: disablenouninstallwarning +;Name: "spelling"; Description: "Spelling Dictionaries"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins"; Description: "Plugins"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\checksum"; Description: "Checksum"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\dns"; Description: "DNS"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\doat"; Description: "Do At"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\exec"; Description: "Exec"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\fishlim"; Description: "FiSHLiM"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\mpcinfo"; Description: "mpcInfo"; Types: full custom; Flags: disablenouninstallwarning +;Name: "plugins\nonbmp"; Description: "Non-BMP"; Types: normal full custom; Flags: disablenouninstallwarning +Name: "plugins\upd"; Description: "Update Checker"; Types: normal full custom; Flags: disablenouninstallwarning +Name: "plugins\winamp"; Description: "Winamp"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\winsys"; Description: "WinSys"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\wmpa"; Description: "Windows Media Player Announcer"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xsasl"; Description: "X-SASL"; Types: full custom; Flags: disablenouninstallwarning +Name: "plugins\xtray"; Description: "X-Tray"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs"; Description: "Language Interfaces"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\lua"; Description: "Lua"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\lua\luawdk"; Description: "Lua-WDK"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\perl"; Description: "Perl"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\python"; Description: "Python"; Types: full custom; Flags: disablenouninstallwarning +Name: "langs\tcl"; Description: "Tcl"; Types: full custom; Flags: disablenouninstallwarning + +[Tasks] +Name: portable; Description: "Yes"; GroupDescription: "Portable Install (no Registry entries, no Start Menu icons, no uninstaller):"; Flags: unchecked + +Name: perl512; Description: "5.12"; GroupDescription: "Perl version:"; Flags: exclusive; Components: langs\perl +Name: perl514; Description: "5.14"; GroupDescription: "Perl version:"; Flags: exclusive unchecked; Components: langs\perl + +[Registry] +Root: HKCR; Subkey: "irc"; ValueType: none; ValueName: ""; ValueData: ""; Flags: deletekey uninsdeletekey; Tasks: not portable +Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: ""; ValueData: "URL:IRC Protocol"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc"; ValueType: string; ValueName: "URL Protocol"; ValueData: ""; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe,0"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\shell"; ValueType: string; ValueName: ""; ValueData: "open"; Flags: uninsdeletevalue; Tasks: not portable +Root: HKCR; Subkey: "irc\shell\open\command"; ValueType: string; ValueName: ""; ValueData: "{app}\xchat.exe --url=""%1"""; Flags: uninsdeletevalue; Tasks: not portable + +[Run] +Filename: "{app}\xchat.exe"; Description: "Run XChat-WDK after closing the Wizard"; Flags: nowait postinstall skipifsilent + +[Files] +; Add the ISSkin DLL used for skinning Inno Setup installations. +Source: ISSkinU.dll; DestDir: {app}; Flags: dontcopy + +; Add the Visual Style resource contains resources used for skinning, +; you can also use Microsoft Visual Styles (*.msstyles) resources. +Source: watercolorlite-blue.cjstyles; DestDir: {tmp}; Flags: dontcopy + +Source: "portable-mode"; DestDir: "{app}"; Tasks: portable + +Source: "cert.pem"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "COPYING"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.OPENSSL"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.ZLIB"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.GTK"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.CAIRO"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.LUA"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.ENCHANT"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "LICENSE.LIBXML"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs +;Source: "etc\gtk-2.0\gtkrc"; DestDir: "{app}\etc\gtk-2.0"; Flags: ignoreversion; Components: libs and not gtkengines +Source: "share\xml\*"; DestDir: "{app}\share\xml"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: libs +Source: "locale\*"; DestDir: "{app}\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations +Source: "share\locale\*"; DestDir: "{app}\share\locale"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: translations +;Source: "share\myspell\*"; DestDir: "{app}\share\myspell"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: spelling + +Source: "libatk-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libcairo-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libexpat-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libffi-5.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libfreetype-6.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libfontconfig-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgdk_pixbuf-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgdk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgio-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libglib-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgmodule-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgobject-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libgtk-win32-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libintl-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libjasper-1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libjpeg-8.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libpixman-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libtiff-3.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libpng14-14.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libpng15-15.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "lua51.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libxml2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +;obs Source: "libxml2-2.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs + +Source: "lib\enchant\libenchant_myspell.dll"; DestDir: "{app}\lib\enchant"; Flags: ignoreversion; Components: libs + +Source: "lib\gtk-2.0\2.10.0\engines\libpixmap.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs +Source: "lib\gtk-2.0\2.10.0\engines\libwimp.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: libs +Source: "lib\gtk-2.0\modules\libgail.dll"; DestDir: "{app}\lib\gtk-2.0\modules"; Flags: ignoreversion; Components: libs + +;obs Source: "etc\gtkpref.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libclearlooks.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libcrux-engine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libglide.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libhcengine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libindustrial.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmist.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libmurrine.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libredmond95.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "lib\gtk-2.0\2.10.0\engines\libthinice.dll"; DestDir: "{app}\lib\gtk-2.0\2.10.0\engines"; Flags: ignoreversion; Components: gtkengines +;obs Source: "plugins\xcgtkpref.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: gtkengines +;obs Source: "share\themes\*"; DestDir: "{app}\share\themes"; Flags: ignoreversion createallsubdirs recursesubdirs; Components: gtkengines +;obs Source: "gtk2-prefs.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: gtkengines + +Source: "plugins\xcchecksum.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\checksum +Source: "plugins\xcdns.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\dns +Source: "plugins\xcdoat.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\doat +Source: "plugins\xcexec.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\exec +Source: "plugins\xcfishlim.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\fishlim +Source: "etc\music.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winamp or plugins\mpcinfo +Source: "plugins\xcmpcinfo.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\mpcinfo +;Source: "plugins\xcnonbmp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\nonbmp +Source: "etc\download.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\upd +Source: "plugins\xcupd.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\upd +Source: "plugins\xcwinamp.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winamp +Source: "etc\system.png"; DestDir: "{app}\etc"; Flags: ignoreversion; Components: plugins\winsys +Source: "plugins\xcwinsys.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\winsys +Source: "plugins\xcxsasl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xsasl +Source: "plugins\xtray.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\xtray +Source: "plugins\xcwmpa.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: plugins\wmpa + +Source: "plugins\xclua.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\lua +Source: "plugins\xcpython.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python +Source: "plugins\xctcl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\tcl + +Source: "plugins\xcperl-512.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl512 +Source: "plugins\xcperl-514.dll"; DestDir: "{app}\plugins"; DestName: "xcperl.dll"; Flags: ignoreversion; Components: langs\perl; Tasks: perl514 + +Source: "xchat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs +Source: "xchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xctext + +[Icons] +Name: "{group}\XChat-WDK (x64)"; Filename: "{app}\xchat.exe"; Tasks: not portable +Name: "{group}\XChat-Text (x64)"; Filename: "{app}\xchat-text.exe"; Components: xctext; Tasks: not portable +Name: "{group}\Uninstall XChat-WDK (x64)"; Filename: "{uninstallexe}"; Tasks: not portable + +[Messages] +BeveledLabel= XChat-WDK + +[Code] +///////////////////////////////////////////////////////////////////// +// these are required for x86->x64 or reverse upgrades +///////////////////////////////////////////////////////////////////// +function GetUninstallString(): String; +var + sUnInstPath: String; + sUnInstallString: String; +begin + sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\XChat-WDK (x64)_is1'); + sUnInstallString := ''; + if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then + RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString); + Result := sUnInstallString; +end; + + +///////////////////////////////////////////////////////////////////// +function IsUpgrade(): Boolean; +begin + Result := (GetUninstallString() <> ''); +end; + + +///////////////////////////////////////////////////////////////////// +function UnInstallOldVersion(): Integer; +var + sUnInstallString: String; + iResultCode: Integer; +begin +// Return Values: +// 1 - uninstall string is empty +// 2 - error executing the UnInstallString +// 3 - successfully executed the UnInstallString + + // default return value + Result := 0; + + // get the uninstall string of the old app + sUnInstallString := GetUninstallString(); + if sUnInstallString <> '' then begin + sUnInstallString := RemoveQuotes(sUnInstallString); + if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then + Result := 3 + else + Result := 2; + end else + Result := 1; +end; + +///////////////////////////////////////////////////////////////////// +procedure CurStepChanged(CurStep: TSetupStep); +begin + if not (IsTaskSelected('portable')) then + begin + if (CurStep=ssInstall) then + begin + if (IsUpgrade()) then + begin + UnInstallOldVersion(); + end; + end; + end; +end; + +///////////////////////////////////////////////////////////////////// +// Importing LoadSkin API from ISSkin.DLL +procedure LoadSkin(lpszPath: String; lpszIniFileName: String); +external 'LoadSkin@files:isskinu.dll stdcall'; + +// Importing UnloadSkin API from ISSkin.DLL +procedure UnloadSkin(); +external 'UnloadSkin@files:isskinu.dll stdcall'; + +// Importing ShowWindow Windows API from User32.DLL +function ShowWindow(hWnd: Integer; uType: Integer): Integer; +external 'ShowWindow@user32.dll stdcall'; + +function InitializeSetup(): Boolean; +begin + ExtractTemporaryFile('watercolorlite-blue.cjstyles'); + LoadSkin(ExpandConstant('{tmp}\watercolorlite-blue.cjstyles'), ''); + Result := True; +end; + +procedure DeinitializeSetup(); +begin + // Hide Window before unloading skin so user does not get + // a glimpse of an unskinned window before it is closed. + ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0); + UnloadSkin(); +end; -- cgit 1.4.1 From 28c8cf042bf12663d3bc4a77623195afed13e8c0 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 15 Jun 2012 22:09:30 +0200 Subject: Update paths for x64 installer too --- win32/installer/xchat-wdk-x64.skel.iss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win32/installer/xchat-wdk-x64.skel.iss') diff --git a/win32/installer/xchat-wdk-x64.skel.iss b/win32/installer/xchat-wdk-x64.skel.iss index e0a804db..915d6607 100644 --- a/win32/installer/xchat-wdk-x64.skel.iss +++ b/win32/installer/xchat-wdk-x64.skel.iss @@ -11,8 +11,8 @@ DefaultDirName={pf}\XChat-WDK DefaultGroupName=XChat-WDK DisableProgramGroupPage=yes SolidCompression=yes -SourceDir=..\..\rel -OutputDir=..\.. +SourceDir=..\rel +OutputDir=.. FlatComponentsList=no PrivilegesRequired=none ShowComponentSizes=no -- cgit 1.4.1 From 6bca080d93e73132a7d41977687bffc476cff697 Mon Sep 17 00:00:00 2001 From: Patrick Griffs Date: Sun, 17 Jun 2012 05:45:08 +0200 Subject: Add XChat Theme Manager (TingPing) --- .gitignore | 1 + src/xtm/Main.Designer.cs | 302 +++++++++++++++++++++++++++++++ src/xtm/Main.cs | 269 +++++++++++++++++++++++++++ src/xtm/Main.resx | 287 +++++++++++++++++++++++++++++ src/xtm/Program.cs | 21 +++ src/xtm/Properties/AssemblyInfo.cs | 38 ++++ src/xtm/Properties/Resources.Designer.cs | 63 +++++++ src/xtm/Properties/Resources.resources | Bin 0 -> 180 bytes src/xtm/Properties/Resources.resx | 120 ++++++++++++ src/xtm/Properties/Settings.Designer.cs | 26 +++ src/xtm/Properties/Settings.settings | 7 + src/xtm/README.md | 7 + src/xtm/Resources/xchat.ico | Bin 0 -> 9662 bytes src/xtm/app.config | 3 + src/xtm/xtm.csproj | 163 +++++++++++++++++ win32/copy/copy.vcxproj | 2 + win32/installer/xchat-wdk-x64.skel.iss | 3 + win32/installer/xchat-wdk-x86.skel.iss | 3 + win32/xchat.sln | 7 + 19 files changed, 1322 insertions(+) create mode 100644 src/xtm/Main.Designer.cs create mode 100644 src/xtm/Main.cs create mode 100644 src/xtm/Main.resx create mode 100644 src/xtm/Program.cs create mode 100644 src/xtm/Properties/AssemblyInfo.cs create mode 100644 src/xtm/Properties/Resources.Designer.cs create mode 100644 src/xtm/Properties/Resources.resources create mode 100644 src/xtm/Properties/Resources.resx create mode 100644 src/xtm/Properties/Settings.Designer.cs create mode 100644 src/xtm/Properties/Settings.settings create mode 100644 src/xtm/README.md create mode 100644 src/xtm/Resources/xchat.ico create mode 100644 src/xtm/app.config create mode 100644 src/xtm/xtm.csproj (limited to 'win32/installer/xchat-wdk-x64.skel.iss') diff --git a/.gitignore b/.gitignore index 86b4fbc2..f1e9c0a1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ plugins/wmpa/wmpa_h.h plugins/wmpa/wmpa_i.c src/pixmaps/inline_pngs.h +src/xtm/obj/* win32/build/* win32/ipch/* win32/xchat.opensdf diff --git a/src/xtm/Main.Designer.cs b/src/xtm/Main.Designer.cs new file mode 100644 index 00000000..16d4ebcc --- /dev/null +++ b/src/xtm/Main.Designer.cs @@ -0,0 +1,302 @@ +namespace thememan +{ + partial class XTM + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XTM)); + this.themelist = new System.Windows.Forms.ListBox(); + this.themecolor0 = new System.Windows.Forms.Label(); + this.themecolor1 = new System.Windows.Forms.Label(); + this.themecolor2 = new System.Windows.Forms.Label(); + this.themecolor3 = new System.Windows.Forms.Label(); + this.themecolor4 = new System.Windows.Forms.Label(); + this.themecolor5 = new System.Windows.Forms.Label(); + this.themecolor6 = new System.Windows.Forms.Label(); + this.themecolor7 = new System.Windows.Forms.Label(); + this.themecolor8 = new System.Windows.Forms.Label(); + this.themecolor9 = new System.Windows.Forms.Label(); + this.themecolora = new System.Windows.Forms.Label(); + this.themecolorb = new System.Windows.Forms.Label(); + this.themecolorc = new System.Windows.Forms.Label(); + this.themecolord = new System.Windows.Forms.Label(); + this.themecolore = new System.Windows.Forms.Label(); + this.themecolorf = new System.Windows.Forms.Label(); + this.themecolorfg = new System.Windows.Forms.Label(); + this.themecolortextbg = new System.Windows.Forms.Label(); + this.importbutton = new System.Windows.Forms.Button(); + this.applybutton = new System.Windows.Forms.Button(); + this.themecolorfgmarked = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // themelist + // + this.themelist.FormattingEnabled = true; + this.themelist.Location = new System.Drawing.Point(12, 12); + this.themelist.Name = "themelist"; + this.themelist.Size = new System.Drawing.Size(154, 199); + this.themelist.TabIndex = 0; + this.themelist.SelectedIndexChanged += new System.EventHandler(this.theme_selected); + // + // themecolor0 + // + this.themecolor0.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor0.Location = new System.Drawing.Point(189, 36); + this.themecolor0.Name = "themecolor0"; + this.themecolor0.Size = new System.Drawing.Size(40, 40); + this.themecolor0.TabIndex = 6; + // + // themecolor1 + // + this.themecolor1.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor1.Location = new System.Drawing.Point(239, 36); + this.themecolor1.Name = "themecolor1"; + this.themecolor1.Size = new System.Drawing.Size(40, 40); + this.themecolor1.TabIndex = 10; + // + // themecolor2 + // + this.themecolor2.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor2.Location = new System.Drawing.Point(289, 36); + this.themecolor2.Name = "themecolor2"; + this.themecolor2.Size = new System.Drawing.Size(40, 40); + this.themecolor2.TabIndex = 14; + // + // themecolor3 + // + this.themecolor3.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor3.Location = new System.Drawing.Point(339, 36); + this.themecolor3.Name = "themecolor3"; + this.themecolor3.Size = new System.Drawing.Size(40, 40); + this.themecolor3.TabIndex = 18; + // + // themecolor4 + // + this.themecolor4.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor4.Location = new System.Drawing.Point(189, 87); + this.themecolor4.Name = "themecolor4"; + this.themecolor4.Size = new System.Drawing.Size(40, 40); + this.themecolor4.TabIndex = 4; + // + // themecolor5 + // + this.themecolor5.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor5.Location = new System.Drawing.Point(239, 87); + this.themecolor5.Name = "themecolor5"; + this.themecolor5.Size = new System.Drawing.Size(40, 40); + this.themecolor5.TabIndex = 8; + // + // themecolor6 + // + this.themecolor6.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor6.Location = new System.Drawing.Point(289, 87); + this.themecolor6.Name = "themecolor6"; + this.themecolor6.Size = new System.Drawing.Size(40, 40); + this.themecolor6.TabIndex = 12; + // + // themecolor7 + // + this.themecolor7.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor7.Location = new System.Drawing.Point(339, 87); + this.themecolor7.Name = "themecolor7"; + this.themecolor7.Size = new System.Drawing.Size(40, 40); + this.themecolor7.TabIndex = 16; + // + // themecolor8 + // + this.themecolor8.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor8.Location = new System.Drawing.Point(189, 138); + this.themecolor8.Name = "themecolor8"; + this.themecolor8.Size = new System.Drawing.Size(40, 40); + this.themecolor8.TabIndex = 5; + // + // themecolor9 + // + this.themecolor9.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolor9.Location = new System.Drawing.Point(239, 138); + this.themecolor9.Name = "themecolor9"; + this.themecolor9.Size = new System.Drawing.Size(40, 40); + this.themecolor9.TabIndex = 9; + // + // themecolora + // + this.themecolora.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolora.Location = new System.Drawing.Point(289, 138); + this.themecolora.Name = "themecolora"; + this.themecolora.Size = new System.Drawing.Size(40, 40); + this.themecolora.TabIndex = 13; + // + // themecolorb + // + this.themecolorb.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolorb.Location = new System.Drawing.Point(339, 138); + this.themecolorb.Name = "themecolorb"; + this.themecolorb.Size = new System.Drawing.Size(40, 40); + this.themecolorb.TabIndex = 17; + // + // themecolorc + // + this.themecolorc.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolorc.Location = new System.Drawing.Point(189, 189); + this.themecolorc.Name = "themecolorc"; + this.themecolorc.Size = new System.Drawing.Size(40, 40); + this.themecolorc.TabIndex = 7; + // + // themecolord + // + this.themecolord.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolord.Location = new System.Drawing.Point(239, 189); + this.themecolord.Name = "themecolord"; + this.themecolord.Size = new System.Drawing.Size(40, 40); + this.themecolord.TabIndex = 11; + // + // themecolore + // + this.themecolore.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolore.Location = new System.Drawing.Point(289, 189); + this.themecolore.Name = "themecolore"; + this.themecolore.Size = new System.Drawing.Size(40, 40); + this.themecolore.TabIndex = 15; + // + // themecolorf + // + this.themecolorf.BackColor = System.Drawing.SystemColors.HotTrack; + this.themecolorf.Location = new System.Drawing.Point(339, 189); + this.themecolorf.Name = "themecolorf"; + this.themecolorf.Size = new System.Drawing.Size(40, 40); + this.themecolorf.TabIndex = 19; + // + // themecolorfg + // + this.themecolorfg.AutoSize = true; + this.themecolorfg.BackColor = System.Drawing.Color.Transparent; + this.themecolorfg.Location = new System.Drawing.Point(190, 18); + this.themecolorfg.Name = "themecolorfg"; + this.themecolorfg.Size = new System.Drawing.Size(66, 13); + this.themecolorfg.TabIndex = 21; + this.themecolorfg.Text = "Sample Text"; + // + // themecolortextbg + // + this.themecolortextbg.Location = new System.Drawing.Point(180, 15); + this.themecolortextbg.Name = "themecolortextbg"; + this.themecolortextbg.Size = new System.Drawing.Size(208, 223); + this.themecolortextbg.TabIndex = 20; + // + // importbutton + // + this.importbutton.Location = new System.Drawing.Point(90, 220); + this.importbutton.Name = "importbutton"; + this.importbutton.Size = new System.Drawing.Size(60, 23); + this.importbutton.TabIndex = 2; + this.importbutton.Text = "Import"; + this.importbutton.UseVisualStyleBackColor = true; + this.importbutton.Click += new System.EventHandler(this.importbutton_Click_1); + // + // applybutton + // + this.applybutton.Location = new System.Drawing.Point(23, 220); + this.applybutton.Name = "applybutton"; + this.applybutton.Size = new System.Drawing.Size(60, 23); + this.applybutton.TabIndex = 1; + this.applybutton.Text = "Apply"; + this.applybutton.UseVisualStyleBackColor = true; + this.applybutton.Click += new System.EventHandler(this.applybutton_Click_1); + // + // themecolorfgmarked + // + this.themecolorfgmarked.AutoSize = true; + this.themecolorfgmarked.Location = new System.Drawing.Point(313, 18); + this.themecolorfgmarked.Name = "themecolorfgmarked"; + this.themecolorfgmarked.Size = new System.Drawing.Size(67, 13); + this.themecolorfgmarked.TabIndex = 22; + this.themecolorfgmarked.Text = "Marked Text"; + // + // XTM + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(397, 248); + this.Controls.Add(this.themecolorfgmarked); + this.Controls.Add(this.themecolorfg); + this.Controls.Add(this.themecolorf); + this.Controls.Add(this.themecolor3); + this.Controls.Add(this.themecolorb); + this.Controls.Add(this.themecolor7); + this.Controls.Add(this.themecolore); + this.Controls.Add(this.themecolor2); + this.Controls.Add(this.themecolora); + this.Controls.Add(this.themecolor6); + this.Controls.Add(this.themecolord); + this.Controls.Add(this.themecolor1); + this.Controls.Add(this.themecolor9); + this.Controls.Add(this.themecolor5); + this.Controls.Add(this.themecolorc); + this.Controls.Add(this.themecolor0); + this.Controls.Add(this.themecolor8); + this.Controls.Add(this.themecolor4); + this.Controls.Add(this.importbutton); + this.Controls.Add(this.applybutton); + this.Controls.Add(this.themelist); + this.Controls.Add(this.themecolortextbg); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "XTM"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.Text = "XChat Theme Manager"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ListBox themelist; + private System.Windows.Forms.Label themecolor0; + private System.Windows.Forms.Label themecolor1; + private System.Windows.Forms.Label themecolor2; + private System.Windows.Forms.Label themecolor3; + private System.Windows.Forms.Label themecolor4; + private System.Windows.Forms.Label themecolor5; + private System.Windows.Forms.Label themecolor6; + private System.Windows.Forms.Label themecolor7; + private System.Windows.Forms.Label themecolor8; + private System.Windows.Forms.Label themecolor9; + private System.Windows.Forms.Label themecolora; + private System.Windows.Forms.Label themecolorb; + private System.Windows.Forms.Label themecolorc; + private System.Windows.Forms.Label themecolord; + private System.Windows.Forms.Label themecolore; + private System.Windows.Forms.Label themecolorf; + private System.Windows.Forms.Label themecolorfg; + private System.Windows.Forms.Label themecolortextbg; + private System.Windows.Forms.Button importbutton; + private System.Windows.Forms.Button applybutton; + private System.Windows.Forms.Label themecolorfgmarked; + } +} + diff --git a/src/xtm/Main.cs b/src/xtm/Main.cs new file mode 100644 index 00000000..e740e994 --- /dev/null +++ b/src/xtm/Main.cs @@ -0,0 +1,269 @@ +/* XChat Theme Manager + * + * Copyright (C) 2012 Patrick Griffs + * Copyright (C) 2012 Berke Viktor + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + */ + +using System; +using System.Collections.Generic; +using System.Collections; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +/* using System.IO.Compression; */ +using System.IO.Packaging; +using System.Linq; +using System.Text; +using System.Windows.Forms; +using System.Net; + +namespace thememan +{ + public partial class XTM : Form + { + public string appdata = (Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\X-Chat 2\\"); + public string home = (Environment.GetFolderPath(Environment.SpecialFolder.Personal) + "/.xchat2/"); + + public string xchatdir; + public string themedir = "themes\\"; + + OpenFileDialog importDialog; + + public XTM () + { + InitializeComponent (); + + if (File.Exists ("portable-mode")) + xchatdir = ("config\\"); + else if (Directory.Exists (appdata)) + xchatdir = (appdata); + else if (Directory.Exists (home)) { + xchatdir = (home); themedir = "themes/"; + } else + Console.WriteLine("Install not found"); + + ListThemes(); + } + + private void ListThemes() + { + themelist.Items.Clear(); + + if (Directory.Exists(xchatdir + themedir)) + { + foreach (string theme in Directory.GetDirectories(xchatdir + themedir)) + { + themelist.Items.Add(theme.Remove(0, xchatdir.Length + themedir.Length)); + } + } + else + { + Directory.CreateDirectory(xchatdir + themedir); + } + + if (themelist.Items.Count == 0) + { + applybutton.Enabled = false; + } + else + { + themelist.SetSelected(0, true); + } + } + + private void ShowColors(List> themecolors) + { + List labels = this.Controls.OfType