Author Topic: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)  (Read 59157 times)

0 Members and 1 Guest are viewing this topic.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #75 on: August 10, 2013, 02:53:58 pm »
If some program relies on specific files and the program binary being in a specific location in /documents, is it possible to disable linking?
Is is possible to associate a file extension to a hidden program?

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #76 on: August 10, 2013, 02:56:31 pm »
If some program relies on specific files and the program binary being in a specific location in /documents, is it possible to disable linking?
This shouldn't be necessary, because every Ndless program can easily be adapted to use relative paths (with enable_relative_paths()).

Quote
Is is possible to associate a file extension to a hidden program?
Yup, as ndless's ploader scans the whole filesystem (except /phoenix) for executables AFAIK.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #77 on: August 10, 2013, 03:05:50 pm »
Could you add an option "savefile=" or something similiar where you can list a file as savefile in the package metadata?
On uninstallation, the user will (if the program has savefiles and they exist) be prompted whether they should be removed.
It's hard to remove files in /pacspire..

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #78 on: August 10, 2013, 03:10:37 pm »
I don't know if this has been said ealier or not, but this made me think about uninstallation :

Would it be possible to hook the deletion of the lnk file (if any) to trigger pacspire so that it can properly uninstall everything, as you say ?
« Last Edit: August 10, 2013, 03:13:02 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline compu

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 275
  • Rating: +63/-3
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #79 on: August 10, 2013, 03:20:03 pm »
Could you add an option "savefile=" or something similiar where you can list a file as savefile in the package metadata?
On uninstallation, the user will (if the program has savefiles and they exist) be prompted whether they should be removed.
It's hard to remove files in /pacspire..
Sure, but maybe something like savefolder would be better? :P

Would it be possible to hook the deletion of the lnk file (if any) to trigger pacspire so that it can properly uninstall everything, as you say ?
Possible: Yes, but probably not for me. Maybe someone who is better at reverse engineering could do it ;)
I'll make a GUI where it will be possible to remove packages.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #80 on: August 10, 2013, 03:30:39 pm »
Possible: Yes, but probably not for me. Maybe someone who is better at reverse engineering could do it ;)
I'll make a GUI where it will be possible to remove packages.
On TI-Nspire CX CAS, somewhere between 0x102167A8 and 0x102167F8 you have in [R4] (char **) a pointer to the char sequence containing the name of the currently confirmed deleted file.
« Last Edit: August 10, 2013, 03:31:04 pm by Levak »
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #81 on: August 10, 2013, 03:35:44 pm »
Isn't it easier to simply hook the remove() function?
(Not the function itself, the location it's pointing to)

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #82 on: August 10, 2013, 03:59:57 pm »
Isn't it easier to simply hook the remove() function?
(Not the function itself, the location it's pointing to)
remove() is not even called because TI.
I guess it has something to do with the Ctrl+Z feature of undoing deleting files ?
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #83 on: August 10, 2013, 04:10:29 pm »
You can undo deleting files? Reminds me of DOS "undelete".
« Last Edit: August 10, 2013, 04:18:48 pm by Vogtinator »

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #84 on: August 10, 2013, 05:54:52 pm »
Quote
you're simply restraining the target of the whole project to a few dozens people...
There are far more than "a few dozen persons" who can install Ndless...

As a side note, to get a rough idea of how may new users try Ndless: there are about 1400 visits of the Ndless user guide each month.
Ndless.me with the finest TI-Nspire programs

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #85 on: August 10, 2013, 07:37:04 pm »
Quote
you're simply restraining the target of the whole project to a few dozens people...
There are far more than "a few dozen persons" who can install Ndless...

As a side note, to get a rough idea of how may new users try Ndless: there are about 1400 visits of the Ndless user guide each month.

Well, of course a lot of people install ndless (even thought we don't really know the % compared to the number of Nspires in the world (this would be very cool to know even if it would probably be scarily low in absolute, partly because a lot of handhelds are owned by schools and not students....)

But as I was saying :
Quote
Of course, but not so many if you're combining the conditions : getting aware of the project && getting convinced it is a good idea && resticting (with no other motive than pissing the management off) to ndless files.
I'm just trying to help growing the targeted people ("catchment area" / "zone de chalandise" :P)


Oh and, on our (TI-Planet) part, Ndless 3.1, launched in late January 2012, reached 40k downloads a few days ago (or was it yesterday ?) and is the most downloaded file every week I believe (not counting exam stuff when it's exam time, though), and is the 1st overall (again not counting the exam stuff). Approx 71 times / day , 2100 / month.
« Last Edit: August 10, 2013, 07:50:44 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #86 on: August 10, 2013, 08:50:40 pm »
Lionel, you said libti* couldn't handle files in nested directorys, but that is simply wrong, because it works just fine :P
The next thing I'm trying to do is making a simple JNI lib for libti* for java, just as proof-of-concept.

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #87 on: August 11, 2013, 01:48:03 am »
Quote
Lionel, you said libti* couldn't handle files in nested directorys, but that is simply wrong, because it works just fine :P
The test program enables doing more stuff, but dirlist of a hierarchy containing nested directories does not work as it should (although an old commit at least prevents it from crashing upon such directory hierarchives, which it used to do) ;)
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.

Offline Vogtinator

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1193
  • Rating: +108/-5
  • Instruction counter
    • View Profile
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #88 on: August 11, 2013, 06:58:13 am »
Quote
The test program enables doing more stuff, but dirlist of a hierarchy containing nested directories does not work as it should (although an old commit at least prevents it from crashing upon such directory hierarchives, which it used to do)
Umm, it does work? File size and type are correct as well.
Code: [Select]
TRYF(cmd_s_dir_enum_init(handle, "ndless/games"));
TRYF(cmd_r_dir_enum_init(handle));
I overwrote folder_name with "ndless/games" in the library and tilp shows the files just fine :P

Offline Lionel Debroux

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2135
  • Rating: +290/-45
    • View Profile
    • TI-Chess Team
Re: pacspire - A simple package manager for the TI-Nspire/Ndless (WIP)
« Reply #89 on: August 11, 2013, 07:13:33 am »
While some pieces happen to work, as you've noticed, the Nspire dirlist code simply does not handle recursive enumeration of more than one level in the hierarchy.
To see what I mean: on the calculator side, create an a1 folder at the root of the documents folder, then an a2 folder inside a1, then an a3 folder inside a2; then, on the computer side, trigger a dirlist from the root of the hierarchy. a2 is not enumerated, and it has broken type itself.

Locally, I've had some working code for higher-recursivity Nspire dirlist for a long time (like, more than a year), but I never finished reworking and cleaning up the dirlist data structure (some Glib trees) -> UI data structure (some GTK+ trees) code in TILP, so as to add support for > 1 level of folders (Nspire OS 2.xx and 3.xx) without breaking 0-level (TI-Z80) and 1-level (TI-68k) support.

And the code base contains assumptions that there's a single / in a valid calculator-side path. Nested folders trip that assumption. At select places, invocations to strchr()-type functions would have to be replaced by strrchr()-type functions.
« Last Edit: August 11, 2013, 07:19:33 am by Lionel Debroux »
Member of the TI-Chess Team.
Co-maintainer of GCC4TI (GCC4TI online documentation), TILP and TIEmu.
Co-admin of TI-Planet.