It is currently 14 May 2025, 22:11
   
Text Size

SVN Build, Do It Yourself

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: SVN Build, Do It Yourself

Postby Corwin72 » 11 Jul 2011, 13:13

I am sorry.
I am not smart.
Can someone give me an example of how I should update the build-forge.bat

Here is what I was doing.

| Open
"C:\Documents and Settings\cduncan\Desktop\Forge2\forge-build\Forge"
echo.
echo Forge SVN Builder V1.3
echo.
echo By UnderFlow
echo This script is for the most part a modified version of existing Forge build scripts. The original creators of those scripts or script parts are (in chronological order):
echo Snacko
echo Fnoed
echo Chris H.
echo.
echo We would also like to thank all Forge contributors.
echo.
echo For more information visit viewtopic.php?f=26^&t=2767
echo.

if "%~1"=="" (echo Please start this file with a command line parameter containing the desired output path in double quotes
goto :end
)
echo Target directory: %~1
echo.


echo.
echo ---------- 1: Updating SVN ---------------------------
echo.
if exist forge-svn (
build\svn.exe update forge-svn
) else (
build\svn.exe checkout http://cardforge.googlecode.com/svn/src/ forge-svn
)


echo.
echo ---------- 2: Creating jar file ----------------------
echo.
REM remove the "2>NUL" to reenable the error output stream of the following command

java -jar build\ecj-3.5.2.jar forge-svn\src -1.6 -classpath forge-svn\src;forge-svn\res\lib\google-collections-1.0.jar;forge-svn\res\lib\java-image-scaling-0.8.4.jar;forge-svn\res\lib\miglayout-3.7.3.1-swing.jar;forge-svn\res\lib\jl1.0.1.jar;forge-svn\res\lib\napkinlaf-1.2.jar;forge-svn\res\lib\nimrodlf.jar;forge-svn\res\lib\substance.jar;forge-svn\res\lib\java-yield-1.0-SNAPSHOT-jar-with-dependencies.jar;forge-svn\res\lib\xstream-1.3.1.jar;forge-svn\res\lib\xpp3_min-1.1.4c.jar;forge-svn\res\lib\minlog-1.2.jar;forge-svn\res\lib\swingx-1.6.1.jar;forge-svn\res\lib\testng-6.0.1.jar -g:none -d output 2>NUL

mkdir output\META-INF
copy forge-svn\build\manifest.forge output\META-INF\MANIFEST.MF /Y
cd output
REM remove the ">NUL" to reenable the standard output stream of the following command
..\build\7z.exe a -tzip -r -mx=9 ..\run-forge.jar *.class META-INF/MANIFEST.MF > NUL


echo.
echo ---------- 3: Copying Forge to target directory ------
echo.
cd ..
REM If you you want more feedback from the robocopies, remove some of the parameters:
REM /NJH -> no job header
REM /NJS -> no job summary
REM /NDL /NFL -> no directory list / no file list, respectively
robocopy .\forge-svn %1 forge.properties /NDL /NFL /NJH /NJS
robocopy . %1 run-forge.jar /NDL /NFL /NJH /NJS
robocopy .\build %1 forge.exe /NDL /NFL /NJH /NJS
robocopy .\forge-svn\res "%~1\res" /E /XF forge.preferences /XF display_new_layout.xml /XD .svn /NDL /NFL /NJH /NJS


echo.
echo ---------- 4: Cleaning up ----------------------------
echo.
rmdir output /s /q
del run-forge.jar

:end
pause
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: SVN Build, Do It Yourself

Postby Chris H. » 11 Jul 2011, 13:25

