From 3d3b74677a440b00d94b6b4e71e7f2f97800c427 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Mon, 17 Feb 2003 15:40:00 +0000 Subject: [PATCH] Optionally honour #! paths in scripts. Fixes #676358. --- .../English.lproj/MyDocument.nib/classes.nib | 5 ++-- .../English.lproj/MyDocument.nib/info.nib | 10 +++---- .../English.lproj/MyDocument.nib/objects.nib | Bin 4174 -> 4441 bytes Mac/OSX/PythonLauncher/FileSettings.h | 2 ++ Mac/OSX/PythonLauncher/FileSettings.m | 26 +++++++++++++++++- Mac/OSX/PythonLauncher/MyDocument.h | 1 + Mac/OSX/PythonLauncher/MyDocument.m | 2 ++ .../PreferenceWindow.nib/classes.nib | 1 + .../PreferenceWindow.nib/info.nib | 6 ++-- .../PreferenceWindow.nib/objects.nib | Bin 7678 -> 7874 bytes .../PreferencesWindowController.h | 1 + .../PreferencesWindowController.m | 2 ++ .../PythonLauncher.pbproj/project.pbxproj | 2 +- Mac/OSX/PythonLauncher/factorySettings.plist | 10 +++++-- 14 files changed, 54 insertions(+), 14 deletions(-) diff --git a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib index 7c581494b6f..7778ff04555 100644 --- a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib +++ b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/classes.nib @@ -2,12 +2,13 @@ IBClasses = ( {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, { - ACTIONS = {do_apply = id; do_cancel = id; do_reset = id; do_run = id; }; + ACTIONS = {"do_apply" = id; "do_cancel" = id; "do_reset" = id; "do_run" = id; }; CLASS = MyDocument; LANGUAGE = ObjC; OUTLETS = { commandline = NSTextField; debug = NSButton; + honourhashbang = NSButton; inspect = NSButton; interpreter = NSTextField; nosite = NSButton; @@ -15,7 +16,7 @@ others = NSTextField; tabs = NSButton; verbose = NSButton; - with_terminal = NSButton; + "with_terminal" = NSButton; }; SUPERCLASS = NSDocument; } diff --git a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib index c7676460e7f..0630cb93580 100644 --- a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib +++ b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/info.nib @@ -1,16 +1,16 @@ - - + + IBDocumentLocation - 265 40 356 240 0 0 800 578 + 551 90 356 240 0 0 1280 1002 IBFramework Version - 263.2 + 286.0 IBOpenObjects 5 IBSystem Version - 5S66 + 6I32 diff --git a/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nib b/Mac/OSX/PythonLauncher/English.lproj/MyDocument.nib/objects.nib index 33521ada231fe80754aa1e6926ca1775dcb3e338..97eb230a29c272ca83ab4fef213f30eb83a562dd 100644 GIT binary patch literal 4441 zcma)ATWl2P75>LI#^6ga#xA#zaiAhVfpRBK2C!U?z&dg#v zZ{y6)TU2RlkGwQmYlTQsFm$0QqETg4`u*TMpcYwb!iMYJcDg)uXBsq#7AXSYM#db^bt`I=CP1zevQB#H#VZCzSno zHeHGtLa$6)HBA@->FfOg?{*})5hZ}w9y(}rN>mPR`&}ZPB;#@T)SFzNR!@jlpGYU- z_{XY{MA1h$kYW9x=ukVA<@YVC2IPu{q$>Da?;4JGt$>0g4Oeil$T0B{VpX7p*4S80 zmts&Ys!_PM*dP-;?F6?QN0NK2b-y@vQoK<~2-yz*UcDw4NsNd@B0(aM^F)KI0{0Z; zaiLm^6UhWOK_)8fcpTKVKs@4!J65^q^P#oia=R+4fZ9Z*Rqm;;3=HW8jo4_3=%MZM z*w!B=%B`|c=(Dr?@808Ve6Gx7fNfKj4bdvFJ|w_n13Fww+)h|u<^hyVj+$IU6Crrb zfp{D7`}(Wlkzc=Rb@BKbBolig9>4Dz{rCZwSJ+^HrZz$B@6*(n5-ifm72CA|*}Rv3 zLQ5Wj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q5g-p(Iv;U`b??oPfj%wONbkDTOZ&+interpreter retain]; + honourhashbang = source->honourhashbang; debug = source->debug; verbose = source->verbose; inspect = source->inspect; @@ -182,6 +183,7 @@ - (void)updateFromSource: (id )source { interpreter = [[source interpreter] retain]; + honourhashbang = [source honourhashbang]; debug = [source debug]; verbose = [source verbose]; inspect = [source inspect]; @@ -196,6 +198,7 @@ NSUserDefaults *defaults; NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys: interpreter, @"interpreter", + [NSNumber numberWithBool: honourhashbang], @"honourhashbang", [NSNumber numberWithBool: debug], @"debug", [NSNumber numberWithBool: verbose], @"verbose", [NSNumber numberWithBool: inspect], @"inspect", @@ -216,6 +219,8 @@ value = [dict objectForKey: @"interpreter"]; if (value) interpreter = [value retain]; + value = [dict objectForKey: @"honourhashbang"]; + if (value) honourhashbang = [value boolValue]; value = [dict objectForKey: @"debug"]; if (value) debug = [value boolValue]; value = [dict objectForKey: @"verbose"]; @@ -236,9 +241,27 @@ - (NSString *)commandLineForScript: (NSString *)script { + NSString *cur_interp = NULL; + char hashbangbuf[1024]; + FILE *fp; + char *p; + + if (honourhashbang && + (fp=fopen([script cString], "r")) && + fgets(hashbangbuf, sizeof(hashbangbuf), fp) && + strncmp(hashbangbuf, "#!", 2) == 0 && + (p=strchr(hashbangbuf, '\n'))) { + *p = '\0'; + p = hashbangbuf + 2; + while (*p == ' ') p++; + cur_interp = [NSString stringWithCString: p]; + } + if (!cur_interp) + cur_interp = interpreter; + return [NSString stringWithFormat: @"\"%@\"%s%s%s%s%s%s %@ \"%@\" %s", - interpreter, + cur_interp, debug?" -d":"", verbose?" -v":"", inspect?" -i":"", @@ -254,6 +277,7 @@ // FileSettingsSource protocol - (NSString *) interpreter { return interpreter;}; +- (BOOL) honourhashbang { return honourhashbang; }; - (BOOL) debug { return debug;}; - (BOOL) verbose { return verbose;}; - (BOOL) inspect { return inspect;}; diff --git a/Mac/OSX/PythonLauncher/MyDocument.h b/Mac/OSX/PythonLauncher/MyDocument.h index 47c7be38e49..dd2b4fe9bde 100755 --- a/Mac/OSX/PythonLauncher/MyDocument.h +++ b/Mac/OSX/PythonLauncher/MyDocument.h @@ -14,6 +14,7 @@ @interface MyDocument : NSDocument { IBOutlet NSTextField *interpreter; + IBOutlet NSButton *honourhashbang; IBOutlet NSButton *debug; IBOutlet NSButton *verbose; IBOutlet NSButton *inspect; diff --git a/Mac/OSX/PythonLauncher/MyDocument.m b/Mac/OSX/PythonLauncher/MyDocument.m index fdcf86a6d5a..09a0024d5e7 100755 --- a/Mac/OSX/PythonLauncher/MyDocument.m +++ b/Mac/OSX/PythonLauncher/MyDocument.m @@ -52,6 +52,7 @@ // [[self window] setTitle: script]; [interpreter setStringValue: [settings interpreter]]; + [honourhashbang setState: [settings honourhashbang]]; [debug setState: [settings debug]]; [verbose setState: [settings verbose]]; [inspect setState: [settings inspect]]; @@ -152,6 +153,7 @@ // FileSettingsSource protocol - (NSString *) interpreter { return [interpreter stringValue];}; +- (BOOL) honourhashbang { return [honourhashbang state];}; - (BOOL) debug { return [debug state];}; - (BOOL) verbose { return [verbose state];}; - (BOOL) inspect { return [inspect state];}; diff --git a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib index 43a1936d65f..467aa8b2612 100644 --- a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib +++ b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/classes.nib @@ -9,6 +9,7 @@ commandline = NSTextField; debug = NSButton; filetype = NSPopUpButton; + honourhashbang = NSButton; inspect = NSButton; interpreter = NSTextField; nosite = NSButton; diff --git a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib index f5b17b60588..e4c54c13d6d 100644 --- a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib +++ b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/info.nib @@ -3,14 +3,14 @@ IBDocumentLocation - 126 59 356 240 0 0 1024 746 + 660 84 519 534 0 0 1280 1002 IBFramework Version - 291.0 + 286.0 IBOpenObjects 5 IBSystem Version - 6G30 + 6I32 diff --git a/Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nib b/Mac/OSX/PythonLauncher/PreferenceWindow.nib/objects.nib index f220e5cb142f106a1ba026f0a01d2fd7ecd4cb26..12539d08bfc7d60a8b18bbc625d73330557b2f6e 100644 GIT binary patch delta 3920 zcmZ`+3v3j}8J@ZG>-++2Ft(xON)QxG3?@KS^EzzmLP>ZTKaz$d=exCiaK1hE*1@E0 zu6yimQ#Ghz7gj!GE{&74!U2OES3#ynLt1_N2?fz534R2m2>7~Mgzshc<9^hyeuKB?Uh77(Bwh`!x}x^uRhFv- z@In80#PnR*weH-5d^^K6x|mZwS^Q1VtPCjPr^=w(Z8~ZGgBDiv&FlTYRU}!b{vL_l z-KB?4^X;t1T63Cb9ITVE?qMCB9gK&UhXQCJLIHm?8b#7g>GRK!q)=H|l6A>~m}I?! zb9vL)aVoncnq4+mUCN7hmUM+|II(6DQ6S@Mi*gcM(GLse}}X z{(gusKqM|mk*Q_e?wx&?0~vT01&|G)J~cmM`HCx&bPb%8lslr?VY5-GY>KR#<^}1HiJNmhI@Udz@Cc%fnR5i7@%E=EcI4FUMURzKQNX1Y4ieV5Ha)@J~1Z zfJ;CAla})Ld3c8Natu7H<;1xkr7Ha>;ruGEfcFb%sE7hPRFrmx%f=Z1!QUi&o@vU!P4VRHZX+Z^e~q8@@l6~9dVOYD zBLx~Kum{*IJmi8NCHc=3ejSpe_ls8u=z*2G{=k}ME#`V42U4p~wJurVPq;s-yN?5M zz!n`6^`f}~nX8DGbWor)FchLP2Bil397X&{iNwk-UqENN0I9AbC6bbW37o*;!bXN` zVSS9%)!}71K7qeq8Bc>v`dYV{raLI0i+UU`&ac0C57W}wX7$=RAH!MMPTt#@G@?w* zYh#VxH}X3KbYC}de;yO+@uHPUtS0BxXQ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}(RV^-ZoCXmvsw4tYZZu3#X8u%Kf6`x#hV?;Lk*KufY=AzvJM-)Rgv3$%bg&a;{6n^|jP_^|eK0V7zoHy(d#K zIa|x7@t^YXqa|Y&%J0pHDQaAmzAP$bhgr&YRl2M)X7NVlN)eqK0UJhYRK^UZ;hUTV z;O(lzEZ@&XSXW>u%<)1#v#N{ik!_G91>BT6E~3kZgDx*l?;8jH+E>~B;Xzl}%STw= z#SIJL;et(Sp0UZ0i0&I(++Tc)ajnk2^0izH>YhP&L`3Hey7Nz?6YceRI_ER!_K0ZG zpqqRe-QVoZdAg=&(6x%_YlH6Vr_ptmua4%7ZC;G-ZZ`Px5xA5rM#@=gi=q!HcX5%F zYk`z2&zDywhhzuS2Q}MQm8ICWcy$?+M3)jnYp-@HHqkfiv4G^avgTUZAfWY9)?f^IdFrP|_{^&7zplB+R2m7|%Fp;dU6}<(3LRV9hYKoR= z0q660wf2#7qcwG@RlDn4ZArCg|8#!G=1EoeYTs^H2c4Q;t*>DXbn1GwXv0g;Y3kK( zHEe^9vse43VH0$kd$l!a4d@B0}wFA#>kHS$M-z{0( zfwGFof^ zZsfI`?*PKF+(3_YSeAIsT-g F{2v($5(oeQ diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.h b/Mac/OSX/PythonLauncher/PreferencesWindowController.h index 57821c5b37c..63c1836d567 100644 --- a/Mac/OSX/PythonLauncher/PreferencesWindowController.h +++ b/Mac/OSX/PythonLauncher/PreferencesWindowController.h @@ -8,6 +8,7 @@ { IBOutlet NSPopUpButton *filetype; IBOutlet NSTextField *interpreter; + IBOutlet NSButton *honourhashbang; IBOutlet NSButton *debug; IBOutlet NSButton *verbose; IBOutlet NSButton *inspect; diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.m b/Mac/OSX/PythonLauncher/PreferencesWindowController.m index e7ddfdd7800..fd65194afce 100644 --- a/Mac/OSX/PythonLauncher/PreferencesWindowController.m +++ b/Mac/OSX/PythonLauncher/PreferencesWindowController.m @@ -30,6 +30,7 @@ // [[self window] setTitle: script]; [interpreter setStringValue: [settings interpreter]]; + [honourhashbang setState: [settings honourhashbang]]; [debug setState: [settings debug]]; [verbose setState: [settings verbose]]; [inspect setState: [settings inspect]]; @@ -74,6 +75,7 @@ // FileSettingsSource protocol - (NSString *) interpreter { return [interpreter stringValue];}; +- (BOOL) honourhashbang { return [honourhashbang state]; }; - (BOOL) debug { return [debug state];}; - (BOOL) verbose { return [verbose state];}; - (BOOL) inspect { return [inspect state];}; diff --git a/Mac/OSX/PythonLauncher/PythonLauncher.pbproj/project.pbxproj b/Mac/OSX/PythonLauncher/PythonLauncher.pbproj/project.pbxproj index 2cfdaf12393..5b4a06c87c5 100755 --- a/Mac/OSX/PythonLauncher/PythonLauncher.pbproj/project.pbxproj +++ b/Mac/OSX/PythonLauncher/PythonLauncher.pbproj/project.pbxproj @@ -132,7 +132,6 @@ 4A9504D0FFE6A4CB11CA0CBA, 4A9504D1FFE6A4CB11CA0CBA, ); - hasScannedForEncodings = 1; isa = PBXProject; mainGroup = 2A37F4AAFDCFA73011CA2CEA; projectDirPath = ""; @@ -404,6 +403,7 @@ "; + shouldUseHeadermap = 0; }; 2A37F4C7FDCFA73011CA2CEA = { buildActionMask = 2147483647; diff --git a/Mac/OSX/PythonLauncher/factorySettings.plist b/Mac/OSX/PythonLauncher/factorySettings.plist index 46092b5d443..1d8d039e8e5 100644 --- a/Mac/OSX/PythonLauncher/factorySettings.plist +++ b/Mac/OSX/PythonLauncher/factorySettings.plist @@ -16,6 +16,8 @@ /usr/bin/pythonw /Applications/MacPython-OSX/python-additions/Python.app/Contents/MacOS/python + honourhashbang + nosite optimize @@ -45,7 +47,9 @@ /usr/bin/pythonw /Applications/MacPython-OSX/python-additions/Python.app/Contents/MacOS/python - nosite + honourhashbang + + nosite optimize @@ -69,7 +73,9 @@ /Library/Frameworks/Python.framework/Versions/Current/bin/python /usr/bin/python - nosite + honourhashbang + + nosite optimize