-
Notifications
You must be signed in to change notification settings - Fork 1
/
php.hxml
143 lines (110 loc) · 6.35 KB
/
php.hxml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#integrate files to classpath
-cp src
# Site Component
-main Main
--php-front joomlahaxe.php
-php bin/com_joomlahaxe/site
-debug
--next
# Add the Site View
-cp src
# This class name needs to reflect the folder structure of the Joomla view. Joomlahaxe(component name) + View + Joomlahaxe(folder name of this view)
# Joomla will
-main JoomlahaxeViewJoomlahaxe
--php-front view.html.php
--php-lib ../../lib
-php bin/com_joomlahaxe/site/views/joomlahaxe
--next
# Add the Site Model
-cp src
# This class name needs to reflect the folder structure of the Joomla model. Joomlahaxe(component name) + Model + Joomlahaxe(folder name of this view)
-main JoomlahaxeModelJoomlahaxe
--php-front joomlahaxe.php
--php-lib ../lib
-php bin/com_joomlahaxe/site/models
--next
# Add the admin controls. Code must be in admin folder to avoid conflicts when generating duplicate externs
-cp src/admin
-main MainAdmin
--php-front joomlahaxe.php
-php bin/com_joomlahaxe/admin
--next
# Add the 1st Admin View
-cp src/admin
# This class name needs to reflect the folder structure of the Joomla view. Joomlahaxe(component name) + View + Joomlahaxes(folder name of this view)
# Joomla will
-main JoomlahaxeViewJoomlahaxes
--php-front view.html.php
--php-lib ../../lib
-php bin/com_joomlahaxe/admin/views/joomlahaxes
--next
# Add the 2nd Admin View
-cp src/admin
# This class name needs to reflect the folder structure of the Joomla view. Joomlahaxe(component name) + View + Joomlahaxe(folder name of this view)
# Joomla will
-main JoomlahaxeViewJoomlahaxe
--php-front view.html.php
--php-lib ../../lib
-php bin/com_joomlahaxe/admin/views/joomlahaxe
--next
# Add the 1st Admin Model
-cp src/admin
# This class name needs to reflect the folder structure of the Joomla model. Joomlahaxe(component name) + Model + Joomlahaxes(folder name of this view)
-main JoomlahaxeModelJoomlahaxes
--php-front joomlahaxes.php
--php-lib ../lib
-php bin/com_joomlahaxe/admin/models
--next
# Add the 2nd Admin Model
-cp src/admin
# This class name needs to reflect the folder structure of the Joomla model. Joomlahaxe(component name) + Model + Joomlahaxe(folder name of this view)
-main JoomlahaxeModelJoomlahaxe
--php-front joomlahaxe.php
--php-lib ../lib
-php bin/com_joomlahaxe/admin/models
--next
# Add the Admin Top Controller
-cp src/admin
-main JoomlahaxeController
--php-front controller.php
-php bin/com_joomlahaxe/admin
--next
# Add the Admin Sub Controller 1
-cp src/admin
-main JoomlahaxeControllerJoomlahaxes
--php-front joomlahaxes.php
--php-lib ../lib
-php bin/com_joomlahaxe/admin/controllers
--next
# Add the Admin Sub Controller 2
-cp src/admin
-main JoomlahaxeControllerJoomlahaxe
--php-front joomlahaxe.php
--php-lib ../lib
-php bin/com_joomlahaxe/admin/controllers
#Add debug information
-debug
#-dce full -- can't use this because Haxe can't detect some functions which the Joomla framework will call
#TODO: make it use ant to package: https://docs.joomla.org/Building_Joomla_Extensions_with_Apache_Ant
#search/replace code in site folder:
-cmd (perl -pi -e 's/JoomlahaxeViewJoomlahaxe::main\(\);/require_once dirname\(__FILE__\)\."\/..\/..\/lib\/JoomlahaxeViewJoomlahaxe.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/site/views/joomlahaxe/view.html.php)
-cmd (perl -pi -e 's/JoomlahaxeModelJoomlahaxe::main\(\);/require_once dirname\(__FILE__\)\."\/..\/lib\/JoomlahaxeModelJoomlahaxe.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/site/models/joomlahaxe.php)
#search/replace code in admin folder:
-cmd (perl -pi -e 's/JoomlahaxeViewJoomlahaxes::main\(\);/require_once dirname\(__FILE__\)\."\/..\/..\/lib\/JoomlahaxeViewJoomlahaxes.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/views/joomlahaxes/view.html.php)
-cmd (perl -pi -e 's/JoomlahaxeViewJoomlahaxe::main\(\);/require_once dirname\(__FILE__\)\."\/..\/..\/lib\/JoomlahaxeViewJoomlahaxe.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/views/joomlahaxe/view.html.php)
-cmd (perl -pi -e 's/JoomlahaxeModelJoomlahaxes::main\(\);/require_once dirname\(__FILE__\)\."\/..\/lib\/JoomlahaxeModelJoomlahaxes.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/models/joomlahaxes.php)
-cmd (perl -pi -e 's/JoomlahaxeModelJoomlahaxe::main\(\);/require_once dirname\(__FILE__\)\."\/..\/lib\/JoomlahaxeModelJoomlahaxe.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/models/joomlahaxe.php)
-cmd (perl -pi -e 's/JoomlahaxeController::main\(\);/require_once dirname\(__FILE__\)\."\/lib\/JoomlahaxeController.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/controller.php)
-cmd (perl -pi -e 's/JoomlahaxeControllerJoomlahaxes::main\(\);/require_once dirname\(__FILE__\)\."\/..\/lib\/JoomlahaxeControllerJoomlahaxes.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/controllers/joomlahaxes.php)
-cmd (perl -pi -e 's/JoomlahaxeControllerJoomlahaxe::main\(\);/require_once dirname\(__FILE__\)\."\/..\/lib\/JoomlahaxeControllerJoomlahaxe.class.php";/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/controllers/joomlahaxe.php)
-cmd (perl -pi -e 's/(MainAdmin)/require_once dirname\(__FILE__\)."\/lib\/MainAdmin.class.php";\r\1/g' /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/joomlahaxe.php)
#remove .DS_Store files on Mac computers
-cmd (find . -name '.DS_Store' -print0 | xargs -t0 rm)
#TODO: automate creation of empty index.html files in every directory
#Optional: auto-copy the compiled component to the local dev site.
-cmd (cp -r /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/site/* /Applications/MAMPold/htdocs_artworks/components/com_joomlahaxe/)
-cmd (cp -r /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/* /Applications/MAMPold/htdocs_artworks/administrator/components/com_joomlahaxe/)
-cmd (cp -r /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/site/language/en-GB/* /Applications/MAMPold/htdocs_artworks/language/en-GB/)
-cmd (cp -r /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/com_joomlahaxe/admin/language/en-GB/* /Applications/MAMPold/htdocs_artworks/administrator/language/en-GB/)
#Optional: make a zip file which can be used with Joomla's installer
-cmd (cd /Users/allan/Documents/haXe/JoomlaHaxeTest/bin/ && zip -r com_joomlahaxe.zip com_joomlahaxe)