Corwin72 wrote:Can someone give me an example of how I should update the build-forge.bat
`
Have you tried version 1.4 of the scripts that UnderFlow released yesterday?
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: SVN Build, Do It Yourself

Postby Corwin72 » 11 Jul 2011, 13:40

UnderFlow wrote:Thanks, Braids. Fixed in script version 1.4.

Also, I added a few lines to run.bat to make it update build-forge.bat, like goonjamin suggested.

Lastly, since there were some people with locking issues, I added the cleanup script to the zip package.

http://dl.dropbox.com/u/5988273/forge-build.zip

http://dl.dropbox.com/u/5988273/build-forge.bat
http://dl.dropbox.com/u/5988273/run.bat
http://dl.dropbox.com/u/5988273/cleanup.bat
This is the build that I was using.

In Part 3 of run.bat I receive the error:
| Open
'robocopy' is not recognized as an internal or external command. operable program or batch file.
I get that error 4 times.


I am using xp. From what I can find robocopy is for vista and win 7.

I installed the download listed here and was sucessful with run.bat
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=17657
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: SVN Build, Do It Yourself

Postby Chris H. » 11 Jul 2011, 13:54

Corwin72 wrote:
UnderFlow wrote:Thanks, Braids. Fixed in script version 1.4.

Also, I added a few lines to run.bat to make it update build-forge.bat, like goonjamin suggested.

Lastly, since there were some people with locking issues, I added the cleanup script to the zip package.

http://dl.dropbox.com/u/5988273/forge-build.zip

http://dl.dropbox.com/u/5988273/build-forge.bat
http://dl.dropbox.com/u/5988273/run.bat
http://dl.dropbox.com/u/5988273/cleanup.bat
This is the build that I was using.
`
I guess that you are using the complete build script and not the update script?

I looked quickly at the script that you quoted and it looks like it may include the several LAF jars that were temporarily removed from the code base. If you look at the section starting with:

Code: Select all
java -jar build\ecj-3.5.2.jar forge-svn\src -1.6 -classpath forge-svn\src;
`
you will see a list of the jars that are included in the res/lib/ folder. If you edit the script and remove the following you might be able to get it to run. Or we can give UnderFlow a chance to check this out and release a version 1.5 update.

forge-svn\res\lib\jl1.0.1.jar;

forge-svn\res\lib\napkinlaf-1.2.jar;

forge-svn\res\lib\nimrodlf.jar;

forge-svn\res\lib\substance.jar;

User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: SVN Build, Do It Yourself

Postby Corwin72 » 11 Jul 2011, 14:04

I will give it a shot thanks.
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: SVN Build, Do It Yourself

Postby UnderFlow » 11 Jul 2011, 17:27

Sorry Corwin, but I don't exactly get what the problem is.
It should work if you do the following:
  • Download the zip file and extract it to some folder (e.g. "build-forge").
  • If you run XP, get robocopy (you already did this). Alternatively, you could replace all instances of "robocopy" in build-forge.bat with "xcopy" (I did not try this out, do it on your own risk!).
  • Execute run.bat (run.bat calls and updates build-forge.bat).
  • There should now be a folder called "forge" next to "build-forge" containing your new, shiny version of Forge.

To find out if you installed robocopy correctly:
  • Start -> Run -> type cmd
  • In the console, type robocopy
  • Some help text for robocopy should appear.

If that doesn't help, please describe the symptoms you get.

Thanks for your feedback.
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: SVN Build, Do It Yourself

Postby Corwin72 » 11 Jul 2011, 17:35

what I found out is that Robocopy is not standard on XP. I had to install that microsoft link that I had in the previous post. Then run worked perfectly.

Before that I was trying the buil-forge.bat.
The instructions are to add a file location in the .bat file. I could not figure out what I was doing wrong.
I was trying the line %~1 "C:\.....Forge"
At the beginning of that file and could not get it to work.

Then I gave up and started working with the run.bat.
I recevied the robocopy error and posted. Then did some research on robocopy and determined that I just needed to install it. Now I am good to go with run.bat.

Sorry for the confusion.
I guess I got flustered that run.bat worked on my vista box at home and not on the xp box at work. Google Fu for the win.
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: SVN Build, Do It Yourself

Postby Braids » 11 Jul 2011, 20:33

UnderFlow wrote:If you run XP, get robocopy (you already did this). Alternatively, you could replace all instances of "robocopy" in build-forge.bat with "xcopy" (I did not try this out, do it on your own risk!).
not a good idea! they take totally different parameters.

It would be nice if people didn't have to install robocopy and use xcopy instead, if it were available. i don't know cmd well enough to test for it. does anyone reading this have the skill?
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. ;)
User avatar
Braids
Programmer
 
Posts: 556
Joined: 22 Jun 2011, 00:39
Location: Unknown. Hobby: Driving myself and others to constructive madness.
Has thanked: 1 time
Been thanked: 1 time

Re: SVN Build, Do It Yourself

Postby Hellfish » 11 Jul 2011, 20:42

Granted, I havn't worked with batch scripts since like 8th grade but can't you test for error codes in batch scripts?

FAKE EDIT: I looked it up, try something like this:
First attempt to use robocopy, then check the %ERRORLEVEL% variable. If it is 9009 (Set by the system when scripts attempt to execute unrecognized commands), use xcopy instead.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
User avatar
Hellfish
Programmer
 
Posts: 1297
Joined: 07 Jun 2009, 10:41
Location: South of the Pumphouse
Has thanked: 110 times
Been thanked: 169 times

Re: SVN Build, Do It Yourself

Postby UnderFlow » 11 Jul 2011, 23:12

Hellfish wrote:I looked it up, try something like this:
First attempt to use robocopy, then check the %ERRORLEVEL% variable. If it is 9009 (Set by the system when scripts attempt to execute unrecognized commands), use xcopy instead.
That looks good, I'll add it to the script.

I changed the original script to robocopy because xcopy is deprecated and I didn't think that so many people still use XP.
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: SVN Build, Do It Yourself

Postby UnderFlow » 12 Jul 2011, 22:07

Ok, I implemented the changes proposed by Hellfish:
http://dl.dropbox.com/u/5988273/build-forge.bat

I tested it as well as I could, but feedback from people without robocopy would be nice. The EXCLUDE parameter of xcopy foiled my attempts to make the two versions functionally equal, so your display_new_layout.xml and forge.preferences will for now be overwritten with each update.

Also, since I can't get Eclipse to commit my changes, could someone else please update the version currently on the SVN? (I am using https, the google code password and my mail address w/o @gmail.com, but it is still not working. :/)
Thanks.
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: SVN Build, Do It Yourself

Postby Chris H. » 12 Jul 2011, 22:28

UnderFlow wrote:Also, since I can't get Eclipse to commit my changes, could someone else please update the version currently on the SVN? (I am using https, the google code password and my mail address w/o @gmail.com, but it is still not working. :/).
`
You need to send you google gmail address to DennisBergkamp via private message and as a project owner he can give you commit status. The current group of people with commit status can be seen here:

