Skip to content

Instantly share code, notes, and snippets.

@santaklouse
Last active May 4, 2024 01:53
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.'
@Inv1xus
Copy link

Inv1xus commented Nov 22, 2023

I keep on getting this error

the default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/install.sh?token=$(date +%s))"
bash: line 13: pidof: command not found
mv: rename CrossOver to CrossOver.origin: Operation not permitted
bash: line 30: CrossOver: Operation not permitted
chmod: Unable to change file mode on CrossOver: Operation not permitted
Done. Please open CrossOver
bash-3.2$

@koczka
Copy link

koczka commented Nov 25, 2023

Having the same issue as Inv1xus.

@aborovsky
Copy link

mv: rename CrossOver to CrossOver.origin: Operation not permitted

Try to enable "Full Disk Access" for Terminal app, it helped me.

@Inv1xus
Copy link

Inv1xus commented Nov 25, 2023

The command runs well, it says its been installed and updated, but crossover still shows up as 12 days left (I had it 2 days ago),

Did the command work?
How do I know if it worked properly?

@mathisdrn
Copy link

Hi @santaklouse, is this script compatible with 23.6 ?
Last 14 days have been a blast to not have to wait for Nvidia Geforce Now queue just to play Rocket League!

@OrielOrielOriel
Copy link

Adding the following oneliner in CrossOver.sh will handle the bottle expiration for now:

for file in ~/library/Application\ Support/Crossover/Bottles/*/system.reg;do perl -pi -e 'BEGIN {undef $/;} s/\[Software\\\\CodeWeavers\\\\CrossOver\\\\cxoffice\].*\n.*\n.*\n.*\n.*\n\n//g' $file; done

@rachitdaga153
Copy link

rachitdaga153 commented Dec 2, 2023

I have been using the above steps for renewal of trisl period, but today my bottle deleted all the Apps from within. No idea how it happened.
Any idea why that could have happened? Please help!

Edit : I am able to find the apps in the bottle directory and it seems to be working as well but can’t See them in crossover applications in CROSSOVER UI

@Inv1xus
Copy link

Inv1xus commented Dec 12, 2023

I keep on getting this error, can anyone help?:

zsh: event not found: /usr/bin/env

I also tried running all the commands in terminal but nothing worked, I keep on opening crossover 23.6 and it's telling me the trial version is over.

And my bottles are installed on a different hardrive, while crossover is in my main applications folder.

@TwizzyIndy
Copy link

TwizzyIndy commented Dec 14, 2023

for those who are tired of resetting the trial every 14 days:

plutil -replace FirstRunDate -date "2074-04-18T09:45:35Z" com.codeweavers.CrossOver.plist
plutil -replace SULastCheckTime -date "2074-04-18T09:45:35Z" com.codeweavers.CrossOver.plist

# resetting preference daemon. it won't need to reboot the mac
killall -u $USER cfprefsd

@The1TON
Copy link

The1TON commented Dec 22, 2023

It doesnt work anymore. that is what I had been doing

@rachitdaga153
Copy link

for those who are tired of resetting the trial every 14 days:

plutil -replace FirstRunDate -date "2074-04-18T09:45:35Z" com.codeweavers.CrossOver.plist
plutil -replace SULastCheckTime -date "2074-04-18T09:45:35Z" com.codeweavers.CrossOver.plist

# resetting preference daemon. it won't need to reboot the mac
killall -u $USER cfprefsd

This didnt work before also, since we had to delete the updatetimestamp file also?

@mrfurretgo
Copy link

mrfurretgo commented Jan 11, 2024

Hi, it appears that the Bottle registration date gets reset if it is changed when starting up an executable within the app. Please fix.

(I tried to use a python script to automatically check every 0.01 seconds and if the file has changed it back to the previous version it undos the change and keeps the verification date that it knows.)

@zumbiepig
Copy link

Could this script be changed so that it doesn't kill -9 Crossover, potentially corrupting bottles if they are still running? It could instead exit with a message saying something like Please quit crossover before running this script.

@krafairus
Copy link

hi, is it possible to make it work for linux crossover?

@zumbiepig
Copy link

hi, is it possible to make it work for linux crossover?

It could instead exit with a message saying something like Please exit or quit manually crossover before running this script.

@victorwads
Copy link

victorwads commented Feb 1, 2024

I've created a service to always update my CrossOver "fake license":

~/Library/LaunchAgents/com.codeweavers.CrossOver.crack.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.codeweavers.CrossOver.crack.plist</string>
    <key>ProgramArguments</key>
    <array>
        <string>sh</string>
        <string>-c</string>
        <string>defaults write com.codeweavers.CrossOver FirstRunDate -date "$(date +"%Y-%m-%d %H:%M:%S")";</string>
    </array>
    <key>StartInterval</key>
    <integer>6000</integer>
</dict>
</plist>

But the bottle stopped working even if CrossOver launches, just like the issue you guys are talking about. I've looked over the code above and I think I can combine both solutions.

I learned here about deleting .version and .update-time files, which alone doesn't work for the latest version (Version 23.7.1 (23.7.1.36573)).

But editing the system.reg file works, so we need to make our scripts do this for us. The problem I can't figure out for now is how to get the bottle directory for each user, for me it's: ~/CXPBottles/.

After setting up your bottle directory, every subdirectory will be a Bottle which gives us the pattern ~/CXPBottles/**/system.reg where ** means each bottle you have.


