set appsig fr omimetype m remark in file
This commit is contained in:
@@ -60,6 +60,7 @@ Output_file$ = peek$("argument")
|
||||
Input_file$ = peek$("argument")
|
||||
appsig$ = peek$("argument")
|
||||
run_from_ide$ = peek$("argument")
|
||||
if appsig$="" appsig$=getappsig$(Input_file$)
|
||||
if appsig$="" appsig$="application/x-vnd.yab-app"
|
||||
SetAppSig(appsig$)
|
||||
|
||||
@@ -367,6 +368,34 @@ sub SetAppSig(sig$)
|
||||
|
||||
end sub
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
// set the application signature to match the mimetype declared in the file.
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
sub getappsig$(infil$)
|
||||
local x,a$,i,ii
|
||||
open #22,infil$,"r"
|
||||
for i=1 to 2
|
||||
line input #22 a$
|
||||
a$=lower$(a$)
|
||||
ii = instr(a$,"mimetype")
|
||||
if ii<>0 then
|
||||
a$=right$(a$,len(a$) - (ii+8))
|
||||
a$=trim$(a$)
|
||||
a$=right$(a$,len(a$)-1)
|
||||
a$=left$(a$,len(a$)-1)
|
||||
close #22
|
||||
return a$
|
||||
endif
|
||||
next
|
||||
close #22
|
||||
return ""
|
||||
|
||||
|
||||
end sub
|
||||
|
||||
|
||||
////////////////////////////////////////
|
||||
////////////////////////////////////////
|
||||
// the BuildFactory starts here
|
||||
|
||||
@@ -21,18 +21,3 @@ resource vector_icon {
|
||||
};
|
||||
|
||||
|
||||
resource app_signature "application/x-vnd.yab-app";
|
||||
|
||||
resource app_version {
|
||||
major = 1,
|
||||
middle = 7,
|
||||
minor = 5,
|
||||
|
||||
variety = B_APPV_FINAL,
|
||||
internal = 2,
|
||||
|
||||
short_info = "Yab BASIC programming language",
|
||||
long_info = "Yab allows fast prototyping with simple and clean code. yab contains a large number of BeAPI specific commands for GUI creation and much, much more."
|
||||
};
|
||||
|
||||
resource app_flags 1;
|
||||
|
||||
@@ -2248,7 +2248,8 @@ sub Building()
|
||||
isEmpty = false
|
||||
|
||||
textcontrol 10,50 to 380,70, "BuildPath", "Target file name:", binName$, "BuildWindow"
|
||||
AppSig$="application/x-vnd.yab-app"
|
||||
AppSig$ = getappsig$(globalAllNames$(globalCurrentText))
|
||||
if AppSig$="" AppSig$="application/x-vnd.yab-app"
|
||||
textcontrol 10,80 to 380,100, "AppSig", "Application Signature:", AppSig$, "BuildWindow"
|
||||
//button 390,50 to 490,70, "BuildBrowse", "Browse", "BuildWindow"
|
||||
|
||||
@@ -3926,4 +3927,26 @@ if x>0 then
|
||||
|
||||
endif
|
||||
|
||||
end sub
|
||||
|
||||
sub getappsig$(infil$)
|
||||
local x,a$,i,ii
|
||||
open #122,infil$,"r"
|
||||
for i=1 to 2
|
||||
line input #122 a$
|
||||
a$=lower$(a$)
|
||||
ii = instr(a$,"mimetype")
|
||||
if ii<>0 then
|
||||
a$=right$(a$,len(a$) - (ii+8))
|
||||
a$=trim$(a$)
|
||||
a$=right$(a$,len(a$)-1)
|
||||
a$=left$(a$,len(a$)-1)
|
||||
close #122
|
||||
return a$
|
||||
endif
|
||||
next
|
||||
close #122
|
||||
return ""
|
||||
|
||||
|
||||
end sub
|
||||
|
||||
Reference in New Issue
Block a user