Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save K1ethoang/83267585235bbb6a55e5479ae969d7a3 to your computer and use it in GitHub Desktop.
Save K1ethoang/83267585235bbb6a55e5479ae969d7a3 to your computer and use it in GitHub Desktop.
Active StarUml version 6 for Window | MacOS | Linux

Active StarUML on Window/MacOS/Linux

Do not forget to give me⭐

Support version: v6.3.1

Update

  • [2025-01-30]:
    • Update app.asar to v6.3.1
    • Block auto update new version
  • [2024-12-11]: Supports Linux from comment
  • [2024-11-19]: Supports MacOS from comment
  • [2024-11-12]:
    • Block auto update (Beta)
    • Update app.asar file for V6.3.0

Have done! image

Support:

K1ethoang

@RaedAlsheikhAmin
Copy link

Thanks so much, that we straight to the point.

@rromi182
Copy link

Thanksss you helped me ⭐⭐⭐⭐⭐

@R1ia
Copy link

R1ia commented Nov 25, 2024

omg thanks, literally saved my assignment

@AstroGekz
Copy link

TYSMMM, u just save me

@JoDrm
Copy link

JoDrm commented Dec 8, 2024

Thank you for this, i try to do it and this append, is there a solution ?
Capture d’écran 2024-12-08 à 15 52 53

@TalonEzio
Copy link

thank you very much, from J2Team with love ❤️

@K1ethoang
Copy link
Author

Thanks so much, that we straight to the point.

Are u use MacOS? It's ok to replace file .asar

@K1ethoang
Copy link
Author

thank you very much, from J2Team with love ❤️

Thanks

@K1ethoang
Copy link
Author

Works in Linux as well! I placed the new app.asar in /opt/StartUML/resources folder.

Woww, I will update readme

@TranHuuLoc129
Copy link

Can you update to version 6.3.1? Thank

@LAARRAGUEZakarya
Copy link

tanks

@irvandoda
Copy link

star uml 6 3 0 sequoia 15 2 its work in star uml 6.3.0 sequoia 15.2 big thanks

@Younessboumlik
Copy link

Thanks.

@b13-niass
Copy link

Thank you for this, i try to do it and this append, is there a solution ? Capture d’écran 2024-12-08 à 15 52 53

Do this on terminal to resolve the problem:

xattr -cr /Applications/StarUML.app

@YounesBousfiha
Copy link

Thanks a lot

@deril-237
Copy link

Thank you is very good

@aculledor
Copy link

It worked today 07/01/2025 for the v6.3.1, thanks!

@Dat-SMG
Copy link

Dat-SMG commented Jan 10, 2025

hi, im just download the app.asar and put it in the new version 6.3.1 and it keep saying there a new update and keep replace the app.asar that i just put in. Im a student and first time using it so i dont know how to turn off the auto update

@K1ethoang
Copy link
Author

hi, im just download the app.asar and put it in the new version 6.3.1 and it keep saying there a new update and keep replace the app.asar that i just put in. Im a student and first time using it so i dont know how to turn off the auto update

You can use this link to download v6.3.0, and i will update app.asar later.
https://files.staruml.io/releases-v6/StarUML%20Setup%206.3.0.exe

@bilalop
Copy link

bilalop commented Jan 13, 2025

Hello, the latest version is available. Please correct your app.asar.

@LautaroCavichia
Copy link

It wasn't working for me on 6.3.1 on macOS so I modified the app.asar myself and now works. You can do it yourself by:

  1. Installing asar:
    npm install -g asar

  2. extract the app.asar file (/Applications/StarUML.app/Contents/Resources/app.asar):
    asar extract /path/to/app.asar /path/to/output-directory

  3. Modify the license-manager.js file (/path/to/output-directory/app/src/engine/license-manager.js ):

const { EventEmitter } = require("events");
const fs = require("fs");
const path = require("path");
const crypto = require("crypto");
const UnregisteredDialog = require("../dialogs/unregistered-dialog");
const packageJSON = require("../../package.json");

const SK = "DF9B72CC966FBE3A46F99858C5AEE";

// Check License When File Save
const LICENSE_CHECK_PROBABILITY = 0.3;

