主程式(Core)

你可以把主程式看做是一個Thin Client。

Thin clinet 負責的任務為:

  1. 讀取腳本清單(Script List),設定腳本庫位置,取得腳本來源。
  2. 更新腳本庫裡的腳本版本。
  3. 顯示提供的腳本,執行使用者選擇的腳本進行安裝,或客製化。

如何開發主程式(Core)

為什麼我們用 Python 呢? 因為愛! 為什麼我們用 Git 呢? 因為愛!

取得源碼

user@host$ git clone git://github.com/hychen/lazyscript.git

準備開發環境

user@host$ make init_devenv

執行自我測試:

# 不顯示錯誤。
user@host$ make test

# 顯示錯誤
user@host$ make devtest

如何產生自解壓縮程式

選擇你要用的版本(tag)或分支(branch):

user@host$ ./devtools/build/build.sh
Please type version: v0.1rc2
sfx.c: In function ‘show_error’:
sfx.c:41: warning: format not a string literal and no format arguments

產生出來的檔案會被放在 devtools/build

user@host$ ls devtools/build/
build.sh  lazyscripts-v0.1rc2.tar.gz  sfx.c