From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1003 invoked by alias); 25 Jan 2013 22:12:31 -0000 Received: (qmail 987 invoked by uid 22791); 25 Jan 2013 22:12:31 -0000 X-SWARE-Spam-Status: No, hits=-3.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-in-06.arcor-online.net (HELO mail-in-06.arcor-online.net) (151.189.21.46) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 25 Jan 2013 22:12:01 +0000 Received: from mail-in-02-z2.arcor-online.net (mail-in-02-z2.arcor-online.net [151.189.8.14]) by mx.arcor.de (Postfix) with ESMTP id AD13610BFD9 for ; Fri, 25 Jan 2013 23:11:59 +0100 (CET) Received: from mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id A3F63718C37 for ; Fri, 25 Jan 2013 23:11:59 +0100 (CET) Received: from Rainer.invalid (pD9EB2830.dip.t-dialin.net [217.235.40.48]) (Authenticated sender: stromeko@arcor.de) by mail-in-06.arcor-online.net (Postfix) with ESMTPSA id 4F06410BFD9 for ; Fri, 25 Jan 2013 23:11:59 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-06.arcor-online.net 4F06410BFD9 From: Achim Gratz To: cygwin-apps@cygwin.com Subject: Re: [PATCH 4/4] setup.exe References: <87wqva4d7e.fsf@Rainer.invalid> <87r4l8or3d.fsf@Rainer.invalid> Date: Fri, 25 Jan 2013 22:12:00 -0000 In-Reply-To: <87r4l8or3d.fsf@Rainer.invalid> (Achim Gratz's message of "Fri, 25 Jan 2013 23:06:14 +0100") Message-ID: <87622koqtt.fsf_-_@Rainer.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2013-01/txt/msg00100.txt.bz2 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0004-Allow-a-different-basename-instead-of-setup.patch Content-length: 2600 >From ead437489d0873f983103cef24b708af18a9a391 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Fri, 18 Jan 2013 17:05:52 +0100 Subject: [PATCH 4/4] Allow a different basename (instead of "setup") * setup/ini.h: Modify macro definition to pick up name from external variable SetupBaseName instead of string constant. * setup/main.cc: New string option "-I" aka "--ini-basename" to feed basename into setup and default to "setup". Copy resulting string to the exported variable SetupBaseName. --- setup/ini.h | 6 ++++-- setup/main.cc | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/setup/ini.h b/setup/ini.h index 7276e0a..cf26aa1 100755 --- a/setup/ini.h +++ b/setup/ini.h @@ -39,8 +39,10 @@ typedef enum } excludes; extern bool is_legacy; -#define SETUP_INI_FILENAME (is_legacy ? "setup-legacy.ini" : "setup.ini") -#define SETUP_BZ2_FILENAME (is_legacy ? "setup-legacy.bz2" : "setup.bz2") + +#define SETUP_INI_FILENAME (is_legacy ? "setup-legacy.ini" : (std::string(SetupBaseName)+".ini").c_str()) +#define SETUP_BZ2_FILENAME (is_legacy ? "setup-legacy.bz2" : (std::string(SetupBaseName)+".bz2").c_str()) +extern std::string SetupBaseName; /* The following three vars are used to facilitate error handling between the parser/lexer and its callers, namely ini.cc:do_remote_ini() and diff --git a/setup/main.cc b/setup/main.cc index dc73936..b71cb63 100755 --- a/setup/main.cc +++ b/setup/main.cc @@ -67,6 +67,7 @@ static const char *cvsid = #include "getopt++/GetOption.h" #include "getopt++/BoolOption.h" +#include "getopt++/StringOption.h" #include "Exception.h" #include @@ -91,6 +92,8 @@ bool is_legacy; static BoolOption UnattendedOption (false, 'q', "quiet-mode", "Unattended setup mode"); static BoolOption PackageManagerOption (false, 'M', "package-manager", "Semi-attended chooser-only mode"); static BoolOption HelpOption (false, 'h', "help", "print help"); +static StringOption SetupBaseNameOpt ("setup", 'I', "ini-basename", "Use a different basename instead of setup", false); +std::string SetupBaseName; static BOOL WINAPI (*dyn_AttachConsole) (DWORD); static BOOL WINAPI (*dyn_GetLongPathName) (LPCTSTR, LPTSTR, DWORD); @@ -289,6 +292,8 @@ WinMain (HINSTANCE h, if (unattended_mode || HelpOption) set_cout (); + SetupBaseName = SetupBaseNameOpt; + LogSingleton::SetInstance (*(theLog = LogFile::createLogFile ())); const char *sep = isdirsep (local_dir[local_dir.size () - 1]) ? "" : "\\"; theLog->setFile (LOG_BABBLE, local_dir + sep + "setup.log.full", false); -- 1.8.1.1 --=-=-= Content-Type: text/plain Content-length: 183 Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ SD adaptation for Waldorf rackAttack V1.04R1: http://Synth.Stromeko.net/Downloads.html#WaldorfSDada --=-=-=--