summary refs log tree commit diff stats
path: root/HACKING
diff options
context:
space:
mode:
Diffstat (limited to 'HACKING')
-rw-r--r--HACKING11
1 files changed, 3 insertions, 8 deletions
diff --git a/HACKING b/HACKING
index 85f44ed6..b184150c 100644
--- a/HACKING
+++ b/HACKING
@@ -39,20 +39,16 @@ add the name of your option to the constant ALLOWED_SETTINGS
 The setting is now accessible at self.settings.my_option,
 assuming <self> is a "SettingsAware" object.
 
-* Change commands:
+* Changing commands, adding aliases:
 ranger/defaults/commands.py
 
-* Create aliases for commands:
-In ranger/defaults/commands.py
-at the bottom, write something like: alias(exit=quit)
-
 * Adding colorschemes:
 Copy ranger/colorschemes/default.py to ranger/colorschemes/myscheme.py
 and modify it according to your needs.  Alternatively, mimic the jungle
 colorscheme.  It subclasses the default scheme and just modifies a few things.
 In ranger/defaults/options.py (or ~/.ranger/options.py), change
-    colorscheme = colorschemes.default
-to: colorscheme = colorschemes.myscheme
+    colorscheme = 'default'
+to: colorscheme = 'myscheme'
 
 * Change which files are considered to be "hidden":
 In ranger/defaults/options.py
@@ -71,7 +67,6 @@ extension, etc.  For a full list, check ranger/fsobject/fsobject.py
 
 * Change the file extension => mime type associations:
 Modify ranger/data/mime.types
-and run ranger/data/generate.py to compile it.
 
 
 Version Numbering
Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
workspace("Pong")
    configurations {"Release"}

project("Pong")
    newaction {
        trigger = "install",
        description = "Install the game to prefix.",
        execute = function()
	    os.mkdir(string.format("%s/Pong/resources", prefix))
	    os.executef("cp -r resources/* %s/Pong/resources/", prefix)
        os.executef("install -m755 bin/*/Pong %s/Pong/pong", prefix)
        os.exit(0)
        end
    }

    newaction {
        trigger = "check_deps",
        description = "Check if you have all the dependencies installed.",
        execute = function()
            io.write("Pkgconf: ")
            io.flush()
            Pkgconf_Result = os.executef("which pkgconf")
            AllGood = true
            if(Pkgconf_Result == nil)
            then
                print("You do not have pkgconf installed. Aborting.")
                os.exit(1)
            end
            io.write("Raylib: ")
            io.flush()
            if(os.executef("pkgconf --modversion raylib") == nil)
            then
                print("Can't find raylib.")
                AllGood = false
            end
            io.write("SDL2: ")
            io.flush()
            if(os.executef("pkgconf --modversion sdl2") == nil)
            then
                print("Can't find SDL2.")
                AllGood = false
            end
            io.write("SDL2_mixer: ")
            io.flush()
            if (os.executef("pkgconf --modversion SDL2_mixer") == nil)
            then
                print("Can't find SDL2_mixer.")
                AllGood = false
            end
            io.write("GLFW3: ")
            io.flush()
            if (os.executef("pkgconf --modversion glfw3") == nil)
            then
                print("Can't find GLFW.")
                AllGood = false
            end
	    io.write("GL: ")
	    io.flush()
	    if (os.executef("pkgconf --modversion gl") == nil)
	    then
		    print("Can't find OpenGL")
		    AllGood = false
	    end
	    io.write("GLU: ")
	    io.flush()
	    if (os.executef("pkgconf --modversion glu") == nil)
	    then
		    print("Can't find GLU")
		    AllGood = false
	    end
            if(AllGood == true)
            then
                print("Found all dependencies!")
                os.exit(0)
            end
            print("Failed to find all needed dependencies.")
            os.exit(1)
        end
    }

    kind("WindowedApp")
    optimize("Debug")
    language("C")
    files {"src/*.c", "src/*.h", }
    --libdirs {"/usr/local/lib", "/usr/pkg/lib", "/usr/X11R7/include"}

    -- Prefix Option
    newoption {
        trigger     = "prefix",
        value       = "path",
        description = "Prefix for where the game is to be installed."
    }
    prefix = _OPTIONS["prefix"] or "app"

    -- Flatpak
    newoption {
        trigger     = "flatpak",
        value       = "bool",
        description = "Build a flatpak."
    }
    flatpak = _OPTIONS["flatpak"] or "false"

    if (flatpak == true)
    then
    else
        buildoptions {"-g", "-ggdb", "`pkgconf --cflags raylib`", "`pkgconf --cflags glfw3`", "`pkgconf --cflags gl`", "`pkgconf --cflags sdl2`", "`pkgconf --cflags SDL2_mixer`", "`pkgconf --cflags glu`"}
        linkoptions {"-g", "-ggdb", "`pkgconf --libs raylib`", "`pkgconf --libs glfw3`", "`pkgconf --libs gl`", "`pkgconf --libs sdl2`", "`pkgconf --libs SDL2_mixer`", "`pkgconf --libs glu`"}
    end