* PageEx - every page can be used everywhere and as many times as needed
* DirVar - easy way to add another dir page * default strings in the language file (Page directory is enough, no need for DirText) * strings from the language file are now LangStrings that can be used in the script * no more /LANG - one string for all languages * any lang strings can be used everywhere, installer or uninstaller (no un.) * no more unprocessed strings - variables can be used almost everywhere (except in licenseData and InstallDirRegKey) * DirText parm for browse dialog text * SetBkColor -> SetCtlColors - can now set text color too * fixed SetOutPath and File /r bug * fixed File /a /oname bug * added $_CLICK for pages * added quotes support in lang files (patch #752620) * extraction progress * separate RTL dialogs for RTL langs (improved RTL too) * InstallOptions RTL * StartMenu RTL * fixed RegDLL? * added IfSilent and SetSilent (SetSilent only works from .onInit) * fixed verify window (it never showed) (bug #792494) * fixed ifnewer readonly file problem (patch #783782) * fixed wininit.ini manipulation when there is another section after [rename] * fixed some ClearType issues * fixed a minor bug in the resource editor * fixed !ifdef/!endif stuff, rewritten * lots of code and comments clean ups * got rid of some useless exceptions handling and STL classes (still much more to go) * lots of optimizations, of course ;) * updated system.dll with support for GUID, WCHAR, and fast VTable calling (i.e. COM ready) * minor bug fixes git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2823 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
bb8879b7ae
commit
74ea2dc585
91 changed files with 5180 additions and 4101 deletions
|
@ -423,26 +423,45 @@ void CDialogTemplate::ConvertToRTL() {
|
|||
addExStyle = true;
|
||||
// Button
|
||||
else if (int(m_vItems[i]->szClass) == 0x80) {
|
||||
if (m_vItems[i]->dwStyle & BS_LEFTTEXT) addExStyle = true;
|
||||
m_vItems[i]->dwStyle ^= BS_LEFTTEXT;
|
||||
m_vItems[i]->dwStyle ^= BS_RIGHT;
|
||||
m_vItems[i]->dwStyle ^= BS_LEFT;
|
||||
|
||||
if ((m_vItems[i]->dwStyle & (BS_LEFT|BS_RIGHT)) == (BS_LEFT|BS_RIGHT)) {
|
||||
m_vItems[i]->dwStyle ^= BS_LEFT;
|
||||
m_vItems[i]->dwStyle ^= BS_RIGHT;
|
||||
if (m_vItems[i]->dwStyle & (BS_RADIOBUTTON|BS_CHECKBOX|BS_USERBUTTON))
|
||||
m_vItems[i]->dwStyle |= BS_RIGHT;
|
||||
}
|
||||
}
|
||||
// Edit
|
||||
else if (int(m_vItems[i]->szClass) == 0x81) {
|
||||
if (!(m_vItems[i]->dwStyle & ES_CENTER)) addExStyle = true;
|
||||
if ((m_vItems[i]->dwStyle & ES_CENTER) == 0)
|
||||
m_vItems[i]->dwStyle ^= ES_RIGHT;
|
||||
}
|
||||
// Static
|
||||
else if (int(m_vItems[i]->szClass) == 0x82) {
|
||||
if (!(m_vItems[i]->dwStyle & (SS_CENTER|SS_RIGHT))) {
|
||||
m_vItems[i]->dwStyle &= ~SS_LEFT;
|
||||
m_vItems[i]->dwStyle &= ~SS_LEFTNOWORDWRAP;
|
||||
if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFT || (m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_LEFTNOWORDWRAP)
|
||||
{
|
||||
m_vItems[i]->dwStyle &= ~SS_TYPEMASK;
|
||||
m_vItems[i]->dwStyle |= SS_RIGHT;
|
||||
}
|
||||
else if ((m_vItems[i]->dwStyle & SS_TYPEMASK) == SS_ICON) {
|
||||
m_vItems[i]->dwStyle |= SS_CENTERIMAGE;
|
||||
}
|
||||
}
|
||||
else if (!IS_INTRESOURCE(m_vItems[i]->szClass) && strcmpi(m_vItems[i]->szClass, "RichEdit20A")) {
|
||||
if ((m_vItems[i]->dwStyle & ES_CENTER) == 0)
|
||||
m_vItems[i]->dwStyle ^= ES_RIGHT;
|
||||
}
|
||||
else addExStyle = true;
|
||||
|
||||
if (addExStyle)
|
||||
m_vItems[i]->dwExtStyle |= WS_EX_RIGHT;
|
||||
m_vItems[i]->dwExtStyle |= WS_EX_RIGHT | WS_EX_RTLREADING;
|
||||
|
||||
m_vItems[i]->sX = m_sWidth - m_vItems[i]->sWidth - m_vItems[i]->sX;
|
||||
}
|
||||
m_dwExtStyle |= WS_EX_RIGHT;
|
||||
m_dwExtStyle |= WS_EX_RIGHT | WS_EX_RTLREADING;
|
||||
}
|
||||
|
||||
// Saves the dialog in the form of DLGTEMPLATE[EX]
|
||||
|
|
|
@ -49,7 +49,7 @@ struct DialogItemTemplate {
|
|||
short sHeight;
|
||||
DWORD dwExtStyle;
|
||||
DWORD dwStyle;
|
||||
WORD wId;
|
||||
WORD wId;
|
||||
|
||||
char *szClass;
|
||||
char *szTitle;
|
||||
|
|
|
@ -303,7 +303,7 @@ BYTE* CResourceEditor::Save(DWORD &dwSize) {
|
|||
oldSeeker += dwSectionsSize;
|
||||
|
||||
// Copy data tacked after the PE headers and sections (NSIS installation data for example)
|
||||
DWORD dwTackedSize = oldSeeker - m_pbPE - m_iSize;
|
||||
DWORD dwTackedSize = m_iSize - (oldSeeker - m_pbPE);
|
||||
if (dwTackedSize)
|
||||
CopyMemory(seeker, oldSeeker, dwTackedSize);
|
||||
|
||||
|
|
1752
Source/build.cpp
1752
Source/build.cpp
File diff suppressed because it is too large
Load diff
129
Source/build.h
129
Source/build.h
|
@ -1,8 +1,7 @@
|
|||
#ifndef _BUILD_H_
|
||||
#define _BUILD_H_
|
||||
|
||||
#include <Vector>
|
||||
#include <List>
|
||||
#include <StdExcept>
|
||||
using namespace std;
|
||||
|
||||
#include "strlist.h"
|
||||
|
@ -43,12 +42,8 @@ extern "C"
|
|||
|
||||
#define PS_OK 0
|
||||
#define PS_EOF 1
|
||||
#define PS_ENDIF 2
|
||||
#define PS_ELSE 3
|
||||
#define PS_ELSE_IF0 4
|
||||
#define PS_ELSE_IF1 5
|
||||
#define PS_ERROR 50
|
||||
#define IS_PS_ELSE(x) (( x ) >= PS_ELSE && ( x ) <= PS_ELSE_IF1)
|
||||
#define PS_WARNING 100
|
||||
|
||||
enum {
|
||||
MAKENSIS_NOTIFY_SCRIPT,
|
||||
|
@ -57,6 +52,14 @@ enum {
|
|||
MAKENSIS_NOTIFY_OUTPUT
|
||||
};
|
||||
|
||||
#define PAGE_CUSTOM 0
|
||||
#define PAGE_LICENSE 1
|
||||
#define PAGE_COMPONENTS 2
|
||||
#define PAGE_DIRECTORY 3
|
||||
#define PAGE_INSTFILES 4
|
||||
#define PAGE_UNINSTCONFIRM 5
|
||||
#define PAGE_COMPLETED 6
|
||||
|
||||
class CEXEBuild {
|
||||
public:
|
||||
CEXEBuild();
|
||||
|
@ -64,6 +67,8 @@ class CEXEBuild {
|
|||
|
||||
// to add a warning to the compiler's warning list.
|
||||
void warning(const char *s, ...);
|
||||
// warning with file name and line count
|
||||
void warning_fl(const char *s, ...);
|
||||
|
||||
// to add a defined thing.
|
||||
void define(const char *p, const char *v="");
|
||||
|
@ -125,6 +130,27 @@ class CEXEBuild {
|
|||
int do_add_file(const char *lgss, int attrib, int recurse, int linecnt, int *total_files, const char *name_override=0, int generatecode=1, int *data_handle=0, int rec_depth=0);
|
||||
GrowBuf m_linebuild; // used for concatenating lines
|
||||
|
||||
// used by doParse to do preprocessing
|
||||
struct ifblock
|
||||
{
|
||||
int hasexeced;
|
||||
int elseused;
|
||||
int ignore;
|
||||
int inherited_ignore;
|
||||
} *cur_ifblock;
|
||||
|
||||
TinyGrowBuf build_preprocessor_data;
|
||||
int last_line_had_slash;
|
||||
|
||||
void start_ifblock();
|
||||
void end_ifblock();
|
||||
int num_ifblock();
|
||||
/*int ignore;
|
||||
int if_count;
|
||||
int ignored_if_count;
|
||||
int wait_for_endif;*/
|
||||
bool inside_comment;
|
||||
|
||||
void ERROR_MSG(const char *s, ...);
|
||||
void SCRIPT_MSG(const char *s, ...);
|
||||
void INFO_MSG(const char *s, ...);
|
||||
|
@ -142,21 +168,22 @@ class CEXEBuild {
|
|||
void section_add_size_kb(int kb);
|
||||
int section_add_flags(int flags);
|
||||
int section_add_install_type(int inst_type);
|
||||
int add_page(int type);
|
||||
int page_end();
|
||||
int add_label(const char *name);
|
||||
int add_entry(const entry *ent);
|
||||
int add_entry_direct(int which, int o0=0, int o1=0, int o2=0, int o3=0, int o4=0, int o5=0);
|
||||
int add_entry_indirect(int which, int o0=0, int o1=0, int o2=0, int o3=0, int o4=0, int o5=0);
|
||||
int add_data(const char *data, int length, IGrowBuf *dblock=NULL); // returns offset
|
||||
int add_string(const char *string); // returns offset (in string table)
|
||||
int add_string(const char *string, int process=1); // returns offset (in string table)
|
||||
int add_intstring(const int i); // returns offset in stringblock
|
||||
int add_string_main(const char *string, int process=1); // returns offset (in string table)
|
||||
int add_string_uninst(const char *string, int process=1); // returns offset (in string table)
|
||||
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
int preprocess_string(char *out, const char *in, bool bUninstall);
|
||||
#else
|
||||
int preprocess_string(char *out, const char *in);
|
||||
#endif
|
||||
|
||||
int make_sure_not_in_secorfunc(const char *str);
|
||||
int make_sure_not_in_secorfunc(const char *str, int page_ok=0);
|
||||
|
||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
// Added by Ximon Eighteen 5th August 2002
|
||||
|
@ -171,6 +198,11 @@ class CEXEBuild {
|
|||
void printline(int l);
|
||||
int process_jump(LineParser &line, int wt, int *offs);
|
||||
|
||||
int AddVersionInfo();
|
||||
int ProcessPages();
|
||||
void PreperInstTypes();
|
||||
void PreperHeaders(IGrowBuf *hdrbuf);
|
||||
|
||||
int resolve_jump_int(const char *fn, int *a, int offs, int start, int end);
|
||||
int resolve_call_int(const char *fn, const char *str, int fptr, int *ofs);
|
||||
int resolve_instruction(const char *fn, const char *str, entry *w, int offs, int start, int end);
|
||||
|
@ -180,27 +212,44 @@ class CEXEBuild {
|
|||
int uninstall_generate();
|
||||
void set_uninstall_mode(int un);
|
||||
|
||||
// lang.cpp functions and vars
|
||||
StringTable *GetTable(LANGID &lang);
|
||||
int SetString(char *string, int id, int process, LANGID lang=0);
|
||||
int SetString(char *string, int id, int process, StringTable *table);
|
||||
int GetUserString(char *name);
|
||||
int SetUserString(char *name, LANGID lang, char *string, int process=1);
|
||||
int WriteStringTables();
|
||||
void FillStringTable(StringTable *table, NLF *nlf=0);
|
||||
#define IsNotSet(s) _IsNotSet(string_tables.size()?&(string_tables[0]->s):0)
|
||||
bool _IsNotSet(int *str); // Checks if a string is not set in all of the string tables
|
||||
#define IsSet(s,lang) _IsSet(string_tables.size()?&(string_tables[0]->s):0,lang)
|
||||
bool _IsSet(int *str, LANGID lang); // Checks if a string is set in a given string table
|
||||
// lang.cpp functions and variables
|
||||
void InitLangTables();
|
||||
LanguageTable *GetLangTable(LANGID &lang);
|
||||
int DefineLangString(char *name, int process=-1);
|
||||
int DefineInnerLangString(int id, int process=-1);
|
||||
int SetLangString(char *name, LANGID lang, char *string);
|
||||
int SetInnerString(int id, char *string);
|
||||
int GenerateLangTables();
|
||||
void FillLanguageTable(LanguageTable *table);
|
||||
int HasUserDefined(int id) {
|
||||
const char *us = UserInnerStrings.get(id);
|
||||
return us && *us;
|
||||
};
|
||||
|
||||
LanguageTable *LoadLangFile(char *filename);
|
||||
void DeleteLangTable(LanguageTable *table);
|
||||
|
||||
NLFRef NLFRefs[NLF_STRINGS];
|
||||
bool keep_ref;
|
||||
StringsArray UserInnerStrings;
|
||||
bool defcodepage_set;
|
||||
GrowBuf lang_tables;
|
||||
LANGID last_used_lang;
|
||||
LangStringList build_langstrings;
|
||||
int build_langstring_num, ubuild_langstring_num;
|
||||
|
||||
unsigned int uDefCodePage;
|
||||
|
||||
bool next_used, install_used, comppage_used, license_force_radio_used, register_used, unregister_used;
|
||||
// pages stuff
|
||||
int license_res_id;
|
||||
page *cur_page;
|
||||
int cur_page_type;
|
||||
int enable_last_page_cancel, uenable_last_page_cancel;
|
||||
|
||||
// User variables stuff
|
||||
int GetUserVarIndex(LineParser &line, int token);
|
||||
// Added by ramon 3 jun 2003
|
||||
#ifdef NSIS_SUPPORT_NAMED_USERVARS
|
||||
bool b_abort_compile;
|
||||
UserVarsStringList m_UserVarNames;
|
||||
int DeclaredUserVar(const char *VarName);
|
||||
void VerifyDeclaredUserVarRefs(UserVarsStringList *pVarsStringList);
|
||||
|
@ -216,12 +265,6 @@ class CEXEBuild {
|
|||
bool build_compressor_set;
|
||||
bool build_compress_whole;
|
||||
|
||||
bool use_first_insttype;
|
||||
|
||||
vector<NLF*> build_nlfs;
|
||||
vector<StringTable*> string_tables;
|
||||
LANGID last_used_lang;
|
||||
|
||||
bool no_space_texts;
|
||||
|
||||
int has_called_write_output;
|
||||
|
@ -231,14 +274,12 @@ class CEXEBuild {
|
|||
build_datesave, build_optimize_datablock,
|
||||
build_allowskipfiles; // Added by ramon 23 May 2003
|
||||
|
||||
header build_header;
|
||||
header build_header, build_uninst, *cur_header;
|
||||
int uninstall_mode;
|
||||
uninstall_header build_uninst;
|
||||
int uninstall_size,uninstall_size_full;
|
||||
int uninstaller_writes_used;
|
||||
|
||||
char build_output_filename[1024];
|
||||
char cur_out_path[1024];
|
||||
|
||||
// Added by ramon 6 jun 2003
|
||||
#ifdef NSIS_SUPPORT_VERSION_INFO
|
||||
|
@ -262,21 +303,19 @@ class CEXEBuild {
|
|||
|
||||
int build_cursection_isfunc;
|
||||
section *build_cursection;
|
||||
TinyGrowBuf build_sections;
|
||||
TinyGrowBuf build_sections, ubuild_sections, *cur_sections;
|
||||
GrowBuf build_entries,ubuild_entries, *cur_entries;
|
||||
TinyGrowBuf build_functions, ubuild_functions, *cur_functions;
|
||||
TinyGrowBuf build_labels, ubuild_labels, *cur_labels;
|
||||
StringList build_strlist, ubuild_strlist;
|
||||
GrowBuf build_langtables, ubuild_langtables;
|
||||
LangStringList build_userlangstrings, ubuild_userlangstrings;
|
||||
TinyGrowBuf build_pages, ubuild_pages;
|
||||
|
||||
char build_last_page_define[1024], ubuild_last_page_define[1024];
|
||||
int build_custom_used, ubuild_custom_used;
|
||||
int enable_last_page_cancel, uenable_last_page_cancel;
|
||||
StringList build_strlist, ubuild_strlist, *cur_strlist;
|
||||
GrowBuf build_langtables, ubuild_langtables, *cur_langtables;
|
||||
TinyGrowBuf build_pages, ubuild_pages, *cur_pages;
|
||||
TinyGrowBuf build_ctlcolors, ubuild_ctlcolors, *cur_ctlcolors;
|
||||
|
||||
MMapBuf build_datablock, ubuild_datablock; // use GrowBuf here instead of MMapBuf if you want
|
||||
IGrowBuf *cur_datablock;
|
||||
IGrowBuf *cur_datablock;
|
||||
|
||||
TinyGrowBuf verbose_stack;
|
||||
|
||||
unsigned char *header_data_new;
|
||||
int exeheader_size_new;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "exedata.h"
|
||||
|
||||
//#ifndef _DEBUG
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
#include "exehead/Release-zlib/bitmap1.h"
|
||||
#endif
|
||||
|
@ -7,11 +8,19 @@
|
|||
#include "exehead/Release-zlib/unicon.h"
|
||||
#include "exehead/Release-zlib/exehead_zlib.h"
|
||||
#include "exehead/Release-bzip2/exehead_bzip2.h"
|
||||
// Changed by Amir Szekely 31st July 2002
|
||||
/*#else
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
#include "exehead/Debug-zlib/bitmap1.h"
|
||||
#endif
|
||||
#include "exehead/Debug-zlib/icon.h"
|
||||
#include "exehead/Debug-zlib/unicon.h"
|
||||
#include "exehead/Debug-zlib/exehead_zlib.h"
|
||||
#include "exehead/Debug-bzip2/exehead_bzip2.h"
|
||||
#endif*/
|
||||
|
||||
int zlib_exeheader_size=sizeof(zlib_header_data);
|
||||
int bzip2_exeheader_size=sizeof(bzip2_header_data);
|
||||
int exeheader_size=0;
|
||||
|
||||
// Changed by Amir Szekely 8th July 2002
|
||||
int icondata_size=sizeof(icon_data)-22;
|
||||
int unicondata_size=sizeof(unicon_data)-22;
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <windows.h>
|
||||
#include <commctrl.h>
|
||||
#include <shlobj.h>
|
||||
#include "resource.h"
|
||||
#include "util.h"
|
||||
#include "fileform.h"
|
||||
|
@ -58,6 +59,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
|
||||
InitCommonControls();
|
||||
|
||||
#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
|
||||
{
|
||||
extern HRESULT g_hres;
|
||||
g_hres=OleInitialize(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
GetTempPath(sizeof(state_temp_dir), state_temp_dir);
|
||||
validate_filename(state_temp_dir);
|
||||
CreateDirectory(state_temp_dir, NULL);
|
||||
|
@ -127,7 +135,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
while (*p) p++;
|
||||
|
||||
while (p >= cmdline && (p[0] != '_' || p[1] != '?' || p[2] != '=')) p--;
|
||||
|
||||
|
||||
if (p >= cmdline)
|
||||
{
|
||||
*(p-1)=0; // terminate before the " _?="
|
||||
|
@ -200,6 +208,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
|
|||
log_write(1);
|
||||
#endif//NSIS_CONFIG_LOG
|
||||
end:
|
||||
|
||||
#if defined(NSIS_SUPPORT_ACTIVEXREG) || defined(NSIS_SUPPORT_CREATESHORTCUT)
|
||||
OleUninitialize();
|
||||
#endif
|
||||
|
||||
if (g_db_hFile != INVALID_HANDLE_VALUE) CloseHandle(g_db_hFile);
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
if (dbd_hFile != INVALID_HANDLE_VALUE) CloseHandle(dbd_hFile);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -8,8 +8,8 @@
|
|||
|
||||
#ifdef NSIS_SUPPORT_BGBG
|
||||
|
||||
#define c1 g_inst_cmnheader->bg_color1
|
||||
#define c2 g_inst_cmnheader->bg_color2
|
||||
#define c1 g_header->bg_color1
|
||||
#define c2 g_header->bg_color2
|
||||
|
||||
LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
|
@ -49,7 +49,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
r.bottom+=4;
|
||||
}
|
||||
|
||||
if (g_inst_cmnheader->bg_textcolor != -1)
|
||||
if (g_header->bg_textcolor != -1)
|
||||
{
|
||||
HFONT newFont, oldFont;
|
||||
newFont = CreateFont(40,0,0,0,FW_BOLD,TRUE,FALSE,FALSE,DEFAULT_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,DEFAULT_QUALITY,DEFAULT_PITCH,"Garamond");
|
||||
|
@ -60,7 +60,7 @@ LRESULT CALLBACK BG_WndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
r.top=8;
|
||||
my_GetWindowText(hwnd,buf,sizeof(buf));
|
||||
SetBkMode(hdc,TRANSPARENT);
|
||||
SetTextColor(hdc,g_inst_cmnheader->bg_textcolor);
|
||||
SetTextColor(hdc,g_header->bg_textcolor);
|
||||
oldFont = SelectObject(hdc,newFont);
|
||||
DrawText(hdc,buf,-1,&r,DT_TOP|DT_LEFT|DT_SINGLELINE|DT_NOPREFIX);
|
||||
SelectObject(hdc,oldFont);
|
||||
|
|
|
@ -26,14 +26,18 @@
|
|||
// really a big deal, but not usually needed).
|
||||
#define NSIS_MAX_STRLEN 1024
|
||||
|
||||
// NSIS_MAX_INST_TYPES specified the maximum install types.
|
||||
// NSIS_MAX_INST_TYPES define the maximum install types.
|
||||
// note that this should not exceed 32, ever.
|
||||
#define NSIS_MAX_INST_TYPES 32
|
||||
|
||||
// NSIS_DEFAULT_LANG defines the default language id NSIS will use if nothing
|
||||
// else is defined in the script. Default value is 1033 which is English.
|
||||
#define NSIS_DEFAULT_LANG 1033
|
||||
|
||||
// NSIS_CONFIG_UNINSTALL_SUPPORT enables the uninstaller
|
||||
// support. Comment it out if your installers don't need
|
||||
// uninstallers
|
||||
// adds approximately 2kb.
|
||||
// adds less than 1kb.
|
||||
#define NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
|
||||
// NSIS_CONFIG_LICENSEPAGE enables support for the installer to
|
||||
|
@ -54,7 +58,7 @@
|
|||
#define NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
||||
// NSIS_CONFIG_ENHANCEDUI_SUPPORT enables support for CreateFont,
|
||||
// SetBkColor (used by some UIs), SetBrandingImage, .onInitDialog, etc
|
||||
// SetCtlColors (used by some UIs), SetBrandingImage, .onGUIInit, etc
|
||||
#define NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
|
||||
// NSIS_CONFIG_COMPRESSION_SUPPORT enables support for making installers
|
||||
|
@ -103,9 +107,9 @@
|
|||
|
||||
// NSIS_CONFIG_LOG enables the logging facility.
|
||||
// turning this on (by uncommenting it) adds about
|
||||
// 3kb, but can be useful in debugging your installers.
|
||||
// 4kb, but can be useful in debugging your installers.
|
||||
// NOT ENABLED BY DEFAULT.
|
||||
// #define NSIS_CONFIG_LOG
|
||||
//#define NSIS_CONFIG_LOG
|
||||
|
||||
// NSIS_SUPPORT_BGBG enables support for the blue (well, whatever
|
||||
// color you want) gradient background window.
|
||||
|
@ -253,7 +257,7 @@
|
|||
#undef NSIS_SUPPORT_BGBG
|
||||
#endif
|
||||
#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
#undef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
#undef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -354,18 +358,22 @@
|
|||
#error NSIS_MAX_INST_TYPES > 32
|
||||
#endif
|
||||
|
||||
#ifndef NSIS_DEFAULT_LANG
|
||||
#define NSIS_DEFAULT_LANG 1033
|
||||
#endif
|
||||
|
||||
#ifndef INVALID_FILE_ATTRIBUTES
|
||||
#define INVALID_FILE_ATTRIBUTES ((DWORD)-1)
|
||||
#endif
|
||||
|
||||
// This is the old static var count that occupies memory
|
||||
// From $0 to $PLUGINSDIR
|
||||
#define USER_VARS_COUNT 26
|
||||
// From $0 to $PLUGINSDIR, $_CLICK
|
||||
#define USER_VARS_COUNT 28
|
||||
|
||||
#ifdef NSIS_SUPPORT_NAMED_USERVARS
|
||||
// This is the total number of old static var
|
||||
// From $0 to $HWNDPARENT
|
||||
#define TOTAL_COMPATIBLE_STATIC_VARS_COUNT 36
|
||||
#define TOTAL_COMPATIBLE_STATIC_VARS_COUNT 37
|
||||
|
||||
#define VARS_SECTION_NAME ".ndata"
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,7 @@
|
|||
#ifndef _EXEC_H_
|
||||
#define _EXEC_H_
|
||||
|
||||
extern union installer_flags g_flags;
|
||||
extern union exec_flags g_exec_flags;
|
||||
|
||||
int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress); // returns 0 on success
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#include "state.h"
|
||||
#include "resource.h"
|
||||
#include "lang.h"
|
||||
#include "ui.h"
|
||||
#include "exec.h"
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
#ifdef NSIS_COMPRESS_USE_ZLIB
|
||||
|
@ -23,11 +25,12 @@
|
|||
#endif//NSIS_COMPRESS_USE_BZIP2
|
||||
#endif//NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
|
||||
#include "ui.h"
|
||||
struct block_header g_blocks[BLOCKS_NUM];
|
||||
header *g_header;
|
||||
int g_flags;
|
||||
int g_filehdrsize;
|
||||
int g_is_uninstaller;
|
||||
|
||||
char *g_db_strtab;
|
||||
|
||||
static int g_db_offset;
|
||||
HANDLE g_db_hFile;
|
||||
|
||||
#if defined(NSIS_CONFIG_COMPRESSION_SUPPORT) && defined(NSIS_COMPRESS_WHOLE)
|
||||
|
@ -46,24 +49,42 @@ BOOL CALLBACK verProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
if (uMsg == WM_INITDIALOG)
|
||||
{
|
||||
SetTimer(hwndDlg,1,250,NULL);
|
||||
msg = (char*)lParam;
|
||||
msg = (char *) lParam;
|
||||
uMsg = WM_TIMER;
|
||||
}
|
||||
if (uMsg == WM_TIMER)
|
||||
if (uMsg == WM_TIMER
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
|| uMsg == WM_DESTROY
|
||||
#endif
|
||||
)
|
||||
{
|
||||
static char bt[64];
|
||||
wsprintf(bt,msg,MulDiv(m_pos,100,m_length));
|
||||
int percent=MulDiv(m_pos,100,m_length);
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
if (msg)
|
||||
#endif
|
||||
{
|
||||
wsprintf(bt,msg,percent);
|
||||
|
||||
my_SetWindowText(hwndDlg,bt);
|
||||
my_SetDialogItemText(hwndDlg,IDC_STR,bt);
|
||||
my_SetWindowText(hwndDlg,bt);
|
||||
my_SetDialogItemText(hwndDlg,IDC_STR,bt);
|
||||
|
||||
ShowWindow(hwndDlg, SW_SHOW);
|
||||
}
|
||||
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
if (ui_st_updateflag & 1)
|
||||
{
|
||||
wsprintf(bt, "... %d%%", percent);
|
||||
update_status_text(0, bt);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endif//NSIS_CONFIG_CRC_SUPPORT || NSIS_COMPRESS_WHOLE
|
||||
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
||||
int inst_flags;
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
static z_stream g_inflate_stream;
|
||||
#endif
|
||||
|
@ -84,11 +105,14 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
|
||||
void *data;
|
||||
firstheader h;
|
||||
header *header;
|
||||
|
||||
HANDLE db_hFile;
|
||||
|
||||
GetModuleFileName(g_hInstance, state_exe_directory, NSIS_MAX_STRLEN);
|
||||
|
||||
g_db_hFile = myOpenFile(state_exe_directory, GENERIC_READ, OPEN_EXISTING);
|
||||
if (g_db_hFile == INVALID_HANDLE_VALUE)
|
||||
g_db_hFile = db_hFile = myOpenFile(state_exe_directory, GENERIC_READ, OPEN_EXISTING);
|
||||
if (db_hFile == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return _LANG_CANTOPENSELF;
|
||||
}
|
||||
|
@ -97,7 +121,7 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
|
||||
trimslashtoend(state_exe_directory);
|
||||
|
||||
left = m_length = GetFileSize(g_db_hFile,NULL);
|
||||
left = m_length = GetFileSize(db_hFile,NULL);
|
||||
while (left > 0)
|
||||
{
|
||||
static char temp[512];
|
||||
|
@ -160,7 +184,7 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
||||
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
||||
else if (cl_flags & FH_FLAGS_SILENT == 0)
|
||||
else if ((cl_flags & FH_FLAGS_SILENT) == 0)
|
||||
#endif//NSIS_CONFIG_SILENT_SUPPORT
|
||||
{
|
||||
if (hwnd)
|
||||
|
@ -200,7 +224,7 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
if (do_crc)
|
||||
{
|
||||
int fcrc;
|
||||
SetSelfFilePointer(m_pos, FILE_BEGIN);
|
||||
SetSelfFilePointer(m_pos);
|
||||
if (!ReadSelfFile(&fcrc, sizeof(int)) || crc != fcrc)
|
||||
return _LANG_INVALIDCRC;
|
||||
}
|
||||
|
@ -218,10 +242,10 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
if (dbd_hFile == INVALID_HANDLE_VALUE)
|
||||
return _LANG_ERRORWRITINGTEMP;
|
||||
}
|
||||
dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader), FILE_BEGIN);
|
||||
dbd_srcpos = SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
|
||||
dbd_fulllen = dbd_srcpos - sizeof(h) + h.length_of_all_following_data - ((cl_flags & FH_FLAGS_NO_CRC) ? 0 : sizeof(int));
|
||||
#else
|
||||
SetSelfFilePointer(g_filehdrsize + sizeof(firstheader), FILE_BEGIN);
|
||||
SetSelfFilePointer(g_filehdrsize + sizeof(firstheader));
|
||||
#endif
|
||||
|
||||
if (GetCompressedDataFromDataBlockToMemory(-1, data, h.length_of_header) != h.length_of_header)
|
||||
|
@ -230,40 +254,35 @@ const char * NSISCALL loadHeaders(int cl_flags)
|
|||
return _LANG_INVALIDCRC;
|
||||
}
|
||||
|
||||
#if !defined(NSIS_COMPRESS_WHOLE) || !defined(NSIS_CONFIG_COMPRESSION_SUPPORT)
|
||||
g_db_offset = SetSelfFilePointer(0,FILE_CURRENT);
|
||||
#else
|
||||
g_db_offset = dbd_pos;
|
||||
#endif
|
||||
header = g_header = data;
|
||||
|
||||
g_inst_combinedheader = data;
|
||||
|
||||
inst_flags = g_inst_cmnheader->flags;
|
||||
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
||||
if (cl_flags & FH_FLAGS_SILENT) inst_flags |= CH_FLAGS_SILENT;
|
||||
if (cl_flags & FH_FLAGS_SILENT)
|
||||
header->flags |= CH_FLAGS_SILENT;
|
||||
|
||||
g_exec_flags.silent = header->flags & (CH_FLAGS_SILENT | CH_FLAGS_SILENT_LOG);
|
||||
#endif
|
||||
|
||||
g_flags = header->flags;
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
if (h.flags & FH_FLAGS_UNINSTALL)
|
||||
{
|
||||
g_is_uninstaller++;
|
||||
g_inst_page = (page *) (g_inst_uninstheader + 1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
g_inst_section=(section *) (g_inst_header + 1);
|
||||
num_sections=g_inst_header->num_sections;
|
||||
g_inst_page=(page *) (g_inst_section + num_sections);
|
||||
}
|
||||
g_inst_entry = (entry *) (g_inst_page + g_inst_cmnheader->num_pages);
|
||||
g_db_strtab = (char *) (g_inst_entry + g_inst_cmnheader->num_entries);
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char * NSISCALL GetStringFromStringTab(int offs)
|
||||
{
|
||||
return g_db_strtab+(offs < 0 ? LANG_STR_TAB(offs) : offs);
|
||||
crc = BLOCKS_NUM;
|
||||
while (crc--)
|
||||
header->blocks[crc].offset += (int)data;
|
||||
|
||||
#ifdef NSIS_COMPRESS_WHOLE
|
||||
header->blocks[NB_DATA].offset = dbd_pos;
|
||||
#else
|
||||
header->blocks[NB_DATA].offset = SetFilePointer(db_hFile,0,NULL,FILE_CURRENT);
|
||||
#endif
|
||||
|
||||
mini_memcpy(&g_blocks, &header->blocks, sizeof(g_blocks));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define IBUFSIZE 16384
|
||||
|
@ -285,16 +304,7 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
|
||||
if (offset>=0)
|
||||
{
|
||||
/*
|
||||
int lp=SetSelfFilePointer(0,FILE_CURRENT);
|
||||
if (lp > g_db_offset+offset)
|
||||
{
|
||||
char buf[1023];
|
||||
wsprintf(buf,"going from %d to %d",lp,g_db_offset+offset);
|
||||
MessageBox(NULL,buf,"seeking back",MB_OK);
|
||||
}
|
||||
*/
|
||||
SetSelfFilePointer(g_db_offset+offset,FILE_BEGIN);
|
||||
SetSelfFilePointer(g_blocks[NB_DATA].offset+offset);
|
||||
}
|
||||
|
||||
if (!ReadSelfFile((LPVOID)&input_len,sizeof(int))) return -3;
|
||||
|
@ -302,8 +312,12 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
|
||||
if (input_len & 0x80000000) // compressed
|
||||
{
|
||||
char progress[64];
|
||||
int input_len_total;
|
||||
DWORD ltc = GetTickCount(), tc;
|
||||
|
||||
inflateReset(&g_inflate_stream);
|
||||
input_len &= 0x7fffffff; // take off top bit.
|
||||
input_len_total = input_len &= 0x7fffffff; // take off top bit.
|
||||
|
||||
while (input_len > 0)
|
||||
{
|
||||
|
@ -328,6 +342,14 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
|
||||
u=(char*)g_inflate_stream.next_out - outbuffer;
|
||||
|
||||
tc = GetTickCount();
|
||||
if (tc - ltc > 200 || !input_len)
|
||||
{
|
||||
wsprintf(progress, "... %d%%", MulDiv(input_len_total - input_len, 100, input_len_total));
|
||||
update_status_text(0, progress);
|
||||
ltc = tc;
|
||||
}
|
||||
|
||||
if (!u) break;
|
||||
|
||||
if (!outbuf)
|
||||
|
@ -386,7 +408,7 @@ static int NSISCALL __ensuredata(int amount)
|
|||
int needed=amount-(dbd_size-dbd_pos);
|
||||
if (needed>0)
|
||||
{
|
||||
SetSelfFilePointer(dbd_srcpos,FILE_BEGIN);
|
||||
SetSelfFilePointer(dbd_srcpos);
|
||||
SetFilePointer(dbd_hFile,dbd_size,NULL,FILE_BEGIN);
|
||||
m_length=needed;
|
||||
m_pos=0;
|
||||
|
@ -402,9 +424,9 @@ static int NSISCALL __ensuredata(int amount)
|
|||
{
|
||||
DWORD r,t;
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
if (g_inst_cmnheader)
|
||||
if (g_header)
|
||||
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
||||
if (!(inst_flags&(CH_FLAGS_SILENT|CH_FLAGS_SILENT_LOG)))
|
||||
if (!g_exec_flags.silent)
|
||||
#endif
|
||||
{
|
||||
if (hwnd) {
|
||||
|
@ -412,13 +434,13 @@ static int NSISCALL __ensuredata(int amount)
|
|||
m_pos=m_length-(amount-(dbd_size-dbd_pos));
|
||||
while (PeekMessage(&msg,NULL,0,0,PM_REMOVE)) DispatchMessage(&msg);
|
||||
}
|
||||
else if (g_hwnd && GetTickCount() > verify_time)
|
||||
else if (GetTickCount() > verify_time)
|
||||
hwnd = CreateDialogParam(
|
||||
g_hInstance,
|
||||
MAKEINTRESOURCE(IDD_VERIFY),
|
||||
0,
|
||||
verProc,
|
||||
(LPARAM)_LANG_UNPACKING
|
||||
g_hwnd ? 0 : (LPARAM)_LANG_UNPACKING
|
||||
);
|
||||
}
|
||||
#endif//NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
|
@ -458,7 +480,7 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
int retval;
|
||||
if (offset>=0)
|
||||
{
|
||||
dbd_pos=g_db_offset+offset;
|
||||
dbd_pos=g_blocks[NB_DATA].offset+offset;
|
||||
SetFilePointer(dbd_hFile,dbd_pos,NULL,FILE_BEGIN);
|
||||
}
|
||||
retval=__ensuredata(sizeof(int));
|
||||
|
@ -499,7 +521,7 @@ BOOL NSISCALL ReadSelfFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead)
|
|||
return ReadFile(g_db_hFile,lpBuffer,nNumberOfBytesToRead,&rd,NULL) && (rd == nNumberOfBytesToRead);
|
||||
}
|
||||
|
||||
DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove, DWORD dwMoveMethod)
|
||||
DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove)
|
||||
{
|
||||
return SetFilePointer(g_db_hFile,lDistanceToMove,NULL,dwMoveMethod);
|
||||
return SetFilePointer(g_db_hFile,lDistanceToMove,NULL,FILE_BEGIN);
|
||||
}
|
||||
|
|
|
@ -4,22 +4,23 @@
|
|||
#define _FILEFORM_H_
|
||||
|
||||
|
||||
// stored in file:
|
||||
// exehead (~34k)
|
||||
// firstheader (~28 bytes)
|
||||
// hdrinfo (4 bytes describing length/compression)::
|
||||
// (if install)
|
||||
// header (~228 bytes)
|
||||
// sections (20 bytes each)
|
||||
// (if uninstall)
|
||||
// uninstall_header (~116 bytes)
|
||||
// pages (12 bytes each)
|
||||
// entries (24 bytes each)
|
||||
// string table
|
||||
// language tables
|
||||
// datablock
|
||||
// (hdrinfo+datablock is at least 512 bytes if CRC enabled)
|
||||
// * the installer is compsed of the following parts:
|
||||
// exehead (~34kb)
|
||||
// firstheader (struct firstheader)
|
||||
// * headers (compressed together):
|
||||
// header (struct header)
|
||||
// * nsis blocks (described in header->blocks)
|
||||
// pages (struct page)
|
||||
// section headers (struct section)
|
||||
// entries/instructions (struct entry)
|
||||
// strings (null seperated)
|
||||
// language tables (language id, dialog offset, language strings)
|
||||
// colors (struct color)
|
||||
// data block (files and uninstaller data)
|
||||
// * not compressed
|
||||
// CRC (optional - 4 bytes)
|
||||
//
|
||||
// headers + datablock is at least 512 bytes if CRC enabled
|
||||
|
||||
|
||||
#define MAX_ENTRY_OFFSETS 6
|
||||
|
@ -92,8 +93,7 @@ enum
|
|||
|
||||
#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
EW_GETDLGITEM, // GetDlgItem: 3: [outputvar, dialog, item_id]
|
||||
EW_GETWINTEXT, // GetWindowText: 2: [outputvar, hwnd]
|
||||
EW_SETBKCOLOR, // SerBkColor: 2: [hwnd, color]
|
||||
EW_SETCTLCOLORS, // SerCtlColors: 3: [hwnd, pointer to struct colors]
|
||||
EW_SETBRANDINGIMAGE, // SetBrandingImage: 1: [Bitmap file]
|
||||
EW_CREATEFONT, // CreateFont: 5: [handle output, face name, height, weight, flags]
|
||||
EW_SHOWWINDOW, // ShowWindow: 2: [hwnd, show state]
|
||||
|
@ -211,96 +211,6 @@ typedef struct
|
|||
int length_of_all_following_data;
|
||||
} firstheader;
|
||||
|
||||
// Strings common to both installers and uninstallers
|
||||
typedef struct
|
||||
{
|
||||
int name; // name of installer
|
||||
|
||||
// unprocessed strings
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
int branding;
|
||||
int backbutton;
|
||||
int nextbutton;
|
||||
int cancelbutton;
|
||||
int showdetailsbutton;
|
||||
int closebutton; // "Close"
|
||||
int completed;
|
||||
|
||||
int copy_details;
|
||||
|
||||
int byte;
|
||||
int kilo;
|
||||
int mega;
|
||||
int giga;
|
||||
|
||||
// processed strings
|
||||
int subcaptions[5];
|
||||
#endif
|
||||
int caption; // name of installer + " Setup" or whatever.
|
||||
|
||||
#ifdef NSIS_SUPPORT_FILE
|
||||
int fileerrtext;
|
||||
int fileerrtext_noignore;
|
||||
#endif
|
||||
|
||||
#if defined(NSIS_SUPPORT_DELETE) || defined(NSIS_SUPPORT_RMDIR) || defined(NSIS_SUPPORT_FILE)
|
||||
int cant_write;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_RMDIR
|
||||
int remove_dir;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_COPYFILES
|
||||
int copy_failed;
|
||||
int copy_to;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_ACTIVEXREG
|
||||
int registering;
|
||||
int unregistering;
|
||||
int symbol_not_found;
|
||||
int could_not_load;
|
||||
int no_ole;
|
||||
// not used anywhere - int err_reg_dll;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_CREATESHORTCUT
|
||||
int create_shortcut;
|
||||
int err_creating_shortcut;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_DELETE
|
||||
int del_file;
|
||||
#ifdef NSIS_SUPPORT_MOVEONREBOOT
|
||||
int del_on_reboot;
|
||||
#endif
|
||||
#endif
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
int created_uninst;
|
||||
int err_creating;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_SHELLEXECUTE
|
||||
int exec_shell;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_EXECUTE
|
||||
int exec;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_MOVEONREBOOT
|
||||
int rename_on_reboot;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_RENAME
|
||||
int rename;
|
||||
#endif
|
||||
#ifdef NSIS_SUPPORT_FILE
|
||||
int extract;
|
||||
int err_writing;
|
||||
int err_decompressing;
|
||||
int skipped;
|
||||
#endif
|
||||
int inst_corrupted;
|
||||
int output_dir;
|
||||
int create_dir;
|
||||
#ifdef NSIS_CONFIG_LOG
|
||||
int log_install_process;
|
||||
#endif
|
||||
} common_strings;
|
||||
|
||||
// Flags for common_header.flags
|
||||
#define CH_FLAGS_DETAILS_SHOWDETAILS 1
|
||||
#define CH_FLAGS_DETAILS_NEVERSHOW 2
|
||||
|
@ -316,25 +226,54 @@ typedef struct
|
|||
#define CH_FLAGS_COMP_ONLY_ON_CUSTOM 256
|
||||
#define CH_FLAGS_NO_CUSTOM 512
|
||||
#endif
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
#define CH_FLAGS_LICENSE_FORCE_SELECTION 1024
|
||||
|
||||
// nsis blocks
|
||||
struct block_header {
|
||||
int offset;
|
||||
int num;
|
||||
};
|
||||
|
||||
enum {
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
NB_PAGES,
|
||||
#endif
|
||||
NB_SECTIONS,
|
||||
NB_ENTRIES,
|
||||
NB_STRINGS,
|
||||
NB_LANGTABLES,
|
||||
NB_CTLCOLORS,
|
||||
NB_DATA,
|
||||
|
||||
BLOCKS_NUM
|
||||
};
|
||||
|
||||
// Settings common to both installers and uninstallers
|
||||
typedef struct
|
||||
{
|
||||
int language_tables_num; // number of strings tables in array
|
||||
int language_table_size; // size of each language table
|
||||
int flags; // CH_FLAGS_*
|
||||
struct block_header blocks[BLOCKS_NUM];
|
||||
|
||||
int num_entries; // total number of entries
|
||||
int num_string_bytes; // total number of bytes taken by strings
|
||||
|
||||
int num_pages; // number of used pages (including custom pages)
|
||||
// InstallDirRegKey stuff
|
||||
int install_reg_rootkey;
|
||||
// these two are not processed!
|
||||
int install_reg_key_ptr, install_reg_value_ptr;
|
||||
|
||||
#ifdef NSIS_SUPPORT_BGBG
|
||||
int bg_color1, bg_color2, bg_textcolor;
|
||||
#endif
|
||||
int lb_bg, lb_fg, license_bg;
|
||||
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
// installation log window colors
|
||||
int lb_bg, lb_fg;
|
||||
#endif
|
||||
|
||||
// langtable size
|
||||
int langtable_size;
|
||||
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
// license background color
|
||||
int license_bg;
|
||||
#endif//NSIS_CONFIG_LICENSEPAGE
|
||||
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
// .on* calls
|
||||
|
@ -346,69 +285,6 @@ typedef struct
|
|||
int code_onGUIInit;
|
||||
int code_onGUIEnd;
|
||||
#endif
|
||||
#endif//NSIS_SUPPORT_CODECALLBACKS
|
||||
|
||||
int flags; // CH_FLAGS_*
|
||||
} common_header;
|
||||
|
||||
// Strings specific to installers
|
||||
typedef struct
|
||||
{
|
||||
// these first strings are literals (should not be encoded)
|
||||
#ifdef NSIS_CONFIG_VISIBLE_SUPPORT
|
||||
int browse; // "Browse..."
|
||||
int installbutton; // "Install"
|
||||
int spacerequired; // "Space required: "
|
||||
int spaceavailable; // "Space available: "
|
||||
int custom; // Custom
|
||||
int text; // directory page text
|
||||
int dirsubtext; // directory text2
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
int componenttext; // component page text
|
||||
int componentsubtext[4];
|
||||
#endif
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
int licensetext; // license page text
|
||||
int licensedata; // license text
|
||||
int licensebutton; // license button text
|
||||
int licensebuttonagree; // agree check box/radio button
|
||||
int licensebuttondisagree; // disagree check box/radio button
|
||||
#endif//NSIS_CONFIG_LICENSEPAGE
|
||||
#else
|
||||
int foo;
|
||||
#endif
|
||||
} installer_strings;
|
||||
|
||||
// Settings specific to installers
|
||||
typedef struct
|
||||
{
|
||||
// common settings
|
||||
common_header common;
|
||||
|
||||
int install_reg_rootkey;
|
||||
// these two are not processed!
|
||||
int install_reg_key_ptr, install_reg_value_ptr;
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
int install_types[NSIS_MAX_INST_TYPES+1];
|
||||
#endif
|
||||
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
int license_bg; // license background color
|
||||
#endif//NSIS_CONFIG_LICENSEPAGE
|
||||
|
||||
int install_directory_ptr; // default install dir.
|
||||
int install_directory_auto_append; // auto append part
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
int uninstdata_offset; // -1 if no uninst data.
|
||||
int uninsticon_size;
|
||||
#endif
|
||||
|
||||
int num_sections; // total number of sections
|
||||
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
// .on* calls
|
||||
int code_onVerifyInstDir;
|
||||
#ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT
|
||||
int code_onMouseOverSection;
|
||||
|
@ -417,26 +293,20 @@ typedef struct
|
|||
int code_onSelChange;
|
||||
#endif//NSIS_CONFIG_COMPONENTPAGE
|
||||
#endif//NSIS_SUPPORT_CODECALLBACKS
|
||||
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
int install_types[NSIS_MAX_INST_TYPES+1];
|
||||
#endif
|
||||
|
||||
int install_directory_ptr; // default install dir.
|
||||
int install_directory_auto_append; // auto append part
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
int uninstdata_offset; // -1 if no uninst data.
|
||||
int uninsticon_size;
|
||||
#endif
|
||||
} header;
|
||||
|
||||
// Strings specific to uninstallers
|
||||
typedef struct
|
||||
{
|
||||
int uninstbutton;
|
||||
int uninstalltext;
|
||||
int uninstalltext2;
|
||||
} uninstall_strings;
|
||||
|
||||
// Settings specific to uninstallers
|
||||
typedef struct
|
||||
{
|
||||
// common settings
|
||||
common_header common;
|
||||
|
||||
int code;
|
||||
int code_size;
|
||||
} uninstall_header;
|
||||
|
||||
// used for section->flags
|
||||
#define SF_SELECTED 1
|
||||
#define SF_SUBSEC 2
|
||||
|
@ -462,36 +332,77 @@ typedef struct
|
|||
int offsets[MAX_ENTRY_OFFSETS]; // count and meaning of offsets depend on 'which'
|
||||
} entry;
|
||||
|
||||
// page window proc
|
||||
enum
|
||||
{
|
||||
NSIS_PAGE_CUSTOM = -1,
|
||||
#ifdef NSIS_CONFIG_LICENSEPAGE
|
||||
NSIS_PAGE_LICENSE,
|
||||
PWP_LICENSE,
|
||||
#endif
|
||||
#ifdef NSIS_CONFIG_COMPONENTPAGE
|
||||
NSIS_PAGE_SELCOM,
|
||||
PWP_SELCOM,
|
||||
#endif
|
||||
NSIS_PAGE_DIR,
|
||||
NSIS_PAGE_INSTFILES,
|
||||
NSIS_PAGE_COMPLETED,
|
||||
PWP_DIR,
|
||||
PWP_INSTFILES,
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
NSIS_PAGE_UNINST
|
||||
PWP_UNINST,
|
||||
#endif
|
||||
PWP_COMPLETED,
|
||||
PWP_CUSTOM
|
||||
};
|
||||
|
||||
// page flags
|
||||
#define PF_BACK_ENABLE 256
|
||||
#define PF_NEXT_ENABLE 2
|
||||
#define PF_CANCEL_ENABLE 4
|
||||
#define PF_BACK_SHOW 8 // must be SW_SHOWNA, don't change
|
||||
#define PF_LICENSE_STREAM 16
|
||||
#define PF_LICENSE_FORCE_SELECTION 32
|
||||
#define PF_LICENSE_NO_FORCE_SELECTION 64
|
||||
#define PF_LICENSE_SELECTED 1 // must be 1
|
||||
#define PF_NO_NEXT_FOCUS 128
|
||||
#define PF_PAGE_EX 512
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int id; // index in the pages array
|
||||
int dlg_id; // dialog resource id
|
||||
int wndproc_id;
|
||||
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
int prefunc; // called before the page is created, or if custom to show the it. Allows to skip the page using Abort.
|
||||
int showfunc; // function to do stuff right before page is shown
|
||||
int leavefunc; // function to do stuff after the page is shown
|
||||
// called before the page is created, or if custom to show the page
|
||||
// use Abort to skip the page
|
||||
int prefunc;
|
||||
// called right before page is shown
|
||||
int showfunc;
|
||||
// called when the user leaves to the next page
|
||||
// use Abort to force the user to stay on this page
|
||||
int leavefunc;
|
||||
#endif //NSIS_SUPPORT_CODECALLBACKS
|
||||
int caption; // caption tab
|
||||
|
||||
int flags;
|
||||
|
||||
int caption;
|
||||
int back;
|
||||
int next;
|
||||
int button_states;
|
||||
int clicknext;
|
||||
int cancel;
|
||||
|
||||
int parms[5];
|
||||
} page;
|
||||
|
||||
#define CC_TEXT 1
|
||||
#define CC_TEXT_SYS 2
|
||||
#define CC_BK 4
|
||||
#define CC_BK_SYS 8
|
||||
#define CC_BKB 16
|
||||
|
||||
typedef struct {
|
||||
COLORREF text;
|
||||
LOGBRUSH bk;
|
||||
HBRUSH bkb;
|
||||
int bkmode;
|
||||
int flags;
|
||||
} ctlcolors;
|
||||
|
||||
// the following are only used/implemented in exehead, not makensis.
|
||||
|
||||
int NSISCALL isheader(firstheader *h); // returns 0 on not header, length_of_datablock on success
|
||||
|
@ -510,9 +421,8 @@ int NSISCALL _dodecomp(int offset, HANDLE hFileOut, char *outbuf, int outbuflen)
|
|||
extern HANDLE g_db_hFile;
|
||||
extern int g_quit_flag;
|
||||
|
||||
const char * NSISCALL GetStringFromStringTab(int offs);
|
||||
BOOL NSISCALL ReadSelfFile(LPVOID lpBuffer, DWORD nNumberOfBytesToRead);
|
||||
DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove, DWORD dwMoveMethod);
|
||||
DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove);
|
||||
|
||||
// $0..$9, $INSTDIR, etc are encoded as ASCII bytes starting from this value.
|
||||
// Added by ramon 3 jun 2003
|
||||
|
@ -539,7 +449,7 @@ DWORD NSISCALL SetSelfFilePointer(LONG lDistanceToMove, DWORD dwMoveMethod);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
union installer_flags {
|
||||
union exec_flags {
|
||||
struct {
|
||||
int autoclose;
|
||||
int all_user_var;
|
||||
|
@ -550,8 +460,39 @@ union installer_flags {
|
|||
#endif
|
||||
int cur_insttype;
|
||||
int insttype_changed;
|
||||
#ifdef NSIS_CONFIG_SILENT_SUPPORT
|
||||
int silent;
|
||||
#endif
|
||||
};
|
||||
int flags[1];
|
||||
};
|
||||
|
||||
#ifdef EXEHEAD
|
||||
extern struct block_header g_blocks[BLOCKS_NUM];
|
||||
extern header *g_header;
|
||||
extern int g_flags;
|
||||
extern int g_filehdrsize;
|
||||
extern int g_is_uninstaller;
|
||||
|
||||
#define g_pages ((page*)g_blocks[NB_PAGES].offset)
|
||||
#define g_sections ((section*)g_blocks[NB_SECTIONS].offset)
|
||||
#define num_sections (g_blocks[NB_SECTIONS].num)
|
||||
#define g_entries ((entry*)g_blocks[NB_ENTRIES].offset)
|
||||
/*extern int num_sections;
|
||||
|
||||
//extern int g_autoclose;
|
||||
extern void *g_inst_combinedheader;
|
||||
extern page *g_inst_page;
|
||||
extern section *g_inst_section;
|
||||
extern entry *g_inst_entry;
|
||||
|
||||
#define g_inst_header ((header *)g_inst_combinedheader)
|
||||
#define g_inst_cmnheader ((common_header *)g_inst_combinedheader)
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
#define g_inst_uninstheader ((uninstall_header *)g_inst_combinedheader)
|
||||
extern int g_is_uninstaller;
|
||||
#endif*/
|
||||
#endif
|
||||
|
||||
#endif //_FILEFORM_H_
|
||||
|
|
|
@ -24,99 +24,43 @@
|
|||
|
||||
#define _LANG_GENERIC_ERROR "NSIS ERROR"
|
||||
|
||||
#define LANG_STR_TAB(x) cur_langtable[-((int)x+1)]
|
||||
|
||||
// Changed by Amir Szekely 3rd August 2002
|
||||
// Now supports more than one language in each installer
|
||||
|
||||
// Modified by Dave Laundon 10th August 2002
|
||||
// In many places, these strings are now referenced by an ID (just their offsets
|
||||
// into the (common|installer|uninstall)_strings structures) through *_from_lang
|
||||
// and *FromLang functions - removing code-costly references to the
|
||||
// cur_(common|install|uninstall)_strings_table globals. Common strings are
|
||||
// identified by IDs >=0 and install/uninstall strings by IDs <0. What's more,
|
||||
// these IDs fall between -128 to +127 and compile to tiny 2-byte PUSH <8-bit>
|
||||
// instructions when being passed to the functions.
|
||||
|
||||
// Please note that all LANG_* define the offset not the string itself.
|
||||
// To get the string itself use process_string_fromtab, GetStringFromStringTab or LANG_STR().
|
||||
|
||||
#define LANG_STR(x) GetStringFromStringTab(x)
|
||||
#define LANG_STR_TAB(x) cur_language_table[-((int)x+1)]
|
||||
|
||||
#define INSTALL_STR(x) (~((sizeof(common_strings) + FIELD_OFFSET(installer_strings, x)) / sizeof(int)))
|
||||
|
||||
// Installer specific strings
|
||||
#define LANG_BTN_BROWSE (INSTALL_STR(browse))
|
||||
#define LANG_BTN_INSTALL (INSTALL_STR(installbutton))
|
||||
#define LANG_SPACE_REQ (INSTALL_STR(spacerequired))
|
||||
#define LANG_SPACE_AVAIL (INSTALL_STR(spaceavailable))
|
||||
#define LANG_COMP_CUSTOM (INSTALL_STR(custom))
|
||||
#define LANG_DIR_TEXT (INSTALL_STR(text))
|
||||
#define LANG_DIR_SUBTEXT (INSTALL_STR(dirsubtext))
|
||||
#define LANG_COMP_TEXT (INSTALL_STR(componenttext))
|
||||
#define LANG_COMP_SUBTEXT(x) (INSTALL_STR(componentsubtext[x]))
|
||||
#define LANG_LICENSE_TEXT (INSTALL_STR(licensetext))
|
||||
#define LANG_LICENSE_DATA (INSTALL_STR(licensedata))
|
||||
#define LANG_BTN_LICENSE (INSTALL_STR(licensebutton))
|
||||
#define LANG_BTN_LICENSE_AGREE (INSTALL_STR(licensebuttonagree))
|
||||
#define LANG_BTN_LICENSE_DISAGREE (INSTALL_STR(licensebuttondisagree))
|
||||
|
||||
#define UNINSTALL_STR(x) (~((sizeof(common_strings) + FIELD_OFFSET(uninstall_strings, x)) / sizeof(int)))
|
||||
|
||||
// Uninstall specific strings
|
||||
#define LANG_BTN_UNINST (UNINSTALL_STR(uninstbutton))
|
||||
#define LANG_UNINST_TEXT (UNINSTALL_STR(uninstalltext))
|
||||
#define LANG_UNINST_SUBTEXT (UNINSTALL_STR(uninstalltext2))
|
||||
|
||||
#define COMMON_STR(x) (~(FIELD_OFFSET(common_strings, x) / sizeof(int)))
|
||||
|
||||
// Common strings
|
||||
#define LANG_BTN_NEXT (COMMON_STR(nextbutton))
|
||||
#define LANG_BTN_BACK (COMMON_STR(backbutton))
|
||||
#define LANG_BRANDING (COMMON_STR(branding))
|
||||
#define LANG_BTN_CANCEL (COMMON_STR(cancelbutton))
|
||||
#define LANG_BTN_DETAILS (COMMON_STR(showdetailsbutton))
|
||||
#define LANG_COMPLETED (COMMON_STR(completed))
|
||||
#define LANG_BTN_CLOSE (COMMON_STR(closebutton))
|
||||
#define LANG_NAME (COMMON_STR(name))
|
||||
#define LANG_CAPTION (COMMON_STR(caption))
|
||||
#define LANG_SUBCAPTION(x) (COMMON_STR(subcaptions[x]))
|
||||
#define LANG_INSTCORRUPTED (COMMON_STR(inst_corrupted))
|
||||
#define LANG_COPYDETAILS (COMMON_STR(copy_details))
|
||||
#define LANG_LOG_INSTALL_PROCESS (COMMON_STR(log_install_process))
|
||||
#define LANG_BYTE (COMMON_STR(byte))
|
||||
#define LANG_KILO (COMMON_STR(kilo))
|
||||
#define LANG_MEGA (COMMON_STR(mega))
|
||||
#define LANG_GIGA (COMMON_STR(giga))
|
||||
|
||||
// instruction strings
|
||||
#define LANG_FILEERR (COMMON_STR(fileerrtext))
|
||||
#define LANG_FILEERR_NOIGNORE (COMMON_STR(fileerrtext_noignore))
|
||||
#define LANG_DELETEFILE (COMMON_STR(del_file))
|
||||
#define LANG_DLLREGERROR (COMMON_STR(err_reg_dll))
|
||||
#define LANG_REMOVEDIR (COMMON_STR(remove_dir))
|
||||
#define LANG_OUTPUTDIR (COMMON_STR(output_dir))
|
||||
#define LANG_CREATEDIR (COMMON_STR(create_dir))
|
||||
#define LANG_RENAME (COMMON_STR(rename))
|
||||
#define LANG_RENAMEONREBOOT (COMMON_STR(rename_on_reboot))
|
||||
#define LANG_SKIPPED (COMMON_STR(skipped))
|
||||
#define LANG_CANTWRITE (COMMON_STR(cant_write))
|
||||
#define LANG_EXTRACT (COMMON_STR(extract))
|
||||
#define LANG_ERRORWRITING (COMMON_STR(err_writing))
|
||||
#define LANG_ERRORDECOMPRESSING (COMMON_STR(err_decompressing))
|
||||
#define LANG_DELETEONREBOOT (COMMON_STR(del_on_reboot))
|
||||
#define LANG_EXECSHELL (COMMON_STR(exec_shell))
|
||||
#define LANG_EXECUTE (COMMON_STR(exec))
|
||||
#define LANG_CANNOTFINDSYMBOL (COMMON_STR(symbol_not_found))
|
||||
#define LANG_COULDNOTLOAD (COMMON_STR(could_not_load))
|
||||
#define LANG_NOOLE (COMMON_STR(no_ole))
|
||||
#define LANG_ERRORCREATINGSHORTCUT (COMMON_STR(err_creating_shortcut))
|
||||
#define LANG_CREATESHORTCUT (COMMON_STR(create_shortcut))
|
||||
#define LANG_COPYTO (COMMON_STR(copy_to))
|
||||
#define LANG_COPYFAILED (COMMON_STR(copy_failed))
|
||||
#define LANG_ERRORCREATING (COMMON_STR(err_creating))
|
||||
#define LANG_CREATEDUNINST (COMMON_STR(created_uninst))
|
||||
#define LANG_REGISTERING (COMMON_STR(registering))
|
||||
#define LANG_UNREGISTERING (COMMON_STR(unregistering))
|
||||
#define LANG_BRANDING -1
|
||||
#define LANG_CAPTION -2
|
||||
#define LANG_NAME -3
|
||||
#define LANG_SPACE_AVAIL -4
|
||||
#define LANG_SPACE_REQ -5
|
||||
#define LANG_CANTWRITE -6
|
||||
#define LANG_COPYFAILED -7
|
||||
#define LANG_COPYTO -8
|
||||
#define LANG_CANNOTFINDSYMBOL -9
|
||||
#define LANG_COULDNOTLOAD -10
|
||||
#define LANG_CREATEDIR -11
|
||||
#define LANG_CREATESHORTCUT -12
|
||||
#define LANG_CREATEDUNINST -13
|
||||
#define LANG_DELETEFILE -14
|
||||
#define LANG_DELETEONREBOOT -15
|
||||
#define LANG_ERRORCREATINGSHORTCUT -16
|
||||
#define LANG_ERRORCREATING -17
|
||||
#define LANG_ERRORDECOMPRESSING -18
|
||||
#define LANG_DLLREGERROR -19
|
||||
#define LANG_EXECSHELL -20
|
||||
#define LANG_EXECUTE -21
|
||||
#define LANG_EXTRACT -22
|
||||
#define LANG_ERRORWRITING -23
|
||||
#define LANG_INSTCORRUPTED -24
|
||||
#define LANG_NOOLE -25
|
||||
#define LANG_OUTPUTDIR -26
|
||||
#define LANG_REMOVEDIR -27
|
||||
#define LANG_RENAMEONREBOOT -28
|
||||
#define LANG_RENAME -29
|
||||
#define LANG_SKIPPED -30
|
||||
#define LANG_COPYDETAILS -31
|
||||
#define LANG_LOG_INSTALL_PROCESS -32
|
||||
#define LANG_BYTE -33
|
||||
#define LANG_KILO -34
|
||||
#define LANG_MEGA -35
|
||||
#define LANG_GIGA -36
|
||||
|
||||
#endif//_NSIS_LANG_H_
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
#define IDC_BACK 3
|
||||
#define IDD_LICENSE 102
|
||||
#define IDD_LICENSE_FSRB 108
|
||||
#define IDD_LICENSE_FSCB 109
|
||||
#define IDI_ICON2 103
|
||||
#define IDD_DIR 103
|
||||
#define IDD_SELCOM 104
|
||||
|
@ -15,7 +17,7 @@
|
|||
#define IDD_INSTFILES 106
|
||||
#define IDD_UNINST 107
|
||||
#define IDD_VERIFY 111
|
||||
#define IDB_BITMAP1 109
|
||||
#define IDB_BITMAP1 110
|
||||
#define IDC_EDIT1 1000
|
||||
#define IDC_BROWSE 1001
|
||||
#define IDC_PROGRESS 1004
|
||||
|
|
|
@ -28,57 +28,97 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
|||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_LICENSE$(NSIS_CONFIG_LICENSEPAGE) DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_LICENSE$(NSIS_CONFIG_LICENSEPAGE) DIALOGEX 0, 0, 266, 130
|
||||
#else
|
||||
IDD_LICENSE DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_LICENSE DIALOGEX 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,20,20
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,22,20
|
||||
LTEXT "",IDC_INTROTEXT,25,0,241,23
|
||||
CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
|
||||
0x804,0,24,266,105
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_LICENSE_FSRB$(NSIS_CONFIG_LICENSEPAGE) DIALOG DISCARDABLE 0, 0, 266, 130
|
||||
#else
|
||||
IDD_LICENSE_FSRB DIALOG DISCARDABLE 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
ICON IDI_ICON2,1031,0,0,22,20
|
||||
LTEXT "",IDC_INTROTEXT,25,0,241,23
|
||||
CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
|
||||
0x804,0,24,266,85
|
||||
CONTROL "",IDC_LICENSEDISAGREE,"Button",BS_AUTORADIOBUTTON |
|
||||
WS_TABSTOP,0,120,266,9
|
||||
CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTORADIOBUTTON |
|
||||
WS_TABSTOP,0,110,266,9
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_LICENSEPAGE)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_LICENSE_FSCB$(NSIS_CONFIG_LICENSEPAGE) DIALOG DISCARDABLE 0, 0, 266, 130
|
||||
#else
|
||||
IDD_LICENSE_FSCB DIALOG DISCARDABLE 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_CAPTION
|
||||
FONT 8, "MS Shell Dlg"
|
||||
BEGIN
|
||||
ICON IDI_ICON2,1031,0,0,22,20
|
||||
LTEXT "",IDC_INTROTEXT,25,0,241,23
|
||||
CONTROL "",IDC_EDIT1,"RichEdit20A",WS_BORDER | WS_VSCROLL |
|
||||
0x804,0,24,266,95
|
||||
CONTROL "",IDC_LICENSEAGREE,"Button",BS_AUTOCHECKBOX |
|
||||
WS_TABSTOP,0,120,266,9
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_DIR$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_DIR$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 266, 130
|
||||
#else
|
||||
IDD_DIR DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_DIR DIALOGEX 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
EDITTEXT IDC_DIR,8,49,187,12,ES_AUTOHSCROLL
|
||||
PUSHBUTTON "",IDC_BROWSE,202,48,55,14
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,20,20
|
||||
CONTROL "",IDC_SELDIRTEXT,"Static",SS_LEFTNOWORDWRAP,
|
||||
0,36,265,8
|
||||
CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,122,265,8
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,22,20
|
||||
|
||||
CONTROL "",IDC_SPACEAVAILABLE,"Static",SS_LEFTNOWORDWRAP,0,122,
|
||||
265,8
|
||||
CONTROL "",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE |
|
||||
WS_TABSTOP,8,65,118,10
|
||||
CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,111,265,8
|
||||
WS_TABSTOP,8,71,118,10
|
||||
CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFTNOWORDWRAP,0,111,
|
||||
265,8
|
||||
LTEXT "",IDC_INTROTEXT,25,0,241,34
|
||||
GROUPBOX "",IDC_SELDIRTEXT,1,38,264,30
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_COMPONENTPAGE)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_SELCOM$(NSIS_CONFIG_COMPONENTPAGE) DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_SELCOM$(NSIS_CONFIG_COMPONENTPAGE) DIALOGEX 0, 0, 266, 130
|
||||
#else
|
||||
IDD_SELCOM DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_SELCOM DIALOGEX 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
COMBOBOX IDC_COMBO1,114,25,152,102,CBS_DROPDOWNLIST | WS_VSCROLL |
|
||||
WS_TABSTOP | NOT WS_VISIBLE
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,21,20
|
||||
COMBOBOX IDC_COMBO1,114,25,152,102,CBS_DROPDOWNLIST | NOT
|
||||
WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,22,20
|
||||
LTEXT "",IDC_TEXT2,0,40,108,65
|
||||
CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,108,8
|
||||
CONTROL "",IDC_SPACEREQUIRED,"Static",SS_LEFT,0,111,111,18
|
||||
LTEXT "",IDC_SPACEREQUIRED,0,111,111,18,NOT WS_GROUP
|
||||
LTEXT "",IDC_INTROTEXT,25,0,241,25
|
||||
CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS |
|
||||
TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP |
|
||||
|
@ -88,53 +128,55 @@ END
|
|||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_INST$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX DISCARDABLE 0, 0, 280, 162
|
||||
IDD_INST$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 280, 162
|
||||
#else
|
||||
IDD_INST DIALOGEX DISCARDABLE 0, 0, 280, 162
|
||||
IDD_INST DIALOGEX 0, 0, 280, 162
|
||||
#endif
|
||||
STYLE DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_BORDER
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION |
|
||||
WS_SYSMENU
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "",IDC_BACK,171,142,50,14,WS_GROUP | NOT WS_VISIBLE
|
||||
PUSHBUTTON "",IDC_BACK,171,142,50,14,NOT WS_VISIBLE | WS_GROUP
|
||||
PUSHBUTTON "",IDOK,223,142,50,14
|
||||
PUSHBUTTON "",IDCANCEL,7,142,50,14
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | WS_GROUP,7,138,267,1
|
||||
CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE | WS_GROUP,
|
||||
7,6,266,130
|
||||
CTEXT "",IDC_VERSTR,59,145,108,8,WS_DISABLED | WS_GROUP
|
||||
CONTROL "",IDC_STATIC,"Static",SS_ETCHEDHORZ | WS_GROUP,7,138,
|
||||
267,1
|
||||
CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE |
|
||||
WS_GROUP,7,6,266,130
|
||||
CTEXT "",IDC_VERSTR,59,145,108,8,WS_DISABLED
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(NSIS_CONFIG_VISIBLE_SUPPORT)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_INSTFILES$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_INSTFILES$(NSIS_CONFIG_VISIBLE_SUPPORT) DIALOGEX 0, 0, 266, 130
|
||||
#else
|
||||
IDD_INSTFILES DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_INSTFILES DIALOGEX 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,11
|
||||
CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP,
|
||||
24,0,241,8
|
||||
CONTROL "",IDC_PROGRESS,"msctls_progress32",WS_BORDER,24,10,241,
|
||||
11
|
||||
CONTROL "",IDC_INTROTEXT,"Static",SS_LEFTNOWORDWRAP,24,0,241,8
|
||||
CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SINGLESEL |
|
||||
LVS_NOCOLUMNHEADER | NOT WS_VISIBLE | WS_BORDER |
|
||||
WS_TABSTOP,0,25,265,104
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,20,20
|
||||
ICON IDI_ICON2,IDC_ULICON,0,0,22,20
|
||||
PUSHBUTTON "",IDC_SHOWDETAILS,0,28,60,14,NOT WS_TABSTOP
|
||||
END
|
||||
#endif
|
||||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(_NSIS_CONFIG_UNINSTDLG)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_UNINST$(_NSIS_CONFIG_UNINSTDLG) DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_UNINST$(_NSIS_CONFIG_UNINSTDLG) DIALOGEX 0, 0, 266, 130
|
||||
#else
|
||||
IDD_UNINST DIALOGEX DISCARDABLE 0, 0, 266, 130
|
||||
IDD_UNINST DIALOGEX 0, 0, 266, 130
|
||||
#endif
|
||||
STYLE DS_CONTROL | DS_SHELLFONT | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDI_ICON2,IDC_ULICON,0,1,20,20
|
||||
ICON IDI_ICON2,IDC_ULICON,0,1,22,20
|
||||
LTEXT "",IDC_UNINSTFROM,0,45,55,8
|
||||
EDITTEXT IDC_EDIT1,56,43,209,12,ES_AUTOHSCROLL | ES_READONLY
|
||||
LTEXT "",IDC_INTROTEXT,25,0,241,34
|
||||
|
@ -143,12 +185,12 @@ END
|
|||
|
||||
#if defined(APSTUDIO_INVOKED) || defined(_NSIS_CONFIG_VERIFYDIALOG)
|
||||
#if defined(APSTUDIO_INVOKED)
|
||||
IDD_VERIFY$(_NSIS_CONFIG_VERIFYDIALOG) DIALOGEX DISCARDABLE 0, 0, 162, 22
|
||||
IDD_VERIFY$(_NSIS_CONFIG_VERIFYDIALOG) DIALOGEX 0, 0, 162, 22
|
||||
#else
|
||||
IDD_VERIFY DIALOGEX DISCARDABLE 0, 0, 162, 22
|
||||
IDD_VERIFY DIALOGEX 0, 0, 162, 22
|
||||
#endif
|
||||
STYLE DS_MODALFRAME | DS_SHELLFONT | DS_CENTER | WS_POPUP | WS_VISIBLE
|
||||
FONT 8, "MS Shell Dlg"
|
||||
STYLE DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CTEXT "",IDC_STR,7,7,148,8
|
||||
END
|
||||
|
|
|
@ -1,33 +1,22 @@
|
|||
#ifdef NSIS_SUPPORT_NAMED_USERVARS
|
||||
extern NSIS_STRING g_usrvars[TOTAL_COMPATIBLE_STATIC_VARS_COUNT];
|
||||
#define state_command_line g_usrvars[20]
|
||||
#define state_install_directory g_usrvars[21]
|
||||
#define state_output_directory g_usrvars[22]
|
||||
#define state_exe_directory g_usrvars[23]
|
||||
#define state_language g_usrvars[24]
|
||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
#define state_plugins_dir g_usrvars[25]
|
||||
#endif
|
||||
#define state_temp_dir g_usrvars[32]
|
||||
#else
|
||||
extern char temp_directory[NSIS_MAX_STRLEN];
|
||||
extern char g_usrvars[USER_VARS_COUNT][NSIS_MAX_STRLEN];
|
||||
extern char *state_command_line;
|
||||
extern char *state_install_directory;
|
||||
extern char *state_output_directory;
|
||||
extern char *state_exe_directory;
|
||||
extern char *state_language;
|
||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
extern char *state_plugins_dir;
|
||||
#endif
|
||||
#define state_temp_dir temp_directory
|
||||
#endif
|
||||
|
||||
#define state_command_line g_usrvars[20]
|
||||
#define state_install_directory g_usrvars[21]
|
||||
#define state_output_directory g_usrvars[22]
|
||||
#define state_exe_directory g_usrvars[23]
|
||||
#define state_language g_usrvars[24]
|
||||
#define state_temp_dir g_usrvars[25]
|
||||
#define state_click_next g_usrvars[26]
|
||||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
#define state_plugins_dir g_usrvars[27]
|
||||
#endif
|
||||
|
||||
extern char g_caption[NSIS_MAX_STRLEN*2];
|
||||
extern HWND g_hwnd;
|
||||
extern int g_filehdrsize;
|
||||
extern HANDLE g_hInstance;
|
||||
extern HWND insthwnd,insthwndbutton;
|
||||
extern HICON g_hIcon;
|
||||
|
||||
extern int inst_flags;
|
||||
extern HICON g_hIcon;
|
|
@ -1,29 +1,11 @@
|
|||
#ifndef _UI_H_
|
||||
#define _UI_H_
|
||||
|
||||
// Added by Amir Szekely 3rd August 2002
|
||||
extern char *language_tables;
|
||||
extern int *cur_language_table;
|
||||
extern int *cur_langtable;
|
||||
|
||||
int NSISCALL ui_doinstall(void);
|
||||
void NSISCALL update_status_text_from_lang(int id, const char *text2);
|
||||
void NSISCALL update_status_text(const char *text1, const char *text2);
|
||||
void NSISCALL update_status_text(int strtab, const char *text2);
|
||||
extern int ui_st_updateflag;
|
||||
extern int num_sections;
|
||||
|
||||
//extern int g_autoclose;
|
||||
extern void *g_inst_combinedheader;
|
||||
extern page *g_inst_page;
|
||||
extern section *g_inst_section;
|
||||
extern entry *g_inst_entry;
|
||||
|
||||
#define g_inst_header ((header *)g_inst_combinedheader)
|
||||
#define g_inst_cmnheader ((common_header *)g_inst_combinedheader)
|
||||
|
||||
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
|
||||
#define g_inst_uninstheader ((uninstall_header *)g_inst_combinedheader)
|
||||
extern int g_is_uninstaller;
|
||||
#endif
|
||||
|
||||
#ifdef NSIS_CONFIG_LOG
|
||||
void NSISCALL build_g_logfile(void);
|
||||
|
|
|
@ -37,6 +37,7 @@ char g_log_file[1024];
|
|||
#ifdef NSIS_CONFIG_PLUGIN_SUPPORT
|
||||
char *state_plugins_dir=g_usrvars[25];
|
||||
#endif
|
||||
char *state_plugins_dir=g_usrvars[36];
|
||||
#endif
|
||||
|
||||
HANDLE g_hInstance;
|
||||
|
@ -109,7 +110,7 @@ void NSISCALL doRMDir(char *buf, int flags) // 1 - recurse, 2 - rebootok
|
|||
else if (!RemoveDirectory(buf) && flags&2) {
|
||||
log_printf2("Remove folder on reboot: %s",buf);
|
||||
#ifdef NSIS_SUPPORT_REBOOT
|
||||
g_flags.exec_reboot++;
|
||||
g_exec_flags.exec_reboot++;
|
||||
#endif
|
||||
MoveFileOnReboot(buf,0);
|
||||
}
|
||||
|
@ -163,7 +164,7 @@ int NSISCALL is_valid_instpath(char *s)
|
|||
{
|
||||
int ivp=0;
|
||||
// if CH_FLAGS_NO_ROOT_DIR is set, req is 0, which means rootdirs are not allowed.
|
||||
int req=!(inst_flags&CH_FLAGS_NO_ROOT_DIR);
|
||||
int req=!(g_flags&CH_FLAGS_NO_ROOT_DIR);
|
||||
if (*(WORD*)s == CHAR2_TO_WORD('\\','\\')) // \\ path
|
||||
{
|
||||
if (lastchar(s)!='\\') ivp++;
|
||||
|
@ -243,7 +244,7 @@ char * NSISCALL my_GetTempFileName(char *buf, const char *dir)
|
|||
BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
|
||||
{
|
||||
BOOL fOk = 0;
|
||||
HMODULE hLib=LoadLibrary("kernel32.dll");
|
||||
HMODULE hLib=GetModuleHandle("kernel32.dll");
|
||||
if (hLib)
|
||||
{
|
||||
typedef BOOL (WINAPI *mfea_t)(LPCSTR lpExistingFileName,LPCSTR lpNewFileName,DWORD dwFlags);
|
||||
|
@ -253,7 +254,6 @@ BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
|
|||
{
|
||||
fOk=mfea(pszExisting, pszNew, MOVEFILE_DELAY_UNTIL_REBOOT|MOVEFILE_REPLACE_EXISTING);
|
||||
}
|
||||
FreeLibrary(hLib);
|
||||
}
|
||||
|
||||
if (!fOk)
|
||||
|
@ -270,7 +270,7 @@ BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
|
|||
|
||||
if (pszNew) {
|
||||
// create the file if it's not already there to prevent GetShortPathName from failing
|
||||
CloseHandle(myOpenFile(pszNew, 0, CREATE_NEW));
|
||||
CloseHandle(myOpenFile(pszNew,0,CREATE_NEW));
|
||||
GetShortPathName(pszNew,tmpbuf,1024);
|
||||
}
|
||||
// wininit is used as a temporary here
|
||||
|
@ -307,11 +307,11 @@ BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
|
|||
char *pszNextSec = mystrstr(pszFirstRenameLine,"\n[");
|
||||
if (pszNextSec)
|
||||
{
|
||||
int l=dwFileSize - (pszNextSec - pszWinInit);
|
||||
void* data=(void*)my_GlobalAlloc(l);
|
||||
mini_memcpy(data, pszNextSec, l);
|
||||
mini_memcpy(pszNextSec + cchRenameLine, data, l);
|
||||
GlobalFree((HGLOBAL)data);
|
||||
char *p = ++pszNextSec;
|
||||
while (p < pszWinInit + dwFileSize) {
|
||||
p[cchRenameLine] = *p;
|
||||
p++;
|
||||
}
|
||||
|
||||
dwRenameLinePos = pszNextSec - pszWinInit;
|
||||
}
|
||||
|
@ -351,21 +351,11 @@ void NSISCALL myRegGetStr(HKEY root, const char *sub, const char *name, char *ou
|
|||
}
|
||||
}
|
||||
|
||||
char ps_tmpbuf[NSIS_MAX_STRLEN*2];
|
||||
|
||||
char * NSISCALL process_string_fromtab(char *out, int offs)
|
||||
void NSISCALL myitoa(char *s, int d)
|
||||
{
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char *p=process_string(GetStringFromStringTab(offs), 0);
|
||||
#else
|
||||
char *p=process_string(GetStringFromStringTab(offs));
|
||||
#endif
|
||||
if (!out) return p;
|
||||
return lstrcpyn(out,p,NSIS_MAX_STRLEN);
|
||||
wsprintf(s,"%d",d);
|
||||
}
|
||||
|
||||
void NSISCALL myitoa(char *s, int d) { wsprintf(s,"%d",d); }
|
||||
|
||||
int NSISCALL myatoi(char *s)
|
||||
{
|
||||
unsigned int v=0;
|
||||
|
@ -419,18 +409,20 @@ int NSISCALL mystrlen(const char *in)
|
|||
return lstrlen(in);
|
||||
}
|
||||
|
||||
// Dave Laundon's simplified process_string
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char * NSISCALL process_string(const char *in, int iStartIdx )
|
||||
#else
|
||||
char * NSISCALL process_string(const char *in)
|
||||
#endif
|
||||
char ps_tmpbuf[NSIS_MAX_STRLEN*2];
|
||||
|
||||
// Based on Dave Laundon's simplified process_string
|
||||
char * NSISCALL GetNSISString(char *outbuf, int strtab)
|
||||
{
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char *out = ps_tmpbuf+iStartIdx;
|
||||
#else
|
||||
char *out = ps_tmpbuf;
|
||||
#endif
|
||||
char *in = (char*)GetNSISStringNP(GetNSISTab(strtab));
|
||||
char *out;
|
||||
if (outbuf >= ps_tmpbuf && outbuf < ps_tmpbuf+sizeof(ps_tmpbuf))
|
||||
{
|
||||
out = outbuf;
|
||||
outbuf = 0;
|
||||
}
|
||||
else
|
||||
out = ps_tmpbuf;
|
||||
while (*in && out - ps_tmpbuf < NSIS_MAX_STRLEN)
|
||||
{
|
||||
int nVarIdx = (unsigned char)*in++;
|
||||
|
@ -446,9 +438,9 @@ char * NSISCALL process_string(const char *in)
|
|||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
else if (nVarIdx == LANG_CODES_START)
|
||||
{
|
||||
nVarIdx = *(short*)in; in+=sizeof(WORD);
|
||||
process_string(GetStringFromStringTab(nVarIdx), out-ps_tmpbuf);
|
||||
out+=mystrlen(out);
|
||||
nVarIdx = *(short*)in; in+=sizeof(short);
|
||||
GetNSISString(out, nVarIdx);
|
||||
out+=mystrlen(out);
|
||||
}
|
||||
#endif
|
||||
else
|
||||
|
@ -485,22 +477,24 @@ char * NSISCALL process_string(const char *in)
|
|||
case VAR_CODES_START + 23: // OUTDIR
|
||||
case VAR_CODES_START + 24: // EXEDIR
|
||||
case VAR_CODES_START + 25: // LANGUAGE
|
||||
case VAR_CODES_START + 26: // PLUGINSDIR
|
||||
case VAR_CODES_START + 26: // TEMP
|
||||
case VAR_CODES_START + 27: // _CLICK
|
||||
case VAR_CODES_START + 28: // PLUGINSDIR
|
||||
mystrcpy(out, g_usrvars[nVarIdx - (VAR_CODES_START + 1)]);
|
||||
break;
|
||||
|
||||
case VAR_CODES_START + 27: // PROGRAMFILES
|
||||
case VAR_CODES_START + 29: // PROGRAMFILES
|
||||
smwcvesf[41]=0;
|
||||
myRegGetStr(HKEY_LOCAL_MACHINE, smwcvesf, "ProgramFilesDir", out);
|
||||
if (!*out)
|
||||
mystrcpy(out, "C:\\Program Files");
|
||||
break;
|
||||
|
||||
case VAR_CODES_START + 28: // SMPROGRAMS
|
||||
case VAR_CODES_START + 29: // SMSTARTUP
|
||||
case VAR_CODES_START + 30: // DESKTOP
|
||||
case VAR_CODES_START + 31: // STARTMENU
|
||||
case VAR_CODES_START + 32: // QUICKLAUNCH
|
||||
case VAR_CODES_START + 30: // SMPROGRAMS
|
||||
case VAR_CODES_START + 31: // SMSTARTUP
|
||||
case VAR_CODES_START + 32: // DESKTOP
|
||||
case VAR_CODES_START + 33: // STARTMENU
|
||||
case VAR_CODES_START + 34: // QUICKLAUNCH
|
||||
{
|
||||
static const char *tab[]={
|
||||
"Programs",
|
||||
|
@ -510,9 +504,9 @@ char * NSISCALL process_string(const char *in)
|
|||
"AppData"
|
||||
};
|
||||
static char name[20]="Common ";
|
||||
const char *name_=tab[nVarIdx-(VAR_CODES_START+28)];
|
||||
const char *name_=tab[nVarIdx-(VAR_CODES_START+30)];
|
||||
mystrcpy(name+7,name_);
|
||||
f=g_flags.all_user_var & (nVarIdx != VAR_CODES_START + 32);
|
||||
f=g_exec_flags.all_user_var & (nVarIdx != VAR_CODES_START + 34);
|
||||
|
||||
again:
|
||||
|
||||
|
@ -529,7 +523,7 @@ char * NSISCALL process_string(const char *in)
|
|||
mystrcpy(out,temp_directory);
|
||||
}
|
||||
|
||||
if (nVarIdx == VAR_CODES_START + 32) {
|
||||
if (nVarIdx == VAR_CODES_START + 34) {
|
||||
lstrcat(out, "\\Microsoft\\Internet Explorer\\Quick Launch");
|
||||
f = GetFileAttributes(out);
|
||||
if (f != (DWORD)-1 && (f & FILE_ATTRIBUTE_DIRECTORY))
|
||||
|
@ -538,24 +532,25 @@ char * NSISCALL process_string(const char *in)
|
|||
else break;
|
||||
}
|
||||
|
||||
case VAR_CODES_START + 33: // TEMP
|
||||
case VAR_CODES_START + 35: // TEMP
|
||||
mystrcpy(out,temp_directory);
|
||||
break;
|
||||
|
||||
case VAR_CODES_START + 34: // WINDIR
|
||||
case VAR_CODES_START + 36: // WINDIR
|
||||
GetWindowsDirectory(out, NSIS_MAX_STRLEN);
|
||||
break;
|
||||
|
||||
case VAR_CODES_START + 35: // SYSDIR
|
||||
case VAR_CODES_START + 37: // SYSDIR
|
||||
GetSystemDirectory(out, NSIS_MAX_STRLEN);
|
||||
break;
|
||||
|
||||
#if VAR_CODES_START + 35 >= 255
|
||||
#if VAR_CODES_START + 37 >= 255
|
||||
#error "Too many variables! Extend VAR_CODES_START!"
|
||||
#endif
|
||||
} // switch
|
||||
// validate the directory name
|
||||
if (nVarIdx > 21+VAR_CODES_START ) { // only if not $0 to $R9, $CMDLINE, or $HWNDPARENT
|
||||
if (nVarIdx > 21+VAR_CODES_START && nVarIdx != VAR_CODES_START+27) {
|
||||
// only if not $0 to $R9, $CMDLINE, $HWNDPARENT, or $_CLICK
|
||||
// ($LANGUAGE can't have trailing backslash anyway...)
|
||||
validate_filename(out);
|
||||
}
|
||||
|
@ -574,18 +569,18 @@ char * NSISCALL process_string(const char *in)
|
|||
nVarIdx = (*(WORD*)in & 0x0FFF)-1; in+=sizeof(WORD);
|
||||
switch (nVarIdx) // The order of this list must match that in ..\strlist.cpp (err, build.cpp -J)
|
||||
{
|
||||
case 26: // PROGRAMFILES
|
||||
case 28: // PROGRAMFILES
|
||||
smwcvesf[41]=0;
|
||||
myRegGetStr(HKEY_LOCAL_MACHINE, smwcvesf, "ProgramFilesDir", out);
|
||||
if (!*out)
|
||||
mystrcpy(out, "C:\\Program Files");
|
||||
break;
|
||||
|
||||
case 27: // SMPROGRAMS
|
||||
case 28: // SMSTARTUP
|
||||
case 29: // DESKTOP
|
||||
case 30: // STARTMENU
|
||||
case 31: // QUICKLAUNCH
|
||||
case 29: // SMPROGRAMS
|
||||
case 30: // SMSTARTUP
|
||||
case 31: // DESKTOP
|
||||
case 32: // STARTMENU
|
||||
case 33: // QUICKLAUNCH
|
||||
{
|
||||
static const char *tab[]={
|
||||
"Programs",
|
||||
|
@ -595,9 +590,9 @@ char * NSISCALL process_string(const char *in)
|
|||
"AppData"
|
||||
};
|
||||
static char name[20]="Common ";
|
||||
const char *name_=tab[nVarIdx-27];
|
||||
const char *name_=tab[nVarIdx-29];
|
||||
mystrcpy(name+7,name_);
|
||||
f=g_flags.all_user_var & (nVarIdx != 31);
|
||||
f=g_exec_flags.all_user_var & (nVarIdx != 33);
|
||||
|
||||
again:
|
||||
|
||||
|
@ -614,7 +609,7 @@ char * NSISCALL process_string(const char *in)
|
|||
mystrcpy(out,state_temp_dir);
|
||||
}
|
||||
|
||||
if (nVarIdx == 31) {
|
||||
if (nVarIdx == 33) {
|
||||
lstrcat(out, "\\Microsoft\\Internet Explorer\\Quick Launch");
|
||||
f = GetFileAttributes(out);
|
||||
if (f != (DWORD)-1 && (f & FILE_ATTRIBUTE_DIRECTORY))
|
||||
|
@ -623,15 +618,15 @@ char * NSISCALL process_string(const char *in)
|
|||
else break;
|
||||
}
|
||||
|
||||
case 33: // WINDIR
|
||||
case 34: // WINDIR
|
||||
GetWindowsDirectory(out, NSIS_MAX_STRLEN);
|
||||
break;
|
||||
|
||||
case 34: // SYSDIR
|
||||
case 35: // SYSDIR
|
||||
GetSystemDirectory(out, NSIS_MAX_STRLEN);
|
||||
break;
|
||||
|
||||
case 35: // HWNDPARENT
|
||||
case 36: // HWNDPARENT
|
||||
myitoa(out, (unsigned int)g_hwnd);
|
||||
break;
|
||||
|
||||
|
@ -639,17 +634,18 @@ char * NSISCALL process_string(const char *in)
|
|||
mystrcpy(out, g_usrvars[nVarIdx]);
|
||||
} // switch
|
||||
// validate the directory name
|
||||
if (nVarIdx > 21 && nVarIdx < TOTAL_COMPATIBLE_STATIC_VARS_COUNT ) { // only if not $0 to $R9, $CMDLINE, or $HWNDPARENT and not great than $SYSDIR
|
||||
if (nVarIdx > 20 && nVarIdx < TOTAL_COMPATIBLE_STATIC_VARS_COUNT && nVarIdx != 26) {
|
||||
// only if not $0 to $R9, $CMDLINE or $_CLICK and not great than $HWNDPARENT
|
||||
// ($LANGUAGE can't have trailing backslash anyway...)
|
||||
validate_filename(out);
|
||||
}
|
||||
out+=mystrlen(out);
|
||||
} // == VAR_CODES_START
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
else if ( nVarIdx == LANG_CODES_START )
|
||||
else if (nVarIdx == LANG_CODES_START)
|
||||
{
|
||||
nVarIdx = *(short*)in; in+=sizeof(WORD);
|
||||
process_string(GetStringFromStringTab(nVarIdx), out-ps_tmpbuf);
|
||||
nVarIdx = *(short*)in; in+=sizeof(short);
|
||||
GetNSISString(out, nVarIdx);
|
||||
out+=mystrlen(out);
|
||||
}
|
||||
#endif
|
||||
|
@ -660,6 +656,8 @@ char * NSISCALL process_string(const char *in)
|
|||
#endif
|
||||
} // while
|
||||
*out = 0;
|
||||
if (outbuf)
|
||||
return lstrcpyn(outbuf, ps_tmpbuf, NSIS_MAX_STRLEN);
|
||||
return ps_tmpbuf;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
#include "config.h"
|
||||
|
||||
extern char ps_tmpbuf[NSIS_MAX_STRLEN*2];
|
||||
#ifdef NSIS_SUPPORT_LANG_IN_STRINGS
|
||||
char * NSISCALL process_string(const char *in, int iStartIdx);
|
||||
#else
|
||||
char * NSISCALL process_string(const char *in);
|
||||
#endif
|
||||
char * NSISCALL process_string_fromtab(char *out, int offs);
|
||||
char * NSISCALL GetNSISString(char *outbuf, int strtab);
|
||||
#define GetNSISStringTT(strtab) GetNSISString(0, (strtab))
|
||||
#define GetNSISStringNP(strtab) ((const char *)g_blocks[NB_STRINGS].offset+(strtab))
|
||||
#define GetNSISTab(strtab) (strtab < 0 ? LANG_STR_TAB(strtab) : strtab)
|
||||
void NSISCALL myRegGetStr(HKEY root, const char *sub, const char *name, char *out);
|
||||
int NSISCALL myatoi(char *s);
|
||||
void NSISCALL myitoa(char *s, int d);
|
||||
|
|
1263
Source/lang.cpp
1263
Source/lang.cpp
File diff suppressed because it is too large
Load diff
249
Source/lang.h
249
Source/lang.h
|
@ -1,86 +1,188 @@
|
|||
// Lang.h by Amir Szekely 3rd August 2002
|
||||
|
||||
#ifndef ___NLF___H_____
|
||||
#define ___NLF___H_____
|
||||
|
||||
#include "exehead/fileform.h"
|
||||
#include <StdExcept>
|
||||
using namespace std;
|
||||
|
||||
struct NLFRef {
|
||||
int iRef;
|
||||
int iUnRef;
|
||||
};
|
||||
|
||||
struct langstring {
|
||||
int name;
|
||||
int sn;
|
||||
int index;
|
||||
int uindex;
|
||||
int process;
|
||||
};
|
||||
|
||||
class LangStringList : public SortedStringListND<struct langstring>
|
||||
{
|
||||
public:
|
||||
LangStringList()
|
||||
{
|
||||
index = 0;
|
||||
LangStringList() {
|
||||
count = 0;
|
||||
}
|
||||
~LangStringList() { }
|
||||
|
||||
int add(const char *name)
|
||||
int add(const char *name, int *sn=0)
|
||||
{
|
||||
int pos=SortedStringListND<struct langstring>::add(name);
|
||||
int pos = SortedStringListND<struct langstring>::add(name);
|
||||
if (pos == -1) return -1;
|
||||
|
||||
((struct langstring*)gr.get())[pos].index = index;
|
||||
((struct langstring*)gr.get())[pos].sn = count;
|
||||
if (sn) *sn = count;
|
||||
count++;
|
||||
((struct langstring*)gr.get())[pos].index = -1;
|
||||
((struct langstring*)gr.get())[pos].uindex = -1;
|
||||
((struct langstring*)gr.get())[pos].process = 1;
|
||||
|
||||
int temp = index;
|
||||
index++;
|
||||
|
||||
return temp;
|
||||
return pos;
|
||||
}
|
||||
|
||||
int get(char *name)
|
||||
int get(char *name, int *sn=0, int *index=0, int *uindex=0, int *process=0)
|
||||
{
|
||||
if (index) *index = -1;
|
||||
if (uindex) *uindex = -1;
|
||||
if (sn) *sn = -1;
|
||||
int v=SortedStringListND<struct langstring>::find(name);
|
||||
if (v==-1) return -1;
|
||||
return ((struct langstring*)gr.get())[v].index;
|
||||
if (index) *index = ((struct langstring*)gr.get())[v].index;
|
||||
if (uindex) *uindex = ((struct langstring*)gr.get())[v].uindex;
|
||||
if (sn) *sn = ((struct langstring*)gr.get())[v].sn;
|
||||
if (process) *process = ((struct langstring*)gr.get())[v].process;
|
||||
return v;
|
||||
}
|
||||
|
||||
void set(int pos, int index=-1, int uindex=-1, int process=-1)
|
||||
{
|
||||
if ((unsigned int)pos > (gr.getlen() / sizeof(struct langstring)))
|
||||
return;
|
||||
|
||||
struct langstring *data=(struct langstring *)gr.get();
|
||||
|
||||
if (index >= 0)
|
||||
data[pos].index = index;
|
||||
if (uindex >= 0)
|
||||
data[pos].uindex = uindex;
|
||||
if (process >= 0)
|
||||
data[pos].process = process;
|
||||
}
|
||||
|
||||
void set(char *name, int index, int uindex=-1, int process=-1)
|
||||
{
|
||||
set(get(name), index, uindex, process);
|
||||
}
|
||||
|
||||
const char *pos2name(int pos)
|
||||
{
|
||||
struct langstring *data=(struct langstring *)gr.get();
|
||||
|
||||
if ((unsigned int)pos > (gr.getlen() / sizeof(struct langstring)))
|
||||
return 0;
|
||||
|
||||
return ((const char*)strings.get() + data[pos].name);
|
||||
}
|
||||
|
||||
const char *offset2name(int name)
|
||||
{
|
||||
if ((unsigned int)name > strings.getlen())
|
||||
return 0;
|
||||
|
||||
return (const char*)strings.get() + name;
|
||||
}
|
||||
|
||||
int getnum()
|
||||
{
|
||||
return index;
|
||||
return gr.getlen() / sizeof(struct langstring);
|
||||
}
|
||||
|
||||
char *idx2name(int idx)
|
||||
static int compare_index(const void *item1, const void *item2)
|
||||
{
|
||||
struct langstring *data=(struct langstring *)gr.get();
|
||||
|
||||
for (int i = 0; i < index; i++)
|
||||
{
|
||||
if (data[i].index == idx)
|
||||
{
|
||||
return ((char*)strings.get() + data[i].name);
|
||||
}
|
||||
}
|
||||
struct langstring *ls1 = (struct langstring *)item1;
|
||||
struct langstring *ls2 = (struct langstring *)item2;
|
||||
|
||||
return NULL;
|
||||
return ls1->index - ls2->index;
|
||||
}
|
||||
|
||||
struct langstring *sort_index(int *num)
|
||||
{
|
||||
if (!num) return 0;
|
||||
sortbuf.resize(0);
|
||||
sortbuf.add(gr.get(), gr.getlen());
|
||||
*num = sortbuf.getlen() / sizeof(struct langstring);
|
||||
qsort(sortbuf.get(), *num, sizeof(struct langstring), compare_index);
|
||||
return (struct langstring*) sortbuf.get();
|
||||
}
|
||||
|
||||
static int compare_uindex(const void *item1, const void *item2)
|
||||
{
|
||||
struct langstring *ls1 = (struct langstring *)item1;
|
||||
struct langstring *ls2 = (struct langstring *)item2;
|
||||
|
||||
return ls1->uindex - ls2->uindex;
|
||||
}
|
||||
|
||||
struct langstring *sort_uindex(int *num)
|
||||
{
|
||||
if (!num) return 0;
|
||||
sortbuf.resize(0);
|
||||
sortbuf.add(gr.get(), gr.getlen());
|
||||
*num = sortbuf.getlen() / sizeof(struct langstring);
|
||||
qsort(sortbuf.get(), *num, sizeof(struct langstring), compare_uindex);
|
||||
return (struct langstring*) sortbuf.get();
|
||||
}
|
||||
|
||||
private:
|
||||
int index;
|
||||
int count;
|
||||
TinyGrowBuf sortbuf;
|
||||
};
|
||||
|
||||
class NLF;
|
||||
class StringsArray
|
||||
{
|
||||
private:
|
||||
TinyGrowBuf offsets;
|
||||
GrowBuf strings;
|
||||
|
||||
struct StringTable {
|
||||
LANGID lang_id;
|
||||
int dlg_offset;
|
||||
common_strings common;
|
||||
common_strings ucommon;
|
||||
installer_strings installer;
|
||||
uninstall_strings uninstall;
|
||||
TinyGrowBuf user_strings;
|
||||
TinyGrowBuf user_ustrings;
|
||||
public:
|
||||
StringsArray()
|
||||
{
|
||||
offsets.set_zeroing(1);
|
||||
|
||||
NLF *nlf;
|
||||
strings.add("", sizeof(""));
|
||||
}
|
||||
|
||||
~StringsArray() { }
|
||||
|
||||
void resize(int num)
|
||||
{
|
||||
offsets.resize(num * sizeof(int));
|
||||
}
|
||||
|
||||
int set(int idx, char *str)
|
||||
{
|
||||
if (idx < 0)
|
||||
return 0;
|
||||
|
||||
if (idx >= (offsets.getlen() / sizeof(int)))
|
||||
resize(idx+1);
|
||||
|
||||
int old = ((int*)offsets.get())[idx];
|
||||
|
||||
((int*)offsets.get())[idx] = strings.add(str, strlen(str) + 1);
|
||||
|
||||
return old;
|
||||
}
|
||||
|
||||
const char *get(int idx)
|
||||
{
|
||||
if ((unsigned int)idx >= (offsets.getlen() / sizeof(int)))
|
||||
return 0;
|
||||
|
||||
return (const char *)strings.get() + ((int*)offsets.get())[idx];
|
||||
}
|
||||
};
|
||||
|
||||
#define NLF_VERSION 5
|
||||
#define NLF_VERSION 6
|
||||
|
||||
enum {
|
||||
NLF_BRANDING,
|
||||
|
@ -91,6 +193,8 @@ enum {
|
|||
NLF_SUBCAPTION_DIR,
|
||||
NLF_SUBCAPTION_INSTFILES,
|
||||
NLF_SUBCAPTION_COMPLETED,
|
||||
NLF_USUBCAPTION_OPTIONS,
|
||||
NLF_USUBCAPTION_DIR,
|
||||
NLF_USUBCAPTION_CONFIRM,
|
||||
NLF_USUBCAPTION_INSTFILES,
|
||||
NLF_USUBCAPTION_COMPLETED,
|
||||
|
@ -105,15 +209,36 @@ enum {
|
|||
NLF_BTN_CLOSE,
|
||||
NLF_BTN_BROWSE,
|
||||
NLF_BTN_DETAILS,
|
||||
NLF_DEF_NAME,
|
||||
NLF_CLICK_NEXT,
|
||||
NLF_CLICK_INSTALL,
|
||||
NLF_CLICK_UNINSTALL,
|
||||
NLF_NAME,
|
||||
NLF_COMPLETED,
|
||||
NLF_LICENSE_TEXT,
|
||||
NLF_LICENSE_TEXT_FSCB,
|
||||
NLF_LICENSE_TEXT_FSRB,
|
||||
NLF_ULICENSE_TEXT,
|
||||
NLF_ULICENSE_TEXT_FSCB,
|
||||
NLF_ULICENSE_TEXT_FSRB,
|
||||
NLF_LICENSE_DATA, // virtual
|
||||
NLF_COMP_CUSTOM,
|
||||
NLF_COMP_TEXT,
|
||||
NLF_COMP_SUBTEXT1,
|
||||
NLF_COMP_SUBTEXT1_NO_INST_TYPES,
|
||||
NLF_COMP_SUBTEXT2,
|
||||
NLF_UCOMP_TEXT,
|
||||
NLF_UCOMP_SUBTEXT1,
|
||||
NLF_UCOMP_SUBTEXT1_NO_INST_TYPES,
|
||||
NLF_UCOMP_SUBTEXT2,
|
||||
NLF_DIR_TEXT,
|
||||
NLF_DIR_SUBTEXT,
|
||||
NLF_DIR_BROWSETEXT,
|
||||
NLF_UDIR_TEXT,
|
||||
NLF_UDIR_SUBTEXT,
|
||||
NLF_UDIR_BROWSETEXT,
|
||||
NLF_SPACE_AVAIL,
|
||||
NLF_SPACE_REQ,
|
||||
NLF_UNINST_TEXT,
|
||||
NLF_UNINST_SUBTEXT,
|
||||
NLF_FILE_ERROR,
|
||||
NLF_FILE_ERROR_NOIGNORE,
|
||||
|
@ -150,36 +275,32 @@ enum {
|
|||
NLF_KILO,
|
||||
NLF_MEGA,
|
||||
NLF_GIGA,
|
||||
NLF_RTL,
|
||||
|
||||
NLF_STRINGS,
|
||||
|
||||
SLANG_NAME,
|
||||
SLANG_COMP_TEXT,
|
||||
SLANG_LICENSE_TEXT,
|
||||
SLANG_LICENSE_DATA,
|
||||
SLANG_DIR_TEXT,
|
||||
SLANG_UNINST_TEXT
|
||||
NLF_STRINGS
|
||||
};
|
||||
|
||||
extern char *english_strings[NLF_STRINGS];
|
||||
|
||||
// NSIS Language File parser
|
||||
class NLF {
|
||||
public:
|
||||
NLF(char *filename);
|
||||
~NLF();
|
||||
|
||||
char *GetString(int idx);
|
||||
|
||||
struct NLF {
|
||||
bool m_bLoaded;
|
||||
char *m_szName;
|
||||
|
||||
LANGID m_wLangId;
|
||||
char *m_szFont;
|
||||
int m_iFontSize;
|
||||
unsigned int m_uCodePage;
|
||||
|
||||
private:
|
||||
bool m_bRTL;
|
||||
|
||||
char *m_szStrings[NLF_STRINGS];
|
||||
};
|
||||
|
||||
struct LanguageTable {
|
||||
LANGID lang_id;
|
||||
|
||||
int dlg_offset;
|
||||
|
||||
GrowBuf *strlist;
|
||||
|
||||
StringsArray *lang_strings;
|
||||
|
||||
NLF nlf;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -214,7 +214,7 @@ int main(int argc, char **argv)
|
|||
{
|
||||
fprintf(g_output,"Size of EXE header is %d bytes for zlib, %d bytes for bzip2.\n", zlib_exeheader_size,bzip2_exeheader_size);
|
||||
fprintf(g_output,"Size of info header is %d bytes.\n",sizeof(firstheader));
|
||||
fprintf(g_output,"Size of install header is %d bytes, uninstall header is %d bytes.\n",sizeof(header),sizeof(uninstall_header));
|
||||
fprintf(g_output,"Size of [un]install header is %d bytes,\n",sizeof(header));
|
||||
fprintf(g_output,"Size of each section is %d bytes.\n",sizeof(section));
|
||||
fprintf(g_output,"Size of each page is %d bytes.\n",sizeof(page));
|
||||
fprintf(g_output,"Size of each instruction is %d bytes.\n",sizeof(entry));
|
||||
|
|
|
@ -69,8 +69,7 @@ LINK32=link.exe
|
|||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /Ob2 /D "_CONSOLE" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "WIN32_LEAN_AND_MEAN" /FD /c
|
||||
# SUBTRACT BASE CPP /Fr /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MLd /W3 /GX /ZI /Od /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "WIN32_LEAN_AND_MEAN" /Fr /FD /c
|
||||
# SUBTRACT CPP /YX /Yc /Yu
|
||||
# ADD CPP /nologo /MLd /W3 /GX /ZI /Od /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "WIN32_LEAN_AND_MEAN" /Fr /FD /Zm200 /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
|
2013
Source/script.cpp
2013
Source/script.cpp
File diff suppressed because it is too large
Load diff
|
@ -481,7 +481,7 @@ class MMapBuf : public IGrowBuf
|
|||
int add(const void *data, int len)
|
||||
{
|
||||
if (len<=0) return 0;
|
||||
resize(getlen()+len);
|
||||
resize(getlen()+len);
|
||||
memcpy((char*)get()+getlen()-len,data,len);
|
||||
return getlen()-len;
|
||||
}
|
||||
|
@ -507,7 +507,7 @@ class MMapBuf : public IGrowBuf
|
|||
char buf[MAX_PATH],buf2[MAX_PATH];
|
||||
GetTempPath(MAX_PATH,buf);
|
||||
GetTempFileName(buf,"nsd",0,buf2);
|
||||
m_hFile=CreateFile(buf2,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE,NULL);
|
||||
m_hFile=CreateFile(buf2,GENERIC_READ|GENERIC_WRITE,0,NULL,CREATE_ALWAYS,FILE_ATTRIBUTE_TEMPORARY|FILE_FLAG_DELETE_ON_CLOSE|FILE_FLAG_SEQUENTIAL_SCAN,NULL);
|
||||
}
|
||||
if (m_hFile != INVALID_HANDLE_VALUE)
|
||||
m_hFileMap=CreateFileMapping(m_hFile,NULL,PAGE_READWRITE,0,m_alloc,NULL);
|
||||
|
|
|
@ -22,14 +22,14 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_ADDSIZE,"AddSize",1,0,"size_to_add_to_section_in_kb"},
|
||||
{TOK_AUTOCLOSE,"AutoCloseWindow",1,0,"(false|true)"},
|
||||
{TOK_BGGRADIENT,"BGGradient",0,3,"(off | [top_color [bottom_color [text_color]]])"},
|
||||
{TOK_BRANDINGTEXT,"BrandingText",1,2,"[/LANG=lang_id] [/TRIM(LEFT|RIGHT|CENTER)] installer_text"},
|
||||
{TOK_BRANDINGTEXT,"BrandingText",1,1,"[/TRIM(LEFT|RIGHT|CENTER)] installer_text"},
|
||||
{TOK_BRINGTOFRONT,"BringToFront",0,0,""},
|
||||
{TOK_CALL,"Call",1,0,"function_name | [:label_name]"},
|
||||
{TOK_CALLINSTDLL,"CallInstDLL",2,1,"dll_path_on_target.dll [/NOUNLOAD] function"},
|
||||
{TOK_CAPTION,"Caption",1,1,"[/LANG=lang_id] installer_caption"},
|
||||
{TOK_CHANGEUI,"ChangeUI",2,1,"/RTL (all|dlg_id) ui_file.exe"},
|
||||
{TOK_CAPTION,"Caption",1,0,"installer_caption"},
|
||||
{TOK_CHANGEUI,"ChangeUI",1,1,"[/RTL] (all|dlg_id) ui_file.exe"},
|
||||
{TOK_CLEARERRORS,"ClearErrors",0,0,""},
|
||||
{TOK_COMPTEXT,"ComponentText",0,4,"[/LANG=lang_id] [component_page_description] [component_subtext1] [component_subtext2]"},
|
||||
{TOK_COMPTEXT,"ComponentText",0,3,"[component_page_description] [component_subtext1] [component_subtext2]"},
|
||||
{TOK_GETDLLVERSION,"GetDLLVersion",3,0,"filename $(user_var: high output) $(user_var: low output)"},
|
||||
{TOK_GETDLLVERSIONLOCAL,"GetDLLVersionLocal",3,0,"localfilename $(user_var: high output) $(user_var: low output)"},
|
||||
{TOK_GETFILETIME,"GetFileTime",3,0,"file $(user_var: high output) $(user_var: low output)"},
|
||||
|
@ -46,8 +46,9 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_DELETEREGVALUE,"DeleteRegValue",3,0,"root_key subkey entry_name\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)"},
|
||||
{TOK_DELETE,"Delete",1,1,"[/REBOOTOK] filespec"},
|
||||
{TOK_DETAILPRINT,"DetailPrint",1,0,"message"},
|
||||
{TOK_DIRTEXT,"DirText",0,4,"[/LANG=lang_id] [directory_page_description] [directory_page_subtext] [browse button text]"},
|
||||
{TOK_DIRTEXT,"DirText",0,3,"[directory_page_description] [directory_page_subtext] [browse_button_text] [browse_dlg_text]"},
|
||||
{TOK_DIRSHOW,"DirShow",1,0,"(show|hide)"},
|
||||
{TOK_DIRVAR,"DirVar",1,0,"$(user_var: dir in/out))"},
|
||||
{TOK_ROOTDIRINST,"AllowRootDirInstall",1,0,"(true|false)"},
|
||||
{TOK_CHECKBITMAP,"CheckBitmap",1,0,"local_bitmap.bmp"},
|
||||
{TOK_ENABLEWINDOW,"EnableWindow",2,0,"hwnd (1|0)"},
|
||||
|
@ -66,7 +67,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_FLUSHINI,"FlushINI",1,0,"ini_file"},
|
||||
{TOK_RESERVEFILE,"ReserveFile",1,-1,"[/nonfatal] [/r] file [file...]"},
|
||||
{TOK_FILECLOSE,"FileClose",1,0,"$(user_var: handle input)"},
|
||||
{TOK_FILEERRORTEXT,"FileErrorText",0,3,"[/LANG=lang_id] [text (can contain $0)] [text without ignore (can contain $0)]"},
|
||||
{TOK_FILEERRORTEXT,"FileErrorText",0,2,"[text (can contain $0)] [text without ignore (can contain $0)]"},
|
||||
{TOK_FILEOPEN,"FileOpen",3,0,"$(user_var: handle output) filename openmode\n openmode=r|w|a"},
|
||||
{TOK_FILEREAD,"FileRead",2,1,"$(user_var: handle input) $(user_var: text output) [maxlen]"},
|
||||
{TOK_FILEWRITE,"FileWrite",2,0,"$(user_var: handle input) text"},
|
||||
|
@ -78,18 +79,18 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_GETDLGITEM,"GetDlgItem",3,0,"$(user_var: handle output) dialog item_id"},
|
||||
{TOK_GETFULLPATHNAME,"GetFullPathName",2,1,"[/SHORT] $(user_var: result) path_or_file"},
|
||||
{TOK_GETTEMPFILENAME,"GetTempFileName",1,1,"$(user_var: name output) [base_dir]"},
|
||||
{TOK_GETWINTEXT,"GetWindowText",2,0,"$(user_var: handle output) hwnd"},
|
||||
{TOK_HIDEWINDOW,"HideWindow",0,0,""},
|
||||
{TOK_ICON,"Icon",1,0,"local_icon.ico"},
|
||||
{TOK_IFABORT,"IfAbort",1,1,"label_to_goto_if_abort [label_to_goto_if_no_abort]"},
|
||||
{TOK_IFERRORS,"IfErrors",1,1,"label_to_goto_if_errors [label_to_goto_if_no_errors]"},
|
||||
{TOK_IFFILEEXISTS,"IfFileExists",2,1,"filename label_to_goto_if_file_exists [label_to_goto_otherwise]"},
|
||||
{TOK_IFREBOOTFLAG,"IfRebootFlag",1,1,"jump_if_set [jump_if_not_set]"},
|
||||
{TOK_IFSILENT,"IfSilent",1,1,"jump_if_silent [jump_if_not_silent]"},
|
||||
{TOK_INSTALLDIRREGKEY,"InstallDirRegKey",3,0,"root_key subkey entry_name\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)"},
|
||||
{TOK_INSTCOLORS,"InstallColors",1,1,"(/windows | (foreground_color background_color))"},
|
||||
{TOK_INSTDIR,"InstallDir",1,0,"default_install_directory"},
|
||||
{TOK_INSTPROGRESSFLAGS,"InstProgressFlags",0,-1,"[flag [...]]\n flag={smooth|colored}"},
|
||||
{TOK_INSTTYPE,"InstType",1,1,"install_type_name | /NOCUSTOM | ([/LANG=lang_id] /CUSTOMSTRING=str) | /COMPONENTSONLYONCUSTOM"},
|
||||
{TOK_INSTTYPE,"InstType",1,0,"install_type_name | /NOCUSTOM | /CUSTOMSTRING=str | /COMPONENTSONLYONCUSTOM"},
|
||||
{TOK_INTOP,"IntOp",3,1,"$(user_var: result) val1 OP [val2]\n OP=(+ - * / % | & ^ ~ ! || &&)"},
|
||||
{TOK_INTCMP,"IntCmp",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]"},
|
||||
{TOK_INTCMPU,"IntCmpU",3,2,"val1 val2 jump_if_equal [jump_if_val1_less] [jump_if_val1_more]"},
|
||||
|
@ -97,10 +98,11 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_ISWINDOW,"IsWindow",2,1,"hwnd jump_if_window [jump_if_not_window]"},
|
||||
{TOK_GOTO,"Goto",1,0,"label"},
|
||||
{TOK_LANGSTRING,"LangString",3,0,"[un.]name lang_id string"},
|
||||
{TOK_LANGSTRINGUP,"LangStringUP",3,0,"[un.]name lang_id string"},
|
||||
{TOK_LICENSEDATA,"LicenseData",1,1,"[/LANG=lang_id] local_file_that_has_license_text.txt"},
|
||||
{TOK_LICENSEFORCESELECTION,"LicenseForceSelection",1,3,"[/LANG=lang_id] (checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | off)"},
|
||||
{TOK_LICENSETEXT,"LicenseText",1,2,"[/LANG=lang_id] license_page_description [license_button_text]"},
|
||||
{TOK_LANGSTRINGUP,"LangStringUP",0,0,"obsolete, use LangString."},
|
||||
{TOK_LICENSEDATA,"LicenseData",1,0,"local_file_that_has_license_text | license_lang_string"},
|
||||
{TOK_LICENSEFORCESELECTION,"LicenseForceSelection",1,2,"(checkbox [accept_text] | radiobuttons [accept_text] [decline_text] | off)"},
|
||||
{TOK_LICENSELANGSTRING,"LicenseLangString",3,0,"name lang_id license_path"},
|
||||
{TOK_LICENSETEXT,"LicenseText",1,1,"license_page_description [license_button_text]"},
|
||||
{TOK_LICENSEBKCOLOR,"LicenseBkColor",1,0,"background_color"},
|
||||
{TOK_LOADNLF,"LoadLanguageFile",1,0,"language.nlf"},
|
||||
{TOK_LOGSET,"LogSet",1,0,"on|off"},
|
||||
|
@ -108,13 +110,16 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_MESSAGEBOX,"MessageBox",2,4,"mode messagebox_text [return_check label_to_goto_if_equal [return_check2 label2]]\n mode=modeflag[|modeflag[|modeflag[...]]]\n "
|
||||
"modeflag=(MB_ABORTRETRYIGNORE|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_YESNO|MB_YESNOCANCEL|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_TOPMOST|MB_SETFOREGROUND|MB_RIGHT"},
|
||||
{TOK_NOP,"Nop",0,0,""},
|
||||
{TOK_NAME,"Name",1,1,"[/LANG=lang_id] installer_name"},
|
||||
{TOK_NAME,"Name",1,0,"installer_name"},
|
||||
{TOK_OUTFILE,"OutFile",1,0,"install_output.exe"},
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
{TOK_PAGE,"Page",1,5,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles) [pre_function] [show_function] [leave_function])) [define_if_last]"},
|
||||
{TOK_PAGE,"Page",1,4,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles|uninstConfirm) [pre_function] [show_function] [leave_function]))"},
|
||||
#else
|
||||
{TOK_PAGE,"Page",1,1,"license|components|directory|instfiles"},
|
||||
{TOK_PAGE,"Page",1,1,"license|components|directory|instfiles|uninstConfirm"},
|
||||
#endif
|
||||
{TOK_PAGECALLBACKS,"PageCallbacks",0,3,"([creator_function] [leave_function]) | ([pre_function] [show_function] [leave_function])"},
|
||||
{TOK_PAGEEX,"PageEx",1,0,"[un.](custom|uninstConfirm|license|components|directory|instfiles)"},
|
||||
{TOK_PAGEEXEND,"PageExEnd",0,0,""},
|
||||
{TOK_POP,"Pop",1,0,"$(user_var: output)"},
|
||||
{TOK_PUSH,"Push",1,0,"string"},
|
||||
{TOK_QUIT,"Quit",0,0,""},
|
||||
|
@ -147,7 +152,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_INSTTYPEGETTEXT,"InstTypeGetText",2,0,"insttype_index $(user_var: output flags)"},
|
||||
{TOK_SENDMESSAGE,"SendMessage",4,2,"hwnd message [wparam|STR:wParam] [lparam|STR:lParam] [$(user_var: return value)] [/TIMEOUT=X]"},
|
||||
{TOK_SETAUTOCLOSE,"SetAutoClose",1,0,"(false|true)"},
|
||||
{TOK_SETBKCOLOR,"SetBkColor",2,0,"hwnd color"},
|
||||
{TOK_SETCTLCOLORS,"SetCtlColors",2,1,"hwnd (branding | (text_color (transparent|bg_color)))"},
|
||||
{TOK_SETBRANDINGIMAGE,"SetBrandingImage",1,2,"[/IMGID=image_item_id_in_dialog] [/RESIZETOFIT] bitmap.bmp"},
|
||||
{TOK_SETCOMPRESS,"SetCompress",1,0,"(off|auto|force)"},
|
||||
{TOK_SETCOMPRESSOR,"SetCompressor",1,0,"(zlib|bzip2)"},
|
||||
|
@ -162,6 +167,7 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_SETPLUGINUNLOAD,"SetPluginUnload",1,0,"(manual|alwaysoff)"},
|
||||
{TOK_SETREBOOTFLAG,"SetRebootFlag",1,0,"true|false"},
|
||||
{TOK_SETSHELLVARCONTEXT,"SetShellVarContext",1,0,"all|current"},
|
||||
{TOK_SETSILENT,"SetSilent",1,0,"silent|normal"},
|
||||
{TOK_SHOWDETAILS,"ShowInstDetails",1,0,"(hide|show|nevershow)"},
|
||||
{TOK_SHOWDETAILSUNINST,"ShowUninstDetails",1,0,"(hide|show|nevershow)"},
|
||||
{TOK_SHOWWINDOW,"ShowWindow",2,0,"hwnd show_state"},
|
||||
|
@ -171,17 +177,17 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_STRCMP,"StrCmp",3,1,"str1 str2 label_to_goto_if_equal [label_to_goto_if_not]"},
|
||||
{TOK_STRCPY,"StrCpy",2,2,"$(user_var: output) str [maxlen] [startoffset]"},
|
||||
{TOK_STRLEN,"StrLen",2,0,"$(user_var: length output) str"},
|
||||
{TOK_SUBCAPTION,"SubCaption",2,1,"[/LANG=lang_id] page_number(0-4) new_subcaption"},
|
||||
{TOK_SUBCAPTION,"SubCaption",2,0,"page_number(0-4) new_subcaption"},
|
||||
{TOK_UNINSTALLEXENAME,"UninstallExeName",0,0,"no longer supported, use WriteUninstaller from section."},
|
||||
{TOK_UNINSTCAPTION,"UninstallCaption",1,1,"[/LANG=lang_id] uninstaller_caption"},
|
||||
{TOK_UNINSTCAPTION,"UninstallCaption",1,0,"uninstaller_caption"},
|
||||
{TOK_UNINSTICON,"UninstallIcon",1,0,"icon_on_local_system.ico"},
|
||||
#ifdef NSIS_SUPPORT_CODECALLBACKS
|
||||
{TOK_UNINSTPAGE,"UninstPage",1,5,"((custom [creator_function] [leave_function] [caption]) | ((uninstConfirm|instfiles) [pre_function] [show_function] [leave_function])) [define_if_last]"},
|
||||
{TOK_UNINSTPAGE,"UninstPage",1,4,"((custom [creator_function] [leave_function] [caption]) | ((license|components|directory|instfiles|uninstConfirm) [pre_function] [show_function] [leave_function]))"},
|
||||
#else
|
||||
{TOK_UNINSTPAGE,"UninstPage",1,1,"uninstConfirm|instfiles"},
|
||||
{TOK_UNINSTPAGE,"UninstPage",1,1,"license|components|directory|instfiles|uninstConfirm"},
|
||||
#endif
|
||||
{TOK_UNINSTTEXT,"UninstallText",1,2,"[/LANG=lang_id] Text_to_go_on_uninstall page [subtext]"},
|
||||
{TOK_UNINSTSUBCAPTION,"UninstallSubCaption",2,1,"[/LANG=lang_id] page_number(0-2) new_subcaption"},
|
||||
{TOK_UNINSTTEXT,"UninstallText",1,1,"Text_to_go_on_uninstall_page [subtext]"},
|
||||
{TOK_UNINSTSUBCAPTION,"UninstallSubCaption",2,0,"page_number(0-2) new_subcaption"},
|
||||
{TOK_UNREGDLL,"UnRegDLL",1,0,"dll_path_on_target.dll"},
|
||||
// useless - {TOK_USEOUTERUIITEM,"UseOuterUIItem",2,0,"item id"},
|
||||
{TOK_WINDOWICON,"WindowIcon",1,0,"on|off"},
|
||||
|
@ -207,18 +213,18 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
{TOK_P_WARNING,"!warning",0,1,"[warning_message]"},
|
||||
{TOK_P_ERROR,"!error",0,1,"[error_message]"},
|
||||
|
||||
{TOK_P_VERBOSE,"!verbose",1,0,"verbose_level"},
|
||||
{TOK_P_VERBOSE,"!verbose",1,0,"verbose_level | push | pop"},
|
||||
|
||||
{TOK_P_MACRO,"!macro",1,-1,"macroname [parms ...]"},
|
||||
{TOK_P_MACROEND,"!macroend",0,0,""},
|
||||
{TOK_P_INSERTMACRO,"!insertmacro",1,-1,"macroname [parms ...]"},
|
||||
|
||||
{TOK_MISCBUTTONTEXT,"MiscButtonText",0,5,"[/LANG=lang_id] [back button text] [next button text] [cancel button text] [close button text]"},
|
||||
{TOK_DETAILSBUTTONTEXT,"DetailsButtonText",0,2,"[/LANG=lang_id] [details button text]"},
|
||||
{TOK_UNINSTBUTTONTEXT,"UninstallButtonText",0,2,"[/LANG=lang_id] [uninstall button text]"},
|
||||
{TOK_INSTBUTTONTEXT,"InstallButtonText",0,2,"[/LANG=lang_id] [install button text]"},
|
||||
{TOK_SPACETEXTS,"SpaceTexts",0,3,"[/LANG=lang_id] [space required text] [space available text]"},
|
||||
{TOK_COMPLETEDTEXT,"CompletedText",0,2,"[/LANG=lang_id] [completed text]"},
|
||||
{TOK_MISCBUTTONTEXT,"MiscButtonText",0,4,"[back button text] [next button text] [cancel button text] [close button text]"},
|
||||
{TOK_DETAILSBUTTONTEXT,"DetailsButtonText",0,1,"[details button text]"},
|
||||
{TOK_UNINSTBUTTONTEXT,"UninstallButtonText",0,1,"[uninstall button text]"},
|
||||
{TOK_INSTBUTTONTEXT,"InstallButtonText",0,1,"[install button text]"},
|
||||
{TOK_SPACETEXTS,"SpaceTexts",0,2,"none | ([space required text] [space available text])"},
|
||||
{TOK_COMPLETEDTEXT,"CompletedText",0,2,"[completed text]"},
|
||||
|
||||
{TOK_GETFUNCTIONADDR,"GetFunctionAddress",2,0,"output function"},
|
||||
{TOK_GETLABELADDR,"GetLabelAddress",2,0,"output label"},
|
||||
|
@ -231,8 +237,8 @@ static tokenType tokenlist[TOK__LAST] =
|
|||
// Added by ramon 3 jun 2003
|
||||
{TOK_DEFVAR,"Var",1,0,"VarName"},
|
||||
// Added by ramon 6 jun 2003
|
||||
{TOK_VI_ADDKEY,"VIAddVersionKey", 2, 1, "[/LANG=lang_id] keyname value"},
|
||||
{TOK_VI_SETPRODUCTVERSION,"VIProductVersion", 1, 0, "[version_string_X.X.X.X]"},
|
||||
{TOK_VI_ADDKEY,"VIAddVersionKey",2,1,"/LANG=lang_id keyname value"},
|
||||
{TOK_VI_SETPRODUCTVERSION,"VIProductVersion",1,0,"[version_string_X.X.X.X]"},
|
||||
};
|
||||
|
||||
void CEXEBuild::print_help(char *commandname)
|
||||
|
|
|
@ -14,10 +14,11 @@ enum
|
|||
TOK_WINDOWICON,
|
||||
TOK_DIRTEXT,
|
||||
TOK_COMPTEXT,
|
||||
TOK_LICENSETEXT,
|
||||
TOK_LICENSEBKCOLOR,
|
||||
TOK_LICENSEDATA,
|
||||
TOK_LICENSEFORCESELECTION,
|
||||
TOK_LICENSEBKCOLOR,
|
||||
TOK_LICENSELANGSTRING,
|
||||
TOK_LICENSETEXT,
|
||||
TOK_UNINSTTEXT,
|
||||
TOK_SILENTINST,
|
||||
TOK_SILENTUNINST,
|
||||
|
@ -46,6 +47,10 @@ enum
|
|||
TOK_SETCOMPRESSOR,
|
||||
TOK_LOADNLF,
|
||||
TOK_RESERVEFILE,
|
||||
TOK_ALLOWSKIPFILES,
|
||||
TOK_DEFVAR,
|
||||
TOK_VI_ADDKEY,
|
||||
TOK_VI_SETPRODUCTVERSION,
|
||||
|
||||
TOK_MISCBUTTONTEXT,
|
||||
TOK_DETAILSBUTTONTEXT,
|
||||
|
@ -89,9 +94,15 @@ enum
|
|||
TOK_FUNCTIONEND,
|
||||
TOK_ADDSIZE,
|
||||
|
||||
// Page oredering shit
|
||||
// page oredering shit
|
||||
TOK_PAGE,
|
||||
TOK_UNINSTPAGE,
|
||||
TOK_PAGEEX,
|
||||
TOK_PAGECALLBACKS,
|
||||
TOK_PAGEEXEND,
|
||||
|
||||
// PageEx stuff
|
||||
TOK_DIRVAR,
|
||||
|
||||
// flag setters
|
||||
TOK_SETDATESAVE,
|
||||
|
@ -175,8 +186,7 @@ enum
|
|||
TOK_SENDMESSAGE,
|
||||
TOK_ISWINDOW,
|
||||
TOK_GETDLGITEM,
|
||||
TOK_GETWINTEXT,
|
||||
TOK_SETBKCOLOR,
|
||||
TOK_SETCTLCOLORS,
|
||||
TOK_FINDFIRST,
|
||||
TOK_FINDNEXT,
|
||||
TOK_FINDCLOSE,
|
||||
|
@ -213,12 +223,8 @@ enum
|
|||
TOK_CREATEFONT,
|
||||
TOK_SHOWWINDOW,
|
||||
TOK_ENABLEWINDOW,
|
||||
// Added by ramon 23 May 2003
|
||||
TOK_ALLOWSKIPFILES,
|
||||
// Added by ramon 3 jun 2003
|
||||
TOK_DEFVAR,
|
||||
TOK_VI_ADDKEY,
|
||||
TOK_VI_SETPRODUCTVERSION,
|
||||
TOK_SETSILENT,
|
||||
TOK_IFSILENT,
|
||||
|
||||
TOK__LAST,
|
||||
TOK__PLUGINCOMMAND
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue