diff options
Diffstat (limited to 'Mac/PythonLauncher')
-rw-r--r-- | Mac/PythonLauncher/FileSettings.h | 24 | ||||
-rw-r--r-- | Mac/PythonLauncher/Info.plist.in | 6 | ||||
-rw-r--r-- | Mac/PythonLauncher/Makefile.in | 32 | ||||
-rw-r--r-- | Mac/PythonLauncher/MyAppDelegate.h | 4 | ||||
-rw-r--r-- | Mac/PythonLauncher/PreferencesWindowController.m | 12 |
5 files changed, 41 insertions, 37 deletions
diff --git a/Mac/PythonLauncher/FileSettings.h b/Mac/PythonLauncher/FileSettings.h index 3fadb7d..7b74a9b 100644 --- a/Mac/PythonLauncher/FileSettings.h +++ b/Mac/PythonLauncher/FileSettings.h @@ -24,18 +24,18 @@ @interface FileSettings : NSObject <FileSettingsSource> { - 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 - BOOL optimize; // -O option: optimize bytecode - BOOL nosite; // -S option: don't import site.py - BOOL tabs; // -t option: warn about inconsistent tabs - NSString *others; // other options - NSString *scriptargs; // script arguments (not for preferences) - BOOL with_terminal; // Run in terminal window + 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 + BOOL optimize; // -O option: optimize bytecode + BOOL nosite; // -S option: don't import site.py + BOOL tabs; // -t option: warn about inconsistent tabs + NSString *others; // other options + NSString *scriptargs; // script arguments (not for preferences) + BOOL with_terminal; // Run in terminal window FileSettings *origsource; NSString *prefskey; diff --git a/Mac/PythonLauncher/Info.plist.in b/Mac/PythonLauncher/Info.plist.in index 9fb4e0a..dba6454 100644 --- a/Mac/PythonLauncher/Info.plist.in +++ b/Mac/PythonLauncher/Info.plist.in @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> @@ -38,9 +38,9 @@ </dict> </array> <key>CFBundleExecutable</key> - <string>Python Launcher</string> + <string>PythonLauncher</string> <key>CFBundleGetInfoString</key> - <string>%VERSION%, © 2001-2019 Python Software Foundation</string> + <string>%VERSION%, © 2001-2020 Python Software Foundation</string> <key>CFBundleIconFile</key> <string>PythonLauncher.icns</string> <key>CFBundleIdentifier</key> diff --git a/Mac/PythonLauncher/Makefile.in b/Mac/PythonLauncher/Makefile.in index 4c05f26..76da857 100644 --- a/Mac/PythonLauncher/Makefile.in +++ b/Mac/PythonLauncher/Makefile.in @@ -15,13 +15,17 @@ BUILDPYTHON= $(builddir)/python$(BUILDEXE) PYTHONFRAMEWORK=@PYTHONFRAMEWORK@ # Deployment target selected during configure, to be checked -# by distutils +# by distutils MACOSX_DEPLOYMENT_TARGET=@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@ @EXPORT_MACOSX_DEPLOYMENT_TARGET@export MACOSX_DEPLOYMENT_TARGET +BUNDLEBULDER=$(srcdir)/../../Lib/plat-mac/bundlebuilder.py + PYTHONAPPSDIR=@FRAMEWORKINSTALLAPPSPREFIX@/$(PYTHONFRAMEWORK) $(VERSION) OBJECTS=FileSettings.o MyAppDelegate.o MyDocument.o PreferencesWindowController.o doscript.o main.o +all: Python\ Launcher.app + install: Python\ Launcher.app test -d "$(DESTDIR)$(PYTHONAPPSDIR)" || mkdir -p "$(DESTDIR)$(PYTHONAPPSDIR)" -test -d "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" && rm -r "$(DESTDIR)$(PYTHONAPPSDIR)/Python Launcher.app" @@ -31,7 +35,6 @@ install: Python\ Launcher.app clean: rm -f *.o "Python Launcher" rm -rf "Python Launcher.app" - rm -f Info.plist Python\ Launcher.app: Info.plist \ Python\ Launcher $(srcdir)/../Icons/PythonLauncher.icns \ @@ -39,17 +42,18 @@ Python\ Launcher.app: Info.plist \ $(srcdir)/../Icons/PythonCompiled.icns \ $(srcdir)/factorySettings.plist rm -fr "Python Launcher.app" - mkdir "Python Launcher.app" - mkdir "Python Launcher.app/Contents" - mkdir "Python Launcher.app/Contents/MacOS" - mkdir "Python Launcher.app/Contents/Resources" - cp "Python Launcher" "Python Launcher.app/Contents/MacOS" - cp Info.plist "Python Launcher.app/Contents" - cp $(srcdir)/../Icons/PythonLauncher.icns "Python Launcher.app/Contents/Resources" - cp $(srcdir)/../Icons/PythonSource.icns "Python Launcher.app/Contents/Resources" - cp $(srcdir)/../Icons/PythonCompiled.icns "Python Launcher.app/Contents/Resources" - cp $(srcdir)/factorySettings.plist "Python Launcher.app/Contents/Resources" - cp -R $(srcdir)/English.lproj "Python Launcher.app/Contents/Resources" + $(RUNSHARED) $(BUILDPYTHON) $(BUNDLEBULDER) \ + --builddir=. \ + --name="Python Launcher" \ + --executable="Python Launcher" \ + --iconfile=$(srcdir)/../Icons/PythonLauncher.icns \ + --bundle-id=org.python.PythonLauncher \ + --resource=$(srcdir)/../Icons/PythonSource.icns \ + --resource=$(srcdir)/../Icons/PythonCompiled.icns \ + --resource=$(srcdir)/English.lproj \ + --resource=$(srcdir)/factorySettings.plist \ + --plist Info.plist \ + build FileSettings.o: $(srcdir)/FileSettings.m $(CC) $(CFLAGS) -o $@ -c $(srcdir)/FileSettings.m @@ -73,4 +77,4 @@ Python\ Launcher: $(OBJECTS) $(CC) $(LDFLAGS) -o "Python Launcher" $(OBJECTS) -framework AppKit -framework Carbon Info.plist: $(srcdir)/Info.plist.in - sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print(platform.python_version())'`"'/g' < $(srcdir)/Info.plist.in > Info.plist + sed 's/%VERSION%/'"`$(RUNSHARED) $(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(srcdir)/Info.plist.in > Info.plist diff --git a/Mac/PythonLauncher/MyAppDelegate.h b/Mac/PythonLauncher/MyAppDelegate.h index 7252072..097b541 100644 --- a/Mac/PythonLauncher/MyAppDelegate.h +++ b/Mac/PythonLauncher/MyAppDelegate.h @@ -4,8 +4,8 @@ @interface MyAppDelegate : NSObject { - BOOL initial_action_done; - BOOL should_terminate; + BOOL initial_action_done; + BOOL should_terminate; } - (id)init; - (IBAction)showPreferences:(id)sender; diff --git a/Mac/PythonLauncher/PreferencesWindowController.m b/Mac/PythonLauncher/PreferencesWindowController.m index dc65064..ec5bbe8 100644 --- a/Mac/PythonLauncher/PreferencesWindowController.m +++ b/Mac/PythonLauncher/PreferencesWindowController.m @@ -95,23 +95,23 @@ // NSComboBoxDataSource protocol - (unsigned int)comboBox:(NSComboBox *)aComboBox indexOfItemWithStringValue:(NSString *)aString { - NSArray *interp_list = [settings interpreters]; + NSArray *interp_list = [settings interpreters]; unsigned int rv = [interp_list indexOfObjectIdenticalTo: aString]; - return rv; + return rv; } - (id)comboBox:(NSComboBox *)aComboBox objectValueForItemAtIndex:(int)index { - NSArray *interp_list = [settings interpreters]; + NSArray *interp_list = [settings interpreters]; id rv = [interp_list objectAtIndex: index]; - return rv; + return rv; } - (int)numberOfItemsInComboBox:(NSComboBox *)aComboBox { - NSArray *interp_list = [settings interpreters]; + NSArray *interp_list = [settings interpreters]; int rv = [interp_list count]; - return rv; + return rv; } |