birdal46 / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

'Make install' list of lua scripts is hardcoded in makefile, and installed anyway if NOLUA=1. #413

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The removed scripts are still present in src/Makefile so make install exits 
with:

cp: cannot stat `../share/grafx2/scripts/pic_ni_Colorspace12bit.lua': No such 
file or directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_Colorspace15bit.lua': No such 
file or directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_Colorspace18bit.lua': No such 
file or directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_Grid8.lua': No such file or 
directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_Grid8red.lua': No such file or 
directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_GridIso.lua': No such file or 
directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_PaletteX1.lua': No such file or 
directory
cp: cannot stat `../share/grafx2/scripts/pic_ni_PaletteX8.lua': No such file or 
directory
make: *** [install] Error 1
    Aborting...

Patch included (only removed the entries), but to prevent similar bumps on the 
ride, is it be possible to
a) make the script list dynamical (add all *.lua in /path/to/scripts to list)
b) cd into the directory and cp *.lua from there?
or do they all just have to be manually added to or removed from the Makefile?

Original issue reported on code.google.com by sm4...@yahoo.com on 16 Jan 2011 at 7:47

Attachments:

GoogleCodeExporter commented 8 years ago
Oh, and I also noticed the scripts get installed even if built with NOLUA=1. Is 
this wanted behavior? If there's no support for the scripts I see no particular 
reason for them to be installed at all, or what do others say?

Original comment by sm4...@yahoo.com on 16 Jan 2011 at 7:53

GoogleCodeExporter commented 8 years ago
The scripts whose name stats whith _tst_ should not be installed.
Wildcards are a bit tricky because the makefile is mutiplatform, and on amiga 
the wildcard is not *.*, but #?.
Other than that, you're right.

Original comment by pulkoma...@gmail.com on 17 Jan 2011 at 7:05

GoogleCodeExporter commented 8 years ago
If the user has created some scripts of his own, uninstall shouldn't delete 
them. This is reason enough for me to state the exact list of files to copy and 
delete.

Also, on install/uninstall, the Makefile has no way to know if the program was 
built with NOLUA=1, so it installs them anyway - this part can't fail as long 
as we get the list right.

Anyway, now that we handle subdirectories for scripts browsing, we're probably 
going to rework the directory tree... Maybe based on the prefixes by 
DawnBringer (scene, picture, brush, palette,...), maybe also something to 
separate everyday tools from "demo" scripts.

Original comment by yrizoud on 17 Jan 2011 at 8:32

GoogleCodeExporter commented 8 years ago
@yrizoud:
"Also, on install/uninstall, the Makefile has no way to know if the program was 
built with NOLUA=1, so it installs them anyway"
..hmm.. you're right about that. That's when the ./configure script usually 
comes in handy, right? I'm asking this only because I don't know?

Original comment by sm4...@yahoo.com on 17 Jan 2011 at 10:34

GoogleCodeExporter commented 8 years ago
Yes, that'd be the kind of things ./configure usually does.
For this project, we decided to go on an "everything in the makefile" approach, 
because it sounded simpler. (the autoconf tools are doing too much things 
beyond human understanding). Getting the makefile to work on all platforms is a 
bit tricky, but so far we got it working.

We could store the build settings in version.c (generated at buildtime) and get 
the makefile to parse it, but doing that in a cross platform way would likely 
be a nightmare. However, make install only needs to work for unixish platforms, 
so we could actually use wildcards in this particular area.

We need folders in the lua-script directory, but I'm not sure about 
Dawnbringer's layout. I'd drop the 'scene' folder, at least. Demo scripts could 
be moved to a "demo" folder, or even be made part of the 'art disk' package we 
plan to make available (see other issue in this bugtracker).

Original comment by pulkoma...@gmail.com on 17 Jan 2011 at 7:39

GoogleCodeExporter commented 8 years ago
Fixed by Yves yesterday as emergency fix, we still want something more 
automated :)

Original comment by pulkoma...@gmail.com on 20 Jan 2011 at 8:39

GoogleCodeExporter commented 8 years ago

Original comment by pulkoma...@gmail.com on 15 Feb 2011 at 8:12

GoogleCodeExporter commented 8 years ago

Original comment by pulkoma...@gmail.com on 10 Apr 2011 at 8:38