summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-06-04 23:40:26 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-06-04 23:40:26 +0900
commita1922ccc08db7968ce4444a27649e68804d4880c (patch)
tree2cc8728c624c06dab1bc515805ddc6f3b0545544
Init
-rw-r--r--.SRCINFO27
-rw-r--r--.gitignore17
-rw-r--r--LICENSE24
-rw-r--r--PKGBUILD66
-rw-r--r--README.md122
-rwxr-xr-xinstall.sh33
-rwxr-xr-xkakaotalk117
-rw-r--r--kakaotalk.desktop16
-rw-r--r--kakaotalk.pngbin0 -> 6432 bytes
9 files changed, 422 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 0000000..19b3011
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = kakaotalk
+ pkgdesc = A mobile messaging app for smartphones operated by Kakao Corporation in South Korea
+ pkgver = 0.1.0
+ pkgrel = 3
+ url = https://www.kakaocorp.com/page/service/service/KakaoTalk
+ arch = i686
+ arch = x86_64
+ license = custom:kakaotalk
+ license = unlicense
+ depends = bash
+ depends = curl
+ depends = desktop-file-utils
+ depends = lib32-gst-plugins-good
+ depends = wine
+ depends = xdg-utils
+ source = https://www.kakao.com/ko/terms.html
+ source = LICENSE
+ source = kakaotalk
+ source = kakaotalk.desktop
+ source = kakaotalk.png
+ sha256sums = SKIP
+ sha256sums = 6b0382b16279f26ff69014300541967a356a666eb0b91b422f6862f6b7dad17e
+ sha256sums = 2cec5a7c686f903f7312d608a01f4454135f9b936a4d9bb49d781128682dad5b
+ sha256sums = 5a62e97dc447a0740d92327264c538857f371f29aa8c1adbadafe6a38f835005
+ sha256sums = bc6102b626e970adb084f8eb84cebef02ee189ea4e84857b6535b9c524c2872c
+
+pkgname = kakaotalk
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..0349bce
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,17 @@
+*.tar
+*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+terms.html
+
+pkg/
+src/
+
+.vscode/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..fdddb29
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <https://unlicense.org>
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..280b45f
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,66 @@
+# Maintainer : Ho Kim <ho.kim@smartx.kr>
+
+pkgname='kakaotalk'
+pkgver=0.1.0
+pkgrel=3
+pkgdesc='A mobile messaging app for smartphones operated by Kakao Corporation in South Korea'
+arch=(
+ 'i686'
+ 'x86_64'
+)
+source=(
+ 'https://www.kakao.com/ko/terms.html'
+ 'LICENSE'
+ 'kakaotalk'
+ 'kakaotalk.desktop'
+ 'kakaotalk.png'
+)
+
+url='https://www.kakaocorp.com/page/service/service/KakaoTalk'
+
+license=(
+ 'custom:kakaotalk'
+ 'unlicense'
+)
+
+depends=(
+ 'bash'
+ 'curl'
+ 'desktop-file-utils'
+ 'lib32-gst-plugins-good'
+ 'wine'
+ 'xdg-utils'
+)
+
+sha256sums=(
+ 'SKIP'
+ '6b0382b16279f26ff69014300541967a356a666eb0b91b422f6862f6b7dad17e'
+ '2cec5a7c686f903f7312d608a01f4454135f9b936a4d9bb49d781128682dad5b'
+ '5a62e97dc447a0740d92327264c538857f371f29aa8c1adbadafe6a38f835005'
+ 'bc6102b626e970adb084f8eb84cebef02ee189ea4e84857b6535b9c524c2872c'
+)
+
+update_desktop() {
+ xdg-icon-resource forceupdate --theme hicolor &>/dev/null
+ update-desktop-database -q
+}
+
+post_install() {
+ update_desktop
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ update_desktop
+}
+
+package() {
+ install -Dm755 -t "${pkgdir}/usr/bin" "${srcdir}/kakaotalk"
+ install -Dm644 -t "${pkgdir}/usr/share/applications" "${srcdir}/kakaotalk.desktop"
+ install -Dm644 -t "${pkgdir}/usr/share/icons/hicolor/256x256/apps" "${srcdir}/kakaotalk.png"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/kakaotalk" "${srcdir}/LICENSE"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/kakaotalk" "${srcdir}/terms.html"
+}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..69ffed7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,122 @@
+# KakaoTalk One-Shot Installer for Linux
+
+This is a simple [`KakaoTalk`](https://www.kakaocorp.com/page/service/service/KakaoTalk) installation script using [`wine`](https://www.winehq.org/).
+
+[`wine`](https://www.winehq.org/)을 활용한 간단한 [카카오톡](https://www.kakaocorp.com/page/service/service/KakaoTalk) 설치 스크립트입니다.
+
+## Quick Start (빠른 설치법)
+
+### Arch Linux (아치리눅스)
+
+```bash
+# If you prefer `paru`
+paru -S --needed kakaotalk && kakaotalk
+
+# If you prefer `yay`
+yay -S --needed kakaotalk && kakaotalk
+```
+
+## Dependencies (준비물 패키지)
+
+- bash
+- curl
+- desktop-file-utils
+- wine > 8.0
+- xdg-utils
+
+### Arch Linux (아치리눅스)
+
+```bash
+sudo pacman -S bash curl desktop-file-utils wine xdg-utils
+```
+
+### Debian / Ubuntu (데비안 / 우분투)
+
+```bash
+sudo apt-get update
+sudo apt-get install bash curl desktop-file-utils wine xdg-utils
+```
+
+## Installation (설치하기)
+
+### Arch Linux (아치리눅스)
+
+#### Enable `multilib` repository
+
+Open `/etc/pacman.conf` as sudo, and uncomment `[multilib]` section to enable it.
+
+NOTE: This step would not be needed when new WoW64 mode is enabled by default. (Checked on: Jan 19, 2024)
+
+#### Automatic Installation with AUR package manager (AUR 패키지 관리자를 활용한 설치)
+
+```bash
+# If you prefer `paru`
+paru -S kakaotalk
+
+# If you prefer `yay`
+yay -S kakaotalk
+```
+
+#### Manual Installation (수동 설치)
+
+```bash
+makepkg -scri
+```
+
+### Other Distros (우분투 등 일반적인 리눅스 배포판)
+
+#### System-wide Installation (모든 사용자용으로 설치)
+
+```bash
+sudo ./install.sh
+```
+
+#### User-wide Installation (현재 사용자용으로 설치)
+
+```bash
+. ./install.sh
+```
+
+## Opening KakaoTalk (카카오톡 열기)
+
+You can init and open KakaoTalk by choosing **one of the methods below**.
+After initialization, a shortcut icon will appear on the desktop so you can open it more conveniently.
+
+**아래의 방법 중 하나를 수행**하여 카카오톡을 초기화 및 실행할 수 있습니다.
+초기화 후에는 바탕화면에 바로가기 아이콘이 생기므로 더욱 편리하게 실행할 수 있습니다.
+
+### CLI (명령줄 인터페이스를 활용하기)
+
+```bash
+kakaotalk
+```
+
+### Xfce
+
+Application Finder -> Search KakaoTalk (카카오톡) -> Open
+
+## Uninstallation (삭제법)
+
+### KakaoTalk (카카오톡)
+
+The script below deletes the directory where wine KakaoTalk is installed.
+
+아래 스크립트는 wine 카카오톡이 설치된 디렉토리를 삭제합니다.
+
+```bash
+rm -r ~/.local/share/kakaotalk
+```
+
+### KakaoTalk Installer (카카오톡 설치 도우미)
+
+TODO: TBD
+
+추후 추가 예정
+
+## LICENSE
+
+`install.sh`, `kakaotalk` 등 레포지토리 내 스크립트에 라이선스를 명시한 파일의 경우 `The Unlicense` 라이선스가 적용됩니다.
+
+그 외의 **모든 파일**들은 해당 레포지토리에서 라이선스를 적용하지 않습니다.
+
+카카오톡 사용자 약관에 관해서는 다음 링크를 참고해주세요: https://www.kakao.com/ko/terms.html
diff --git a/install.sh b/install.sh
new file mode 100755
index 0000000..d1c902c
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,33 @@
+#!/bin/bash
+# Copyright (c) 2023 Ho Kim (ho.kim@ulagbulag.io). All rights reserved.
+# Use of this source code is governed by The Unlicense license that can be
+# found in the LICENSE file.
+
+# Prehibit errors
+set -e -o pipefail
+
+###########################################################
+# Installer #
+###########################################################
+
+function _install_local() {
+ # Configure
+ if [ "$(id -u)" = "0" ]; then
+ pkgdir='/usr/local'
+ else
+ pkgdir="${HOME}/.local"
+ fi
+ srcdir=$(pwd)
+
+ # Download terms
+ curl -s 'https://www.kakaocorp.com/page/service/service/KakaoTalk' -o 'terms.html'
+
+ # Local-install
+ install -Dm755 -t "${pkgdir}/bin" "${srcdir}/kakaotalk"
+ install -Dm644 -t "${pkgdir}/share/applications" "${srcdir}/kakaotalk.desktop"
+ install -Dm644 -t "${pkgdir}/share/icons/hicolor/256x256/apps" "${srcdir}/kakaotalk.png"
+ install -Dm644 -t "${pkgdir}/share/licenses/kakaotalk" "${srcdir}/terms.html"
+}
+
+# Execute main function
+_install_local "$@" || exit 1
diff --git a/kakaotalk b/kakaotalk
new file mode 100755
index 0000000..69e0020
--- /dev/null
+++ b/kakaotalk
@@ -0,0 +1,117 @@
+#!/bin/bash
+# Copyright (c) 2023 Ho Kim (ho.kim@ulagbulag.io). All rights reserved.
+# Use of this source code is governed by The Unlicense license that can be
+# found in the LICENSE file.
+
+# Prehibit errors
+set -e -o pipefail
+
+###########################################################
+# Install Checker #
+###########################################################
+
+function _check_wine() {
+ WINE_EXE="$1"
+
+ ls "${WINE_EXE}" >/dev/null 2>/dev/null
+}
+
+###########################################################
+# Installer #
+###########################################################
+
+function _install_wine() {
+ SRC_URL='https://app-pc.kakaocdn.net/talk/win32/KakaoTalk_Setup.exe'
+ DST_FILE="$(mktemp)"
+ WINE_EXE="$1"
+
+ # Mock home directory
+ HOME_ORIGIN="${HOME}"
+ HOME_PATCH="${WINEPREFIX}/tmp"
+ export HOME="${HOME_PATCH}"
+
+ echo 'Installing Kakaotalk...'
+ curl -s "${SRC_URL}" -o "${DST_FILE}"
+ wineboot
+ wine "${DST_FILE}" /S
+ rm "${DST_FILE}"
+
+ # Install Fonts
+ _font_install
+
+ # Remove tmp home directory
+ rm -rf "${HOME_PATCH}"
+
+ # Restore home directory
+ export HOME="${HOME_ORIGIN}"
+
+ # Create a desktop shortcut
+ if [ -d "${HOME}/Desktop/" ]; then
+ ICON_SRC='/usr/share/applications/kakaotalk.desktop'
+ ICON_DST="${HOME}/Desktop/kakaotalk.desktop"
+
+ if [ ! -f "${ICON_DST}" ]; then
+ mkdir -p "$(dirname "${ICON_DST}")"
+ cp "${ICON_SRC}" "${ICON_DST}"
+ chmod u+x "${ICON_DST}"
+
+ # Mark as trusted
+ if which gio >/dev/null 2>/dev/null; then
+ gio set -t string "${ICON_DST}" metadata::xfce-exe-checksum "$(sha256sum "${ICON_SRC}" | awk '{print $1}')"
+ fi
+ fi
+ fi
+}
+
+###########################################################
+# Font Installer #
+###########################################################
+
+function _font_install() {
+ FONT_URL='https://campaign-cdn.pstatic.net/0/hangeul/2022/zip_v2/nanum-all.zip'
+ DST_FONT="$(mktemp -d)"
+ FONT_DIR="${WINEPREFIX}/drive_c/windows/Fonts"
+
+ echo 'Installing Fonts...'
+ curl -s "${FONT_URL}" -o "${DST_FONT}/nanum-all.zip"
+ ! command -v unzip &> /dev/null && sudo pacman -Sy unzip
+ unzip "${DST_FONT}/nanum-all.zip" -d "${DST_FONT}"
+ find "${DST_FONT}" -type f -name "*.ttf" -exec mv -f {} "${FONT_DIR}" \;
+ rm -rf "${DST_FONT}"
+}
+
+###########################################################
+# Executor #
+###########################################################
+
+function _exec_wine() {
+ WINE_EXE="$1"
+
+ echo 'Executing Kakaotalk...'
+ exec wine "${WINE_EXE}"
+}
+
+###########################################################
+# Main Function #
+###########################################################
+
+# Define a main function
+function main() {
+ # Configure environment variables
+ export LANG='en_US.UTF-8'
+ export LC_ALL='en_US.UTF-8'
+ export WINEARCH='win64'
+ export WINEPREFIX="${HOME}/.local/share/kakaotalk"
+
+ # Install
+ WINE_EXE="${WINEPREFIX}/drive_c/Program Files (x86)/Kakao/KakaoTalk/KakaoTalk.exe"
+ if ! _check_wine "${WINE_EXE}"; then
+ _install_wine "${WINE_EXE}"
+ fi
+
+ # Exec
+ _exec_wine "${WINE_EXE}"
+}
+
+# Execute main function
+main "$@" || exit 1
diff --git a/kakaotalk.desktop b/kakaotalk.desktop
new file mode 100644
index 0000000..5233078
--- /dev/null
+++ b/kakaotalk.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Version=0.1
+Name=KakaoTalk
+Name[ko]=카카오톡
+Comment=Where people and the world come to get connected
+Comment[ko]=사람과 세상을 향한 모든 연결의 시작
+GenericName=Messenger
+GenericName[ko]=메신저
+Keywords=Internet;Messenger;
+Exec=/usr/bin/kakaotalk %u
+Icon=kakaotalk
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Network;InstantMessaging;
+StartupWMClass=kakaotalk.exe
diff --git a/kakaotalk.png b/kakaotalk.png
new file mode 100644
index 0000000..f1db798
--- /dev/null
+++ b/kakaotalk.png
Binary files differ