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

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

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

Post 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
Last edited by Joakim Christiansen on Tue Dec 04, 2007 2:26 am, edited 6 times in total.
I like logic, hence I dislike humans but love computers.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Post 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.
User avatar
GeoTrail
Addict
Addict
Posts: 2794
Joined: Fri Feb 13, 2004 12:45 am
Location: Bergen, Norway
Contact:

Post by GeoTrail »

Excellent program Joakim :)
Makes me proud to be Norwegian 8)
I Stepped On A Cornflake!!! Now I'm A Cereal Killer!
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Very very cool! Thank you!
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
User avatar
GG
Enthusiast
Enthusiast
Posts: 266
Joined: Tue Jul 26, 2005 12:02 pm
Location: Lieusaint (77), France

Post by GG »

Very nice work ! :)
Purebasic 6.12 64 bits - Windows 11 Pro 64 bits 23H2
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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...
Last edited by Joakim Christiansen on Thu Jul 12, 2007 12:18 am, edited 1 time in total.
I like logic, hence I dislike humans but love computers.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post 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
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post by Kale »

Nice work!

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

Image
freak
PureBasic Team
PureBasic Team
Posts: 5940
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post 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.)
quidquid Latine dictum sit altum videtur
Kale
PureBasic Expert
PureBasic Expert
Posts: 3000
Joined: Fri Apr 25, 2003 6:03 pm
Location: Lincoln, UK
Contact:

Post 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!
--Kale

Image
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Post 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 ?
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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)
I like logic, hence I dislike humans but love computers.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Post 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...
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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)
I like logic, hence I dislike humans but love computers.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post 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.
I like logic, hence I dislike humans but love computers.
Post Reply