Skip to content

Commit

Permalink
"GameMakerManualTranslatorBuild.exe build" 纯编译模式
Browse files Browse the repository at this point in the history
  • Loading branch information
yunzlp committed Mar 11, 2024
1 parent c619604 commit 612c438
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
11 changes: 10 additions & 1 deletion GameMakerManualTranslatorBuild-Project/main.aardio
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import win.ui;
import win.ui.menu;
/*DSG{{*/
Expand Down Expand Up @@ -41,6 +40,7 @@ if !io.exist(file){
log=function(...){
mainForm.log.log(...)
}

nlog=function(...){
mainForm.log.log(...,'\r\n')
}
Expand Down Expand Up @@ -148,5 +148,14 @@ mainForm.button4.oncommand = function(id,event){
log(" -> over! ","time:",time.tick()-t,"ms",'\r\n')
}


if _CMDLINE=="build"{
log_enabled=true
loadcodex("\res\build.aardio");
console.pause()
return 0
}


mainForm.show();
win.loopMessage();
10 changes: 5 additions & 5 deletions GameMakerManualTranslatorBuild-Project/res/build.aardio
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if setting.group{
importHtml+=//<script type="text/javascript" src="{path}
importHtml+=p
importHtml+=//"></script>
//console.log("import:",p)
console.log("import:",p)
}
},);

Expand All @@ -28,7 +28,7 @@ if setting.group{
importHtml+=//<link rel="stylesheet" href="{path}
importHtml+=p
importHtml+=//">
//console.log("import:",p)
console.log("import:",p)
}
},);

Expand Down Expand Up @@ -70,7 +70,7 @@ fsys.enum(path_manual,"*.htm",function(dirname,filename,fullpath,findData){
//加入
html=string.replace(html,"@<head>","<head>"+'\r\n'+tmp)

//console.log("patch:",p)
console.log("patch:",p)

//保存修改过的html
var path_out_htm=fsys.path.canonicalize(path_build+p+".htm")
Expand All @@ -84,13 +84,13 @@ fsys.copy(
fsys.path.canonicalize(path+"/patch/import")
,fsys.path.canonicalize(path+"/build/assets/import")
)
//console.log("copy:","!!!import!!!")
console.log("copy:","!!!import!!!")

//打上汉化组信息
content_html=string.load(path+"/build/Content.htm")
team_html=string.load(path+"/patch/team.htm")
h1="<h1"
html=string.replace(content_html,"@"+h1,team_html+h1,1)
string.save(path+"/build/Content.htm",html)
//console.log("team patch:","Content.htm")
console.log("team patch:","Content.htm")

Binary file modified GameMakerManualTranslatorBuild.exe
Binary file not shown.

0 comments on commit 612c438

Please sign in to comment.