remogatto / gospeccy

A ZX Spectrum Emulator written in Go
http://github.com/remogatto/gospeccy
MIT License
122 stars 16 forks source link

Add Makefile install task to install bin and resource files #5

Closed remogatto closed 13 years ago

remogatto commented 13 years ago

Currently, the root Makefile lacks of an "install" task. This prevent the user to install the gospeccy executable in $GOBIN. It also prevent to install resources files like the system ROM.

remogatto commented 13 years ago

Fixed as of 3131dbc84b37ab2f872ab5ed3572016c40685958 I'll wait for feedback before closing it.

ghost commented 13 years ago

It looks OK (I haven't tested whether it actually works, but I suppose it does).

remogatto commented 13 years ago

Russ Cox on golang-nuts ML suggested the use of runtime.GOROOT() to search for system roms:

I would suggest including the ROM in your tree and having the emulator 
load it from there, using runtime.GOROOT() to create the path.
ghost commented 13 years ago

It is a good idea. The full path would be "GOROOT/pkg/linux_386/gospeccy/roms/48.rom"?

remogatto commented 13 years ago

Yes.

ghost commented 13 years ago

The commit http://github.com/0xe2-0x9a-0x9b/gospeccy/commit/2f701dec107ac784af4933e0d0c58a25bff72df9 should make GOARCH and GOOS available from Go code, so that the path element "linux_386" can be created at runtime.

remogatto commented 13 years ago

It seems that GOOS and GOARCH constants were added in the runtime package as of changeset 6158:523da6275fc6. We could infer them at runtime now.

remogatto commented 13 years ago

Fixed as of c451c4f8002d832cbe8089dc7c52414232798c2c