How To Set Up App Path On Mac

Mac OS X doesn’t have an obvious way to view the exact text based path to a folder (otherwise known as a directory) in the finder window. You can have it show a graphical path, but getting just the text based path to a directory (for use in the Terminal for example) requires a couple of extra steps. The following are the conditions governing the default folder location: -Mac app store: The path must already exist when the user is setting up the sync app.Standalone: The path will be created (if it doesn't already exist) after the user sets up the sync app. Only with the Standalone sync app you can prevent users from changing the location. I don't often stream things from my other Mac though, I just used it to test to make sure the shared path worked properly. I'm more concerned with getting a shared path working correctly that my chromecast or android app can use so I don't have to transcode anything from my local network. MAYAAPPDIR This variable defines your personal Maya application directory. This directory contains your projects and other important items: the prefs directory the projects directory mayaRenderLog.txt mayaLog mayaJournal the scripts directory Maya.env, if you choose to create it, can also reside in this directory You can only set MAYAAPPDIR from the operating system; you cannot use Maya.env. Set mylocation to searchReplace(mytext, findIt, replaceIt) set mylocation to 'smb:' & mylocation. Return mylocation. Script: “Convert Mac to Windows path” on searchReplace(theText, SearchString, ReplaceString) set OldDelims to AppleScript's text item delimiters. Set AppleScript's text item delimiters to SearchString. 5) The first thing you need to do is point the Appium server to the.APP file (Generated from Xcode project – Refer my doc “Appium-Run Xcode Project” for more detail) that you want to test. Simply check the “App Path” box and paste the path to the.App file in the text field, or navigate to it by clicking on the button.

The default layout for installed Haskell components follows the conventions of most unix-like systems. On Mac OS X, this layout isn't optimal, and a different layout is used. The layout presented here has several advantages:

  • Follows Apple's Guidelines for file system layout
  • Makes it easy for a user to locate all the Haskell components, especially user installed packages
  • Enables easy removal of a user installed package, whether they have installed it --user or --global.
  • Facilitate creation of unified, hyper-linked Haddock documentation, optionally with source

Haskell Platform 2011.2.0.0 (March 2011) and later uses this layout and sets up cabal to use it for built packages. On new installs, if you didn't already have a ~/.cabal/config file, then it is set up by default. Otherwise, the config file for this layout is placed in ~/.cabal/config.platform and you can manually move it over, or incorporate it into your existing config file.


Implementations

Haskell implementations are generally installed for use by all accounts on thesystem. They consist of large collections of executables, libraries, and otherfiles. These are packaged using Apple's framework, versioning, and bundlingtechniques and installed in:

For example, GHC 7.0.2 is installed in:

Executables intended for use from the command line, are be symlink'd into:

[Q: Would /usr/local/bin be more appropriate? ]

Packages that come with the implementation, are be located within the Frameworkbundle.

If the implementation has any GUI applications, these are installed in:

