Jump to content

- - - - -

[Tool collection] Server Upload

  • Please log in to reply
3 replies to this topic

#1 pscEx


    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
    European Union

Posted 10 April 2009 - 08:26 PM

Because I'm not sure that this will work in non-nativeEx projects, I publish here rather than in 'Development'. But project authors of other projects are invited to test and tell the results.

I got the idea for this package by an issue I have had sometimes:
When uploading some changed scripts, I forgot to consider the 'factory settings' and therefore: If a new user downloads the complete project, he/she usually have had some issues with wrong options he/she could not understand and therefore posted in the forum.

For the user this post is logical and necessary, but for the project it is unnecessary!

Therefore I built this 'Server Upload Suite'.

General idea:
Anywhere there is an 'upload area'.
The files inside the 'upload area' are uploaded to the server.
The 'upload area' is actualized from a 'work area', where you can test and change scripts.
The actualization, however, does not change the 'factory settings'. They are preserved.

What is needed:
The updateServer.zip package (link at the end)
(License of the cUrl program allows to include it in the package).

Download the package and unzip into your 'upload area'.

How it works
There is a batch file genUpdIni.cmd, I explain here step by step.

Here you define your individual settings
REM Customise these settings:

Set InfoTitle=nativeEx

Set WEB=nativeex.boot-land.net

Set FTP=nativeex.boot-land.net/httpdocs/

Set CopyProjects=nativeEx_Core nativeEx_barebone

Set UpdateProjects=%CopyProjects% Tools

Set Origin="V:\WB\wb debug\projects\"

Set user=???

Set password=???


REM in script.project are all variables deleted which follow this variable



REM Not necessary to customize these, but you can

Set Excludes=Excludes.txt

Set WebUpdatesIni=web.updates.ini

Set LocalUpdatesIni=updates.ini

Set UploadBatch=Upload.cmd
When you test, maybe some unwanted files (not scheduled to go to the server) are left inside your project.
You can delete them here.
REM No need some files to upload!

if exist Projects\Tools\Languages\_default.txt del Projects\Tools\Languages\_default.txt

if exist Projects\nativeEx_barebone\Tools\processCompress.Script del Projects\nativeEx_barebone\Tools\processCompress.Script

if exist Projects\nativeEx_barebone\Tools\processUPX.Script del Projects\nativeEx_barebone\Tools\processUPX.Script
Invokes the 'getCopy' program which Compares files in 'work area' with files in 'upload area':
  • If files have different length, copy and
  • If files are in (*.script, *.project, *.link), copy to 'upload area' and
  • preserve actual interface settings
  • reset some user values like %SourceDir%
[*]If files have same length, but different MD5 (here are some additional checks for version etc. I do not want to explain here yet), copy to 'upload area' and
  • If files are in (*.script, *.project, *.link)
  • reset some user values like %SourceDir%
  • preserve actual interface settings
[*]When script.project is copied, the variables definitions following %LastVar% are removed.
getCopies %CopyProjects% /O%Source% /E%Excludes% /L%LastVar%
Invokes the genUpdates program which generates updates.ini and index.html to upload to the server.
genUpdates %UpdateProjects% /T%InfoTitle% /W%WEB%
Gets the actual updates.ini from the server. Compare with the actual local updates.ini gives info what to do.
curl http://%WEB%/%LocalUpdatesIni% > %WebUpdatesIni%
Generates a batch file %UploadBatch% to update the server.
buildUpdateList /W%WebUpdatesIni% /l%LocalUpdatesIni% /o%UploadBatch% /f%ftp% /u%user% /p%password%
curl -T "V:\WB\projects\pscProgs\updates\Projects\nativeEx_barebone/script.project ftp://user:PWD@nativeex.boot/land.net/httpdocs/nativeEx_barebone/script.project

curl -T "V:\WB\projects\pscProgs\updates\Projects\nativeEx_barebone/Tools/SaveBase.Script ftp://user:PWD@nativeex.boot/land.net/httpdocs/nativeEx_barebone/Tools/SaveBase.Script

curl -T "V:\WB\projects\pscProgs\updates\Projects\nativeEx_Core/Tools/Finalize Batch.Script ftp://user:PWD@nativeex.boot/land.net/httpdocs/nativeEx_Core/Tools/Finalize Batch.Script

REM ADD TO SERVER curl -T "V:\WB\projects\pscProgs\updates\Projects\nativeEx_Core/Finish/2 Create Image/folder.project ftp://user:PWD@nativeex.boot/land.net/httpdocs/nativeEx_Core/Finish/2 Create Image/folder.project

REM ADD TO SERVER curl -T "V:\WB\projects\pscProgs\updates\Projects\Tools/zCopy.exe ftp://user:PWD@nativeex.boot/land.net/httpdocs/Tools/zCopy.exe

REM DELETE FROM SERVER curl ftp://user:PWD@nativeex.boot/land.net/httpdocs/ -X 'DELE nativeEx_barebone/Basic/Build/8 - FIPS.Script'
Changed files are written as directly executable commands.
Files which are in the server and not on the local host (and vice versa) generate a REM line.
If you want to execute this line, you have to remove the REM text.

You should revise / edit this batch and then start.

This suite is currently running well with nativeEx_barebone.

If you try to use it with your own server:
Please, backup your 'upload area' before!


EDIT: Sorry, I forgot to link to the 'Magic Upload Suite'

#2 Lancelot


    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)

Posted 11 April 2009 - 12:27 PM


than the forgetten pm adviced utility is curl :):)

i will test this method too peter, thanks :)

#3 pscEx


    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
    European Union

Posted 31 August 2009 - 09:04 AM

There is a new version available.

It mainly fixed a 'feature' of delphi:

During the transfer of an interface, quotes are lost.

In IniRead, Delphi 'eats' the quotes of e.g.

pScrollBox3="RAM Drive",1,4,360,70,93,21,"RAM Drive","System Drive"

and reads

pScrollBox3=RAM Drive",1,4,360,70,93,21,"RAM Drive","System Drive

A different issue with a workaround:

In the latest Common_api there are a lot of pseudo-sections used as marker like
[###### ... ######]

Because the programs transfer sections by name, they become confused with the 'multiple same section' and evething between the first and the last
[###### ... ######]
is lost.

Who wants to transfer the API, please change
[###### ... ######]
//[###### ... ######]

You can detect that by an error message during build that section [ApiDef] is not found


#4 pedrole15


    Silver Member

  • .script developer
  • 731 posts

Posted 31 August 2009 - 11:32 AM

I have deleted all [###### ... ######] in CAPI 13

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users