此脚本用于在新World中快速安装某些需要的包以及配置中文字体。
"------------------------- 字体配置 ----------------------------"
| font codeFont |
font := LogicalFont familyName: 'Noto Sans CJK SC' pointSize: 10.
codeFont := LogicalFont familyName: 'WenQuanYi Zen Hei Mono' pointSize: 11.
StandardFonts listFont: font.
StandardFonts menuFont: font.
StandardFonts codeFont: codeFont.
StandardFonts buttonFont: font.
StandardFonts defaultFont: font.
StandardFonts windowTitleFont: font.
FreeTypeFontProvider current updateFromSystem.
"刷新菜单栏字体"
MenubarMorph showMenubar: false.
MenubarMorph showMenubar: true.
"----------------------------------------------------"
"访问github需要配置代理"
OSPlatform current environment at: 'http_proxy' put: 'http://127.0.0.1:10809'.
OSPlatform current environment at: 'https_proxy' put: 'http://127.0.0.1:10809'.
"----------------------------------------------------"
"安装 Teapot"
Metacello new
baseline: 'Teapot';
repository: 'github://zeroflag/Teapot/source';
load.
"----------------------------------------------------"
"安装 Voyage"
Metacello new
repository: 'github://pharo-nosql/voyage/mc';
baseline: 'Voyage';
load: #('mongo tests' 'memory tests').
"----------------------------------------------------"
"安装 NeoJSON"
Metacello new
repository: 'github://svenvc/NeoJSON/repository';
baseline: 'NeoJSON';
load.
"----------------------------------------------------"
"安装 Seaside"
Metacello new
baseline:'Seaside3';
repository: 'github://SeasideSt/Seaside:master/repository';
load.
"Magritte 当前版本与 Seaside 冲突,无法同时安装"
Metacello new
baseline: 'Magritte';
repository: 'github://magritte-metamodel/Magritte';
load
"安装 Seaside-bootstrap,这是相当老的版本,运行书本上的老代码需要这个"
Metacello new
configuration:'Bootstrap';
repository: 'github://astares/Seaside-Bootstrap:master/src';
version: #stable;
load.
"Seaside-bootstrap5"
Metacello new
baseline:'Bootstrap5';
repository: 'github://astares/Seaside-Bootstrap5:master/src';
load.
"Seaside-bootstrap4"
Metacello new
baseline:'Bootstrap4';
repository: 'github://astares/Seaside-Bootstrap4:master/src';
load.
"----------------------------------------------------"
"Pharo-SQLite3"
Metacello new
repository: 'github://pharo-rdbms/Pharo-SQLite3/src';
baseline: 'SQLite3';
load
"GLORP"
Metacello new
repository: 'github://pharo-rdbms/glorp';
baseline: 'Glorp';
load.
"ReStore"
Metacello new
repository: 'github://rko281/ReStoreForPharo:main';
baseline: 'ReStore';
load: 'all'
"ReStore for Pharo 11"
Metacello new
repository: 'github://rko281/ReStoreForPharo:pharo11';
baseline: 'ReStore';
load: 'all'
评论