http://code.google.com/p/cardforge/people/list

After you send your google gmail address to DennisBergkamp you can check the link above to see if you are listed. It may take him a few days or so to add you to this list.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: SVN Build, Do It Yourself

Postby UnderFlow » 13 Jul 2011, 03:37

Chris H. wrote:You need to send you google gmail address to DennisBergkamp via private message and as a project owner he can give you commit status.
Well, that would explain it.^^ Thanks.
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

Re: SVN Build, Do It Yourself

Postby goonjamin » 21 Jul 2011, 01:21

I've taken a stab at updating the build script to work with the new gitorious repo.

Note this is still a little rough around the edges but it seems to work fine for me. Note I'm running windows 7 32bit.

http://www.mediafire.com/download.php?68cri2gl6eq9z2e
goonjamin
 
Posts: 133
Joined: 19 Aug 2010, 19:51
Has thanked: 39 times
Been thanked: 5 times

Re: SVN Build, Do It Yourself

Postby UnderFlow » 21 Jul 2011, 01:35

While working on a git version of the build script, I got the following idea:
We could put a clean copy of one of the current revisions of Forge into a shared Dropbox (http://www.dropbox.com) folder and include a script that copies everything into a user-defined folder (retaining preference.files etc).

Advantages:
  • If something goes wrong, multiple people can fix it. (I.e. there is no single point of failure.)
  • Card pictures could be included, since shared folders are not public. Downloads would be faster and if new cards are released, only one person has to update the pictures.

Disadvantages:
  • Testers need to install a specific program.
  • Testers need to ask one of the members for access, which increases their inhibition to begin participating.

Am I missing some points?
What do you think?
Would you be more/less willing to start using the bleeding edge version if we used this system?
UnderFlow
 
Posts: 51
Joined: 17 Feb 2011, 17:49
Has thanked: 0 time
Been thanked: 1 time

PreviousNext

Return to Forge

Who is online

Users browsing this forum: Google [Bot] and 22 guests


Who is online

In total there are 23 users online :: 1 registered, 0 hidden and 22 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: Google [Bot] and 22 guests

Login Form