瀏覽代碼

Linux package generation

JimMarlowe 9 年之前
父節點
當前提交
64e688d1e8

+ 14 - 0
Build/Linux/DEBIAN/control

@@ -0,0 +1,14 @@
+Package: AtomicGameEngine
+Version: 0.0.8
+Installed-Size: 393064
+Section: graphics
+Maintainer: pincushion <[email protected]>
+Homepage: http://atomicgameengine.com
+Priority: optional
+Architecture: amd64
+Description: The Atomic Game Engine is a cross-platform game editor
+ The Atomic Game Engine features a cross-platform editor with deployment to Windows, OSX, Linux, WebGL, Android, and iOS. Applications can be built using JavaScript, TypeScript, native C++, and C#. The Atomic Game Engine is a full source solution under the permissive MIT License on GitHub
+ (C) 2016 THUNDERBEAST GAMES, LLC
+
+
+

+ 6 - 0
Build/Linux/DEBIAN/postinst

@@ -0,0 +1,6 @@
+#! /bin/bash -e
+ln -fs "/usr/share/AtomicGameEngine/AtomicEditor" "/usr/bin/AtomicEditor"
+ln -fs "/usr/share/AtomicGameEngine/atomic_menu.xpm" "/usr/share/pixmaps/atomic_menu.xpm"
+# hack for some window managers
+mv "/usr/share/applications/Atomic_Game_Engine.desktop" "/tmp/Atomic_Game_Engine.desktop"
+mv "/tmp/Atomic_Game_Engine.desktop" "/usr/share/applications/Atomic_Game_Engine.desktop"

+ 3 - 0
Build/Linux/DEBIAN/prerm

@@ -0,0 +1,3 @@
+#! /bin/bash -e
+rm "/usr/bin/AtomicEditor"
+rm "/usr/share/pixmaps/atomic_menu.xpm"

+ 123 - 0
Build/Linux/atomic_menu.xpm

@@ -0,0 +1,123 @@
+/* XPM */
+static char * atomic_menu_xpm[] = {
+"32 32 88 1",
+" 	c None",
+".	c #222222",
+"+	c #1D1B21",
+"@	c #1C1C21",
+"#	c #171521",
+"$	c #7E932E",
+"%	c #E5FF3B",
+"&	c #232322",
+"*	c #515D28",
+"=	c #C7E537",
+"-	c #0E091F",
+";	c #525E28",
+">	c #100B1F",
+",	c #DFFF3B",
+"'	c #292D23",
+")	c #DCFF3A",
+"!	c #110C1F",
+"~	c #1F1E22",
+"{	c #141020",
+"]	c #110D20",
+"^	c #161320",
+"/	c #212022",
+"(	c #4E5C28",
+"_	c #AAC333",
+":	c #191721",
+"<	c #1D1D21",
+"[	c #91A530",
+"}	c #CCEE38",
+"|	c #DDFF3B",
+"1	c #BFDD36",
+"2	c #8B9A2F",
+"3	c #AAC934",
+"4	c #4B5927",
+"5	c #B0CA35",
+"6	c #76892D",
+"7	c #282B23",
+"8	c #1A1821",
+"9	c #2E3324",
+"0	c #4A5827",
+"a	c #D1FD39",
+"b	c #DDFF3A",
+"c	c #A2B932",
+"d	c #404926",
+"e	c #DFFF3A",
+"f	c #110C20",
+"g	c #120E20",
+"h	c #171621",
+"i	c #00001C",
+"j	c #71892D",
+"k	c #E4FF3B",
+"l	c #728A2D",
+"m	c #1C1A21",
+"n	c #A0B532",
+"o	c #4C5928",
+"p	c #232422",
+"q	c #3B4225",
+"r	c #B5D235",
+"s	c #9FBE32",
+"t	c #CDEF38",
+"u	c #3D4626",
+"v	c #363E25",
+"w	c #130F20",
+"x	c #181521",
+"y	c #687C2B",
+"z	c #636E2A",
+"A	c #0F0A20",
+"B	c #1C1B21",
+"C	c #879F2F",
+"D	c #A2C033",
+"E	c #03001E",
+"F	c #95AF31",
+"G	c #D6FF39",
+"H	c #6E792C",
+"I	c #212122",
+"J	c #4F5827",
+"K	c #131020",
+"L	c #AACA34",
+"M	c #C1EA37",
+"N	c #95B031",
+"O	c #4D5A28",
+"P	c #7C862E",
+"Q	c #DBFF3A",
+"R	c #CBF738",
+"S	c #9BB632",
+"T	c #C0EA37",
+"U	c #535728",
+"V	c #3C4426",
+"W	c #414A26",
+"                                ",
+"            ........            ",
+"          ............          ",
+"        ................        ",
+"      ........+@@+........      ",
+"     ........#$%%$#........     ",
+"    ........&*=--=;&........    ",
+"    ........>,'&&')!........    ",
+"   ....~{]^/(_:..:_(/^]{~....   ",
+"   ...<[}|1234+&&+4321|}[<...   ",
+"  ...:567890abcddcea098765:...  ",
+"  ...f,g&.&heijkklieh&.&g,f...  ",
+" ....mnop.&qrstuutsrq&.ponm.... ",
+" ....&vew.xy)z]AA]z)yx.wev&.... ",
+" .....BCDEFGHIJ))JIHGFEDCB..... ",
+" ......KLMNOPAQRRQAPOSTLK...... ",
+" ......KLTSOPAQRRQAPONMLK...... ",
+" .....BCDEFGHIUQQUIHGFEDCB..... ",
+" ....&vew.xy)z]AA]z)yx.wev&.... ",
+" ....mnop.&qrstuutsrq&.ponm.... ",
+"  ...f,g&.&heij%kjieh&.&g,f...  ",
+"  ...:567890abcVWcba098765:...  ",
+"   ...<[}|1234+&&+4321|}[<...   ",
+"   ....~{]^/(_:..:_(/^]{~....   ",
+"    ........!)'&&')!........    ",
+"    ........&;=--=;&........    ",
+"     ........#$%%$#........     ",
+"      ........+@@+........      ",
+"        ................        ",
+"          ............          ",
+"            ........            ",
+"                                "};

+ 11 - 0
Build/Linux/usr/share/applications/Atomic_Game_Engine.desktop

@@ -0,0 +1,11 @@
+[Desktop Entry]
+Name=Atomic Game Engine
+Version=1.0
+Exec=AtomicEditor
+Comment=Create cross platform games
+Icon=atomic_menu.xpm
+Type=Application
+Terminal=false
+StartupNotify=true
+Encoding=UTF-8
+Categories=Graphics;

二進制
Build/Linux/usr/share/doc/AtomicGameEngine/changelog.gz


+ 20 - 0
Build/Linux/usr/share/doc/AtomicGameEngine/copyright

@@ -0,0 +1,20 @@
+Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC  
+https://github.com/AtomicGameEngine/AtomicGameEngine
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.

+ 10 - 1
Build/Scripts/BuildLinux.js

@@ -23,6 +23,9 @@ function copyAtomicNET() {
 
 function copyAtomicEditor() {
 
+    if ( config["noclean"])
+        host.cleanCreateDir(editorAppFolder);
+
     // Copy the Editor binaries
     fs.copySync(buildDir + "Source/AtomicEditor/AtomicEditor",
     config.artifactsRoot + "AtomicEditor/AtomicEditor");
@@ -83,7 +86,13 @@ namespace('build', function() {
 
             copyAtomicEditor();
 
-            complete();
+             if (config.package) {
+
+                jake.Task['package:linux_editor'].invoke();
+
+            }
+
+           complete();
 
         }, {
             printStdout: true

+ 64 - 0
Build/Scripts/PackageEditor.js

@@ -1,3 +1,4 @@
+var fs = require('fs-extra');
 var host = require("./Host");
 var config = require("./BuildConfig");
 
@@ -96,5 +97,68 @@ namespace('package', function() {
         });
 
     });
+    
+    task('linux_editor', {
+        async: true
+    }, function() {
+
+        // check if all the commands exist : fakeroot, dpkg-deb
+
+        var editorAppFolder = config.editorAppFolder;
+        var srcDir = config.artifactsRoot + "AtomicEditor/";
+        var dstDir = config.artifactsRoot + "Dist/";
+        var dstDeb = config.artifactsRoot + "AtomicGameEngine_0.0.8_amd64.deb";
+        
+        host.cleanCreateDir(dstDir);  // create new staging directory
+        fs.removeSync(dstDeb);  // remove old one, if there
+        
+        // copy in the two magic dirs
+        fs.copySync(config.atomicRoot + "Build/Linux/DEBIAN", dstDir + "DEBIAN");
+        fs.copySync(config.atomicRoot + "Build/Linux/usr", dstDir + "usr" );
+
+        // copy in the atomic dir
+        fs.copySync(editorAppFolder, dstDir + "usr/share/AtomicGameEngine" );
+       
+        //copy in menu pixmap
+        fs.copySync(config.atomicRoot + "Build/Linux/atomic_menu.xpm", dstDir + "usr/share/AtomicGameEngine/atomic_menu.xpm" );
+        
+        // get rid of some lintian errors
+        fs.removeSync( dstDir + "usr/share/AtomicGameEngine/Resources/ToolData/.gitignore");
+        fs.removeSync( dstDir + "usr/share/AtomicGameEngine/Resources/ToolData/CodeEditor/.gitignore");
+        fs.removeSync( dstDir + "usr/share/AtomicGameEngine/Resources/ToolData/Deployment/Android/assets/.gitignore");
+        fs.removeSync( dstDir + "usr/share/AtomicGameEngine/Resources/ToolData/ProjectTemplates/.gitignore");
+        fs.removeSync( dstDir + "usr/share/AtomicGameEngine/Resources/ToolData/TypeScriptSupport/.gitignore");
+
+        cmds = [];
+        
+        // go to staging root directory
+        cmds.push("cd " + config.artifactsRoot + " ;" );
+        
+        // get rid of some more lintian errors
+        cmds.push("/usr/bin/strip --strip-unneeded " + dstDir + "usr/share/AtomicGameEngine/AtomicEditor ;" );
+        cmds.push("/usr/bin/strip --strip-unneeded " + dstDir + "usr/share/AtomicGameEngine/Resources/ToolData/Deployment/Linux/AtomicPlayer ;" );
+        cmds.push("/bin/chmod oug-wx " + dstDir + "usr/share/AtomicGameEngine/libcef.so ;");
+
+        // needs fakeroot for package file ownership issues
+        cmds.push("/usr/bin/fakeroot /usr/bin/dpkg-deb --build " + dstDir + ";");
+
+        // fix the deb name
+        cmds.push("/bin/mv " + config.artifactsRoot + "Dist.deb " + dstDeb + " ;");
+
+        // clean up the staging area
+        cmds.push("/bin/rm -rf "+  dstDir + " ;");
+
+        jake.exec(cmds, function() {
+
+          console.log("Packaged Linux Editor to " + dstDeb );
+
+          complete();
+
+        }, {
+          printStdout: true,
+          printStderr: true
+        });
+
+    });
 
 });