Skip to content

Instantly share code, notes, and snippets.

nikitalita / GPL-
Last active August 17, 2021 00:22
Dynamic linking a GPL program with the Discord Game SDK
View GPL-

(Disclaimer: IANAL, this does not constitute legal advice, seek a lawyer for more guidance if necessary)

GPL and other FOSS licenses are only concerned with distribution; indeed, restrictions on use are forbidden by free software and open source definitions, it can only enforce restrictions on distribution. So, GPL clauses come into force whenever a GPL program is distributed to other people.

The thing that's at issue here is the FSF's interpretation of copyright law when it comes to software and derivative works.

  • First, the FSF takes the position that a program that dynamic links against a library at runtime with constitutes a derivative work; you've combined a program and a library to make a new program.
  • Second, "collectivity": They take the position that when you distribute said program with said library, you are distributing a "combined" program that constitutes a derivative work, even if said combination actually happens at runtime. The argument is that when you distribute them together,
nikitalita / afterpack.js
Created September 16, 2020 10:02
electron-builder afterPack hook to fix nested node_modules bug
View afterpack.js
'use strict';
This is a hack to get around the issues with electron-builder not including nested node_modules.
We do this by simply making the asar ourselves using the parameters from the build.
This takes the asar file that we have created, unpacks it, then copies in the nested node_modules
directories from the app directory.
This also preserves any asar unpacked files that you may have had in the build, and unpacks any
nested node_modules files that might have been unpacked as well.