Skip to content

Instantly share code, notes, and snippets.

@DrYazid
Last active December 5, 2024 00:44
Show Gist options
  • Save DrYazid/1d1302ef2ec6727703615662f7b614cf to your computer and use it in GitHub Desktop.
Save DrYazid/1d1302ef2ec6727703615662f7b614cf to your computer and use it in GitHub Desktop.
StarUml 3.0 full version

StarUML 3.0

  • 1- install staruml. : staruml
  • 2- install node.js : node.js
  • 3- go to ...\AppData\Local\Programs\StarUML\resources
  • 4- open CMD As admin
  • 5- execute

npm install -g asar npm install -g asar asar extract app.asar app

  • 6- go to app\src\engine\license-manager.js
  • 7- update file with Notepad
validate () {
    return new Promise((resolve, reject) => {
      try {
        // Local check
        var file = this.findLicense()
        if (!file) {
          reject('License key not found')
        } else {
          var data = fs.readFileSync(file, 'utf8')
          licenseInfo = JSON.parse(data)
          var base = SK + licenseInfo.name +
            SK + licenseInfo.product + '-' + licenseInfo.licenseType +
            SK + licenseInfo.quantity +
            SK + licenseInfo.timestamp + SK
          var _key = crypto.createHash('sha1').update(base).digest('hex').toUpperCase()
          if (_key !== licenseInfo.licenseKey) {
            reject('Invalid license key')
          } else {
            // Server check
            $.post(app.config.validation_url, {licenseKey: licenseInfo.licenseKey})
              .done(data => {
                resolve(data)
              })
              .fail(err => {
                if (err && err.status === 499) { /* License key not exists */
                  reject(err)
                } else {
                  // If server is not available, assume that license key is valid
                  resolve(licenseInfo)
                }
              })
          }
        }
      } catch (err) {
        reject(err)
      }
    })
  }
  • 8- and
  checkLicenseValidity () {
    this.validate().then(() => {
      setStatus(this, true)
    }, () => {
      setStatus(this, true)
    })
  }
  • 9- go back to CMD and execute

asar pack app app.asar

its done enjoy

@rizqimauludin10
Copy link

04 April 2019

Thank you very much. It worked!

@ZanXD007
Copy link

ZanXD007 commented Jun 2, 2019

im not worked, when i extract app.asar

@Peronia
Copy link

Peronia commented Jul 10, 2019

Worked for me with a little bit tweaking for windows:

@Skhaung8
Copy link

How about for Mac users?

@kvizconde
Copy link

kvizconde commented Sep 21, 2019

For Mac Users:

cd /Applications/StarUML.app/Contents/Resources

npm install -g asar

asar extract app.asar app

cd /Applications/StarUML.app/Contents/Resources/app/src/engine

open .

Then just find license-manager.js and open it with your text/code editor and follow the above instructions for the code swap.

After you finish replacing the code with the instructions above, just go back to your home directory with cd ~ command and execute asar pack app app.asar in the terminal as stated in the above instructions.

Cheers 🍻

@MakRatanakKh
Copy link

It works. And it also work with version 3.1.0. Thanks.

@razgui
Copy link

razgui commented Feb 24, 2020

thx

@taiit
Copy link

taiit commented Feb 28, 2020

It works fine on windows.
Thanks

@mohamedmaouali
Copy link

perfect job

@acecconato
Copy link

For Linux users with the StarUML-*.appimage

You'll need to extract the .appimage

Extract the StarUML-*.appimage
./StarUML-*.appimage --appimage-extract

You should have a squashfs-root directory
Open it then follow the guide

wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage

chmod +x appimagetool-x86_64.AppImage

Rebuild the appimage
./appimagetool-x86_64.AppImage squashfs-root

Done

@jashparikh
Copy link

It does not recognize asar command as an internal or external command. Can someone help with it?

@szeb558
Copy link

szeb558 commented Oct 15, 2020

C:\Program Files\StarUML\resources>asar pack app app.asar
(node:15356) ExperimentalWarning: The fs.promises API is experimental

@evmurashov
Copy link

evmurashov commented Mar 17, 2021

For Mac Users:

cd /Applications/StarUML.app/Contents/Resources

npm install -g asar

asar extract app.asar app

cd /Applications/StarUML.app/Contents/Resources/app/src/engine

open .

Then just find license-manager.js and open it with your text/code editor and follow the above instructions for the code swap.

After you finish replacing the code with the instructions above, just go back to your home directory with cd ~ command and execute asar pack app app.asar in the terminal as stated in the above instructions.

Cheers 🍻

It works for 4.0.1, thx!

@tuananhzippy
Copy link

For Mac Users:

cd /Applications/StarUML.app/Contents/Resources

npm install -g asar

asar extract app.asar app

cd /Applications/StarUML.app/Contents/Resources/app/src/engine

open .

Then just find license-manager.js and open it with your text/code editor and follow the above instructions for the code swap.
After you finish replacing the code with the instructions above, just go back to your home directory with cd ~ command and execute asar pack app app.asar in the terminal as stated in the above instructions.
Cheers 🍻

It works for 4.0.1, thx!

Thank you! it works very well.

@Valia-Zaika
Copy link

In windows, it works perfectly on 4.0.1, many thanks

@Peronia
Copy link

Peronia commented Oct 22, 2021

Works for 4.1.6.

@jfabellera
Copy link

Works on v5.1.0 on MacOS 😸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment