From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73767 invoked by alias); 5 Apr 2018 16:26:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 73675 invoked by uid 89); 5 Apr 2018 16:26:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*r:ip*192.168.1.100, Hx-spam-relays-external:!192.168.1.100!, H*RU:!192.168.1.100!, calgary X-HELO: smtp-out-so.shaw.ca Received: from smtp-out-so.shaw.ca (HELO smtp-out-so.shaw.ca) (64.59.136.139) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Apr 2018 16:26:41 +0000 Received: from [192.168.1.100] ([24.64.240.204]) by shaw.ca with ESMTP id 47iifcezXLkoz47ijfHiQM; Thu, 05 Apr 2018 10:26:41 -0600 X-Authority-Analysis: v=2.3 cv=OeS28CbY c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=0yD9ISVwnxQVSN8uV00A:9 a=QEXdDO2ut3YA:10 From: Brian Inglis Subject: Re: How to handle length limit of PATH environment variable Reply-To: Brian.Inglis@SystematicSw.ab.ca To: cygwin@cygwin.com References: <08077aa1-2da3-d381-8592-20c39acf063d@abacus.ch> Message-ID: Date: Thu, 05 Apr 2018 16:26:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <08077aa1-2da3-d381-8592-20c39acf063d@abacus.ch> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfDWub3bVfZ8CAIWfatALpmRMuaD1FubM+4E3utstJaQhtvZZSSz42kSJlnRHNk72nySDX3jEhv/wgaHUampvuW+otMFtkmQqbudkqKkRXV4etniHrkFE 5a45eN9Yb3p19hW9lcR/gZV9HALK/pDXcFP0FeyXYvJmYvI58GvAP01W X-IsSubscribed: yes X-SW-Source: 2018-04/txt/msg00037.txt.bz2 On 2018-04-05 04:05, Wolf Geldmacher wrote: > On 05.04.2018 11:19, Peter Bauer wrote: >> i was bitten by the length limit of the PATH variable of 4095 characters (see >> [1]) and could not find a way around it. This means i have a lot of software >> packages in different directories and each of them adds itself to the PATH so >> one can run the executables and have the shared libs available. Under Windows >> there is the "short path workaround" but what to do under Cygwin? >> Creating links with shorter names to the directories is not feasible since >> there may be different users and different directories per user. >> >> Any ideas? > On Unix (though not on cygwin) I've previously solved such issues by writing a > script that collects symlinks to the contents of some list of directories in a > few (system and/or user specific) directories. These few directories then take > the place of the list. > > The script will need to be re-run whenever there are changes to the directories > on the list, but that can usually be automated. Under Cygwin, I ln -rs custom local Cygwin scripts and exes in: /usr/local/bin/ added at the head of the Cygwin PATH, and to keep them separate from Cygwin components, put custom local Windows user scripts and exes in: /proc/cygdrive/c/usr/local/bin/ added after all Cygwin dirs in PATH, before other Windows dirs. I keep Windows system specific scripts e.g. .cmd, .reg and exes requiring elevation in: /proc/cygdrive/c/usr/local/sbin/ separate from the unprivileged components. I add /usr/local/bin/ to the head of the cron PATH, and /home/.../bin/ to the tail of the cron PATH, so everything used in cron jobs is there; I run everything in Scheduled tasks from C:\usr\local\bin\ for similar reasons. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple