⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jelinstaller.h

📁 Java写的文本编辑器
💻 H
字号:
/* * JELInstaller.h - part of jEditLauncher package * Copyright (C) 2001 John Gellene * jgellene@nyc.rr.com * * Notwithstanding the terms of the General Public License, the author grants * permission to compile and link object code generated by the compilation of * this program with object code and libraries that are not subject to the * GNU General Public License, provided that the executable output of such * compilation shall be distributed with source code on substantially the * same basis as the jEditLauncher package of which this program is a part. * By way of example, a distribution would satisfy this condition if it * included a working makefile for any freely available make utility that * runs on the Windows family of operating systems. This condition does not * require a licensee of this software to distribute any proprietary software * (including header files and libraries) that is licensed under terms * prohibiting redistribution to third parties. * * 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. * * $Id: JELInstaller.h,v 1.4 2001/09/07 15:20:23 jgellene Exp $ */#if !defined(__JELINSTALLER_H__)#define __JELINSTALLER_H__interface DeferFileOps;struct InstallData;class JELRegistryInstaller;class InstallerLog;enum LinkLocation {	Desktop			= CSIDL_DESKTOP,	ProgramsMenu	= CSIDL_PROGRAMS,	StartMenu		= CSIDL_STARTMENU};enum InstallerMessage {	MsgUninstall		= 0,	MsgInstall			= 1,	MsgChangePrimary	= 2};/* * This struct can be used in FindFirstFile() and FindNextFile() in the Win32 * API, each of which takes a pointer to a WIN32_FIND_DATA struct. By keeping * the full path available as part of the data structure and by passing a * pointer to that data structure to recursive calls of EmptyDirectory(), this * routine can both minimize stack use and avoid thread-unsafe calls to * SetCurrentDirectory(). */struct _WIN32_DIR_WALK : public WIN32_FIND_DATA{	TCHAR cDirMask[MAX_PATH];};typedef _WIN32_DIR_WALK WIN32_DIR_WALK, *PWIN32_DIR_WALK;interface Installer{	virtual HRESULT Install() = 0;	virtual HRESULT Uninstall() = 0;	virtual HRESULT SendMessage(LPVOID p) = 0;};class JELFileInstaller : public Installer{	/* constructor */public:	JELFileInstaller(const InstallData *ptrData, Installer *ptrOwner);	virtual ~JELFileInstaller();	/* Overrides */	virtual HRESULT Install();	virtual HRESULT Uninstall();	virtual HRESULT SendMessage(LPVOID p);	/* Implementation */protected:	void EmptyDirectory(PWIN32_DIR_WALK pFinddata, DeferFileOps *pDFO);private:	bool MakeParentMask(LPTSTR lpszMask);	bool MakeChildMask(LPTSTR lpszMask, LPCTSTR lpszChildDir);	/* Data members */private:	const InstallData *pData;	Installer *pOwner;	DeferFileOps *pDFO;	bool bRebootNeeded;	/* No copy constructor */private:	JELFileInstaller(const JELFileInstaller&);	JELFileInstaller& operator=(const JELFileInstaller&);};class JELShortcutInstaller : public Installer{	/* constructor */public:	JELShortcutInstaller(const InstallData *ptrData, Installer *ptrOwner);	virtual ~JELShortcutInstaller();	/* Overrides */	virtual HRESULT Install();	virtual HRESULT Uninstall();	virtual HRESULT SendMessage(LPVOID p);	/* Implementation */protected:	HRESULT CreateShortcut(LPCSTR lpszPathObj, LPCSTR lpszLinkName,						   LPCSTR lpszPathIcon, LinkLocation location,						   LPCSTR lpszDesc, LPCSTR lpszWorkingDir,						   LPCSTR lpszParams);	int DeleteShortcut(const char* szName, LinkLocation location);	/* Data members */private:	const InstallData *pData;	Installer *pOwner;	/* No copy constructor */private:	JELShortcutInstaller(const JELShortcutInstaller&);	JELShortcutInstaller& operator=(const JELShortcutInstaller&);};class JELApplicationInstaller : public Installer{	/* constructor */public:	JELApplicationInstaller(const char* ptrJavaHome,							const char* ptrInstallDir,							BOOL bLeaveFiles = FALSE);	virtual ~JELApplicationInstaller();	/* Overrides */	virtual HRESULT Install();	virtual HRESULT Uninstall();	virtual HRESULT SendMessage(LPVOID p);protected:	bool Init();	void Cleanup();	void QueryReboot();	/* Data members */private:	InstallData *pData;	Installer *pFileInstaller,	          *pRegistryInstaller,			  *pShortcutInstaller;	const char* szJavaHome;	const char* szInstallDir;	BOOL leaveFiles;	HRESULT hrCOM;	InstallerLog *pLog;	/* No copy constructor */private:	JELApplicationInstaller(const JELApplicationInstaller&);	JELApplicationInstaller& operator=(const JELApplicationInstaller&);};#endif        //  #if !defined(__JELINSTALLER_H__)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -