>>5963>this, but how does someone build a workshop from scratch for this? machinery is expensive and if you want something that doesn't blow up on you after a bit there might be better ways than roughing it with power tools.It's not as difficult as you'd think. Just pick a simple design and buy steel tubing and whatever other materials you need and manufacture all the individual parts one by one. You might start with the barrel, that being the most important part and the trickiest, particularly if you want rifling, but even that is doable with some pretty basic tools; see video. I don't know what the laws are about this outside of the US, but in the US you can legally make firearms at home for personal use, you just can't sell them or distribute them without a license.
It will probably take some trial and error and experimentation; you'd need to set up a test firing range a safe area where you clamp your gun down to a stable surface aimed in a safe direction and test fire it by pulling a string to actuate the trigger while standing very far away or behind some kind of barricade. It might be good to start off with something very simple, like a single-shot gun or even a black powder muzzleloader gun, before attempting something more complex. Just be prepared to spend a lot of money on ammunition for all the test firing you'll have to do.