#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <shlobj.h>
#include <shellapi.h>
#include <commctrl.h>
#include <ole2.h>
#include <direct.h>
#include <sys/stat.h>
#include <process.h>
#include <zlib.h>
#include "../filesys.h"
#include "resource.h"
#include "examples.c"
Go to the source code of this file.
Data Structures | |
struct | linkinfo |
Defines | |
#define | VERSION_TEXT "2.0.0" |
#define | MAJOR 2 |
#define | MINOR 0 |
#define | BUILD 0 |
#define | KBNEEDED 8000 |
#define | DEFAULT_PATH "C:\\ScriptBasic\\" |
#define | INSTALL_HEADING " Install ScriptBasic !" |
#define | REMOVE_HEADING " Remove ScriptBasic !" |
#define | SOFT "SOFTWARE\\" |
#define | LOCAL HKEY_LOCAL_MACHINE |
#define | ROOT HKEY_CLASSES_ROOT |
#define | SOFT "SOFTWARE\\" |
#define | UNINSTALL "SOFTWARE\\MICROSOFT\\WINDOWS\\CURRENTVERSION\\UNINSTALL\\" |
#define | GZFILE "sbcab.bin" |
#define | INSTALL 1 |
#define | REMOVE 2 |
#define | RESET 1 |
#define | NEXT 2 |
#define | BASIC_NAME "ScriptBasic" |
#define | BASIC_EXE "scriba.exe" |
#define | BASIC_EXTENSION ".sb" |
#define | BASIC_VERSION "2.0" |
#define | BASIC_BUILD "0" |
#define | BASIC_ICON "scriba.ico" |
#define | BASDOC_ICON "scribadoc.ico" |
#define | BASIC_README "readme.txt" |
#define | BASIC_LICENSE "copying.txt" |
#define | BASIC_SETUP "setup.exe" |
#define | BASIC_LOG "scriba.log" |
#define | DEFAULTFONT "swiss13" |
#define | DEFAULTGEOMETRY "+10+10" |
#define | MB_STYLE MB_OK|MB_SYSTEMMODAL|MB_ICONINFORMATION |
#define | SSLEN 1024 |
#define | INSTALL_CANCELLED 1 |
#define | INSTALL_ABORTED 2 |
#define | INSTALL_SUCCESS 3 |
#define | INSTALL_FAILURE 4 |
#define | REMOVE_SUCCESS 6 |
#define | REMOVE_FAILURE 7 |
#define | REMOVE_CANCELLED 8 |
#define | SILENT 9 |
#define | INSTALL_PARTIAL 10 |
#define | MODUDOC(X, Y) {CSIDL_PROGRAMS,BASIC_NAME"\\Documentation\\" X ".LNK", "mod_" Y ".chm","Link to mod_" X ".chm", "\027",FALSE,"DOC\\"},\ |
Typedefs | |
typedef linkinfo | LINKINFO |
Functions | |
void | progress (char *msg) |
char * | app (char *trail) |
int | failReport (char *key, char *action) |
static int | DeleteRegistryKey (HKEY start, char *keyname, char *subkey) |
char * | GetSBRegString (char *name) |
DWORD | GetSBRegDW (char *name, DWORD *DW) |
int | PutRegistryKey (HKEY start, char *keyname, char *name, char *content) |
int | PutRegistryEKey (HKEY start, char *keyname, char *name, char *content) |
int | PutSBRegString (HKEY start, char *keyname, char *name, char *content) |
int | PutSBRegDW (HKEY start, char *keyname, char *name, DWORD DW) |
char * | GetRegistryKey (char *keyname, char *name) |
int | InstallQuestionYN (char *pszText) |
char * | brushup (char *path) |
void | brushupinline (char *path) |
void | logit (char *text) |
int | MyMessage (HWND handle, LPCSTR text, LPCSTR title, UINT style) |
void | end (int m) |
UINT CALLBACK | HookProc (HWND hdl, UINT msg, WPARAM wparam, LPARAM lparam) |
BOOL CALLBACK | pathdialog (HWND handle, UINT message, WPARAM wparam, LPARAM lparam) |
void | DeleteFromPath (char *Path) |
void | DeleteFromPathEx (char *Path, char *Ext) |
int | MyRegs (int mode) |
BOOL CALLBACK | progressdialog (HWND handle, UINT message, WPARAM wparam, LPARAM lparam) |
void | noprogress (char *msg) |
HRESULT | CreateShellLink (LINKINFO *li, char *path) |
HRESULT | DeleteShellLink (LINKINFO *li) |
int | MyLinks (int mode) |
int | MyFiles (int mode) |
void | InstallScriptBasic () |
void | RemoveScriptBasic () |
int WINAPI | WinMain (HINSTANCE _this_instance, HINSTANCE prev_instance, LPSTR commandline, int win_state) |
Variables | |
int | total_progress |
int | GlobalSuccessFlag = 1 |
char * | pszInstallPath |
HINSTANCE | this_instance |
char * | temppath |
char | logs [10000] |
int | install |
char * | currentpath |
int | cancel |
char | string [SSLEN] |
char | logfilename [SSLEN] |
int | progress_wait |
DWORD | dwMajor |
DWORD | dwMinor |
DWORD | dwBuild |
int | timerid |
MSG | timermsg |
RECT | rc |
static int | count = 0 |
static HWND | progressbox = NULL |
static HWND | hwndPB = NULL |
char | string [SSLEN] |
int | thumb |
|
Definition at line 69 of file setup.c. Referenced by MyLinks(). |
|
|
|
Definition at line 64 of file setup.c. Referenced by MyRegs(). |
|
Definition at line 65 of file setup.c. Referenced by MyRegs(). |
|
|
|
|
|
|
|
|
|
|
|
Definition at line 72 of file setup.c. Referenced by MyRegs(). |
|
|
|
Definition at line 35 of file setup.c. Referenced by InstallScriptBasic(), MyRegs(), and RemoveScriptBasic(). |
|
Definition at line 40 of file setup.c. Referenced by InstallScriptBasic(). |
|
|
|
|
|
Definition at line 53 of file setup.c. Referenced by InstallScriptBasic(), and MyFiles(). |
|
Definition at line 56 of file setup.c. Referenced by InstallScriptBasic(), MyFiles(), MyLinks(), and MyRegs(). |
|
Definition at line 612 of file setup.c. Referenced by end(). |
|
Definition at line 611 of file setup.c. Referenced by end(), InstallScriptBasic(), MyFiles(), and RemoveScriptBasic(). |
|
Definition at line 614 of file setup.c. Referenced by end(), InstallScriptBasic(), and MyFiles(). |
|
Definition at line 42 of file setup.c. Referenced by InstallScriptBasic(), and MyFiles(). |
|
Definition at line 619 of file setup.c. Referenced by end(), and InstallScriptBasic(). |
|
Definition at line 613 of file setup.c. Referenced by end(), and InstallScriptBasic(). |
|
Definition at line 38 of file setup.c. Referenced by InstallScriptBasic(). |
|
Definition at line 47 of file setup.c. Referenced by DeleteRegistryKey(), MyRegs(), PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), and PutSBRegString(). |
|
Definition at line 33 of file setup.c. Referenced by InstallScriptBasic(), MyRegs(), and RemoveScriptBasic(). |
|
Definition at line 79 of file setup.c. Referenced by InstallScriptBasic(), and MyFiles(). |
|
Definition at line 34 of file setup.c. Referenced by InstallScriptBasic(), MyRegs(), and RemoveScriptBasic(). |
|
Referenced by MyLinks(). |
|
|
|
Definition at line 57 of file setup.c. Referenced by MyFiles(), MyRegs(), and RemoveScriptBasic(). |
|
Definition at line 617 of file setup.c. Referenced by end(). |
|
Definition at line 616 of file setup.c. Referenced by end(). |
|
|
|
Definition at line 615 of file setup.c. Referenced by end(), and RemoveScriptBasic(). |
|
|
|
Definition at line 48 of file setup.c. Referenced by MyRegs(). |
|
Definition at line 618 of file setup.c. Referenced by end(). |
|
|
|
Definition at line 49 of file setup.c. Referenced by MyRegs(). |
|
Definition at line 82 of file setup.c. Referenced by brushup(), CreateShellLink(), DeleteFromPath(), DeleteFromPathEx(), DeleteRegistryKey(), failReport(), GetRegistryKey(), GetSBRegString(), InstallScriptBasic(), MyFiles(), MyLinks(), MyRegs(), pathdialog(), PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), PutSBRegString(), RemoveScriptBasic(), and WinMain(). |
|
Definition at line 50 of file setup.c. Referenced by MyRegs(). |
|
Definition at line 32 of file setup.c. Referenced by InstallScriptBasic(), and RemoveScriptBasic(). |
|
|
|
Definition at line 103 of file setup.c. References i, memcpy(), pszInstallPath, and result. Referenced by MyRegs(). |
|
Definition at line 506 of file setup.c. References buf, i, NULL, and SSLEN. Referenced by InstallScriptBasic(), MyRegs(), and WinMain(). |
|
Definition at line 530 of file setup.c. References i, j, NULL, and return. Referenced by MyFiles(). |
|
Definition at line 1145 of file setup.c. References linkinfo::desc, linkinfo::file, linkinfo::folder, linkinfo::icon, linkinfo::link, NULL, sprintf(), SSLEN, and string. Referenced by MyLinks(). |
|
Definition at line 811 of file setup.c. References i, j, logit(), logs, NULL, s, slen, sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 865 of file setup.c. References logit(), logs, NULL, s, sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 169 of file setup.c. References failReport(), GlobalSuccessFlag, LOCAL, logs, RegCloseKey(), sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 1218 of file setup.c. References linkinfo::folder, linkinfo::link, logit(), logs, NULL, and sprintf(). Referenced by MyLinks(). |
|
Definition at line 621 of file setup.c. References INSTALL_ABORTED, INSTALL_CANCELLED, INSTALL_FAILURE, INSTALL_PARTIAL, INSTALL_SUCCESS, logit(), MyMessage(), NULL, progress(), REMOVE_CANCELLED, REMOVE_FAILURE, REMOVE_SUCCESS, ret, and SILENT. Referenced by InstallScriptBasic(), MyFiles(), and RemoveScriptBasic(). |
|
Definition at line 120 of file setup.c. References logit(), logs, NULL, sprintf(), and SSLEN. Referenced by DeleteRegistryKey(), GetRegistryKey(), PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), and PutSBRegString(). |
|
Definition at line 462 of file setup.c. References failReport(), GlobalSuccessFlag, logs, NULL, RegCloseKey(), sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 254 of file setup.c. References cbData, NULL, and RegCloseKey(). Referenced by WinMain(). |
|
Definition at line 213 of file setup.c. References cbData, NULL, RegCloseKey(), SSLEN, and strcpy(). Referenced by RemoveScriptBasic(), and WinMain(). |
|
Definition at line 711 of file setup.c. References rc. Referenced by pathdialog(). |
|
Definition at line 495 of file setup.c. References NULL. Referenced by InstallScriptBasic(), MyFiles(), and RemoveScriptBasic(). |
|
Definition at line 1418 of file setup.c. References brushup(), BUILD, cancel, CloseHandle(), DEFAULT_PATH, dwBuild, dwMajor, dwMinor, end(), fp, GlobalSuccessFlag, GZFILE, IDD_PATHDIALOG, INSTALL, INSTALL_CANCELLED, INSTALL_FAILURE, INSTALL_HEADING, INSTALL_PARTIAL, INSTALL_SUCCESS, InstallQuestionYN(), KBNEEDED, logfilename, logit(), logs, MAJOR, MB_STYLE, MINOR, MyFiles(), MyLinks(), MyMessage(), MyRegs(), NULL, pathdialog(), progress(), pszInstallPath, s, Sleep, sprintf(), SSLEN, strcpy(), string, this_instance, total_progress, and VERSION_TEXT. Referenced by WinMain(). |
|
Definition at line 550 of file setup.c. References fflush(), logfilename, NULL, sprintf(), and temppath. Referenced by DeleteFromPath(), DeleteFromPathEx(), DeleteShellLink(), end(), failReport(), InstallScriptBasic(), MyFiles(), MyMessage(), MyRegs(), noprogress(), progress(), and WinMain(). |
|
Definition at line 1332 of file setup.c. References brushupinline(), buf, end(), file_deltree(), file_exists(), file_MakeDirectory(), fp, gzclose(), GZFILE, INSTALL, INSTALL_CANCELLED, INSTALL_FAILURE, INSTALL_HEADING, InstallQuestionYN(), logit(), MB_STYLE, MyMessage(), noprogress(), NULL, progress(), progress_wait, pszInstallPath, REMOVE, s, sprintf(), SSLEN, strcpy(), and string. Referenced by InstallScriptBasic(), and RemoveScriptBasic(). |
|
Definition at line 1241 of file setup.c. References BASDOC_ICON, BASIC_ICON, BASIC_NAME, CreateShellLink(), DeleteShellLink(), INSTALL, linkinfo::link, MODUDOC, NULL, progress(), pszInstallPath, res, sprintf(), SSLEN, strcpy(), and string. Referenced by InstallScriptBasic(), and RemoveScriptBasic(). |
|
Definition at line 599 of file setup.c. References logit(), logs, and sprintf(). Referenced by end(), InstallScriptBasic(), MyFiles(), and RemoveScriptBasic(). |
|
Definition at line 914 of file setup.c. References app(), BASIC_EXE, BASIC_EXTENSION, BASIC_ICON, BASIC_NAME, BASIC_SETUP, brushup(), BUILD, DeleteFromPath(), DeleteFromPathEx(), DeleteRegistryKey(), GetRegistryKey(), INSTALL, LOCAL, logit(), logs, MAJOR, MINOR, NULL, progress(), pszInstallPath, PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), PutSBRegString(), REMOVE, ROOT, SOFT, sprintf(), SSLEN, string, and UNINSTALL. Referenced by InstallScriptBasic(), and RemoveScriptBasic(). |
|
Definition at line 1118 of file setup.c. References IDC_PROGRESSTEXT, logit(), logs, NULL, progress_wait, progressbox, sprintf(), timerid, and timermsg. Referenced by MyFiles(). |
|
Definition at line 733 of file setup.c. References buf, HookProc(), IDC_BROWSE, IDD_EXPLANATION, IDINSTPATH, NULL, pszInstallPath, rc, ret, SSLEN, strcpy(), and this_instance. Referenced by InstallScriptBasic(). |
|
Definition at line 1061 of file setup.c. References IDC_PROGRESSTEXT, IDD_PROGRESSDIALOG, logit(), logs, NULL, progress_wait, progressdialog(), sprintf(), this_instance, and total_progress. Referenced by end(), InstallScriptBasic(), MyFiles(), MyLinks(), and MyRegs(). |
|
Definition at line 1028 of file setup.c. References rc. Referenced by progress(). |
|
Definition at line 337 of file setup.c. References failReport(), GlobalSuccessFlag, LOCAL, logs, NULL, sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 292 of file setup.c. References failReport(), GlobalSuccessFlag, LOCAL, logs, NULL, sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 429 of file setup.c. References failReport(), GlobalSuccessFlag, LOCAL, logs, NULL, sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 384 of file setup.c. References failReport(), GlobalSuccessFlag, LOCAL, logs, NULL, sprintf(), and SSLEN. Referenced by MyRegs(). |
|
Definition at line 1601 of file setup.c. References BUILD, dwBuild, dwMajor, dwMinor, end(), GetSBRegString(), INSTALL_CANCELLED, InstallQuestionYN(), MAJOR, MINOR, MyFiles(), MyLinks(), MyMessage(), MyRegs(), NULL, pszInstallPath, REMOVE, REMOVE_SUCCESS, sprintf(), SSLEN, string, total_progress, and VERSION_TEXT. Referenced by WinMain(). |
|
Definition at line 1655 of file setup.c. References brushup(), currentpath, dwBuild, dwMajor, dwMinor, GetSBRegDW(), GetSBRegString(), install, InstallScriptBasic(), logit(), logs, NULL, progress_wait, pszInstallPath, RemoveScriptBasic(), sprintf(), SSLEN, string, strnicmp(), temppath, and this_instance. |
|
Definition at line 95 of file setup.c. Referenced by InstallScriptBasic(). |
|
Definition at line 1055 of file setup.c. Referenced by fmt_cdig(), p_count(), p_ere_exp(), and p_simp_re(). |
|
Definition at line 94 of file setup.c. Referenced by WinMain(). |
|
Definition at line 100 of file setup.c. Referenced by InstallScriptBasic(), RemoveScriptBasic(), and WinMain(). |
|
Definition at line 100 of file setup.c. Referenced by InstallScriptBasic(), RemoveScriptBasic(), and WinMain(). |
|
Definition at line 100 of file setup.c. Referenced by InstallScriptBasic(), RemoveScriptBasic(), and WinMain(). |
|
Definition at line 85 of file setup.c. Referenced by DeleteRegistryKey(), GetRegistryKey(), InstallScriptBasic(), PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), and PutSBRegString(). |
|
|
|
Definition at line 93 of file setup.c. Referenced by WinMain(). |
|
Definition at line 97 of file setup.c. Referenced by InstallScriptBasic(), and logit(). |
|
Definition at line 92 of file setup.c. Referenced by DeleteFromPath(), DeleteFromPathEx(), DeleteRegistryKey(), DeleteShellLink(), failReport(), GetRegistryKey(), InstallScriptBasic(), MyMessage(), MyRegs(), noprogress(), progress(), PutRegistryEKey(), PutRegistryKey(), PutSBRegDW(), PutSBRegString(), and WinMain(). |
|
Definition at line 98 of file setup.c. Referenced by MyFiles(), noprogress(), progress(), and WinMain(). |
|
Definition at line 1056 of file setup.c. Referenced by noprogress(). |
|
Definition at line 89 of file setup.c. Referenced by app(), InstallScriptBasic(), MyFiles(), MyLinks(), MyRegs(), pathdialog(), RemoveScriptBasic(), and WinMain(). |
|
Definition at line 1054 of file setup.c. Referenced by fork(), HookProc(), pathdialog(), progressdialog(), resume_child(), and sync_with_child(). |
|
|
|
Definition at line 96 of file setup.c. Referenced by CreateShellLink(), InstallScriptBasic(), MyFiles(), MyLinks(), MyRegs(), RemoveScriptBasic(), and WinMain(). |
|
|
|
Definition at line 90 of file setup.c. Referenced by InstallScriptBasic(), pathdialog(), progress(), and WinMain(). |
|
|
|
Definition at line 1052 of file setup.c. Referenced by noprogress(). |
|
Definition at line 1053 of file setup.c. Referenced by noprogress(). |
|
Definition at line 83 of file setup.c. Referenced by InstallScriptBasic(), progress(), and RemoveScriptBasic(). |