i will edit here after writting all the script with all "Gambiarras" to fix it.

4Knowlege:

  1. an ~ in any unix url or path represetns the User Home Direcotry, on mac /Users/Yourname
  2. "Gambiarras" is a Brasilian Portuguese Expresion hard to explain, so theres a link 4 it.

@che-palle-non-funziona-niente

I've created a service to always update my CrossOver "fake license":

~/Library/LaunchAgents/com.codeweavers.CrossOver.crack.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>com.codeweavers.CrossOver.crack.plist</string>
    <key>ProgramArguments</key>
    <array>
        <string>sh</string>
        <string>-c</string>
        <string>defaults write com.codeweavers.CrossOver FirstRunDate -date "$(date +"%Y-%m-%d %H:%M:%S")";</string>
    </array>
    <key>StartInterval</key>
    <integer>6000</integer>
</dict>
</plist>

But the bottle stopped working even if CrossOver launches, just like the issue you guys are talking about. I've looked over the code above and I think I can combine both solutions.

I learned here about deleting .version and .update-time files, which alone doesn't work for the latest version (Version 23.7.1 (23.7.1.36573)).

But editing the system.reg file works, so we need to make our scripts do this for us. The problem I can't figure out for now is how to get the bottle directory for each user, for me it's: ~/CXPBottles/.

After setting up your bottle directory, every subdirectory will be a Bottle which gives us the pattern ~/CXPBottles/**/system.reg where ** means each bottle you have.

i will edit here after writting all the script with all "Gambiarras" to fix it.

4Knowlege:

  1. an ~ in any unix url or path represetns the User Home Direcotry, on mac /Users/Yourname
  2. "Gambiarras" is a Brasilian Portuguese Expresion hard to explain, so theres a link 4 it.

hi, i'm having a problem. Sorry if this is a stupid question, i don't know ANYTHING about coding.
The issue i have is that the code you wrote just makes the terminal say "zsh: parse error near `\n'". How do I fix this?
Thanks in advance! <3

@Insadem
Copy link

Insadem commented Feb 29, 2024

^ Thanks to victorwads for his code, his gist link is apparently private or deleted, because I get 404 error page.
image

[REDACTED]

@victorwads
Copy link

Hi, @Insadem

Some people that works on CodeWeavers ask me to remove the code, cause it is piracy and if there a lot of people "Piracing" the program, it could end on terminating the project by not having enogh money to finance the project.

There are people working on this project that need to me paid, there is no Big Company behind de project. So, they are doing a lot of discounts and promotion and every version they give 14days trial.

If anyway we don't have money to buy it, some games are possible to run using Apple Gamming Porting Tool.

Sorry.

@Insadem
Copy link

Insadem commented Feb 29, 2024

Hi, @Insadem

Some people that works on CodeWeavers ask me to remove the code, cause it is piracy and if there a lot of people "Piracing" the program, it could end on terminating the project by not having enogh money to finance the project.

There are people working on this project that need to me paid, there is no Big Company behind de project. So, they are doing a lot of discounts and promotion and every version they give 14days trial.

If anyway we don't have money to buy it, some games are possible to run using Apple Gamming Porting Tool.

Sorry.

Alright, I'll delete it then.

@kurai021
Copy link

Sometimes I would like to know how much Crossover gives back to the community to support the need for a service based on an annual subscription and cease and desist practices closer to the Microsoft of a few years ago than a company friendly to free software.

@tf7software
Copy link

all i got was`Last login: Tue Mar 19 14:43:09 on ttys000

The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
(base) Henrys-MacBook-Pro:~ henry$ bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/install.sh?token=$(date +%s))"
dyld[88993]: Library not loaded: @rpath/libssl.1.1.dylib
Referenced from: /Users/henry/anaconda3/lib/libcurl.4.dylib
Reason: tried: '/Users/henry/anaconda3/lib/libssl.1.1.dylib' (no such file), '/Users/henry/anaconda3/bin/../lib/libssl.1.1.dylib' (no such file), '/Users/henry/anaconda3/bin/../lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file, not in dyld cache)
(base) Henrys-MacBook-Pro:~ henry$

` cant tell if it worked

@Gururcharan
Copy link

Gururcharan commented Mar 26, 2024

What are u all speaking about those bottles can anyone clarify me please...
I am here for the lifetime freee version of crosssover....!!!!!
@santaklouse

@tf7software
Copy link

Here's an app i made to get it free forever: https://github.com/rhenrywarren/CrossoverFree

Or HERE

@victorwads
Copy link

victorwads commented Mar 26, 2024

@Gururcharan let me explain.

On Crossover, u need to create a "bottle" that is just a folder, containing the minium aplications needed for u to run your game.

Each game needs diferent sub aplications like directx configs eand files. So normally U can create a different bottle for each game.

Why "bottle" and not "folder". Thats because crossover is q program running another program that simulates windows on unix since all personal computer exists, and the program is called "wine", a drink that normali is sell on "bottles".

And why we are talking about that? Because u can run. Crossover forever with some tricks, but each bottle has a limit trial time for u to test it. Soh, even u solve crossover basic resting the trial, the bottles will expire anyway.

U don't need to knkw anything about it if u just Buy the license the right way. If you don't have money, study it and u can run games without crosover with just wine thats free.

@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?

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