const PRO_DIAGRAM_TYPES = [
  "SysMLRequirementDiagram",
  "SysMLBlockDefinitionDiagram",
  "SysMLInternalBlockDiagram",
  "SysMLParametricDiagram",
  "BPMNDiagram",
  "WFWireframeDiagram",
  "AWSDiagram",
  "GCPDiagram",
];

var status = false;
var licenseInfo = null;

/**
 * Set Registration Status
 * This function is out of LicenseManager class for the security reason
 * (To disable changing License status by API)
 * @private
 * @param {boolean} newStat
 * @return {string}
 */
function setStatus(licenseManager, newStat) {
  if (status !== newStat) {
    status = newStat;
    licenseManager.emit("statusChanged", status);
  }
}

/**
 * @private
 */
class LicenseManager extends EventEmitter {
  constructor() {
    super();
    this.projectManager = null;
  }

  isProDiagram(diagramType) {
    return PRO_DIAGRAM_TYPES.includes(diagramType);
  }

  /**
   * Get Registration Status
   * @return {string}
   */
  getStatus() {
    return status;
  }

  /**
   * Get License Infomation
   * @return {Object}
   */
  getLicenseInfo() {
    return licenseInfo;
  }

  findLicense() {
    var licensePath = path.join(app.getUserPath(), "/license.key");
    if (!fs.existsSync(licensePath)) {
      licensePath = path.join(app.getAppPath(), "../license.key");
    }
    if (fs.existsSync(licensePath)) {
      return licensePath;
    } else {
      return null;
    }
  }

  /**
   * Check license validity
   *
   * @return {Promise}
   */
  validate() {
    return new Promise((resolve) => {
      // Always resolve as valid
      licenseInfo = {
        name: "Always Verified User",
        product: packageJSON.config.product_id,
        licenseType: "Permanent",
        quantity: 1,
        timestamp: Date.now(),
        licenseKey: "ALWAYS_VALID",
      };
      resolve(licenseInfo);
    });
  }

  /**
   * Return evaluation period status
   * @private
   * @return {number} Remaining days
   */
  checkEvaluationPeriod() {
    const file = path.join(window.app.getUserPath(), "lib.so");
    if (!fs.existsSync(file)) {
      const timestamp = Date.now();
      fs.writeFileSync(file, timestamp.toString());
    }
    try {
      const timestamp = parseInt(fs.readFileSync(file, "utf8"));
      const now = Date.now();
      const remains =
        30 - Math.floor((now - timestamp) / (1000 * 60 * 60 * 24));
      return remains;
    } catch (err) {
      console.error(err);
    }
    return -1; // expired
  }

  async checkLicenseValidity() {
    // Always set the status to true
    setStatus(this, true);
  }

  /**
   * Check the license key in server and store it as license.key file in local
   *
   * @param {string} licenseKey
   */
  register(licenseKey) {
    return new Promise((resolve) => {
      // Mock successful registration
      licenseInfo = {
        name: "Always Verified User",
        product: packageJSON.config.product_id,
        licenseType: "Permanent",
        quantity: 1,
        timestamp: Date.now(),
        licenseKey: "ALWAYS_VALID",
      };
      setStatus(this, true);
      resolve(licenseInfo);
    });
  }

  htmlReady() {}

  appReady() {
    this.checkLicenseValidity();
  }
}

module.exports = LicenseManager;
  1. Repack:
    asar pack /path/to/app /path/to/output/app.asar

  2. Replace the old app.asar with the new app.asar we just packed.

  3. Enjoy!

@bilalop
Copy link

bilalop commented Jan 15, 2025

Cela ne fonctionnait pas pour moi sur 6.3.1 sur macOS, j’ai donc modifié moi-même le app.asar et fonctionne maintenant. Vous pouvez le faire vous-même en :

  1. Installation d’asar :
    npm install -g asar
  2. extrayez le fichier app.asar (/Applications/StarUML.app/Contents/Resources/app.asar) :
    asar extract /path/to/app.asar /path/to/output-directory
  3. Modifiez le fichier license-manager.js (/path/to/output-directory/app/src/engine/license-manager.js ) :
const { EventEmitter } = require("events");
const fs = require("fs");
const path = require("path");
const crypto = require("crypto");
const UnregisteredDialog = require("../dialogs/unregistered-dialog");
const packageJSON = require("../../package.json");

const SK = "DF9B72CC966FBE3A46F99858C5AEE";

// Check License When File Save
const LICENSE_CHECK_PROBABILITY = 0.3;

