diff options
Diffstat (limited to 'luapatch.cpp')
-rw-r--r-- | luapatch.cpp | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/luapatch.cpp b/luapatch.cpp index 07e129d..1491856 100644 --- a/luapatch.cpp +++ b/luapatch.cpp @@ -1,3 +1,24 @@ +/* + * PSX-Tools Bundle Pack + * Copyright (C) 2002-2005 Nicolas "Pixel" Noble + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* $Id: luapatch.cpp,v 1.10 2004-12-21 11:14:16 pixel Exp $ */ + #include <windowsx.h> #include <Input.h> @@ -366,7 +387,8 @@ bool Verify(HWND hW) { CODE_BEGINS virtual int startup(void) throw (GeneralException) { verbosity = M_INFO; - printm(M_BARE, "LuaPatch (C) 2003-2005 Nicolas \"Pixel\" Noble - front-end starting.\n"); + printm(M_BARE, "CD-Tool core (C) 2003-2005 Nicolas \"Pixel\" Noble\nCompiled the " __DATE__ " at " __TIME__ "\n\n"); + printm(M_BARE, "LuaPatch (C) 2003-2005 Nicolas \"Pixel\" Noble\nFront-end starting.\n"); int lang; lang = GetUserDefaultLangID(); @@ -423,25 +445,21 @@ virtual int startup(void) throw (GeneralException) { config_file = new Input("patch.ini"); } catch (IOGeneral e) { + printm(M_WARNING, GetString(PARASITE_EVE)); + config_file = new Buffer(true); + (*config_file) << +"[patch]\n" +"type=rebuild\n" +"filename=main\n" +"command=\n"; } - if (!config_file) { - printm(M_WARNING, GetString(PARASITE_EVE)); - try { - L->load(&Input("main")); - } - catch (IOGeneral e) { - printm(M_ERROR, GetString(VERBOSE_CFG_ERROR)); - throw GeneralException(GetString(CFG_ERROR)); - } - } else { - ConfigFile cfg(config_file); - Buffer cmd; + ConfigFile cfg(config_file); + Buffer cmd; - L->load(&Input(cfg["patch"]["filename"])); - cmd << cfg["patch"]["command"]; - L->load(&cmd); - } + L->load(&Input(cfg["patch"]["filename"])); + cmd << cfg["patch"]["command"]; + L->load(&cmd); delete config_file; |