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 7c581494b6f1..7778ff045557 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 c7676460e7fe..0630cb935806 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 zc-oCuTWl2P75>LIw!xQTj9qR?hCoGt0_9Ge5Y`tiPQa$DfvPP@$Fu)>C!U?z&dg#v zZ{y6)TU2Rlk60S5wL&B*7;0#WXjEC1em^)5s703A@Mg)9RacfQUQnN)=giDrZ8tS| zFK5nw&i8-k>WUg;C`LoNp-~}fmjBD*0+wafcLh7!x_dvSqR}B3f=OmAtGX-bNk}5; zskFy+LydaE-6K|60FQ!N(9k5Mj~lVLz3VOvb*N%IN)^LS*cK->Ii5~i+%QyySk_vw zqbi1`%DXMAvMYE+q66@$rYm@f>M>ObQH_iwt|M4(g zh#Nw$Oj|Wg7y|26T|w{TNNOEg0JA-G&^RMeIkfqA$xMojCE%yQjwpg+NmtRXIZsiS2QG5!S4+&aQxH?EJ)ID1^1E+lK>%B1tPR=+^FqT z464O63a>4;jz%sGN6N!5+=tuXtoWn)~Jhcg8f1jqtl~93Ct`OH+BM0bDh~y#Q z7)x3=b4X0?U~LaiNDp6x!VQ_1bQq{pzyH#UQuPTBRr#g3k_R?vt<`l&!r%o=GQF7_ z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&`RMjqjtW)7Rvc0=$f~q( z7zk+?iWM3*93!NlPs+jE`F9MAIvA(=ubE+92MhOKGUCpO>42tP6H_T=IG|099rN!q z;e9r|&xQAS|K2dMFc!GG0l$MTFeO#&F*Gogf*uWKXE}wd7uhi8^Y-6~X1^*X8IB!r z47$n-rzf7C0k+q=Q%t4#1JHz~10zgzhr;2`=bR2WRb`lVq~*9q2eq^krwn{e(=eTy z{jw2oP9f*+Sid$%2f=jy2$xovK}9`32C+Cz=vp%1pF#eE9U68F`TtFRd59(pHO=DA zw=RhTjP^08B_ayW&vDdH&$aT4 z=eSqF-#o}qo#wwf#BXlmv3L2Hz?XOMr^ooxcK*(9`IFc9!moMr8J^q1Cx6N3_wzl! z;d>ABnYZ}mi~RjgKD(DcI>4v4^3A*Ww%2(_8{hE;Kl(P`^(H_04&Q%-A2`b2ZsyZ_ z_}o7Jcqc!8k}q!K_c!wsr+8;O-_XEc-^~x7;AhYBOC9{sao&A_x3zfhc?3UgHgvYO RX_6+M*CFHwHGRNw{s#qO!59Dl diff --git a/Mac/OSX/PythonLauncher/FileSettings.h b/Mac/OSX/PythonLauncher/FileSettings.h index 80c11f1e5274..f70b05f51831 100755 --- a/Mac/OSX/PythonLauncher/FileSettings.h +++ b/Mac/OSX/PythonLauncher/FileSettings.h @@ -10,6 +10,7 @@ @protocol FileSettingsSource - (NSString *) interpreter; +- (BOOL) honourhashbang; - (BOOL) debug; - (BOOL) verbose; - (BOOL) inspect; @@ -24,6 +25,7 @@ { NSString *interpreter; // The pathname of the interpreter to use NSArray *interpreters; // List of known interpreters + BOOL honourhashbang; // #! line overrides interpreter BOOL debug; // -d option: debug parser BOOL verbose; // -v option: verbose import BOOL inspect; // -i option: interactive mode after script diff --git a/Mac/OSX/PythonLauncher/FileSettings.m b/Mac/OSX/PythonLauncher/FileSettings.m index b2961d297a8e..7b28daae0177 100755 --- a/Mac/OSX/PythonLauncher/FileSettings.m +++ b/Mac/OSX/PythonLauncher/FileSettings.m @@ -69,6 +69,7 @@ if (!self) return self; interpreter = [source->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 47c7be38e496..dd2b4fe9bde2 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 fdcf86a6d5a7..09a0024d5e77 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 43a1936d65fa..467aa8b26121 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 f5b17b60588b..e4c54c13d6de 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 zc-n@#_SXEQ zZLWLlZd)~|VHZ|DWG;%86j z^-ptm-uHIi%s2C9=FJ;VZ~1iFyMlR{CZ4~%yg(E)_t(|1r`KIl#7pM~_N*1f93XV? zJnKQCXxU#^%X)Z@b+5gogo5a@1Rnt@0=}sh;Rl($xEJ-RU*fH~H#(6liPwXxuBp9v zmF0Q?Ea;1eP0yCy=*&I9w=rCUi#g?!#a{)@N}nQrr1YzurW5AhYhg9tyx#vCMUr*u z?~vHpS$gmc-^O~ZHD`Fn!8#f1F4ob}&UkovAb=Jk6!1r*Q6$}#KKU3)3YC>5S(hw` zN!B?ymp6?ar?N|;*=2JDwjqT2kt{3qqA2F=uRFq==6Aaox3lbn#E$a>{IP)ES%eUM zDj`Lp-zx}%i^K&fGPR7`y}jpZAOlaM0J0&}qvmHUUvW*6ZXhaiPc%DhHY$}(J?myU zbfH(>o$<_)&w9&*&3Qs2%fX@r$K2uQLbiMSeE)TM~`6Q(V# zJ6ed)(ZV#N{*Y<`^++w--fs6et!|fxsg@IA@?X!3g(+W-n>ctIJ$wwhKB2)#(Iem= za^L`N(f`$yzt_VvoR?$ZSuH2_{UjCi*9p*7UIFhD&_EG&>_AZ(@>K&FJowv%-&mSJ z8oDW<2W6(fo~?(X0|V+83oC1rMzV(lTv7~R@SJI;cw%~|VdlVJ;$Tm2a?M`3VdzY+$%%*2h>~?OvAS6aM!r zqiJrFzR-21VFv|tNsq&&`SFW)G0h#VRmI@TCU+6DAbSMhKj z73#5~l}TTXe~rzJ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 zGO0JZ^g5T`?9!7hi3UBv4vF03Y(3F$z!+XCd${mWhsX`K68#Q4SBst@>p^yVmKGRJ zgQ(~oK=dgP*v;1+Sh&q;bDfPFw0(;g#U|M%8E=c$R#3sku52Xw7#nx7i~03nR3v&+ z3B)F%SDRjB1q`BvNxB3szzJN~&qaxDXBk%H{RX1DK*XM%F~*pFfhp_?hPY>=p1mi+ zoIvztvupr3GfM;k*Oj;f0w)N}rxMX0Jr2=Wq7U(HxNb^vEE2tW7S$}Ini4ZD=zbP2 z*FJQwwWcq$Xm{PqE$L?MpY9*ny3^G?+V|^ML8qoi>#bh_ow^<^R{sKY8hf;x^_!sM z?$N%hUk9D09&JU#i_pP6ny-N=+k3S48&<~lrY|tgoPP5rWfv(s96-!GDeGrPa#k?H z_Ada`iKiktCB}+97>-6bznB%Vz{|sYG$`hjSTZxJ^DJW+eoMTXw!PS-wQM6eALxS z5ACFpeK0!nChhNl_7_Je-a=zPqGQj&=+Xckd7eIck@oGTlWXW3?NmJ74RW2M@AgpV zb{guWw^vbNKfSY>F53h%s-IrK&<+Ra^_BFkAJV{Uw9`S~d4*;+gIIZsp6sPlYiYQP vHoriV;P*|(&UW6<`*sPwLGA=E93$la84D5! diff --git a/Mac/OSX/PythonLauncher/PreferencesWindowController.h b/Mac/OSX/PythonLauncher/PreferencesWindowController.h index 57821c5b37c4..63c1836d5677 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 e7ddfdd7800a..fd65194afce0 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 2cfdaf123930..5b4a06c87c57 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 46092b5d443f..1d8d039e8e50 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 -- 2.47.3