Page 1 of 3

JLC's Internet TV v1.1 Beta 5 (old)

Posted: Mon Jul 09, 2007 7:38 pm
by Joakim Christiansen
Image
http://www.jlc-software.com/InternetTV.zip

Made some big changes in this version:
The users are now in total control of the online database
Adult content for subscribers (50+ channels)
Users can now rate and submit channels
Nice icons in the menus
Better looking start screen
Multilingual support
Windows Vista UAC compatibility (hopefully)
Compatibility with portable devices (/portable)
Faster responding user interface
Column widths are now remembered
Many bug fixes

New in beta 4b and 5:
Redesigned the settings window
Option to select which categories to receive
Improved rating system (easier to find popular channels)
Option to remember last visited country
Fixed porn channels (no need to open any webpages)
Fixed language reset on update

Posted: Tue Jul 10, 2007 11:33 pm
by HeX0R
Wow :!:
I really love this thing.
Always had to fight with TVAnts (especially their chinese site ;) ).

Will edit, when i find bugs or have suggestions.

Posted: Tue Jul 10, 2007 11:56 pm
by GeoTrail
Excellent program Joakim :)
Makes me proud to be Norwegian 8)

Posted: Wed Jul 11, 2007 10:38 am
by Inf0Byt3
Very very cool! Thank you!

Posted: Wed Jul 11, 2007 11:45 am
by GG
Very nice work ! :)

Posted: Wed Jul 11, 2007 3:33 pm
by Joakim Christiansen
Thanks! :D

But there is something weird that happens on some computes and I don't know why. It extract it files in the same folder, but it should be in the appdata folder! I was wondering if anyone could figure this out?

The code goes like this: EDIT: It was just me being tired and not noticing the obvious...

Code: Select all

