.obj are not packaged
- Electron-Builder Version: 22.10.5
- Node Version: 16.x
- Electron Version: 13
- Electron Type (current, beta, nightly): current
- Target: win / mac / linux
What's the rationale behind excluding .obj files?
https://github.com/electron-userland/electron-builder/blob/c623279a31d3d203ad1f150d83905a7e1f58a731/packages/app-builder-lib/src/util/appFileCopier.ts#L172
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Yes, still relevant. Awaiting any feedback on:
What's the rationale behind excluding .obj files?
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
It is still the case.
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
bump
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment, or this will be closed in 30 days.
Still valid
What's the rationale behind excluding .obj files?
No clue on rationale for it, it's a 7yr old commit.
i have the same issue. as i understand form the context of the code it is to exclude build artifacts from being put into an Electron app - but in my case it is the Wavefront OBJ-format for 3D meshes. somehow (opposed to this being a 7yr old commit) it worked in electron-builder v25, but with v26 the files are not copied any more.
is this the issue you are also having, @dmnsgn ?
Yes same reason, I also need to include Wavefront .obj in my app.
Wait a sec, I just remembered we have a some workarounds that were added for odd/edge cases like this.
Please try either:
Config prop disabledefaultignoredfiles (note, you'll need to fully define/copy the other ignored extensions and excluded files since this completely disables all)
https://www.electron.build/app-builder-lib.interface.configuration#disabledefaultignoredfiles
Should interface with this:
https://github.com/electron-userland/electron-builder/blob/836a15c6c70abf8582aaa63603e14f77d5fa3f89/packages/app-builder-lib/src/fileMatcher.ts#L14-L19
If this .obj is in a node_module, then you can return true from this build hook to force include the files. Return false to use default logic
https://www.electron.build/app-builder-lib.interface.configuration#onnodemodulefile
thanks for the reply! i tried disableDefaultIgnoredFiles but it did not help. here is my electron-builder.ts:
import { Configuration } from "electron-builder";
const configElectronBuilder: Configuration = {
appId: "com.company.myapp",
productName: "MyApp",
icon: "./public/logo/bounce/256x256.png",
files: ["start-electron.js", "dist/**/*"],
disableDefaultIgnoredFiles: true,
win: {
icon: "./public/logo/generated/myapp.ico",
},
asar: false,
linux: {
executableName: "MyApp",
category: "Utility",
target: ["dir", "AppImage"],
},
directories: {
buildResources: "resources",
output: "release",
},
onNodeModuleFile: () => true, // tried this as well
};
export default configElectronBuilder;
setting disableDefaultIgnoredFiles to true had no effect. i run vite build && electron-builder --config electron-builder.ts, so basically it takes the transpiled output from dist folder which contain the .obj files. in my situation it is not about obj files being in the node_modules.
is there anything else i can do? i hope that insights for my case help others too, like dmnsgn :)
btw, i updated from electron-builder v25 to v26.3 (had to update it manually to this minor version)