Mac下IDEA PyCharm无限试用方法
1、下载专业版Idea、PyCharm 2、选择试用30天 3、30天到期后,执行以下脚本重置试用期
#!/bin/bash
if [ "$1" = "--prepare-env" ]; then
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
mkdir -p ~/Scripts
echo "Copying the script to $HOME/Scripts"
cp -rf $DIR/runme.sh ~/Scripts/jetbrains-reset.sh
chmod +x ~/Scripts/jetbrains-reset.sh
echo
echo "Copying com.jetbrains.reset.plist to $HOME/Library/LaunchAgents"
cp -rf $DIR/com.jetbrains.reset.plist ~/Library/LaunchAgents
echo
echo "Loading job into launchctl"
launchctl load ~/Library/LaunchAgents/com.jetbrains.reset.plist
echo
echo "That's it, enjoy ;)"
exit 0
fi
if [ "$1" = "--launch-agent" ]; then
PROCESS=(idea webstorm datagrip phpstorm clion pycharm goland rubymine rider)
COMMAND_PRE=("${PROCESS[@]/#/MacOS/}")
# Kill all Intellij applications
kill -9 `ps aux | egrep $(IFS=$'|'; echo "${COMMAND_PRE[*]}") | awk '{print $2}'`
fi
# Reset Intellij evaluation
for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine Rider; do
echo "Resetting trial period for $product"
echo "removing evaluation key..."
rm -rf ~/Library/Preferences/$product*/eval
# Above path not working on latest version. Fixed below
rm -rf ~/Library/Application\ Support/JetBrains/$product*/eval
echo "removing all evlsprt properties in options.xml..."
sed -i '' '/evlsprt/d' ~/Library/Preferences/$product*/options/other.xml
# Above path not working on latest version. Fixed below
sed -i '' '/evlsprt/d' ~/Library/Application\ Support/JetBrains/$product*/options/other.xml
echo
done
echo "removing additional plist files..."
rm -f ~/Library/Preferences/com.apple.java.util.prefs.plist
rm -f ~/Library/Preferences/com.jetbrains.*.plist
rm -f ~/Library/Preferences/jetbrains.*.*.plist
echo
echo "That's it, enjoy ;)"
# Flush preference cache
if [ "$1" = "--launch-agent" ]; then
killall cfprefsd
echo "Evaluation was reset at $(date)" >> ~/Scripts/logs
fi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
上次更新: 2023/10/08, 09:19:12