Forum > macOS / Mac OS X

Debugger will not run macos m1

<< < (6/6)

vonskie:
Here is a script I use to compile it let me know if there is anything I should add or remove


--- Code: ---#!/bin/bash

# Define the desired download directory and Lazarus version details
DOWNLOAD_DIR="$HOME/downloads"
LAZARUS_VERSION="fixes_3_0"
LAZARUS_ZIP="lazarus-${LAZARUS_VERSION}.zip"
LAZARUS_URL="https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/${LAZARUS_VERSION}/${LAZARUS_ZIP}"
UNZIP_DIR="lazarus-${LAZARUS_VERSION}"

# Navigate to the desired download directory
cd "${DOWNLOAD_DIR}" || { echo "Failed to navigate to ${DOWNLOAD_DIR}. Exiting."; exit 1; }

# Remove the previous zip file if it exists
if [ -f "${LAZARUS_ZIP}" ]; then
    rm "${LAZARUS_ZIP}" || { echo "Failed to remove existing ${LAZARUS_ZIP}. Exiting."; exit 1; }
fi

# Remove the previous Lazarus directory if it exists
if [ -d "${UNZIP_DIR}" ]; then
    rm -rf "${UNZIP_DIR}" || { echo "Failed to remove existing ${UNZIP_DIR} directory. Exiting."; exit 1; }
fi

# Download the zip file using wget with a progress bar and retries on failure
wget --progress=bar:force --tries=3 "${LAZARUS_URL}" || { echo "Download failed. Exiting."; exit 1; }

# Unzip the downloaded file
unzip "${LAZARUS_ZIP}" || { echo "Unzipping failed. Exiting."; exit 1; }

# Enter the unzipped Lazarus directory
cd "${UNZIP_DIR}" || { echo "Failed to navigate to ${UNZIP_DIR} directory. Exiting."; exit 1; }

# Clean and build Lazarus with the specified parameters
make clean all LCL_PLATFORM=cocoa CPU_TARGET=x86_64 bigide || { echo "Make command failed. Exiting."; exit 1; }

# Remove the 'com.apple.quarantine' attribute from the files
xattr -d -r -v com.apple.quarantine ./* || { echo "Failed to remove quarantine attributes. Exiting."; exit 1; }

echo "Lazarus ${LAZARUS_VERSION} has been successfully installed."

# End of the script

--- End code ---

Martin_fr:
"Bug Fixes" are merged based on the developer who wrote/commited it deeming it save.
In the past that has worked well. But there are no guarantees.


Martin_fr:

--- Quote from: vonskie on November 10, 2023, 04:19:29 pm ---Here is a script I use to compile it let me know if there is anything I should add or remove

--- End quote ---

I don't use Mac myself, so any Mac specifics I can't comment on.
Also, I rarely use make myself. I usually build from within the IDE.

If you have more than one installation, there is a page on the wiki how to have a config for each https://wiki.freepascal.org/Multiple_Lazarus

Navigation

[0] Message Index

[*] Previous page

Go to full version