aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/packager.lux
diff options
context:
space:
mode:
Diffstat (limited to 'new-luxc/source/luxc/lang/packager.lux')
-rw-r--r--new-luxc/source/luxc/lang/packager.lux18
1 files changed, 8 insertions, 10 deletions
diff --git a/new-luxc/source/luxc/lang/packager.lux b/new-luxc/source/luxc/lang/packager.lux
index 3f8cb36cb..f18055b18 100644
--- a/new-luxc/source/luxc/lang/packager.lux
+++ b/new-luxc/source/luxc/lang/packager.lux
@@ -12,7 +12,7 @@
[target
[jvm
[encoding
- ["." name]]]]
+ ["." name (#+ External)]]]]
[tool
[compiler
[phase
@@ -71,16 +71,14 @@
(def: manifest-version "1.0")
(def: class-name
- (-> Module Text)
+ (-> Text Text)
(text.suffix ".class"))
-(def: main "_")
-
-(def: (manifest module)
- (-> Module java/util/jar/Manifest)
+(def: (manifest program-class)
+ (-> External java/util/jar/Manifest)
(let [manifest (java/util/jar/Manifest::new)]
(exec (do-to (java/util/jar/Manifest::getMainAttributes manifest)
- (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MAIN_CLASS) ..main)
+ (java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MAIN_CLASS) program-class)
(java/util/jar/Attributes::put (java/util/jar/Attributes$Name::MANIFEST_VERSION) ..manifest-version))
manifest)))
@@ -99,10 +97,10 @@
row.to-list
(list@fold ..write-class sink)))
-(def: #export (package module outputs)
- (-> Module (Output Definition) Binary)
+(def: #export (package program-class outputs)
+ (-> External (Output Definition) Binary)
(let [buffer (java/io/ByteArrayOutputStream::new (.int mega-byte))
- sink (java/util/jar/JarOutputStream::new buffer (manifest module))]
+ sink (java/util/jar/JarOutputStream::new buffer (manifest program-class))]
(exec (|> outputs
row.to-list
(list@fold ..write-module sink))