Fora

[Script] Kakao Talk

Autor Odpowiedzi
TheBallOfAeolus Monday 11 November 2019 at 17:08
TheBallOfAeolusAnonymous

Small descrpition of the app:
KakaoTalk (Hangul: 카카오톡), or sometimes KaTalk, is a free mobile instant messaging application for smartphones with free text and free call features, operated by Kakao Corporation.
https://en.wikipedia.org/wiki/KakaoTalk

 

Script restrictions on wine and winOS:

  • I am using wine 4.19 because my default wine installation (3.0) wasn't working and I choose 4.19 because the latest.
  • The OS version is win2008 because it wasn't working with XP, it will possibly work with the rest, but I did not test it.

 

Script:
This is my first script, any feedback is welcome!

#!/bin/bash
# Date : (2019-11-11 15-30)
# Last revision : (2019-11-11 15-30)
# Distribution used to test : Ubuntu 18.04 bionic
# Author : TheBallOfAeolus
# Licence : GPLv3
# PlayOnLinux: 4.3.4

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="KakaoTalk"
WINEVERSION="4.19"
TITLE="Kakao Talk"
EDITOR="Kakao Corp."
GAME_URL="https://www.kakaocorp.com/"
AUTHOR="TheBallOfAeolus"
DOWNLOADURL="http://app.pc.kakao.com/talk/win32/KakaoTalk_Setup.exe"
OSVERSION="win2008"
SHORTCUTFILENAME="KakaoTalk.exe"
DOWNLOADEDSETUPFILE="KakaoTalk_Setup.exe"

# Initialization
POL_SetupWindow_Init

POL_Debug_Init

# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Create Prefix
POL_System_TmpCreate "$PREFIX"

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "Please select the installation file to run." "$TITLE installation"
    INSTALLER="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Download "$DOWNLOADURL"
    INSTALLER="$POL_System_TmpDir/$DOWNLOADEDSETUPFILE"
fi

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"

# Configuration
Set_OS "winxp"

#Dependencies
POL_Call POL_Install_gdiplus
POL_Call POL_Install_msxml6
POL_Call POL_Install_riched30
POL_Call POL_Install_wmp9
POL_Call POL_Install_mono28
POL_Call POL_Install_gecko

# Installation
Set_OS "$OSVERSION"

POL_SetupWindow_message "The installer for $TITLE will now appear.\nDo not allow the installer to launch the game.\nUncheck the box to launch the game at the end of the installation.\n\nIf the game is launched from the installer, the apllication will not be installed and you have to start the process again.\n" "Uncheck the Launch Game checkbox!"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"
POL_Wine_WaitExit "$TITLE"

# Create Shortcuts
POL_Shortcut "$SHORTCUTFILENAME" "$TITLE"

# Cleanup
POL_System_TmpDelete

POL_SetupWindow_Close
exit

Edytowane przez TheBallOfAeolus

TheBallOfAeolus Tuesday 12 November 2019 at 14:56
TheBallOfAeolusAnonymous

I am having issues displaying hangul (Korean alphabet).
I've found several articles highlighting to install and load a specific font:

How can automate it in the playonlinux script?

Any suggestion?

Currently I am seing ▯▯▯▯ for every korean symbol.

 

TheBallOfAeolus Thursday 14 November 2019 at 17:58
TheBallOfAeolusAnonymous

I've found the solution for displaying Hangul (Korean alphabet) characters in Kakao Talk!

The solution as easy as adding:

LANG=ko_KR.EUC-KR

in the "Command to exec before running the program" of the "Miscellaneous tab".

 

The problem was finding a way to add it automatically in the script.

After few trials and errors I came around the command

POL_Shortcut_InsertBeforeWine

for more information, check the wiki: http://wiki.playonlinux.com/index.php/Scripting_-_Chapter_11:_List_of_Functions#POL_Shortcut_InsertBeforeWine_.284.0.2B.29

 

With the following updated script, you can install KakaoTalk in English and have Hangul displayed properly (I am still working on a way to install Kakao Talk in Korean).

#!/bin/bash
# Date : (2019-11-11 15-30)
# Last revision : (2019-11-14 16-42)
# Distribution used to test : Ubuntu 18.04 bionic
# Author : TheBallOfAeolus
# Licence : GPLv3
# PlayOnLinux: 4.3.4

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="KakaoTalk"
WINEVERSION="4.19"
TITLE="Kakao Talk"
EDITOR="Kakao Corp."
GAME_URL="https://www.kakaocorp.com/"
AUTHOR="TheBallOfAeolus"
DOWNLOADURL="http://app.pc.kakao.com/talk/win32/KakaoTalk_Setup.exe"
OSVERSION="win2008"
SHORTCUTFILENAME="KakaoTalk.exe"
DOWNLOADEDSETUPFILE="KakaoTalk_Setup.exe"

# Initialization
POL_SetupWindow_Init

POL_Debug_Init

# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Create Prefix
POL_System_TmpCreate "$PREFIX"

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "Please select the installation file to run." "$TITLE installation"
    INSTALLER="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Download "$DOWNLOADURL"
    INSTALLER="$POL_System_TmpDir/$DOWNLOADEDSETUPFILE"
fi

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"

# Configuration
Set_OS "winxp"

