zoukankan      html  css  js  c++  java
  • makeself 试用

    makeself 是一个unix 自解压应用制作工具,100% shell,以下是一个简单的试用

    下载makeself

    因为基于shell,没有依赖,所以使用就比较简单了,clone 代码就可以了

    git clone https://github.com/megastep/makeself.git

    命令格式

    makeself.sh [args] archive_dir file_name label startup_script [script_args]

    关于参数说明的可以参考官方文档 <a href="https://makeself.io/">https://makeself.io/</a>

    简单使用

    • 项目准备
      项目是一个简单的nodejs 项目,使用yarn 进行的包管理
      项目结构
     
    ├── index.js
    ├── package.json
    ├── post-install.sh
    └── yarn.lock
    • 代码说明
      package.json 标准node 项目
     
    {
      "name": "appdemo",
      "version": "1.0.0",
      "main": "index.js",
      "license": "MIT",
      "scripts": {
        "start": "node index.js"
      },
      "dependencies": {
        "shortid": "^2.2.15"
      }
    }

    index.js 一个简单的console 输出

    const shortid = require("shortid")
    console.log(`shortid is ${shortid.generate()}`)

    post-install.sh 自解压包启动命令(注意需要添加执行权限)

    #!/bin/sh
    yarn
    rm -rf post-install.sh
    • 制作软件包
    ./makeself.sh --notemp ../appdemo node-app.run "node demo application" ./post-install.sh
    • 效果

    • 运行软件包


    • 释放软件包内容

    说明

    基于makeself 制作软件包还是一个不错的工具的,使用简单,方便,同时也有一个maven 的插件makeself-maven-plugin 对于java 应用的
    打包还是很不错的

    参考资料

    https://github.com/hazendaz/makeself-maven-plugin
    https://github.com/megastep/makeself
    https://makeself.io/

  • 相关阅读:
    HDU4611+数学
    HDU4612+Tarjan缩点+BFS求树的直径
    HDU4602+推导公式
    HDU4607+BFS
    HDU1353+贪心
    HDU4545+LCS
    HDU4548+素数
    HDU4539+状态压缩DP
    HDU2110+母函数
    HDU1569+最大点权集
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/12234770.html
Copyright © 2011-2022 走看看