I have put a new snapshot on http://lalescu.ro/liviu/fet/download/test/ (the usual location). Only tar.bz2 for now.
The ChangeLog:
- Added a fet.desktop file (by Alexey Loginov).
- Fixed some comments concerning the GNU GPL license (reported by Alexey Loginov).
- Added a "make install" option (suggested by Alexey Loginov).
Please help testing these. Test "make install" on your system (with "sudo"), then "make uninstall" (again with "sudo"). Check the locations /usr/share/fet/translations/, /usr/share/applications/fet.desktop, /usr/share/doc/fet/, usr/share/man/man1/, /usr/bin/, /usr/share/fet/examples/. After uninstall, everything is OK, the only remaining empty directory is /usr/share/fet/ (can this removed also automatically?) Check the fet.pro file (which is using qmake options for this). Have I forgot/mistaken anything?
Later edit: I found a trick and also /usr/share/fet/ is removed after "make uninstall". But I need to deploy all the translations directory, including unnecessary .ts files.
I don't know about qmake rules, but is it possible to set the paths? On FreeBSD the packages will install into /usr/local (as in the autoconf tools the PREFIX variable).
Oh, yes, is it possible:
executables.path ?= /usr/bin
So please add a question mark before equal sign (all path not only executables) :)
In this case if user run qmake-qt4 without arguments the paths will be the default but when run with qmake-qt4 executables.path=/usr/local/bin the executables path will be /usr/local/bin.
INSTALLS: there is an INSTALLS += line in fet.pro. Before this line INSTALLS has some value? Would be nice INSTALLS ?= same above because fet (http://www.freshports.org/deskutils/fet)-port has options to install examples or translations. And maybe a plus "option" to avoid to build fet (and build only fet-cl, see port's ONLYCL option) via SUBDIRS.
I've modified fet.pro, please check. And if it's okay, should update "install" section in README.
TEMPLATE = subdirs
isEmpty(DISABLEGUI) {
USUBDIRS = src/src.pro src/src-cl.pro
} else {
USUBDIRS = src/src-cl.pro
}
SUBDIRS += $$USUBDIRS
message($$SUBDIRS)
isEmpty(PREFIX) {
PREFIX=/usr
}
isEmpty(translations.path) {
translations.path = $$PREFIX/share/fet
}
translations.files = translations/
isEmpty(desktop.path) {
desktop.path = $$PREFIX/share/applications
}
desktop.files = fet.desktop
isEmpty(documentation.path) {
documentation.path = $$PREFIX/share/doc/fet
}
documentation.files = doc/* AUTHORS COPYING ChangeLog README REFERENCES THANKS TODO TRANSLATORS
isEmpty(manual.path) {
manual.path = $$PREFIX/share/man/man1
}
manual.files = man/*
isEmpty(executables.path) {
executables.path = $$PREFIX/bin
}
isEmpty(DISABLEGUI) {
executables.files = fet fet-cl
} else {
executables.files = fet-cl
}
isEmpty(examples.path) {
examples.path = $$PREFIX/share/fet
}
examples.files = examples/
INSTALLS += translations desktop manual documentation executables examples
INSTALLS -= $$EXCLUDEINSTALL
Thank you, Zsolt, but unfortunately I used you last script and there are problems. The only problem of "make install" is that it does not copy "fet-cl" into "/usr/bin/". The problems of "make uninstall" are that it tries to remove "/usr/share/applications/", "/usr/share/man/man1/", and "/usr/bin/".
I am using openSuse 13.1. I attach my Makefile.
I investigated further. It might be a Qt bug. It seems that even with my variant the bugs appear. I just switched to Qt 5.3.2. The fact that fet-cl is not copied appears if you compile from scratch. If you hit "make" after one successful compilation, the bug is no longer present (and the executables are also stripped).
I didn't ever used Qt and *.pro files. I've read manual and seen these possibilities, I've tested (only create Makefile) and it seemed it worked (generating Makefile).
make uninstall: does anybody use? :)
Hello, Liviu,
1) missing picture for desktop file ( http://svnweb.mageia.org/packages/cauldron/fet/current/SOURCES/fet.xpm?view=co ), to put into /usr/share/pixmaps/
2) it's enough to install only *.qm without *.ts
3) Will you implement autodetect language while the first run for fet?
4) invalid-desktopfile (you should move Enter):
Comment[el]=Δημιουργήστε προγράμματα διδακτικών ωρών για εκπαιδευτικά
ιδρύματα
->
Comment[el]=Δημιουργήστε προγράμματα διδακτικών ωρών για εκπαιδευτικά ιδρύματα
Comment[pl]=Generuje plany zajęć, rozkłady i grafiki dla instytucji
edukacyjnych
->
Comment[pl]=Generuje plany zajęć, rozkłady i grafiki dla instytucji edukacyjnych
fet.i586: W: invalid-desktopfile /usr/share/applications/fet.desktop file contains line "ιδρύματα", which is not a comment, a group or an entry
fet.i586: W: invalid-desktopfile /usr/share/applications/fet.desktop file contains line "edukacyjnych", which is not a comment, a group or an entry
In my opinion make uninstall must work (perfect). Some guys like to do that if they update a package.
About the icon: Maybe we should use the "official" icons?
You needs fet.xpm for Debian anyway, but you can add other icons. If you have svg, then put into /usr/share/icons/hicolor/scalable/apps/, for png: into /usr/share/pixmaps/
Ah. ok. Thank you for that information.
Looks like Gimp can export into xpm, so there shouldn't be a problem to generate that.
Do you know a link to some information about the needed xpm by Debian? (for example needed width and high?)
http://ftp.br.debian.org/debian/pool/main/f/fet/
fet_5.22.0-0.1.diff.gz
fet-5.22.0/debian/fet.xpm
48*48
It was imported from Debian into Mageia Linux: http://svnweb.mageia.org/packages/cauldron/fet/current/SOURCES/fet.xpm?view=co
Zsolt, thank you very much! It was a problem because the target files are not available before compiling. So I added install information about fet and fet-cl in src.pro and src-cl.pro. It works now. Also "make uninstall" should work.
Alex, thank you very much! :
1) I created two pictures, please check; I preferred a .svg and a .png;
2) I only install *.qm;
3) I cannot do that: many languages are incompletely/badly translated.
4) Corrected, thanks!
I have just put a new snapshot on the same usual location, http://lalescu.ro/liviu/fet/download/test/ . Please let me know.
I'll compile now for Windows and put a new version.
The icon is subject to change, if anybody has the courage to challenge my extraordinary drawing talent :))
Edited to add: I added also the Windows executable.
Translations were not installed.
You can reproduce: make install INSTALL_ROOT=/path/dir
fet.i586: W: no-manual-page-for-binary fet-cl
Quote from: AlexL on September 20, 2014, 09:24:18 PM
Translations were not installed.
You can reproduce: make install INSTALL_ROOT=/path/dir
Translations need to be in /usr/share/fet/translations/ , always. This is where FET executable searches for them. Maybe you could tell me how to correct this.
Quote
fet.i586: W: no-manual-page-for-binary fet-cl
I'll try to make a manual page for fet-cl.
Quote from: Liviu Lalescu on September 21, 2014, 07:27:19 AM
Translations need to be in /usr/share/fet/translations/ , always. This is where FET executable searches for them. Maybe you could tell me how to correct this.
Maybe can you set from fet.pro (translations.path)? Maybe this (http://qtway.blogspot.hu/2013/04/using-variables-from-project-file-pro.html) helps.
Quote from: Zsolt Udvari on September 21, 2014, 09:42:56 AM
Quote from: Liviu Lalescu on September 21, 2014, 07:27:19 AM
Translations need to be in /usr/share/fet/translations/ , always. This is where FET executable searches for them. Maybe you could tell me how to correct this.
Maybe can you set from fet.pro (translations.path)? Maybe this (http://qtway.blogspot.hu/2013/04/using-variables-from-project-file-pro.html) helps.
We need something different. The user to specify the prefix for "make install" and this to be taken as the directory for translations, to be modified in the sources. It is difficult, maybe impossible. So I might be forced to not allow changing the default make install prefix, /usr.
I have given a thought. Zsolt, I am very sorry, but I gave up on modifying the installation location and other checks. This should be done by a configure script, and I am unable to handle. I guess you need to manually change fet.pro if you want some fine tuning, like disabling GUI or other components.
Alex, I added a manual for fet-cl. Unfortunately, I cannot fix the translations problem, they need to be installed as usual, in /usr/share/fet/translations/ .
I added a new snapshot, please test. The location, as usual, http://lalescu.ro/liviu/fet/download/test/ .
The Windows exe has an icon. If somebody has a Mac, please tell me if that exe also has an icon (the fet executable obtained after compiling and maybe installing).
Quote from: Liviu Lalescu on September 21, 2014, 01:45:12 PM
I have given a thought. Zsolt, I am very sorry, but I gave up on modifying the installation location and other checks. This should be done by a configure script, and I am unable to handle. I guess you need to manually change fet.pro if you want some fine tuning, like disabling GUI or other components.
Okay, no problem. When I will have time, I'll try it - I think it isn't too difficult.
I just added a new snapshot, minor improvements.
I just added a new snapshot, with better icons (higher resolution).
I have a question for Windows users: please unpack the 7-zip self-extracting archive, do not run fet.exe, just see if this file (fet.exe) has the icon I made (FET and a cube underneath). Maybe see the file in Total Commander, and in Explorer, and create a shortcut on the desktop.
I am using a compressed ico file and it seems that for older programs it is not processed correctly.
In FET it will be always shown correctly. I am referring to the icon representing the file fet.exe.
Tell me your detailed Windows version.
The icons shows up for Mac. See the attached screen shots.
If to use
make install INSTALL_ROOT=/path/dir
then translations should be installed into /path/dir/usr/share/fet/translations/
but *.qm are not installed now, dir /path/dir/usr/share/fet/translations was not created.
Quote from: AlexL on September 22, 2014, 05:55:50 AM
If to use
make install INSTALL_ROOT=/path/dir
then translations should be installed into /path/dir/usr/share/fet/translations/
but *.qm are not installed now, dir /path/dir/usr/share/fet/translations was not created.
The fet.pro file is correct.
It works on my computer, the directory is created and the *.qm files are copied to /path/dir/usr/share/fet/translations/ .
I don't know what to do.
Please tell me, "make install" works correctly on your computer?
Quote from: Liviu Lalescu on September 22, 2014, 07:24:16 AM
It works on my computer, the directory is created and the *.qm files are copied to /path/dir/usr/share/fet/translations/ .
I don't know what to do.
Please tell me, "make install" works correctly on your computer?
No, translations *.qm does not install.
You should use more difficult .pro file for installation of translations, for example, https://github.com/viktor-zin/afce/blob/master/afce.pro
qm files is not simple files
I added a new snapshot, minor improvement.
Alex, the translation files *.qm are available before compiling, so they should be simply copied as in your suggested file above. There is no need for the special ending procedure.
I am sorry, but I think it will remain this way. I cannot find/solve the bug.
This string works:
translations.files = translations/*
or string:
translations.files = translations/*.ts
but string:
translations.files = translations/*.qm
does not work
qm files is not simple files
Please tell me your Qt version and maybe OS (32, 64 bit?)
Please tell me if the attached file works (overwrite, type "make", then "make install"). Tell me if all the files in the fet-5.23.3-snapshot-.../translations/ directory are copied (including the *.qm ones).
But this is not a good solution, because:
1) We should only copy the *.qm files;
2) On my computer (64 bit openSuse 13.1, Qt 5.3.2) it works with *.qm; also on a Mac (reported by Yush), it works.
I saw this page: https://github.com/leppa/tspsg/blob/master/INSTALL.md
Quote
4.2. General Procedure
On most platforms the general building and installation procedure is:
Run lrelease to generate binary translation files (.qm) from the source (.ts).
Run qmake with CONFIG+=release parameter to generate makefiles.
Run make utility (e.g., make, nmake, mingw32-make) to build TSPSG.
Run make utility with install parameter.
NOTE: It is important to run lrelease before qmake, or qmake will not "pick up" the translations when generating installation rules.
Could you please, using the official snapshot (not the variant in the post above), try if this works? lrelease should be invoked like: go to src/ directory, then type "lrelease src.pro".
But I think this is only a problem for Qt 4; I hope they repaired this problem in Qt 5, at least in the last Qt 5.3.2. Because I would not like to add such a command, because I prefer to keep track of lrelease myself.
fet-5.23.3-snapshot-23-sept-2014-08_55.tar.bz2: everything is OK, problem was on my side with translations, I'm sorry.
If you don't want to run fet with current language instead of English, then maybe will you provide patch? I don't see problems with translations. Popular languages are translated more, than 50% and I want to build fet in repo without English only by default. The second way to use option while building. The third way is command line option for fet. Better the second way; if not, then the first way; if not, then the third way.
I'm glad it worked out with the translations.
"qmake fet.pro" - what options would you like to give, and how, to this command, so that FET uses the system locale?
But I don't like it. Many translations are really bad and not verified. A single letter makes the difference.
I will try to do that tomorrow. Now it is late here and I am tired.
OK, I did that. Please get the new snapshot (same location - http://lalescu.ro/liviu/fet/download/test/ ), and read the README file, or compile with <<qmake fet.pro "DEFINES+=USE_SYSTEM_LOCALE">>.
Very important: recompile from the start (unpack a the FET archive in a new place, or type "make distclean"). Also, remove the configuration file for FET from your computer, as written in the README (otherwise, FET will get the starting language from there).
Please let me know.
interface/fet.cpp: In function 'void readSimulationParameters()':
interface/fet.cpp:244:61: error: request for member 'name' in 'QLocale::system', which is of non-class type 'QLocale()'
Sorry, corrected, please try again now and let me know (I have just put the new file).
Builds fine with clang.
Quote from: Zsolt Udvari on September 24, 2014, 05:40:40 PM
Builds fine with clang.
Thank you. Do you mean simply <<qmake>> (the old variant), or <<qmake fet.pro "DEFINES+=USE_SYSTEM_LOCALE">> ?
Both :)
Thank you! For that with USE_SYSTEM_LOCALE, it works? You can verify this as written above, or enter Settings -> Restore defaults, tell me what number 6. says, and after that the language should be your language (Hungarian, I suppose).
I cannot verify this, I have en_US as my locale.
Builds fine, but language is English.
Quote from: AlexL on September 24, 2014, 07:21:10 PM
Builds fine, but language is English.
Remove the configuration file for FET from your computer, as written in the README (otherwise, FET will get the starting language from there),
or
enter Settings -> Restore defaults, tell me what number 6. says (should be "ru (system locale)"), and after that the language should be your language (Russian, I suppose).
6. Language will be ru_RU (system locale)
but in fettimetabling.conf: language=en_US always
Oh, it's another bug from me. I'll try to fix this right away.
I have just put a new snapshot. Could you please check it?
Edit: sorry, I found another mistake. I'll fix it now.
I just have put the latest version. Alex, could you test? Compile with USE_SYSTEM_LOCALE and test in those two ways: remove the config file, and the second test is to restore the default settings. Test more kinds of changing the language, and generating on a simple file, and testing the language of the HTML result files.
Tomorrow I'll put also the Windows version. Now it is late.
I have put a new version, with minor source cleanup. Please test as in the previous post.
Everything is OK now.
Quote from: AlexL on September 25, 2014, 01:53:05 PM
Everything is OK now.
Thank you for your persistence! The final release will be in probably a week.
I have put a new version, with a minor improvement. Alex, could you please test once more, if you don't mind? As above ( http://lalescu.ro/liviu/fet/forum/index.php?topic=1757.msg9444#msg9444 )
Hello, Liviu,
works for me.
Thank you!
The release will be probably tonight or tomorrow.
Alex, I released the new version. Thank you!
I will lock this topic. New comments can be made on the new version announcement topic.