How to update TNG running on your Mac

From TNG_Wiki
Revision as of 18:29, 10 March 2022 by Philip Roy (talk | contribs) (Typo fixed)
Jump to navigation Jump to search

If you are running a local copy of TNG on your Mac using MAMP, updating TNG it's not as simple as just dragging updates onto the TNG folder as there is a good chance that this will cause some files to be lost.

This guide will show you how to update the version of TNG on your Mac.

Note:

  • This tutorial assumes that you have followed the guide on how to install MAMP on your Mac and are comfortable with finding the MAMP application and htdocs folder.
  • This tutorial does not use or discuss the MAMP PRO application.
  • In the example shown, TNG v13.0.4 is being updated to v13.1

1. Login to the downloads page on the TNG site and download the update that is appropriate for you...

TNG update files


Note - Depending on how your Mac and web browser are set up, the location that this file downloads to on your Mac may differ. Unless you have specifically made a change to your browser settings, it will likely download to your Downloads folder. Your browser may also be set to automatically unzip the downloaded file.

2. If the update zip file hasn't been expanded, double-click on it to unzip it...

TNG update files unzipped


Before we go any further, it's important to make a backup of your TNG site that is on your Mac.

3. Go into the htdocs folder and find your local TNG folder. In this example, the folder is called "my-tng-site". Right-click (or control-click) on the folder and from the pop-up menu and choose to Compress the folder...

Compress the local TNG folder

This leaves you with a zipped version of your website that you can keep.

Compressed backup

4. Time to back up the MySQL database associated with your TNG install on your Mac. Launch the MAMP application and click on WebStart if the web page hasn't opened already...

Launch the Webstart page

5. From the WebStart page, choose phpMyAdmin from the Tools menu to load phpMyAdmin...

Select phpMyAdmin from the tools menu

6. Click on the database name for your TNG site in the left-hand column and then click on Export...

Select the database and click Export

7. When the export page loads, leave the settings as you see here and click Go...

Click Go to export the database

8. If your browser asks you to confirm that the file can be downloaded, click Allow...

Allow the file to download

You now have everything backed up and are ready to proceed. You have created a zipped version of your local TNG website, you have exported a copy of the SQL database, and you have the unzipped upgrade folder ready to use. Don't forget that you should also go through other activities such as uninstalling mods before applying the update - see this page for details on everything you should do.

Image of all the backed up files

9. Time to use the Terminal application to copy the files into the TNG folder. Go to the Go menu and select Utilities...

Select Utilities from the Go menu

10. Double-click on the Terminal application...

Open the Terminal app

11. In the Terminal window, type the following (minus the speech-marks but including a space) "ditto -V "...

Type the ditto command into the Terminal


The next thing to do with this command is to list the path to the update folder and the path to the TNG website folder. There's a really easy way to add the path of each folder to this command.

12. First, drag the upgrade folder onto the Terminal window and let go, then make sure you tap the right-arrow on your keyboard...

Drag the update folder onto the Terminal

13. Now, drag the local TNG folder onto the Terminal window and let go, then make sure you tap the right-arrow on your keyboard...

Drag the TNG folder onto Terminal

14. Now, tap the return key on your keyboard to trigger the command. You'll see a list of all the files being copied from the update folder into the TNG folder...

The Terminal displays the files as they are copied

15. You've successfully copied all the updated files into your TNG folder. Now, go into the TNG folder and find the relevant "Read Me" file. DO NOT OPEN IT! Instead, take not (or copy) the name of the entire file. You're going to need it in a moment...

Copy the Read Me file name

16. In the MAMP folder, double-click on the MAMP application to start MAMP running...

Launch the MAMP application

17. Get the WebStart page running and get your TNG website showing. Remember how you copied the name of the Read Me file? You need to paste that on to the end of the local web address here and then tap the return key on your keyboard to get the Read Me displaying...

Paste the Read filename into the browser

The Upgrade instructions should now load...

Work through about the upgrade instructions

18. Work through the various stages of the upgrade process. In this example, the database needs to be upgraded (note - this tutorial does not going into the specifics of working though the upgrade)'...

Here is the database being updated

And the database is upgraded.

Database being updated

20. The last thing you should do is remove the read me file from your local TNG folder as it is now longer needed...

Delete the Read Me file


Back to MAMP | Next - Copying your local TNG website from your Mac or PC to your web hosting provider for the first time