/
MilkPack.lisp
94 lines (66 loc) · 3.1 KB
/
MilkPack.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
;; To compile, perform the following shell script (on this directory, with the
;; iRTM.lisp and the iRTM.nib files):
;;
;; ./:$ open MilkPack.lisp -a /Applications/ccl/Clozure\ CL64.app
;;
;; press Shift-Apple-E to evaluate the entire file. wait for the IDE to close.
;; Alternatively, run the makefile in this directory with GNU Make.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Package initialization
(require :cocoa)
;; load required frameworks:
;; this takes a bit to load... shame!
;; (eval-when (:compile-toplevel :load-toplevel :execute)
;; ;; (objc:load-framework "WebKit" :webkit)
;; ;; (objc:load-framework "Quartz" :quartz)
;; ;; (objc:load-framework "QuartzCore" :quartzcore)
;; )
(load #p"/Users/eemg/ccl-init.lisp")
;; Uncomment the following two lines to enable SLIME debugging (attent the port):
;; (asdf:operate 'asdf:load-op 'swank)
(asdf:operate 'asdf:load-op 'rtm-lisp-api)
(asdf:operate 'asdf:load-op 'cl-store)
(defpackage #:irtm
(:use :common-lisp #:rtm #:ccl))
(in-package #:irtm)
(defconstant PROJECT-NAME "MilkPack")
(defconstant PROJECT-SOURCE-PATH (concatenate 'string "~/Documents/projects/" PROJECT-NAME "/"))
(defvar RTM-API-KEY-PATH "~/rtm-api.lisp"
"Path to a lisp file that sets the api key and shared secret variables on the `RTM-LISP-API' package. The file must contain the following s-expressions (values are lisp strings):
(setf rtm:rtm-api-key \"xxxxxxxx-your-api-key-xxxxxxxxxx\")
(setf rtm:rtm-api-shared-secret \"xxx-your-shared-secret-xxx\")
")
(defun load-module (name)
"Loads a lisp file on this folder. `NAME' is converted to lowercase."
(load (format nil "~a~(~a~)" PROJECT-SOURCE-PATH name)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Utilities, both lisp and cocoa bridging:
(load-module "utils")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Model layer
(load-module "rtm")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Controller layer
(load-module "rtmcontroller.lisp")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Code to build the MilkPack application bundle in MacOS:
(setf (current-directory) PROJECT-SOURCE-PATH)
(require :build-application)
(ccl::build-application
:name PROJECT-NAME
:main-nib-name PROJECT-NAME
:copy-ide-resources nil
:altconsole nil ;; comment if you need debug
:nibfiles (list (concatenate 'string PROJECT-SOURCE-PATH "resources/Milkpack.nib")))
#|
Copyright 2009 Edgar Gonçalves
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
|#