summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean@guyomarch.bzh>2016-10-31 20:45:59 +0100
committerJean Guyomarc'h <jean@guyomarch.bzh>2016-10-31 20:48:35 +0100
commit0e38cabb8fadc7030a2c6b28f4391a81a4e7f732 (patch)
tree91f540d0c6c684226cd56e8c260f6fa3b7c89236
parenteeb2251048807bf2ae91080b4ca16fcaeb30b7a2 (diff)
packager: various fixes and new parametersHEADmaster
- query efl library instead of eina to get version - parameter: bundle identifier - parameter: minimal macOS version - parameter: copyright - change variables in $() instead of @@
-rw-r--r--config/elementary_test.config.py2
-rw-r--r--config/enventor.config.py2
-rw-r--r--config/terminology.config.py2
-rwxr-xr-xosx-packager21
4 files changed, 16 insertions, 11 deletions
diff --git a/config/elementary_test.config.py b/config/elementary_test.config.py
index bb15848..0297d5f 100644
--- a/config/elementary_test.config.py
+++ b/config/elementary_test.config.py
@@ -22,4 +22,4 @@ MODULE_LIST=[
22 "fontconfig", 22 "fontconfig",
23] 23]
24 24
25ICON_PATH="@PREFIX@/share/icons/elementary.png" 25ICON_PATH="$(PREFIX)/share/icons/elementary.png"
diff --git a/config/enventor.config.py b/config/enventor.config.py
index 0737d9f..80e67ae 100644
--- a/config/enventor.config.py
+++ b/config/enventor.config.py
@@ -24,4 +24,4 @@ MODULE_LIST=[
24 "fontconfig" 24 "fontconfig"
25] 25]
26 26
27ICON_PATH="@PREFIX@/share/icons/enventor.png" 27ICON_PATH="$(PREFIX)/share/icons/enventor.png"
diff --git a/config/terminology.config.py b/config/terminology.config.py
index f82ebc7..06676c1 100644
--- a/config/terminology.config.py
+++ b/config/terminology.config.py
@@ -23,4 +23,4 @@ MODULE_LIST=[
23 "fonts", 23 "fonts",
24 "fontconfig" 24 "fontconfig"
25] 25]
26ICON_PATH="@PREFIX@/share/icons/terminology.png" 26ICON_PATH="$(PREFIX)/share/icons/terminology.png"
diff --git a/osx-packager b/osx-packager
index 1127bb9..48781db 100755
--- a/osx-packager
+++ b/osx-packager
@@ -1,7 +1,8 @@
1#! /usr/bin/env python 1#! /usr/bin/env python2
2# -*- coding: utf-8 -*- 2# -*- coding: utf-8 -*-
3# 3#
4# Copyright (C) 2016 Pierre Lamot 4# Copyright (C) 2016 Pierre Lamot
5# Copyright (C) 2016 Jean Guyomarc'h
5# All rights reserved. 6# All rights reserved.
6# 7#
7# This software may be modified and distributed under the terms 8# This software may be modified and distributed under the terms
@@ -29,7 +30,7 @@ def prefix_get(prog):
29 return prefix 30 return prefix
30 31
31def efl_version_get(): 32def efl_version_get():
32 return subprocess.check_output(["pkg-config", "--modversion", "eina"]).strip() 33 return subprocess.check_output(["pkg-config", "--modversion", "efl"]).strip()
33 34
34def config_prefix_get(config): 35def config_prefix_get(config):
35 return prefix_get(config["EXEC_NAME"]) 36 return prefix_get(config["EXEC_NAME"])
@@ -40,9 +41,12 @@ def setDefaultOptions(config):
40 return 41 return
41 config[name] = value 42 config[name] = value
42 43
43 setDefaultOpt(config, "BASE_NAME", "Elementary_test") 44 setDefaultOpt(config, "BASE_NAME", "APP")
44 setDefaultOpt(config, "APP_NAME", "{BASE_NAME}.app".format(**config)) 45 setDefaultOpt(config, "APP_NAME", "{BASE_NAME}.app".format(**config))
45 setDefaultOpt(config, "EXEC_NAME", "elementary_test") 46 setDefaultOpt(config, "EXEC_NAME", "elementary_test")
47 setDefaultOpt(config, "COPYRIGHT", "Copyright (c) <year> <holders>")
48 setDefaultOpt(config, "MACOS_MINIMUM_VERSION", "1.10")
49 setDefaultOpt(config, "BUNDLE_IDENTIFIER", "com.xxx.yyy")
46 setDefaultOpt(config, "MACOS_PATH", pjoin(config["APP_NAME"], "Contents/MacOS")) 50 setDefaultOpt(config, "MACOS_PATH", pjoin(config["APP_NAME"], "Contents/MacOS"))
47 setDefaultOpt(config, "BIN_PATH", pjoin(config["APP_NAME"], "Contents/bin")) 51 setDefaultOpt(config, "BIN_PATH", pjoin(config["APP_NAME"], "Contents/bin"))
48 setDefaultOpt(config, "LIB_PATH", pjoin(config["APP_NAME"], "Contents/lib")) 52 setDefaultOpt(config, "LIB_PATH", pjoin(config["APP_NAME"], "Contents/lib"))
@@ -69,8 +73,8 @@ def setDefaultOptions(config):
69 "ecore", 73 "ecore",
70 "ecore_evas", 74 "ecore_evas",
71 "ecore_imf", 75 "ecore_imf",
76 "ecore_cocoa",
72 "edje", 77 "edje",
73 "eeze",
74 "efreet", 78 "efreet",
75 "elementary", 79 "elementary",
76 "elua", 80 "elua",
@@ -99,7 +103,7 @@ def load_config_file(fname):
99 for k, v in conf.iteritems(): 103 for k, v in conf.iteritems():
100 # FIXME - pretty bad, but will do... 104 # FIXME - pretty bad, but will do...
101 if type(v) is str: 105 if type(v) is str:
102 conf[k] = v.replace("@PREFIX@", prefix) 106 conf[k] = v.replace("$(PREFIX)", prefix)
103 107
104 return conf 108 return conf
105 109
@@ -138,6 +142,7 @@ def fix_lib(path, fixedlib, config):
138 continue 142 continue
139 old_dep = dep 143 old_dep = dep
140 if dep.startswith("@rpath/"): 144 if dep.startswith("@rpath/"):
145 # FIXME
141 dep = dep.replace("@rpath", "/usr/local/lib") 146 dep = dep.replace("@rpath", "/usr/local/lib")
142 basename_dep = os.path.basename(dep) 147 basename_dep = os.path.basename(dep)
143 148
@@ -232,7 +237,7 @@ def generate_info_plist(config):
232 <key>CFBundleExecutable</key> 237 <key>CFBundleExecutable</key>
233 <string>{EXEC_NAME}_launcher.sh</string> 238 <string>{EXEC_NAME}_launcher.sh</string>
234 <key>CFBundleIdentifier</key> 239 <key>CFBundleIdentifier</key>
235 <string>org.efl.elementary_test</string> 240 <string>{BUNDLE_IDENTIFIER}</string>
236 <key>CFBundleInfoDictionaryVersion</key> 241 <key>CFBundleInfoDictionaryVersion</key>
237 <string>6.0</string> 242 <string>6.0</string>
238 <key>CFBundlePackageType</key> 243 <key>CFBundlePackageType</key>
@@ -244,9 +249,9 @@ def generate_info_plist(config):
244 <key>CFBundleVersion</key> 249 <key>CFBundleVersion</key>
245 <string>{VERSION}</string> 250 <string>{VERSION}</string>
246 <key>NSHumanReadableCopyright</key> 251 <key>NSHumanReadableCopyright</key>
247 <string>Copyright 2015 EFL Developers, GNU Lesser General Public License.</string> 252 <string>{COPYRIGHT}</string>
248 <key>LSMinimumSystemVersion</key> 253 <key>LSMinimumSystemVersion</key>
249 <string>10.9</string> 254 <string>{MACOS_MINIMUM_VERSION}</string>
250 {extra} 255 {extra}
251</dict> 256</dict>
252</plist> 257</plist>