Coder Social home page Coder Social logo

ycaihua / letsmove Goto Github PK

View Code? Open in Web Editor NEW

This project forked from potionfactory/letsmove

0.0 2.0 0.0 522 KB

A sample that shows how to move a running Mac application to the /Applications directory

Home Page: http://www.potionfactory.com/blog/2009/09/17/move-applications-folder

Ruby 3.09% Objective-C 95.47% C 1.44%

letsmove's Introduction

LetsMove

A sample project that demonstrates how to move a running Mac OS X application to the Applications folder.

Requirements

Builds and runs on Mac OS X 10.5 or higher. Does NOT support sandboxed applications.

Usage

Copy the following files into your project:

  • PFMoveApplication.h
  • PFMoveApplication.m

In your app delegate's "-[applicationWillFinishLaunching:]" method, call the PFMoveToApplicationsFolderIfNecessary function at the very top.

If your project has ARC enabled, you'll want to disable ARC on the above files. You can do so by adding -fno-objc-arc compiler flag to your PFMoveApplication.m source file. See http://stackoverflow.com/questions/6646052/how-can-i-disable-arc-for-a-single-file-in-a-project/6658549#6658549

If your application is localized, also copy the 'MoveApplication.string' files into your project.

Link your application against Security.framework.

License

Public domain

Version History

  • 1.19

    • Slovak localization added
  • 1.18

    • Catalan localization added
  • 1.17

    • Tranditional Chinese localization added.
  • 1.16

    • Deprecation warning that appears when minimum deployment target is set to OS X 10.10 taken care of
  • 1.15

    • Swedish localization added
  • 1.14

    • Hugarian, Serbian, and Turkish localizations added
    • Macedonian localization added
  • 1.13

    • Polish localization added
  • 1.12

    • Use country code based .lproj directories
    • Make it compile for projects that don't use precompiled headers to import AppKit.framework
    • Minor adjustment to Dutch localization
    • Warning fixes in example project
  • 1.11

    • Objective-C++ compatibility
  • 1.10

    • Fixed deprecation warnings that show up when building against the OS X 10.9 SDK.
  • 1.9

    • Removed OS X 10.4 support
    • Properly detect if the running app is in a disk image
    • Fixed a bug where if the app's name contained a quote, the app could not be moved
    • After a successful move, delete the application instead of moving it to the Trash.
    • Other fixes and improvements
  • 1.8

    • If the app is already there in the Applications folder but not writable, request authentication from user
    • Added Korean localization
  • 1.7.2

    • Fixed an exception that could happen.
  • 1.7.1

    • Refactoring
  • 1.7

    • Only move to ~/Appilcations directory if an app is already in there.
  • 1.6.3

    • Function calls deprecated in 10.7 no longer cause compile time warnings.
    • Added Simplified Chinese and European Portuguese localizations
  • 1.6.2

    • Garbage collection compatibility added
    • Use a new method to check if an application is already running on Mac OS X 10.6 systems or higher
  • 1.6.1

    • Use exit(0) to terminate the app before relaunching instead of [NSApp terminate:]. We don't want applicationShouldTerminate or applicationWillTerminate NSApplication delegate methods to be called, possibly introducing side effects.
  • 1.6

    • Resolve any aliases when finding the Applications directory
  • 1.5.2

    • Cleaned up the code a bit. Almost functionally equivalent to 1.5.1.
  • 1.5.1

    • Fixed a bug with clearing the quarantine file attribute on Mac OS X 10.5
  • 1.5

    • Don't prompt to move the application if it has "Applications" in its path somewhere
  • 1.4

    • Mac OS X 10.5 compatibility fixes
  • 1.3

    • Fixed a rare bug in the shell script that checks to see if the app is already running
    • Clear quarantine flag after copying
    • Compile time option to show normal sized alert supress checkbox button
    • German, Danish, and Norwegian localizations added
  • 1.2

    • Copy application from disk image then unmount disk image
    • Spanish, French, Dutch, and Russian localizations
  • 1.1

    • Prefers ~/Applications over /Applications if it exists
    • Escape key pushes the "Do Not Move" button
  • 1.0

    • First release

Code Contributors:

  • Andy Kim
  • John Brayton
  • Chad Sellers
  • Kevin LaCoste
  • Rasmus Andersson
  • Timothy J. Wood
  • Matt Gallagher
  • Whitney Young
  • Nick Moore
  • Nicholas Riley

Translators:

  • Eita Hayashi (Japanese)
  • Gleb M. Borisov (Russian)
  • Wouter Broekhof (Dutch)
  • Rasmus Andersson / Spotify (French and Spanish)
  • Markus Kirschner (German)
  • Fredrik Nannestad (Danish)
  • Georg Alexander Bøe (Norwegian)
  • Marco Improda (Italian)
  • Venj Chu (Simplified Chinese)
  • Sérgio Miranda (European Portuguese)
  • Victor Figueiredo (Brazilian Portuguese)
  • AppLingua (Korean)
  • Czech X Team (Czech)
  • Marek Telecki (Polish)
  • Petar Vlahu (Macedonian)
  • Václav Slavík (Hungarian, Serbian, and Turkish)
  • Erik Vikström (Swedish)
  • Inndy Lin (Traditional Chinese)
  • aONe (Catalan)
  • Marek Hrusovsky (Slovak)

letsmove's People

Contributors

andypotion avatar applingua avatar boyvanamstel avatar c-had avatar inndy avatar klacoste avatar ksuther avatar monsterzz avatar pegolon avatar pilotmoon avatar potionfactory avatar rm1210 avatar robrix avatar rsms avatar sergiomiranda avatar tjw avatar venj avatar vlahupetar avatar vslavik avatar wbyoung avatar xhruso00 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.