const PRO_DIAGRAM_TYPES = [
  "SysMLRequirementDiagram",
  "SysMLBlockDefinitionDiagram",
  "SysMLInternalBlockDiagram",
  "SysMLParametricDiagram",
  "BPMNDiagram",
  "WFWireframeDiagram",
  "AWSDiagram",
  "GCPDiagram",
];

var status = false;
var licenseInfo = null;

/**
 * Set Registration Status
 * This function is out of LicenseManager class for the security reason
 * (To disable changing License status by API)
 * @private
 * @param {boolean} newStat
 * @return {string}
 */
function setStatus(licenseManager, newStat) {
  if (status !== newStat) {
    status = newStat;
    licenseManager.emit("statusChanged", status);
  }
}

/**
 * @private
 */
class LicenseManager extends EventEmitter {
  constructor() {
    super();
    this.projectManager = null;
  }

  isProDiagram(diagramType) {
    return PRO_DIAGRAM_TYPES.includes(diagramType);
  }

  /**
   * Get Registration Status
   * @return {string}
   */
  getStatus() {
    return status;
  }

  /**
   * Get License Infomation
   * @return {Object}
   */
  getLicenseInfo() {
    return licenseInfo;
  }

  findLicense() {
    var licensePath = path.join(app.getUserPath(), "/license.key");
    if (!fs.existsSync(licensePath)) {
      licensePath = path.join(app.getAppPath(), "../license.key");
    }
    if (fs.existsSync(licensePath)) {
      return licensePath;
    } else {
      return null;
    }
  }

  /**
   * Check license validity
   *
   * @return {Promise}
   */
  validate() {
    return new Promise((resolve) => {
      // Always resolve as valid
      licenseInfo = {
        name: "Always Verified User",
        product: packageJSON.config.product_id,
        licenseType: "Permanent",
        quantity: 1,
        timestamp: Date.now(),
        licenseKey: "ALWAYS_VALID",
      };
      resolve(licenseInfo);
    });
  }

  /**
   * Return evaluation period status
   * @private
   * @return {number} Remaining days
   */
  checkEvaluationPeriod() {
    const file = path.join(window.app.getUserPath(), "lib.so");
    if (!fs.existsSync(file)) {
      const timestamp = Date.now();
      fs.writeFileSync(file, timestamp.toString());
    }
    try {
      const timestamp = parseInt(fs.readFileSync(file, "utf8"));
      const now = Date.now();
      const remains =
        30 - Math.floor((now - timestamp) / (1000 * 60 * 60 * 24));
      return remains;
    } catch (err) {
      console.error(err);
    }
    return -1; // expired
  }

  async checkLicenseValidity() {
    // Always set the status to true
    setStatus(this, true);
  }

  /**
   * Check the license key in server and store it as license.key file in local
   *
   * @param {string} licenseKey
   */
  register(licenseKey) {
    return new Promise((resolve) => {
      // Mock successful registration
      licenseInfo = {
        name: "Always Verified User",
        product: packageJSON.config.product_id,
        licenseType: "Permanent",
        quantity: 1,
        timestamp: Date.now(),
        licenseKey: "ALWAYS_VALID",
      };
      setStatus(this, true);
      resolve(licenseInfo);
    });
  }

  htmlReady() {}

  appReady() {
    this.checkLicenseValidity();
  }
}

module.exports = LicenseManager;
  1. Repack:
    asar pack /path/to/app /path/to/output/app.asar
  2. Remplacez l’ancien app.asar par le nouveau app.asar que nous venons d’emballer.
  3. Jouir!

On Windows ?

@JosephMoustaid
Copy link

image
Works

@dainpfx00342
Copy link

Thank you so much!

@bilalop
Copy link

bilalop commented Jan 22, 2025

image

When fix for this version (app.asar) ?

@Aminesassy
Copy link

thank youuu soo mush love you man <3

@TheLime1
Copy link

it works but cant load the pro stuff , also im getting the warning like @bilalop

image

When fix for this version (app.asar) ?

@montasser99
Copy link

Thank you so much <3

@K1ethoang
Copy link
Author

image

When fix for this version (app.asar) ?

I have updated for v6.3.1, you can check it!

@rlan10
Copy link

rlan10 commented Feb 7, 2025

Thank you very much for your

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