Jump to content
Ketarin forum

Omniferum

Members
  • Posts

    304
  • Joined

  • Last visited

Posts posted by Omniferum

  1. <?xml version='1.0' encoding='utf-8'?>
    <Jobs>
     <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="b8ef28aa-9c14-43e2-b8e7-1947f24fe139">
    <WebsiteUrl>{url}</WebsiteUrl>
    <UserAgent>{sfua}</UserAgent>
    <UserNotes />
    <LastFileSize>93156</LastFileSize>
    <LastFileDate>2012-01-23T21:22:15.4837461</LastFileDate>
    <IgnoreFileInformation>false</IgnoreFileInformation>
    <DownloadBeta>Default</DownloadBeta>
    <DownloadDate xsi:nil="true" />
    <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
    <VariableChangeIndicator>version</VariableChangeIndicator>
    <CanBeShared>true</CanBeShared>
    <ShareApplication>false</ShareApplication>
    <ExclusiveDownload>false</ExclusiveDownload>
    <HttpReferer />
    <SetupInstructions>
      <SetupInstruction xsi:type="CustomSetupInstruction">
    	<Code>::Use this if the file you are downloading is a binary that can be unzipped and run
    {7z} x "{file}" -o"{temppath}{appname:regexreplace: \(.*\):}" -y
    for /f "tokens=2 delims=[]" %a in ('dir /b /s "{temppath}{appname:regexreplace: \(.*\):}\*.exe" ^| find /v /n "" ^| findstr /c:[1]') do set dir=%~dpa*
    {copyfolder} "%dir%" "{installpath}{category}\{appname:regexreplace: \(.*\):}\"
    rd /s /q "{temppath}{appname:regexreplace: \(.*\):}"</Code>
    	<Type>Batch</Type>
      </SetupInstruction>
    </SetupInstructions>
    <Variables>
      <item>
    	<key>
    	  <string>download</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex>([^"'<>\*]+files[^"'<>\*]+\.(zip|7z|rar|exe|msi))</Regex>
    		<Url>http://sourceforge.net{refer2}</Url>
    		<Name>download</Name>
    	  </UrlVariable>
    	</value>
      </item>
      <item>
    	<key>
    	  <string>name</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex><title>(.*?)[\s-]+</Regex>
    		<Url>http://sourceforge.net{page}</Url>
    		<Name>name</Name>
    	  </UrlVariable>
    	</value>
      </item>
      <item>
    	<key>
    	  <string>page</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex>[^"';=]+files[^"';=]+</Regex>
    		<Url>{url}</Url>
    		<Name>page</Name>
    	  </UrlVariable>
    	</value>
      </item>
      <item>
    	<key>
    	  <string>refer1</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex>folder.*?([^"']+files[^"']+)</Regex>
    		<Url>http://sourceforge.net{page}</Url>
    		<Name>refer1</Name>
    	  </UrlVariable>
    	</value>
      </item>
      <item>
    	<key>
    	  <string>refer2</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex>folder.*?([^"']+files[^"']+)</Regex>
    		<Url>http://sourceforge.net{refer1}</Url>
    		<Name>refer2</Name>
    	  </UrlVariable>
    	</value>
      </item>
      <item>
    	<key>
    	  <string>url</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex>[^"']+projects[^"']+</Regex>
    		<Url>http://sourceforge.net/projects/rbtray/</Url>
    		<Name>url</Name>
    	  </UrlVariable>
    	</value>
      </item>
      <item>
    	<key>
    	  <string>version</string>
    	</key>
    	<value>
    	  <UrlVariable>
    		<RegexRightToLeft>false</RegexRightToLeft>
    		<VariableType>RegularExpression</VariableType>
    		<Regex>dateupdated.*?([^"'>]+)<</Regex>
    		<Url>{page}</Url>
    		<Name>version</Name>
    	  </UrlVariable>
    	</value>
      </item>
    </Variables>
    <ExecuteCommand>/*This is a comment line, the line below is the C# script. It will run the instructions found in the Setup Tab. If the command below is encapsulated with stars and slashes merely remove them to make the command function, otherwise it will remain a comment*/
    app.Install(null);</ExecuteCommand>
    <ExecutePreCommand />
    <ExecuteCommandType>CS</ExecuteCommandType>
    <ExecutePreCommandType>Batch</ExecutePreCommandType>
    <SourceType>FixedUrl</SourceType>
    <PreviousLocation>Z:\Software\Ketarin Maintained Applications\Productivity\RBTray-4_3.zip</PreviousLocation>
    <DeletePreviousFile>true</DeletePreviousFile>
    <Enabled>true</Enabled>
    <FileHippoId />
    <LastUpdated>2012-01-23T21:22:15.4837461</LastUpdated>
    <TargetPath>{downloadpath}{category}\</TargetPath>
    <FixedDownloadUrl>{download}</FixedDownloadUrl>
    <Name>RBTray</Name>
     </ApplicationJob>
    </Jobs>
    

  2. Can anyone shed some light on this problem? All other souceforge apps were created with the exact same template but only THIS app is causing trouble.

     

    26/01/2012 2:13:27 PM: Update started with 1 application(s)
    26/01/2012 2:13:28 PM: RBTray: Replacing {url} in '{url}' with 'http://sourceforge.net/projects/rbtray/'
    26/01/2012 2:13:29 PM: RBTray: Replacing {page} in 'http://sourceforge.net{page}' with '/projects/rbtray/files/'
    26/01/2012 2:13:30 PM: RBTray: Replacing {refer1} in 'http://sourceforge.net{refer1}' with '/projects/rbtray/files/rbtray/'
    26/01/2012 2:13:31 PM: RBTray: Replacing {refer2} in 'http://sourceforge.net{refer2}' with '/projects/rbtray/files/rbtray/4.3/'
    26/01/2012 2:13:32 PM: RBTray: Replacing {download} in '{download}' with 'http://sourceforge.net/projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip'
    26/01/2012 2:13:32 PM: RBTray: Using referer: (none)
    26/01/2012 2:13:35 PM: RBTray: Server source file: /projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip
    26/01/2012 2:13:35 PM: RBTray: Determined target file name: Z:\Software\Ketarin Maintained Applications\Productivity\RBTray-4_3.zip
    26/01/2012 2:13:35 PM: RBTray: Checking if update is required...
    26/01/2012 2:13:36 PM: RBTray: Replacing {url} in '{url}' with 'http://sourceforge.net/projects/rbtray/'
    26/01/2012 2:13:37 PM: RBTray: Replacing {page} in '{page}' with '/projects/rbtray/files/'
    26/01/2012 2:13:38 PM: RBTray: Failed, The format of the URI "/projects/rbtray/files/" cannot be determined.
    26/01/2012 2:13:39 PM: RBTray: Replacing {url} in '{url}' with 'http://sourceforge.net/projects/rbtray/'
    26/01/2012 2:13:40 PM: RBTray: Replacing {page} in 'http://sourceforge.net{page}' with '/projects/rbtray/files/'
    26/01/2012 2:13:41 PM: RBTray: Replacing {refer1} in 'http://sourceforge.net{refer1}' with '/projects/rbtray/files/rbtray/'
    26/01/2012 2:13:42 PM: RBTray: Replacing {refer2} in 'http://sourceforge.net{refer2}' with '/projects/rbtray/files/rbtray/4.3/'
    26/01/2012 2:13:45 PM: RBTray: Replacing {download} in '{download}' with 'http://sourceforge.net/projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip'
    26/01/2012 2:13:45 PM: RBTray: Using referer: (none)
    26/01/2012 2:13:47 PM: RBTray: Server source file: /projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip
    26/01/2012 2:13:47 PM: RBTray: Determined target file name: Z:\Software\Ketarin Maintained Applications\Productivity\RBTray-4_3.zip
    26/01/2012 2:13:47 PM: RBTray: Checking if update is required...
    26/01/2012 2:13:48 PM: RBTray: Replacing {url} in '{url}' with 'http://sourceforge.net/projects/rbtray/'
    26/01/2012 2:13:50 PM: RBTray: Replacing {page} in '{page}' with '/projects/rbtray/files/'
    26/01/2012 2:13:50 PM: RBTray: Failed, The format of the URI "/projects/rbtray/files/" cannot be determined.
    26/01/2012 2:13:51 PM: RBTray: Replacing {url} in '{url}' with 'http://sourceforge.net/projects/rbtray/'
    26/01/2012 2:13:52 PM: RBTray: Replacing {page} in 'http://sourceforge.net{page}' with '/projects/rbtray/files/'
    26/01/2012 2:13:53 PM: RBTray: Replacing {refer1} in 'http://sourceforge.net{refer1}' with '/projects/rbtray/files/rbtray/'
    26/01/2012 2:13:54 PM: RBTray: Replacing {refer2} in 'http://sourceforge.net{refer2}' with '/projects/rbtray/files/rbtray/4.3/'
    26/01/2012 2:13:55 PM: RBTray: Replacing {download} in '{download}' with 'http://sourceforge.net/projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip'
    26/01/2012 2:13:55 PM: RBTray: Using referer: (none)
    26/01/2012 2:13:58 PM: RBTray: Server source file: /projects/rbtray/files/rbtray/4.3/RBTray-4_3.zip
    26/01/2012 2:13:58 PM: RBTray: Determined target file name: Z:\Software\Ketarin Maintained Applications\Productivity\RBTray-4_3.zip
    26/01/2012 2:13:58 PM: RBTray: Checking if update is required...
    26/01/2012 2:13:59 PM: RBTray: Replacing {url} in '{url}' with 'http://sourceforge.net/projects/rbtray/'
    26/01/2012 2:14:00 PM: RBTray: Replacing {page} in '{page}' with '/projects/rbtray/files/'
    26/01/2012 2:14:00 PM: RBTray: Failed, The format of the URI "/projects/rbtray/files/" cannot be determined.
    26/01/2012 2:14:00 PM: Executing command: rd /s /q "Z:\Ketatemp\"
    26/01/2012 2:14:00 PM: Command result: Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    

  3. Hah, haven't touched this for a while. The 'if defined' command seems to work perfectly fine. It is having a problem with the whole goto loop. Anybody got a :loop in their batch file that is working successfully? I could just pipe this out to an external batch file but that would kind of defeat the purpose. Perhaps the way Ketarin interprets batch commands doesn't allow for loops?

     

    25/01/2012 9:51:53 AM: FirefoxPortable: Executing command: :loop
    25/01/2012 9:51:53 AM: FirefoxPortable: Executing command: set run=
    25/01/2012 9:51:53 AM: FirefoxPortable: Executing command: for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    25/01/2012 9:51:53 AM: FirefoxPortable: Executing command: if defined run goto loop
    25/01/2012 9:51:53 AM: FirefoxPortable: Executing command: ::"Z:\Programs\Internet\Ketarin\AHK\autohotkey.exe" "Z:\Programs\Internet\Ketarin\PA.ahk" "Z:\Software\Ketarin Maintained Applications\Private\FirefoxPortable_9.0.1_English.paf.exe" "Z:\Programs\Private\FirefoxPortable" "Firefox"
    25/01/2012 9:51:53 AM: FirefoxPortable: Command result: Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    Z:\Programs\Internet\Ketarin>:loop
    Z:\Programs\Internet\Ketarin>set run=
    Z:\Programs\Internet\Ketarin>for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    Z:\Programs\Internet\Ketarin>set run=AutoHotkey.exe
    Z:\Programs\Internet\Ketarin>if defined run goto loop
    Z:\Programs\Internet\Ketarin>::"Z:\Programs\Internet\Ketarin\AHK\autohotkey.exe" "Z:\Programs\Internet\Ketarin\PA.ahk" "Z:\Software\Ketarin Maintained Applications\Private\FirefoxPortable_9.0.1_English.paf.exe" "Z:\Programs\Private\FirefoxPortable" "Firefox"
    Z:\Programs\Internet\Ketarin>
    
    25/01/2012 9:52:14 AM: FirefoxPortable: Executing command: :loop
    25/01/2012 9:52:14 AM: FirefoxPortable: Executing command: set run=
    25/01/2012 9:52:14 AM: FirefoxPortable: Executing command: for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    25/01/2012 9:52:14 AM: FirefoxPortable: Executing command: if defined run echo 
    25/01/2012 9:52:14 AM: FirefoxPortable: Executing command: ::"Z:\Programs\Internet\Ketarin\AHK\autohotkey.exe" "Z:\Programs\Internet\Ketarin\PA.ahk" "Z:\Software\Ketarin Maintained Applications\Private\FirefoxPortable_9.0.1_English.paf.exe" "Z:\Programs\Private\FirefoxPortable" "Firefox"
    25/01/2012 9:52:14 AM: FirefoxPortable: Command result: Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    Z:\Programs\Internet\Ketarin>:loop
    Z:\Programs\Internet\Ketarin>set run=
    Z:\Programs\Internet\Ketarin>for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    Z:\Programs\Internet\Ketarin>set run=AutoHotkey.exe
    Z:\Programs\Internet\Ketarin>if defined run echo 
    
    Z:\Programs\Internet\Ketarin>::"Z:\Programs\Internet\Ketarin\AHK\autohotkey.exe" "Z:\Programs\Internet\Ketarin\PA.ahk" "Z:\Software\Ketarin Maintained Applications\Private\FirefoxPortable_9.0.1_English.paf.exe" "Z:\Programs\Private\FirefoxPortable" "Firefox"
    Z:\Programs\Internet\Ketarin>
    

  4. That's all the log gives even though autohotkey.exe IS running, I am running it manually to make sure the :loop thing works. Again this seems to be the same sort of 'if defined' problem. The log isn't very helpful but as you can see it does set run to something, just ignores 'if defined'

     

    12/11/2011 6:53:33 PM: ThunderbirdPortable: Executing command: :loop
    12/11/2011 6:53:33 PM: ThunderbirdPortable: Executing command: set run=
    12/11/2011 6:53:33 PM: ThunderbirdPortable: Executing command: for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    12/11/2011 6:53:33 PM: ThunderbirdPortable: Executing command: if defined run goto loop
    12/11/2011 6:53:33 PM: ThunderbirdPortable: Executing command: "Z:\Programs\Internet\Ketarin\AHK\autohotkey.exe" "Z:\Programs\Internet\Ketarin\PA.ahk" "Z:\Software\Automatically Updated\Private\ThunderbirdPortable_8.0_English.paf.exe" "Z:\Programs\Private\ThunderbirdPortable" "Thunderbird"
    12/11/2011 6:53:36 PM: ThunderbirdPortable: Command result: Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    Z:\Programs\Internet\Ketarin>:loop
    Z:\Programs\Internet\Ketarin>set run=
    Z:\Programs\Internet\Ketarin>for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    Z:\Programs\Internet\Ketarin>set run=AutoHotkey.exe
    Z:\Programs\Internet\Ketarin>if defined run goto loop
    Z:\Programs\Internet\Ketarin>"Z:\Programs\Internet\Ketarin\AHK\autohotkey.exe" "Z:\Programs\Internet\Ketarin\PA.ahk" "Z:\Software\Automatically Updated\Private\ThunderbirdPortable_8.0_English.paf.exe" "Z:\Programs\Private\ThunderbirdPortable" "Thunderbird"
    Z:\Programs\Internet\Ketarin>
    

  5. 12/11/2011 7:07:08 PM: Nvidia Driver (Win7 x64): Executing command: for /f "tokens=*" %a in ('wmic path win32_VideoController get Name ^| findstr "ATI"') do set displaydriver=%a
    12/11/2011 7:07:08 PM: Nvidia Driver (Win7 x64): Executing command: if defined displaydriver exit 2
    12/11/2011 7:07:08 PM: Nvidia Driver (Win7 x64): Executing command: START CMD /C "ECHO Nvidia Driver (Win7 x64): This applications installation will start after you hit any key, wait for Ketarin to finish & PAUSE & "Z:\Software\Automatically Updated\Driver\285.62-desktop-win7-winvista-64bit-english-whql.exe""
    

     

    This is on Windows 7 Ultimate 64-bit. I'm not sure why the OS would matter as it worked pefectly fine before. It seems to be with the if defined concept of the batch file and doesn't actually check it.

  6. If the log file is only generated after 'all updates are completed' then just add an extra line so that if something gets written an extra file gets created as well

     

    Then just

     

    if exist change.txt c:\program.exe

    del change.txt

     

    Should be the easiest solution

     

    As to detect for 'appending' couldn't you just dump two files into a variable then compare them?

     

    for /f "tokens=*" %a in ('type log.txt') do set log=%a

    for /f "tokens=*" %a in ('type {changelog}') do set change=%a

     

    if "%log%" EQU "%change%" exit

  7. I'm just wondering why this piece of code doesn't work in the setup instructions

     

    :loop
    set run=
    for /f "tokens=1 delims= " %a in ('tasklist ^| findstr /I autohotkey') do set run=%a
    if defined run goto loop
    

     

    It works in a batch file perfectly fine and as you can see i'm just trying to make it so that it basically waits for an existing AHK script to finish before starting the install of this one. Any pointers?

     

    EDIT:

     

    Actually one extra batch script problem i'm having.

     

    for /F "tokens=*" %a in ('dir /b /s "{root}ThunderbirdPortable.exe"') do set folder=%~dpa

    "{AHK}" "{startuppath}PA.ahk" "{file}" "%folder%"" "{appname:replace:Portable:}"

     

    When I use that it gives an output of the thunderbird folder with extra stuff. Namely

    "GPG

     

    It is the GPG for thunderbird portable app but when I check the log %folder% is accurately resolving to JUST the folder path so i'm not sure why the extra stuff. The script works fine for everything else with ketarin built-in variables but for this one I need it to be a self-defined variable.

  8. Out of curiosity as an addition (actually I may have posted this idea elsewhere as well) could we have an argument for /install="<applicationanname>,<applicationname>,<applicationname>" so on and so forth? That way it can just parse an existing XML instead of us having to keep separate ones for separate things. Helps techies.

  9. I'm still testing with a blank ketarin (with a jobs.db in the same folder)

     

    The trouble is anything I change in the placeholders Ketarin never prompts me to "update" the apps i've added previously. Can someone please point to me or post a FULLY working prototype template that, when you import it, it goes "Would you like to update other apps wiht this Guid?" or whatever the prompt actually is? I've never seen it personally

  10. Ok so it is something to do with the soucetemplate tags i've found.

     

    If I use notepad++

     

    Use extended regex replace \r\n and replace it with zxczxczxc (to make it all one line) and then regex replace <soucetemplate>.*?</sourcetemplate> with nothing, to delete all instances of it, it will re-import my large database back perfectly fine and I can then add prototype templates.

     

    The ONLY thing I want to know before I make this my official piece of usage is DOES that sourcetemplate or CDATA stuff have ANYTHING important in them? I don't want to find 'odd problems' down the line because accidentally it turns out they WERE important

  11. Hey UksusoFF, try the template in my https://ketarin.org/forum/index.php/topic/759-prototype-template-problem/ thread

     

    You may be having the same problem I am, I describe the issue in a bit more detail there. I know english isn't your first language but if you want a short version see if the template imports correctly into a 'fresh' ketarin. Like backup your current ketarin and delete all the applications out of it then try to import, if it works then there is something wrong with 'another' applications stuff.

     

    I'm still waiting for floele to comment on this problem because it has me stumped and going through almost 170 apps worth of CDATA just to eradicate/find problems would waste an entire day. It may be something wrong with how ketarin processes the data or tries to import prototype templates? It may even be because when WE added our apps in older versions the newer versions of ketarin may have done something different.

  12. I've even tried to import the prototype template from here https://ketarin.org/...__fromsearch__1

     

    Same error i'm given if I keep the Guid in. Deleting the <SourceTemplate><![CDATA[]]></SourceTemplate> doesn't affect the ability to import it.

     

    I don't see what the problem is. I made a FRESH Ketarin (just unzipped it and created a blank jobs.db file in the same folder) and the template imports perfectly fine into the new/untouched ketarin.

     

    Deleting all the apps out of my original Ketarin install lets me import the template perfectly fine.

     

    Odd though when I export my old ketarin to an .xml I can't re-import it. Gives me an error code in some line somewhere. A problem more peculiar than I originally thought but why would my other apps have any affect on this bloody thing? Re-importing the global variables/settings is fine, it still lets me import my prototype template. I'm just not sure why it is 'other apps' in my ketarin that is affecting my using any part of prototype templates.

     

    Any ideas flo?

     

    EDIT:

     

    I get different errors on re-importing my entire jobs.xml depending on how I export it. If I do it via cli or the menu option "Export all" it gives me an error on a certain line, if I just highlight them all in ketarin, hit ctrl+c and paste it into a blank XML it gives me a different error from a different line upon importing. My exported stuff contains a lot of that CDATA stuff, is that really necessary or can it be causing any of these difficulties?

  13. I don't get to the part where I can give input values, it just gives that CDATA error instantly. Dragging and dropping the .xml into the ketarin makes nothing happen. Using the 'import' function from the menu gives me that error I stated in the first post. Copying and pasting the code directly into Ketarin doesn't achieve anything either like it does for other templates.

     

    It really is only when that Guid="" is added, otherwise it is fine.

     

    But yeah I don't even get to the 'input values' part, it just fails outright. I am obviously using the latest b2

  14. Below is my attempt at a prototype template, i've only recently decided to actually try and use them. The only thing though is that if all we are supposed to do is add a Guid="" to the revelant spot then why won't ketarin import the below template when I add the Guid?

     

    Without the Guid there this template works perfectly.

     

    I'm not sure what i'm missing to make THIS a proper prototype template.

     

    Can anyone help?

     

    The error I get is "Failed to import the file: Unexpected end of file while parsing CDATA has occured. Line 4, position 30."

     

    <?xml version='1.0' encoding='utf-8'?>
    <Jobs>
     <ApplicationJob xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Guid="d50a8125-c88a-4a28-9512-356ec933e423">
       <WebsiteUrl>{page}</WebsiteUrl>
       <UserNotes />
       <IgnoreFileInformation>false</IgnoreFileInformation>
       <DownloadBeta>Default</DownloadBeta>
       <CheckForUpdatesOnly>false</CheckForUpdatesOnly>
       <VariableChangeIndicator>version</VariableChangeIndicator>
       <CanBeShared>true</CanBeShared>
       <ShareApplication>false</ShareApplication>
       <ExclusiveDownload>false</ExclusiveDownload>
       <UserAgent>{sfua}</UserAgent>
       <HttpReferer />
       <Variables>
      <item>
        <key>
    	  <string>download</string>
        </key>
        <value>
    	  <UrlVariable>
    	    <RegexRightToLeft>false</RegexRightToLeft>
    	    <VariableType>RegularExpression</VariableType>
    	    <Regex>folder.*?([^"']+files[^"']+\.\w\w\w)</Regex>
    	    <Url>http://sourceforge.net{refer2}</Url>
    	    <Name>download</Name>
    	  </UrlVariable>
        </value>
      </item>
      <item>
        <key>
    	  <string>name</string>
        </key>
        <value>
    	  <UrlVariable>
    	    <RegexRightToLeft>false</RegexRightToLeft>
    	    <VariableType>RegularExpression</VariableType>
    	    <Regex><title>(.*?)[\s-]+</Regex>
    	    <Url>{page}</Url>
    	    <Name>name</Name>
    	  </UrlVariable>
        </value>
      </item>
      <item>
        <key>
    	  <string>page</string>
        </key>
        <value>
    	  <UrlVariable>
    	    <RegexRightToLeft>false</RegexRightToLeft>
    	    <VariableType>RegularExpression</VariableType>
    	    <Regex> = '(http://s.*?)["']</Regex>
    	    <Url><placeholder name="Application URL" /></Url>
    	    <Name>page</Name>
    	  </UrlVariable>
        </value>
      </item>
      <item>
        <key>
    	  <string>refer1</string>
        </key>
        <value>
    	  <UrlVariable>
    	    <RegexRightToLeft>false</RegexRightToLeft>
    	    <VariableType>RegularExpression</VariableType>
    	    <Regex>folder.*?([^"']+files[^"']+)</Regex>
    	    <Url>{page}\files</Url>
    	    <Name>refer1</Name>
    	  </UrlVariable>
        </value>
      </item>
      <item>
        <key>
    	  <string>refer2</string>
        </key>
        <value>
    	  <UrlVariable>
    	    <RegexRightToLeft>false</RegexRightToLeft>
    	    <VariableType>RegularExpression</VariableType>
    	    <Regex>folder.*?([^"']+files[^"']+)</Regex>
    	    <Url>http://sourceforge.net{refer1}</Url>
    	    <Name>refer2</Name>
    	  </UrlVariable>
        </value>
      </item>
      <item>
        <key>
    	  <string>version</string>
        </key>
        <value>
    	  <UrlVariable>
    	    <RegexRightToLeft>false</RegexRightToLeft>
    	    <VariableType>RegularExpression</VariableType>
    	    <Regex>Last Update.*?>([\d\-]+)</Regex>
    	    <Url>{page}</Url>
    	    <Name>version</Name>
    	  </UrlVariable>
        </value>
      </item>
       </Variables>    <ExecuteCommand>/*This is a comment line, the line below is the C# script. It will run the instructions found in the Setup Tab*/
    app.Install(null);</ExecuteCommand>
       <ExecutePreCommand />
       <ExecuteCommandType>CS</ExecuteCommandType>
       <ExecutePreCommandType>Batch</ExecutePreCommandType>
       <SetupInstructions>
      <SetupInstruction xsi:type="CustomSetupInstruction">
        <Code>::Use this if the file you are downloading is a binary that can be unzipped and run
    {7z} x "{file}" -o"{temppath}{appname:regexreplace: \(.*\):}" -y
    for /f "tokens=2 delims=[]" %a in ('dir /b /s "{temppath}{appname:regexreplace: \(.*\):}\*.exe" ^| find /v /n "" ^| findstr /c:[1]') do set dir=%~dpa*
    {copyfolder} "%dir%" "{installpath}{category}\{appname:regexreplace: \(.*\):}\"
    rd /s /q "{temppath}{appname:regexreplace: \(.*\):}"</Code>
        <Type>Batch</Type>
      </SetupInstruction>
      <SetupInstruction xsi:type="CustomSetupInstruction">
        <Code>::Use this if the file you are downloading is an executable that can be UniExtracted and run
    {ue} "{file}" "{temppath}{appname:regexreplace: \(.*\):}"
    for /f "tokens=2 delims=[]" %a in ('dir /b /s "{temppath}{appname:regexreplace: \(.*\):}\*.exe" ^| find /v /n "" ^| findstr /c:[1]') do set dir=%~dpa*
    {copyfolder} "%dir%" "{installpath}{category}\{appname:regexreplace: \(.*\):}\"
    rd /s /q "{temppath}{appname:regexreplace: \(.*\):}"</Code>
        <Type>Batch</Type>
      </SetupInstruction>
      <SetupInstruction xsi:type="CustomSetupInstruction">
        <Code>::Use this if your file cannot be installed automatically and needs to be run manually after Ketarin finishes
    START CMD /C "ECHO Re: {appname} You will have to run this file manually after Ketarin finishes updating && PAUSE"
    &</Code>
        <Type>Batch</Type>
      </SetupInstruction>
      <SetupInstruction xsi:type="CustomSetupInstruction">
        <Code>::Use this if your download is a standalone executable which just needs to be copied to the right place
    {copyfile} "{file}" "{installpath}{category}\{appname:regexreplace: \(.*\):}\"</Code>
        <Type>Batch</Type>
      </SetupInstruction>
       </SetupInstructions>
       <Category><placeholder name="Category" options="{categories}" /></Category>
       <SourceType>FixedUrl</SourceType>
       <DeletePreviousFile>true</DeletePreviousFile>
       <Enabled>true</Enabled>
       <FileHippoId />
       <TargetPath>{downloadpath}{category}\</TargetPath>
       <FixedDownloadUrl>{download}</FixedDownloadUrl>
       <Name><placeholder name="Name of application" variable="name" /></Name>
     </ApplicationJob>
    </Jobs>
    

  15. This piece of code use to work fine

     

     

    ::Keep this if your file cannot be installed and/or downloaded automatically and needs to be processed after Ketarin finishes
    for /f "tokens=*" %a in ('wmic path win32_VideoController get Name ^| findstr "ATI"') do set displaydriver=%a
    if defined displaydriver exit 2
    START CMD /C "ECHO {appname}: This applications installation will start after you hit any key, wait for Ketarin to finish & PAUSE & "{file}""
    &
    

     

    But I had to change it to this because it kept processing the rest of the script regardless of the exit 2

    ::Keep this if your file cannot be installed and/or downloaded automatically and needs to be processed after Ketarin finishes
    for /f "tokens=*" %a in ('wmic path win32_VideoController get Name ^| findstr "ATI"') do set displaydriver=%a
    if defined displaydriver exit 2 else (START CMD /C "ECHO {appname}: This applications installation will start after you hit any key, wait for Ketarin to finish & PAUSE & "{file}"" &)
    

     

     

    Is this intentional? I relied on exit 2 in a bunch of scripts as it just ended the script and 'exited' then and there.

  16. Further note/expansion on that previous idea. Again it is just a 'testing' option so we can see what everything is resolving to ultimately, I tried the custom column but it doesn't really work very well. A lot of apps can be just direct URL's and manually going through them etc. etc. plus it is hard to manually check THAT large a database of apps which i'm sure everyone in this forum has.

     

    If you could add a special status category icon (maybe just a question mark icon) saying "The download URL resolved to empty or something that did not result in a file being downloaded" so it could 'really' highlight the necessity for it to be investigated. The standard error icon really just makes me go "I have to re-do that because it just didn't work at that time".

     

    Oh, on that note i'm sure I asked before and don't want to be a pest about it but a reminder nonetheless. When all the updates are complete and it says "These things failed" could a button be on that window saying "Re-attempt to download these failed items" (a tad long I know you get the point though).

     

    Also if we could get the option for 'persistent error status' icons, so that if it failed during the first download and we re-load ketarin we know that application didn't do it right the first time around so we can investigate why if it doesn't work the SECOND time. The error status code gets to remain persistent until a 'success download' happens, not resolving the download to "0" or anything but a file actually comes through.

     

    Last point is can we make the applications that have the option ticked "Do not download this application simultaneously along with other applications" be defaulted to being the LAST ones checked? Otherwise it screws up the processing order. Like if you have have a list of 100 apps it will go through a bunch then it will wait for this one app to do it when 50 others could've been checked in the same timeframe and just sitting there.

     

    Wish you knew how much Ketarin has saved me, thanks a million Floele. Sorry for the barrage, my brain sometimes can't shut up.

  17. Just one teeny feature request type thing which I think everyone would enjoy.

     

    Could you add a checkbox in the 'settings' menu that would just warn if the download variable is empty or if no file is found, that way we can enable it to do a 'test' check of all our apps to make sure they are resolving to the proper file names or to anything at all. I suppose I could make a custom column with {property:download} (or whatever it is) but that seems a tad clunky.

     

    Just as a sort of 'tester' setting because when you have 200 apps and i've constantly gone "This hasn't updated in a while, why?" and then having to manually check or even accidentally find out it is because of a huge page change it is kinda irritating.

     

    I'm aware I could probably write a PS or batch script to capture the whole page, detect blah blah blah but that would be a LOT of code to add and it does seem like something that should be base functionality.

     

    Still implementation of the function would be handy, however it goes in.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.