Creates a installer using python.

This commit is contained in:
zonble 2011-10-02 18:59:46 +08:00
parent cb0d7a82f5
commit 19bc466215
8 changed files with 3393 additions and 0 deletions

Binary file not shown.

File diff suppressed because it is too large Load Diff

30
pyInstaller/Info.plist Executable file
View File

@ -0,0 +1,30 @@
<?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">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>tw.com.kkbox.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>KKBX</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@ -0,0 +1,382 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 44;
objects = {
/* Begin PBXBuildFile section */
77631A270C06C501005415CB /* Python.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77631A260C06C501005415CB /* Python.framework */; };
77631A3F0C0748CF005415CB /* main.py in Resources */ = {isa = PBXBuildFile; fileRef = 77631A3E0C0748CF005415CB /* main.py */; };
7790198F0C07548A00326F66 /* InstallerAppDelegate.py in Resources */ = {isa = PBXBuildFile; fileRef = 7790198E0C07548A00326F66 /* InstallerAppDelegate.py */; };
77C8C1F90C07829500965286 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 77C8C1F70C07829500965286 /* MainMenu.xib */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
D48D001D143868DA0050BDFF /* McBopomofo.app in Copy Files to Resource Folder */ = {isa = PBXBuildFile; fileRef = D48D0016143868A90050BDFF /* McBopomofo.app */; };
D4CA5DAD14040B3300B58ED3 /* QTKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D4CA5DAC14040B3300B58ED3 /* QTKit.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
D48D0015143868A90050BDFF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D48D000F143868A90050BDFF /* Lettuce.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6A8515B5137277DB0066B1BD /* McBopomofo.app */;
remoteInfo = Lettuce;
};
D48D0017143868A90050BDFF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D48D000F143868A90050BDFF /* Lettuce.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 6ACF37C213A7BE68008798F2 /* IconMaker.app */;
remoteInfo = IconMaker;
};
D48D001E143868E40050BDFF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = D48D000F143868A90050BDFF /* Lettuce.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 6A8515B4137277DB0066B1BD /* Lettuce */;
remoteInfo = Lettuce;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
D48D0025143868EC0050BDFF /* Copy Files to Resource Folder */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 7;
files = (
D48D001D143868DA0050BDFF /* McBopomofo.app in Copy Files to Resource Folder */,
);
name = "Copy Files to Resource Folder";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* Installer_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Installer_Prefix.pch; sourceTree = "<group>"; };
77631A260C06C501005415CB /* Python.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Python.framework; path = /System/Library/Frameworks/Python.framework; sourceTree = "<absolute>"; };
77631A3E0C0748CF005415CB /* main.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = main.py; sourceTree = "<group>"; };
7790198E0C07548A00326F66 /* InstallerAppDelegate.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.python; path = InstallerAppDelegate.py; sourceTree = "<group>"; };
77C8C1F80C07829500965286 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* Installer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Installer.app; sourceTree = BUILT_PRODUCTS_DIR; };
D48D000F143868A90050BDFF /* Lettuce.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lettuce.xcodeproj; path = ../Source/Lettuce.xcodeproj; sourceTree = SOURCE_ROOT; };
D4CA5DAC14040B3300B58ED3 /* QTKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QTKit.framework; path = System/Library/Frameworks/QTKit.framework; sourceTree = SDKROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
77631A270C06C501005415CB /* Python.framework in Frameworks */,
D4CA5DAD14040B3300B58ED3 /* QTKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
7790198E0C07548A00326F66 /* InstallerAppDelegate.py */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
D4CA5DAC14040B3300B58ED3 /* QTKit.framework */,
77631A260C06C501005415CB /* Python.framework */,
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* Installer.app */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* xcPROJECTNAMEASXMLxc */ = {
isa = PBXGroup;
children = (
D48D000F143868A90050BDFF /* Lettuce.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = xcPROJECTNAMEASXMLxc;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* Installer_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
77631A3E0C0748CF005415CB /* main.py */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
77C8C1F70C07829500965286 /* MainMenu.xib */,
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
D48D0010143868A90050BDFF /* Products */ = {
isa = PBXGroup;
children = (
D48D0016143868A90050BDFF /* McBopomofo.app */,
D48D0018143868A90050BDFF /* IconMaker.app */,
);
name = Products;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* Installer */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Installer" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
D48D0025143868EC0050BDFF /* Copy Files to Resource Folder */,
);
buildRules = (
);
dependencies = (
D48D001F143868E40050BDFF /* PBXTargetDependency */,
);
name = Installer;
productInstallPath = "$(HOME)/Applications";
productName = xcPROJECTNAMExc;
productReference = 8D1107320486CEB800E47090 /* Installer.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Installer" */;
compatibilityVersion = "Xcode 3.0";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
Japanese,
French,
German,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* xcPROJECTNAMEASXMLxc */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = D48D0010143868A90050BDFF /* Products */;
ProjectRef = D48D000F143868A90050BDFF /* Lettuce.xcodeproj */;
},
);
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* Installer */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
D48D0016143868A90050BDFF /* McBopomofo.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = McBopomofo.app;
remoteRef = D48D0015143868A90050BDFF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
D48D0018143868A90050BDFF /* IconMaker.app */ = {
isa = PBXReferenceProxy;
fileType = wrapper.application;
path = IconMaker.app;
remoteRef = D48D0017143868A90050BDFF /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
77631A3F0C0748CF005415CB /* main.py in Resources */,
7790198F0C07548A00326F66 /* InstallerAppDelegate.py in Resources */,
77C8C1F90C07829500965286 /* MainMenu.xib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
D48D001F143868E40050BDFF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Lettuce;
targetProxy = D48D001E143868E40050BDFF /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
77C8C1F70C07829500965286 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
77C8C1F80C07829500965286 /* English */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Installer_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = Installer;
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Installer_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
PRODUCT_NAME = Installer;
WRAPPER_EXTENSION = app;
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)";
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc";
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Installer" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Installer" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

