Project

General

Profile

Creating self extracting installer

Sources:
https://github.com/megastep/makeself

Setup

  • Install makeself on ubuntu machine
    sudo apt-get install makeself
    

Using mkrun

Attached archive contains several files used to create an installer.
installer.tar.gz

Files:
  • installer/mkrun - Calls makeself on a directory to create a .run file.
  • installer/files.txt - An example files.txt file. This allows you to easily list where files in the update need to be moved to.
  • installer/update.sh - Script that gets run after .run file is extracted. Runs S** scripts, followed by copying files described in files.txt, followed by running F** scripts.
  • installer/scripts/ - Contains example S** and F** scripts
Procedure:
  • Create empty directory. All files in this directory will be archived by mkrun.
    mkdir update_1_0
    
  • Copy files.txt and update.sh into folder
    Each entry is a line consisting of 3 values, separated by commas. [filename,destination,mode(permissions)]
    i.e.
    helloworld,/home/root/bin/helloworld,755

    Lines starting with # are ignored.
  • Copy S** and F** scripts into folder
  • Copy files to be installed into folder and update files.txt to tell installer where to install them.
  • Run mkrun on directory to create self extracting installer.
    ./mkrun update_1_0
    
    • update_1_0.run will be produced.

Example:
Note: In this example files.txt is empty as no files need to be copied to filesystem. S01install_rsync script will install the ipk files.

$ ls update_1_0/*
update_1_0/F99remount_root_ro                update_1_0/S00remount_root_rw
update_1_0/files.txt                         update_1_0/S01install_rsync
update_1_0/libpopt0_1.14-r3.0.6_armv5te.ipk  update_1_0/update.sh
update_1_0/rsync_3.0.6-r0.5_armv5te.ipk

Go to top
Add picture from clipboard (Maximum size: 1 GB)