Skip to content

Instantly share code, notes, and snippets.

@zhangcheng
Forked from santaklouse/CrossOver.sh
Created October 9, 2025 08:32
Show Gist options
  • Save zhangcheng/c4fde15d589e3be9a9c2705645716f40 to your computer and use it in GitHub Desktop.
Save zhangcheng/c4fde15d589e3be9a9c2705645716f40 to your computer and use it in GitHub Desktop.

Revisions

  1. @santaklouse santaklouse revised this gist Oct 18, 2023. 1 changed file with 26 additions and 0 deletions.
    26 changes: 26 additions & 0 deletions uninstall.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    #!/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.'
  2. @santaklouse santaklouse revised this gist Sep 19, 2023. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,7 @@ 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 ',' ' '`
  3. @santaklouse santaklouse revised this gist Sep 19, 2023. 2 changed files with 9 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions CrossOver.sh
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,8 @@ PIDOF="$(which pidof)"
    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}"

    7 changes: 7 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -9,6 +9,13 @@ test -d "${CO_PWD}" || (echo 'unable to detect app path. exiting...' && exit)
    PWD="${CO_PWD}"
    cd "${PWD}"

    # 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}"

  4. @santaklouse santaklouse revised this gist Sep 19, 2023. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,6 @@ cd "${PWD}"
    TIMESTAMP=$(date +%s)
    FIX_FILE_LINK="https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/CrossOver.sh?token=${TIMESTAMP}"

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit
    if [ -f CrossOver.origin ]; then
    echo 'already installed. update and exit.'
    echo "$(curl -fsSL ${FIX_FILE_LINK})" > CrossOver
  5. @santaklouse santaklouse revised this gist Sep 19, 2023. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,11 @@ TIMESTAMP=$(date +%s)
    FIX_FILE_LINK="https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/CrossOver.sh?token=${TIMESTAMP}"

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit
    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

  6. @santaklouse santaklouse revised this gist Sep 19, 2023. 2 changed files with 4 additions and 3 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    ## Run it in console for permanent install :

    ```
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/install.sh)"
    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).
    5 changes: 3 additions & 2 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -9,13 +9,14 @@ test -d "${CO_PWD}" || (echo 'unable to detect app path. exiting...' && exit)
    PWD="${CO_PWD}"
    cd "${PWD}"

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/CrossOver.sh'
    TIMESTAMP=$(date +%s)
    FIX_FILE_LINK="https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/CrossOver.sh?token=${TIMESTAMP}"

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

    test -f CrossOver.origin || mv CrossOver CrossOver.origin

    echo "$(curl -fsSL $FIX_FILE_LINK)" > CrossOver
    echo "$(curl -fsSL ${FIX_FILE_LINK})" > CrossOver

    chmod +x CrossOver

  7. @santaklouse santaklouse revised this gist Sep 19, 2023. 3 changed files with 37 additions and 16 deletions.
    40 changes: 27 additions & 13 deletions CrossOver.sh
    Original file line number Diff line number Diff line change
    @@ -1,28 +1,42 @@
    #!/usr/bin/env bash

    PWD=/Applications/CrossOver.app/Contents/MacOS
    # checck if pidof exists
    PIDOF="$(which pidof)"
    # and if not - install it
    (test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof

    PROC_NAME=CrossOver
    # find app in default paths
    CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
    test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS

    pids=(`pgrep "$PROC_NAME"`, `pidof "$PROC_NAME"`, `ps -Ac | grep -m1 '"$PROC_NAME"\$' | awk '{print \$1}'`)
    PWD="${CO_PWD}"
    cd "${PWD}"

    pids=`echo $pids|tr ',' ' '`
    PROC_NAME='CrossOver'

    # kill instance if it running
    [ "$pids" ] && kill -9 `echo $pids` >/dev/null 2>&1
    # 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 ',' ' '`

    sleep 3
    # kills CrossOver process if it is running
    [ "${pids}" ] && kill -9 `echo "${pids}"` > /dev/null 2>&1

    TIME=`date -v -1H '+%b %d, %Y, %H:%M:%S %p'`
    # wait until app finish
    sleep 3

    /usr/bin/osascript -e "display notification \"trial fixed: date changed to $TIME\""
    # 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 -string "$TIME" ~/Library/Preferences/com.codeweavers.CrossOver.plist
    plutil -replace FirstRunDate -date "${DATETIME}" ~/Library/Preferences/com.codeweavers.CrossOver.plist
    plutil -replace SULastCheckTime -date "${DATETIME}" ~/Library/Preferences/com.codeweavers.CrossOver.plist

    for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm "$file";done
    # show tooltip notification
    /usr/bin/osascript -e "display notification \"trial fixed: date changed to ${DATETIME}\""

    #and after this execute original crossover
    # reset all bottles
    for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm -rf "${file}";done

    echo $PWD > /tmp/co_log.log
    # and after this execute original crossover
    echo "${PWD}" > /tmp/co_log.log
    "$($PWD/CrossOver.origin)" >> /tmp/co_log.log
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    ## Run it in console for permanent install :

    ```
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/a9cfd03a04e8afc7e907e38c0fb02042e0ab143e/install.sh)"
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/install.sh)"
    ```

    After install script will fix crossover as well as expired bottles (Thanks to @djsmax).
    11 changes: 9 additions & 2 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,15 @@
    #!/usr/bin/env bash

    cd /Applications/CrossOver.app/Contents/MacOS/
    # find app in default paths
    CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
    test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/a9cfd03a04e8afc7e907e38c0fb02042e0ab143e/CrossOver.sh'
    test -d "${CO_PWD}" || (echo 'unable to detect app path. exiting...' && exit)

    PWD="${CO_PWD}"
    cd "${PWD}"

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/CrossOver.sh'

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

  8. @santaklouse santaklouse revised this gist Jul 13, 2023. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    ## Run it in console for permanent install :

    ```
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/158dcd688687b8fe84f2ca712200f42779e6d55e/install.sh)"
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/a9cfd03a04e8afc7e907e38c0fb02042e0ab143e/install.sh)"
    ```

    After install script will fix crossover as well as expired bottles (Thanks to @djsmax).
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    cd /Applications/CrossOver.app/Contents/MacOS/

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/158dcd688687b8fe84f2ca712200f42779e6d55e/CrossOver.sh'
    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/a9cfd03a04e8afc7e907e38c0fb02042e0ab143e/CrossOver.sh'

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

  9. @santaklouse santaklouse revised this gist Jul 13, 2023. 1 changed file with 0 additions and 2 deletions.
    2 changes: 0 additions & 2 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -8,8 +8,6 @@ test -f CrossOver.origin && echo 'already installed. exiting...' && exit

    test -f CrossOver.origin || mv CrossOver CrossOver.origin

    mv CrossOver CrossOver.origin

    echo "$(curl -fsSL $FIX_FILE_LINK)" > CrossOver

    chmod +x CrossOver
  10. @santaklouse santaklouse revised this gist Jul 13, 2023. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,8 @@ FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed6

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

    test -f CrossOver.origin || mv CrossOver CrossOver.origin

    mv CrossOver CrossOver.origin

    echo "$(curl -fsSL $FIX_FILE_LINK)" > CrossOver
  11. @santaklouse santaklouse revised this gist Jul 13, 2023. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    ## Run it in console for permanent install :

    ```
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/c7615c2beffb3ff0f7c3ac10bd66f7019e0a5576/install.sh)"
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/158dcd688687b8fe84f2ca712200f42779e6d55e/install.sh)"
    ```

    After install script will fix crossover as well as expired bottles (Thanks to @djsmax).
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    cd /Applications/CrossOver.app/Contents/MacOS/

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/c7615c2beffb3ff0f7c3ac10bd66f7019e0a5576/CrossOver.sh'
    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/158dcd688687b8fe84f2ca712200f42779e6d55e/CrossOver.sh'

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

  12. @santaklouse santaklouse revised this gist Jul 13, 2023. 3 changed files with 4 additions and 8 deletions.
    2 changes: 2 additions & 0 deletions CrossOver.sh
    Original file line number Diff line number Diff line change
    @@ -20,6 +20,8 @@ TIME=`date -v -1H '+%b %d, %Y, %H:%M:%S %p'`
    # modify time in order to reset trial
    plutil -replace FirstRunDate -string "$TIME" ~/Library/Preferences/com.codeweavers.CrossOver.plist

    for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm "$file";done

    #and after this execute original crossover

    echo $PWD > /tmp/co_log.log
    8 changes: 1 addition & 7 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -5,10 +5,4 @@
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/c7615c2beffb3ff0f7c3ac10bd66f7019e0a5576/install.sh)"
    ```

    ## for fix expired bottles:
    (Thanks to @djsmax)
    ```
    for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm "$file";done
    ```


    After install script will fix crossover as well as expired bottles (Thanks to @djsmax).
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -12,4 +12,4 @@ echo "$(curl -fsSL $FIX_FILE_LINK)" > CrossOver

    chmod +x CrossOver

    echo 'Done. Please open CrossOver '
    echo 'Done. Please open CrossOver '
  13. @santaklouse santaklouse revised this gist Jul 13, 2023. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    ## Run it in console for permanent install :

    ```
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/75ddf7154124115967c8f76bef00d23e1448a3fb/install.sh)"
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/c7615c2beffb3ff0f7c3ac10bd66f7019e0a5576/install.sh)"
    ```

    ## for fix expired bottles:
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    cd /Applications/CrossOver.app/Contents/MacOS/

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/d0226e648e2b40d4a3b3d1839ef30f510080e6b6/CrossOver.sh'
    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/c7615c2beffb3ff0f7c3ac10bd66f7019e0a5576/CrossOver.sh'

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

  14. @santaklouse santaklouse revised this gist Jul 13, 2023. 2 changed files with 2 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion README.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1
    ```

    ## for fix expired bottles:
    (Thanks to @github/djsmax)
    (Thanks to @djsmax)
    ```
    for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm "$file";done
    ```
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    cd /Applications/CrossOver.app/Contents/MacOS/

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/75ddf7154124115967c8f76bef00d23e1448a3fb/CrossOver.sh'
    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/d0226e648e2b40d4a3b3d1839ef30f510080e6b6/CrossOver.sh'

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

  15. @santaklouse santaklouse revised this gist Jul 13, 2023. 3 changed files with 18 additions and 2 deletions.
    2 changes: 1 addition & 1 deletion CrossOver.sh
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ TIME=`date -v -1H '+%b %d, %Y, %H:%M:%S %p'`
    /usr/bin/osascript -e "display notification \"trial fixed: date changed to $TIME\""

    # modify time in order to reset trial
    plutil -replace test1 -string "$TIME" ~/Library/Preferences/com.codeweavers.CrossOver.plist
    plutil -replace FirstRunDate -string "$TIME" ~/Library/Preferences/com.codeweavers.CrossOver.plist

    #and after this execute original crossover

    14 changes: 14 additions & 0 deletions README.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@

    ## Run it in console for permanent install :

    ```
    bash -c "$(curl -fsSL https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/75ddf7154124115967c8f76bef00d23e1448a3fb/install.sh)"
    ```

    ## for fix expired bottles:
    (Thanks to @github/djsmax)
    ```
    for file in ~/Library/Application\ Support/CrossOver/Bottles/*/.{eval,update-timestamp}; do rm "$file";done
    ```


    4 changes: 3 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -2,11 +2,13 @@

    cd /Applications/CrossOver.app/Contents/MacOS/

    FIX_FILE_LINK='https://gist.github.com/santaklouse/a137ee51692b74d4cf2cc1bb68ed64ef/raw/75ddf7154124115967c8f76bef00d23e1448a3fb/CrossOver.sh'

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

    mv CrossOver CrossOver.origin

    echo "$(curl -fsSL https://t.ly/CrossOverLink)" > CrossOver
    echo "$(curl -fsSL $FIX_FILE_LINK)" > CrossOver

    chmod +x CrossOver

  16. @santaklouse santaklouse revised this gist Jun 4, 2022. 2 changed files with 8 additions and 7 deletions.
    8 changes: 5 additions & 3 deletions CrossOver.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,7 @@
    #!/usr/bin/env bash

    PWD=/Applications/CrossOver.app/Contents/MacOS

    PROC_NAME=CrossOver

    pids=(`pgrep "$PROC_NAME"`, `pidof "$PROC_NAME"`, `ps -Ac | grep -m1 '"$PROC_NAME"\$' | awk '{print \$1}'`)
    @@ -9,7 +11,7 @@ pids=`echo $pids|tr ',' ' '`
    # kill instance if it running
    [ "$pids" ] && kill -9 `echo $pids` >/dev/null 2>&1

    sleep 2
    sleep 3

    TIME=`date -v -1H '+%b %d, %Y, %H:%M:%S %p'`

    @@ -20,5 +22,5 @@ plutil -replace test1 -string "$TIME" ~/Library/Preferences/com.codeweavers.Cros

    #and after this execute original crossover

    ./CrossOver.origin "$*" &

    echo $PWD > /tmp/co_log.log
    "$($PWD/CrossOver.origin)" >> /tmp/co_log.log
    7 changes: 3 additions & 4 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,13 @@
    #!/usr/bin/env bash



    cd /Applications/CrossOver.app/Contents/MacOS/

    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

    mv CrossOver CrossOver.origin


    echo "$(curl -fsSL https://t.ly/CrossOverLink)" > CrossOver

    chmod +x CrossOver
    chmod +x CrossOver

    echo 'Done. Please open CrossOver '
  17. @santaklouse santaklouse revised this gist Jun 4, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,7 @@

    cd /Applications/CrossOver.app/Contents/MacOS/

    test -f CrossOver.origin && return
    test -f CrossOver.origin && echo 'already installed. exiting...' && exit

    mv CrossOver CrossOver.origin

  18. @santaklouse santaklouse revised this gist Jun 4, 2022. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,11 @@
    #!/usr/bin/env bash



    cd /Applications/CrossOver.app/Contents/MacOS/

    test -f CrossOver.origin && return

    mv CrossOver CrossOver.origin


  19. @santaklouse santaklouse revised this gist Jun 4, 2022. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion install.sh
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,6 @@ cd /Applications/CrossOver.app/Contents/MacOS/
    mv CrossOver CrossOver.origin


    echo "$(curl -fsSL https://t.ly/CrossOverLink)" > CrossOver
    echo "$(curl -fsSL https://t.ly/CrossOverLink)" > CrossOver

    chmod +x CrossOver
  20. @santaklouse santaklouse created this gist Jun 4, 2022.
    24 changes: 24 additions & 0 deletions CrossOver.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    #!/usr/bin/env bash

    PROC_NAME=CrossOver

    pids=(`pgrep "$PROC_NAME"`, `pidof "$PROC_NAME"`, `ps -Ac | grep -m1 '"$PROC_NAME"\$' | awk '{print \$1}'`)

    pids=`echo $pids|tr ',' ' '`

    # kill instance if it running
    [ "$pids" ] && kill -9 `echo $pids` >/dev/null 2>&1

    sleep 2

    TIME=`date -v -1H '+%b %d, %Y, %H:%M:%S %p'`

    /usr/bin/osascript -e "display notification \"trial fixed: date changed to $TIME\""

    # modify time in order to reset trial
    plutil -replace test1 -string "$TIME" ~/Library/Preferences/com.codeweavers.CrossOver.plist

    #and after this execute original crossover

    ./CrossOver.origin "$*" &

    8 changes: 8 additions & 0 deletions install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/usr/bin/env bash


    cd /Applications/CrossOver.app/Contents/MacOS/
    mv CrossOver CrossOver.origin


    echo "$(curl -fsSL https://t.ly/CrossOverLink)" > CrossOver