NB: These guidelines allow for multiple implementations and multipleversions to co-exist. (With the exception of multiple versions of GUI applicationswhich can only be done by distinct naming, and the symlinks in /usr/binwhich can achieved in the normal way: Append the version number to the executableand then symlink the 'bare' name to the most recent.

If implementations want to be able to be installed 'per user', then the abovepaths should be: /uninstall-apps-mac-os-x-yosemite.html.

Not all software for Mac OS X offers a 'per user' option on installation, and whilenice, it is by no means universal.

User Installed Packages

User installed packages are placed under a 'prefix' that depends on if the userchoose to install for all users (--global) for just their own use (--user):

Package Component Layout

Cabal offers a large amount of flexibility in where the various pieces of a packageare installed. The GHC package system is rather agnostic about where these pieces are,and insulates the implementation from such differences. These combine to enable thechoice of package layout to be largely to serve the user.

For both --global and --user installs, this is the recommended package layout on Mac OS X:

This can be achieved with the following cabal configuration defaults:

N.B.:

  • Cabal configuration files don't actually support ~. You must replace that with /Users/xxx where xxx is your account name.
  • All packages for a given compiler are under a single directory. When an old compiler is removed, all the packages compiled for it can be easily removed too.
  • All components for a package are under a single directory. This facilitates easy location and removal of a single package, for either a single compiler, or all installed versions.
  • If a package generates different doc for different compilers (it may have different APIs available), then this structure preserves each.
  • Executables are also per compilation, which is sometimes important (for Haddock, for example).

Executables

Packages that build executables to be run from the command line present a difficultly. They are built into a per-package bin directory, and then should be symlink'd somewhere on the user's PATH. For global installs, the logical place is one of:

For user installs, since ~/bin is not on the PATH by default on Mac OS X and may not exist, binaries are symlink'd into:

Alas, cabal only supports one location for both kinds of build, and so it is set to be the later.


References

Retrieved from 'https://wiki.haskell.org/index.php?title=Mac_OS_X_Common_Installation_Paths&oldid=58634'

There are two main ways to install PostgreSQL on mac OS X.

  1. Downloading the app file from postgresapp.com.

Using Homebrew

Homebrew can be installed by running the following command in a terminal:

/usr/bin/ruby -e '$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)'

If Homebrew is already installed, make sure that it is up to date by running:

brew update

Then ensure there are no conflicts or errors using:

brew doctor

Homebrew is a powerful package manager with many uses, including installing and running postgreSQL. This can be done by typing the following command into a terminal:

Now that postgres is installed the default server can be started by running the command:

This will start up a postgres server hosted locally on port 5432. The server will be run out of the directory /usr/local/var/postgres.

It can now be accessed by typing the following command:

This will connect to the server and access the postgres database. Once this is done:

  • Schemas and tables can be created
  • Data can be loaded and deleted from the database
  • Queries can be run

Mac Add Path To Environment

The process should look like this:

This shows that the server has been started and can be connected to.

(Optional) Creating a Custom Data Directory

A custom data directory can also be used for a server. To do this, first create a directory to be used as the server location. For example, create a directory called myData in the home directory:

Once the directory is created, the server can be initialized. This means that we configure the directory and add the necessary files to run the server. To do this run the initdb command as shown:

This will fill the myData directory with files necessary to run the server:

Now that the server is initialized and the log file is created, you can start the server from this directory. To do this use the command and substitute in for the specified values:

The “Data Directory” refers to the directory that was just initialized (in this case myData). The “Log file” is a file that will record server events for later analysis. Generally log files are formatted to contain the date in the file name (e.g. “2018-05-27.log” or “myData-logfile-2018-05-27.log”) and should be stored outside of the database that they are logging so as to avoid unnecessary risks. Log files can be dense to read but are very useful for security and debugging purposes:

The command above will generate a log file like the one shown, start the server, and tie the log file to the server. If a log file is not specified, events will be logged to the terminal:

The server will only start if the port is free. If the default server is running it must first be stopped using the pg_ctl -D /usr/local/var/postgres stop command:

Once started, it can be connected to the same way as before using:

Using PostgreSQL App

To run a server through the postgres app, the first step is to download the program. The app can be downloaded on postgresapp.com. Once the app is downloaded and moved into the applications folder, the app can be opened.

Open the Postgres app:

In order to start the server, click the start button.

This will start the server. Details on the server can be found by opening the server settings:

This interface shows all the essential information regarding the server. It also allows the port to be changed very easily. This is useful because multiple PostgreSQL servers can

Note: To change the port in the terminal, the ‘postgres.conf’ file (which can be found in the data directory) must be edited. This looks like the following:

Using Terminal with the PostgreSQL App

Once the app has been downloaded, command line tools can be used as well. These tools can be accessed by typing:

For example, the ‘postgres’ database on the server can be connected to using the psql tool with postgres as an argument:

Rather than typing out the full path each time however, the path can be added to a file that will allow significantly easier access to the tools, allowing the tools be accessed from any directory on the computer. To do this, the following command can be run in the terminal:

Once this is done, the ‘postgres’ database can be accessed by simply typing:

Summary

  • Homebrew:
    • Download/update Homebrew
    • Use Homebrew to install postgres
    • (Optional) Create New Data Directory
      • initdb
    • Start Server
  • App:
    • Download app and move to Applications
    • Run App
    • (Optional) Set different port for multiple servers
    • Start Server
    • (Optional) Add path so that command line tools are easy to access

References

How To Set Up App Path On Mac Computer

Written by: Matthew Layne
Reviewed by: Blake Barnhill , Matt David