Skip to content

Commit

Permalink
Remove remanence of libuiohook
Browse files Browse the repository at this point in the history
  • Loading branch information
pierr3 committed May 9, 2024
1 parent b32fa37 commit 3c14d14
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 77 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ Download the latest release on the [release page](https://github.com/pierr3/Trac

### Dependencies

TrackAudio depends on afv-native and libuiohook.
TrackAudio depends on afv-native and SFML (for input handling).

`cmake` is required to build the project. Dependencies will be downloaded through vcpkg at build time. See vcpkg.json for further details.

On linux, the following packages are required: `build-essentials libxt-dev libxrandr-dev libxtst-dev libx11-dev`, you may also need further packages to enable the different audio backends, such as Alsa, JACK or PulseAudio.
On linux, the following packages are required: `build-essentials libx11-dev libxrandr-dev libxcursor-dev libxi-dev libudev-dev libgl1-mesa-dev pkg-config`, you may also need further packages to enable the different audio backends, such as Alsa, JACK or PulseAudio.

On macOS, XCode Command Line tools, CMake and Homebrew are required and the following homebrew package is required: `pkg-config`

Expand Down
65 changes: 0 additions & 65 deletions forge.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,71 +203,6 @@ const config: ForgeConfig = {
console.error("An error occurred while copying the file:", error);
}
},
packageAfterPrune: async (_, buildPath, __, platform) => {
// This installs uiohook-napi
const commands = [
"install",
"--no-bin-links",
"--omit=dev",
"--no--save",
"--no-package-lock",
"uiohook-napi",
];
return new Promise((resolve, reject) => {
// const cwd = process.cwd();
const oldPckgJson = path.join(buildPath, "package.json");
const newPckgJson = path.join(buildPath, "_package.json");

fs.renameSync(oldPckgJson, newPckgJson);
const npmInstall = spawn("npm", commands, {
cwd: buildPath,
stdio: "inherit",
shell: true,
});

npmInstall.on("close", (code) => {
if (code === 0) {
fs.renameSync(newPckgJson, oldPckgJson);

/**
* On windows code signing fails for ARM binaries etc.,
* we remove them here
*/
if (platform === "win32") {
const problematicPaths = [
"darwin-x64",
"darwin-arm64",
"linux-arm64",
"linux-x64",
];

problematicPaths.forEach((binaryFolder) => {
fs.rmSync(
path.join(
buildPath,
"node_modules",
"uiohook-napi",
"prebuilds",
binaryFolder
),
{ recursive: true, force: true }
);
});
}

// We now manually install the track-audio-afv package

resolve();
} else {
reject(new Error("process finished with error code " + code));
}
});

npmInstall.on("error", (error) => {
reject(error);
});
});
},
},
};

Expand Down
3 changes: 1 addition & 2 deletions webpack.main.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ export const mainConfig: Configuration = {
plugins,
resolve: {
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json', '.scss'],
},
externals: ["uiohook-napi"]
}
};
8 changes: 0 additions & 8 deletions webpack.plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,4 @@ export const plugins = [
new ForkTsCheckerWebpackPlugin({
logger: 'webpack-infrastructure',
}),
// new CopyPlugin({
// patterns: [
// {
// from: path.resolve(__dirname, "./node_modules/uiohook-napi/prebuilds"),
// to: "node_modules/uiohook-napi/prebuilds"
// }
// ]
// }),
];

0 comments on commit 3c14d14

Please sign in to comment.