Skip to content

frokk/Neu-AppImage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neu-AppImage

Package Neutralino Application Into AppImage Format


From the Command Line

Running Neu AppImage from the command line has this basic form:

npx neu-appimage --exe <main-executable> --res <resource.neu-file> --program-name <program-name> --description <description> --icon <png-512x512-icon> --categories <categories> --arch <architecture> --out-dir <output-directory> [Optional Arguments]

You can directly build your AppImage from command line, available options are:

     NAME            TYPE      OPTIONAL         DESCRIPTION
--exe              <string>      NO        Path To The Main Executable
--res              <string>      NO        Path To The "resource.neu" File
--files            <string>      NO        Path To Other Files To Include (seprated by comma, example: file1,file2,file3)
--program-name     <string>      NO        Name Of The Program
--generic-name     <string>      YES       Generic Name Of The Program
--description      <string>      NO        Description Of The Program
--icon             <string>      NO        Path To The Program Icon
--version          <string>      YES       Program Version (ex - 1.0.2-stable or 3.5)
--categories       <string>      NO        Category Of The Program (Seprated By Comma if multiple, example: cat1,cat2)
--working-dir      <string>      YES       The working directory to run the program in
--arch             <string>      NO        Program Architecture (x64 or x32)
--out-dir          <string>      NO        Path to directory to save AppImage in
--log                            YES       Log the output of AppImage Tool.
--list-categories                YES       List Available Categories.
-V, --version                    YES       Output the version number
-h, --help                       YES       Display help for command

API

const { AppImage, STATUS_CODE } = require('neu-appimage');

new AppImage(executable, resource, files, outdir, options)

executable is the path to the Main Neutralino Generated Binary.

resource is the path to the resource.neu file Generated by Neutralino.

files is an Array of Strings containing Path To Files To Be Included in AppImage.

outdir is a String Path to the directory in which to save the AppImage To.

options is an object that can contain following fields:

  • programName - Name of the program (ex - "FireFox").
  • genericName - Generic Name of the program (ex - "Web Browser").
  • description - Description of the program (ex - "Free and open-source web browser").
  • icon - Path to the icon file (.png) in 512x512 or 256x256 resolution (ex - "/path/to/icon.png").
  • version - Version of your program (ex - 0.3.9-beta or 1.3).
  • categories - Array of Strings Containing Category of the program (ex - ["Utility", "Network"]).
  • These are the available categories
    • Audio
    • Video
    • AudioVideo
    • Development
    • Education
    • Game
    • Graphics
    • Network
    • Office
    • Science
    • Settings
    • System
    • Utility
  • workingDir - The working directory to run the program in (ex - "~/").
  • arch - Architecture of your program which the AppImage will inherit (only x86_64 & i386 are supported currently) (ex - "x86_64").
  • showAppImgToolOutput - if true, output of the AppImage Tool will be showed on console (can be useful for debugging if command fails) (ex - false).

myAppImageInstance.build()

Builds the AppImage & returns Object containing information related to Build

code - Return Code is STATUS_CODE.SUCCESS if AppImage Was Created Successfully else it can return:

  • STATUS_CODE.PATH_NOT_FOUND - If a File/Folder doesn't Exist.
  • STATUS_CODE.UNSUPPORTED_OS_ARCHITECTURE - If the machine running the code is not x64 or x32 Bit.
  • STATUS_CODE.UNSUPPORTED_ARCHITECTURE - If the arch property in options is not x64 or x32.
  • STATUS_CODE.UNSUPPORTED_OS - If the machine running the code is not Linux.
  • STATUS_CODE.UNKNOWN - If the error is Unknown.

text - Path to the generated AppImage if successfully created one, else Description of the Error Occured.


Found Bugs?

You can report bugs/issues Here


Thanks