Procedure.s GetSpecialFolderPath(CSIDL.l)
  Protected *itemid.ITEMIDLIST, location.s = Space(#MAX_PATH)
  If SHGetSpecialFolderLocation_(0,CSIDL,@*itemid) = #NOERROR
    If SHGetPathFromIDList_(*itemid,@location)
      ProcedureReturn location
    EndIf
  EndIf
EndProcedure

Global AppdataPath$ = GetSpecialFolderPath(#CSIDL_APPDATA)

If Not ProgramParameter(0) = "/portable"
  If Not FileSize(AppdataPath$+"\JLC's Software")=-2
    Debug CreateDirectory(AppdataPath$+"\JLC's Software")
  EndIf
  If Not FileSize(AppdataPath$+"\JLC's Software\Internet TV")=-2
    Debug CreateDirectory(AppdataPath$+"\JLC's Software\Internet TV")
  EndIf
  SetCurrentDirectory(AppdataPath$+"\JLC's Software\Internet TV")
EndIf

Path.s = GetCurrentDirectory()
If FileSize(Path+"background.gif") = -1 And CreateFile(0,Path+"background.gif")
  WriteData(0,?File1,?File2-?File1)
  CloseFile(0)
EndIf
;etc...

Posted: Wed Jul 11, 2007 3:54 pm
by Inf0Byt3
I guess that's because you do this:

Code: Select all

Path.s = GetCurrentDirectory()
Why don't you try this? (not tested)

Code: Select all

Procedure.s GetSpecialFolderPath(CSIDL.l)
  Protected *itemid.ITEMIDLIST, location.s = Space(#MAX_PATH)
  If SHGetSpecialFolderLocation_(0,CSIDL,@*itemid) = #NOERROR
    If SHGetPathFromIDList_(*itemid,@location)
      ProcedureReturn location
    EndIf
  EndIf
EndProcedure

Global AppdataPath$ = GetSpecialFolderPath(#CSIDL_APPDATA)+"\"

If Not ProgramParameter(0) = "/portable"
  If Not FileSize(AppdataPath$+"\JLC's Software")=-2
    Debug CreateDirectory(AppdataPath$+"\JLC's Software")
  EndIf
  If Not FileSize(AppdataPath$+"\JLC's Software\Internet TV")=-2
    Debug CreateDirectory(AppdataPath$+"\JLC's Software\Internet TV")
  EndIf
  MyFolder.s = AppdataPath$+"\JLC's Software\Internet TV"
  If FileSize(MyFolder+"background.gif") = -1 And CreateFile(0,MyFolder+"background.gif")
    WriteData(0,?File1,?File2-?File1)
    CloseFile(0)
  EndIf
EndIf

Posted: Wed Jul 11, 2007 4:31 pm
by Kale
Nice work!

I saw this on the cover disk of this months PC Format. :)

Posted: Wed Jul 11, 2007 5:32 pm
by freak
I did some tests on Vista with the Standard User Analyzer.
It did not have much to report except for some "denied access" messages when
opening a number of registry keys for write access.
If your program is prepared for that, then there is no problem. else you should maybe
try opening the keys for reading only if possible.

What the analyzer tool lacks is a good export function, thats why i cannot post the
results here, so you better try this yourself:

Get the toolkit here: (requires the .NET framework version 1.1)
http://www.microsoft.com/downloads/deta ... layLang=en

What you have to do is simply run the "Standard User Analyzer" tool, choose
your Program's exe and click "Launch". Then just use the program as normal
for a while and then quit it. The analyzer should then display a number of messages
related to actual or possible errors with access rights.
It is a quite useful tool for testing on Vista imho.

(btw, your program also put the files in the programs directory, not the Appdata folder here.)

Posted: Wed Jul 11, 2007 6:06 pm
by Kale
freak wrote:Get the toolkit here: (requires the .NET framework version 1.1)
http://www.microsoft.com/downloads/deta ... layLang=en
Nice find, very useful!

Posted: Wed Jul 11, 2007 6:25 pm
by HeX0R
I hope you didn't really have a

Code: Select all

Debug
-command left in your code.
Maybe thats why this directorys never were created (no debugger in exe...) and SetCurrentDirectory fails ?

Posted: Wed Jul 11, 2007 6:28 pm
by Joakim Christiansen
freak wrote:some "denied access" messages when opening a number of registry keys for write access.
If your program is prepared for that, then there is no problem. else you should maybe try opening the keys for reading only if possible.
I don't know why it would touch the registry, I didn't use any registry functions in it at all. But maybe windows media player does this.
freak wrote:(btw, your program also put the files in the programs directory, not the Appdata folder here.)
I try to figure out why this happens on some systems, still no luck... I'm interested in knowing what they did in the PB editor for this to work.
HeX0R wrote:I hope you didn't really have a

Code: Select all

Debug
-command left in your code.
Maybe thats why this directorys never were created (no debugger in exe...) and SetCurrentDirectory fails ?
But when you compile a exe doesn't it remove all the "debugs" in it? So I don't think that's the problem.
Inf0Byt3 wrote:I guess that's because you do this:

Code: Select all

Path.s = GetCurrentDirectory()
But notice that I did that after a SetCurrentDirectory(). But I can try your advice anyway and see if it helps.
Kale wrote:Nice work!
I saw this on the cover disk of this months PC Format. :)
Thanks!
Yes, that's pretty cool! :D They e-mailed me about it and asked if they could add it on their cd. (the old version)

Posted: Wed Jul 11, 2007 6:56 pm
by HeX0R
Joakim Christiansen wrote: But when you compile a exe doesn't it remove all the "debugs" in it? So I don't think that's the problem.
Just try your above code with debugger disabled and you will see, that no directory is created...

Posted: Wed Jul 11, 2007 10:54 pm
by Joakim Christiansen
Now it has multilingual support, please help me translate it to several different languages, I've already translated it to Norwegian. (no unicode support yet btw)

Posted: Thu Jul 12, 2007 12:13 am
by Joakim Christiansen
HeX0R wrote:
Joakim Christiansen wrote: But when you compile a exe doesn't it remove all the "debugs" in it? So I don't think that's the problem.
Just try your above code with debugger disabled and you will see, that no directory is created...
Of course! Thank you!
:lol: :oops: omg, how could I overlook that... Problem solved I think! (will update it soon)

EDIT:
Would be nice if anyone could help me make a good NSIS installer script, I'm not very good at that installer system yet. I want a modern looking installer with options to install startmenu shortcuts and a desktop shortcut. Also one that deletes all files when uninstalling. And support for installing languages would be nice since I have multilingual support now.