Skip to content

Instantly share code, notes, and snippets.

@santaklouse
Last active July 22, 2024 18:13
Show Gist options
  • Save santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef to your computer and use it in GitHub Desktop.
Save santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef to your computer and use it in GitHub Desktop.
unlimited CrossOver trial (MacOS)

Run it in console for permanent install :

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.'
@lockieluke
Copy link

lockieluke commented Apr 4, 2024

Finally got my hands on the latest CrossOver. The script should still work, albeit after a month or so your bottle will expire.

To advance bottle's time, its enough to delete some relevant registry entires.

  1. You may need to be offine for all of this to work! So shut wi-fi off for a minute!
  2. Open your bottle folder: Cmd+G in Finder to ~/Library/Application Support/CrossOver/Bottles/Steam
  3. Copy system.reg somewhere else as a backup, just in case you f it up.
  4. Right click on system.reg and open with any text editor of your choice (like TextEdit)
  5. Use Cmd+F to find Software\\ CodeWeavers\\ CrossOver
  6. You should find a Crossover's block of "options", starting with [ which ends several lines later (with a newline)
  7. Remove that [Software....] header as well as anything below it, up until the next header (ex. in my case I remove [Software... line, then 4 lines after that)
  8. Save the file and launch your game/app again.

Someone can write a sed or perl command for doing the same thing, I cba right now. Maybe later.

tbd
It seems we don't need SULastCheckTime and .eval anymore. Only plutil -replace FirstRunDate -date "`date -u -v -3H '+%Y-%m-%dT%TZ'`" ~/Library/Preferences/com.codeweavers.CrossOver.plist and that registry cleanup command.

Can confirm this work, I will make a script/app for it

probably some regex to edit the reg file

@shrninepoints
Copy link

shrninepoints commented Apr 19, 2024

Just renewed Crossover (Version 23.7 (23.7.0.36580)) with the help of the above script. While it didn't run successfully on my computer, one can do the following to extend the trial:

  1. Delete ~/Library/Preferences/com.codeweavers.CrossOver.plist (you don't actually need to change the date)
  2. Delete ~/Library/Application\ Support/CrossOver/Bottles/*/.update-timestamp
  3. Delete the whole section start with Software\\CodeWeavers\\CrossOver in ~/Library/Application\ Support/CrossOver/Bottles/*/system.reg. Check djsmax's comment if you don't know how to do this.

Prefer not to publish a script for this for legal reason, but hope this helps for any user with the same need.

@nesOiyad
Copy link

Just renewed Crossover (Version 23.7 (23.7.0.36580)) with the help of the above script. While it didn't run successfully on my computer, one can do the following to extend the trial:

  1. Delete ~/Library/Preferences/com.codeweavers.CrossOver.plist (you don't actually need to change the date)
  2. Delete ~/Library/Application\ Support/CrossOver/Bottles/*/.update-timestamp
  3. Delete the whole section start with Software\\CodeWeavers\\CrossOver in ~/Library/Application\ Support/CrossOver/Bottles/*/system.reg. Check djsmax's comment if you don't know how to do this.

Prefer not to publish a script for this for legal reason, but hope this helps for any user with the same need.

I can't see the /Bottles/ part it ends in CrossOver folder and don't have any Bottles folder inside of it

@DLLenjoyer
Copy link

thanks

@LucasBonafe
Copy link

thanks

Worked?
I need to install Crossover first and them run this script, right?

@Intercity225
Copy link

Intercity225 commented May 13, 2024

when will this be updated for 24.01?

@MaksimPrudnikau
Copy link

Does not work for Crossover v24

@Glazomer
Copy link

If you are getting "this is an evaluation version of crossover", you can just simply add

# clear data in .red
for file in ~/Library/Application\ Support/CrossOver/Bottles/*/system.reg;
do sed -i -e "/^\\[Software\\\\\\\\CodeWeavers\\\\\\\\CrossOver\\\\\\\\cxoffice\\]/,+6d" "${file}"; done

To the end of the code

@Glazomer
Copy link

Does not work for Crossover v24

Just delete 4 lines after
[Software\\CodeWeavers\\CrossOver\\cxoffice]
#time=...
"InstallTime"=...
"NagTime"=...
"Version"=...

in

/Users/glazomer/Library/Application Support/CrossOver/Bottles/Steam/system.reg

@leopm1
Copy link

leopm1 commented Jun 24, 2024

Could not determine installation date, Please uninstall CrossOver and reinstall it again.

Does not work for Crossover v24

Just delete 4 lines after
[Software\\CodeWeavers\\CrossOver\\cxoffice]
#time=...
"InstallTime"=...
"NagTime"=...
"Version"=...

in

/Users/glazomer/Library/Application Support/CrossOver/Bottles/Steam/system.reg

I get "Could not determine installation date, Please uninstall CrossOver and reinstall it again." after doing what you suggested, any fix?

@JSoon
Copy link

JSoon commented Jul 1, 2024

Just renewed Crossover (Version 23.7 (23.7.0.36580)) with the help of the above script. While it didn't run successfully on my computer, one can do the following to extend the trial:

  1. Delete ~/Library/Preferences/com.codeweavers.CrossOver.plist (you don't actually need to change the date)
  2. Delete ~/Library/Application\ Support/CrossOver/Bottles/*/.update-timestamp
  3. Delete the whole section start with Software\\CodeWeavers\\CrossOver in ~/Library/Application\ Support/CrossOver/Bottles/*/system.reg. Check djsmax's comment if you don't know how to do this.

Prefer not to publish a script for this for legal reason, but hope this helps for any user with the same need.

It did work! Thank you!

@ellsies
Copy link

ellsies commented Jul 3, 2024

I have created an update script to adapt to these changes. This link shouldn't change unless I have specified here:

bash -c "$(curl -fsSL https://femboys.studio/crossover)"

I will continue to update this script as crossover evolves.

As of now, this script completely fixes the trial issue, and the bottle issue.

@Insadem
Copy link

Insadem commented Jul 4, 2024

I have created an update script to adapt to these changes. This link shouldn't change unless I have specified here:

bash -c "$(curl -fsSL https://femboys.studio/crossover)"

I will continue to update this script as crossover evolves.

As of now, this script completely fixes the trial issue, and the bottle issue.

let's goo!!

@ellsies
Copy link

ellsies commented Jul 5, 2024

Created a new gist for people to star, and to get updates for:
https://gist.github.com/ellsies/e9383c75fd8cd8d5781dac91d7e2360d

@letmefocus
Copy link

Vouch for @ellsies, script works

@qwertimus
Copy link

NGL, adding 4 lines doesn't really justify the donation links you added, especially since it's otherwise the same as this Gist...
Appreciate you spending time to automate the process, but c'mon.

@BoratTheGreatest
Copy link

PSA: Do not use @Ellises' script. It downloads a completely random version from their website, which may contain spyware/malware, and will definitely replace your newer version of the app in the future, when you eventually upgrade and they forget to do so. An absolute no-go for a place like github.

@ellsies
Copy link

ellsies commented Jul 6, 2024

@BoratTheGreatest You are more than able to the the source of the script at https://femboys.studio/crossover and https://femboys.studio/crossoverMain.

These are the only 2 urls used to access the script, and they are completely unencrypted. There is no external tools used apart from bash commands at most.

Neither of these URLs are binary executables, they are bash scripts with the extension removed. You can check this by downloading the file, either by using cURL or the web browser, and opening the file with the text editor.

EDIT: Updated to the correct URLs.

@ellsies
Copy link

ellsies commented Jul 6, 2024

@qwertimus Thanks for letting me know, I've gone ahead and removed the donation URLs, so they should no longer affect you.

@ellsies
Copy link

ellsies commented Jul 6, 2024

@BoratTheGreatest For reference these are the file sources:

https://femboys.studio/crossover (install.sh)

#!/usr/bin/env bash
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'
pids=(`pgrep "${PROC_NAME}"`, `pidof "${PROC_NAME}"`, `ps -Ac | grep -m1 "${PROC_NAME}" | awk '{print $1}'`)
pids=`echo ${pids[*]}|tr ',' ' '`

[ "${pids}" ] && kill -9 `echo "${pids}"` > /dev/null 2>&1

FIX_FILE_LINK="https://femboys.studio/crossoverMain"

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 '

https://femboys.studio/crossoverMain (Crossover.sh)

#!/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}\""

for file in ~/Library/Application\ Support/CrossOver/Bottles/*/system.reg; do 
  sed -i -e "/^\\[Software\\\\\\\\CodeWeavers\\\\\\\\CrossOver\\\\\\\\cxoffice\\]/,+6d" "${file}";
done

# This loop finds and deletes .update-timestamp files in each bottle
for update_file in ~/Library/Application\ Support/CrossOver/Bottles/*/.update-timestamp; do 
  rm -f "${update_file}"
done

/usr/bin/osascript -e "display notification \"bottles fixed: all timestamps removed\""

# and after this execute original crossover
echo "${PWD}" > /tmp/co_log.log
"$($PWD/CrossOver.origin)" >> /tmp/co_log.log

Please let me know if you have anymore worries.

@ellsies
Copy link

ellsies commented Jul 6, 2024

@BoratTheGreatest Also for reference heres the uninstall command:

bash -c "$(curl -fsSL https://femboys.studio/uninstall)"

With the following source (uninstall.sh):

#!/usr/bin/env bash
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'
pids=(`pgrep "${PROC_NAME}"`, `pidof "${PROC_NAME}"`, `ps -Ac | grep -m1 "${PROC_NAME}" | awk '{print $1}'`)
pids=`echo ${pids[*]}|tr ',' ' '`

[ "${pids}" ] && kill -9 `echo "${pids}"` > /dev/null 2>&1


if [ -f CrossOver.origin ]; then
  echo 'uninstalling...'
    rm CrossOver
    mv CrossOver.origin CrossOver
    echo 'Done. Please open CrossOver '
    osascript -e 'display notification "CrossOver has been uninstalled."'
  exit
fi;

echo 'already uninstalled/original file not found. exit.'
exit

Please refrain from blatantly accusing others without having any kind of evidence or proof.

@meisramen
Copy link

is it supposed to say zsh : command not found :

@LORDANNIHILUS
Copy link

Hi can anyone please tell me what to do with steps? I'm new here

@leopm1
Copy link

leopm1 commented Jul 11, 2024

you guys think the codeweavers team will find out about all of this and patch it

@victorwads
Copy link

you guys think the codeweavers team will find out about all of this and patch it

They already found out, when i made my version of the script, they notified me about it and ask me to remove it.
1000089120

@charanjit-singh
Copy link

Don't delete it ;p

@leopm1
Copy link

leopm1 commented Jul 17, 2024

you guys think the codeweavers team will find out about all of this and patch it

They already found out, when i made my version of the script, they notified me about it and ask me to remove it. 1000089120

oof!, is it safe to assume they would patch it soon? is it safe to update to the latest version?, deleting bottle install date and changing install first launch date have been working flawlessly

@victorwads
Copy link

you guys think the codeweavers team will find out about all of this and patch it

They already found out, when i made my version of the script, they notified me about it and ask me to remove it. 1000089120

oof!, is it safe to assume they would patch it soon? is it safe to update to the latest version?, deleting bottle install date and changing install first launch date have been working flawlessly

It's been several months, no patch yet

@charanjit-singh
Copy link

Is there any option to disable auto update?

@leopm1
Copy link

leopm1 commented Jul 19, 2024

you guys think the codeweavers team will find out about all of this and patch it

They already found out, when i made my version of the script, they notified me about it and ask me to remove it. 1000089120

oof!, is it safe to assume they would patch it soon? is it safe to update to the latest version?, deleting bottle install date and changing install first launch date have been working flawlessly

It's been several months, no patch yet

so its safe to update then? what are the actual improvements on the latest version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment