TestPagePleaseIgnore

From BTAWiki
Revision as of 21:18, 6 June 2023 by Fulmir (talk | contribs) (Replaced content with "==Mac M1 Installation via Steam== ===Prerequisites=== : The base HBS BATTLETECH game installed and working (DLC installed as well) via Steam ====Add-on Tools==== If you...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Mac M1 Installation via Steam

Prerequisites

The base HBS BATTLETECH game installed and working (DLC installed as well) via Steam

Add-on Tools

If you’re going to run the installer and generate the BTA files from within your Mac environment (no 2nd computer) you will need:

  1. Homebrew package manager to install the prerequisite GNU packages
  2. Wine to be able to run the BTA Installer


Homebrew Installation

Website: https://brew.sh/

Open your macOS terminal app and paste the following:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
The script explains what it will do and then pauses before it does it. It will ask for your password (sudo), this is to install the package and its dependencies.
(Homebrew’s installation may take a while, it took me 10 minutes on a Mac running in a qemu VM)


Wine Installation

How to install/about wine on mac

Prerequisites;
Gatekeeper must allow unsigned packages
Running OS X 10.8 to macOS 10.14* (macOS Catalina & later)

Recommended way to install Winehq packages

Installing wine using homebrew

Once homebrew is installed you the following command to install your selected wine package

brew tap homebrew/cask-versions
brew install --cask --no-quarantine wine-staging

The above command will install the most recent wine-staging pkg available on winehq but it will also add wine for use in Terminal meaning you no longer need to launch the installed Wine Staging app each time you want to access wine.

Please Note:

Only a single wine package can be installed using brew

The --no-quarantine command is required as homebrew by default adds the quarantine flag to downloaded casks, this causes Gatekeeper to treat the bundle as damaged.

(Alternatively) How to manually install wine on mac using Winehq releases

Grab a wine package usually using the latest wine-devel is recommended, but most agree it's best to use the latest wine-staging due to additional patches.

If your intention is to have a more stable environment use wine-stable

Currently macOS packages are not uploaded to Winehq, those can be downloaded from here

The above is the Winehq way to install wine on mac but that makes it cumbersome to use considering you must launch the Wine Stable, Wine Devel, or Wine Staging app each time to get access to wine within Terminal

macOS Catalina and later

Currently only CrossOver (a paid Wine alternative) version 19 and later support using 32Bit apps on 64Bit only versions of macOS.

Here are some free alternatives

Unofficial Wineskin - Use a WS11 Engine
PortingKit - This should automatically select a working Engine
The following custom brew tap:
Install the lastest wine-crossover package from this BTA user's Brew Tap
brew install --cask --no-quarantine gcenx/wine/wine-crossover
Gatekeeper will give a warning for each Windows binary that is ran as these won't be code-signed in a way Apple expects, to avoid this you could disabled Gatekeeper using the following command
sudo spctl --master-disable

Please Note macOS Catalina 10.15.0 to 10.15.3, SIP needs to be disabled this will allow wine32on64 to change the state of i386_set_ldt

The current wine-crossover package can be downloaded directly WineCX20.02

Also:

wine32on64 does not support 16Bit executables so some things just won't work

Apple Silicon support

Only CrossOver-20.0.2 includes 32Bit support for Apple Silicon at this time, this requires macOS Big Sur 11.1 and Rosetta2 installed.

Wine-6.0.1/Wine-6.1 only support 64Bit Windows Binaries on Apple Silicon at this time.



Test your Wine installation by issuing a wine64 --version command from the terminal, it should tell you what version was installed and you should be able to run it from any directory. wine64 notepad for instance should bring up the Windows notepad program on your Mac. Close it after you've tested that it opens.

Note: It takes a long time the first time Wine runs as it build the .wine prefix

Run winecfg once to bring up the Wine control panel, click the “drives” tab and check the back to “show dot files” - this will let you navigate your Linux/BSD style file system from a Windows (Wine) dialog box and be able to see folders that start with a dot (.)

File:WineConfigExample.jpg

Change nothing else and click OK when done.


Symlink the BTA 3062 macOS executable to BattleTech.exe

Commands: (Note: Enter each line and hit return/enter before doing the next line)

cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/
ln -s ../MacOS/BattleTech BattleTech.exe
ln -s Data BattleTech_Data

Doing this is necessary for the BTA installer and the symlinks for the folders are to maintain compatibility with any mods that strictly reference the Windows names and locations.


Run the BTA 3062 Installer with Wine64

Download the latest BTA installer from the main page.
Create a directory in your Downloads folder named “BTA_Installer” and expand the contents of the downloaded zip file to it.
Run the installer by launching the BTAdvancedLauncher.exe program or with the following command: wine64 ~/Downloads/BTA_Installer/BTAdvancedLauncher.exe
You may see a number of error show in the Terminal window, but as long as the Launcher loads you’re good to go.


Set Installation Options In the lower left corner of the installer, start by clicking the Advance Mode button [Button] which will then toggle to show Basic Mode.


[Image] Under the installation options header, the top row of the installer shows “Install Target” path. Click Browse and navigate through the folder structure in the dialog box. The root of your Mac is mapped as the “Z:” drive or as “/” in Wine, therefore a typical path for a Steam installation would be: Z:\Users\<your_username>\Library\Application Support\Steam\steamapps\common\BATTLETECH\BattleTech.app\Contents\Resources\Mods Note: You may need to create a new folder called “Mods”. You can do this by right-clicking the whitespace in this window and adding a folder, or by using the Mac Finder. If you use the Finder, the easiest way to get there is via the Go > Go to folder menu bar option [Image] Note: You will need to select the “Mods” folder in the working pane of the finder window to enable the Open button to work

The “Checkout workspace” directory (caches) is also important if you’ve ever downloaded the project before. You can leverage those offline files and only have to download those that have changed since the last download if you keep the workspace after you’ve downloaded all of it. If you do not already have the caches downloaded, pick a spot for them to go (Z:\Users<your_username>\Downloads\BTA-workspace, create the folder if it doesn't exist) and make that selection for the “Checkout workplace” - if you do, have the cache already downloaded, choose that location here as it will significantly cut down the total time spent.

Click on [Set Preferences] and browse again to where your BattleTech.exe symlink is in the root of the BTA folder: For Steam: Z:\Users\<your_username>\Library\Application Support\Steam\steamapps\common\BATTLETECH\BattleTech.app\Contents\Resources\BattleTech.exe Close the dialog window with the red close window icon. IMPORTANT: You will not be able to confirm this choice unless there is a BattleTech.exe in that directory. The symlink we made to the macOS executable will work. Click “Update/Install BTA” Click “Ok” through the next few warnings about there being no config and a new config will be made,

and make the following selections:

Do not select the DLC content if you do not own the DLC or don’t have it installed! Stick with MultiThreading. Uncheck the "Performance Patching Options". Corgi Perf Fixes are incompatible with Mac will break the main game screen, you cannot click on buttons to start the game with the performance fixes installed on Mac! (If you manage to get it working on your build please let us know how.) And finally, choose the "Old Fire for Linux Users" option. Click “Ok” to confirm, the last prompt will say that the Mod directory will be wiped - proceed and the creation of the Mods directory will take several minutes to complete. Patch the BattleTech executable with ModTek BTA 3062 uses ModTek, not the HBS native mod loader. It’s faster and better. Go to the ModTek project on GitHub and grab the latest release (3.1.14…latest) as of 09 Mar 2023 Unzip it into your downloads folder Open a second Finder window and using the Go > Go to folder,


Go to the Resources folder that contains your Mods from above


Click into the “Mods” > “ModTek” folder


Copy all the folder content from your Downloads > Mods > ModTek folder across


Select Replace All when asked


Go back up to the Resource folder


Copy across the remain ModTek files. You can now close out your two finder windows.

In Terminal, visit the Resources folder with your BattleTech.exe symlink and the run.sh file. Set the file to executable Commands: (Note: Enter each line and hit return/enter before doing the next line) cd ~/Library/Application\ Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/ chmod +x run.sh


Configure Steam launch Launch the Steam app Right click on the BATTLETECH app and select “Properties…” On the GENERAL tab, look for the “LAUNCH OPTIONS” row. In the field enter the path to your run.sh file, followed by %command%. NOTE: the quotation marks matter

Mine was "/Users/{account}/Library/Application Support/Steam/steamapps/common/BATTLETECH/BattleTech.app/Contents/Resources/run.sh" %command% Close the overlay and start BATTLETECH ADVANCED You will know the process has been successful if you see the ModTek loading bar