#Dependencies
POL_Call POL_Install_gdiplus
POL_Call POL_Install_msxml6
POL_Call POL_Install_riched30
POL_Call POL_Install_wmp9
POL_Call POL_Install_mono28
POL_Call POL_Install_gecko

# Installation
Set_OS "$OSVERSION"

POL_SetupWindow_message "The installer for $TITLE will now appear.\nDo not allow the installer to launch the game.\nUncheck the box to launch the game at the end of the installation.\n\nIf the game is launched from the installer, the apllication will not be installed and you have to start the process again.\n" "Uncheck the Launch Game checkbox!"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"
POL_Wine_WaitExit "$TITLE"

# Create Shortcuts
POL_Shortcut "$SHORTCUTFILENAME" "$TITLE"
POL_Shortcut_InsertBeforeWine "$TITLE" "LANG=ko_KR.EUC-KR"

# Cleanup
POL_System_TmpDelete

POL_SetupWindow_Close
exit

Edytowane przez TheBallOfAeolus

Dadu042 Sunday 17 November 2019 at 14:05
Dadu042
Moderator

Nice report.  If you add a way to use for other people than Korean too, I can add it to Supported software if you think this may be useful to other users.

TheBallOfAeolus Sunday 17 November 2019 at 14:33
TheBallOfAeolusAnonymous

The application has to be installed in English, but then you can change it to English or Korean.
For example, I currently have it installed in English, but I can write in English, Korean and Spanish (without the need of re-installing or modifying anything).

Because it is a Korean chat application, I have tried only the Hangul and English writing system (Spanish just because), but I guess other writing system should work without any issue.

I have modified the script and added mp10, riched20 and wmpcodecs, I was having issues with some notifications and by adding those, everything is fine.
I am not sure which one is the one that actually fixed it, but now everything is working :P

Personally I think it would be nice to have it added in the sopported software, I understand your view as well, but I think most of the users using this app will be Koreans or Korean related and with this script they would have the app installed and configured without any additional issues.

 

Here latest script:

#!/bin/bash
# Date : (2019-11-11 15-30)
# Last revision : (2019-11-16 21-44)
# Distribution used to test : Ubuntu 18.04 bionic
# Author : TheBallOfAeolus
# Licence : GPLv3
# PlayOnLinux: 4.3.4

[ "$PLAYONLINUX" = "" ] && exit 0
source "$PLAYONLINUX/lib/sources"

PREFIX="KakaoTalk"
WINEVERSION="4.19"
TITLE="Kakao Talk"
EDITOR="Kakao Corp."
GAME_URL="https://www.kakaocorp.com/"
AUTHOR="TheBallOfAeolus"
DOWNLOADURL="http://app.pc.kakao.com/talk/win32/KakaoTalk_Setup.exe"
OSVERSION="win2008"
SHORTCUTFILENAME="KakaoTalk.exe"
DOWNLOADEDSETUPFILE="KakaoTalk_Setup.exe"

# Initialization
POL_SetupWindow_Init

POL_Debug_Init

# Presentation
POL_SetupWindow_presentation "$TITLE" "$EDITOR" "$GAME_URL" "$AUTHOR" "$PREFIX"

# Create Prefix
POL_System_TmpCreate "$PREFIX"

POL_SetupWindow_InstallMethod "LOCAL,DOWNLOAD"
if [ "$INSTALL_METHOD" = "LOCAL" ]
then
    POL_SetupWindow_browse "Please select the installation file to run." "$TITLE installation"
    INSTALLER="$APP_ANSWER"
elif [ "$INSTALL_METHOD" = "DOWNLOAD" ]
then
    cd "$POL_System_TmpDir"
    POL_Download "$DOWNLOADURL"
    INSTALLER="$POL_System_TmpDir/$DOWNLOADEDSETUPFILE"
fi

POL_Wine_SelectPrefix "$PREFIX"
POL_Wine_PrefixCreate "$WINEVERSION"

# Configuration
Set_OS "winxp"

#Dependencies
POL_Call POL_Install_gdiplus
POL_Call POL_Install_msxml6
POL_Call POL_Install_riched20
POL_Call POL_Install_riched30
POL_Call POL_Install_wmp9
POL_Call POL_install_wmp10
POL_Call POL_install_wmpcodecs
POL_Call POL_Install_mono28
POL_Call POL_Install_gecko


# Installation
Set_OS "$OSVERSION"

POL_SetupWindow_message "The installer for $TITLE will now appear.\nDo not allow the installer to launch the game.\nUncheck the box to launch the game at the end of the installation.\n\nIf the game is launched from the installer, the apllication will not be installed and you have to start the process again.\n" "Uncheck the Launch Game checkbox!"
POL_SetupWindow_wait "Installation in progress." "$TITLE installation"
POL_Wine_WaitBefore "$TITLE"
POL_Wine "$INSTALLER"
POL_Wine_WaitExit "$TITLE"

# Create Shortcuts
POL_Shortcut "$SHORTCUTFILENAME" "$TITLE"
POL_Shortcut_InsertBeforeWine "$TITLE" "LANG=ko_KR.EUC-KR"

# Cleanup
POL_System_TmpDelete

POL_SetupWindow_Close
exit