Skip to content

Commit

Permalink
Merge pull request #5 from aonez/master
Browse files Browse the repository at this point in the history
Few changes from aonez
  • Loading branch information
fibasile authored Dec 3, 2016
2 parents 956a8fd + 1de0a39 commit a21ac89
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 99 deletions.
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
65 changes: 0 additions & 65 deletions MacReFlower.app/Contents/Info.plist

This file was deleted.

Binary file removed MacReFlower.app/Contents/MacOS/MacReFlower
Binary file not shown.
1 change: 0 additions & 1 deletion MacReFlower.app/Contents/PkgInfo

This file was deleted.

22 changes: 0 additions & 22 deletions MacReFlower.app/Contents/Resources/en.lproj/Credits.rtf

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file removed MacReFlower.app/Contents/Resources/icon.icns
Binary file not shown.
13 changes: 13 additions & 0 deletions MacReFlower.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
F4D7C9C91770CBE600C57EC1 /* MRFAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F4D7C9C81770CBE600C57EC1 /* MRFAppDelegate.m */; };
F4D7C9CC1770CBE600C57EC1 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F4D7C9CA1770CBE600C57EC1 /* MainMenu.xib */; };
F4D7C9D41770CF2500C57EC1 /* MRFOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = F4D7C9D31770CF2500C57EC1 /* MRFOperation.m */; };
F7E62A2C1DEB889E009EB116 /* k2pdfopt in Resources */ = {isa = PBXBuildFile; fileRef = F7E62A2B1DEB889E009EB116 /* k2pdfopt */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -34,6 +35,7 @@
F4D7C9CB1770CBE600C57EC1 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
F4D7C9D21770CF2500C57EC1 /* MRFOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MRFOperation.h; sourceTree = "<group>"; };
F4D7C9D31770CF2500C57EC1 /* MRFOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MRFOperation.m; sourceTree = "<group>"; };
F7E62A2B1DEB889E009EB116 /* k2pdfopt */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = k2pdfopt; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -88,6 +90,7 @@
F4D7C9BB1770CBE600C57EC1 /* MacReFlower */ = {
isa = PBXGroup;
children = (
F7E62A2B1DEB889E009EB116 /* k2pdfopt */,
F4D7C9C71770CBE600C57EC1 /* MRFAppDelegate.h */,
F4D7C9C81770CBE600C57EC1 /* MRFAppDelegate.m */,
F4D7C9CA1770CBE600C57EC1 /* MainMenu.xib */,
Expand Down Expand Up @@ -139,6 +142,11 @@
CLASSPREFIX = MRF;
LastUpgradeCheck = 0460;
ORGANIZATIONNAME = "Fiore Basile";
TargetAttributes = {
F4D7C9B11770CBE600C57EC1 = {
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = F4D7C9AD1770CBE600C57EC1 /* Build configuration list for PBXProject "MacReFlower" */;
compatibilityVersion = "Xcode 3.2";
Expand All @@ -165,6 +173,7 @@
F4D7C9C01770CBE600C57EC1 /* InfoPlist.strings in Resources */,
F4D7C9C61770CBE600C57EC1 /* Credits.rtf in Resources */,
F4D7C9CC1770CBE600C57EC1 /* MainMenu.xib in Resources */,
F7E62A2C1DEB889E009EB116 /* k2pdfopt in Resources */,
F48BF926177A0A9600F0BDE6 /* icon.iconset in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -274,7 +283,9 @@
F4D7C9D01770CBE600C57EC1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MacReFlower/MacReFlower-Prefix.pch";
INFOPLIST_FILE = "MacReFlower/MacReFlower-Info.plist";
Expand All @@ -286,7 +297,9 @@
F4D7C9D11770CBE600C57EC1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "MacReFlower/MacReFlower-Prefix.pch";
INFOPLIST_FILE = "MacReFlower/MacReFlower-Info.plist";
Expand Down
4 changes: 4 additions & 0 deletions MacReFlower/MRFAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@

@implementation MRFAppDelegate

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication {
return YES;
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
// Insert code here to initialize your application
Expand Down
6 changes: 3 additions & 3 deletions MacReFlower/MRFOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ +(NSString*) findScript:(NSString*)scriptName
NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath: @"/usr/bin/which"];
NSString* path = [[[NSProcessInfo processInfo]environment]objectForKey:@"PATH"];
path = [path stringByAppendingFormat:@":/usr/local/bin"];
[task setEnvironment:[NSDictionary dictionaryWithObject:path forKey:@"PATH"]];

[task setEnvironment:[NSDictionary dictionaryWithObject:[[NSBundle mainBundle] resourcePath] forKey:@"PATH"]];
[task setArguments:[NSArray arrayWithObjects: scriptName, nil]];

NSPipe *pipe, *errorPipe;
pipe = [NSPipe pipe];
errorPipe = [NSPipe pipe];
Expand Down
9 changes: 6 additions & 3 deletions MacReFlower/MacReFlower-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,15 @@
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeMIMETypes</key>
<key>LSTypeIsPackage</key>
<false/>
<key>CFBundleTypeExtensions</key>
<array>
<string>application/x-pdf</string>
<string>pdf</string>
<string>PDF</string>
</array>
<key>CFBundleTypeName</key>
<string>PDF Documents</string>
<string>PDF</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
Expand Down
Binary file added MacReFlower/k2pdfopt
Binary file not shown.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ MacReFlower
This is a little utility app that allows to drop PDF files and get them optimized for viewing on the Kindle Paperwhite, but
might work for other e-Ink devices..

The program uses the [k2pdfopt](http://www.willus.com/k2pdfopt) utility, which you should download and put in your PATH,
i.e. in /usr/local/bin folder.

**Please also make sure that k2pdfopt is executable (i.e. chmod +x k2pdfopt)**

The program uses the [k2pdfopt](http://www.willus.com/k2pdfopt) utility.

Screenshots
===========
Expand Down

0 comments on commit a21ac89

Please sign in to comment.