Last active
December 25, 2022 10:22
-
-
Save KateLin-BASIC/3d5322e9dd86e71bbe5546726ec0a4d9 to your computer and use it in GitHub Desktop.
Pharo 개발 환경의 빠른 구성을 위해 작성된 작은 스크립트입니다.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" | |
" _____ _ ____ _ _ _____ _ _ " | |
" | __ \ | | / __ \ (_) | | / ____| | | | | " | |
" | |__) || |__ __ _ _ __ ___ | | | | _ _ _ ___ | | __| (___ ___ | |_ _ _ _ __ ___ | |_ " | |
" | ___/ | '_ \ / _` || '__|/ _ \ | | | || | | || | / __|| |/ / \___ \ / _ \| __|| | | || '_ \ / __|| __|" | |
" | | | | | || (_| || | | (_) || |__| || |_| || || (__ | < ____) || __/| |_ | |_| || |_) |_ \__ \| |_ " | |
" |_| |_| |_| \__,_||_| \___/ \___\_\ \__,_||_| \___||_|\_\|_____/ \___| \__| \__,_|| .__/(_)|___/ \__|" | |
" | | " | |
" |_| V 0.5 " | |
"''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''" | |
"본 스크립트를 정상적으로 실행하시려면 Pharo Launcher를 관리자 권한으로 실행해야 합니다." | |
| notoSans d2Coding fileContent | | |
"기본 설정 변경" | |
UITheme currentSettings | |
fadedBackgroundWindows: true; | |
fastDragging: true. | |
TaskbarMorph showTaskbar: true. | |
FreeTypeSettings updateFontsAtImageStartup: true. | |
"TaskIt 설치" | |
Metacello new | |
baseline: 'TaskIt'; | |
repository: 'github://pharo-contributions/taskit:v1.2.0'; | |
load. | |
"시스템에 폰트 설치하고 등록 (윈도우 전용)" | |
(Smalltalk os isWindows) ifTrue: [ | |
Metacello new | |
baseline: 'OSWinSubprocess'; | |
repository: 'github://pharo-contributions/OSWinSubprocess:master/repository'; | |
load. | |
OSWSWinProcess new | |
shellCommand: 'powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine ; Install-Module -Name PSWinGlue'; | |
runAndWait. | |
notoSans := 'NotoSans.otf' asFileReference. | |
d2Coding := 'D2Coding.ttf' asFileReference. | |
fileContent := ZnClient new | |
url: 'https://github.com/googlefonts/noto-cjk/raw/main/Sans/OTF/Korean/NotoSansCJKkr-Regular.otf'; | |
get. | |
notoSans ensureCreateFile. | |
notoSans binaryWriteStreamDo: [ :stream | stream nextPutAll: fileContent ]. | |
fileContent := ZnClient new | |
url: 'https://github.com/KateLin-BASIC/Others/raw/main/D2Coding/D2Coding-Ver1.3.2-20180524.ttf'; | |
get. | |
d2Coding ensureCreateFile. | |
d2Coding binaryWriteStreamDo: [ :stream | stream nextPutAll: fileContent ]. | |
OSWSWinProcess new | |
creationFlags: OSWSWinProcess CREATE_NO_WINDOW; | |
shellCommand: 'powershell Install-Font ', '''' , ((notoSans absolutePath pathString) readStream skip: 1) upToEnd , ''''; | |
runAndWait. | |
OSWSWinProcess new | |
creationFlags: OSWSWinProcess CREATE_NO_WINDOW; | |
shellCommand: 'powershell Install-Font ', '''' , ((d2Coding absolutePath pathString) readStream skip: 1) upToEnd , ''''; | |
runAndWait. | |
notoSans delete. | |
d2Coding delete. | |
]. | |
"폰트 불러오기" | |
FreeTypeSettings updateFreeType. | |
"기본 폰트 재설정" | |
StandardFonts | |
defaultFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 9); | |
codeFont: (LogicalFont familyName: 'D2Coding' pointSize: 11); | |
listFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 9); | |
menuFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 9); | |
buttonFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 9); | |
windowTitleFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 10); | |
balloonFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 8); | |
haloFont: (LogicalFont familyName: 'Noto Sans KR' pointSize: 8). | |
RubAbstractTextArea lineNumbersFont: (LogicalFont familyName: 'D2Coding' pointSize: 11). | |
"WorldMenu 비활성화" | |
PasteUpMorph shouldShowWorldMenu: false. | |
"이미지 정리" | |
5 timesRepeat: [ Smalltalk garbageCollect ]. | |
SmalltalkImage current cleanUp: true except: {} confirming: false. | |
MorphicUIManager inform: '설정이 완료되었습니다.'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment