branding: change app name

This commit is contained in:
ave 2019-01-25 15:48:05 +03:00
parent 0bc36a0738
commit eb1f1ff8ac
No known key found for this signature in database
GPG key ID: 09356ABAA42C842B
4 changed files with 46 additions and 2 deletions

2
.gitignore vendored
View file

@ -1 +1 @@
patches/customversion/*-custom.patch patches/*/*-custom.patch

View file

@ -14,7 +14,7 @@ diff -crB -x dist -x build com.discord-834-base/res/values/strings.xml com.disco
<string name="disconnect_account_body">Disconnecting your account might remove you from servers you joined via this account.</string> <string name="disconnect_account_body">Disconnecting your account might remove you from servers you joined via this account.</string>
<string name="disconnect_account_title">Disconnect %1$s</string> <string name="disconnect_account_title">Disconnect %1$s</string>
<string name="disconnect_from_voice">Disconnect from Voice</string> <string name="disconnect_from_voice">Disconnect from Voice</string>
! <string name="discord">CutTheCord</string> ! <string name="discord">CTCNAME</string>
<string name="discord_desc_long">Free and secure chat for gamers, works on both your desktop and your phone.</string> <string name="discord_desc_long">Free and secure chat for gamers, works on both your desktop and your phone.</string>
<string name="discord_desc_short">Team voice &amp; text chat</string> <string name="discord_desc_short">Team voice &amp; text chat</string>
<string name="discord_gg">discord.gg/</string> <string name="discord_gg">discord.gg/</string>
@ -35,3 +35,18 @@ diff -crB -x dist -x build com.discord-834-base/res/values/strings.xml com.disco
<string name="notification_title_start_game">"Somebody Playin'"</string> <string name="notification_title_start_game">"Somebody Playin'"</string>
<string name="notifications">Notifications</string> <string name="notifications">Notifications</string>
<string name="nsfw_accept">Continue</string> <string name="nsfw_accept">Continue</string>
diff -crB -x dist -x build com.discord-835-base/AndroidManifest.xml com.discord-835/AndroidManifest.xml
*** com.discord-835-base/AndroidManifest.xml 2019-01-25 10:57:34.292581301 +0300
--- com.discord-835/AndroidManifest.xml 2019-01-25 15:30:47.000000000 +0300
***************
*** 1,4 ****
! <?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="28" android:compileSdkVersionCodename="9" android:installLocation="auto" package="com.discord" platformBuildVersionCode="835" platformBuildVersionName="8.3.5g">
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.faketouch" android:required="false"/>
--- 1,4 ----
! <?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="28" android:compileSdkVersionCodename="9" android:installLocation="auto" package="com.cutthecord.CTCBRANCH" platformBuildVersionCode="835CTCTIMESTAMP" platformBuildVersionName="8.3.5g-cutthecord">
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
<uses-feature android:name="android.hardware.faketouch" android:required="false"/>

View file

@ -2,6 +2,8 @@
This patch renames Discord app to Cutthecord. This patch renames Discord app to Cutthecord.
You'll need to run "addpatch.py" with syntax of `python3 addpatch.py $in_patch_filename $space_splitted_patches` and use the `-custom.patch` version, or else it'll fail.
Running customicon.sh (while on root of the extracted folder) will also change the icon to the debug icon: Running customicon.sh (while on root of the extracted folder) will also change the icon to the debug icon:
![](https://elixi.re/i/48nc2je7.png) ![](https://elixi.re/i/48nc2je7.png)

View file

@ -0,0 +1,27 @@
#!/bin/env python3
import sys
import time
fname = sys.argv[1]
# Read in the file
with open(fname, 'r') as file:
filedata = file.read()
timestamp = str(time.time()).split(".")[0]
name = "CutTheCord"
branch = "base"
if "customtheme" in sys.argv:
branch = "themed"
name += " Themed"
# Replace the target string
filedata = filedata.replace("CTCBRANCH", branch)\
.replace("CTCTIMESTAMP", timestamp)\
.replace("CTCNAME", name)
# Write the file out again
with open(fname.replace(".patch", "-custom.patch"), 'w') as file:
file.write(filedata)