Linux下StarUML工具

Linux下使用StarUML开源工具

1、前期工具准备:

1)appimagetool-x86_64.AppImage (打包工具)https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage

2)StarUML-3.2.2.AppImage(官网下载)

http://staruml.io/download/releases/StarUML-3.2.2.AppImage

 2、安装.asar解压工具:

方法一:直接安装:(这种方法要人品的,哈哈哈)

$ apt install npm
$ npm install npm@latest -g
$ npm install -g asar

方法二:手动安装: 

 1)下载nodejs :

https://nodejs.org/en/download/current/

 

2)解压文件到/opt目录下:

 tar -xJC /opt/  -f node-v13.10.1-linux-x64.tar.xz

3)软链接

$ ln -s /opt/node-v13.10.1-linux-x64/bin/node /usr/local/bin/node 
$ ln -s /opt/node-v13.10.1-linux-x64/bin/npm /usr/local/bin/npm
$ npm config set registry https://registry.npm.taobao.org
$ source ~/.bashrc

4)查看安装版本:

5)安装asar:

$ npm install -g asar

 6)验证是否安装成功:

$ asar

如果出现没有这个命令,建立软链接:

$ ln -s /opt/node-v13.10.1-linux-x64/bin/asar /usr/local/bin/asar

3、提取软件: 

1)提取压缩文件(.AppImage文件)

$ ./StarUML-3.2.2.AppImage --appimage-extract
$ mkdir StarUML
$ mv -r ./squashfs-root ./StarUML/
$ cd ./StarUML/squashfs-root/resources

 

 2)解压app.asar

$ asar extract app.asar app
$ vim ./app/src/engine/license-manager.js

3)修改js代码:

修改为:(行数为相对行数

36行:

function setStatus (licenseManager, newStat) {
  if (status !== newStat) {
    status = newStat
    licenseManager.emit('statusChanged', 'true')
  }
}

65行:

getLicenseInfo () {
  licenseInfo = {
          name: "PayneV",
          product: "PayneV product",
          licenseType: "PS",
          quantity: "PayneV Quantity",
          timestamp: "1529049036",
          licenseKey: "It's Cracked!!",
          crackedAuthor: "PayneV"
        };

  return licenseInfo
}

134行:

 checkLicenseValidity () {
    this.validate().then(() => {
      setStatus(this, true)
    }, () => {
      setStatus(this, true)
      //UnregisteredDialog.showDialog()
    })
  }

4)重新打包:

$ asar pack app app.asar

4、重新发布二进文件包:

回到 最初的位置:最初解压目录处 /home/wm/Downloads(appimagetool-x86_64.AppImage工具放在压缩文件处)

$ ./appimagetool-x86_64.AppImage ./StarUML/squashfs-root

结果:

root@wm-MS-7C37:/home/wm/Downloads# ./appimagetool-x86_64.AppImage ./StarUML/squashfs-root
appimagetool, continuous build (commit 20ea487), build 2117 built on 2020-02-18 05:18:18 UTC
Using architecture x86_64
/home/wm/Downloads/StarUML/squashfs-root should be packaged as StarUML-x86_64.AppImage
WARNING: AppStream upstream metadata is missing, please consider creating it
         in usr/share/metainfo/staruml.appdata.xml
         Please see https://www.freedesktop.org/software/appstream/docs/chap-Quickstart.html#sect-Quickstart-DesktopApps
         for more information or use the generator at http://output.jsbin.com/qoqukof.
Generating squashfs...
Parallel mksquashfs: Using 12 processors
Creating 4.0 filesystem on StarUML-x86_64.AppImage, block size 131072.
[=============================================================\] 2073/2073 100%

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 131072
    compressed data, compressed metadata, compressed fragments,
    compressed xattrs, compressed ids
    duplicates are removed
Filesystem size 97526.77 Kbytes (95.24 Mbytes)
    37.54% of uncompressed filesystem size (259781.64 Kbytes)
Inode table size 6908 bytes (6.75 Kbytes)
    59.37% of uncompressed inode table size (11636 bytes)
Directory table size 1056 bytes (1.03 Kbytes)
    51.31% of uncompressed directory table size (2058 bytes)
Number of duplicate files found 0
Number of inodes 109
Number of files 86
Number of fragments 44
Number of symbolic links  2
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 0
Number of directories 21
Number of ids (unique uids + gids) 1
Number of uids 1
    root (0)
Number of gids 1
    root (0)
Embedding ELF...
Marking the AppImage as executable...
Embedding MD5 digest
Succes

 原始版本    ==》  2020最新版本

 

 最新文件下载链接:传送门

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值