View File

@ -0,0 +1,72 @@
from Foundation import *
from AppKit import *
import os, shutil, platform
class InstallerAppDelegate(NSObject):
window = objc.IBOutlet()
licenseView = objc.IBOutlet()
licenseTextView = objc.IBOutlet()
agreeButton = objc.IBOutlet()
cancelButton = objc.IBOutlet()
def checkOSVerion(self):
mac_version = platform.mac_ver()[0].split(".")
if int(mac_version[1]) < 6:
NSRunAlertPanel("McBoPoMoFo requires on Mac OS X 10.6 or later verion.", "", "OK", None, None)
NSApp.terminate_(self)
def showLicenseWindow(self):
self.licenseTextView.textStorage().mutableString().setString_("License")
windowFrame = self.window.frame()
windowFrame.size = self.licenseView.frame().size
windowFrame.size.height += 20.0
self.window.setFrame_display_animate_(windowFrame, True, True)
self.window.contentView().addSubview_(self.licenseView)
self.window.center()
self.window.setDefaultButtonCell_(self.agreeButton.cell())
self.window.makeKeyAndOrderFront_(None)
@objc.IBAction
def agreeLicenseAction_(self, sender):
self.window.orderOut_(None)
from subprocess import call
call(["killall", "McBopomofo"])
inputMethodDir = os.path.expanduser("~/Library/Input Methods")
if os.path.exists(inputMethodDir) is False:
os.makedirs(inputMethodDir)
packagePath = NSBundle.mainBundle().pathForResource_ofType_("McBopomofo", "app")
McBopomofoPath = os.path.join(inputMethodDir, "McBopomofo.app")
if os.path.exists(McBopomofoPath) is True:
try:
shutil.rmtree(McBopomofoPath)
except:
NSRunAlertPanel("Failed to remove existing application!", "", "OK", None, None)
try:
shutil.copytree(packagePath, McBopomofoPath)
except:
NSRunAlertPanel("Failed to copy application!", "", "OK", None, None)
NSApp.terminate_(self)
print McBopomofoPath
try:
call([os.path.join(McBopomofoPath, "Contents/MacOS/McBopomofo"), "install"])
except:
NSRunAlertPanel("Failed to install McBopomofo!", "", "OK", None, None)
NSApp.terminate_(self)
NSRunAlertPanel("Done!", "", "OK", None, None)
NSApp.terminate_(self)
@objc.IBAction
def disagreeLicenseAction_(self, sender):
NSApp.terminate_(self)
def applicationDidFinishLaunching_(self, sender):
self.checkOSVerion()
self.showLicenseWindow()
pass

View File

@ -0,0 +1,3 @@
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

43
pyInstaller/main.m Executable file
View File

@ -0,0 +1,43 @@
// AUTHOR: Weizhong Yang (wzyang@kkbox.com.tw)
#import <Python/Python.h>
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSBundle *mainBundle = [NSBundle mainBundle];
NSString *resourcePath = [mainBundle resourcePath];
NSArray *pythonPathArray = [NSArray arrayWithObjects: resourcePath, [resourcePath stringByAppendingPathComponent:@"PyObjC"], nil];
setenv("PYTHONPATH", [[pythonPathArray componentsJoinedByString:@":"] UTF8String], 1);
NSArray *possibleMainExtensions = [NSArray arrayWithObjects: @"py", @"pyc", @"pyo", nil];
NSString *mainFilePath = nil;
for (NSString *possibleMainExtension in possibleMainExtensions) {
mainFilePath = [mainBundle pathForResource: @"main" ofType: possibleMainExtension];
if ( mainFilePath != nil ) break;
}
if ( !mainFilePath ) {
[NSException raise: NSInternalInconsistencyException format: @"%s:%d main() Failed to find the Main.{py,pyc,pyo} file in the application wrapper's Resources directory.", __FILE__, __LINE__];
}
Py_SetProgramName("/usr/bin/python");
Py_Initialize();
PySys_SetArgv(argc, (char **)argv);
const char *mainFilePathPtr = [mainFilePath UTF8String];
FILE *mainFile = fopen(mainFilePathPtr, "r");
int result = PyRun_SimpleFile(mainFile, (char *)[[mainFilePath lastPathComponent] UTF8String]);
if ( result != 0 )
[NSException raise: NSInternalInconsistencyException
format: @"%s:%d main() PyRun_SimpleFile failed with file '%@'. See console for errors.", __FILE__, __LINE__, mainFilePath];
[pool drain];
return result;
}

11
pyInstaller/main.py Executable file
View File

@ -0,0 +1,11 @@
import objc
import Foundation
import AppKit
from PyObjCTools import AppHelper
# import modules containing classes required to start application and load MainMenu.nib
import InstallerAppDelegate
# pass control to AppKit
AppHelper.runEventLoop()