Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

dotNetInstaller - Setup Bootstrapper for .NET Application

, 4 Jan 2004
With this tool the developer can define the application prerequisites and install the correct version of these components in the correct order based on the user operating system type and language, allow the user to download these components from the web or install these components directly.
dotnetinstaller_source.zip
dotNetInstaller_source
dotNetInstaller
dotNetInstaller.vcproj.vspscc
dotNetInstaller.vssscc
mssccprj.scc
res
banner.bmp
dotNetInstaller.ico
dotNetInstaller.manifest
Thumbs.db
vssver.scc
Tools
vssver.scc
vssver.scc
InstallerEditor
App.ico
banner.bmp
bin
Release
InstallerEditor.exe
SourceLibrary.dll
vssver.scc
InstallerEditor.csproj.user
InstallerEditor.csproj.vspscc
InstallerEditor.suo
InstallerEditor.vssscc
mssccprj.scc
References
SourceLibrary.dll
vssver.scc
Thumbs.db
vssver.scc
Sample
banner.bmp
dotNetInstaller.exe
SupportFiles
DataAccess
Jet
Jet40Sp7
Win2000_English
Win2000_Italiano
Win9x_NT
WinME
WinXp_English
WinXp_Italiano
MDAC2.7Sp1Refresh
Win_98_ME_NT_2000
dotNet
v1.1
English
Italiano
InternetExplorer
IE60SP1_English
IE60SP1_Italiano
ServicePack
2000_SP4_English
2000_SP4_Italiano
NT4_SP6a_English
NT4_SP6a_Italiano
Win98_Y2k_Update_English
Win98_Y2k_Update_Italiano
#pragma once
#include "afxwin.h"
#include "afxcmn.h"

#include "DownloadDialogSupport.h"


namespace DVLib
{
	// DownloadDialog dialog

	class DownloadDialog : public CDialog, public IDownloadCallback
	{
		DECLARE_DYNAMIC(DownloadDialog)

	public:
		DownloadDialog(const DownloadGroupConfiguration & p_Configuration,
							CWnd* pParent = NULL);   // standard constructor

		virtual ~DownloadDialog();

	// Dialog Data
		enum { IDD = IDD_DOWNLOAD_DIALOG };

	private:
		CString m_Caption;
		CString m_HelpMessage;
		CString m_HelpMessageDownloading;
		CString m_ButtonStartCaption;
		CString m_ButtonCancelCaption;
		DownloadComponentInfoVector m_Components;
		bool m_bAutoStartDownload;

		bool m_bCancelDownload;
		HANDLE m_hDownloadThread;
		bool m_bDownloadCompleted;

		HICON m_hIcon;

		//HWND m_HWNDProgressBar;
		//HWND m_HWNDLabelStatus;

	protected:
		virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
		virtual BOOL OnInitDialog();
		virtual afx_msg void OnClose();

		virtual void WaitDownloadThread();

		DECLARE_MESSAGE_MAP()
	public:
		CStatic m_LabelHelpDownload;
		CStatic m_LabelStatus;
		CButton m_btStart;
		CButton m_btCancel;
		CProgressCtrl m_ProgressControl;
		afx_msg void OnBnClickedCancel();
		afx_msg void OnBnClickedStart();
		afx_msg void OnCancel();
		afx_msg void OnOK();

		afx_msg LRESULT OnSetStatusDownload(WPARAM wParam, LPARAM lParam);

		inline bool IsDownloadCompleted(){return m_bDownloadCompleted;};

		// IDownloadCallback
		virtual void Status(ULONG p_CurrentProgress, ULONG p_MaxProgress, LPCTSTR p_Description);
		virtual void DownloadComplete();
		virtual void DownloadError(LPCTSTR);
		virtual bool WantToStop();
		virtual void CanceledByTheUser();
		virtual DownloadComponentInfoVector * GetComponents();
	};


	enum StatusType
	{
		StatusType_Error,
		StatusType_Downloading,
		StatusType_Completed,
		StatusType_Canceled
	};

	struct DownloadStatusParam
	{
		StatusType Type;
		ULONG CurrentProgress;
		ULONG ProgressMax;
		CString Status;
		CString Error;

		static DownloadStatusParam * CreateProgress(CString p_Status, ULONG p_CurrentProgress, ULONG p_ProgressMax)
		{
			DownloadStatusParam * param = new DownloadStatusParam();
			param->Type = StatusType_Downloading;
			param->CurrentProgress = p_CurrentProgress;
			param->ProgressMax = p_ProgressMax;
			param->Status = p_Status;
			return param;
		}
		static DownloadStatusParam * CreateComplete()
		{
			DownloadStatusParam * param = new DownloadStatusParam();
			param->Type = StatusType_Completed;
			return param;
		}
		static DownloadStatusParam * CreateError(CString p_Error)
		{
			DownloadStatusParam * param = new DownloadStatusParam();
			param->Type = StatusType_Error;
			param->Error = p_Error;
			return param;
		}
		static DownloadStatusParam * CreateCanceled()
		{
			DownloadStatusParam * param = new DownloadStatusParam();
			param->Type = StatusType_Canceled;
			return param;
		}

		static void Free(DownloadStatusParam * param)
		{
			delete param;
		}
	};

	inline bool RunDownloadDialog(const DVLib::DownloadGroupConfiguration & p_ConfigDownload)
	{
		DVLib::DownloadDialog l_dgDownload(p_ConfigDownload);
		l_dgDownload.DoModal();

		return l_dgDownload.IsDownloadCompleted();
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The MIT License

About the Author

Davide Icardi
Software Developer
Italy Italy
No Biography provided

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 5 Jan 2004
Article Copyright 2003 by Davide Icardi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid