mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-12 14:22:22 -06:00
.uppbox: MakeInstall6
git-svn-id: svn://ultimatepp.org/upp/trunk@14107 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
60342b66f7
commit
fd2a3b6a85
3 changed files with 133 additions and 0 deletions
114
uppbox/MakeInstall6/Main.cpp
Normal file
114
uppbox/MakeInstall6/Main.cpp
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
#include <Core/Core.h>
|
||||
#include <plugin/bz2/bz2.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
void Log(const char *txt)
|
||||
{
|
||||
Cout() << txt << "\r\n";
|
||||
}
|
||||
|
||||
void Error(const char *e)
|
||||
{
|
||||
Log(e);
|
||||
abort();
|
||||
}
|
||||
|
||||
String Syx(const char *s)
|
||||
{
|
||||
Log(s);
|
||||
String r;
|
||||
int q = Sys(s, r);
|
||||
if(q)
|
||||
Error(String().Cat() << "Failed: " << s << "\r\n" <<
|
||||
"Exit code: " << q << "\r\n" <<
|
||||
"Output: " << r);
|
||||
return r;
|
||||
}
|
||||
|
||||
void CopyFolder(const char *src, const char *dst, bool deep = true)
|
||||
{
|
||||
if(GetFileName(src) == ".svn")
|
||||
return;
|
||||
Cout() << Sprintf("Directory %s\n", src);
|
||||
RealizeDirectory(dst);
|
||||
FindFile ff(String(src) + "/*.*");
|
||||
while(ff) {
|
||||
String s = AppendFileName(src, ff.GetName());
|
||||
String d = AppendFileName(dst, ff.GetName());
|
||||
if(ff.IsFile()) {
|
||||
String q = LoadFile(s);
|
||||
String ext = ToLower(GetFileExt(s));
|
||||
if(ext != ".aux" && ext != ".$old")
|
||||
SaveFile(d, q);
|
||||
}
|
||||
else
|
||||
if(ff.IsFolder() && *ff.GetName() != '.') {
|
||||
if(deep || *GetFileExt(s))
|
||||
CopyFolder(s, d, deep);
|
||||
}
|
||||
ff.Next();
|
||||
}
|
||||
}
|
||||
|
||||
int CrLfSm(int c)
|
||||
{
|
||||
return c == ';' || c == '\r' || c == '\n';
|
||||
}
|
||||
|
||||
void CopyFolders(const char *src, const char *dst, const char *folders, bool deep = true)
|
||||
{
|
||||
Vector<String> folder = Split(LoadFile(folders), CrLfSm);
|
||||
for(int i = 0; i < folder.GetCount(); i++)
|
||||
CopyFolder(AppendFileName(src, folder[i]), AppendFileName(dst, folder[i]), deep);
|
||||
}
|
||||
|
||||
String tmp = "u:/upp.tmp";
|
||||
String upptmp = tmp + "/upp";
|
||||
String ass = upptmp + "/uppsrc";
|
||||
String upp = "u:/upp.src";
|
||||
String uppsrc = upp + "/uppsrc";
|
||||
String bin = "u:/upp.bin";
|
||||
|
||||
int NoDigit(int c) { return IsDigit(c) ? 0 : c; }
|
||||
int FilterVersion(int c) { return c == ':' ? '_' : c; }
|
||||
|
||||
void Make(String pkg, String exe, String method)
|
||||
{
|
||||
Syx("c:/upp/umk " + ass + " " + pkg + " c:/upp/" + method + ".bm -arv " + upptmp + "/" + exe);
|
||||
FileDelete(upptmp + "/" + ForceExt(exe, ".map"));
|
||||
}
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
Vector<String> s = Split(Syx("c:/upp/SlikSvn/bin/svnversion " + uppsrc), NoDigit);
|
||||
if(s.GetCount() == 0)
|
||||
Error("Invalid version");
|
||||
String version = s.Top();
|
||||
Log("version: " + version);
|
||||
|
||||
DeleteFolderDeep(tmp);
|
||||
RealizeDirectory(tmp);
|
||||
|
||||
RealizeDirectory("u:/upload");
|
||||
|
||||
CopyFolder(bin, upptmp, false);
|
||||
CopyFolder(bin + "/win32", upptmp + "/bin");
|
||||
SaveFile(upptmp + "/README", LoadDataFile("README"));
|
||||
|
||||
CopyFolders(uppsrc, ass, uppsrc + "/packages");
|
||||
CopyFolders(uppsrc, ass, uppsrc + "/packages1", false);
|
||||
CopyFolders(upp, upptmp, uppsrc + "/assemblies");
|
||||
SaveFile(upptmp + "/uppsrc/guiplatform.h", "");
|
||||
SaveFile(upptmp + "/uppsrc/uppconfig.h", LoadFile(uppsrc + "/uppconfig.h"));
|
||||
SaveFile(upptmp + "/uppsrc/ide/version.h", "#define IDE_VERSION \"" + version + "\"\r\n");
|
||||
Make("ide", "theide.exe", "CLANGx64");
|
||||
Make("umk", "umk.exe");
|
||||
|
||||
SetCurrentDirectory(upptmp);
|
||||
|
||||
SaveFile("license.chk", "1");
|
||||
|
||||
Syx("c:/upp/7-zip/7z a u:/upload/upp-win-" + Filter(version, FilterVersion) + ".7z"
|
||||
" " + upptmp + " -r -mx -m0fb=255 -mf=off");
|
||||
}
|
||||
14
uppbox/MakeInstall6/MakeInstall6.upp
Normal file
14
uppbox/MakeInstall6/MakeInstall6.upp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
description "Install creator - Wine version for nightly builds - for clang\377";
|
||||
|
||||
uses
|
||||
plugin\bz2,
|
||||
Core,
|
||||
plugin\ftp;
|
||||
|
||||
file
|
||||
README,
|
||||
Main.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "";
|
||||
|
||||
5
uppbox/MakeInstall6/README
Normal file
5
uppbox/MakeInstall6/README
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
Ultimate++ Windows releases
|
||||
|
||||
Windows release a simple archive .7z archive. Unpack to directory of your
|
||||
preference, then just run theide.exe. U++ does not write anything to registry
|
||||
or outside its directory.
|
||||
Loading…
Add table
Add a link
Reference in a new issue